feat(client): remove demo skill fallback
This commit is contained in:
@@ -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 ? (
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -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>
|
||||
|
||||
@@ -454,6 +454,7 @@ crates/agent-electron-client/src/preload/webviewPerfBridge.ts
|
||||
- 任务中心的 `/api/governance/command` 已接入 qimingclaw 兼容层:`create_plan`、`submit_plan`、`approve_plan`、`activate_plan`、`create_schedule`、`run_schedule_now` 等命令返回本地可解释结果,其中激活/立即运行会映射到 adapter 的 dispatch/workday 状态。
|
||||
- 日报下载不再打开 sgRobot 风格 PDF 后端直链;生成日报后会基于当前 qimingclaw workday 投影在浏览器内导出本地文本日报。
|
||||
- 任务中心和委托详情不再使用 sgRobot demo mission fallback;没有 qimingclaw Plan / Task / Run / Event 时展示真实空态或错误态,避免示例任务冒充本地任务记录。
|
||||
- 技能库不再使用 sgRobot demo skill fallback;Skill Catalog 为空或读取失败时展示真实空态 / 错误态,避免示例技能冒充本机能力。
|
||||
- 嵌入页 localStorage/sessionStorage 的运行态 key 已切换到 `qimingclaw:*` / `qimingclaw_digital_*` 命名;旧 sgRobot/zeroclaw key 仅作为迁移读取或清理,不再作为新状态写入目标。
|
||||
- 数字员工本地表不另建 sgRobot SQLite;统一建在 qimingclaw 主进程数据库 `~/.qimingclaw/qimingclaw.db` 内,作为 qimingclaw 客户端本地事实缓存与 outbox;表结构在主进程启动时创建,数字员工 runtime/sync 服务读写前也会按需自修复执行 `CREATE TABLE IF NOT EXISTS`。
|
||||
- 同步状态通过 bridge 返回最近失败 outbox 明细,首页可直接看到实体类型、outbox ID、操作类型、重试次数、失败时间和下次自动重试时间。
|
||||
|
||||
Reference in New Issue
Block a user