Commit Graph
100 Commits
Author SHA1 Message Date
xintaofei 51598f3b12 Merge branch 'cv-main' 2026-04-24 14:29:44 +08:00
xintaofei bcfaba10c7 fix(acp): prevent memory blowup from streaming terminal tool output
Large raw_output snapshots from tool_call_update notifications caused
O(N²) traffic through the event pipeline, multi-GB transient allocations
and WKWebView crashes. The fix turns cumulative snapshots into bounded
incremental deltas and removes redundant payload copies.

- Add ToolCallOutputCache keyed by tool_call_id with a 8KB tail
  fingerprint and total length. Detects cumulative extensions by
  matching the cached tail at the expected offset in the incoming
  snapshot, so it works even when the full output grows into the MB
  range. Emits suffix deltas with raw_output_append=true; falls back
  to a truncated replacement when content diverges.
- Cap any single emitted raw_output chunk at 64KB (MAX_SINGLE_EMIT_BYTES)
  with a UTF-8 char-boundary-safe tail and ANSI-sequence-safe trimming.
  Apply the same cap to emit_terminal_output_update.
- Bound the cache at 256 entries with FIFO eviction, and clear entries
  when the tool call reaches completed / failed / cancelled / error.
- Seed the cache via a dedicated seed() method on SessionUpdate::ToolCall
  so the initial event never emits an accidental append.
- Share emit payloads as Arc<serde_json::Value> across broadcast
  receivers and skip the Tauri-side clone: serialize once and hand the
  same Arc to both the webview emit and the WebSocket broadcaster.
- Add 14 unit tests covering boundary cases: identity, prefix extension
  past the cached tail, divergence, oversized deltas, multibyte UTF-8
  truncation, final-status cleanup, FIFO eviction, seed semantics, and
  ANSI-safe trimming.
2026-04-24 14:28:41 +08:00
xintaofei 0e09711e56 feat(codex-skills): surface built-in .system skills as read-only
Scan ~/.codex/skills/.system so Codex CLI's bundled skills (imagegen,
skill-creator, etc.) appear in the $ autocomplete and Skills settings.
Mark them read_only on the API; the save/delete handlers refuse writes
to that path, and the UI shows a system badge with a tooltip and
disables edit/delete/save for those entries.
2026-04-24 14:18:36 +08:00
xintaofei e9c3076197 fix(message-input): persist draft across restarts by keying on conversation id 2026-04-24 12:32:35 +08:00
xintaofei f8d7c8966a feat(settings): place quick messages nav below agents 2026-04-24 11:10:31 +08:00
xintaofei 7caf730369 feat(message-input): turn plus button into menu with attach files and quick messages 2026-04-24 11:07:56 +08:00
xintaofei 61778f152b feat(settings): add quick messages management with drag-and-drop sorting
Adds a new "Quick Messages" settings page below Experts for managing reusable title/content snippets, backed by SQLite via SeaORM and exposed through both Tauri commands and the Axum web router. The list supports drag-to-reorder using the same motion/react Reorder pattern as the agent list, with translations provided across all 10 supported locales.
2026-04-24 10:46:33 +08:00
xintaofei fbe272de4f Merge branch 'cv-main' 2026-04-24 10:05:36 +08:00
xintaofei 089cc7c34e feat(sidebar-conversation-list): show empty-state hint inside expanded folders with no visible conversations 2026-04-24 10:05:20 +08:00
xintaofei 49aee458d2 feat(sidebar): default new folders to neutral foreground color 2026-04-24 09:50:49 +08:00
xintaofei 46764ee53c # Release version 0.10.1
- feat(sidebar): add per-folder color swatch with color picker and neutral conversation rail.
- feat(conversation-context-bar): unify selectors and attachments into a horizontal scrolling row.
- fix(conversation-context-bar): hide selectors divider when no attachments are present.
- fix(conversation-manage-dialog): sort conversations by created_at and display creation time.
- fix(icons): regenerate multi-resolution Windows ICO for crisp desktop icon.
- chore(acp-registry): bump opencode to 1.14.21 and gemini-cli to 0.39.0.

-----------------------------
# 发布版本 0.10.1

