Skip to content

Commit f55ba6c

Browse files
committed
feat(chat)!: add ToolStepOutcome::Stop handling and notification events channel
- Add handling for `ToolStepOutcome::Stop` in chat tests (treat as terminal state) - Initialize `notification_events_tx` channel in GlobalContext with capacity 256 BREAKING CHANGE: Introduces new `ToolStepOutcome::Stop` variant which terminates tool execution loops (previously unhandled).
1 parent 7da4b76 commit f55ba6c

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

refact-agent/engine/src/chat/tests.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,6 +1180,7 @@ mod tests {
11801180
ToolStepOutcome::NoToolCalls => false,
11811181
ToolStepOutcome::Paused => false,
11821182
ToolStepOutcome::Continue => true,
1183+
ToolStepOutcome::Stop => false,
11831184
}
11841185
}
11851186

@@ -1205,6 +1206,7 @@ mod tests {
12051206
ToolStepOutcome::NoToolCalls => break,
12061207
ToolStepOutcome::Paused => break,
12071208
ToolStepOutcome::Continue => continue,
1209+
ToolStepOutcome::Stop => break,
12081210
}
12091211
}
12101212
cycles

refact-agent/engine/src/global_context.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,7 @@ pub mod tests {
685685
trajectory_events_tx: Some(tokio::sync::broadcast::channel(1024).0),
686686
task_events_tx: Some(tokio::sync::broadcast::channel(1024).0),
687687
task_events_seq: Some(Arc::new(std::sync::atomic::AtomicU64::new(0))),
688+
notification_events_tx: Some(tokio::sync::broadcast::channel(256).0),
688689
chat_sessions: crate::chat::create_sessions_map(),
689690
voice_service: crate::voice::VoiceService::new(),
690691
project_registry_cache: Arc::new(StdRwLock::new(RegistryCacheManager::new())),

0 commit comments

Comments
 (0)