Commit Graph

299 Commits

Author SHA1 Message Date
xintaofei
488b0c2e53 feat(parser): render OpenCode task as Agent cards with nested tool calls
Transform OpenCode "task" tool calls with subagent_type into unified
Agent card display: rewrite as "Agent" tool with subagent_type, prompt,
description, and model; compute duration from time fields; query
sub-agent session parts from SQLite for nested tool call lists; extract
<task_result> content to strip preamble noise from agent output; guard
Streamdown code plugin against unsupported Shiki language identifiers
(e.g. "##", "function") in fenced code blocks from tool output.
2026-04-17 00:06:57 +08:00
xintaofei
68142651b3 feat(parser): render Codex CLI spawn_agent as Agent cards with nested tool calls
Transform Codex spawn_agent/wait_agent/close_agent into unified Agent
card display: rewrite spawn_agent as "Agent" tool with subagent_type,
prompt, and description; correlate final results from wait_agent and
close_agent outputs; parse sub-agent session JSONL files for nested
tool call lists; suppress intermediate status messages during agent
execution; clean exec_command output to show only the command and its
result.
2026-04-16 22:52:09 +08:00
xintaofei
9f82fdf350 feat(ui): add dedicated Agent subagent rendering with nested tool call display
Render Agent/Explore/Plan tool calls in a visually distinct collapsible
container with colored left border, replacing the generic tool card. Parse
subagent JSONL transcripts from {sessionId}/subagents/ to extract and
display the actual tool calls (Bash, Read, Grep, etc.) the subagent
executed, reusing the existing ToolCallPart for consistent appearance.

- Add AgentToolCallPart component with collapsible body, prompt section,
  execution stats, and nested tool call list via render prop injection
- Add AgentExecutionStats and AgentToolCall types (Rust + TypeScript)
- Parse toolUseResult.agentId to locate and read subagent JSONL files
- Validate agentId against path traversal before filesystem access
- Pass agentStats through adapter for both ID-matched and positional
  tool result pairing
