Skip to content

[5/6] Show tool call durations / 展示工具调用耗时#3369

Open
SivanCola wants to merge 1 commit into
main-v2from
codex/5-6-tool-duration-telemetry
Open

[5/6] Show tool call durations / 展示工具调用耗时#3369
SivanCola wants to merge 1 commit into
main-v2from
codex/5-6-tool-duration-telemetry

Conversation

@SivanCola
Copy link
Copy Markdown
Collaborator

Summary / 摘要

  • Track tool call start and completion timing in the local wire/session model.
  • Surface elapsed milliseconds in tool process-card headers when available.
  • Preserve existing tool-call rendering when duration data is absent.

Validation / 验证

  • npm run typecheck && npm run build
  • go test . -run 'TestPreviewSessionMessages|TestHistoryMessages|TestToWireTool' (desktop)\n- go test ./internal/event ./internal/serve ./internal/agent ./internal/control\n- git diff --check

@github-actions github-actions Bot added desktop Wails desktop app (desktop/**) agent Core agent loop (internal/agent, internal/control) labels Jun 6, 2026
@SivanCola SivanCola force-pushed the codex/4-6-v053-process-cards branch from 14562c9 to c4247fe Compare June 6, 2026 15:05
@SivanCola SivanCola force-pushed the codex/5-6-tool-duration-telemetry branch from b149290 to 108f47e Compare June 6, 2026 15:05
@SivanCola SivanCola changed the base branch from codex/4-6-v053-process-cards to main-v2 June 6, 2026 15:07
@github-actions github-actions Bot added the v2 Go rewrite (1.x) — main-v2 branch, active development label Jun 6, 2026
@SivanCola SivanCola marked this pull request as ready for review June 6, 2026 15:15
@SivanCola SivanCola requested a review from esengine as a code owner June 6, 2026 15:15
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 108f47ea51

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/wire.go
Err string `json:"err,omitempty"`
ReadOnly bool `json:"readOnly"`
Truncated bool `json:"truncated,omitempty"`
DurationMs int64 `json:"durationMs,omitempty"`
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Render the emitted duration in the frontend

When a tool result includes this new durationMs field, the desktop frontend still drops it: WireTool/Item have no durationMs, the tool_result reducer never copies it, and ToolCard only renders the status glyph (I checked desktop/frontend/src and there are no durationMs references). As a result the backend now emits timing data, but desktop users still won't see tool call durations for any completed tool call.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Core agent loop (internal/agent, internal/control) desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant