Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 3x 7x 7x 7x | import { useResourceId } from "@/components/detail";
import ModelChatView from "@/components/chat/ModelChat/ModelChatView";
import React from "react";
import { useSearchParams } from "react-router-dom";
/**
* The model chat page: the model named by the route, and the turn a
* `?conversation=<id>&message=<id>` deep link points at — the same link the
* agent chat takes, so Activity can point at a direct model prompt the way
* it points at an agent turn. The chat itself is `ModelChatView`, which the
* chat dock draws too.
*/
const ChatBot: React.FC = () => {
const modelId = useResourceId("modelId");
const [searchParams] = useSearchParams();
return (
<ModelChatView
modelId={modelId}
linkedConversationId={searchParams.get("conversation")}
linkedMessageId={searchParams.get("message")}
/>
);
};
export default ChatBot;
|