feat: show runtime checklists and support remote Continue

Display native OpenCode and Continue checklists alongside scheduled tasks, preserving request ownership, explicit clears and saved progress. Bundle both remote runtimes and support managed Continue installation, model routing, cancellation and restart continuation.

Validation: real local and Linux remote model checks, full Electron remote Continue flows, typecheck and lint passed. Full suite: 4707 passed, 67 skipped, one OpenCode compaction failure passed targeted rerun.

Release note: Display native execution checklists above conversations and support managed remote Continue projects with saved progress and cancellation recovery.
This commit is contained in:
mesalogo
2026-09-19 10:47:27 +08:00
parent 164e89253a
commit c7a93803c9
78 changed files with 2266 additions and 238 deletions
+40
View File
@@ -288,6 +288,45 @@ async function collectRun(
}
describe("OpenCodeRuntime embedded launcher", () => {
it('attributes todos to the current parent message and running call in reused sessions', async () => {
const setup = runClient([]);
let previousMessage = 'old-message';
const items = [{ content: 'task', status: 'pending', priority: 'low' }];
vi.mocked(setup.event.subscribe).mockImplementation(async () => ({
stream: (async function* () {
const current = vi.mocked(setup.session.promptAsync).mock.calls.at(-1)![0]!.messageID!;
const update = (parentID: string) => ({ type: 'message.updated', properties: { sessionID: 'session-1', info: { id: parentID + '-assistant', sessionID: 'session-1', role: 'assistant', parentID, time: { created: Date.now() } } } });
const tool = (parentID: string, todos: unknown[], status = 'running', callID = 'call') => ({ type: 'message.part.updated', properties: { sessionID: 'session-1', part: { id: 'part', callID, sessionID: 'session-1', messageID: parentID + '-assistant', type: 'tool', tool: 'todowrite', state: { status, input: { todos } } } } });
const todo = (sessionID: string, todos: unknown[]) => ({ type: 'todo.updated', properties: { sessionID, todos } });
yield update(previousMessage);
yield tool(previousMessage, items);
yield todo('session-1', items);
yield update(current);
yield tool(current, [], 'pending');
yield todo('session-1', items);
yield tool(current, items);
yield todo('child-session', items);
yield todo('session-1', [{ content: 'late old task', status: 'pending' }]);
yield todo('session-1', items);
yield completedToolEvent('call', 'todowrite');
yield tool(current, [], 'running', 'clear');
yield todo('session-1', []);
yield completedToolEvent('clear', 'todowrite');
previousMessage = current;
yield { type: 'session.idle', properties: { sessionID: 'session-1' } };
})()
}) as never);
const runtime = embeddedRuntime(setup.client);
try {
for (let round = 0; round < 2; round++) {
const events = await collectRun(runtime);
expect(events.filter(event => event.type === 'checklist')).toEqual([
{ type: 'checklist', requestId: '3f496642-f47d-4e0a-8944-a32c77b0d6ef', checklist: { source: 'opencode', items } },
{ type: 'checklist', requestId: '3f496642-f47d-4e0a-8944-a32c77b0d6ef', checklist: { source: 'opencode', items: [] } }
]);
}
} finally { await runtime.dispose(); }
});
it.each(["native", "profile"] as const)(
"disables unused automatic Git snapshots with %s model configuration",
async (configuration) => {
@@ -4831,6 +4870,7 @@ describe("OpenCodeRuntime native customization", () => {
command: "review",
arguments: "--staged",
agent: "build",
messageID: expect.stringMatching(/^msg_/u),
},
expect.objectContaining({
signal: expect.any(AbortSignal),