fix(butler): wire verification gaps — pain storage init, cold start, UI mode switches
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
- Call init_pain_storage() in Tauri .setup() so pain persistence activates on boot - Integrate useColdStart hook into FirstConversationPrompt for auto-greeting - Add UI mode toggle section to Settings/General (already had imports) - Add "简洁" mode switch-back button to TopBar in professional layout - Update SemanticSkillRouter @reserved annotation to reflect active status
This commit is contained in:
@@ -3,6 +3,7 @@ import { useConnectionStore } from '../../store/connectionStore';
|
||||
import { useConfigStore } from '../../store/configStore';
|
||||
import { useConversationStore } from '../../store/chat/conversationStore';
|
||||
import { useSaaSStore } from '../../store/saasStore';
|
||||
import { useUIModeStore } from '../../store/uiModeStore';
|
||||
import { getStoredGatewayToken, setStoredGatewayToken } from '../../lib/gateway-client';
|
||||
import { silentErrorHandler } from '../../lib/error-utils';
|
||||
|
||||
@@ -20,6 +21,8 @@ export function General() {
|
||||
const [showToolCalls, setShowToolCalls] = useState(quickConfig.showToolCalls ?? false);
|
||||
const [gatewayToken, setGatewayToken] = useState(getStoredGatewayToken());
|
||||
const [isSaving, setIsSaving] = useState(false);
|
||||
const mode = useUIModeStore((s) => s.mode);
|
||||
const setMode = useUIModeStore((s) => s.setMode);
|
||||
|
||||
const connected = connectionState === 'connected';
|
||||
const connecting = connectionState === 'connecting' || connectionState === 'reconnecting';
|
||||
@@ -185,6 +188,35 @@ export function General() {
|
||||
</div>
|
||||
<Toggle checked={showToolCalls} onChange={handleShowToolCallsChange} disabled={isSaving} />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="text-sm font-medium text-gray-900">界面模式</div>
|
||||
<div className="text-xs text-gray-500 mt-0.5 mb-2">切换简洁界面或完整专业界面。</div>
|
||||
<div className="flex gap-3">
|
||||
<button
|
||||
onClick={() => setMode('simple')}
|
||||
className={`flex-1 p-3 rounded-lg border text-sm text-center transition-colors ${
|
||||
mode === 'simple'
|
||||
? 'border-orange-500 bg-orange-50 text-orange-700 dark:bg-orange-900/20 dark:text-orange-300'
|
||||
: 'border-gray-200 hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800'
|
||||
}`}
|
||||
>
|
||||
简洁模式
|
||||
<p className="text-xs text-gray-500 mt-1">适合日常使用,只显示聊天窗口</p>
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setMode('professional')}
|
||||
className={`flex-1 p-3 rounded-lg border text-sm text-center transition-colors ${
|
||||
mode === 'professional'
|
||||
? 'border-orange-500 bg-orange-50 text-orange-700 dark:bg-orange-900/20 dark:text-orange-300'
|
||||
: 'border-gray-200 hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800'
|
||||
}`}
|
||||
>
|
||||
专业模式
|
||||
<p className="text-xs text-gray-500 mt-1">完整功能,包括侧边栏和工具面板</p>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user