fix: add system prompt instruction about <environment_details> block

The model didn't know to look for or use the <environment_details> block
injected into user messages. Add a static instruction in the system prompt
explaining it, similar to how the legacy VS Code extension does it.

This instruction is static text that never changes, so it caches well
alongside the rest of the system prompt.
This commit is contained in:
Mark IJbema
2026-03-17 15:00:48 +01:00
parent f6da5ded83
commit f46b733585
+4
View File
@@ -79,6 +79,10 @@ export namespace SystemPrompt {
: ""
}`,
`</directories>`,
// kilocode_change start
``,
`At the end of each user message, you may receive <environment_details> with information about the user's currently active file, visible editors, and open tabs. This is auto-generated context — use it to understand which files the user is working with.`,
// kilocode_change end
].join("\n"),
]
}