diff --git a/packages/node-runtime/src/ai/agent/__tests__/core.test.ts b/packages/node-runtime/src/ai/agent/__tests__/core.test.ts index b5bbdb9e..9284570a 100644 --- a/packages/node-runtime/src/ai/agent/__tests__/core.test.ts +++ b/packages/node-runtime/src/ai/agent/__tests__/core.test.ts @@ -243,8 +243,9 @@ describe('runAgentCore runtime contract', () => { }) ) assert.equal(result.error, undefined) - assert.equal(captured?.messages[0].content[0].type, 'text') - assert.equal(captured?.messages[0].content[0].text, historyText) + const firstBlock = captured?.messages[0].content[0] + assert.ok(typeof firstBlock === 'object' && firstBlock.type === 'text') + assert.equal(firstBlock.text, historyText) assert.equal(outputBudget, 2048, 'Preserve the configured output budget when the history and answer both fit') }) diff --git a/packages/node-runtime/src/logging/app-logger.ts b/packages/node-runtime/src/logging/app-logger.ts index b6893ae6..99627cf0 100644 --- a/packages/node-runtime/src/logging/app-logger.ts +++ b/packages/node-runtime/src/logging/app-logger.ts @@ -10,7 +10,7 @@ import * as fs from 'fs' import * as path from 'path' -import { extractErrorInfo, extractErrorStack } from '../ai/ai-logger' +import { extractErrorInfo } from '../ai/ai-logger' type LogLevel = 'DEBUG' | 'INFO' | 'WARN' | 'ERROR' @@ -92,7 +92,7 @@ function formatData(data: unknown): string { if (data === undefined) return '' if (data instanceof Error) { const info = extractErrorInfo(data) - const stack = extractErrorStack(data) + const stack = data.stack return JSON.stringify(info) + (stack ? `\n${stack}` : '') } if (typeof data === 'string') return data diff --git a/src/components/common/Sidebar.vue b/src/components/common/Sidebar.vue index 4707102d..e6bfc12d 100644 --- a/src/components/common/Sidebar.vue +++ b/src/components/common/Sidebar.vue @@ -611,7 +611,12 @@ function getAvatarColorClass(session: AnalysisSession, isActive: boolean) { >