fix log bug

This commit is contained in:
Julian Freeman
2026-04-05 12:59:53 -04:00
parent f8785f4395
commit 785df4c5a5

View File

@@ -398,8 +398,11 @@ const refineMessage = async (messageId: string) => {
if (!settings.enableStreaming) { if (!settings.enableStreaming) {
const fullResponseJson = JSON.parse(response); const fullResponseJson = JSON.parse(response);
settings.addLog('response', fullResponseJson);
const refinedText = fullResponseJson.choices?.[0]?.message?.content || response; const refinedText = fullResponseJson.choices?.[0]?.message?.content || response;
settings.updateChatMessage(activeSession.value.id, messageId, { translated: refinedText }); settings.updateChatMessage(activeSession.value.id, messageId, { translated: refinedText });
} else {
settings.addLog('response', '(Streaming output captured)');
} }
} catch (err: any) { } catch (err: any) {
settings.addLog('error', String(err)); settings.addLog('error', String(err));