fix(agent): correct image attachment positioning and prevent disappearance after task completion

This commit is contained in:
HouYunFei
2026-07-29 14:33:45 +08:00
parent d2141d5f59
commit 88e86c0566
6 changed files with 23 additions and 6 deletions
+2 -1
View File
@@ -131,7 +131,8 @@ function displayUserText(text: string) {
const value = text.trim();
const marker = "用户请求:";
const index = value.lastIndexOf(marker);
return (index >= 0 ? value.slice(index + marker.length) : value).trim();
const prompt = index >= 0 ? value.slice(index + marker.length) : value;
return prompt.split("\n\n本轮可用图片附件(顺序与图片输入一致):", 1)[0].trim();
}
/** 将未知值转换为数组。 */