"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateAiRoute = generateAiRoute;
function generateAiRoute() {
    return /* ts */ `
import { z } from 'zod'

import { zAskStepInput, zAskTaskInput } from '@types'

import { authMiddleware } from '@router-trpc/middleware'
import { procedure, router } from '@router-trpc/trpc-shared'

export const ai = router({
  ask: procedure
    .use(authMiddleware)
    .input(zAskTaskInput)
    .mutation(async ({ input, ctx }) => ctx.aiAgent.startExecution(input, ctx.viewer.user.id)),
  step: procedure
    .use(authMiddleware)
    .input(zAskStepInput)
    .mutation(async ({ input, ctx }) => ctx.aiAgent.continueExecution(input, ctx.viewer.user.id)),
  cancel: procedure
    .use(authMiddleware)
    .input(z.object({ conversation: z.string() }))
    .mutation(({ input, ctx }) => ctx.aiAgent.cancelExecution(input.conversation, ctx.viewer.user.id)),
})
`;
}
//# sourceMappingURL=ai-route.generator.js.map