diff --git a/pkg/tools/cron.go b/pkg/tools/cron.go index 78fbc3f88..60d9d5e5a 100644 --- a/pkg/tools/cron.go +++ b/pkg/tools/cron.go @@ -393,7 +393,10 @@ func (t *CronTool) ExecuteJob(ctx context.Context, job *cron.CronJob) string { prompt := job.Payload.Message if isDirective { // For directive type, prefix to clarify this is an instruction - prompt = fmt.Sprintf("Please execute the following directive and provide the result:\n\n%s", job.Payload.Message) + prompt = fmt.Sprintf( + "Please execute the following directive and provide the result:\n\n%s", + job.Payload.Message, + ) } // Call agent with the prepared prompt diff --git a/pkg/tools/cron_test.go b/pkg/tools/cron_test.go index 2185fcde6..186c6a75e 100644 --- a/pkg/tools/cron_test.go +++ b/pkg/tools/cron_test.go @@ -329,7 +329,7 @@ func TestCronTool_ExecuteJobSkipsEmptyAgentResponse(t *testing.T) { } func TestCronTool_ExecuteJobSkipsWhenMessageToolAlreadySent(t *testing.T) { - executor := &stubJobExecutor{response: "已发送。", alreadySent: true} + executor := &stubJobExecutor{response: "Sent.", alreadySent: true} tool := newTestCronToolWithExecutorAndConfig(t, executor, config.DefaultConfig()) job := &cron.CronJob{ID: "job-msg-sent"}