feat: add live Codex research chat and reusable deck sources

This commit is contained in:
2026-09-24 17:55:51 +09:00
parent c47f58f065
commit b2db67ea1c
28 changed files with 4450 additions and 15 deletions
+22
View File
@@ -0,0 +1,22 @@
import { createServerFn } from '@tanstack/react-start'
import { z } from 'zod'
import { startResearchInput } from './model'
export const loadResearchStatus = createServerFn({ method: 'GET' }).handler(
async () => {
const { researchService } = await import('./runner.server')
return researchService().status()
},
)
export const startResearch = createServerFn({ method: 'POST' })
.validator(startResearchInput)
.handler(async ({ data }) => {
const { researchService } = await import('./runner.server')
return researchService().start(data)
})
export const cancelResearch = createServerFn({ method: 'POST' })
.validator(z.object({ id: z.string().uuid() }).strict())
.handler(async ({ data }) => {
const { researchService } = await import('./runner.server')
return researchService().cancel(data.id)
})