fix(desktop): 功能验证 6 项缺陷修复
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
- ISS-002: SkillInfoResponse 增加 source/path 字段,修复技能系统显示 0 个 - ISS-003: Sidebar 添加自动化/技能市场导航入口 + App 返回按钮 - ISS-004: SaaS fetchAvailableModels 添加 .catch() 防限流崩溃 - ISS-006: SaaSSettings/PricingPage 包裹 ErrorBoundary 防白屏 - ISS-008: listModels 加载 localStorage 自定义模型,修复仅显示 1 个模型 - configStore listSkills 映射添加 source/path 转发
This commit is contained in:
@@ -23,7 +23,9 @@ export function SaaSStatus({ isLoggedIn, account, saasUrl, onLogout, onLogin }:
|
||||
|
||||
useEffect(() => {
|
||||
if (isLoggedIn) {
|
||||
fetchAvailableModels();
|
||||
fetchAvailableModels().catch(() => {
|
||||
// Silently handle SaaS API errors — they should not crash the app
|
||||
});
|
||||
}
|
||||
}, [isLoggedIn, fetchAvailableModels]);
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ import { SecureStorage } from './SecureStorage';
|
||||
import { VikingPanel } from '../VikingPanel';
|
||||
import { SaaSSettings } from '../SaaS/SaaSSettings';
|
||||
import { PricingPage } from '../SaaS/PricingPage';
|
||||
import { ErrorBoundary } from '../ui/ErrorBoundary';
|
||||
|
||||
interface SettingsLayoutProps {
|
||||
onBack: () => void;
|
||||
@@ -105,8 +106,20 @@ export function SettingsLayout({ onBack }: SettingsLayoutProps) {
|
||||
case 'workspace': return <Workspace />;
|
||||
case 'privacy': return <Privacy />;
|
||||
case 'storage': return <SecureStorage />;
|
||||
case 'saas': return <SaaSSettings />;
|
||||
case 'billing': return <PricingPage />;
|
||||
case 'saas': return (
|
||||
<ErrorBoundary
|
||||
fallback={<div className="p-6 text-center text-gray-500">SaaS 平台加载失败,请稍后重试</div>}
|
||||
>
|
||||
<SaaSSettings />
|
||||
</ErrorBoundary>
|
||||
);
|
||||
case 'billing': return (
|
||||
<ErrorBoundary
|
||||
fallback={<div className="p-6 text-center text-gray-500">计费信息加载失败,请稍后重试</div>}
|
||||
>
|
||||
<PricingPage />
|
||||
</ErrorBoundary>
|
||||
);
|
||||
case 'security': return (
|
||||
<div className="space-y-6">
|
||||
<div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useState } from 'react';
|
||||
import { motion, AnimatePresence } from 'framer-motion';
|
||||
import {
|
||||
SquarePen, MessageSquare, Bot, Search, X, Settings
|
||||
SquarePen, MessageSquare, Bot, Search, X, Settings, Zap, Sparkles
|
||||
} from 'lucide-react';
|
||||
import { ConversationList } from './ConversationList';
|
||||
import { CloneManager } from './CloneManager';
|
||||
@@ -33,11 +33,7 @@ export function Sidebar({
|
||||
|
||||
const handleNavClick = (tab: Tab) => {
|
||||
setActiveTab(tab);
|
||||
if (tab === 'clones') {
|
||||
onMainViewChange?.('chat');
|
||||
} else {
|
||||
onMainViewChange?.('chat');
|
||||
}
|
||||
onMainViewChange?.('chat');
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -85,6 +81,24 @@ export function Sidebar({
|
||||
<Bot className="w-4 h-4" />
|
||||
智能体
|
||||
</button>
|
||||
|
||||
{/* Divider between primary nav and secondary tools */}
|
||||
<div className="mx-1 my-1 border-t border-[#e8e6e1]/40 dark:border-gray-800" />
|
||||
|
||||
<button
|
||||
onClick={() => onMainViewChange?.('automation')}
|
||||
className="w-full flex items-center gap-3 px-3 py-2 rounded-lg text-sm text-gray-600 dark:text-gray-400 hover:bg-black/5 dark:hover:bg-white/5 transition-colors"
|
||||
>
|
||||
<Zap className="w-4 h-4" />
|
||||
自动化
|
||||
</button>
|
||||
<button
|
||||
onClick={() => onMainViewChange?.('skills')}
|
||||
className="w-full flex items-center gap-3 px-3 py-2 rounded-lg text-sm text-gray-600 dark:text-gray-400 hover:bg-black/5 dark:hover:bg-white/5 transition-colors"
|
||||
>
|
||||
<Sparkles className="w-4 h-4" />
|
||||
技能市场
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Divider */}
|
||||
|
||||
Reference in New Issue
Block a user