(data: unknown, init?: ResponseInit)
| 5 | export const directory = `${worktree}/packages/opencode` |
| 6 | |
| 7 | export function json(data: unknown, init?: ResponseInit) { |
| 8 | return new Response(JSON.stringify(data), { |
| 9 | ...init, |
| 10 | headers: { "content-type": "application/json", ...(init?.headers ?? {}) }, |
| 11 | }) |
| 12 | } |
| 13 | |
| 14 | export function eventSource(): EventSource { |
| 15 | return { subscribe: async () => () => {} } |