Commit Graph

293 Commits

Author SHA1 Message Date
xintaofei
150b927610 fix(ui): unify scrollbar styles across scrollable containers
Add .scrollbar-thin and .scrollbar-thin-edge utility classes in
globals.css and apply them to sidebar, file tree, git changes,
git log, session files, diff preview, and message thread panels.
Replace scattered inline webkit-scrollbar overrides with the
shared classes for consistent appearance and gutter behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 18:50:14 +08:00
xintaofei
56cd207801 fix(ui): add max-height limit to commit message textarea
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 18:48:27 +08:00
xintaofei
98691c1d9e fix(ui): add flex container to sidebar wrapper to enable conversation list scrolling
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 14:02:17 +08:00
xintaofei
0f38b8ee32 fix(ui): override Python monarch tokenizer to fix triple-quoted string highlighting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 23:42:25 +08:00
xintaofei
c367117392 fix(ui): add KaTeX CSS and normalize LaTeX math delimiters for proper formula rendering
Import KaTeX CSS in layout.tsx to ensure math formulas display correctly
in both dev and production modes. Convert LaTeX-style `\[...\]` / `\(...\)`
delimiters to `$$...$$` / `$...$` since remark-math only supports dollar
sign delimiters, fixing formula rendering for agents like Codex.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 23:27:40 +08:00
xintaofei
8d97ba6f44 feat(ui): upgrade @lobehub/icons to v5 and update agent icon colors
Upgrade @lobehub/icons from v4 to v5.3.0, adopt new icon components (ClaudeCode, Codex, GeminiCLI) with Color variants, and align fallback AGENT_COLORS with official brand colors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 21:42:22 +08:00
xintaofei
768d1326b1 feat(ui): add responsive layout support for mobile and small screens
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 15:47:16 +08:00
xintaofei
0401319281 fix(settings): update chat channel icons to Play/Square and SendHorizontal
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 12:58:12 +08:00
xintaofei
ad3f393e92 fix(settings): reorder nav menu to place Agents below Skills
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 11:23:48 +08:00
xintaofei
8362bdf2c7 fix(settings): limit model provider agent types and adjust card layout
Restrict supported agent types to Claude Code, Codex CLI, and Gemini CLI. Reposition agent type badges to be vertically centered beside the name and API URL block in provider cards.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 11:20:12 +08:00
xintaofei
faf8ff0731 feat(settings): add model selection combobox for OpenCode agent configuration
Replace plain text inputs for model and small_model with searchable
combobox dropdowns that list models from configured providers, while
still supporting custom text entry on blur.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 10:55:42 +08:00
xintaofei
a3d5335e7f feat(settings): protect model provider deletion and cascade credential updates
- Block deletion of a model provider when it is referenced by any agent,
  returning an error that lists the agent names so the user knows what to unlink first
- When a provider's api_url or api_key is updated, automatically propagate
  the new credentials to all dependent agents: updates env_json in the database
  and patches on-disk config files (Claude Code settings.json, Gemini settings.json,
  Codex auth.json + config.toml, OpenCode auth.json) using the same field names
  and structure as the agent settings UI
- Fix error message display in provider dialogs for both Tauri and web transports,
  which throw plain objects rather than Error instances

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 00:25:01 +08:00
xintaofei
4245df2f4a fix(settings): improve codex CLI auth mode switching to preserve auth.json keys
- Patch only `OPENAI_API_KEY` and `auth_mode` in auth.json when switching
  auth modes, instead of resetting the entire file
- Clean up `OPENAI_BASE_URL` from env when codex loads in official
  subscription mode
- Hide API URL and API Key inputs when model provider mode is selected

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 23:05:52 +08:00
xintaofei
b64976e4d6 feat(settings): refactor agent auth modes and add model provider authentication
- Split env vars and config file persistence into separate save operations
- Add model_provider_id field to agent_setting for tracking selected provider
- Add "Model Provider" auth mode for Claude Code, Codex CLI, and Gemini CLI
- Add "Custom Endpoint" auth mode for Claude Code (previously only official subscription)
- Unify auth mode labels across all three agents (official subscription / custom endpoint / model provider)
- When model provider is selected, fill api_url and api_key into env and config automatically
- Resolve model provider credentials at ACP connect time as a backend fallback
- Clear provider deletion cascades to agent_setting.model_provider_id
- Claude Code writes API credentials to config.env (ANTHROPIC_BASE_URL / ANTHROPIC_AUTH_TOKEN)
- Codex: switching auth modes patches config.toml instead of clearing it
- Add i18n keys for new auth modes in all 10 supported languages

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:10:18 +08:00
xintaofei
d28c54a038 fix(settings): reorder nav menu to place model providers after skills
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 16:40:37 +08:00
xintaofei
ba19299696 feat(settings): add model provider management with full CRUD support
Add a new settings page for managing API model providers (name, API URL,
API key, applicable agent types). Includes database migration, SeaORM
entity, backend CRUD commands/handlers, frontend settings UI with agent
type filter, add/edit/delete dialogs, and i18n support for all 10 locales.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 16:35:14 +08:00
xintaofei
6359651247 feat(chat): add slash command dropdown button in message input toolbar
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 13:24:26 +08:00
xintaofei
32a1c5adc0 fix: improve error message when exporting long conversations as image
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 23:38:25 +08:00
xintaofei
c06e854975 feat: add favicon for web/server mode browser tabs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 19:03:55 +08:00
xintaofei
4c36369dd2 feat: add export conversation to image, markdown, and HTML formats
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 18:56:37 +08:00
xintaofei
1282dcee19 feat: add copy button on hover for user messages in conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 15:22:34 +08:00
xintaofei
ea3b20b2d9 fix: update run button state when terminal tab is closed directly
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 10:42:50 +08:00
xintaofei
9396127cd9 feat: add @ file mention support in chat input and unify directory attachment
Support typing "@" in the chat input to trigger a file list popup with
filtering, keyboard navigation, and file/directory attachment. Directories
from the sidebar file tree now attach as resource links instead of injecting
text into the input.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 22:43:27 +08:00
xintaofei
4f394ea521 fix: use randomUUID fallback for non-secure contexts in terminal-context
Replace crypto.randomUUID() with the existing randomUUID() utility
that falls back to crypto.getRandomValues() over plain HTTP.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 19:21:56 +08:00
xintaofei
e7bd12e16f fix: sync run button state with terminal process via centralized exit tracking
Centralize terminal process lifecycle in terminal-context as single
source of truth. TerminalView reports exit/failure via callback,
context maintains exitedTerminals set, command-dropdown reacts to it.