- 新增(侧边栏):为每个文件夹添加颜色色块与颜色选择器,会话轨道采用中性色;
- 新增(会话上下文栏):将选择器与附件统一为横向滚动行;
- 修复(会话上下文栏):无附件时隐藏选择器分隔线;
- 修复(会话管理对话框):按 created_at 排序会话并显示创建时间;
- 修复(图标):重新生成多分辨率 Windows ICO 以获得清晰的桌面图标;
- 依赖(ACP 注册表):升级 opencode 至 1.14.21、gemini-cli 至 0.39.0。
2026-04-24 00:38:33 +08:00
xintaofei 211d589160 fix(conversation-context-bar): hide selectors divider when no attachments are present 2026-04-23 23:38:40 +08:00
xintaofei 1148319eba feat(conversation-context-bar): unify selectors and attachments into a horizontal scrolling row
- Pin folder/branch selectors to the left with a subtle divider so they stay visible while scrolling
- Redirect vertical wheel input to horizontal scroll within the bar
- Auto-scroll to the end when new attachments are appended
2026-04-23 23:36:24 +08:00
xintaofei e80c9e69a9 chore(acp-registry): bump opencode to 1.14.21 and gemini-cli to 0.39.0 2026-04-23 23:12:52 +08:00
xintaofei 1eeb5041a8 feat(sidebar): add per-folder color swatch with picker and neutral conversation rail
- Add `color` column to folder table with migration backfill and hash-based assignment on folder creation
- Expose `update_folder_color` via Tauri command and `/update_folder_color` HTTP route
- Render a color swatch before each folder name in the sidebar header; offer a 10-color palette (9 hues plus a theme-aware foreground sentinel) through the folder context menu
- Show the folder header "new conversation" button only on hover
- Drop the expanded-state tint on folder name and count badge; use a fixed neutral rail color for conversation items
2026-04-23 23:02:58 +08:00
xintaofei b7eeeb0be4 fix(conversation-manage-dialog): sort conversations by created_at and display creation time 2026-04-23 21:17:27 +08:00
xintaofei 1d3dd0dcd4 fix(icons): regenerate multi-resolution Windows ICO for crisp desktop icon 2026-04-23 21:04:11 +08:00
xintaofei 72e5694632 docs(images): update main light and dark screenshots 2026-04-23 16:28:50 +08:00
xintaofei 022172a9ea chore(lint): clean up frontend and Rust lint issues 2026-04-23 15:56:41 +08:00
xintaofei 1dd40d0baf feat(conversation-context-bar): show descriptive tooltips for folder and branch selectors 2026-04-23 15:21:18 +08:00
xintaofei ba7f3c598b fix(branch-dropdown): show "No branch" label when folder is not a git repository 2026-04-23 15:12:46 +08:00
xintaofei ec115e5a12 feat(acp-agent-settings): expand OpenCode provider.npm options with additional AI SDK providers 2026-04-23 15:00:59 +08:00
xintaofei 7aec93e922 feat(search-dialog): show active folder in search popup header 2026-04-23 14:11:54 +08:00
xintaofei c7cd94a01b Merge branch 'cv-main' 2026-04-23 14:03:01 +08:00
xintaofei 50c5b12d53 refactor(branch-dropdown): drop worktree parent-branch merge shortcut
Remove the parent-branch button shown beside the branch selector along
with its supporting API, command, service, model, and i18n strings.
Add migration m20260423 to drop the now-unused folder.parent_branch
column.
2026-04-23 14:02:46 +08:00
xintaofei c67e145837 feat(sidebar): add workspace actions to conversation list context menu 2026-04-23 13:49:45 +08:00
xintaofei 377ae6d8e6 fix(command-dropdown): preserve running command status across folder switches 2026-04-23 11:45:25 +08:00
xintaofei e489925567 Merge branch 'cv-main' 2026-04-23 11:37:18 +08:00
xintaofei bcd457c823 refactor(conversation-status): share sidebar status glyphs across menus, search, and manage dialog 2026-04-23 11:35:38 +08:00
xintaofei 5f4c26c480 fix(message-input): scale selector collapse breakpoint with appearance zoom 2026-04-23 11:30:49 +08:00
xintaofei f9dfc64009 Merge branch 'cv-main' 2026-04-23 11:26:02 +08:00
xintaofei cd15813f34 refactor(tooltip): use native title for folder picker and sidebar more-options 2026-04-23 11:25:16 +08:00
xintaofei 1323d3e883 fix(mode-tabs): use rem heights so workspace mode tabs scale with zoom 2026-04-23 11:24:24 +08:00
xintaofei d7113f6ed0 fix(resizable): clip panel group overflow to block programmatic scroll shift 2026-04-23 11:15:05 +08:00
xintaofei 02434b6e1d refactor(sidebar): align folder and conversation rail on a shared axis 2026-04-23 10:33:42 +08:00
xintaofei 6665b1902b fix(sidebar): prevent sibling folder overlap and nudge conversation rail 2026-04-23 09:59:46 +08:00
xintaofei 35265c766a fix(shadcn-launcher): point preview iframe to radix/preview-02 2026-04-23 01:02:37 +08:00
xintaofei 5ea812405f fix(theme): use neutral sidebar primary for grayscale dark themes 2026-04-23 00:55:18 +08:00
xintaofei f1ce7179ea feat(sidebar): reorder folder groups by drag and persist sort order 2026-04-23 00:42:58 +08:00
xintaofei 2dbdaa9c74 feat(branch-dropdown): add switch-to-branch entry for local and remote branches 2026-04-22 23:29:36 +08:00
xintaofei 3030bb7981 feat(conversation-detail): auto-scroll active tile into view and theme its highlight 2026-04-22 23:18:34 +08:00
xintaofei 7a03cfff36 fix(branch-picker): strip remote prefix when checking out remote branches 2026-04-22 22:56:36 +08:00
xintaofei 5ac9cee2ff feat(sidebar): add conversation sort mode toggle with created-time default 2026-04-22 22:34:23 +08:00
xintaofei 8ef29680d2 refactor(sidebar): shrink conversation status badges to match folder count pill 2026-04-22 22:10:52 +08:00
xintaofei b74f698c0d fix(scroll-area): raise overlay scrollbar z-index to prevent occlusion 2026-04-22 22:05:53 +08:00
xintaofei aea652af76 refactor(sidebar): tighten list padding and round conversation and folder rows into pills 2026-04-22 21:59:55 +08:00
xintaofei 8095a75b5f fix(conversation-detail-panel): keep tab subtree mounted across tile-mode layout switch 2026-04-22 21:25:09 +08:00
xintaofei c11a57921d fix(conversation-context-bar): exclude removed folders from folder picker 2026-04-22 19:36:33 +08:00
xintaofei 4440249678 refactor(conversation-context-bar): slim folder and branch pickers to selection only
- Match popover corner styling of folder picker with branch picker
- Drop 'open folder from disk' entry from folder picker
- Drop 'new branch' entry and dialog from branch picker
2026-04-22 19:30:58 +08:00
xintaofei d26c0b91c9 fix(sidebar): hide folder groups after removing from workspace 2026-04-22 19:02:14 +08:00
xintaofei 1904013dac refactor(sidebar): emphasize active-tab conversations via rail color and status icon
- Highlight the vertical rail on conversations open in tabs with a darker primary tint and bleed 1px at both ends to stay continuous across cards
- Add emphasized state to SidebarStatusIcon mirroring the rail, deepening color when the conversation is open in a tab
- Redesign done icon as outlined circle + check, unify all status icons to sidebar-primary with consistent 0.75rem size and sidebar-tinted backdrop so they mask the rail
2026-04-22 18:39:17 +08:00
xintaofei 1d40308f52 refactor(sidebar): simplify folder header styling and fix arrow pixel alignment
- Drop the expanded-state background and border on folder headers; keep the unified hover background
- Swap the arrow to a ChevronRight/ChevronDown toggle and remove the rotation animation to avoid subpixel rendering drift
- Size the arrow icon at 11px so its vertical center lands on an integer pixel
- Round the sticky overlay's top offset so it stays pixel-aligned with the virtual list items
2026-04-22 18:39:17 +08:00
xintaofei 10922dd71a fix(acp): reconnect agent when folder selector switches working directory 2026-04-22 12:38:31 +08:00
xintaofei d3d3a66263 fix(tabs): show "new conversation" title for draft tabs on hydration 2026-04-22 12:24:31 +08:00
xintaofei 5dd1deb986 fix(transport): replace Tauri listen() to avoid unlisten race crashing on WKWebView
Call plugin:event|listen/unlisten directly and guard the client-side listener
registry cleanup, so unsubscribe always reaches the backend even when the
registration eval has not yet populated window.__TAURI_EVENT_LISTENERS__.
Prevents the intermittent `listeners[eventId].handlerId` TypeError and the
resulting leaked listener.
2026-04-22 11:25:38 +08:00
xintaofei 3f3a325848 fix(sidebar): compute sticky folder offsets from uniform item height to avoid NaN scroll height 2026-04-22 11:08:17 +08:00
xintaofei 78caf4d827 refactor(sidebar): always render folder groups regardless of conversation count 2026-04-22 10:53:22 +08:00
xintaofei f0b3ec20a8 fix(folders): add open_folder Tauri command for path-based opens 2026-04-22 10:53:17 +08:00
xintaofei c691fb0c07 feat(workspace): add no-folder empty states and gate folder-only actions
- Sidebar: replace the "no conversations" placeholder with Open Folder, Clone Repository, and Project Boot buttons when the workspace has no open folders.
- Title bar: disable the terminal and auxiliary-panel toggle buttons while no folder is active.
- Aux panel: show a shared localized "no folder open" prompt in the file tree, git changes, and git log tabs when no folder is active.
- Add auxPanel.noFolderTitle / noFolderHint translations across all ten supported locales.
2026-04-22 10:36:27 +08:00
xintaofei 14fb231dcc feat(sidebar): add conversation management dialog with filtering and bulk actions 2026-04-22 09:31:38 +08:00
xintaofei ae88b2256f refactor(sidebar): scope folder-header menu to per-folder new/import, drop import from card and blank-area menus 2026-04-22 08:16:39 +08:00
xintaofei fc174d8692 refactor(conversation): add horizontal scrollbar and min width to tiled tabs 2026-04-22 01:20:21 +08:00
xintaofei 72b8817bb2 refactor(sidebar): highlight expanded folder and add per-folder new-conversation button
- Replace the branch badge with a compact count badge; recolor the
  folder name and badge to sidebar-primary on a tinted row background
  when expanded
