Files
codex/codex-rs/prompts/src/lib.rs
T
Alex Kira e4490eff65 Allow model catalogs to override incremental tool notices (#52736)
## What changed

Add `model_messages.tools.incremental_tools` overrides for the update hint, tool and namespace removal headers, and namespace instruction update and clearing messages. Missing, null, or over-512-byte values fall back to bundled wording; empty strings omit static text while retaining runtime names and instructions.

Substitute `{name}` in namespace message templates and append runtime instructions verbatim. Wording changes alone do not trigger tool catalog updates.

## Testing

Extend unit tests and MCP request-history snapshots to cover custom wording, empty notices, tool removal and restoration, and namespace instruction changes and clearing without repeating unchanged tools or notices.

GitOrigin-RevId: 22dea0a6fb4cfcd646f5e65346424834c8b7d5a2
2026-10-10 01:14:28 +00:00

38 lines
1.5 KiB
Rust

mod compact;
mod guardian_instructions;
mod model_instructions;
mod model_messages;
mod multi_agent_instructions;
mod permissions_instructions;
mod realtime;
mod review_exit;
mod review_request;
mod update_plan_instructions;
pub use compact::SUMMARIZATION_PROMPT;
pub use compact::SUMMARY_PREFIX;
pub use guardian_instructions::GuardianClassifierInstructions;
pub use guardian_instructions::GuardianPolicyInstructions;
pub use guardian_instructions::render_guardian_rejection;
pub use model_instructions::render_model_instructions;
pub use model_messages::ResolvedAutoReviewMessages;
pub use model_messages::ResolvedCollaborationModeMessages;
pub use model_messages::ResolvedIncrementalToolMessages;
pub use model_messages::ResolvedMessage;
pub use model_messages::ResolvedModelMessages;
pub use model_messages::ResolvedMultiAgentMessages;
pub use multi_agent_instructions::MultiAgentRoleInstructions;
pub use permissions_instructions::ApprovalPromptContext;
pub use permissions_instructions::PermissionsInstructions;
pub use realtime::BACKEND_PROMPT;
pub use realtime::END_INSTRUCTIONS;
pub use realtime::START_INSTRUCTIONS;
pub use review_exit::render_review_exit_interrupted;
pub use review_exit::render_review_exit_success;
pub use review_request::REVIEW_PROMPT;
pub use review_request::ResolvedReviewRequest;
pub use review_request::resolve_review_request;
pub use review_request::review_prompt;
pub use review_request::user_facing_hint;
pub use update_plan_instructions::without_update_plan_instructions;