mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
feat: fix hinting 2 (#19961)
Fix this: https://github.com/openai/codex/pull/19805#discussion_r3153265562
This commit is contained in:
committed by
GitHub
Unverified
parent
431ebeaef7
commit
b7c0f26910
@@ -1,6 +1,7 @@
|
||||
use crate::session::turn_context::TurnContext;
|
||||
use codex_features::Feature;
|
||||
use codex_protocol::protocol::SessionSource;
|
||||
use codex_protocol::protocol::SubAgentSource;
|
||||
|
||||
pub(super) fn usage_hint_text<'a>(
|
||||
turn_context: &'a TurnContext,
|
||||
@@ -12,7 +13,15 @@ pub(super) fn usage_hint_text<'a>(
|
||||
|
||||
let multi_agent_v2 = &turn_context.config.multi_agent_v2;
|
||||
match session_source {
|
||||
SessionSource::SubAgent(_) => multi_agent_v2.subagent_usage_hint_text.as_deref(),
|
||||
_ => multi_agent_v2.root_agent_usage_hint_text.as_deref(),
|
||||
SessionSource::SubAgent(SubAgentSource::ThreadSpawn { .. }) => {
|
||||
multi_agent_v2.subagent_usage_hint_text.as_deref()
|
||||
}
|
||||
SessionSource::Cli
|
||||
| SessionSource::VSCode
|
||||
| SessionSource::Exec
|
||||
| SessionSource::Mcp
|
||||
| SessionSource::Custom(_)
|
||||
| SessionSource::Unknown => multi_agent_v2.root_agent_usage_hint_text.as_deref(),
|
||||
SessionSource::SubAgent(_) => None,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user