Skip to content

Commit c54d065

Browse files
committed
fix: chat environment functions output
1 parent 87024b8 commit c54d065

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/cli/commands/ChatCommand.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -799,13 +799,14 @@ const defaultEnvironmentFunctions = {
799799
getDate: defineChatSessionFunction({
800800
description: "Retrieve the current date",
801801
handler() {
802-
return new Date().toLocaleDateString();
802+
const date = new Date();
803+
return date.getFullYear() + "-" + String(date.getMonth() + 1).padStart(2, "0") + "-" + String(date.getDate()).padStart(2, "0");
803804
}
804805
}),
805806
getTime: defineChatSessionFunction({
806807
description: "Retrieve the current time",
807808
handler() {
808-
return new Date().toLocaleTimeString();
809+
return new Date().toLocaleTimeString("en-US");
809810
}
810811
})
811812
};

0 commit comments

Comments
 (0)