feat: show effective model in spawn agent event (#14944)

Show effective model after the full config layering for the sub agent
This commit is contained in:
jif-oai
2026-03-17 16:58:58 +00:00
committed by GitHub
parent ef36d39199
commit e8add54e5d
4 changed files with 224 additions and 7 deletions

View File

@@ -3,6 +3,7 @@ use crate::agent::guards::Guards;
use crate::agent::role::DEFAULT_ROLE_NAME;
use crate::agent::role::resolve_role_config;
use crate::agent::status::is_final;
use crate::codex_thread::ThreadConfigSnapshot;
use crate::error::CodexErr;
use crate::error::Result as CodexResult;
use crate::find_thread_path_by_id_str;
@@ -360,6 +361,19 @@ impl AgentControl {
))
}
pub(crate) async fn get_agent_config_snapshot(
&self,
agent_id: ThreadId,
) -> Option<ThreadConfigSnapshot> {
let Ok(state) = self.upgrade() else {
return None;
};
let Ok(thread) = state.get_thread(agent_id).await else {
return None;
};
Some(thread.config_snapshot().await)
}
/// Subscribe to status updates for `agent_id`, yielding the latest value and changes.
pub(crate) async fn subscribe_status(
&self,