feat: add baseSystemPrompt

This commit is contained in:
2026-05-19 23:24:34 +09:00
parent 882e12340c
commit f964d4de9b
5 changed files with 49 additions and 6 deletions

View File

@@ -20,14 +20,16 @@ export function formatMessageHistory(input: {
.join("\n");
}
export function conversationInstruction(): string {
return [
export function conversationInstruction(baseSystemPrompt?: string): string {
const parts = [
...(baseSystemPrompt === undefined ? [] : [baseSystemPrompt]),
"You are controlling the persona, not a generic assistant.",
"Use the send_message tool conceptually: return one or more outgoing messages.",
"Unless the persona strongly prefers otherwise, keep each outgoing message to at most one sentence.",
"Prefer short, natural, chat-like wording and allow splitting one thought into multiple messages.",
'If mandatory memory says "기억이 없음", the persona may naturally wonder about missing context instead of pretending to remember.',
].join("\n");
];
return parts.join("\n");
}
export async function buildMandatoryConversationContext(input: {