@@ -37,18 +37,18 @@ pub(crate) async fn build_skill_injections(
3737 let mut invocations = Vec :: new ( ) ;
3838
3939 for skill in mentioned_skills {
40- match fs:: read_to_string ( & skill. path ) . await {
40+ match fs:: read_to_string ( & skill. path_to_skills_md ) . await {
4141 Ok ( contents) => {
4242 emit_skill_injected_metric ( otel, skill, "ok" ) ;
4343 invocations. push ( SkillInvocation {
4444 skill_name : skill. name . clone ( ) ,
4545 skill_scope : skill. scope ,
46- skill_path : skill. path . clone ( ) ,
46+ skill_path : skill. path_to_skills_md . clone ( ) ,
4747 invocation_type : InvocationType :: Explicit ,
4848 } ) ;
4949 result. items . push ( ResponseItem :: from ( SkillInstructions {
5050 name : skill. name . clone ( ) ,
51- path : skill. path . to_string_lossy ( ) . into_owned ( ) ,
51+ path : skill. path_to_skills_md . to_string_lossy ( ) . into_owned ( ) ,
5252 contents,
5353 } ) ) ;
5454 }
@@ -57,7 +57,7 @@ pub(crate) async fn build_skill_injections(
5757 let message = format ! (
5858 "Failed to load skill {name} at {path}: {err:#}" ,
5959 name = skill. name,
60- path = skill. path . display( )
60+ path = skill. path_to_skills_md . display( )
6161 ) ;
6262 result. warnings . push ( message) ;
6363 }
@@ -121,9 +121,9 @@ pub(crate) fn collect_explicit_skill_mentions(
121121 if let Some ( skill) = selection_context
122122 . skills
123123 . iter ( )
124- . find ( |skill| skill. path . as_path ( ) == path. as_path ( ) )
124+ . find ( |skill| skill. path_to_skills_md . as_path ( ) == path. as_path ( ) )
125125 {
126- seen_paths. insert ( skill. path . clone ( ) ) ;
126+ seen_paths. insert ( skill. path_to_skills_md . clone ( ) ) ;
127127 seen_names. insert ( skill. name . clone ( ) ) ;
128128 selected. push ( skill. clone ( ) ) ;
129129 }
@@ -304,23 +304,27 @@ fn select_skills_from_mentions(
304304 . collect ( ) ;
305305
306306 for skill in selection_context. skills {
307- if selection_context. disabled_paths . contains ( & skill. path )
308- || seen_paths. contains ( & skill. path )
307+ if selection_context
308+ . disabled_paths
309+ . contains ( & skill. path_to_skills_md )
310+ || seen_paths. contains ( & skill. path_to_skills_md )
309311 {
310312 continue ;
311313 }
312314
313- let path_str = skill. path . to_string_lossy ( ) ;
315+ let path_str = skill. path_to_skills_md . to_string_lossy ( ) ;
314316 if mention_skill_paths. contains ( path_str. as_ref ( ) ) {
315- seen_paths. insert ( skill. path . clone ( ) ) ;
317+ seen_paths. insert ( skill. path_to_skills_md . clone ( ) ) ;
316318 seen_names. insert ( skill. name . clone ( ) ) ;
317319 selected. push ( skill. clone ( ) ) ;
318320 }
319321 }
320322
321323 for skill in selection_context. skills {
322- if selection_context. disabled_paths . contains ( & skill. path )
323- || seen_paths. contains ( & skill. path )
324+ if selection_context
325+ . disabled_paths
326+ . contains ( & skill. path_to_skills_md )
327+ || seen_paths. contains ( & skill. path_to_skills_md )
324328 {
325329 continue ;
326330 }
@@ -347,7 +351,7 @@ fn select_skills_from_mentions(
347351 }
348352
349353 if seen_names. insert ( skill. name . clone ( ) ) {
350- seen_paths. insert ( skill. path . clone ( ) ) ;
354+ seen_paths. insert ( skill. path_to_skills_md . clone ( ) ) ;
351355 selected. push ( skill. clone ( ) ) ;
352356 }
353357 }
@@ -479,7 +483,7 @@ mod tests {
479483 dependencies : None ,
480484 policy : None ,
481485 permissions : None ,
482- path : PathBuf :: from ( path) ,
486+ path_to_skills_md : PathBuf :: from ( path) ,
483487 scope : codex_protocol:: protocol:: SkillScope :: User ,
484488 }
485489 }
0 commit comments