mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-18 22:14:27 +00:00
🧭 fix: Close the Product Races Behind Four Retried Run Scenarios (#18060)
* 🪪 fix: Apply a Builder Agent Selection Before the Agents Catalog Loads The agent builder's Select button starts a chat with the agent its form holds. `useSelectAgent` first looked that agent up in the agents map and returned silently when it was missing. Since #17692 the map is a deferred catalog, released on browser idle (at most about 2.75 s after first paint on a busy main thread), so a click that landed earlier did nothing and the next message went to whatever model was selected before. An unloaded map now reads as unknown instead of as a missing agent: the builder already loaded the agent it offers, so only a loaded map can refuse the pick. Selecting also releases the agents catalog, which the header and composer need to name the agent. This is what made `tool-approvals.spec.ts` and `run-files-lifecycle.spec.ts` pass only on a retry: in every recorded failure the builder click preceded the agents map request and the message was sent to the default model spec. * 📡 test: Read the Subagent Activity Stream Without Depending on How It Closes The shared-panel scenario waited for the activity stream's `requestfinished` event and then read the response body. Both need the server to close the stream first. The panel also closes it: it stops listening as soon as the durable thread reports the task terminal, and the server persists that status before it writes the stream's final frame. When a thread poll landed in between, the browser reported the request as aborted, `requestfinished` never fired and the body was no longer readable. The scenario now counts the stream as ended on either event and reads what the stream delivered from the page's own request, so it asserts the same live updates whichever side closes first. * 🚏 fix: Send a Queued Message Started in a New Chat After the Source Run Releases the Composer "Start in a new chat" on a queued message navigates to `/c/new?prompt=…&submit=true` while the source conversation is still generating. The URL auto-submit could fire in the few tens of milliseconds between the composer dropping that run and the next commit: `ask` still saw the composer as submitting and refused, and the auto-submit, which is spent on its first attempt, cleared the URL with nothing sent. The row had already left the queue, so the message was gone from the page. A new chat has no run of its own, so the auto-submit now waits there until an effect has observed the composer idle, then sends. Existing conversations keep the current behaviour: a prompt arriving during their own run stays in the composer.
This commit is contained in:
parent
c464ccbac0
commit
fb3d77d52a
6 changed files with 242 additions and 18 deletions
|
|
@ -53,12 +53,15 @@ function Harness({
|
|||
routePending = false,
|
||||
targetReady = true,
|
||||
onAsk = ask,
|
||||
refusesWhileSubmitting = false,
|
||||
speechSettingsInitialized = false,
|
||||
}: {
|
||||
conversation: TConversation;
|
||||
routePending?: boolean;
|
||||
targetReady?: boolean;
|
||||
onAsk?: typeof ask;
|
||||
/** Mirrors the real `ask`, which reads `isSubmitting` from the render it was created in. */
|
||||
refusesWhileSubmitting?: boolean;
|
||||
speechSettingsInitialized?: boolean;
|
||||
}) {
|
||||
const [files, setFiles] = useAtom(filesFamily(0));
|
||||
|
|
@ -89,7 +92,7 @@ function Harness({
|
|||
getMappingOptions: () => ({}),
|
||||
feedbackEnabled: false,
|
||||
setMessages: () => undefined,
|
||||
ask: onAsk,
|
||||
ask: refusesWhileSubmitting && isSubmitting ? () => false : onAsk,
|
||||
regenerate: () => undefined,
|
||||
setSiblingIdx: () => undefined,
|
||||
abortScroll: false,
|
||||
|
|
@ -101,7 +104,7 @@ function Harness({
|
|||
handleRegenerate: () => undefined,
|
||||
handleContinue: () => undefined,
|
||||
}),
|
||||
[conversation, files, setFiles, isSubmitting, onAsk],
|
||||
[conversation, files, setFiles, isSubmitting, onAsk, refusesWhileSubmitting],
|
||||
);
|
||||
return (
|
||||
<ChatFormProvider {...methods}>
|
||||
|
|
@ -224,7 +227,12 @@ function mountComposer(
|
|||
wrapper,
|
||||
},
|
||||
);
|
||||
return { ...view, navigate: (to: string) => navigate(to), getLocation: () => location };
|
||||
return {
|
||||
...view,
|
||||
navigate: (to: string) => navigate(to),
|
||||
getLocation: () => location,
|
||||
setSubmitting: (value: boolean) => jotaiStore.set(isSubmittingFamily(0), value),
|
||||
};
|
||||
}
|
||||
|
||||
afterEach(() => {
|
||||
|
|
@ -315,6 +323,32 @@ describe('ChatForm URL submission', () => {
|
|||
expect(ask).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('sends a queued prompt in a new chat only once the source run has released the composer', async () => {
|
||||
const source = { ...initialConversation, conversationId: 'source-chat' };
|
||||
const view = mountComposer(source, { query: '', liveRun: true });
|
||||
await act(async () => jest.advanceTimersByTime(100));
|
||||
const destinationAsk = jest.fn();
|
||||
const destination = (
|
||||
<Harness conversation={initialConversation} onAsk={destinationAsk} refusesWhileSubmitting />
|
||||
);
|
||||
await act(async () => {
|
||||
view.navigate('/c/new?prompt=queued+words&submit=true');
|
||||
view.rerender(destination);
|
||||
});
|
||||
await act(async () => jest.advanceTimersByTime(100));
|
||||
expect(destinationAsk).not.toHaveBeenCalled();
|
||||
expect(view.getLocation().search).toBe('?prompt=queued+words&submit=true');
|
||||
expect(screen.getByTestId('text-input')).toHaveValue('queued words');
|
||||
|
||||
await act(async () => view.setSubmitting(false));
|
||||
expect(destinationAsk).toHaveBeenCalledTimes(1);
|
||||
expect(destinationAsk).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ text: 'queued words' }),
|
||||
expect.anything(),
|
||||
);
|
||||
expect(view.getLocation().search).toBe('');
|
||||
});
|
||||
|
||||
it('processes a new agent URL once after a previous URL request has completed', async () => {
|
||||
const view = mountComposer(initialConversation, { query: 'q=first&submit=true' });
|
||||
await act(async () => jest.advanceTimersByTime(100));
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
import { renderHook, act } from '@testing-library/react';
|
||||
import { EModelEndpoint } from 'librechat-data-provider';
|
||||
import type { TConversation } from 'librechat-data-provider';
|
||||
import type { Agent, TAgentsMap, TConversation } from 'librechat-data-provider';
|
||||
|
||||
const mockNewConversation = jest.fn();
|
||||
const mockFetchQuery = jest.fn();
|
||||
const mockGetConversation = jest.fn();
|
||||
const mockGetDefaultConversation = jest.fn();
|
||||
const listedAgent = { id: 'agent-1', name: 'Agent' } as Agent;
|
||||
const loadedAgentsMap: TAgentsMap = { [listedAgent.id]: listedAgent };
|
||||
let mockAgentsMap: TAgentsMap | undefined = loadedAgentsMap;
|
||||
|
||||
jest.mock('@tanstack/react-query', () => ({
|
||||
useQueryClient: jest.fn(() => ({ fetchQuery: mockFetchQuery })),
|
||||
|
|
@ -27,7 +30,7 @@ jest.mock('~/hooks/Conversations/useDefaultConvo', () => ({
|
|||
}));
|
||||
|
||||
jest.mock('~/Providers/AgentsMapContext', () => ({
|
||||
useAgentsMapContext: jest.fn(() => ({ 'agent-1': { id: 'agent-1', name: 'Agent' } })),
|
||||
useAgentsMapContext: jest.fn(() => mockAgentsMap),
|
||||
}));
|
||||
|
||||
jest.mock('~/utils', () => ({
|
||||
|
|
@ -40,11 +43,14 @@ jest.mock('~/utils', () => ({
|
|||
},
|
||||
}));
|
||||
|
||||
import { resetCatalogWarmup, useCatalogReady } from '~/hooks/useCatalogWarmup';
|
||||
import useSelectAgent from '../useSelectAgent';
|
||||
|
||||
describe('useSelectAgent', () => {
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks();
|
||||
resetCatalogWarmup();
|
||||
mockAgentsMap = loadedAgentsMap;
|
||||
mockGetConversation.mockResolvedValue({ endpoint: EModelEndpoint.agents } as TConversation);
|
||||
mockGetDefaultConversation.mockImplementation(
|
||||
({
|
||||
|
|
@ -168,4 +174,40 @@ describe('useSelectAgent', () => {
|
|||
expect(mockNewConversation.mock.calls[0][0].template.codeWorkspaces).toBeUndefined();
|
||||
expect(mockFetchQuery).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
describe('agents catalog readiness', () => {
|
||||
const renderSelection = () =>
|
||||
renderHook(() => ({
|
||||
selection: useSelectAgent(),
|
||||
catalogReady: useCatalogReady('agents'),
|
||||
}));
|
||||
|
||||
it('selects an agent before the deferred catalog has loaded, and releases the catalog', async () => {
|
||||
mockAgentsMap = undefined;
|
||||
const { result } = renderSelection();
|
||||
expect(result.current.catalogReady).toBe(false);
|
||||
|
||||
await act(async () => {
|
||||
await result.current.selection.onSelect('agent-new');
|
||||
});
|
||||
|
||||
expect(mockNewConversation).toHaveBeenCalledTimes(1);
|
||||
expect(mockNewConversation.mock.calls[0][0].template).toMatchObject({
|
||||
endpoint: EModelEndpoint.agents,
|
||||
agent_id: 'agent-new',
|
||||
});
|
||||
expect(result.current.catalogReady).toBe(true);
|
||||
});
|
||||
|
||||
it('refuses an agent that a loaded catalog does not list', async () => {
|
||||
const { result } = renderSelection();
|
||||
|
||||
await act(async () => {
|
||||
await result.current.selection.onSelect('agent-missing');
|
||||
});
|
||||
|
||||
expect(mockNewConversation).not.toHaveBeenCalled();
|
||||
expect(result.current.catalogReady).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import type { TConversation, TPreset, Agent } from 'librechat-data-provider';
|
|||
import useGetConversation from '~/hooks/Conversations/useGetConversation';
|
||||
import useDefaultConvo from '~/hooks/Conversations/useDefaultConvo';
|
||||
import { useAgentsMapContext } from '~/Providers/AgentsMapContext';
|
||||
import { activateCatalog } from '~/hooks/useCatalogWarmup';
|
||||
import { logger, specDisplayFieldReset } from '~/utils';
|
||||
import useNewConvo from '~/hooks/useNewConvo';
|
||||
|
||||
|
|
@ -48,23 +49,27 @@ export default function useSelectAgent() {
|
|||
[getConversation, getDefaultConversation, newConversation],
|
||||
);
|
||||
|
||||
/**
|
||||
* The agents map is a deferred catalog, so `undefined` means it has not loaded, not that the
|
||||
* agent is gone. The caller already holds the agent it offers; only a loaded map may refuse it.
|
||||
*/
|
||||
const onSelect = useCallback(
|
||||
async (value: string) => {
|
||||
const agent = agentsMap?.[value];
|
||||
if (!agent) {
|
||||
if (agentsMap != null && agentsMap[value] == null) {
|
||||
return;
|
||||
}
|
||||
activateCatalog('agents');
|
||||
|
||||
const template: Partial<TPreset | TConversation> = {
|
||||
endpoint: EModelEndpoint.agents,
|
||||
agent_id: agent.id,
|
||||
agent_id: value,
|
||||
conversationId: Constants.NEW_CONVO as string,
|
||||
codeEnvironmentMode: undefined,
|
||||
codeWorkspaces: undefined,
|
||||
...specDisplayFieldReset,
|
||||
};
|
||||
|
||||
await updateConversation({ id: agent.id }, template);
|
||||
await updateConversation({ id: value }, template);
|
||||
},
|
||||
[agentsMap, updateConversation],
|
||||
);
|
||||
|
|
|
|||
|
|
@ -137,7 +137,17 @@ export default function useQueryParams({
|
|||
submitMessageRef.current = submitMessage;
|
||||
|
||||
const queryClient = useQueryClient();
|
||||
const { conversation, newConversation, index = 0 } = useChatContext();
|
||||
const { conversation, newConversation, isSubmitting, index = 0 } = useChatContext();
|
||||
/**
|
||||
* A new chat has no run of its own, so a busy composer there is still releasing the run of the
|
||||
* conversation it just left (a queued message started in a new chat navigates mid-run). `ask`
|
||||
* refuses until a commit without that run has flushed its effects, so the auto-submit waits for
|
||||
* an effect of this hook to observe one instead of spending its only attempt on that refusal.
|
||||
*/
|
||||
const composerReleasedRef = useRef(!isSubmitting);
|
||||
if (isSubmitting) {
|
||||
composerReleasedRef.current = false;
|
||||
}
|
||||
|
||||
const urlAgentId = searchParams.get('agent_id') || '';
|
||||
const { data: urlAgent } = useGetAgentByIdQuery(urlAgentId);
|
||||
|
|
@ -166,6 +176,14 @@ export default function useQueryParams({
|
|||
setSearchParamsRef.current(params, { replace: true });
|
||||
}, [index, getPreservedSearchParams]);
|
||||
|
||||
const awaitsComposerRelease = useCallback(() => {
|
||||
const conversationId = conversationRef.current?.conversationId;
|
||||
return (
|
||||
!composerReleasedRef.current &&
|
||||
(conversationId == null || conversationId === Constants.NEW_CONVO)
|
||||
);
|
||||
}, []);
|
||||
|
||||
const ownsComposer = useCallback(() => {
|
||||
const currentId = conversationRef.current?.conversationId;
|
||||
const current = routeRef.current;
|
||||
|
|
@ -465,6 +483,7 @@ export default function useQueryParams({
|
|||
if (
|
||||
routePendingRef.current ||
|
||||
!targetReadyRef.current ||
|
||||
awaitsComposerRelease() ||
|
||||
submissionHandledRef.current ||
|
||||
!pendingSubmitRef.current ||
|
||||
!promptTextRef.current ||
|
||||
|
|
@ -531,6 +550,7 @@ export default function useQueryParams({
|
|||
ownsRequest,
|
||||
isHistoryPending,
|
||||
areSettingsApplied,
|
||||
awaitsComposerRelease,
|
||||
clearConsumedSearchParams,
|
||||
restoreUrlPrompt,
|
||||
settlePrompt,
|
||||
|
|
@ -714,6 +734,13 @@ export default function useQueryParams({
|
|||
cancelRequest,
|
||||
]);
|
||||
|
||||
/** Declared ahead of the retry below, so that effect already sees the release it reacts to. */
|
||||
useEffect(() => {
|
||||
if (!isSubmitting) {
|
||||
composerReleasedRef.current = true;
|
||||
}
|
||||
}, [isSubmitting]);
|
||||
|
||||
useEffect(() => {
|
||||
if (routePending || !targetReady) {
|
||||
if (settingsTimeoutRef.current) clearTimeout(settingsTimeoutRef.current);
|
||||
|
|
@ -742,6 +769,7 @@ export default function useQueryParams({
|
|||
conversation,
|
||||
routePending,
|
||||
targetReady,
|
||||
isSubmitting,
|
||||
processSubmission,
|
||||
armSettingsTimeout,
|
||||
areSettingsApplied,
|
||||
|
|
|
|||
75
e2e/specs/mock/scenarios/builder-select-cold-catalog.spec.ts
Normal file
75
e2e/specs/mock/scenarios/builder-select-cold-catalog.spec.ts
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
import { expect, test } from '@playwright/test';
|
||||
import type { Request } from '@playwright/test';
|
||||
import type { AgentDetail } from '../agents.helpers';
|
||||
import { cleanupAgent, openAgentBuilder, uniqueAgentName } from '../agents.helpers';
|
||||
import {
|
||||
MOCK_ENDPOINTS,
|
||||
NEW_CHAT_PATH,
|
||||
getAccessToken,
|
||||
replyPrompt,
|
||||
requestJson,
|
||||
} from '../helpers';
|
||||
|
||||
type ChatStart = { endpoint?: string; agent_id?: string };
|
||||
|
||||
const isChatStart = (request: Request) =>
|
||||
request.method() === 'POST' &&
|
||||
/^\/api\/agents\/chat\/(?!abort$|resume$)[^/]+$/.test(new URL(request.url()).pathname);
|
||||
|
||||
const isAgentsMapRequest = (request: Request) => {
|
||||
const url = new URL(request.url());
|
||||
return url.pathname === '/api/agents' && url.searchParams.get('requiredPermission') === '1';
|
||||
};
|
||||
|
||||
test.describe('builder select on a cold agents catalog', () => {
|
||||
test('Select starts a chat with the agent before the agents catalog has warmed @scenario:builder-select-applies-before-agents-catalog-warms', async ({
|
||||
page,
|
||||
}) => {
|
||||
test.setTimeout(60000);
|
||||
let agentId: string | undefined;
|
||||
|
||||
try {
|
||||
await page.goto(NEW_CHAT_PATH, { timeout: 10000 });
|
||||
const token = await getAccessToken(page);
|
||||
const agent = await requestJson<AgentDetail>(page, {
|
||||
path: '/api/agents',
|
||||
token,
|
||||
method: 'POST',
|
||||
body: {
|
||||
name: uniqueAgentName('E2E Cold Catalog Agent'),
|
||||
instructions: 'Reply to the deterministic end-to-end request.',
|
||||
provider: MOCK_ENDPOINTS[0].label,
|
||||
model: MOCK_ENDPOINTS[0].model,
|
||||
},
|
||||
});
|
||||
agentId = agent.id;
|
||||
|
||||
/** Catalog warmup waits for an idle main thread. Never granting one holds the agents map
|
||||
* back for the whole test, the state a busy first load leaves a quick user in. */
|
||||
await page.addInitScript(() => {
|
||||
window.requestIdleCallback = () => 0;
|
||||
});
|
||||
let agentsMapRequested = false;
|
||||
page.on('request', (request) => {
|
||||
agentsMapRequested ||= isAgentsMapRequest(request);
|
||||
});
|
||||
|
||||
const form = await openAgentBuilder(page);
|
||||
await form.getByRole('combobox', { name: 'Agent', exact: true }).click();
|
||||
await page.getByRole('option', { name: agent.name! }).click();
|
||||
await expect(form.getByLabel('Agent name')).toHaveValue(agent.name!);
|
||||
expect(agentsMapRequested, 'the agents catalog must still be cold').toBe(false);
|
||||
await form.getByRole('button', { name: 'Select Agent' }).click();
|
||||
|
||||
const input = page.getByRole('textbox', { name: 'Message input' });
|
||||
await expect(input).toHaveAttribute('placeholder', `Message ${agent.name}`);
|
||||
await input.fill(replyPrompt(`cold-catalog-${Date.now()}`));
|
||||
const [start] = await Promise.all([page.waitForRequest(isChatStart), input.press('Enter')]);
|
||||
|
||||
expect(new URL(start.url()).pathname).toBe('/api/agents/chat/agents');
|
||||
expect((start.postDataJSON() as ChatStart).agent_id).toBe(agent.id);
|
||||
} finally {
|
||||
await cleanupAgent(page, agentId);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { rm } from 'node:fs/promises';
|
||||
import { expect, test } from '@playwright/test';
|
||||
import type { ParentSubagentIndex, SubagentThreadView, TMessage } from 'librechat-data-provider';
|
||||
import type { BrowserContext, Locator, Page } from '@playwright/test';
|
||||
import type { BrowserContext, Locator, Page, Request } from '@playwright/test';
|
||||
import type { AgentDetail } from './agents.helpers';
|
||||
import {
|
||||
MOCK_ENDPOINTS,
|
||||
|
|
@ -56,6 +56,40 @@ const childActivityPanel = (page: Page) =>
|
|||
.getByRole('region', { name: 'Child agent activity' })
|
||||
.or(page.getByRole('dialog', { name: 'Child agent activity' }));
|
||||
|
||||
/**
|
||||
* Records what the panel's activity stream delivers, read from the page's own request.
|
||||
*
|
||||
* Playwright exposes a response body only once the request finishes, and the panel may abort this
|
||||
* stream first: it stops listening as soon as the durable thread reports the task terminal, which
|
||||
* the server persists before it writes the stream's final frame. The longest text wins because the
|
||||
* abort empties `responseText` before this listener, registered after the transport's, runs.
|
||||
*/
|
||||
async function recordActivityStreams(page: Page): Promise<() => Promise<string[]>> {
|
||||
await page.addInitScript((activityPath) => {
|
||||
const streams: string[] = [];
|
||||
Object.assign(window, { e2eActivityStreams: streams });
|
||||
const open = XMLHttpRequest.prototype.open;
|
||||
XMLHttpRequest.prototype.open = function (
|
||||
this: XMLHttpRequest,
|
||||
...args: Parameters<XMLHttpRequest['open']>
|
||||
) {
|
||||
if (new RegExp(activityPath).test(new URL(String(args[1]), window.location.href).pathname)) {
|
||||
const index = streams.push('') - 1;
|
||||
this.addEventListener('progress', () => {
|
||||
if (this.responseText.length > streams[index].length) {
|
||||
streams[index] = this.responseText;
|
||||
}
|
||||
});
|
||||
}
|
||||
return open.apply(this, args);
|
||||
} as XMLHttpRequest['open'];
|
||||
}, ACTIVITY_PATH.source);
|
||||
return () =>
|
||||
page.evaluate(
|
||||
() => (window as Window & { e2eActivityStreams?: string[] }).e2eActivityStreams ?? [],
|
||||
);
|
||||
}
|
||||
|
||||
async function selectAgent(page: Page, name: string): Promise<void> {
|
||||
const form = await openAgentBuilder(page);
|
||||
await form.getByRole('combobox', { name: 'Agent', exact: true }).click();
|
||||
|
|
@ -78,19 +112,24 @@ test.describe('detached subagent activity', () => {
|
|||
const parentName = uniqueAgentName('E2E Activity Parent');
|
||||
const createdAgentIds: string[] = [];
|
||||
const activityRequests: string[] = [];
|
||||
const finishedActivityRequests: string[] = [];
|
||||
const endedActivityRequests: string[] = [];
|
||||
page.on('request', (request) => {
|
||||
const url = new URL(request.url());
|
||||
if (ACTIVITY_PATH.test(url.pathname)) {
|
||||
activityRequests.push(url.pathname);
|
||||
}
|
||||
});
|
||||
page.on('requestfinished', (request) => {
|
||||
/** The stream ends either way once the child is terminal: the server closes it after the final
|
||||
* frame, or the panel aborts it on the durable terminal status, whichever arrives first. */
|
||||
const recordEndedActivity = (request: Request) => {
|
||||
const url = new URL(request.url());
|
||||
if (ACTIVITY_PATH.test(url.pathname)) {
|
||||
finishedActivityRequests.push(url.pathname);
|
||||
endedActivityRequests.push(url.pathname);
|
||||
}
|
||||
});
|
||||
};
|
||||
page.on('requestfinished', recordEndedActivity);
|
||||
page.on('requestfailed', recordEndedActivity);
|
||||
const activityStreams = await recordActivityStreams(page);
|
||||
|
||||
try {
|
||||
await page.goto('/c/new');
|
||||
|
|
@ -126,7 +165,7 @@ test.describe('detached subagent activity', () => {
|
|||
await cards.first().click();
|
||||
|
||||
const panel = childActivityPanel(page);
|
||||
const activityResponse = await activityResponsePromise;
|
||||
await activityResponsePromise;
|
||||
await expect(panel).toBeVisible();
|
||||
await expect(panel).toContainText('child-1-phase-10');
|
||||
await expect(panel.getByText('Running', { exact: true })).toHaveCount(0);
|
||||
|
|
@ -136,8 +175,9 @@ test.describe('detached subagent activity', () => {
|
|||
timeout: 30_000,
|
||||
});
|
||||
await expect(panel.getByText('Completed', { exact: true })).toHaveCount(0);
|
||||
await expect.poll(() => finishedActivityRequests.length).toBe(1);
|
||||
const activityStreamBody = await activityResponse.text();
|
||||
await expect.poll(() => endedActivityRequests.length).toBe(1);
|
||||
const [activityStreamBody, ...otherStreams] = await activityStreams();
|
||||
expect(otherStreams).toHaveLength(0);
|
||||
expect(activityStreamBody).toContain('"event":"on_subagent_update"');
|
||||
expect(activityStreamBody).toContain('"phase":"message_delta"');
|
||||
await page.waitForTimeout(ACTIVITY_RECONNECT_GUARD_MS);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue