initial ai assistance

This commit is contained in:
mats committed 2026-11-01 10:27:56 +01:00
1 parent 1af9ec3172
commit 2e0bf1e88e
24 files changed
+1293 -60

No files matched your search

+3 -3
View File
@@ -100,9 +100,9 @@ export function createMockCms(opts: MockOptions = {}) {
return json(200, { ...res, patches })
}
if (path === '/api/publish-roots' && m === 'POST') {
const body = (await req.json()) as { roots: string[] }
published.push(...body.roots)
return json(200, { published: body.roots })
const body = (await req.json()) as { ids: string[] }
published.push(...body.ids)
return json(200, { publishedAt: new Date().toISOString(), results: body.ids.map((id) => ({ id })) })
}
if (path === '/api/preview' && !previewApi) return json(404, { error: 'no such route' })
if (path === '/api/preview' || (m === 'GET' && req.headers.get('accept')?.includes('text/html'))) {