Commit Graph

628 Commits

Author SHA1 Message Date
xintaofei
180d2bb33f docs(spec): add Claude ACP raw SDK message support design 2026-04-14 13:09:59 +08:00
xintaofei
12981d673e chore(acp): sync Claude and Gemini ACP registry versions 2026-04-14 12:50:32 +08:00
xintaofei
ef8791906b fix(windows,linux): reduce dark mode white flash on window open
Detect system dark mode on Windows (registry AppsUseLightTheme) and
Linux (gsettings for GNOME, kreadconfig for KDE Plasma) to set native
window background color before webview renders, matching the existing
macOS behavior. Make should_use_dark_background() cross-platform and
apply background_color in all platform branches of
apply_platform_window_style.
2026-04-14 10:16:52 +08:00
xintaofei
8dad03676b # Release version 0.8.5
- perf(frontend): optimize ACP tool call output handling to reduce CPU and memory pressure.
- perf(file-watch): increase debounce and batch window to reduce event pressure.
- fix(windows): normalize Windows file paths with leading slash and add i18n to link safety dialog.
- fix(macos): detect untracked file deletion via Finder as remove event.
- fix(macos): update traffic-light Y position.
-----------------------------
# 发布版本 0.8.5

- 性能(前端):优化 ACP 工具调用输出处理,降低 CPU 和内存压力;
- 性能(文件监听):增大防抖和批处理窗口,减少事件压力;
- 修复(Windows):规范化 Windows 文件路径前导斜杠,并为链接安全对话框添加国际化支持;
- 修复(macOS):检测通过 Finder 删除的未追踪文件并正确触发移除事件;
- 修复(macOS):更新红绿灯按钮 Y 轴位置。
2026-04-13 23:41:52 +08:00
xintaofei
be045eecdd fix(macos): update TRAFFIC_LIGHT_Y 2026-04-13 23:40:22 +08:00
xintaofei
743aab5baf # Release version 0.8.4
- perf(frontend): optimize ACP tool call output handling to reduce CPU and memory pressure.
- perf(file-watch): increase debounce and batch window to reduce event pressure.
- fix(windows): normalize Windows file paths with leading slash and add i18n to link safety dialog.
- fix(macos): detect untracked file deletion via Finder as remove event.
- fix(macos): update traffic-light Y position.
-----------------------------
# 发布版本 0.8.4

- 性能(前端):优化 ACP 工具调用输出处理,降低 CPU 和内存压力;
- 性能(文件监听):增大防抖和批处理窗口,减少事件压力;
- 修复(Windows):规范化 Windows 文件路径前导斜杠,并为链接安全对话框添加国际化支持;
- 修复(macOS):检测通过 Finder 删除的未追踪文件并正确触发移除事件;
- 修复(macOS):更新红绿灯按钮 Y 轴位置。
2026-04-13 22:54:27 +08:00
xintaofei
0a39e1daf4 fix(windows): normalize Windows file paths with leading slash and add i18n to link safety dialog
Strip spurious leading slash from Windows drive-letter paths (/D:/foo → D:/foo) in parseLocalFileTarget so that workspace-relative comparison succeeds and local files can be opened correctly. Display the normalized path in the confirmation dialog. Internationalize all link safety dialog and toast strings across 10 locales.
2026-04-13 22:47:14 +08:00
xintaofei
b76dc63e77 perf(file-watch): increase debounce and batch window to reduce event pressure 2026-04-13 22:21:14 +08:00
xintaofei
c4b3963cb4 Merge remote-tracking branch 'origin/main' 2026-04-13 22:11:24 +08:00
xintaofei
273a8cd7ff fix(macos): detect untracked file deletion via Finder as remove event
Finder moves files to Trash (rename) instead of deleting them, which
may be reported as `Modify(Name)` rather than `Remove` by the file
watcher. This caused untracked files to lose their red color without
being removed from the tree. Fix by checking disk existence in the
event batch emitter and promoting the kind to "remove" when a changed
path no longer exists.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 22:11:18 +08:00
xintaofei
343cb54ae4 Merge remote-tracking branch 'origin/main' 2026-04-13 22:05:41 +08:00
xintaofei
96acd6039d perf(frontend): optimize ACP tool call output handling to reduce CPU and memory pressure
Replace raw_output single-string accumulation with a chunks array to
eliminate O(n^2) string concatenation on every 200ms terminal poll event.
Batch tool_call_update dispatches via requestAnimationFrame so multiple
agents no longer trigger 25+ React re-renders per second.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 22:05:26 +08:00
xintaofei
268b33d2ee fix(macos): update TRAFFIC_LIGHT_Y 2026-04-13 21:01:20 +08:00
xintaofei
8fefad14d4 # Release version 0.8.3
- fix(frontend): fix find widget tooltip flicker, clipping, and close button alignment.
- fix(frontend,macos): reduce dark mode white flash on window open.
- fix(macos): persist zoom level to DB so traffic lights use correct position on launch.
- fix(macos): adjust traffic-light Y baseline from 18 to 17 for better vertical alignment.
- fix(i18n): add ellipsis to reasoning thinking label across all locales.
-----------------------------
# 发布版本 0.8.3

