Commit Graph

28 Commits

Author SHA1 Message Date
xintaofei
185ba39269 feat(frontend): add usePluginInstallStream hook 2026-04-12 10:32:00 +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
ecff8832c0 feat(appearance): add AppearanceProvider and use-appearance hooks
新增 React Context 管理 themeColor 和 zoomLevel state,与 next-themes 正交,
通过 localStorage 持久化并支持跨标签页同步。提供语义化 hook
useThemeColor / useZoomLevel 供调用点按需使用。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 15:48:06 +08:00
xintaofei
b97efb5f72 feat(chat): show skills list on $ trigger for Codex instead of experts
The Codex $ prefix autocomplete now lists skills from
acp_list_agent_skills (excluding ids that match built-in experts), while
experts remain reachable via the dedicated Sparkles button. Non-Codex
agents are unchanged and still show only their native ACP commands on
the / trigger.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 10:20:13 +08:00
xintaofei
19979d50d0 fix(chat): use ~/.codex/skills/ for Codex expert symlinks and keep expert button always enabled
Change Codex skill storage to use only ~/.codex/skills/ instead of
~/.agents/skills/, and never disable the expert skills button so users
can always access the empty-state hint. Also fix stale expert list in
conversation window after linking in the separate settings window by
re-fetching on window focus.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 00:37:31 +08:00
xintaofei
ade59f474c fix(chat): query expert skills via symlinks and use $ prefix for Codex
Expert skills in the chat session were derived by intersecting built-in
experts with ACP availableCommands, which caused Codex experts to never
appear since Codex does not advertise skills through ACP.

- Add `experts_list_for_agent` backend API that checks symlink status
  across all global skill dirs for the given agent type
- Replace availableCommands-based expert filtering with symlink-based
  query, making the settings page the single source of truth
- Use `$` prefix for Codex expert skills while keeping `/` for slash
  commands and other agents' experts
- Disable the expert button when no experts are linked for the agent
- Invalidate per-agent expert cache after link/unlink in settings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 00:13:42 +08:00
xintaofei
0b6a013fd9 fix(chat): harden experts menu selection and viewport fit
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 16:56:37 +08:00
xintaofei
b63fe3f800 feat(chat): add experts menu to message input toolbar
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 16:38:03 +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
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
cf0f514d25 去掉状态栏初始化task超时设定 2026-03-29 09:53:32 +08:00
xintaofei
5e5c48338b 优化agent配置选项加载逻辑 2026-03-26 21:37:30 +08:00
xintaofei
d1eaa8f725 重构会话agent连接、初始化、加载配置流程 2026-03-26 19:55:28 +08:00
xintaofei
218055ab01 完善folder页面的web接口实现 2026-03-25 15:27:43 +08:00
xintaofei
b5b7073584 修复活跃的对话中会话在关闭会话tab后连接被自动回收了 2026-03-22 22:04:16 +08:00
xintaofei
06ac2be0b1 修复新会话可能泄漏问题 2026-03-22 21:25:55 +08:00
xintaofei
35f5e16c11 提前检测Agent是否支持fork会话,避免无效展示和操作 2026-03-17 16:03:08 +08:00
xintaofei
1f623c0d6e 支持会话响应时添加队列消息 2026-03-12 23:19:24 +08:00
xintaofei
8989f0fffb 解决lint问题 2026-03-12 21:08:59 +08:00
xintaofei
bd5456423f 继续重构会话消息处理逻辑 2026-03-12 18:34:34 +08:00
xintaofei
79a22c8a03 初步支持AskUserQuestion交互 2026-03-11 19:43:24 +08:00
xintaofei
a048a4cae2 继续优化重构后的逻辑 2026-03-10 21:32:21 +08:00
xintaofei
91636ada7f 重构会话消息处理和显示逻辑 2026-03-10 19:32:44 +08:00
xintaofei
5564fdd39f 优化会话加载逻辑 2026-03-10 13:10:46 +08:00
xintaofei
7a4cbcb73e 支持在会话输入框直接进行文件/图片的拖拽和粘贴 2026-03-08 10:54:06 +08:00
xintaofei
6e5219cc10 继续多语言处理 2026-03-07 15:49:00 +08:00
xintaofei
17a03ef95c 继续处理会话区多语言 2026-03-07 14:33:47 +08:00
xggz
54d1097b41 Initial commit 2026-03-06 22:56:13 +08:00