mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Fix locale-specific date formatting issue in environmentContext.ts (#5889)
Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
@@ -106,7 +106,8 @@ describe('getEnvironmentContext', () => {
|
|||||||
expect(parts.length).toBe(1);
|
expect(parts.length).toBe(1);
|
||||||
const context = parts[0].text;
|
const context = parts[0].text;
|
||||||
|
|
||||||
expect(context).toContain("Today's date is Tuesday, August 5, 2025");
|
expect(context).toContain("Today's date is");
|
||||||
|
expect(context).toContain("(formatted according to the user's locale)");
|
||||||
expect(context).toContain(`My operating system is: ${process.platform}`);
|
expect(context).toContain(`My operating system is: ${process.platform}`);
|
||||||
expect(context).toContain(
|
expect(context).toContain(
|
||||||
"I'm currently working in the directory: /test/dir",
|
"I'm currently working in the directory: /test/dir",
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export async function getEnvironmentContext(config: Config): Promise<Part[]> {
|
|||||||
|
|
||||||
const context = `
|
const context = `
|
||||||
This is the Gemini CLI. We are setting up the context for our chat.
|
This is the Gemini CLI. We are setting up the context for our chat.
|
||||||
Today's date is ${today}.
|
Today's date is ${today} (formatted according to the user's locale).
|
||||||
My operating system is: ${platform}
|
My operating system is: ${platform}
|
||||||
${directoryContext}
|
${directoryContext}
|
||||||
`.trim();
|
`.trim();
|
||||||
|
|||||||
Reference in New Issue
Block a user