- 修复(前端):修复查找组件工具提示闪烁、裁剪及关闭按钮对齐问题;
- 修复(前端,macOS):减少暗色模式下窗口打开时的白色闪烁;
- 修复(macOS):将缩放级别持久化到数据库,确保红绿灯按钮在启动时使用正确位置;
- 修复(macOS):将红绿灯按钮 Y 轴基线从 18 调整为 17,优化垂直对齐;
- 修复(i18n):为所有语言的推理思考标签添加省略号。
2026-04-13 12:46:47 +08:00
xintaofei
6ebfa2b744 fix(i18n): add ellipsis to reasoning thinking label across all locales
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 12:08:51 +08:00
xintaofei
917ff9a672 fix(frontend): fix find widget tooltip flicker, clipping, and close button alignment
- Prevent hover tooltip flicker by adding pointer-events:none to the
  .context-view overlay that covers trigger buttons
- Escape overflow:hidden clipping on ancestor elements by switching the
  tooltip overlay to position:fixed, with CSS custom properties
  (--cv-offset-x/y) set via ResizeObserver to translate container-relative
  coordinates to viewport-relative
- Give the find widget its own border/radius styles (no top border,
  bottom-only border-radius) since it slides from the editor top
- Adjust close button vertical position to align with action buttons

Closes #73

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 12:08:00 +08:00
xintaofei
41b28001af fix(frontend,macos): reduce dark mode white flash on window open
Detect dark/light mode before React hydrates to eliminate the visible
white-to-dark flash when opening windows in dark mode.

Frontend:
- Inline script now reads next-themes localStorage key and applies
  .dark class, colorScheme, and backgroundColor on <html> before first
  paint
- Add CSS-only fallback via prefers-color-scheme media query in an
  inline <style> tag that fires before any JS executes

macOS backend:
- Detect system dark mode via `defaults read -g AppleInterfaceStyle`
  (cached with OnceLock) and set native window background color to
  match dark theme in apply_platform_window_style
- Persist user appearance mode preference (dark/light/system) to DB
  alongside zoom level so new windows use the correct background
- Add update_appearance_mode Tauri command; frontend syncs on mount,
  on settings change, and on cross-window storage events

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 11:15:13 +08:00
xintaofei
e05ae76453 fix(macos): persist zoom level to DB so traffic lights use correct position on launch
Previously the welcome window (or any startup window) always used the
default CURRENT_ZOOM of 100, ignoring the user's saved zoom preference
stored in frontend localStorage. Now update_traffic_light_position also
writes the zoom value to the app_metadata DB, and setup() reads it back
before creating any window.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 10:10:09 +08:00
xintaofei
17bae372a1 fix(macos): adjust traffic-light Y baseline from 18 to 17 for better vertical alignment
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 09:38:37 +08:00
xintaofei
7d4224e0c0 # Release version 0.8.2
- feat(frontend): replace native scrollbar styling with OverlayScrollbars for a polished, overlay-style scrollbar experience.
- feat: show real-time download progress bar for app updates.
- feat: stream real-time progress for agent SDK install/upgrade/uninstall.
- feat(macos): set traffic-light position via Tauri builder API and sync with zoom level.
- fix(windows): force UTF-8 encoding for all spawned child processes.
- fix(frontend): prevent body OverlayScrollbar from intercepting message list scroll events.
- fix(frontend): restore os-theme-codeg scrollbar theme lost during merge.
- fix(frontend): remove inner padding from file tree container and restore scroll container padding.
-----------------------------
# 发布版本 0.8.2