- Strip agentStats in nested render to prevent recursive Agent expansion
- Add i18n keys for agent UI labels across all 10 languages
2026-04-16 21:32:25 +08:00
xintaofei
3ebb18bdac # Release version 0.8.9
- feat(process): comprehensive cross-platform Node.js path discovery, supporting 9 version managers (nvm, nvm-windows, fnm, volta, asdf, mise, n, Homebrew, Scoop) across macOS, Linux, and Windows for reliable agent preflight.
- fix(process): use semver-aware sorting for Node.js version selection to prevent older versions being chosen over newer ones (e.g. v20.9 incorrectly ranked above v20.11).
- fix(process): harden Node.js path discovery for production readiness with improved error handling and edge-case resilience.
- fix(settings): remove ineffective max reasoning effort level for Claude Code.
- fix(ci): replace softprops/action-gh-release with gh CLI for server asset upload.
- fix(windows): improve fnm Node path discovery with correct platform-specific default directories. (thanks @Kwensiu, #75)

-----------------------------
# 发布版本 0.8.9

- 功能(进程):全面的跨平台 Node.js 路径发现,支持 9 种版本管理器(nvm、nvm-windows、fnm、volta、asdf、mise、n、Homebrew、Scoop),覆盖 macOS、Linux 和 Windows,确保代理预检可靠找到 Node.js;
- 修复(进程):使用语义化版本排序选择 Node.js 版本,避免旧版本被错误优先选择(如 v20.9 被排在 v20.11 之前);
- 修复(进程):增强 Node.js 路径发现的生产环境健壮性,改进错误处理和边界情况适应能力;
- 修复(设置):移除 Claude Code 中无效的最大推理力度级别选项;
- 修复(CI):将服务器产物上传从 softprops/action-gh-release 替换为 gh CLI;
- 修复(Windows):改进 fnm Node 路径发现,使用正确的平台特定默认目录。(感谢 @Kwensiu,#75)
2026-04-16 13:01:54 +08:00
xintaofei
17f4ee88e8 fix(process): use semver-aware sorting for Node.js version selection
Replace lexicographic sort with numeric (major, minor, patch) sort
across all 7 version-directory sort sites in find_node_bin_dir.

Lexicographic sort incorrectly orders v20.9 > v20.11 (because '9' > '1')
which could select an older Node.js version and cause agent preflight
failures for version-gated agents like OpenClaw (requires >=22.12.0).
2026-04-16 12:48:21 +08:00
xintaofei
045411b8d0 fix(process): harden Node.js path discovery for production readiness
- Fix thread safety: replace #[tokio::main] in codeg_server with manual
  runtime construction so set_var runs before any worker threads exist
- Fix nvm alias branch: sort matched candidates (read_dir order is
  undefined) and skip non-numeric aliases like lts/* that cannot be
  resolved without full nvm evaluation
- Fix HOME missing: accept Option<&Path> for home so env-var-only
  discovery (NVM_HOME, VOLTA_HOME, FNM_DIR, etc.) still works in
  Docker / systemd environments without HOME set
- Refactor resolve_dir to accept an env var chain, eliminating all
  inline Option chains for fnm, nvm-windows, mise, and scoop
2026-04-16 11:27:35 +08:00
xintaofei
9adff116ee feat(process): comprehensive cross-platform Node.js path discovery
Expand find_node_bin_dir to support 9 version managers / installation
methods across macOS, Linux, and Windows:

- nvm (Unix): fix alias duplicate candidates, skip symbolic aliases
  like lts/* that cannot be resolved without full nvm evaluation
- nvm-windows: detect via %NVM_SYMLINK% and %NVM_HOME% with correct
  directory layout (node.exe directly in version dir, no bin/)
- fnm: use platform-correct defaults (%APPDATA%/fnm on Windows,
  $XDG_DATA_HOME/fnm on Unix) instead of hardcoded Unix path
- volta: validate that a concrete Node image exists before adding
  the shim directory, preventing cryptic errors when volta is
  installed but no Node version has been set
- asdf (Unix): $ASDF_DATA_DIR or ~/.asdf/installs/nodejs/
- mise/rtx (cross-platform): $MISE_DATA_DIR with XDG fallback
- n (Unix): $N_PREFIX or /usr/local/n/versions/node/
- Homebrew (macOS): /opt/homebrew and /usr/local prefixes
- Scoop (Windows): nodejs-lts and nodejs app detection

Also improve production readiness:
- Document thread-safety requirements for set_var (unsafe in ed. 2024)
- Add warning log when HOME is unset (Docker / minimal containers)
- Clarify FNM_MULTISHELL_PATH scope (server binary only, not GUI)
- Note lexicographic sort limitation for semver edge cases
2026-04-16 11:06:33 +08:00
XinTaoFei
7a6a9d1615 Merge pull request #75 from Kwensiu/fix/windows-acp-node-detection
fix(windows): improve Node and npm detection for ACP agents
2026-04-16 10:44:25 +08:00
Kwensiu
2f59d900fb fix(windows): improve fnm Node path discovery 2026-04-16 00:45:15 +08:00
xintaofei
8d0b0a2985 # Release version 0.8.8
- feat(settings): add ChatGPT OAuth device code login for Codex CLI, allowing users to log in with their ChatGPT account directly from the agent settings page without leaving the app.
- feat(chat): stream partial tool output during live agent response so running tools (e.g. bash stdout) render in real time instead of appearing blank until completion.
- fix(ui): sharpen dialog rendering with flex centering and stronger ring to eliminate subpixel blur on non-retina displays.
- chore(acp): bump bundled agent versions in registry.

-----------------------------
# 发布版本 0.8.8

- 功能(设置):为 Codex CLI 新增 ChatGPT OAuth 设备码登录,用户可直接在代理设置页面使用 ChatGPT 账号登录,无需切换到终端操作;
- 功能(聊天):实时流式显示工具执行中的部分输出(如 Bash 标准输出),不再等到工具完成后才渲染内容;
- 修复(界面):优化对话框渲染,使用 flex 居中替代 translate 居中并加强边框环,消除非 Retina 屏幕上的亚像素模糊问题;
- 维护(ACP):更新注册表中内置代理的版本号。
2026-04-16 00:33:10 +08:00
xintaofei
d163e42457 feat(settings): add ChatGPT OAuth device code login for Codex CLI
Add OAuth device code flow for Codex CLI official subscription auth,
allowing users to log in with their ChatGPT account directly from the
agent settings page without using the terminal.

- Backend: two new endpoints (codex_request_device_code, codex_poll_device_code)
  that handle the OpenAI OAuth device code flow and return tokens to frontend
- Frontend: login UI with verification URL, copyable user code, polling status,
  15-minute timeout, and auto-save via existing persistEnv/persistConfig path
- Auth.json written in Codex CLI compatible format (nested tokens, account_id,
  last_refresh) so codex-acp can use OAuth tokens directly
- Show logged-in status and re-login option when tokens are present
- Remove auth.json textarea from Codex settings UI
- i18n: all 10 languages updated with new login-related keys
2026-04-16 00:29:01 +08:00
xintaofei
e9dd0db6e8 chore(acp): bump bundled agent versions in registry 2026-04-15 19:24:13 +08:00
xintaofei
d81d76443d # Release version 0.8.7
- feat(skills): support folder-scoped skills in agent sessions so workflows defined in a project folder can be invoked directly from chat.
- feat(folder): add "Add to session" actions in the file changes menus to quickly reference modified files from the chat input.
- feat(folder): add a commit reset action in the Git log panel for rolling back to a selected commit.
- fix(folder): prevent the branch submenu from being clipped inside scroll areas.
- feat(settings): add a reasoning effort level option for Claude Code.
- feat(settings): add an Enable Fast toggle for the Codex service tier.
- feat(settings): use overlay scrollbars for sub-page scroll areas to keep the layout stable.
- fix(acp): stop stripping the auto config option for Claude Code so the chosen value is preserved.

-----------------------------
# 发布版本 0.8.7

- 功能(技能):支持在代理会话中使用文件夹级别的技能,使项目目录内定义的工作流可直接在聊天中调用;
- 功能(文件夹):在文件变更菜单中新增"加入会话"操作,便于快速将修改的文件引用到聊天输入;
- 功能(文件夹):在 Git 日志面板中新增提交回滚(reset)操作,可一键回退到所选提交;
- 修复(文件夹):避免分支子菜单在滚动区域内被裁剪;
- 功能(设置):为 Claude Code 增加推理强度(reasoning effort)等级选项;
- 功能(设置):为 Codex 服务档位增加 Enable Fast 开关;
- 功能(设置):子页面滚动区域改用覆盖式滚动条,避免布局抖动;
- 修复(ACP):不再丢弃 Claude Code 的 auto 配置项,保留用户所选的配置值。
2026-04-15 16:58:12 +08:00
xintaofei
f9010634ff fix(acp): stop stripping auto config option for Claude Code
Claude Code SDK now supports the "auto" permission mode, so the
filtering that hid it from the selector and silently dropped attempts
to set it is no longer needed.
2026-04-15 16:54:04 +08:00
xintaofei
f3630ba48a feat(folder): add commit reset action in git log
Add a "Reset to Here" context action for git log commit items in the folder page.

Show a reset dialog with branch, target commit, commit message, and reset mode details for soft, mixed, hard, and keep.

Disable reset when viewing a non-current branch filter and keep the action ordering under commit diff.

Add git_reset support across Rust commands, Tauri invoke registration, web handlers/routes, and frontend API/type bindings.

Add localized reset labels, mode descriptions, and toast messages across all supported languages.
2026-04-15 11:14:37 +08:00
xintaofei
11b6a4f051 # Release version 0.8.6
- feat(folder): improve folder workspace stability by unifying state streaming for the file tree and Git panels.
- fix(folder): prevent stale file-watch subscriptions in aux panels and keep mobile sidebars closed on initial load.
- fix(folder): add conversation actions to the sidebar blank-space context menu and align the file workspace tab bar height.
- feat(acp): send a system notification when an agent requests permission approval while the app window is not visible.
- feat(acp): surface Claude API retry status in the chat input with localized progress and error details.
- perf(chat): reduce unnecessary rerenders in the conversation input area.
- fix(windows,linux): reduce the white flash when opening the window in dark mode.

-----------------------------
# 发布版本 0.8.6

- 功能(文件夹):统一文件树与 Git 面板的状态流,提升文件夹工作区的更新一致性和整体稳定性;
- 修复(文件夹):避免辅助面板出现陈旧的文件监听订阅,并防止移动端首次进入时侧边栏自动展开;
- 修复(文件夹):为空白区域的会话侧边栏补充右键操作,并对齐文件工作区标签栏高度;
- 功能(ACP):当应用窗口不可见且代理发起权限审批请求时,发送系统通知;
- 功能(ACP):在聊天输入区展示 Claude API 重试状态,并提供本地化的重试进度与错误信息;
- 性能(聊天):减少会话输入区域的不必要重复渲染;
- 修复(Windows/Linux):降低深色模式下窗口打开时的白屏闪烁。
2026-04-14 23:39:04 +08:00
xintaofei
b5e8fd8acb feat(folder): unify workspace state streaming for tree and git panels
Introduce a shared workspace-state backend stream with snapshot/delta APIs for file tree and git changes.

Migrate both aux panels to a common frontend workspace store with lifecycle-safe stream handling.

Apply batched watch throttling, path-aware git refresh gating, no-op delta suppression, and bounded history compaction to improve runtime stability.
2026-04-14 22:26:36 +08:00
xintaofei
f9923df1fe feat(acp): surface Claude API retry state in chat input
Enable raw Claude SDK forwarding for ACP sessions and emit only system/api_retry events to the frontend.

Show a localized single-line retry banner with loading under the conversation input, including error details and retry progress.
2026-04-14 14:59:32 +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
b76dc63e77 perf(file-watch): increase debounce and batch window to reduce event pressure 2026-04-13 22:21:14 +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
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
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
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
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
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
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
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
xintaofei
26cf618bd4 feat(acp): add resolve_bun_binary and atomic_rewrite_opencode_json helpers
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 10:10:13 +08:00
xintaofei
c5d5f854b5 feat(acp): implement check_opencode_plugins detection
Add check_opencode_plugins() to read ~/.config/opencode/opencode.json,
parse the plugin[] array, and cross-reference against
~/.cache/opencode/node_modules/ to report installed vs. missing plugins.
Also adds opencode_config_path, opencode_cache_dir, and
has_project_opencode_config helpers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 10:08:27 +08:00
xintaofei
8c775d29e7 feat(acp): add opencode_plugins module with types and parse_plugin_spec
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 10:06:25 +08:00
xintaofei
1c1738298b fix(acp): harden session-page connection and localize backend errors
- Session-page connect never triggers download/install; returns
  SdkNotInstalled immediately and prompts the user to install from
  Agent Settings instead
- Binary agents now accept any cached version via
  find_best_cached_binary_for_agent so stale caches still connect
- Bound Initialize handshake with a 60s timeout and convert it to
  AcpError::InitializeTimeout via a sentinel in run_connection
- Spawn background task owns ConnectionManager map insertion and
  removes the entry on exit through an RAII guard that survives
  panics, preventing leaked stale entries
- AcpError gains SdkNotInstalled and InitializeTimeout variants plus
  a stable code() identifier; AcpEvent::Error carries code so the
  frontend can render localized messages by key
- Frontend preflight now runs for all connect sources; error event
  handler switches on code to show translated text for
  initialize_timeout, sdk_not_installed, platform_not_supported,
  process_exited, spawn_failed and download_failed
- Remove ConnectionStatus::Downloading enum variant, all frontend
  branches, and i18n strings; drop obsolete autoLinkFailedTitle,
  autoLinkPreflightFailed, preflightCheckFailedDefault and
  preflightFailedTitle keys across 10 locales
- Add backendErrors.* translations in 10 languages
- Diagnostic logging: always log agent stderr plus binary
  path/size/args/env keys and Initialize timing; gate stdin/stdout
  JSON-RPC tracing behind CODEG_ACP_DEBUG to avoid persisting user
  content into OS log files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 03:36:08 +08:00
xintaofei
5bda7d06e9 fix(experts): handle Windows junction removal when unlinking skill entries 2026-04-11 18:54:21 +08:00
xintaofei
d92cb8d619 chore: bump ACP agent SDK versions in registry 2026-04-11 18:43:49 +08:00
xintaofei
eb6933f254 # Release version 0.8.0
- feat(appearance): add theme color picker with 11 shadcn presets, zoom level selector, and reset button.
- feat(appearance): add AppearanceProvider with FOUC prevention script to persist theme across reloads.
- fix(settings): default settings panel to appearance section instead of system.
-----------------------------
# 发布版本 0.8.0

- 新增(外观):添加主题色选择器(内置 11 种 shadcn 预设)、缩放级别选择器和重置按钮;
- 新增(外观):添加 AppearanceProvider 和防闪烁(FOUC)内联脚本,持久化主题配置;
- 修复(设置):打开设置面板时默认进入"外观"分区而非"系统"。
2026-04-11 17:40:55 +08:00