Commit Graph
12 Commits
Author SHA1 Message Date
xintaofei 022172a9ea chore(lint): clean up frontend and Rust lint issues 2026-04-23 15:56:41 +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 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 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 c0b3e9aff9 优化编辑工具调用的行号解析 2026-03-28 15:46:52 +08:00
xintaofei 8bd19738d0 优化消息里读/写内容显示样式 2026-03-28 14:04:19 +08:00
xintaofei af6d8dd9a8 修复并行命令的执行结果没有对应到命令块 2026-03-24 19:29:45 +08:00
xintaofei 284e45fbdf 重构会话页面的消息渲染,支持块级虚拟化,提升长会话性能,减少卡断 2026-03-24 18:52:25 +08:00
xintaofei 28c90920ef 过滤掉opencode的空会话 2026-03-19 22:07:59 +08:00
xintaofei 593e03e2b9 支持opencode 的 Agent 解析用户消息里的图片 2026-03-08 17:52:40 +08:00
xintaofei 349845c137 folders.rs多语言处理 2026-03-07 15:59:14 +08:00
xggz 54d1097b41 Initial commit 2026-03-06 22:56:13 +08:00