Removes redundant polling and per-component exit event subscriptions
that raced with deferred spawn introduced in b2d10fa.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 19:02:01 +08:00
xintaofei
236f0ed5e3 Merge branch 'main-fix' 2026-04-02 16:25:00 +08:00
xintaofei
efd8e1104f features: add commit and push option to git commit window
- Add split button with dropdown in commit dialog supporting both
  "Commit" and "Commit and Push" actions
- Pass folderId through gitCommit/gitPush API calls so backend emits
  events that the folder window can receive for toast notifications
- Update Tauri git_commit and git_push commands to accept folder_id
  parameter with window label fallback for cross-window compatibility
- Wrap commit page with GitCredentialProvider for push authentication
- Keep commit window open when push fails so user can see the error
- Add i18n translations for all 10 locales

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 16:22:41 +08:00
xintaofei
9b50d75266 fix: skip rendering img element when src is empty in image preview dialog
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 15:26:17 +08:00
xintaofei
f23ed12650 feat: add click-to-preview for image attachments in chat
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 15:23:48 +08:00
XinTaoFei
2a3b4b1908 Merge pull request #54 from isYangs/main
fix: disable macOS overscroll bounce
2026-04-02 14:55:04 +08:00
xintaofei
b2d10fa008 optimize: terminal spawn lifecycle to eliminate output race condition
Move PTY spawn from context layer to view layer so event subscription
happens before spawn, preventing loss of initial terminal output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 13:55:38 +08:00
xintaofei
d0e0aad525 optimize: WeChat QR code auth flow and channel reliability
- Generate QR code server-side when iLink API returns SPA page URL
  (added qrcode + image crates for PNG generation)
- Strip bot_token from frontend response (new WeixinQrcodeStatusPublic type)
- Add request timeouts and shared HTTP client for QR code endpoints
- Fix TOCTOU race on reply_context double-lock (single lock scope)
- Extract do_send() helper to deduplicate sendmessage logic; resend now
  checks ret field for context expiry instead of HTTP status only
- Cap pending_messages buffer at 50 to prevent unbounded memory growth
- Generate stable X-WECHAT-UIN per backend instance instead of per request
- Extract ILINK_CHANNEL_VERSION constant (was hardcoded in 4 places)
- Add 5-minute client-side QR expiry timeout in frontend dialog
- Track consecutive polling errors and show warning after 3 failures
- Stabilise onAuthSuccess/onClose callback refs to prevent polling restarts
- Replace dead i18n key weixinOpenQrcode with weixinPollError

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 11:22:51 +08:00
isYangs
03a6f8b5eb Merge remote-tracking branch 'origin/main' 2026-04-02 10:40:50 +08:00
isYangs
92dd5b1bbe fix: disable macOS overscroll bounce 2026-04-02 09:54:23 +08:00
xintaofei
8050e30a55 features: supports WeChat channel 2026-04-02 00:17:23 +08:00
xintaofei
b23f6a5aaa fix: enable inline math formula rendering with single dollar signs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 17:48:46 +08:00
xintaofei
d76dc716e4 optimize: Enhanced session command processing logic 2026-04-01 17:22:56 +08:00
xintaofei
05214d09de Merge remote-tracking branch 'origin/botwork' 2026-04-01 15:03:41 +08:00
xintaofei
4f8b99e5b6 Merge branch 'main-fix' 2026-04-01 13:41:33 +08:00
xintaofei
3a5d720cc9 optimize: session list loading 2026-04-01 13:41:22 +08:00
xintaofei
058245c284 Merge branch 'main' into main-fix 2026-04-01 13:01:25 +08:00
xintaofei
c983779dea fix: resolve real-time update issue in tiled view with multiple active sessions 2026-04-01 13:00:37 +08:00
xintaofei
b98f50340f Feature: Supports remote branch deletion 2026-04-01 12:41:15 +08:00
xintaofei
c25e4062b9 fix lint 2026-04-01 11:18:51 +08:00
xintaofei
245151dda2 优化提交代码的处理逻辑,避免一些情况无法提交代码 2026-04-01 11:16:41 +08:00
xintaofei
f33f658a85 修复:“添加到VCS”的弹框显示了已经被git跟踪的文件 2026-04-01 10:39:15 +08:00
xintaofei
58611a6bc1 消息渠道支持会话相关指令 2026-04-01 10:08:20 +08:00
xintaofei
967a16aeaa 支持配置cline的skills 2026-03-31 22:35:42 +08:00
xintaofei
296b0c7806 优化MCP管理,支持所有Agent 2026-03-31 22:15:48 +08:00
xintaofei
fafe970309 调整:web/server模式下,设置页面不显示“Web 服务”菜单项 2026-03-31 19:28:49 +08:00