fix(extension): resolve AI response dropping by adding nested payload extraction in step-utils
This commit is contained in:
@@ -366,18 +366,15 @@ function setupMonitor() {
|
||||
} catch { }
|
||||
}
|
||||
if (sType.includes('PLANNER_RESPONSE') && s?.status?.includes('DONE')) {
|
||||
const pr = s?.plannerResponse;
|
||||
if (pr) {
|
||||
let text = pr.modifiedResponse || pr.rawText || pr.text || '';
|
||||
if (text.length > 10) {
|
||||
lastResponseCaptureStep = actualIdx;
|
||||
ctx.logToFile(`[RT-CAPTURE] step=${actualIdx} (${text.length} chars)`);
|
||||
const truncated = text.length > 3500
|
||||
? text.substring(0, 3500) + '\n\n_(이하 생략)_'
|
||||
: text;
|
||||
ctx.writeChatSnapshot(`💬 **AI 응답**\n\n${truncated}`);
|
||||
break;
|
||||
}
|
||||
let text = extractPlannerText(s) || '';
|
||||
if (text.length > 10) {
|
||||
lastResponseCaptureStep = actualIdx;
|
||||
ctx.logToFile(`[RT-CAPTURE] step=${actualIdx} (${text.length} chars)`);
|
||||
const truncated = text.length > 3500
|
||||
? text.substring(0, 3500) + '\n\n_(이하 생략)_'
|
||||
: text;
|
||||
ctx.writeChatSnapshot(`💬 **AI 응답**\n\n${truncated}`);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user