feat: add interrupt capabilities to send_input (#9276)

This commit is contained in:
jif-oai
2026-01-15 14:59:07 +00:00
committed by GitHub
parent 05b960671d
commit faeb08c1e1
3 changed files with 64 additions and 0 deletions

View File

@@ -71,6 +71,12 @@ impl AgentControl {
result
}
/// Interrupt the current task for an existing agent thread.
pub(crate) async fn interrupt_agent(&self, agent_id: ThreadId) -> CodexResult<String> {
let state = self.upgrade()?;
state.send_op(agent_id, Op::Interrupt).await
}
/// Submit a shutdown request to an existing agent thread.
pub(crate) async fn shutdown_agent(&self, agent_id: ThreadId) -> CodexResult<String> {
let state = self.upgrade()?;