Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

_chat.workflows.tsx

15 lines804 Bytes

1import { createFileRoute } from "@tanstack/react-router";
2​
3import { readWorkflowPane } from "../components/workflows/workflowPane.logic";
4import { WorkflowsPage, type WorkflowsSearch } from "../components/workflows/WorkflowsPage";
5​
6export const Route = createFileRoute("/_chat/workflows")({
7 validateSearch: (raw: Record<string, unknown>): WorkflowsSearch => ({
8 ...(typeof raw.env === "string" && raw.env ? { env: raw.env.slice(0, 200) } : {}),
9 ...(typeof raw.run === "string" && raw.run ? { run: raw.run.slice(0, 200) } : {}),
10 ...readWorkflowPane(raw.pane, raw.tab),
11 ...(raw.definitions === true || raw.definitions === "true" ? { definitions: true } : {}),
12 ...(typeof raw.file === "string" && raw.file ? { file: raw.file.slice(0, 200) } : {}),
13 }),
14 component: WorkflowsPage,
15});