缺陷 / 高 / Agent 引擎
electron/harness/prompts/context-builder.ts
ContextBuilder.buildSystemPrompt 中:
const now = new Date(); const timezone = 'Asia/Shanghai'; // 硬编码 const formattedTime = now.toLocaleString('zh-CN', { timeZone: timezone });
硬编码 Asia/Shanghai 时区:
// 使用系统本地时区 const formattedTime = now.toLocaleString('zh-CN', { timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone, }); // 或显式传入 const timezone = process.env.TZ ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
同时考虑添加 timezone 配置项让用户覆盖。
No dependencies set.
The note is not visible to the blocked user.
问题类型
缺陷 / 高 / Agent 引擎
文件位置
electron/harness/prompts/context-builder.ts问题描述
ContextBuilder.buildSystemPrompt 中:
硬编码 Asia/Shanghai 时区:
影响
建议修复
同时考虑添加 timezone 配置项让用户覆盖。