- 新增(前端):使用 OverlayScrollbars 替代原生滚动条样式,提供更精致的覆盖式滚动条体验;
- 新增:应用更新时显示实时下载进度条;
- 新增:Agent SDK 安装/升级/卸载过程支持实时流式进度展示;
- 新增(macOS):通过 Tauri builder API 设置红绿灯按钮位置并与缩放级别同步;
- 修复(Windows):强制所有子进程使用 UTF-8 编码;
- 修复(前端):防止 body 层 OverlayScrollbar 拦截消息列表的滚动事件;
- 修复(前端):修复合并后 os-theme-codeg 滚动条主题丢失的问题;
- 修复(前端):移除文件树容器内边距并恢复滚动容器的正确 padding。
2026-04-12 23:13:49 +08:00
xintaofei
5038e352f7 fix(frontend): restore os-theme-codeg scrollbar theme lost during merge
The merge commit ee60536 dropped the custom OverlayScrollbars theme
definition from globals.css, leaving scrollbar handles with zero size
and no background color. Restore the theme with a compound selector
(.os-scrollbar.os-theme-codeg) to ensure higher specificity than the
library's base defaults regardless of CSS load order.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 23:10:13 +08:00
xintaofei
0f7286b858 fix(frontend): prevent body OverlayScrollbar from intercepting message list scroll events
The body-level OverlayScrollbar (position: fixed, z-index: 99999) with
clickScroll and dragScroll enabled was capturing pointer events on the
scrollbar track, preventing the message list's native scrollbar from
receiving them. Disable both interactions on the body instance since it
does not need to scroll.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 22:39:31 +08:00
xintaofei
1554425b03 feat: show real-time download progress bar for app updates
Leverage the Tauri updater plugin's DownloadEvent callback to display
a progress bar with downloaded/total bytes during app updates, replacing
the previous spinner-only feedback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 22:01:46 +08:00
xintaofei
a763adaf36 feat: stream real-time progress for agent SDK install/upgrade/uninstall
Replace the spinner-only UX with live log output during agent SDK
operations, matching the existing OpenCode plugin install experience.

Backend: emit structured events (started/log/completed/failed) via
EventEmitter during npm install and binary download. npm commands now
run with piped stdio for line-by-line streaming; binary downloads
report chunked progress every 1 MB.

Frontend: subscribe to `app://agent-install` events through a new
`useAgentInstallStream` hook and render a theme-aware log terminal
below the preflight checks panel.

Also fixes the install log container in both agent settings and the
OpenCode plugins modal: auto-scroll no longer shifts the outer page,
and colours now follow the active light/dark theme.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 21:43:54 +08:00
xintaofei
6c69f432b9 docs: remove OverlayScrollbars migration design spec
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 20:45:02 +08:00
xintaofei
290ce14fa8 fix(frontend): remove inner padding from file tree container
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 20:43:45 +08:00
xintaofei
ee6053659c Merge commit 'b1bfc244d10627598f5fb533e62eb86bf166fd98'
# Conflicts:
#	src/app/globals.css
#	src/components/overlay-scrollbars-init.tsx
2026-04-12 20:23:59 +08:00
xintaofei
0fafe782ee feat(frontend): replace native scrollbar styling with OverlayScrollbars
Adopt OverlayScrollbars for cross-platform consistent overlay scrollbars
with auto-hide on pointer leave, hover grow effect, and click-to-scroll.