- Lighten the selected conversation item background so the expanded
  folder row stays the strongest signal
- Add a "+" button on each folder header that reuses a single new-
  conversation tab across folders, disconnecting the old ACP session
  so the connection lifecycle reconnects against the target folder's
  working directory
2026-04-22 01:01:18 +08:00
xintaofei f3bdf94723 feat(title-bar): add folder-actions menu and branch dropdown with git operations 2026-04-22 00:23:27 +08:00
xintaofei 08fb508736 refactor(branch-picker): fix popover corner radius, remove local branch delete, move new-branch to top 2026-04-21 23:14:57 +08:00
xintaofei 67c837901d refactor(workspace): remove welcome page and render conversation panel directly 2026-04-21 22:52:07 +08:00
xintaofei eec47b3b12 refactor(title-bar): move sidebar toggle to left and swap terminal/aux-panel order 2026-04-21 22:29:51 +08:00
xintaofei 1bf2c2afce refactor(tabs): drop sidebar count and terminal-tab folder badge, show folder in tab tooltip 2026-04-21 22:23:23 +08:00
xintaofei dd2b542df9 refactor(tabs): remove close-folder-tabs and reveal-in-sidebar menu items 2026-04-21 22:14:19 +08:00
xintaofei b77842ee66 fix(conversation): derive ACP working dir from tab folder, not active folder 2026-04-21 22:03:57 +08:00
xintaofei 753e312c13 fix(workspace): resolve folder lookups against all folders for branch and file tree 2026-04-21 21:44:33 +08:00
xintaofei 256ebb7368 fix(sidebar): guard virtualizer itemSize against non-finite zoom level 2026-04-21 21:28:40 +08:00
xintaofei dc75020e1c refactor(chat-input): embed conversation context bar inside input container
Folder/branch pickers now render at the top of the input's rounded box
instead of a separate strip above it. Restyled as xs outlined buttons
matching the config selectors, always rendering the folder picker
chevron (dimmed when not editable). Removed the right-side commit/push
git action buttons and their unused imports. Scoped the bar to its
owning tab via a tabId prop so tile mode shows each tab's own folder
and disabled state independent of which tab is globally active.
2026-04-21 19:26:04 +08:00
xintaofei e567181b58 fix(sidebar): center guide line under folder chevron and tighten list paddings
- Align conversation guide line and status icon to the folder chevron center (left: 0.875rem)
- Use fixed 1px guide line with darker shade (sidebar-primary/15) for better visibility
- Add bottom border to sidebar title and a top gap above the folder list
- Tighten list horizontal padding to px-2 with matching pt-2 for consistency
- Fill the done status icon frame directly to avoid sub-pixel off-centering
2026-04-21 18:44:20 +08:00
xintaofei 7a6e19097e fix(sidebar): align title/folder/item start position and stabilize status icon rendering 2026-04-21 17:47:35 +08:00
xintaofei f0d530e1cb refactor(sidebar): streamline conversation list with completed filter and expand toggle
Replace flat/grouped view toggle with a show-completed filter dropdown,
add expand/collapse-all control, extract status icon component, and
simplify the sidebar header.
2026-04-21 17:07:40 +08:00
xintaofei 58b48e2bfe Merge branch 'main' into one-folder 2026-04-21 09:27:55 +08:00
xintaofei a2333e6bb4 # Release version 0.9.5
- feat(message-input): add search box to slash-command popups.
- fix(file-tree): keep aux-panel tree in sync with filesystem changes.
- fix(file-tree): invalidate both cached target and ancestor, skip collapsed refetches.
- chore(acp): bump claude-agent-acp to 0.30.0 and opencode to 1.14.19.

