Commit Graph

664 Commits

Author SHA1 Message Date
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
10801bf393 # Release version 0.9.4
- feat(terminal): add word/line cursor shortcuts for shell line-editing.
- feat(appearance): apply UI zoom level to terminal and Monaco editors.
- fix(settings): move content padding inside scroll areas to keep inner borders visible.
- refactor(git-error): drop locale-specific not-a-repo patterns.
- fix(process): apply C.UTF-8 locale across platforms for child processes.

-----------------------------
# 发布版本 0.9.4

- 新增(终端):新增按词/按行光标移动的快捷键,优化 Shell 行编辑体验;
- 新增(外观):将界面缩放级别应用到终端和 Monaco 编辑器;
- 修复(设置):将内容内边距移入滚动区域内部,保证内部边框完整可见;
- 重构(Git 错误):移除特定语言区域的"非 Git 仓库"匹配模式;
- 修复(进程):在各平台子进程中统一使用 C.UTF-8 locale。
2026-04-19 09:32:26 +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
527dfc48d6 # Release version 0.9.3
- fix(git): restore non-repo fallback and refine repo preflight errors.
- perf(workspace-state): tighten watch debounce to 1s and max batch window to 3s.
- fix(git): surface non-git-repo as a typed error and align all panels via workspace state.
- fix(web-auth): url-decode token query param for websocket auth.
- fix(chat-channel): use session agent in responding indicator and localize command messages.

-----------------------------
# 发布版本 0.9.3

- 修复(Git):恢复非仓库目录的回退逻辑,并细化仓库预检错误提示;
- 性能(工作区状态):将监听去抖收紧至 1 秒,最大批处理窗口收紧至 3 秒;
- 修复(Git):将非 Git 仓库作为类型化错误上报,并让各面板统一通过工作区状态对齐;
- 修复(Web 认证):对 WebSocket 认证所用 token 查询参数进行 URL 解码;
- 修复(聊天频道):在响应中指示器里使用当前会话的 Agent,并对指令消息进行本地化。
2026-04-18 23:53:53 +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
dcaa4b4f5a # Release version 0.9.2
- feat(settings): render update release notes as markdown.
- refactor(message): shrink agent card max height and localize running indicator with spinner.
- fix(settings): use randomUUID helper with getRandomValues fallback for non-secure contexts.
- fix(workspace-state): keep git-presence flag and branch poll in sync with runtime state.
- fix(workspace-state): stop resync loop on non-git folders and allow retry for degraded watcher.

-----------------------------
# 发布版本 0.9.2

- 功能(设置):更新提示中的发布说明以 Markdown 格式渲染;
- 重构(消息):缩小 Agent 卡片最大高度,并本地化运行中指示器,配合 spinner 展示;
- 修复(设置):使用 randomUUID 助手函数,在非安全上下文中回退到 getRandomValues;
- 修复(工作区状态):保持 git 存在标识与分支轮询结果同步于运行时状态;
- 修复(工作区状态):在非 git 文件夹停止重复同步循环,并允许降级的 watcher 重试。
2026-04-18 18:55:26 +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
c5c2bdd331 # Release version 0.9.1
- feat(web-service): allow custom access token with persisted port and localized start errors.
- feat(conversation): add copy text context menu action with preserved selection.
- feat(status-bar): compact large token counts with K/M units in usage popover.
- feat(chat-channel): annotate Weixin channel badge with iLink reconnect hint tooltip.
- fix(chat-channel): detect Weixin auth failure via errcode during connect verification.
- 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.

-----------------------------
# 发布版本 0.9.1

