From a2c4176f89492c06a43fb03b9da1bd8fccc27ef6 Mon Sep 17 00:00:00 2001 From: digua Date: Fri, 18 Sep 2026 10:03:51 +0800 Subject: [PATCH] test(ai): use source imports in root integration test Reference the shared runtime through its source path, matching the other root integration tests. This fixes workspace dependency validation without adding a root package dependency or changing the test behavior. --- tests/ai-agent-output-limit.test.mts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ai-agent-output-limit.test.mts b/tests/ai-agent-output-limit.test.mts index e3dfc9c0..18bc5f77 100644 --- a/tests/ai-agent-output-limit.test.mts +++ b/tests/ai-agent-output-limit.test.mts @@ -3,7 +3,7 @@ import { mkdtempSync, rmSync } from 'node:fs' import { tmpdir } from 'node:os' import { join } from 'node:path' import { test } from 'node:test' -import * as nodeRuntime from '@openchatlab/node-runtime' +import * as nodeRuntime from '../packages/node-runtime/src/index' import { runServerAgent } from '../apps/cli/src/ai/agent' import { AIChatManager } from '../packages/node-runtime/src/ai/chats' import { runCrossChatAgent } from '../packages/node-runtime/src/ai/cross-chat-agent' @@ -24,7 +24,7 @@ test('session and global agents surface truncated output instead of reporting su } try { // Desktop sources load as CommonJS in tsx; keep the shared ESM runtime unchanged. - await t.mock.module('@openchatlab/node-runtime', { namedExports: nodeRuntime }) + await t.mock.module('../packages/node-runtime/src/index', { namedExports: nodeRuntime }) // Isolate Desktop host services while keeping its Agent and stream runner real. await t.mock.module('../apps/desktop/main/ai/chats', { namedExports: {