mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Move host skill prompt injection into the skills extension (#37503)
## What changed - Add `HostSkillsSnapshot::load_skill_prompts` so the skills extension owns reading and rendering selected host skills. - Keep explicit invocation telemetry, unreadable-skill warnings, plugin prompt ordering, and suppression of host prompts superseded by provider prompts. - Remove the legacy prompt injection and fragment implementation from `codex-core-skills`. ## Testing - Cover prompt truncation without an installed skills extension, skill/plugin ordering, selective provider supersession, unreadable skills, and contextual fragment detection. GitOrigin-RevId: 9c8b84ad54b90d174abc287ab49cc5a231e9e1aa
This commit is contained in:
1 parent
8e4b10446e
commit
beac16cccd
22 files changed
+553
-299
No files matched your search
@@ -20,6 +20,16 @@ use crate::catalog_prompt::render_available_skills_body;
|
||||
use crate::loader::HostSkillRoot;
|
||||
use crate::loader::load_and_merge_host_skill_roots;
|
||||
|
||||
#[test]
|
||||
fn skill_prompt_contents_are_bounded_at_utf8_boundaries() {
|
||||
let contents = format!("{}é", "a".repeat(MAX_SKILL_PROMPT_BYTES - 1));
|
||||
|
||||
let (bounded, truncated) = truncate_main_prompt_contents(&contents);
|
||||
|
||||
assert_eq!(bounded.len(), MAX_SKILL_PROMPT_BYTES - 1);
|
||||
assert_eq!(truncated, true);
|
||||
}
|
||||
|
||||
fn entry(name: &str, description: &str, short_description: Option<&str>) -> SkillCatalogEntry {
|
||||
entry_with_path(
|
||||
name,
|
||||
|
||||
Reference in new issue
Block a user