mirror of
https://github.com/openai/codex.git
synced 2026-11-29 23:37:09 +00:00
feat: add mailbox concept for wait (#16010)
Add a mailbox we can use for inter-agent communication `wait` is now based on it and don't take target anymore
This commit is contained in:
1 parent
bb95ec3ec6
commit
213756c9ab
11 files changed
+601
-237
No files matched your search
@@ -28,25 +28,6 @@ pub(crate) async fn resolve_agent_target(
|
||||
})
|
||||
}
|
||||
|
||||
/// Resolves multiple tool-facing agent targets to thread ids.
|
||||
pub(crate) async fn resolve_agent_targets(
|
||||
session: &Arc<Session>,
|
||||
turn: &Arc<TurnContext>,
|
||||
targets: Vec<String>,
|
||||
) -> Result<Vec<ThreadId>, FunctionCallError> {
|
||||
if targets.is_empty() {
|
||||
return Err(FunctionCallError::RespondToModel(
|
||||
"agent targets must be non-empty".to_string(),
|
||||
));
|
||||
}
|
||||
|
||||
let mut resolved = Vec::with_capacity(targets.len());
|
||||
for target in &targets {
|
||||
resolved.push(resolve_agent_target(session, turn, target).await?);
|
||||
}
|
||||
Ok(resolved)
|
||||
}
|
||||
|
||||
fn register_session_root(session: &Arc<Session>, turn: &Arc<TurnContext>) {
|
||||
session
|
||||
.services
|
||||
|
||||
Reference in new issue
Block a user