- 功能(Web 服务):支持自定义访问令牌,持久化端口配置并本地化启动错误提示;
- 功能(会话):新增复制文本右键菜单操作,复制时保留原有文本选区;
- 功能(状态栏):在用量弹窗中使用 K/M 单位紧凑显示较大的 token 数值;
- 功能(聊天频道):为微信频道徽标添加 iLink 重连提示 tooltip;
- 修复(聊天频道):通过 errcode 识别连接校验阶段的微信鉴权失败;
- 杂项(ACP):升级 claude-agent-acp 到 0.29.2,升级 opencode 到 1.4.11,升级 gemini-cli 到 0.38.2,升级 openclaw 到 2026.4.15,升级 cline 到 2.15.0。
2026-04-18 12:03:07 +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
xintaofei
fd10494128 feat(web-service): allow custom access token with persisted port and localized start errors
- Persist user-supplied access token and last-used port in app_metadata, falling back to defaults when unset
- Atomically guard concurrent starts via compare_exchange with RAII rollback of the running flag
- Wrap token and port persistence in a single SeaORM transaction to prevent partial writes
- Classify bind errors (port in use, permission denied, address unavailable, invalid address) into stable i18n keys
- Localize start-failure messages across all 10 supported languages
2026-04-18 10:18:34 +08:00
xintaofei
32b4c88582 feat(conversation): add copy text context menu action with preserved selection 2026-04-17 23:20:01 +08:00
xintaofei
e86682dc66 chore(acp): bump claude-agent-acp to 0.29.1 and opencode to 1.4.8 2026-04-17 22:36:12 +08:00
xintaofei
5bb4c1cb1e feat(chat-channel): annotate Weixin channel badge with iLink reconnect hint tooltip 2026-04-17 21:52:43 +08:00
xintaofei
9abb85b8ee fix(chat-channel): detect Weixin auth failure via errcode during connect verification 2026-04-17 21:09:31 +08:00
xintaofei
0b102f0120 # Release version 0.9.0
- feat(ui): add dedicated Agent subagent rendering with nested tool call display, showing parent Agent prompts and child tool invocations as hierarchical cards.
- feat(parser): render Codex CLI spawn_agent and OpenCode task as Agent cards with nested tool calls, unifying subagent visualization across agents.
- feat(acp): forward meta/locations fields and use parentToolUseId for precise Agent child grouping in Claude ACP streams.
- feat(ui): render streaming Agent tool calls as Agent cards with nested child grouping during live responses.
- feat(settings): add xhigh reasoning effort level and update Claude Code model placeholders to claude-opus-4.7.
- fix(parser): harden Agent subagent state machine, file matching, query performance and streaming child grouping.
- fix(ui): suppress streaming Agent partial content to avoid duplicate prompt display.
- fix(ui): clean streaming Agent result output by unwrapping JSON and stripping task_id prefix.
- fix(ui): render Agent prompt as markdown and add max height to expanded card body.
- fix(ui): prevent duplicate error display in Agent subagent card.
- fix(ui): replace Codex icon to remove opaque white background.
- fix(acp): clear Claude API retry banner when streaming content resumes.
- chore(acp): bump claude-agent-acp to 0.29.0 and gemini-cli to 0.38.1.

Known issues:
- Codex CLI and Gemini CLI subagent execution cannot be rendered in streaming mode; nested tool calls only appear after the subagent finishes.

-----------------------------
# 发布版本 0.9.0

- 功能(UI):新增专用的 Agent 子代理渲染,以层级卡片形式展示父 Agent 提示词与子工具调用的嵌套关系;
- 功能(解析器):将 Codex CLI 的 spawn_agent 和 OpenCode 的 task 渲染为 Agent 卡片并嵌套子工具调用,统一各代理的子代理可视化;
- 功能(ACP):转发 meta/locations 字段并通过 parentToolUseId 精确分组 Claude ACP 流中的 Agent 子项;
- 功能(UI):在实时响应过程中将流式 Agent 工具调用渲染为带嵌套子项分组的 Agent 卡片;
- 功能(设置):新增 xhigh 推理力度级别,并将 Claude Code 模型占位符更新为 claude-opus-4.7;
- 修复(解析器):增强 Agent 子代理状态机、文件匹配、查询性能与流式子项分组的稳定性;
- 修复(UI):抑制流式 Agent 的部分内容输出,避免提示词重复显示;
- 修复(UI):清理流式 Agent 结果输出,解包 JSON 并去除 task_id 前缀;
- 修复(UI):将 Agent 提示词按 Markdown 渲染,并为展开卡片主体设置最大高度;
- 修复(UI):修复 Agent 子代理卡片中错误信息重复显示的问题;
- 修复(UI):替换 Codex 图标,去除不透明的白色背景;
- 修复(ACP):当流式内容恢复时清除 Claude API 重试提示横幅;
- 杂项(ACP):升级 claude-agent-acp 到 0.29.0,升级 gemini-cli 到 0.38.1。

