This commit is contained in:
seb
2026-10-14 13:31:25 +02:00
parent 80450e8748
commit 5fb8df6f6a
10 changed files with 240 additions and 56 deletions

View File

@@ -261,7 +261,6 @@ export const TOOL_PARAMETER_DESCRIPTIONS = {
};
export const PATCH_PARAMETER_DESCRIPTIONS = TOOL_PARAMETER_DESCRIPTIONS.patch;
export const PATCH_PARAM_DESCRIPTIONS = TOOL_PARAMETER_DESCRIPTIONS.patch;
export const ANALYZE_IMAGE_VISION_COMPARE_PROMPT =
'Compare these images, evaluate visual quality, flag watermarks/overlays/defects, and state the best candidate with rationale.';
export const ANALYZE_IMAGE_VISION_DESCRIBE_PROMPT =
@@ -335,28 +334,23 @@ export async function buildSystemPrompt(vfsRoot, googleAuthId) {
}
const today = new Date().toISOString().split('T')[0];
// 1. STATIC CORE FIRST (100% cacheable across all users, days, and VFS changes)
const staticCore = [
const basePrompt = [
'QuixPOS Article Management System API Assistant',
'[TESTSYSTEM: destructive commands allowed; primary goal is finding bugs]',
'',
SYSTEM_PROMPT_RULES,
'',
SYSTEM_PROMPT_ROUTE_MATRIX,
].join('\n');
// 2. DYNAMIC / PER-TENANT STATE LAST (ordered from least-volatile to most-volatile)
const dynamicContext = [
'',
`Date: ${today}`,
'',
buildSkillIndex(vfsRoot),
].join('\n');
const sections = [staticCore, dynamicContext];
const sections = [];
if (prefix) sections.push(prefix);
sections.push(basePrompt);
if (suffix) sections.push(suffix);
return sections.join('\n\n');
}