File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -349,7 +349,7 @@ impl LoadedAgentsMd {
349349 Self {
350350 entries : vec ! [ InstructionEntry {
351351 contents,
352- provenance: InstructionProvenance :: Internal ,
352+ provenance: InstructionProvenance :: Global ( None ) ,
353353 } ] ,
354354 }
355355 }
Original file line number Diff line number Diff line change @@ -221,26 +221,14 @@ fn configured_and_persisted_instructions_are_bounded_for_model_context() {
221221fn replacing_global_instructions_preserves_project_entries_within_the_bound ( ) {
222222 let project_source =
223223 AbsolutePathBuf :: from_absolute_path ( "/tmp/project/AGENTS.md" ) . expect ( "absolute path" ) ;
224- let mut loaded = LoadedAgentsMd {
225- entries : vec ! [
226- InstructionEntry {
227- contents: "old global" . to_string( ) ,
228- provenance: InstructionProvenance :: Global ( None ) ,
229- } ,
230- InstructionEntry {
231- contents: "project" . to_string( ) ,
232- provenance: InstructionProvenance :: Project ( Some ( project_source. clone( ) ) ) ,
233- } ,
234- ] ,
235- } ;
236-
237- loaded. replace_global ( LoadedAgentsMd {
238- entries : vec ! [ InstructionEntry {
239- contents: "new global" . to_string( ) ,
240- provenance: InstructionProvenance :: Global ( None ) ,
241- } ] ,
224+ let mut loaded = LoadedAgentsMd :: from_text_for_testing ( "old global" ) ;
225+ loaded. entries . push ( InstructionEntry {
226+ contents : "project" . to_string ( ) ,
227+ provenance : InstructionProvenance :: Project ( Some ( project_source. clone ( ) ) ) ,
242228 } ) ;
243229
230+ loaded. replace_global ( LoadedAgentsMd :: from_text_for_testing ( "new global" ) ) ;
231+
244232 assert_eq ! (
245233 loaded,
246234 LoadedAgentsMd {
You can’t perform that action at this time.
0 commit comments