mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-07 18:42:25 +00:00
fix(qa): accept completed mock image turns
This commit is contained in:
@@ -138,15 +138,28 @@ steps:
|
||||
value: ""
|
||||
- set: imageReplyText
|
||||
value: ""
|
||||
- call: runAgentPrompt
|
||||
args:
|
||||
- ref: env
|
||||
- sessionKey:
|
||||
ref: sessionKey
|
||||
message:
|
||||
expr: config.imagePrompt
|
||||
timeoutMs:
|
||||
expr: liveTurnTimeoutMs(env, config.imageTurnTimeoutMs)
|
||||
- set: imageReplyStartIndex
|
||||
value:
|
||||
expr: "state.getSnapshot().messages.filter((message) => message.direction === 'outbound').length"
|
||||
- try:
|
||||
actions:
|
||||
- call: runAgentPrompt
|
||||
args:
|
||||
- ref: env
|
||||
- sessionKey:
|
||||
ref: sessionKey
|
||||
message:
|
||||
expr: config.imagePrompt
|
||||
timeoutMs:
|
||||
expr: liveTurnTimeoutMs(env, config.imageTurnTimeoutMs)
|
||||
catchAs: imageRunError
|
||||
catch:
|
||||
- if:
|
||||
expr: "!env.mock || !/agent run aborted/i.test(formatErrorMessage(imageRunError))"
|
||||
then:
|
||||
- throw:
|
||||
message:
|
||||
expr: "formatErrorMessage(imageRunError)"
|
||||
- try:
|
||||
actions:
|
||||
- call: resolveGeneratedImagePath
|
||||
@@ -174,6 +187,8 @@ steps:
|
||||
params: [candidate]
|
||||
expr: "candidate.conversation.id === 'qa-operator' && (String(candidate.text ?? '').includes('MEDIA:') || /media failed|image generation failed/i.test(String(candidate.text ?? '')))"
|
||||
- expr: liveTurnTimeoutMs(env, config.imageTurnTimeoutMs)
|
||||
- sinceIndex:
|
||||
ref: imageReplyStartIndex
|
||||
- set: imageReplyText
|
||||
value:
|
||||
expr: "String(imageReply.text ?? '')"
|
||||
|
||||
Reference in New Issue
Block a user