Skip to content

fix: load full ExecCommand artifacts in Web UI#2246

Merged
jolestar merged 2 commits into
mainfrom
fix/issue-2245
Jul 14, 2026
Merged

fix: load full ExecCommand artifacts in Web UI#2246
jolestar merged 2 commits into
mainfrom
fix/issue-2245

Conversation

@jolestar

Copy link
Copy Markdown
Collaborator

Summary

  • add an agent/tool-execution-scoped API for reading referenced artifact text while confining resolved files to the runtime data directory
  • make the Web UI ExecCommand detail renderer lazily load complete stdout/stderr artifacts when previews are truncated
  • keep previews visible during loading and on failure, with localized loading/success/failure status
  • document the new route in OpenAPI and refresh route/API snapshots

Verification

  • cargo fmt --all -- --check
  • RUSTFLAGS="-D warnings" cargo check --all-targets
  • cargo test --test http_events tool_execution_artifact_route -- --nocapture
  • cargo test --test openapi_snapshot
  • cargo test --test http_route_snapshot
  • npm test -- ToolExecutionRenderers.test.tsx client.test.ts
  • npm run build

Closes #2245

@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holon Ready Ready Preview, Comment Jul 14, 2026 11:04am

@jolestar

Copy link
Copy Markdown
Collaborator Author

Review: LGTM ✅

Strengths:

  • Path traversal defense via canonicalize + starts_with is correct and explicit
  • useToolExecutionArtifact hook has proper cleanup via cancelled flag
  • Good test coverage: positive read, outside-data-dir rejection, frontend loading states, client API call
  • i18n strings added for both en and zh-CN

Non-blocking note:

  • The OpenAPI spec for the new route only declares agent_id and tool_execution_id as path parameters — artifact_index is missing from the parameters array. The route works correctly (axum extracts it), but the OpenAPI spec is incomplete. Consider adding it for API consumer correctness.

Ready to merge once CI passes.

@jolestar

Copy link
Copy Markdown
Collaborator Author

已处理 OpenAPI note:artifact_index 现作为必填、非负整数 path parameter 写入生成规范,并刷新了 route inventory 与 OpenAPI snapshots。验证通过:cargo fmt --all -- --checkcargo test --test http_route_snapshotcargo test --test openapi_snapshot。修复 commit:c6017451

@jolestar
jolestar merged commit f9917b3 into main Jul 14, 2026
5 checks passed
@jolestar
jolestar deleted the fix/issue-2245 branch July 14, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web UI: ExecCommand stdout/stderr 截断时从 artifact 加载完整输出

1 participant