fix(agent): remove hardcoded default timezone, ask on-demand instead

Instead of assuming Asia/Saigon or UTC for all users, the model now
asks for timezone when the user mentions times/schedules/reminders.
After first ask, timezone is stored in USER.md for future sessions.

Closes #833 discussion.
This commit is contained in:
viettranx committed 2026-04-12 19:39:18 +07:00
1 parent b28699ce76
commit 02fe3e143e
1 file changed
+1 -1
+1 -1
View File
@@ -96,7 +96,7 @@ func (l *Loop) buildMessages(ctx context.Context, history []providers.Message, s
// DM only — group chats have permission checks and multiple senders.
if hadBootstrap && peerKind == "direct" {
if senderName := store.SenderNameFromContext(ctx); senderName != "" {
hint := fmt.Sprintf("Known user info (from %s): Name=%q\nDefault timezone: Asia/Saigon (GMT+7). User can correct this.", channelType, senderName)
hint := fmt.Sprintf("Known user info (from %s): Name=%q\nTimezone: not yet known. When the user mentions times, schedules, or reminders, ask for their timezone and update USER.md.", channelType, senderName)
if extraSystemPrompt != "" {
extraSystemPrompt += "\n\n"
}