diff --git a/.env.example b/.env.example index ea3bd5e..379a211 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ -VERSION=0.1.14 +VERSION=0.1.15 # Nest run in docker, change host to database container name DB_HOST=localhost diff --git a/apps/init/trigger.dump b/apps/init/trigger.dump index 46f069f..0f72396 100644 Binary files a/apps/init/trigger.dump and b/apps/init/trigger.dump differ diff --git a/apps/webapp/app/components/conversation/use-trigger-stream.tsx b/apps/webapp/app/components/conversation/use-trigger-stream.tsx index 1c41d4c..aa014bb 100644 --- a/apps/webapp/app/components/conversation/use-trigger-stream.tsx +++ b/apps/webapp/app/components/conversation/use-trigger-stream.tsx @@ -6,9 +6,13 @@ export const useTriggerStream = ( token: string, apiURL?: string, ) => { + // Need to fix this later + const adjustedApiURL = apiURL?.includes("trigger-webapp") + ? "http://localhost:8030" + : apiURL; const { error, streams, run } = useRealtimeRunWithStreams(runId, { accessToken: token, - baseURL: apiURL ?? "https://trigger.heysol.ai", // Optional if you are using a self-hosted Trigger.dev instance + baseURL: adjustedApiURL ?? "https://trigger.heysol.ai", // Optional if you are using a self-hosted Trigger.dev instance }); const isEnd = React.useMemo(() => { diff --git a/apps/webapp/app/components/dashboard/index.ts b/apps/webapp/app/components/dashboard/index.ts deleted file mode 100644 index e3fea49..0000000 --- a/apps/webapp/app/components/dashboard/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./ingest"; -export * from "./search"; diff --git a/apps/webapp/app/components/dashboard/ingest.tsx b/apps/webapp/app/components/dashboard/ingest.tsx deleted file mode 100644 index 457fb5a..0000000 --- a/apps/webapp/app/components/dashboard/ingest.tsx +++ /dev/null @@ -1,77 +0,0 @@ -import { PlusIcon, Loader2 } from "lucide-react"; -import { Button } from "../ui"; -import { Textarea } from "../ui/textarea"; -import { useState } from "react"; -import { z } from "zod"; -import { EpisodeType } from "@core/types"; -import { useFetcher } from "@remix-run/react"; - -export const IngestBodyRequest = z.object({ - episodeBody: z.string(), - referenceTime: z.string(), - type: z.enum([EpisodeType.Conversation, EpisodeType.Text]), // Assuming these are the EpisodeType values - source: z.string(), - spaceId: z.string().optional(), - sessionId: z.string().optional(), -}); - -export const Ingest = () => { - const [text, setText] = useState(""); - const fetcher = useFetcher(); - - const handleSubmit = async (e: React.FormEvent) => { - e.preventDefault(); - - fetcher.submit( - { - episodeBody: text, - type: "TEXT", - referenceTime: new Date().toISOString(), - source: "local", - }, - { method: "POST", action: "/home/dashboard" }, - ); - - setText(""); - }; - - const isLoading = fetcher.state === "submitting"; - - return ( -
-
- - - -