fix(ci): satisfy golines and gosmopolitan in cron code
This commit is contained in:
parent
5d803d3b54
commit
d40957974c
2 changed files with 5 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue