mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-31 19:15:17 +02:00
port copilot to ts
This commit is contained in:
parent
d22af5e4ec
commit
0681fb6a29
10 changed files with 798 additions and 316 deletions
|
|
@ -14,6 +14,7 @@ import { Messages } from "./components/messages";
|
|||
import { CopyIcon, CheckIcon, PlusIcon, XIcon, InfoIcon } from "lucide-react";
|
||||
import { useCopilot } from "./use-copilot";
|
||||
import { BillingUpgradeModal } from "@/components/common/billing-upgrade-modal";
|
||||
import { WithStringId } from "@/app/lib/types/types";
|
||||
|
||||
const CopilotContext = createContext<{
|
||||
workflow: z.infer<typeof Workflow> | null;
|
||||
|
|
@ -32,7 +33,7 @@ interface AppProps {
|
|||
onCopyJson?: (data: { messages: any[] }) => void;
|
||||
onMessagesChange?: (messages: z.infer<typeof CopilotMessage>[]) => void;
|
||||
isInitialState?: boolean;
|
||||
dataSources?: z.infer<typeof DataSource>[];
|
||||
dataSources?: WithStringId<z.infer<typeof DataSource>>[];
|
||||
}
|
||||
|
||||
const App = forwardRef<{ handleCopyChat: () => void; handleUserMessage: (message: string) => void }, AppProps>(function App({
|
||||
|
|
@ -224,7 +225,7 @@ export const Copilot = forwardRef<{ handleUserMessage: (message: string) => void
|
|||
chatContext?: z.infer<typeof CopilotChatContext>;
|
||||
dispatch: (action: WorkflowDispatch) => void;
|
||||
isInitialState?: boolean;
|
||||
dataSources?: z.infer<typeof DataSource>[];
|
||||
dataSources?: WithStringId<z.infer<typeof DataSource>>[];
|
||||
}>(({
|
||||
projectId,
|
||||
workflow,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue