Ship Paseo-equivalent provider snapshot, AgentComposerBar, ACP dispatch rewrite with streaming/persist, permission prompts, and agent commands. Follow-up: pane-scoped chat resolution, CoderMessageList tool timeline, WS user-delta replace, and inference orphan tool_call stripping. Archive openspec v2-2; update CHANGELOG and CURRENT. Co-authored-by: Cursor <cursoragent@cursor.com>
18 lines
734 B
TypeScript
18 lines
734 B
TypeScript
import type { FastifyInstance } from 'fastify';
|
|
import type { Sql } from '../db.js';
|
|
import type { Config } from '../config.js';
|
|
import { getProviderSnapshot, clearProviderSnapshotCache } from '../services/provider-snapshot.js';
|
|
|
|
export function registerProviderRoutes(app: FastifyInstance, sql: Sql, config: Config): void {
|
|
app.get<{ Querystring: { cwd?: string } }>('/api/providers/snapshot', async (req, _reply) => {
|
|
const cwd = req.query.cwd;
|
|
return getProviderSnapshot(sql, config, cwd);
|
|
});
|
|
|
|
app.post('/api/providers/refresh', async (_req, _reply) => {
|
|
clearProviderSnapshotCache();
|
|
const entries = await getProviderSnapshot(sql, config, undefined, true);
|
|
return { refreshed: entries.length };
|
|
});
|
|
}
|