fix(coding-agent): use stable date format in system prompt
This commit is contained in:
@@ -39,7 +39,11 @@ export function buildSystemPrompt(options: BuildSystemPromptOptions = {}): strin
|
|||||||
const resolvedCwd = cwd ?? process.cwd();
|
const resolvedCwd = cwd ?? process.cwd();
|
||||||
const promptCwd = resolvedCwd.replace(/\\/g, "/");
|
const promptCwd = resolvedCwd.replace(/\\/g, "/");
|
||||||
|
|
||||||
const date = new Date().toISOString().slice(0, 10);
|
const now = new Date();
|
||||||
|
const year = now.getFullYear();
|
||||||
|
const month = String(now.getMonth() + 1).padStart(2, "0");
|
||||||
|
const day = String(now.getDate()).padStart(2, "0");
|
||||||
|
const date = `${year}-${month}-${day}`;
|
||||||
|
|
||||||
const appendSection = appendSystemPrompt ? `\n\n${appendSystemPrompt}` : "";
|
const appendSection = appendSystemPrompt ? `\n\n${appendSystemPrompt}` : "";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user