mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-14 00:16:38 +00:00
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:
1 parent
b28699ce76
commit
02fe3e143e
1 file changed
+1
-1
@@ -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"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user