feat(subagent): emit reasoning text as progress in StepCompleted events
This commit is contained in:
@@ -416,6 +416,15 @@ pub fn run_subagent(ctx: &SubagentContext, tx: &mpsc::Sender<SubagentEvent>) ->
|
||||
|
||||
let content = response.content.clone().unwrap_or_default();
|
||||
|
||||
// Emit thinking/reasoning text as StepCompleted so the parent's
|
||||
// drain thread can show it as progress instead of just the tool name.
|
||||
if !content.is_empty() {
|
||||
let _ = tx.blocking_send(SubagentEvent::StepCompleted {
|
||||
step,
|
||||
output: content.clone(),
|
||||
});
|
||||
}
|
||||
|
||||
if has_tool_calls {
|
||||
let tool_calls = response.tool_calls.clone().unwrap_or_default();
|
||||
// Push the assistant message with tool_calls into the conversation
|
||||
|
||||
Reference in New Issue
Block a user