refactor(*): 稳定期治理 - 收敛核心架构、错误语义并修复跨项目数据竞态

This commit is contained in:
ddCat
2026-09-09 22:02:10 +08:00
parent bacd502f5c
commit b5f3413ded
298 changed files with 12681 additions and 26428 deletions

View File

@@ -12,7 +12,7 @@ export function useSkillRuntimeCatalog() {
let cancelled = false;
listAddedSkills()
.then((result) => {
if (!cancelled) setSkills(result.skills.filter((skill) => skill.is_added));
if (!cancelled) setSkills(result.skills.filter((skill) => skill.isAdded));
})
.catch(() => {
if (!cancelled) setSkills([]);
@@ -30,7 +30,7 @@ export function useSkillRuntimeCatalog() {
export function SkillRuntimePicker({ skills, loading, value, onChange, placeholder = "选择本次生成使用的技能", profile = "canvas" }: { skills: Skill[]; loading?: boolean; value: string[]; onChange: (skillIds: string[]) => void; placeholder?: string; profile?: SkillRuntimeProfile }) {
const options = useMemo(
() => skills.map((skill) => ({ value: skill.skill_id, label: skill.skill_name, title: skill.description })),
() => skills.map((skill) => ({ value: skill.skillId, label: skill.skillName, title: skill.description })),
[skills],
);
const maxSkills = SKILL_RUNTIME_PROFILES[profile].maxSkills;