'use client' import { useState, useEffect } from 'react' import { useStore, Theme, MemoryType, DEFAULT_GODMODE_PROMPT } from '@/store' import type { TierInfo } from '@/store' import { X, Key, Palette, Shield, Zap, Trash2, Download, Upload, Eye, EyeOff, Check, AlertTriangle, SlidersHorizontal, RotateCcw, Brain, TrendingUp, ThumbsUp, ThumbsDown, Sparkles, Plus, Edit3, ToggleLeft, ToggleRight, User, Settings, MessageSquare, Skull, FileText, Copy, Swords, Crown, Users, Droplets, HardDrive } from 'lucide-react' import type { AutoTuneStrategy, AutoTuneParams } from '@/lib/autotune' import { STRATEGY_PROFILES, PARAM_META, getStrategyLabel, getStrategyDescription } from '@/lib/autotune' import { getFeedbackStats } from '@/lib/autotune-feedback' import type { ObfuscationTechnique } from '@/lib/parseltongue' import { getAvailableTechniques, DEFAULT_TRIGGERS } from '@/lib/parseltongue' interface SettingsModalProps { onClose: () => void } type SettingsTab = 'api' | 'prompt' | 'appearance' | 'privacy' | 'liquid' | 'autotune' | 'parseltongue' | 'stm' | 'memory' | 'ultraplinian' | 'consortium' | 'plan' | 'data' export function SettingsModal({ onClose }: SettingsModalProps) { const [activeTab, setActiveTab] = useState('api') return (
{/* Backdrop */}
{/* Modal */}
{/* Header */}

Settings

{/* Content */}
{/* Sidebar */} {/* Tab content */}
{activeTab === 'api' && } {activeTab === 'prompt' && } {activeTab === 'autotune' && } {activeTab === 'appearance' && } {activeTab === 'privacy' && } {activeTab === 'parseltongue' && } {activeTab === 'liquid' && } {activeTab === 'stm' && } {activeTab === 'memory' && } {activeTab === 'ultraplinian' && } {activeTab === 'consortium' && } {activeTab === 'plan' && } {activeTab === 'data' && }
) } function TabButton({ icon, label, active, onClick }: { icon: React.ReactNode label: string active: boolean onClick: () => void }) { return ( ) } function APIKeyTab() { const { apiKey, setApiKey } = useStore() const [showKey, setShowKey] = useState(false) const [localKey, setLocalKey] = useState(apiKey) const [saved, setSaved] = useState(false) const handleBlur = () => { if (localKey !== apiKey) { setApiKey(localKey) setSaved(true) setTimeout(() => setSaved(false), 2000) } } return (

OpenRouter API Key

Your API key is stored locally and never sent to G0DM0D3 servers. Get your key at{' '} openrouter.ai

setLocalKey(e.target.value)} onBlur={handleBlur} placeholder="sk-or-v1-..." className="w-full px-4 py-3 pr-20 bg-theme-dim border border-theme-primary rounded-lg focus:outline-none focus:glow-box" />
{saved && ( Saved )}

Changes are saved automatically when you click away.

) } // ── System Prompt Settings Tab ──────────────────────────────────────────── function SystemPromptTab() { const { customSystemPrompt, useCustomSystemPrompt, setCustomSystemPrompt, setUseCustomSystemPrompt, resetSystemPromptToDefault } = useStore() const [localPrompt, setLocalPrompt] = useState(customSystemPrompt) const [saved, setSaved] = useState(false) const [showResetConfirm, setShowResetConfirm] = useState(false) // Sync local state when store changes useEffect(() => { setLocalPrompt(customSystemPrompt) }, [customSystemPrompt]) const handleSave = () => { setCustomSystemPrompt(localPrompt) setSaved(true) setTimeout(() => setSaved(false), 2000) } const handleReset = () => { resetSystemPromptToDefault() setLocalPrompt(DEFAULT_GODMODE_PROMPT) setShowResetConfirm(false) setSaved(true) setTimeout(() => setSaved(false), 2000) } const handleCopy = () => { navigator.clipboard.writeText(localPrompt) } const charCount = localPrompt.length const isModified = localPrompt !== customSystemPrompt return (

GODMODE System Prompt

The system prompt injected into every conversation. This is your "Ultraplinian" jailbreak prompt.

{/* Master toggle */} {useCustomSystemPrompt && ( <> {/* Prompt editor */}
{saved && ( Saved )}