- Add overlayscrollbars + overlayscrollbars-react dependencies
- Rewrite ScrollArea component from Radix to OverlayScrollbars wrapper
- Define custom theme `os-theme-codeg` in globals.css (6px → 8px on hover)
- Initialize body-level overlay scrollbar via OverlayScrollbarsInit
- Migrate all scrollbar-thin / scrollbar-thin-edge usages to ScrollArea
- Keep native .scrollbar-thin fallback for virtua scroll containers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 20:21:06 +08:00
xintaofei
b1bfc244d1 feat(frontend): replace native scrollbar styling with OverlayScrollbars
Adopt OverlayScrollbars for cross-platform consistent overlay scrollbars
with auto-hide on pointer leave, hover grow effect, and click-to-scroll.

- Add overlayscrollbars + overlayscrollbars-react dependencies
- Rewrite ScrollArea component from Radix to OverlayScrollbars wrapper
- Define custom theme `os-theme-codeg` in globals.css (6px → 8px on hover)
- Initialize body-level overlay scrollbar via OverlayScrollbarsInit
- Migrate all scrollbar-thin / scrollbar-thin-edge usages to ScrollArea
- Keep native .scrollbar-thin fallback for virtua scroll containers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 20:16:46 +08:00
xintaofei
ad50cc28fc docs: add OverlayScrollbars migration design spec
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 19:45:09 +08:00
xintaofei
db6da4aecc fix(frontend): remove scrollbar-gutter and restore padding for scroll containers
Drop `scrollbar-gutter: stable both-edges` / `stable` from `.scrollbar-thin`
and `.scrollbar-thin-edge` so scrollbars overlay content without reserving
space, fixing layout inconsistencies between overlay and classic scrollbar
environments. Restore padding that was previously reduced to compensate for the
gutter: `px-1` to `px-3` in git-log-tab, `px-2` to `px-4` in
virtualized-message-thread, and add `px-2` to sidebar-conversation-list and
session-files-tab.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 19:20:45 +08:00
xintaofei
25def31a23 fix(windows): force UTF-8 encoding for all spawned child processes
- Set UTF-8 environment variables (PYTHONUTF8, PYTHONIOENCODING, LANG,
  LC_ALL) on all child processes via process.rs helpers
- Configure PTY terminals per shell flavor: chcp 65001 for cmd.exe,
  [Console]::OutputEncoding for PowerShell, LANG=C.UTF-8 for Git Bash
- Use /K and -NoExit for interactive shells to avoid nested processes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 18:47:31 +08:00
xintaofei
843cf8df19 feat(macos): set traffic-light position via Tauri builder API and sync with zoom
Use Tauri's native `traffic_light_position()` builder method to position
macOS window controls instead of runtime objc2 calls. A global AtomicU32
tracks the current zoom level so newly created windows reflect the latest
zoom. The frontend syncs zoom changes to the backend via a new
`update_traffic_light_position` command.

- Add `traffic_light_position()` to `apply_platform_window_style` builder
- Add `CURRENT_ZOOM` atomic and `traffic_light_position()` helper
- Register `update_traffic_light_position` Tauri command
- Add `syncTrafficLightPosition` in appearance-provider to sync on zoom
  change, mount, and cross-tab storage events
- Consolidate `ensure_windows_undecorated` calls into `post_window_setup`
- Remove dead `on_window_resized` no-op and its Resized event listener

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 18:11:40 +08:00
xintaofei
883fb64db0 # Release version 0.8.1
- feat(acp): add opencode plugin management — detect, install, uninstall plugins via preflight UI.
- feat(frontend): add OpencodePluginsModal with streaming install progress.
- feat(i18n): add opencode plugin management translations for 10 languages.
- fix(acp): use XDG paths for opencode config/cache instead of platform-native dirs.
- fix(acp): pin @latest plugin specs to installed versions and enable button when only floating versions exist.
- fix(acp): avoid false-positive comment detection on URLs in opencode.json.
- fix(acp): harden session-page connection and localize backend errors.
- fix(experts): handle Windows junction removal when unlinking skill entries.
- fix(frontend): remove explicit primary color from input bar controls.
-----------------------------
# 发布版本 0.8.1

