🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
🧪 test: finish audit cleanup and verify observable outcomes (#22334)
Innei5e12ab1fc2fe
diff --git a/apps/cli/src/commands/generate.test.ts b/apps/cli/src/commands/generate.test.tsindex ceeaba2e1f3..1b2cbb1dce6 100644--- a/apps/cli/src/commands/generate.test.ts+++ b/apps/cli/src/commands/generate.test.ts@@ -1119,6 +1119,9 @@ describe('generate command', () => {expect(consoleSpy).toHaveBeenCalledTimes(2);expect(consoleSpy.mock.calls[0][0]).toContain('ID');+ expect(consoleSpy.mock.calls[1][0]).toContain('t1');+ expect(consoleSpy.mock.calls[1][0]).toContain('My Images');+ expect(consoleSpy.mock.calls[1][0]).toContain('image');});it('should show message when empty', async () => {diff --git a/apps/server/src/routers/lambda/image/index.test.ts b/apps/server/src/routers/lambda/image/index.test.tsindex 95d522d45d6..126a637f558 100644--- a/apps/server/src/routers/lambda/image/index.test.ts+++ b/apps/server/src/routers/lambda/image/index.test.ts@@ -155,13 +155,6 @@ vi.mock('@/database/schemas', () => ({generations: { id: 'generations.id', userId: 'generations.userId' },}));-// Mock seed generator-vi.mock('@/utils/number', () => ({- generateUniqueSeeds: vi.fn(function (count: number) {- return Array.from({ length: count }, (_, i) => 1000 + i);- }),-}));-describe('imageRouter', () => {const mockUserId = 'test-user-id';const mockAsyncCallerCreateImage = vi.fn();@@ -471,12 +464,10 @@ describe('imageRouter', () => {const caller = imageRouter.createCaller(ctx);await caller.createImage(input);- expect(mockGetKeyFromFullUrl).toHaveBeenCalledTimes(2);- expect(mockGetKeyFromFullUrl).toHaveBeenCalledWith(- 'https://s3.amazonaws.com/bucket/files/image1.jpg',- );- expect(mockGetKeyFromFullUrl).toHaveBeenCalledWith(- 'https://s3.amazonaws.com/bucket/files/image2.jpg',+ expect(mockInsertValues[0]).toEqual(+ expect.objectContaining({+ config: { prompt: 'test prompt', imageUrls: ['files/image1.jpg', 'files/image2.jpg'] },+ }),);});@@ -494,8 +485,10 @@ describe('imageRouter', () => {const caller = imageRouter.createCaller(ctx);await caller.createImage(input);- expect(mockGetKeyFromFullUrl).toHaveBeenCalledWith(- 'https://s3.amazonaws.com/bucket/files/single-image.jpg',+ expect(mockInsertValues[0]).toEqual(+ expect.objectContaining({+ config: { prompt: 'test prompt', imageUrl: 'files/single-image.jpg' },+ }),);});@@ -515,6 +508,9 @@ describe('imageRouter', () => {// Should still succeed, just with empty imageUrls in configexpect(result.success).toBe(true);+ expect(mockInsertValues[0]).toEqual(+ expect.objectContaining({ config: { prompt: 'test prompt', imageUrls: [] } }),+ );});it('should throw error when imageUrls conversion fails and URLs remain', async () => {@@ -678,7 +674,21 @@ describe('imageRouter', () => {const caller = imageRouter.createCaller(ctx);await caller.createImage(input);- expect(mockCreateAsyncCaller).toHaveBeenCalledWith({ userId: mockUserId });+ expect(mockAsyncCallerCreateImage).toHaveBeenCalledTimes(2);+ expect(mockAsyncCallerCreateImage).toHaveBeenNthCalledWith(+ 1,+ expect.objectContaining({+ generationBatchId: 'batch-1',+ generationId: 'gen-1',+ generationTopicId: 'topic-1',+ params: input.params,+ taskId: 'task-1',+ }),+ );+ expect(mockAsyncCallerCreateImage).toHaveBeenNthCalledWith(+ 2,+ expect.objectContaining({ generationId: 'gen-2', taskId: 'task-2' }),+ );});it('should persist and forward workspaceId for background image tasks', async () => {@@ -779,8 +789,6 @@ describe('imageRouter', () => {// Should still return success as the database records were createdexpect(result.success).toBe(true);- // Should update async task status to error- expect(mockAsyncTaskModelUpdate).toHaveBeenCalled();});it('reconciles per-generation billing handles when async startup fails', async () => {@@ -856,7 +864,10 @@ describe('imageRouter', () => {const caller = imageRouter.createCaller(ctx);await caller.createImage(input);- expect(mockServerDB.transaction).toHaveBeenCalled();+ const generations = mockInsertValues[1] as { seed: number }[];+ expect(generations).toHaveLength(2);+ expect(generations.every(({ seed }) => Number.isInteger(seed))).toBe(true);+ expect(new Set(generations.map(({ seed }) => seed)).size).toBe(2);});it('should use null seeds when seed param is not provided', async () => {@@ -871,7 +882,10 @@ describe('imageRouter', () => {const caller = imageRouter.createCaller(ctx);await caller.createImage(input);- expect(mockServerDB.transaction).toHaveBeenCalled();+ expect(mockInsertValues[1]).toEqual([+ expect.objectContaining({ seed: null }),+ expect.objectContaining({ seed: null }),+ ]);});it('should pass with valid key-based imageUrls', async () => {@@ -916,7 +930,14 @@ describe('imageRouter', () => {const result = await caller.createImage(input);expect(result.success).toBe(true);- expect(mockGetFullFileUrl).toHaveBeenCalledWith('files/image-key.jpg');+ expect(mockAsyncCallerCreateImage).toHaveBeenCalledWith(+ expect.objectContaining({+ params: {+ prompt: 'test prompt',+ imageUrl: 'https://s3.amazonaws.com/bucket/files/image-key.jpg',+ },+ }),+ );});it('should convert multiple imageUrls to S3 URLs in development mode', async () => {@@ -939,9 +960,17 @@ describe('imageRouter', () => {const result = await caller.createImage(input);expect(result.success).toBe(true);- expect(mockGetFullFileUrl).toHaveBeenCalledTimes(2);- expect(mockGetFullFileUrl).toHaveBeenCalledWith('files/image1.jpg');- expect(mockGetFullFileUrl).toHaveBeenCalledWith('files/image2.jpg');+ expect(mockAsyncCallerCreateImage).toHaveBeenCalledWith(+ expect.objectContaining({+ params: {+ prompt: 'test prompt',+ imageUrls: [+ 'https://s3.amazonaws.com/bucket/files/image1.jpg',+ 'https://s3.amazonaws.com/bucket/files/image2.jpg',+ ],+ },+ }),+ );});it('should not convert URLs when getFullFileUrl returns null', async () => {@@ -960,7 +989,11 @@ describe('imageRouter', () => {const result = await caller.createImage(input);expect(result.success).toBe(true);- expect(mockGetFullFileUrl).toHaveBeenCalled();+ expect(mockAsyncCallerCreateImage).toHaveBeenCalledWith(+ expect.objectContaining({+ params: { prompt: 'test prompt', imageUrl: 'http://localhost:3000/f/file-id' },+ }),+ );});});});diff --git a/apps/server/src/services/aiAgent/__tests__/execSubAgent.test.ts b/apps/server/src/services/aiAgent/__tests__/execSubAgent.test.tsindex 9febc0719b1..9403a7a6c15 100644--- a/apps/server/src/services/aiAgent/__tests__/execSubAgent.test.ts+++ b/apps/server/src/services/aiAgent/__tests__/execSubAgent.test.ts@@ -451,23 +451,14 @@ describe('AiAgentService.execSubAgent', () => {});});- describe('source message summary update', () => {- it('should pass sourceMessageId (parentMessageId) to callbacks for summary update', async () => {+ describe('thread completion hook registration', () => {+ it('registers a callable onComplete hook for the child thread', async () => {const execAgentSpy = vi.spyOn(service, 'execAgent').mockResolvedValue(createSuccessfulExecAgentResult());await service.execSubAgent(createSubAgentParams());- // Verify that hooks were passed with onComplete- expect(execAgentSpy).toHaveBeenCalledWith(- expect.objectContaining({- hooks: expect.arrayContaining([- expect.objectContaining({ id: 'thread-completion', type: 'onComplete' }),- ]),- }),- );-// Get the onComplete hook handlerconst callArgs = execAgentSpy.mock.calls[0][0];const onCompleteHook = callArgs.hooks?.find((h: any) => h.id === 'thread-completion');@@ -905,7 +896,7 @@ describe('AiAgentService.execSubAgent', () => {expect(execAgentSpy.mock.calls[0][0].trigger).toBe('chat');});- it('hands the tab the child run gateway ticket so it can stream the reply', async () => {+ it('returns the child operation id and gateway ticket to the tab', async () => {vi.spyOn(service, 'execAgent').mockResolvedValue({assistantMessageId: 'msg-child',operationId: 'op-child',diff --git a/apps/server/src/services/bot/BotMessageRouter/index.policy.test.ts b/apps/server/src/services/bot/BotMessageRouter/index.policy.test.tsindex 8190afcd452..664471ac4df 100644--- a/apps/server/src/services/bot/BotMessageRouter/index.policy.test.ts+++ b/apps/server/src/services/bot/BotMessageRouter/index.policy.test.ts@@ -581,15 +581,12 @@ describe('BotMessageRouter', () => {});});- describe('regression: nested settings.dm.policy is ignored', () => {+ describe('DM policy gating', () => {/**- * Original bug: the form persisted `settings.dmPolicy` (flat) but the- * router read `settings.dm.policy` (nested), so every saved policy- * silently fell back to `'open'` and DMs were never blocked. Lock that- * direction in: the *flat* key is authoritative; the legacy nested- * shape is dead.+ * The real flat/nested-key parser is covered in platforms/__tests__/const.test.ts.+ * This suite uses a parser double and verifies the router's policy gate.*/- it('a saved dmPolicy=disabled at the flat key blocks DMs end-to-end', async () => {+ it('blocks DMs when the resolved policy is disabled', async () => {mockFindEnabledByPlatform.mockResolvedValue([makeProvider({ applicationId: 'app-1', settings: { dmPolicy: 'disabled' } }),]);@@ -618,7 +615,7 @@ describe('BotMessageRouter', () => {expect(thread.post.mock.calls[0][0]).toContain("isn't accepting direct messages");});- it('a legacy nested settings.dm.policy=disabled is IGNORED and DMs pass through', async () => {+ it('allows DMs when the parser resolves the legacy input to open', async () => {mockFindEnabledByPlatform.mockResolvedValue([makeProvider({applicationId: 'app-1',diff --git a/apps/server/src/services/bot/__tests__/agentBotProviderSettings.test.ts b/apps/server/src/services/bot/__tests__/agentBotProviderSettings.test.tsindex aab96c24521..f638fcb1fba 100644--- a/apps/server/src/services/bot/__tests__/agentBotProviderSettings.test.ts+++ b/apps/server/src/services/bot/__tests__/agentBotProviderSettings.test.ts@@ -317,14 +317,6 @@ describe('mergeBotSettingsForCreate', () => {expect(settings).toMatchObject({ botWakeDisabled: true, dmPolicy: 'open' });});- it('switches bot wake off for a heterogeneous agent created without settings', async () => {- const db = dbWith({ heterogeneousProvider: { type: 'claude-code' } });-- expect(- (await mergeBotSettingsForCreate(db, 'agt', 'discord', undefined))?.botWakeDisabled,- ).toBe(true);- });-it('writes the defaults for an ordinary agent created without settings, reactions off', async () => {const settings = await mergeBotSettingsForCreate(dbWith({}), 'agt', 'discord', undefined);diff --git a/apps/server/src/services/bot/platforms/reactionMode.test.ts b/apps/server/src/services/bot/platforms/reactionMode.test.tsindex 9a97fd200da..c0ae55cf37f 100644--- a/apps/server/src/services/bot/platforms/reactionMode.test.ts+++ b/apps/server/src/services/bot/platforms/reactionMode.test.ts@@ -3,7 +3,6 @@ import { describe, expect, it } from 'vitest';import {BOT_REACTION_MODES,DEFAULT_BOT_REACTION_MODE,- NEW_BOT_REACTION_MODE,normalizeBotReactionMode,reactionModeField,shouldApplyReaction,@@ -26,7 +25,6 @@ describe('normalizeBotReactionMode', () => {expect(normalizeBotReactionMode(true)).toBe(DEFAULT_BOT_REACTION_MODE);});});-describe('shouldApplyReaction', () => {it('never touches reactions under `none`', () => {expect(shouldApplyReaction('none', 'received')).toBe(false);@@ -58,12 +56,3 @@ describe('reactionModeField', () => {expect(reactionModeField.enumDescriptions).toHaveLength(BOT_REACTION_MODES.length);});});--describe('NEW_BOT_REACTION_MODE', () => {- it('starts a new bot with reactions off, while old rows keep the on default', () => {- expect(NEW_BOT_REACTION_MODE).toBe('none');- expect(shouldApplyReaction(NEW_BOT_REACTION_MODE, 'received')).toBe(false);- expect(reactionModeField.default).toBe(DEFAULT_BOT_REACTION_MODE);- expect(normalizeBotReactionMode(undefined)).not.toBe(NEW_BOT_REACTION_MODE);- });-});diff --git a/packages/database/src/repositories/home/index.test.ts b/packages/database/src/repositories/home/index.test.tsindex fe13521d176..48474f39801 100644--- a/packages/database/src/repositories/home/index.test.ts+++ b/packages/database/src/repositories/home/index.test.ts@@ -43,7 +43,7 @@ describe('HomeRepository', () => {});describe('getSidebarAgentList - agents', () => {- it('should return agents without projecting legacy session info', async () => {+ it('returns linked agents with their agent-owned sidebar fields', async () => {// Create agentconst [agent] = await serverDB.insert(agents)diff --git a/packages/database/src/repositories/topic/__tests__/create.test.ts b/packages/database/src/repositories/topic/__tests__/create.test.tsindex 9535cfda0b0..69b1e9f42bd 100644--- a/packages/database/src/repositories/topic/__tests__/create.test.ts+++ b/packages/database/src/repositories/topic/__tests__/create.test.ts@@ -268,7 +268,7 @@ describe('TopicRepository - create', () => {expect(createdTopic.sessionId).toBeNull();});- it('attaches given messages to the new topic in one transaction', async () => {+ it('attaches each given message to the newly created topic', async () => {await serverDB.insert(messages).values([{ content: 'm1', id: 'msg-1', role: 'user', userId },{ content: 'm2', id: 'msg-2', role: 'assistant', userId },diff --git a/packages/types/src/tool/intervention.test.ts b/packages/types/src/tool/intervention.test.tsindex 9200776e5e5..2900fbf297d 100644--- a/packages/types/src/tool/intervention.test.ts+++ b/packages/types/src/tool/intervention.test.ts@@ -9,7 +9,7 @@ describe('classifyToolInterventionPresentation', () => {surface: 'form',});});- it('renders Devin questions and provider-specific interactions as forms', () => {+ it('renders Copilot and Devin questions and Devin permissions as forms', () => {expect(classifyToolInterventionPresentation('copilot', 'askUserQuestion')).toEqual({interactionKind: 'question',surface: 'form',diff --git a/packages/utils/src/format.test.ts b/packages/utils/src/format.test.tsindex 514374a91e6..cbdf03621bb 100644--- a/packages/utils/src/format.test.ts+++ b/packages/utils/src/format.test.ts@@ -186,8 +186,6 @@ describe('format', () => {it('should format prices with digits correctly', () => {expect(formatPrice(1000, 1)).toBe('1,000.0');- expect(formatPrice(1234.56)).toBe('1,234.56');- expect(formatPrice(0.99)).toBe('0.99');expect(formatPrice(1000000.01, 0)).toBe('1,000,000');});diff --git a/packages/utils/src/platform.server.test.ts b/packages/utils/src/platform.server.test.tsnew file mode 100644index 00000000000..c66f4b61256--- /dev/null+++ b/packages/utils/src/platform.server.test.ts@@ -0,0 +1,8 @@+// @vitest-environment node+import { expect, it } from 'vitest';++import { isArc } from './platform';++it('reports no Arc browser on the server without accessing browser globals', () => {+ expect(isArc()).toBe(false);+});diff --git a/packages/utils/src/platform.test.ts b/packages/utils/src/platform.test.tsindex be579b15228..cd4717cdc5c 100644--- a/packages/utils/src/platform.test.ts+++ b/packages/utils/src/platform.test.ts@@ -2,16 +2,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { isArc, isMacOSWithLargeWindowBorders, isSonomaOrLaterSafari } from './platform';-vi.mock('./platform', async (importOriginal) => {- const mod = await importOriginal();-- return {- // @ts-ignore- ...mod,- isOnServerSide: true,- };-});-describe('isSonomaOrLaterSafari', () => {beforeEach(() => {// 重置 navigator 对象@@ -132,10 +122,6 @@ describe('isSonomaOrLaterSafari', () => {vi.restoreAllMocks();});- it('should return false when on server side', () => {- expect(isArc()).toBe(false);- });-it('should return true when CSS custom property matches', () => {window.matchMedia = vi.fn().mockReturnValue({ matches: true });expect(isArc()).toBe(true);diff --git a/packages/utils/src/taskSlug.test.ts b/packages/utils/src/taskSlug.test.tsindex 48abc1dc240..fb92107572d 100644--- a/packages/utils/src/taskSlug.test.ts+++ b/packages/utils/src/taskSlug.test.ts@@ -2,11 +2,6 @@ import { describe, expect, it } from 'vitest';import { TASK_SLUG_MAX_LENGTH, taskTitleSlug } from './taskSlug';-const toGraphemes = (value: string) =>- [...new Intl.Segmenter(undefined, { granularity: 'grapheme' }).segment(value)].map(- (entry) => entry.segment,- );-describe('taskTitleSlug', () => {it('lowercases and joins words with a single dash', () => {expect(taskTitleSlug('Ship the Thing')).toBe('ship-the-thing');@@ -47,7 +42,6 @@ describe('taskTitleSlug', () => {const slug = taskTitleSlug(`${'a'.repeat(TASK_SLUG_MAX_LENGTH)} tail`);expect(slug).toBe('a'.repeat(TASK_SLUG_MAX_LENGTH));- expect(slug.endsWith('-')).toBe(false);});it('truncates by code point so an astral character is never split', () => {@@ -62,7 +56,6 @@ describe('taskTitleSlug', () => {// point would cut a cluster in half and strand a matra in the URL.const slug = taskTitleSlug('कि'.repeat(TASK_SLUG_MAX_LENGTH + 10));- expect(toGraphemes(slug)).toHaveLength(TASK_SLUG_MAX_LENGTH);expect(slug).toBe('कि'.repeat(TASK_SLUG_MAX_LENGTH));});diff --git a/scripts/stylexMigration/verification/fixtures/fixtureRegistry.test.ts b/scripts/stylexMigration/verification/fixtures/fixtureRegistry.test.tsindex f6d0c523966..0cf02a10fb1 100644--- a/scripts/stylexMigration/verification/fixtures/fixtureRegistry.test.ts+++ b/scripts/stylexMigration/verification/fixtures/fixtureRegistry.test.ts@@ -73,7 +73,7 @@ describe('explicit fixture contract', () => {).toBe(false);});- it('connects all entries with explicit mounting and probe contracts', () => {+ it('declares render paths and generates probes for all entries', () => {expect(fixtureIds).toHaveLength(30);for (const id of fixtureIds) {const fixture = getStyleFixture(id);diff --git a/src/features/ChatInput/InputEditor/index.test.tsx b/src/features/ChatInput/InputEditor/index.test.tsxindex 0cbf8d654c2..bef20e27c55 100644--- a/src/features/ChatInput/InputEditor/index.test.tsx+++ b/src/features/ChatInput/InputEditor/index.test.tsx@@ -326,7 +326,7 @@ describe('ChatInput InputEditor', () => {expect(props.markdownOption).toBeUndefined();});- it('converts pasted markdown when paste auto-convert is on', async () => {+ it('enables the editor markdown-paste option when auto-convert is on', async () => {render(<InputEditor />);const props = await getEditorProps();@@ -334,7 +334,7 @@ describe('ChatInput InputEditor', () => {expect(props.pasteAsPlainText).toBe(true);});- it('pastes verbatim when paste auto-convert is off', async () => {+ it('disables the editor markdown-paste option when auto-convert is off', async () => {userSettings.enablePasteAutoConvert = false;render(<InputEditor />);diff --git a/src/features/ChatInput/store/action.test.ts b/src/features/ChatInput/store/action.test.tsindex 3fb7a183ec0..4c53b5394c2 100644--- a/src/features/ChatInput/store/action.test.ts+++ b/src/features/ChatInput/store/action.test.ts@@ -378,7 +378,7 @@ describe('ChatInput store actions', () => {await vi.waitFor(() => expect(onSend).toHaveBeenCalledOnce());const { getEditorData, getMarkdownContent } = onSend.mock.calls[0][0];expect(getMarkdownContent()).toBe('<mention name="Writer" id="agt_writer" /> hi');- expect(getEditorData().root.children[0].children[0].metadata).toEqual({+ expect(getEditorData().root.children[0].children[0].metadata).toStrictEqual({id: 'agt_writer',label: 'Writer',type: 'agent',diff --git a/src/features/WorkspaceSetting/hooks/useCategory.test.tsx b/src/features/WorkspaceSetting/hooks/useCategory.test.tsxindex 8dff758b6b5..29270d83c22 100644--- a/src/features/WorkspaceSetting/hooks/useCategory.test.tsx+++ b/src/features/WorkspaceSetting/hooks/useCategory.test.tsx@@ -111,9 +111,7 @@ describe('workspace settings useCategory', () => {expect(result.current.at(-1)?.key).toBe(WorkspaceSettingsGroupKey.System);});- // The drives need no opt-in: every member sees the tab, which shows the- // public drive, their own, and the way to a plan when the workspace has none.- it('groups devices, subscription accounts, environments and drives under Resources', () => {+ it('groups devices, subscription accounts and environments under Resources', () => {const { result } = renderHook(() => useWorkspaceSettingCategory(), { wrapper });const keys = result.current.map((group) => group.key);const resourceGroup = result.current.find(diff --git a/src/routes/(main)/agent/profile/features/ProfileEditor/HeterogeneousAgentStatusCard.test.tsx b/src/routes/(main)/agent/profile/features/ProfileEditor/HeterogeneousAgentStatusCard.test.tsxindex ecf6c21fbdc..19704539bbf 100644--- a/src/routes/(main)/agent/profile/features/ProfileEditor/HeterogeneousAgentStatusCard.test.tsx+++ b/src/routes/(main)/agent/profile/features/ProfileEditor/HeterogeneousAgentStatusCard.test.tsx@@ -539,7 +539,7 @@ describe('HeterogeneousAgentStatusCard', () => {expect(screen.getByText('claude-alt')).toBeInTheDocument();});- it('persists command edits on blur', async () => {+ it('reports the edited command through onCommandChange on blur', async () => {detectHeterogeneousAgentCommand.mockResolvedValue({ available: true });getClaudeAuthStatus.mockResolvedValue(null);const onCommandChange = vi.fn();diff --git a/src/store/chat/agents/transports/ClientSubAgentTransport.test.ts b/src/store/chat/agents/transports/ClientSubAgentTransport.test.tsindex 5ba34ab6fea..f355fa98414 100644--- a/src/store/chat/agents/transports/ClientSubAgentTransport.test.ts+++ b/src/store/chat/agents/transports/ClientSubAgentTransport.test.ts@@ -221,7 +221,7 @@ describe('ClientSubAgentTransport', () => {});});- it('stands by on a relay channel while the child runs, so its device-only LLM calls reach this tab', async () => {+ it('keeps the scoped relay channel open while polling and releases it on completion', async () => {const { store } = createStore();const llmExecutor = {capabilities: ['llm_relay@1'],diff --git a/src/store/chat/slices/agentRun/actions/dispatch/directMentionExecutor.test.ts b/src/store/chat/slices/agentRun/actions/dispatch/directMentionExecutor.test.tsindex 89dc6ecf598..b84581d5c9b 100644--- a/src/store/chat/slices/agentRun/actions/dispatch/directMentionExecutor.test.ts+++ b/src/store/chat/slices/agentRun/actions/dispatch/directMentionExecutor.test.ts@@ -72,7 +72,7 @@ describe('executeDirectMention', () => {expect(store.refreshMessages).toHaveBeenCalledWith({ agentId: 'agt_xw', topicId: 'tpc_1' });});- it('shows the running thread at once and streams the child while it runs', async () => {+ it('shows the running thread and watches the child until execution finishes', async () => {const { ClientSubAgentTransport } =await import('@/store/chat/agents/transports/ClientSubAgentTransport');const stopWatching = vi.fn();