Skip to content

feat: add tool calling UI components for aichat2 integration#427

Open
acedatacloud-dev wants to merge 2 commits intomainfrom
feat/chat-tool-calling-ui
Open

feat: add tool calling UI components for aichat2 integration#427
acedatacloud-dev wants to merge 2 commits intomainfrom
feat/chat-tool-calling-ui

Conversation

@acedatacloud-dev
Copy link
Copy Markdown
Member

Summary

Adds frontend components and types for the aichat2 AI orchestrator tool-calling UI.

New Types (src/models/chat.ts)

  • IChatToolCallState — pending/running/completed/error
  • IChatToolCall — tool call with name, input, output, artifacts
  • IChatArtifact — image/audio/video/file artifact with URL and metadata
  • IChatSSEEvent — union type for all aichat2 SSE events
  • IChatConversationResponseV2 — complete response structure

New API Method (src/operators/chat.ts)

  • chatConversationV2() — full SSE event stream parser for aichat2
    • Handles: text_delta, tool_use_start, tool_result, thinking, done, error
    • Backward compatible with legacy delta_answer format

New Components (src/components/chat/)

  • ToolCallBlock.vue — Collapsible tool call display with loading/success/error states, formatted input/output
  • ArtifactBlock.vue — Renders image/audio/video/file artifacts with preview and download
  • ThinkingBlock.vue — Collapsible thinking process display with timing
  • ConfirmationDialog.vue — Dialog for destructive tool confirmation (allow/deny)

Verification

  • npx vue-tsc --noEmit → clean compile (no errors)
  • All new code is TypeScript-strict compatible

Related

- Add IChatToolCall, IChatArtifact, IChatSSEEvent types to chat models
- Add chatConversationV2() method with full SSE event parsing
- Add ToolCallBlock.vue: collapsible tool call display with status states
- Add ArtifactBlock.vue: renders image/audio/video/file artifacts
- Add ThinkingBlock.vue: collapsible thinking process display
- Add ConfirmationDialog.vue: destructive tool confirmation dialog
- Backward compatible with legacy aichat delta_answer format
acedatacloud-dev added a commit that referenced this pull request Apr 12, 2026
Update chat models and operator to support aichat2's tool-calling SSE
events. This prepares the data layer for the tool-calling UI components
(ToolCallBlock, ArtifactBlock, ThinkingBlock) added in PR #427.

Changes:
- IChatConversationResponse: add type, tool_id, tool_name,
  tool_display_name, input, output, is_error, duration_ms, content
- IChatConversationRequest: add tools_enabled, tools_filter
- chatOperator stream callback: forward all tool-calling event fields
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.

1 participant