From 193c1761303439ccb9dd6632b16cd5e4ced8cad1 Mon Sep 17 00:00:00 2001 From: Bo Li Date: Tue, 20 Jan 2026 08:18:45 +0800 Subject: [PATCH] feat: add current date to omo-env context --- src/agents/utils.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/agents/utils.ts b/src/agents/utils.ts index 4780675a..4d2ee3f7 100644 --- a/src/agents/utils.ts +++ b/src/agents/utils.ts @@ -99,7 +99,14 @@ export function createEnvContext(): string { const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone const locale = Intl.DateTimeFormat().resolvedOptions().locale - const timeStr = now.toLocaleTimeString("en-US", { + const dateStr = now.toLocaleDateString(locale, { + weekday: "short", + year: "numeric", + month: "short", + day: "numeric", + }) + + const timeStr = now.toLocaleTimeString(locale, { hour: "2-digit", minute: "2-digit", second: "2-digit", @@ -108,6 +115,7 @@ export function createEnvContext(): string { return ` + Current date: ${dateStr} Current time: ${timeStr} Timezone: ${timezone} Locale: ${locale}