chore(integration): snapshot local main worktree

This commit is contained in:
inman
2026-08-31 10:23:21 +08:00
parent 48a9189939
commit 33fb31fb28
116 changed files with 8108 additions and 3026 deletions

View File

@@ -7,7 +7,7 @@ import type { PiRpcCommand } from '../../electron/coding-runtime/pi/rpc-client';
import type { PiGenerationResourceInput } from '../../electron/coding-runtime/pi/worker-pool';
describe('Pi interaction store', () => {
it('responds by exact id and option, then rejects stale generation responses', async () => {
it('responds by exact option or custom text, then rejects stale generation responses', async () => {
const sent: PiRpcCommand[] = [];
const changes: ConversationInteraction[] = [];
const resources = new Map<string, () => void>();
@@ -42,6 +42,18 @@ describe('Pi interaction store', () => {
interactionId: 'question-1', optionId: 'question-1:option:0',
})).rejects.toThrow('not pending');
store.open('conversation-a', 1, 'run-1', {
type: 'extension_ui_request', id: 'question-custom', method: 'select', title: 'Choose',
options: ['Alpha', 'Beta'],
});
await store.respond('conversation-a', {
interactionId: 'question-custom', value: ' Something else ',
});
expect(sent.at(-1)).toEqual({
type: 'extension_ui_response', id: 'question-custom', value: 'Something else',
});
expect(changes.at(-1)?.status).toBe('answered');
store.open('conversation-a', 1, 'run-1', {
type: 'extension_ui_request', id: 'question-2', method: 'confirm', title: 'Continue?', message: 'Proceed',
});