File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -94,11 +94,17 @@ function buildOwnerIdentityLine(
9494 return `Authorized senders: ${ displayOwnerNumbers . join ( ", " ) } . These senders are allowlisted; do not assume they are the owner.` ;
9595}
9696
97- function buildTimeSection ( params : { userTimezone ?: string } ) {
97+ function buildTimeSection ( params : { userTimezone ?: string ; currentDate ?: string } ) {
9898 if ( ! params . userTimezone ) {
9999 return [ ] ;
100100 }
101- return [ "## Current Date & Time" , `Time zone: ${ params . userTimezone } ` , "" ] ;
101+ const lines = [ "## Current Date & Time" ] ;
102+ if ( params . currentDate ) {
103+ lines . push ( params . currentDate ) ;
104+ }
105+ lines . push ( `Time zone: ${ params . userTimezone } ` ) ;
106+ lines . push ( "" ) ;
107+ return lines ;
102108}
103109
104110function buildReplyTagsSection ( isMinimal : boolean ) {
@@ -564,6 +570,7 @@ export function buildAgentSystemPrompt(params: {
564570 ...buildUserIdentitySection ( ownerLine , isMinimal ) ,
565571 ...buildTimeSection ( {
566572 userTimezone,
573+ currentDate : params . currentDate ,
567574 } ) ,
568575 "## Workspace Files (injected)" ,
569576 "These user-editable files are loaded by OpenClaw and included below in Project Context." ,
You can’t perform that action at this time.
0 commit comments