-----------------------------
# 发布版本 0.9.5

- 新增(消息输入):在斜杠命令弹窗中增加搜索框,方便快速定位命令;
- 修复(文件树):辅助面板的文件树与文件系统变更保持同步;
- 修复(文件树):同时失效缓存目标及其祖先节点,跳过已折叠节点的重复拉取;
- 杂项(ACP):升级 claude-agent-acp 至 0.30.0、opencode 至 1.14.19。
2026-04-21 00:34:30 +08:00
xintaofei 98792a696c feat(message-input): add search box to slash-command popups
Both the inline autocomplete (triggered by `/` in the textarea) and the
dropdown popup (triggered by the slash-command button) now show a search
field at the top. Matching uses substring on name and description, and
ranks name matches above description/id-only matches.
2026-04-21 00:26:00 +08:00
xintaofei 692b700c0d fix(file-tree): invalidate both cached target and ancestor, skip collapsed refetches
When a deep directory was renamed or deleted externally and both the
directory itself and a parent directory were cached, only the self entry
was cleared — leaving the parent's children list holding a ghost reference
to the old child. Walk up to the nearest cached ancestor in addition to
the direct hit so both stale entries are dropped together.

Also gate the follow-up getFileTree refetch on the directory still being
expanded. Collapsed branches only need their cache cleared; they will
re-hydrate naturally on the next expansion, which avoids unnecessary IPC
traffic during FS event bursts.
2026-04-20 23:20:08 +08:00
xintaofei baf3b6e89f fix(file-tree): keep aux-panel tree in sync with filesystem changes
Deep directories (beyond the workspace snapshot's depth limit) relied on
a lazy-loaded override cache that was never invalidated, so agent-created
files, in-app deletes / renames / rollbacks, and external changes inside
expanded deep folders stayed invisible until the folder was reopened.

Propagate watcher `changed_paths` through the delta envelope and fire a
Meta event whenever FS activity doesn't alter the tree/git snapshots, so
the frontend can surgically invalidate affected cache entries and
re-fetch. Manual refresh (Reload from disk) clears the cache and
re-hydrates still-expanded deep dirs through the same path. Replayed
deltas after reconnect are forwarded to the same listeners.

Also split the combined workspace-state effect into tree / git / status
slices so unrelated state transitions (e.g. the 'resyncing' flip during
a refresh) no longer rebuild the entire node tree and cause a flash.
2026-04-20 22:57:24 +08:00
xintaofei c825291b1e chore(acp): bump claude-agent-acp to 0.30.0 and opencode to 1.14.19 2026-04-20 21:38:36 +08:00
xintaofei d9323d7399 refactor(workspace): migrate from per-folder windows to single-window workspace
Replace the legacy folder + welcome routes with a unified /workspace route
that hosts all folders, conversations, tabs, and terminals in one window.

- Persist opened tabs to the database (opened_tabs entity + migration)
  so tab layout survives restarts and deep-link bootstrap restores state
- Replace FolderContext shim with AppWorkspaceProvider, ActiveFolderProvider,
  and TabProvider; expose both opened (folders) and full DB (allFolders)
  listings via list_all_folder_details
- Return conversations across all non-deleted folders from list_all when
  no folder filter is given, so the sidebar can show every folder's history
- Add ConversationContextBar above the chat input with folder picker
  (auto-opens unopened folders on select), branch picker, and commit /
  push / merge / stash entries to restore BranchDropdown functionality
- Rework sidebar with stats header, search, flat / folder-grouped view
  modes (localStorage-persisted), reveal-in-sidebar event subscriber,
  and per-folder context menu (focus, close tabs, remove from workspace);
  indent conversations under folder headers in grouped mode
- Gate terminal creation on active folder and show folder context
- Remove deprecated BranchDropdown, FolderNameDropdown, welcome route,
  and per-folder window commands
- Localize all new strings across 10 locales
2026-04-20 21:22:36 +08:00
xintaofei ce289e64c5 feat(terminal): add word/line cursor shortcuts for shell line-editing
Intercept keyboard events via xterm's custom key handler and emit
readline/zle escape sequences so bindings work regardless of terminfo:

- Alt/Option + Left/Right: word-wise cursor move
- Alt/Option + Backspace: delete previous word
- macOS Cmd + Left/Right: jump to line start/end
- macOS Cmd + Backspace: clear to line start

Uses `e.code` to stay correct on dead-key layouts, skips IME
composition, and excludes AltGr (ctrl+alt) on Windows/Linux.
2026-04-19 09:27:28 +08:00
xintaofei 0fa2a0895f feat(appearance): apply UI zoom level to terminal and Monaco editors
Extend the existing appearance zoom setting so it also scales xterm.js
terminals and Monaco editors (diff viewer, three-pane merge editor, file
workspace editor), which previously rendered at a hard-coded 13px
regardless of zoom.

- Terminals read zoom at init and update term.options.fontSize live on
  zoom change, refitting after a double rAF so xterm's renderer has
  recomputed cell metrics. Font size is rounded to an integer to avoid
  subpixel blur in the canvas renderer.
- Monaco editors derive fontSize from zoomLevel; three-pane merge
  editor memoizes its options object to avoid redundant updateOptions
  calls on unrelated re-renders.
2026-04-19 09:07:51 +08:00
xintaofei eeeee2141c fix(settings): move content padding inside scroll areas to keep inner borders visible
The settings shell wrapped children in an outer section with p-3/p-4 padding.
With OverlayScrollbars replacing native scroll, the overlay scrollbar sat at
the viewport's right edge and covered the right border of inner cards.

Drop the outer padding (and the now-redundant overflow-auto) from the shell
and apply p-3 md:p-4 inside each settings page instead, so the scrollbar
aligns with the column edge while inner sections stay within the padded area.
2026-04-19 08:45:57 +08:00
xintaofei b2ca2c2eb1 refactor(git-error): drop locale-specific not-a-repo patterns
Child processes now have LANG/LC_ALL pinned to C.UTF-8 on every
platform, so git stderr is always English when it leaks past the
typed not_a_git_repository preflight. The 8 non-English regex
fallbacks were dead code; keep only the English pattern as a
belt-and-suspenders fallback for un-preflighted commands.
2026-04-19 06:53:20 +08:00
xintaofei 94ebfaabdc fix(process): apply C.UTF-8 locale across platforms for child processes
Previously LANG/LC_ALL were only set on Windows, so git stderr was
localized on macOS/Linux and substring checks for English messages
(e.g. 'unknown revision or path not in the working tree') silently
failed — empty-repo/missing-branch cases surfaced as red error
banners in the Git log panel instead of rendering as empty lists.
2026-04-19 06:49:24 +08:00
xintaofei 95a0c527c4 fix(git): restore non-repo fallback and refine repo preflight errors
Reintroduce a local not-a-git-repo fallback state in the git log panel so non-repo errors still render the dedicated empty state when workspace state streaming is degraded.

Improve git repository preflight classification by distinguishing missing paths, permission issues, and non-directory targets before checking .git presence.

Add not_a_git_repository to the frontend AppErrorCode union for explicit typed handling.
2026-04-18 23:49:42 +08:00
xintaofei b17328b0fc perf(workspace-state): tighten watch debounce to 1s and max batch window to 3s 2026-04-18 23:15:05 +08:00
xintaofei cc79d62b27 fix(git): surface non-git-repo as a typed error and align all panels via workspace state
Consolidate `.git` presence detection into a shared `git_repo` module used by both the workspace state watcher and the command preflight helper, replacing duplicated local definitions.

Introduce `AppErrorCode::NotAGitRepository` (HTTP 422) and preflight eleven frontend-callable git commands (log, status, list-branches, diff, diff-with-branch, show-diff, show-file, push-info, list-remotes, list-all-branches, commit-branches) so non-git folders short-circuit with a structured error instead of leaking locale-dependent git stderr.

Frontend `isNotAGitRepoError` checks the error code first and falls back to a multi-language regex list centralized in `src/i18n/git-error-patterns.ts`, covering the nine languages git actually translates into.

Wire the git log panel to `workspaceState.isGitRepo` rather than a local cached flag, so running `git init` or deleting `.git` externally propagates through the watcher and refreshes the panel automatically.
2026-04-18 23:07:13 +08:00
xintaofei cf9573c0ce fix(web-auth): url-decode token query param for websocket auth 2026-04-18 20:18:58 +08:00
xintaofei ff9fbad50a fix(chat-channel): use session agent in responding indicator and localize command messages
- Replace hardcoded "Claude Code" in agent_responding with each session's actual AgentType label; store agent_type on ActiveSession and populate it in both task-start and resume paths
- Remove silent ClaudeCode fallback in resolve_agent_type; /task now prompts the user to pick an agent when none is selected and the folder has no default
- Move session command strings out of session_commands.rs into i18n.rs with full 10-language coverage (en/zh-CN/zh-TW/ja/ko/es/de/fr/pt/ar)
- Fix French accent and wrap Latin agent name with Arabic bidi isolates (FSI/PDI) for consistent rendering across Telegram/Lark/WeiXin clients
- Release the bridge lock before the get_lang DB lookup in the content_delta flush path to avoid cross-session contention
- Log unknown agent_type fallback in conversation_service::parse_agent_type for observability
2026-04-18 20:05:56 +08:00
xintaofei 0048126d53 feat(settings): render update release notes as markdown 2026-04-18 18:51:09 +08:00
xintaofei 07ef376438 refactor(message): shrink agent card max height and localize running indicator with spinner 2026-04-18 18:43:04 +08:00
xintaofei 75c2dd4cc5 fix(settings): use randomUUID helper with getRandomValues fallback for non-secure contexts 2026-04-18 18:25:28 +08:00
xintaofei ff48810603 fix(workspace-state): keep git-presence flag and branch poll in sync with runtime state
Reconcile the cached is_git_repo flag against the filesystem on every watch flush so `git init` or deletion of .git is reflected immediately: sync the stored flag, drop stale git_snapshot data when the repo goes away, emit a meta delta when presence flips without any data change, and mark the event as requires_resync so the frontend re-fetches the snapshot to pick up the new flag.

Replace the title-bar branch polling interval with a self-adjusting setTimeout chain that backs off to 60s when get_git_branch returns null or throws and drops back to 10s once a branch is detected, so branches created externally recover within one slow tick without hammering the backend on non-git folders.
2026-04-18 17:44:45 +08:00
xintaofei 7ef8d84d44 fix(workspace-state): stop resync loop on non-git folders and allow retry for degraded watcher
Gate git refresh on .git presence so file churn in non-git workspaces no longer produces endless resync_hint events, and silently log tree/git refresh errors during watch flushing instead of flagging requires_resync, which turned transient failures into self-reinforcing loops.

Degrade gracefully when the filesystem watcher fails to attach (e.g. permission denied, inotify quota): keep the initial snapshot, surface a degraded flag, and expose a store-level restart that the banner uses to retry attachment after the root cause is fixed.

Propagate is_git_repo through the snapshot so the git log and changes tabs render a dedicated "Not a Git repository" empty state instead of raw git stderr with a useless retry button.

Stop polling get_git_branch from the title bar once it returns null and re-arm on visibility change.

Add translations for the new banner, empty-state, and retry keys across all ten locales.
2026-04-18 17:18:11 +08:00
xintaofei 6e477661f8 feat(status-bar): compact large token counts with K/M units in usage popover 2026-04-18 11:57:52 +08:00
xintaofei 0e60216345 chore(acp): bump claude-agent-acp to 0.29.2, opencode to 1.4.11, gemini-cli to 0.38.2, openclaw to 2026.4.15 and cline to 2.15.0 2026-04-18 11:08:52 +08:00