feat(client): remove demo skill fallback

This commit is contained in:
baiyanyun
2026-06-09 08:48:11 +08:00
parent 451cda7aa6
commit 48e5830b9e
4 changed files with 37 additions and 41 deletions

View File

@@ -3,7 +3,6 @@ import GlassCard from '@/components/digital/GlassCard';
import CardTitleBar from '@/components/digital/CardTitleBar';
import { adaptSkillSummaries, type SkillSummary } from '@/lib/consoleDataAdapter';
import { getSkills, setSkillEnabled } from '@/lib/api';
import { getDemoSkills } from './demoScenario';
import { domSafeId } from './navigation';
type TaskCadence = 'daily' | 'weekly' | 'monthly' | 'adhoc';
@@ -188,16 +187,12 @@ export default function SkillLibrary({ focusSkillId }: { focusSkillId?: string |
try {
const data = await getSkills();
if (!mountedRef.current) return;
setSkills(
Array.isArray(data) && data.length > 0
? adaptSkillSummaries(data as Record<string, unknown>[])
: getDemoSkills(),
);
setSkills(Array.isArray(data) ? adaptSkillSummaries(data as Record<string, unknown>[]) : []);
} catch (err) {
if (!mountedRef.current) return;
console.error('[SkillLibrary] fetch failed:', err);
setSkills(getDemoSkills());
setError(false);
setSkills([]);
setError(true);
} finally {
if (mountedRef.current) setLoading(false);
}
@@ -348,7 +343,7 @@ export default function SkillLibrary({ focusSkillId }: { focusSkillId?: string |
{loading ? (
<div className="de-loading-skeleton" style={{ height: 300 }} />
) : error ? (
<p className="de-empty-text"></p>
<p className="de-empty-text"> qimingclaw bridge </p>
) : filtered.length === 0 && skills.length > 0 ? (
<p className="de-empty-text"></p>
) : filtered.length === 0 ? (

View File

@@ -16,7 +16,7 @@
console.warn("[qimingclaw] digital employee auth bootstrap skipped", error);
}
</script>
<script type="module" crossorigin src="./assets/index-Cz6nAvzJ.js"></script>
<script type="module" crossorigin src="./assets/index-B4ynQSIP.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-CKIQdvco.css">
</head>
<body>