feat(bridge): DOM Markdown parser restoration (v0.5.56) + code noise filter fix + user msg relay #task-634
This commit is contained in:
@@ -544,8 +544,10 @@ function _handleChatSnapshot(req: any, res: any, ctx: HttpBridgeContext) {
|
||||
try {
|
||||
const data = JSON.parse(body);
|
||||
if (data.text && typeof ctx.writeChatSnapshot === 'function') {
|
||||
ctx.writeChatSnapshot(`💬 **[DOM 추출] AI 응답**\n\n${data.text}`);
|
||||
ctx.logToFile(`[HTTP] chat snapshot written (${data.text.length} chars)`);
|
||||
const isUser = data.role === 'user';
|
||||
const prefix = isUser ? '🧑💻 **[DOM 추출] 사용자 요청**' : '💬 **[DOM 추출] AI 응답**';
|
||||
ctx.writeChatSnapshot(`${prefix}\n\n${data.text}`);
|
||||
ctx.logToFile(`[HTTP] chat snapshot written (${data.text.length} chars, role: ${data.role || 'bot'})`);
|
||||
}
|
||||
res.writeHead(200, { 'Content-Type': 'application/json' });
|
||||
res.end(JSON.stringify({ ok: true }));
|
||||
|
||||
Reference in New Issue
Block a user