fix(coding): restore sending after queued messages settle
This commit is contained in:
@@ -665,7 +665,7 @@ async function installCodingFirstChatHost(
|
||||
conversationId: conversation.id,
|
||||
clientRequestId: body?.clientRequestId,
|
||||
runId: 'run-e2e-1',
|
||||
mode: 'prompt',
|
||||
mode: body?.mode ?? 'prompt',
|
||||
},
|
||||
}, 202);
|
||||
}
|
||||
@@ -1211,6 +1211,13 @@ test('PI feature UI isolates Conversations and exposes queue, interaction, model
|
||||
const mode = page.getByRole('combobox', { name: '消息发送方式' });
|
||||
await mode.selectOption('follow-up');
|
||||
await expect(mode).toHaveValue('follow-up');
|
||||
await page.getByRole('button', { name: '发送', exact: true }).click();
|
||||
await expect.poll(async () => (await readState(electronApp)).captured.some((request) => (
|
||||
request.path.endsWith('/prompt') && request.body?.mode === 'follow-up'
|
||||
))).toBe(true);
|
||||
await expect(page.getByTestId('coding-file-attachment-input')).toBeEnabled();
|
||||
await expect(page.getByText(/条消息已被本地 Agent 接收/)).toHaveCount(0);
|
||||
await expect(page.getByTestId('coding-message-queue')).toBeVisible();
|
||||
|
||||
const composer = page.getByTestId('coding-message-composer');
|
||||
await expect(composer).not.toContainText('项目内可写');
|
||||
@@ -1224,6 +1231,15 @@ test('PI feature UI isolates Conversations and exposes queue, interaction, model
|
||||
await expect(page.getByRole('button', { name: '中止', exact: true })).toHaveCount(0);
|
||||
await expect(composer.getByRole('button', { name: '中止生成' })).toHaveCount(0);
|
||||
await expect(runtimeSettings).toBeEnabled();
|
||||
await expect(page.getByTestId('coding-message-queue')).toHaveCount(0);
|
||||
await composer.getByRole('textbox').fill('继续');
|
||||
await expect(composer.getByRole('button', { name: '发送', exact: true })).toBeEnabled();
|
||||
await composer.getByRole('textbox').press('Enter');
|
||||
await expect.poll(async () => (await readState(electronApp)).captured.some((request) => (
|
||||
request.path.endsWith('/prompt')
|
||||
&& request.body?.mode === 'prompt'
|
||||
&& request.body?.text === '继续'
|
||||
))).toBe(true);
|
||||
|
||||
const builderConversations = page.getByRole('group', { name: 'Builder 的对话' });
|
||||
await expect(builderConversations).toBeVisible();
|
||||
|
||||
Reference in New Issue
Block a user