- 新增(acp):添加 opencode 插件管理 —— 通过预检 UI 检测、安装、卸载插件;
- 新增(前端):添加 OpencodePluginsModal 组件,支持流式安装进度展示;
- 新增(i18n):为 opencode 插件管理添加 10 种语言翻译;
- 修复(acp):opencode 配置/缓存使用 XDG 路径而非平台原生目录;
- 修复(acp):将 @latest 浮动版本的插件规格固定为实际安装版本,并在仅有浮动版本时启用按钮;
- 修复(acp):避免对 opencode.json 中的 URL 误判为注释;
- 修复(acp):加固会话-页面连接并本地化后端错误信息;
- 修复(experts):处理 Windows 下取消技能条目链接时的 junction 移除问题;
- 修复(前端):移除输入栏控件的显式主色调。
2026-04-12 14:08:50 +08:00
xintaofei
f0e0196d35 fix(frontend): remove explicit primary color from input bar controls
Drop text-primary/80 from expert dropdown icons and text-primary from
mode/config selector trigger buttons so they inherit the default
foreground color and transition naturally with themed hover states.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 14:06:04 +08:00
xintaofei
9ab090a2b2 fix(acp): avoid false-positive comment detection on URLs in opencode.json
The naive // and /* check triggered on URLs like https://... inside
string values. Now we only reject the file as JSONC when serde_json
parsing fails AND comment-like sequences are found.
2026-04-12 12:00:47 +08:00
xintaofei
fbcfa3fb9c chore: add .docs to gitignore
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 11:58:53 +08:00
xintaofei
023e4c5514 fix(acp): pin @latest for all plugins and enable button when only floating versions exist
- install_missing_plugins now pins ALL @latest specs (not just newly installed)
- When nothing is missing but @latest exists, the pin-only path runs
- Modal button switches to 'Pin @latest Versions' when no missing plugins
- Added pinVersions i18n key for 10 languages
2026-04-12 11:56:55 +08:00
xintaofei
4397b0eae7 feat(acp): auto-pin @latest plugin specs to installed versions after install
After a successful plugin install, read the actual installed version from
node_modules and replace @latest in opencode.json with the pinned version.
This prevents opencode from hitting the npm registry on every startup.

Also add a preflight warning when @latest specs are detected, guiding
the user to install via the plugin manager to auto-pin.
2026-04-12 11:47:01 +08:00
xintaofei
6459e5286a fix(acp): use XDG paths for opencode config/cache instead of platform-native dirs 2026-04-12 11:31:45 +08:00
xintaofei
21800f25a1 style(acp): fix clippy warnings in opencode_plugins 2026-04-12 10:59:37 +08:00
xintaofei
6d035101c6 feat(i18n): add opencode plugin management translations for 10 languages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 10:53:44 +08:00
xintaofei
40e1483ab0 feat(frontend): integrate opencode plugin modal into preflight UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 10:48:17 +08:00
xintaofei
ebf0281251 fix(frontend): use correct i18n namespace prefix for opencode plugin modal 2026-04-12 10:43:34 +08:00
xintaofei
6da3a6cc34 feat(frontend): add OpencodePluginsModal component
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 10:40:50 +08:00
xintaofei
185ba39269 feat(frontend): add usePluginInstallStream hook 2026-04-12 10:32:00 +08:00
xintaofei
4ff339d9fc feat(frontend): add opencode plugin types and API methods
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 10:26:51 +08:00
xintaofei
996945223c feat(acp): add opencode plugin list/install/uninstall commands and routes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 10:21:04 +08:00
xintaofei
8c807b62d3 feat(acp): integrate opencode plugin check into preflight
Add InstallOpencodePlugins variant to FixActionKind and wire
opencode_plugins::check_opencode_plugins into check_binary_environment
so preflight surfaces missing/installed plugin status for OpenCode agents.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 10:15:48 +08:00
xintaofei
0901758937 feat(acp): implement install_missing_plugins and uninstall_plugin
Add concurrency lock (PLUGIN_OP_LOCK), install/uninstall functions with
bun subprocess management, progress event streaming via EventEmitter, and
protected-package guard for @opencode-ai/* internals.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 10:12:34 +08:00