Commit graph

5 commits

Author SHA1 Message Date
yiliang114
0a1ffd98eb feat(cli): make /btw command non-blocking with parallel execution
- Add btwItem state management independent from pendingItem
- Add cancelBtw functionality to abort in-flight BTW API calls
- Allow /btw commands to execute concurrently with main responses
- Add isBtwCommand utility function
- Update BtwMessage UI with cleaner styling (remove spinner)
- Add tests for concurrent /btw execution scenarios
- Update layouts to render BTW messages in fixed bottom area

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-20 00:25:51 +08:00
Shaojin Wen
1b651d5c4f refactor(cli): make /btw non-blocking with fire-and-forget API call
Run the /btw API call as fire-and-forget in interactive mode so the
main conversation is not blocked while waiting for the answer. The
action now returns immediately after setting the pending item, and
the background promise updates the UI when the answer arrives.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 17:41:28 +08:00
Shaojin Wen
b1b5f72507 fix(cli): revert tools:[] to empty config for provider compatibility
Revert tools:[] to empty config {} to avoid provider compatibility
issues. Empty tools array is truthy and gets passed through to API
requests, which can cause errors on some providers. Omitting the
tools field entirely achieves the same effect (no tool access).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 17:24:57 +08:00
Shaojin Wen
ed9a4edc40 fix(cli): add model guard and explicit tools:[] for /btw command
Explicitly pass tools:[] to generateContent to prevent tool invocation
in side questions. Add model undefined guard for defensive safety.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 16:44:13 +08:00
Shaojin Wen
d285c4409a fix(cli): extract duplicate error formatting and add tests for /btw command
Extract repeated error formatting into formatBtwError helper, remove
no-op marginTop={0}, and add comprehensive test coverage for all three
execution modes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 16:20:21 +08:00