2026-02-08 13:57:26 +09:00
|
|
|
/**
|
2026-02-26 20:06:06 +09:00
|
|
|
* Creates OmO-specific environment context (timezone, locale).
|
2026-02-08 13:57:26 +09:00
|
|
|
* Note: Working directory, platform, and date are already provided by OpenCode's system.ts,
|
|
|
|
|
* so we only include fields that OpenCode doesn't provide to avoid duplication.
|
2026-03-10 15:18:16 +09:00
|
|
|
* See: https://github.com/code-yeongyu/oh-my-openagent/issues/379
|
2026-02-08 13:57:26 +09:00
|
|
|
*/
|
|
|
|
|
export function createEnvContext(): string {
|
|
|
|
|
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
|
|
|
const locale = Intl.DateTimeFormat().resolvedOptions().locale
|
|
|
|
|
|
|
|
|
|
return `
|
|
|
|
|
<omo-env>
|
|
|
|
|
Timezone: ${timezone}
|
|
|
|
|
Locale: ${locale}
|
|
|
|
|
</omo-env>`
|
|
|
|
|
}
|