diff --git a/package.json b/package.json index ee904dd8..c3639024 100644 --- a/package.json +++ b/package.json @@ -57,4 +57,4 @@ "tailwindcss": "^3.4.1", "typescript": "^5.3.3" } -} \ No newline at end of file +} diff --git a/src/app/(main)/project/[project_id]/chat/[chat_id]/page.tsx b/src/app/(main)/project/[project_id]/chat/[chat_id]/page.tsx index 85d31479..c4a03c67 100644 --- a/src/app/(main)/project/[project_id]/chat/[chat_id]/page.tsx +++ b/src/app/(main)/project/[project_id]/chat/[chat_id]/page.tsx @@ -181,6 +181,7 @@ export default function Chat(params: { onAudio={handleAudio} errors={[(converseMutation.error as any)?.error?.error]} loading={converseMutation.isLoading || isTyping} + projectId={project_id} />
{" "} diff --git a/src/app/(main)/project/[project_id]/page.tsx b/src/app/(main)/project/[project_id]/page.tsx index 8181d59c..55cb25b1 100644 --- a/src/app/(main)/project/[project_id]/page.tsx +++ b/src/app/(main)/project/[project_id]/page.tsx @@ -206,6 +206,7 @@ export default function Chat(params: { params: { project_id: string } }) { loading={ newChatMutation.isLoading || converseMutation.isLoading || isTyping } + projectId={project_id} />
{process.env.NEXT_PUBLIC_AI_WARNING}
diff --git a/src/app/admin/tests/[testsuite_id]/page.tsx b/src/app/admin/tests/[testsuite_id]/page.tsx
index 8faf3803..b60cb86d 100644
--- a/src/app/admin/tests/[testsuite_id]/page.tsx
+++ b/src/app/admin/tests/[testsuite_id]/page.tsx
@@ -903,8 +903,8 @@ export default function Page({ params }: { params: { testsuite_id: string } }) {
currentQuestion.question,
currentQuestion.human_answer,
currentQuestion.language,
- )
- }
+ );
+ }}
>
Save
diff --git a/src/components/chatbar.tsx b/src/components/chatbar.tsx
index 8e6342ac..443f673e 100644
--- a/src/components/chatbar.tsx
+++ b/src/components/chatbar.tsx
@@ -7,6 +7,7 @@ import { storageAtom } from "@/store";
import { useAtom } from "jotai";
import Modal from "./modal";
import { useAudioRecorder } from "./recorder";
+import { useRouter } from "next/navigation";
export default function ChatBar(props: {
chat: string;
@@ -15,8 +16,11 @@ export default function ChatBar(props: {
onAudio: (blobUrl: string) => void;
errors: string[];
loading?: boolean;
+ projectId: string;
}) {
- const { chat, onChange, onSubmit, errors, loading, onAudio } = props;
+ const { chat, onChange, onSubmit, errors, loading, onAudio, projectId } =
+ props;
+ const router = useRouter();
const [storage, setStorage] = useAtom(storageAtom);
const { status, startRecording, stopRecording } = useAudioRecorder(onAudio);
@@ -77,7 +81,10 @@ export default function ChatBar(props: {