Added ability to resume previous chat on copilot
This commit is contained in:
@@ -2,7 +2,7 @@ import { useQueryClient } from "@tanstack/react-query"
|
||||
import { useDarkMode } from "~/hooks/useDarkmode"
|
||||
import { useMessageOption } from "~/hooks/useMessageOption"
|
||||
import { PageAssitDatabase } from "@/db"
|
||||
import { Select } from "antd"
|
||||
import { Select, Switch } from "antd"
|
||||
import { SUPPORTED_LANGUAGES } from "~/utils/supporetd-languages"
|
||||
import { MoonIcon, SunIcon } from "lucide-react"
|
||||
import { SearchModeSettings } from "./search-mode"
|
||||
@@ -14,11 +14,20 @@ import {
|
||||
importPageAssistData
|
||||
} from "@/libs/export-import"
|
||||
import { BetaTag } from "@/components/Common/Beta"
|
||||
import { useStorage } from "@plasmohq/storage/hook"
|
||||
|
||||
export const SettingOther = () => {
|
||||
const { clearChat, speechToTextLanguage, setSpeechToTextLanguage } =
|
||||
useMessageOption()
|
||||
|
||||
const [copilotResumeLastChat, setCopilotResumeLastChat] = useStorage(
|
||||
"copilotResumeLastChat",
|
||||
false
|
||||
)
|
||||
|
||||
const [hideCurrentChatModelSettings, setHideCurrentChatModelSettings] =
|
||||
useStorage("hideCurrentChatModelSettings", false)
|
||||
|
||||
const queryClient = useQueryClient()
|
||||
|
||||
const { mode, toggleDarkMode } = useDarkMode()
|
||||
@@ -34,7 +43,7 @@ export const SettingOther = () => {
|
||||
<div className="border border-b border-gray-200 dark:border-gray-600 mt-3"></div>
|
||||
</div>
|
||||
<div className="flex flex-row justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50">
|
||||
<span className="text-gray-500 dark:text-neutral-50">
|
||||
{t("generalSettings.settings.speechRecognitionLang.label")}
|
||||
</span>
|
||||
|
||||
@@ -76,6 +85,29 @@ export const SettingOther = () => {
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-row justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50">
|
||||
{t("generalSettings.settings.copilotResumeLastChat.label")}
|
||||
</span>
|
||||
|
||||
<Switch
|
||||
checked={copilotResumeLastChat}
|
||||
onChange={(checked) => setCopilotResumeLastChat(checked)}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-row justify-between">
|
||||
<div className="inline-flex items-center gap-2">
|
||||
<BetaTag />
|
||||
<span className="text-gray-500 dark:text-neutral-50">
|
||||
{t("generalSettings.settings.hideCurrentChatModelSettings.label")}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<Switch
|
||||
checked={hideCurrentChatModelSettings}
|
||||
onChange={(checked) => setHideCurrentChatModelSettings(checked)}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-row justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50 ">
|
||||
{t("generalSettings.settings.darkMode.label")}
|
||||
@@ -129,7 +161,7 @@ export const SettingOther = () => {
|
||||
</div>
|
||||
<div className="flex flex-row mb-3 justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50 ">
|
||||
<BetaTag /> {t("generalSettings.system.export.label")}
|
||||
{t("generalSettings.system.export.label")}
|
||||
</span>
|
||||
<button
|
||||
onClick={exportPageAssistData}
|
||||
@@ -139,7 +171,7 @@ export const SettingOther = () => {
|
||||
</div>
|
||||
<div className="flex flex-row mb-3 justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50 ">
|
||||
<BetaTag /> {t("generalSettings.system.import.label")}
|
||||
{t("generalSettings.system.import.label")}
|
||||
</span>
|
||||
<label
|
||||
htmlFor="import"
|
||||
|
||||
Reference in New Issue
Block a user