已知问题:
- Codex CLI 和 Gemini CLI 的子代理执行过程暂不支持流式渲染,嵌套工具调用仅在子代理执行结束后显示。
2026-04-17 14:48:22 +08:00
xintaofei
aedf94c4a0 fix(ui): suppress streaming Agent partial content to avoid duplicate prompt display 2026-04-17 14:40:12 +08:00
xintaofei
7a92f3eef7 fix(acp): clear Claude API retry banner when streaming content resumes 2026-04-17 14:27:39 +08:00
xintaofei
3e30ab7d60 fix(parser): harden Agent subagent state machine, file matching, query performance and streaming child grouping
- Codex: decouple active_agent_count decrement from close_agent target
  parsing and reset counter on turn_context to prevent main assistant
  messages from being swallowed when close_agent events are malformed
- Codex: use exact filename match with separator-aware fallback and
  sorted candidates for deterministic subagent session file resolution
- Codex/OpenCode: truncate subagent tool call previews to 500 chars
- OpenCode: batch-load all subagent tool calls in a single SQL query
  instead of per-task N+1 queries to avoid slow detail page loads
- Streaming: restrict positional child grouping fallback to in-progress
  agents only, preventing top-level tool calls from being incorrectly
  folded into completed Agent cards
- Tests: update Claude context window assertions to match 1M default
2026-04-17 09:38:52 +08:00
xintaofei
73a910bb62 fix(ui): clean streaming Agent result output by unwrapping JSON and stripping task_id prefix
Refactor cleanAgentOutput to a sequential non-recursive pipeline: unwrap
JSON containers first, then strip task_id session lines, then extract
<task_result> content. Also apply cleaning to in-progress agent output
during streaming, not just completed results.
2026-04-17 09:12:54 +08:00
xintaofei
4f41a217c4 feat(settings): add xhigh reasoning effort level and update Claude Code model placeholders to claude-opus-4.7 2026-04-17 08:31:38 +08:00
xintaofei
834340e536 feat(acp): forward meta/locations fields and use parentToolUseId for precise Agent child grouping
Forward the previously-dropped `locations` and `meta` fields from ACP
SDK ToolCall/ToolCallUpdate events through to the frontend. The meta
field carries `claudeCode.parentToolUseId` which enables precise
parent-child matching for concurrent Agent tool calls during streaming.

- Forward locations/meta in Rust AcpEvent types and connection handlers
- Use parentToolUseId for exact agent→child mapping, with position-based
  fallback for agents that don't provide it (Codex, OpenCode)
- Replace `any` types with proper ToolCallMeta / unknown types
- Add runtime guards for meta field parsing (defensive against
  unexpected shapes from different agents)
- Cache inferLiveToolName results per tool_call_id to avoid redundant
  computation across Phase 1 and Phase 2
- Lazy-construct agentStats only when children exist
2026-04-17 08:24:12 +08:00
xintaofei
6763814a92 chore(acp): bump claude-agent-acp to 0.29.0 and gemini-cli to 0.38.1 2026-04-17 01:28:58 +08:00
xintaofei
4189aa04de feat(ui): render streaming Agent tool calls as Agent cards with nested child grouping
Support Agent card rendering during live streaming responses for Claude
Code, Codex CLI, and OpenCode. Previously Agent cards only rendered for
loaded/historical messages parsed from the DB.

- Fix tool name inference: subagent_type in input now returns "agent"
  instead of "task"; add spawn_agent/wait_agent/close_agent aliases
- Group sub-agent tool calls inside parent Agent cards during streaming
  using position-based heuristic (ACP SDK lacks parent_id tracking)
- Clean raw Agent output (JSON content blocks, XML task_result wrappers)
- Emit agent_stats with nested tool calls so AgentToolCallPart renders
  child execution inline, matching the loaded message appearance
2026-04-17 01:28:13 +08:00
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
e36ba36222 fix(ui): render Agent prompt as markdown and add max height to expanded card body 2026-04-16 21:57:58 +08:00
xintaofei
4c36da8ece fix(ui): prevent duplicate error display in Agent subagent card 2026-04-16 21:48:55 +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