mirror of
https://github.com/anomalyco/opencode.git
synced 2026-09-07 18:04:52 +00:00
fix(core): place model prompt before project instructions (#46829)
This commit is contained in:
parent
429387d158
commit
79c789be89
2 changed files with 3 additions and 3 deletions
|
|
@ -54,7 +54,7 @@ function make(
|
|||
const prompt = getPrompt(`${model?.modelID ?? event.model.id} ${model?.family ?? ""}`.toLowerCase())
|
||||
if (!prompt) return
|
||||
if (options.operation === "append") {
|
||||
event.system.push(SystemPart.make(prompt))
|
||||
event.system.splice(1, 0, SystemPart.make(prompt))
|
||||
return
|
||||
}
|
||||
event.system[0] = { ...system, text: prompt }
|
||||
|
|
|
|||
|
|
@ -1590,8 +1590,8 @@ describe("SessionRunnerLLM", () => {
|
|||
|
||||
expect(s.requests.at(-1)?.system.map((part) => part.text)).toEqual([
|
||||
defaultSystem,
|
||||
"Initial context",
|
||||
expect.stringContaining("# Delegation"),
|
||||
"Initial context",
|
||||
])
|
||||
})
|
||||
|
||||
|
|
@ -1611,8 +1611,8 @@ describe("SessionRunnerLLM", () => {
|
|||
|
||||
expect(s.requests.at(-1)?.system.map((part) => part.text)).toEqual([
|
||||
defaultSystem,
|
||||
"Initial context",
|
||||
expect.stringContaining("# Delegation"),
|
||||
"Initial context",
|
||||
])
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue