Skip to content

feat(feishu): add tool progress feedback and user abort support#873

Open
shikihane wants to merge 1 commit intosipeed:mainfrom
shikihane:feat/feishu-progress
Open

feat(feishu): add tool progress feedback and user abort support#873
shikihane wants to merge 1 commit intosipeed:mainfrom
shikihane:feat/feishu-progress

Conversation

@shikihane
Copy link

Description

Add real-time tool execution progress feedback and user-initiated abort support for the Feishu channel.

Changes:

  • Bus: Add abort registry (RegisterAbort/ClearAbort/TriggerAbort) for per-chat cancellation; add IsProgress field to OutboundMessage
  • Feishu channel: Send "Thinking..." placeholder on message receive; intercept /stop command to trigger abort
  • Agent loop: Add formatToolProgress and formatToolResult helpers to send human-readable progress updates (e.g., "Searching golang tutorials", "Fetching https://...") during tool execution

Type of Change

  • New feature (non-breaking change which adds functionality)

AI Code Generation

  • Mostly AI-generated code with human review and testing

Technical Context

The progress feedback uses the existing OutboundMessage mechanism with a new IsProgress bool flag so channels can distinguish progress updates from final responses. The abort mechanism uses a sync.Map keyed by chat ID to store cancel functions.

Test Environment

  • Radxa Cubie A7A (arm64), Debian 11
  • Feishu channel (WebSocket mode)
  • Tested with real Feishu conversations: progress messages appear during tool calls, /stop cancels in-flight processing

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • New and existing tests pass locally with my changes
  • Any dependent changes have been already merged and published

🤖 Generated with Claude Code

- Send "Thinking..." placeholder on message receive
- Report each tool call as a separate progress message (tool name + args)
- Report tool results summary (exec output, errors)
- Add /stop command to cancel in-progress agent processing
- Add IsProgress flag to OutboundMessage for progress vs final distinction
- Add abort registry to MessageBus (RegisterAbort/ClearAbort/TriggerAbort)
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