This commit is contained in:
parent
3727af3d1c
commit
4817e75d1f
|
|
@ -3,10 +3,14 @@ import { ChatbotUIContext } from "@/context/context"
|
|||
import { IconInfoCircle, IconMessagePlus } from "@tabler/icons-react"
|
||||
import { FC, useContext } from "react"
|
||||
import { WithTooltip } from "../ui/with-tooltip"
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
interface ChatSecondaryButtonsProps {}
|
||||
|
||||
export const ChatSecondaryButtons: FC<ChatSecondaryButtonsProps> = ({}) => {
|
||||
|
||||
const { t } = useTranslation()
|
||||
|
||||
const { selectedChat } = useContext(ChatbotUIContext)
|
||||
|
||||
const { handleNewChat } = useChatHandler()
|
||||
|
|
@ -19,31 +23,31 @@ export const ChatSecondaryButtons: FC<ChatSecondaryButtonsProps> = ({}) => {
|
|||
delayDuration={200}
|
||||
display={
|
||||
<div>
|
||||
<div className="text-xl font-bold">Chat Info</div>
|
||||
<div className="text-xl font-bold">{t("chatInfo.title")}</div>
|
||||
|
||||
<div className="mx-auto mt-2 max-w-xs space-y-2 sm:max-w-sm md:max-w-md lg:max-w-lg">
|
||||
<div>Model: {selectedChat.model}</div>
|
||||
<div>Prompt: {selectedChat.prompt}</div>
|
||||
<div>{t("chatInfo.model")}: {selectedChat.model}</div>
|
||||
<div>{t("chatInfo.prompt")}: {selectedChat.prompt}</div>
|
||||
|
||||
<div>Temperature: {selectedChat.temperature}</div>
|
||||
<div>Context Length: {selectedChat.context_length}</div>
|
||||
<div>{t("chatInfo.temperature")}: {selectedChat.temperature}</div>
|
||||
<div>{t("chatInfo.contextLength")}: {selectedChat.context_length}</div>
|
||||
|
||||
<div>
|
||||
Profile Context:{" "}
|
||||
{t("chatInfo.profileContext")}:{" "}
|
||||
{selectedChat.include_profile_context
|
||||
? "Enabled"
|
||||
: "Disabled"}
|
||||
? t("chatInfo.enabled")
|
||||
: t("chatInfo.disabled")}
|
||||
</div>
|
||||
<div>
|
||||
{" "}
|
||||
Workspace Instructions:{" "}
|
||||
{t("chatInfo.workspaceInstructions")}:{" "}
|
||||
{selectedChat.include_workspace_instructions
|
||||
? "Enabled"
|
||||
: "Disabled"}
|
||||
? t("chatInfo.enabled")
|
||||
: t("chatInfo.disabled")}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
Embeddings Provider: {selectedChat.embeddings_provider}
|
||||
{t("chatInfo.embeddingsProvider")}: {selectedChat.embeddings_provider}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -60,7 +64,7 @@ export const ChatSecondaryButtons: FC<ChatSecondaryButtonsProps> = ({}) => {
|
|||
|
||||
<WithTooltip
|
||||
delayDuration={200}
|
||||
display={<div>Start a new chat</div>}
|
||||
display={<div>{t("chat.startNewChat")}</div>}
|
||||
trigger={
|
||||
<div className="mt-1">
|
||||
<IconMessagePlus
|
||||
|
|
|
|||
|
|
@ -230,21 +230,35 @@
|
|||
},
|
||||
|
||||
"help": {
|
||||
"showHelp": "Show Help",
|
||||
"showWorkspaces": "Show Workspaces",
|
||||
"newChat": "New Chat",
|
||||
"focusChat": "Focus Chat",
|
||||
"toggleFiles": "Toggle Files",
|
||||
"toggleRetrieval": "Toggle Retrieval",
|
||||
"openSettings": "Open Settings",
|
||||
"openQuickSettings": "Open Quick Settings",
|
||||
"toggleSidebar": "Toggle Sidebar",
|
||||
"updates": "Updates",
|
||||
"markAsRead": "Mark as Read",
|
||||
"markAllAsRead": "Mark All as Read",
|
||||
"demo": "Demo",
|
||||
"youAreAllCaughtUp": "You are all caught up!",
|
||||
"showRecentUpdates": "Show recent updates"
|
||||
}
|
||||
"showHelp": "Show Help",
|
||||
"showWorkspaces": "Show Workspaces",
|
||||
"newChat": "New Chat",
|
||||
"focusChat": "Focus Chat",
|
||||
"toggleFiles": "Toggle Files",
|
||||
"toggleRetrieval": "Toggle Retrieval",
|
||||
"openSettings": "Open Settings",
|
||||
"openQuickSettings": "Open Quick Settings",
|
||||
"toggleSidebar": "Toggle Sidebar",
|
||||
"updates": "Updates",
|
||||
"markAsRead": "Mark as Read",
|
||||
"markAllAsRead": "Mark All as Read",
|
||||
"demo": "Demo",
|
||||
"youAreAllCaughtUp": "You are all caught up!",
|
||||
"showRecentUpdates": "Show recent updates"
|
||||
},
|
||||
|
||||
"chatInfo": {
|
||||
"title": "Chat Info",
|
||||
"model": "Model",
|
||||
"prompt": "Prompt",
|
||||
"temperature": "Temperature",
|
||||
"contextLength": "Context Length",
|
||||
"profileContext": "Profile Context",
|
||||
"workspaceInstructions": "Workspace Instructions",
|
||||
"embeddingsProvider": "Embeddings Provider",
|
||||
"enabled": "Enabled",
|
||||
"disabled": "Disabled",
|
||||
"startNewChat": "Start a new chat"
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -244,6 +244,20 @@
|
|||
"demo": "デモ",
|
||||
"youAreAllCaughtUp": "すべて確認済みです!",
|
||||
"showRecentUpdates": "最近の更新を表示"
|
||||
},
|
||||
|
||||
"chatInfo": {
|
||||
"title": "チャット情報",
|
||||
"model": "モデル",
|
||||
"prompt": "プロンプト",
|
||||
"temperature": "温度",
|
||||
"contextLength": "コンテキスト長",
|
||||
"profileContext": "プロフィールコンテキスト",
|
||||
"workspaceInstructions": "ワークスペース指示",
|
||||
"embeddingsProvider": "ベクトルプロバイダ",
|
||||
"enabled": "有効",
|
||||
"disabled": "無効",
|
||||
"startNewChat": "新しいチャットを開始"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -229,21 +229,35 @@
|
|||
},
|
||||
|
||||
"help": {
|
||||
"showHelp": "显示帮助",
|
||||
"showWorkspaces": "显示工作区",
|
||||
"newChat": "新建对话",
|
||||
"focusChat": "聚焦当前对话",
|
||||
"toggleFiles": "切换文件面板",
|
||||
"toggleRetrieval": "切换检索模式",
|
||||
"openSettings": "打开设置",
|
||||
"openQuickSettings": "快速设置",
|
||||
"toggleSidebar": "切换侧边栏",
|
||||
"updates": "更新",
|
||||
"markAsRead": "标记为已读",
|
||||
"markAllAsRead": "全部标记为已读",
|
||||
"demo": "演示",
|
||||
"youAreAllCaughtUp": "你已阅读所有内容!",
|
||||
"showRecentUpdates": "显示最近更新"
|
||||
}
|
||||
"showHelp": "显示帮助",
|
||||
"showWorkspaces": "显示工作区",
|
||||
"newChat": "新建对话",
|
||||
"focusChat": "聚焦当前对话",
|
||||
"toggleFiles": "切换文件面板",
|
||||
"toggleRetrieval": "切换检索模式",
|
||||
"openSettings": "打开设置",
|
||||
"openQuickSettings": "快速设置",
|
||||
"toggleSidebar": "切换侧边栏",
|
||||
"updates": "更新",
|
||||
"markAsRead": "标记为已读",
|
||||
"markAllAsRead": "全部标记为已读",
|
||||
"demo": "演示",
|
||||
"youAreAllCaughtUp": "你已阅读所有内容!",
|
||||
"showRecentUpdates": "显示最近更新"
|
||||
},
|
||||
|
||||
"chatInfo": {
|
||||
"title": "对话信息",
|
||||
"model": "模型",
|
||||
"prompt": "提示词",
|
||||
"temperature": "温度系数",
|
||||
"contextLength": "上下文长度",
|
||||
"profileContext": "用户上下文",
|
||||
"workspaceInstructions": "工作区说明",
|
||||
"embeddingsProvider": "向量引擎提供方",
|
||||
"enabled": "启用",
|
||||
"disabled": "禁用",
|
||||
"startNewChat": "开始新的对话"
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue