TUIにThinkingを表示する実装

This commit is contained in:
2026-04-28 16:10:48 +09:00
parent 513653ce55
commit cf4c454a03
8 changed files with 366 additions and 7 deletions
+20
View File
@@ -141,6 +141,26 @@ impl PodController {
});
});
let tx = event_tx.clone();
worker.on_thinking_block(move |block| {
// Start fires unconditionally so the TUI can show
// "Thinking..." even when the provider doesn't emit
// plaintext deltas.
let _ = tx.send(Event::ThinkingStart);
let tx_d = tx.clone();
block.on_delta(move |text| {
let _ = tx_d.send(Event::ThinkingDelta {
text: text.to_owned(),
});
});
let tx_s = tx.clone();
block.on_stop(move |text| {
let _ = tx_s.send(Event::ThinkingDone {
text: text.to_owned(),
});
});
});
let tx = event_tx.clone();
worker.on_tool_use_block(move |start, block| {
let _ = tx.send(Event::ToolCallStart {