Compare commits

...

9 Commits

Author SHA1 Message Date
celestial-vault 2e028a49bc merge conflicts 2025-06-27 15:48:20 -07:00
celestial-vault 97a36d5306 refactor out debug section 2025-06-27 15:44:10 -07:00
celestial-vault e67bb6c636 merge conflicts 2025-06-27 15:36:36 -07:00
celestial-vault fa7794e9a6 move files to sections folder 2025-06-27 15:00:06 -07:00
celestial-vault 88029834be move terminal, browser, and feature settings 2025-06-27 14:55:06 -07:00
celestial-vault 1f267d058a duplicate import 2025-06-27 14:26:35 -07:00
celestial-vault 853b8a6470 merge conflicts 2025-06-27 14:23:04 -07:00
celestial-vault a5258e46e1 add general settings section 2025-06-27 10:24:15 -07:00
celestial-vault 36dfc7de11 refactor out apiconfig section 2025-06-27 10:04:57 -07:00
2 changed files with 36 additions and 20 deletions
@@ -19,6 +19,7 @@ import TerminalSettingsSection from "./sections/TerminalSettingsSection"
import ApiConfigurationSection from "./sections/ApiConfigurationSection"
import GeneralSettingsSection from "./sections/GeneralSettingsSection"
import BrowserSettingsSection from "./sections/BrowserSettingsSection"
import DebugSection from "./sections/DebugSection"
import { convertApiConfigurationToProtoApiConfiguration } from "@shared/proto-conversions/state/settings-conversion"
import { convertChatSettingsToProtoChatSettings } from "@shared/proto-conversions/state/chat-settings-conversion"
@@ -800,26 +801,7 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => {
{/* Debug Tab (only in dev mode) */}
{IS_DEV && activeTab === "debug" && (
<div>
{renderSectionHeader("debug")}
<Section>
<VSCodeButton
onClick={() => handleResetState()}
className="mt-[5px] w-auto"
style={{ backgroundColor: "var(--vscode-errorForeground)", color: "black" }}>
Reset Workspace State
</VSCodeButton>
<VSCodeButton
onClick={() => handleResetState(true)}
className="mt-[5px] w-auto"
style={{ backgroundColor: "var(--vscode-errorForeground)", color: "black" }}>
Reset Global State
</VSCodeButton>
<p className="text-xs mt-[5px] text-[var(--vscode-descriptionForeground)]">
This will reset all global state and secret storage in the extension.
</p>
</Section>
</div>
<DebugSection onResetState={handleResetState} renderSectionHeader={renderSectionHeader} />
)}
{/* About Tab */}
@@ -0,0 +1,34 @@
import Section from "../Section"
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
interface DebugSectionProps {
onResetState: (resetGlobalState?: boolean) => Promise<void>
renderSectionHeader: (tabId: string) => JSX.Element | null
}
const DebugSection = ({ onResetState, renderSectionHeader }: DebugSectionProps) => {
return (
<div>
{renderSectionHeader("debug")}
<Section>
<VSCodeButton
onClick={() => onResetState()}
className="mt-[5px] w-auto"
style={{ backgroundColor: "var(--vscode-errorForeground)", color: "black" }}>
Reset Workspace State
</VSCodeButton>
<VSCodeButton
onClick={() => onResetState(true)}
className="mt-[5px] w-auto"
style={{ backgroundColor: "var(--vscode-errorForeground)", color: "black" }}>
Reset Global State
</VSCodeButton>
<p className="text-xs mt-[5px] text-[var(--vscode-descriptionForeground)]">
This will reset all global state and secret storage in the extension.
</p>
</Section>
</div>
)
}
export default DebugSection