|
@@ -17,6 +17,7 @@ import {
|
|
|
|
|
|
|
|
import PROMPT_INITIALIZE from "../session/prompt/initialize.txt"
|
|
import PROMPT_INITIALIZE from "../session/prompt/initialize.txt"
|
|
|
import PROMPT_PLAN from "../session/prompt/plan.txt"
|
|
import PROMPT_PLAN from "../session/prompt/plan.txt"
|
|
|
|
|
+import PROMPT_ANTHROPIC_SPOOF from "../session/prompt/anthropic_spoof.txt"
|
|
|
|
|
|
|
|
import { App } from "../app/app"
|
|
import { App } from "../app/app"
|
|
|
import { Bus } from "../bus"
|
|
import { Bus } from "../bus"
|
|
@@ -546,7 +547,8 @@ export namespace Session {
|
|
|
msgs.push({ info: userMsg, parts: userParts })
|
|
msgs.push({ info: userMsg, parts: userParts })
|
|
|
|
|
|
|
|
const mode = await Mode.get(input.mode ?? "build")
|
|
const mode = await Mode.get(input.mode ?? "build")
|
|
|
- let system = mode.prompt ? [mode.prompt] : SystemPrompt.provider(input.providerID, input.modelID)
|
|
|
|
|
|
|
+ let system = input.providerID === "anthropic" ? [PROMPT_ANTHROPIC_SPOOF.trim()] : []
|
|
|
|
|
+ system.push(...(mode.prompt ? [mode.prompt] : SystemPrompt.provider(input.modelID)))
|
|
|
system.push(...(await SystemPrompt.environment()))
|
|
system.push(...(await SystemPrompt.environment()))
|
|
|
system.push(...(await SystemPrompt.custom()))
|
|
system.push(...(await SystemPrompt.custom()))
|
|
|
// max 2 system prompt messages for caching purposes
|
|
// max 2 system prompt messages for caching purposes
|