JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.
Python
fix: 调整skill安装逻辑,预置skill支持安装,默认未安装
ray_le98f75fe68c1f
diff --git a/jiuwenclaw/agentserver/interface_react.py b/jiuwenclaw/agentserver/interface_react.pyindex 05bb231d5f..216b67f4ee 100644--- a/jiuwenclaw/agentserver/interface_react.py+++ b/jiuwenclaw/agentserver/interface_react.py@@ -86,7 +86,7 @@ from jiuwenclaw.agentserver.permissions import (init_permission_engine,get_permission_engine,)-from jiuwenclaw.agentserver.skill_manager import _get_skills_dir+from jiuwenclaw.agentserver.skill_manager import get_agent_skills_dirfrom jiuwenclaw.evolution.service import EvolutionServicefrom jiuwenclaw.schema.agent import AgentRequest, AgentResponse, AgentResponseChunkfrom jiuwenclaw.agentserver.memory import get_memory_manager@@ -258,7 +258,7 @@ class JiuWenClawReactAdapter:# register installed skills (compatible with openjiuwen variants).if hasattr(self._instance, "_skill_util"):try:- await self._instance.register_skill(str(_get_skills_dir()))+ await self._instance.register_skill(str(get_agent_skills_dir()))except Exception as exc:logger.warning("[JiuWenClawReactAdapter] register_skill failed, continue without skills: %s", exc)@@ -295,7 +295,7 @@ class JiuWenClawReactAdapter:evo_service = EvolutionService(llm=self._instance._get_llm(),model=agent_config.model_name,- skills_base_dir=str(_get_skills_dir()),+ skills_base_dir=str(get_agent_skills_dir()),auto_scan=evolution_auto_scan,)self._instance.set_evolution_service(evo_service)diff --git a/jiuwenclaw/agentserver/skill_manager.py b/jiuwenclaw/agentserver/skill_manager.pyindex d0e32f8d4b..b8f80b1e6e 100644--- a/jiuwenclaw/agentserver/skill_manager.py+++ b/jiuwenclaw/agentserver/skill_manager.py@@ -192,8 +192,9 @@ class SkillManager:if refresh_marketplaces:await self._sync_marketplace_repos()local = self._scan_local_skills()+ builtin = self._scan_builtin_skills()marketplace = self._scan_marketplace_skills()- out: dict[str, Any] = {"skills": local + marketplace}+ out: dict[str, Any] = {"skills": local + builtin + marketplace}if bool(params.get("with_installed", False)):installed = await self.handle_skills_installed(params)out["plugins"] = installed.get("plugins") or []@@ -248,6 +249,12 @@ class SkillManager:meta["file_path"] = meta.pop("path", "")meta["source"] = self._resolve_skill_source(meta.get("name", ""))meta["is_builtin"] = self._is_builtin_skill(meta.get("name", ""), self._get_installed_plugins(), child)+ builtin_dir = get_builtin_skills_dir()+ if builtin_dir.exists():+ builtin_skill_path = builtin_dir / child.name+ meta["is_builtin_source"] = builtin_skill_path.exists() and builtin_skill_path.is_dir()+ else:+ meta["is_builtin_source"] = Falsemeta["has_evolutions"] = (child / _EVOLUTION_FILENAME).is_file()return meta@@ -271,6 +278,7 @@ class SkillManager:meta["source"] = marketplace_namemeta["marketplace"] = marketplace_namemeta["is_builtin"] = False+ meta["is_builtin_source"] = Falsemeta["has_evolutions"] = Falsereturn meta@@ -416,10 +424,13 @@ class SkillManager:if not plugin_name or not marketplace_name:return {"success": False, "detail": "plugin 或 marketplace 名称为空"}+ if marketplace_name == "builtin":+ return await self.handle_skills_install_builtin({"name": plugin_name})+# 查找 marketplace 配置marketplace = Nonefor m in self._get_marketplaces():- if m.get("name") == marketplace_name:+ if m.get("name") == marketplace:marketplace = mbreakif marketplace is None:@@ -475,6 +486,52 @@ class SkillManager:return {"success": True}+ async def handle_skills_install_builtin(self, params: dict) -> dict:+ """安装内置技能.++ params:+ name: skill 名称+ """+ name = params.get("name", "")+ if not name:+ return {"success": False, "detail": "缺少参数: name"}++ builtin_dir = get_builtin_skills_dir()+ if not builtin_dir.exists():+ return {"success": False, "detail": "内置技能目录不存在"}++ src = builtin_dir / name+ if not src.exists() or not src.is_dir():+ return {"success": False, "detail": f"未找到内置技能: {name}"}++ # 检查是否已经安装+ dest = get_agent_skills_dir() / name+ if dest.exists() and dest.is_dir():+ return {"success": False, "detail": f"技能 {name} 已经安装"}++ # 复制技能到用户目录+ try:+ shutil.copytree(src, dest)+ except Exception as exc:+ logger.error("安装内置技能失败: %s", exc)+ return {"success": False, "detail": f"安装失败: {exc}"}++ # 记录安装信息到状态文件+ meta = self._parse_skill_md(self._try_find_skill_file(dest)) or {}+ self._add_installed_plugin({+ "name": name,+ "marketplace": "builtin",+ "version": meta.get("version", ""),+ "commit": "",+ "source": "builtin",+ "installed_at": datetime.now(timezone.utc).isoformat(),+ })++ # 刷新索引+ self._refresh_agent_data_indexes()++ return {"success": True}+async def handle_skills_skillnet_search(self, params: dict) -> dict:"""在线搜索 SkillNet 技能."""query = str(params.get("q", "")).strip()@@ -871,7 +928,7 @@ class SkillManager:"installed_at": datetime.now(timezone.utc).isoformat(),})self._refresh_agent_data_indexes()-+ _safe_rmtree(skill_dir)return {"success": True,"skill": {"name": skill_name, "source": "clawhub"},@@ -1034,7 +1091,7 @@ class SkillManager:_safe_rmtree(mirror_dest)mirror_root.mkdir(parents=True, exist_ok=True)shutil.copytree(skill_dir, mirror_dest)-+ _safe_rmtree(skill_dir)return {"ok": True,"skill_name": skill_name,@@ -1069,10 +1126,15 @@ class SkillManager:if not name:return {"success": False, "detail": "缺少参数: name"}- # 内置技能不允许删除(传入实际路径判断)+ # 检查是否为真正的内置技能(源码目录中的,不允许删除)+ # 只有当当前运行的技能目录就是内置目录时,才不允许删除dest = self._skills_dir / name- if self._is_builtin_skill(name, self._get_installed_plugins(), dest):- return {"success": False, "detail": "内置技能不允许删除"}+ builtin_dir = get_builtin_skills_dir()+ if builtin_dir.exists():+ builtin_skill_path = builtin_dir / name+ if builtin_skill_path.exists() and builtin_skill_path.is_dir():+ if dest.resolve() == builtin_skill_path.resolve():+ return {"success": False, "detail": "内置技能不允许删除"}if dest.exists() and dest.is_dir():_safe_rmtree(dest)@@ -1433,6 +1495,12 @@ class SkillManager:meta["source"] = source# 判断是否为内置技能(传入 child 路径,通过实际路径判断)meta["is_builtin"] = self._is_builtin_skill(meta.get("name", ""), self._get_installed_plugins(), child)+ builtin_dir = get_builtin_skills_dir()+ if builtin_dir.exists():+ builtin_skill_path = builtin_dir / child.name+ meta["is_builtin_source"] = builtin_skill_path.exists() and builtin_skill_path.is_dir()+ else:+ meta["is_builtin_source"] = Falsemeta["has_evolutions"] = (child / _EVOLUTION_FILENAME).is_file()# 不在列表中返回 bodymeta.pop("body", None)@@ -1440,6 +1508,45 @@ class SkillManager:return results+ def _scan_builtin_skills(self) -> list[dict]:+ """扫描内置技能目录中尚未安装到用户目录的技能.++ 返回的技能列表仅包含那些存在于内置目录但尚未在用户目录中的技能。+ """+ results: list[dict] = []+ builtin_dir = get_builtin_skills_dir()+ user_skills_dir = get_agent_skills_dir()++ if not builtin_dir.exists() or not builtin_dir.is_dir():+ return results++ for child in builtin_dir.iterdir():+ if not child.is_dir() or child.name.startswith("_"):+ continue++ # 检查该技能是否已经在用户目录中安装+ user_skill_path = user_skills_dir / child.name+ if user_skill_path.exists() and user_skill_path.is_dir():+ continue # 已安装,跳过++ md = self._try_find_skill_file(child)+ if md is None:+ continue+ meta = self._parse_skill_md(md)+ if meta is None:+ continue++ # 设置内置技能的标记+ meta["source"] = "builtin"+ meta["is_builtin"] = True+ meta["is_builtin_source"] = True # 这是内置技能来源+ meta["has_evolutions"] = False+ # 不在列表中返回 body+ meta.pop("body", None)+ results.append(meta)++ return results+def _resolve_skill_source(self, skill_name: str) -> str:"""解析 skill 来源(local / project / marketplace 名称)."""if not skill_name:diff --git a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/AI_ANALYSIS_TASKS.md b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/AI_ANALYSIS_TASKS.mdsimilarity index 100%rename from jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/AI_ANALYSIS_TASKS.mdrename to jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/AI_ANALYSIS_TASKS.mddiff --git a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/SKILL.md b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/SKILL.mdsimilarity index 100%rename from jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/SKILL.mdrename to jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/SKILL.mddiff --git a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/analyzers/__init__.py b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/analyzers/__init__.pysimilarity index 100%rename from jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/analyzers/__init__.pyrename to jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/analyzers/__init__.pydiff --git a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/analyzers/ai_analyzer.py b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/analyzers/ai_analyzer.pysimilarity index 100%rename from jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/analyzers/ai_analyzer.pyrename to jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/analyzers/ai_analyzer.pydiff --git a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/analyzers/work_analyzer.py b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/analyzers/work_analyzer.pysimilarity index 100%rename from jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/analyzers/work_analyzer.pyrename to jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/analyzers/work_analyzer.pydiff --git a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/collectors/__init__.py b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/collectors/__init__.pysimilarity index 100%rename from jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/collectors/__init__.pyrename to jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/collectors/__init__.pydiff --git a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/collectors/aggregator.py b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/collectors/aggregator.pysimilarity index 100%rename from jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/collectors/aggregator.pyrename to jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/collectors/aggregator.pydiff --git a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/collectors/email_collector.py b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/collectors/email_collector.pysimilarity index 100%rename from jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/collectors/email_collector.pyrename to jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/collectors/email_collector.pydiff --git a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/collectors/git_collector.py b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/collectors/git_collector.pysimilarity index 100%rename from jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/collectors/git_collector.pyrename to jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/collectors/git_collector.pydiff --git a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/collectors/memory_collector.py b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/collectors/memory_collector.pysimilarity index 100%rename from jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/collectors/memory_collector.pyrename to jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/collectors/memory_collector.pydiff --git a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/collectors/todo_collector.py b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/collectors/todo_collector.pysimilarity index 100%rename from jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/collectors/todo_collector.pyrename to jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/collectors/todo_collector.pydiff --git a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/generators/__init__.py b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/generators/__init__.pysimilarity index 100%rename from jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/generators/__init__.pyrename to jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/generators/__init__.pydiff --git a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/generators/report_generator.py b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/generators/report_generator.pysimilarity index 100%rename from jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/generators/report_generator.pyrename to jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/generators/report_generator.pydiff --git a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/report_helper.py b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/report_helper.pysimilarity index 100%rename from jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/report_helper.pyrename to jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/report_helper.pydiff --git a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/run_report.py b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/run_report.pysimilarity index 100%rename from jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/daily-report/run_report.pyrename to jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/run_report.pydiff --git a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/delayed-restart-app/SKILL.md b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/delayed-restart-app/SKILL.mdindex 792fe490f0..e34272be58 100644--- a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/delayed-restart-app/SKILL.md+++ b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/delayed-restart-app/SKILL.md@@ -1,5 +1,5 @@----name: restart-own-service+name: delayed-restart-appdescription: 安排延迟重启本 Agent 所在的服务(jiuwenclaw app)。执行后当前 Agent 进程会被终止并重新启动,当前会话会断开。用于用户要求重启、配置更新需生效、或服务异常需重载时。使用 bash 调用脚本。---diff --git a/jiuwenclaw/utils.py b/jiuwenclaw/utils.pyindex f344928757..0182e5f6ae 100644--- a/jiuwenclaw/utils.py+++ b/jiuwenclaw/utils.py@@ -456,7 +456,6 @@ def prepare_workspace(overwrite: bool = True, preferred_language: Optional[str]else:deepagent_workspace.mkdir(parents=True, exist_ok=True)_copy_dir(template_agent_memory, agent_memory, ignore_patterns=("*_ZH.md", "*_EN.md"))- _copy_dir(template_agent_skills, agent_skills)# Copy multi-language files based on resolved language# Files with _ZH/_EN suffix are copied to the workspace without suffix@@ -699,7 +698,13 @@ def get_deepagent_user_md_path() -> Path:def get_builtin_skills_dir() -> Path:"""Get the built-in skills directory from package resources."""package_root = _find_package_root()- return package_root / "resources" / "agent" / "skills"+ # 优先检查 jiuwenclaw_workspace/skills 目录(标准布局)+ primary_path = package_root / "resources" / "agent" / "jiuwenclaw_workspace" / "skills"+ if primary_path.exists() and primary_path.is_dir():+ return primary_path+ # 回退到 skills 目录+ fallback_path = package_root / "resources" / "agent" / "skills"+ return fallback_pathdef get_agent_sessions_dir() -> Path:diff --git a/jiuwenclaw/web/src/components/SkillPanel/index.tsx b/jiuwenclaw/web/src/components/SkillPanel/index.tsxindex ca7f5ca658..c517dae77c 100644--- a/jiuwenclaw/web/src/components/SkillPanel/index.tsx+++ b/jiuwenclaw/web/src/components/SkillPanel/index.tsx@@ -29,6 +29,8 @@ type SkillItem = {origin?: string;/** 是否为内置技能(不允许删除) */is_builtin?: boolean;+ /** 是否为内置技能的来源(源码中存在内置版本) */+ is_builtin_source?: boolean;/** 本地技能目录是否存在 evolutions.json */has_evolutions?: boolean;};@@ -62,9 +64,11 @@ interface SkillPanelProps {onNavigateToConfig?: () => void;}-function getSourceLabel(source: string, t: (key: string) => string): string {+function getSourceLabel(source: string, t: (key: string) => string, isBuiltinSource?: boolean): string {+ if (isBuiltinSource) return t('skills.source.builtin');if (source === "local") return t('skills.source.local');if (source === "project") return t('skills.source.project');+ if (source === "builtin") return t('skills.source.builtin');return source || t('skills.source.unknown');}@@ -265,10 +269,43 @@ export function SkillPanel({ sessionId, onNavigateToConfig }: SkillPanelProps) {const handleInstall = useCallback(async (skillName?: string) => {- const marketplaceNames = marketplaces.map((m) => m.name).join(", ");const targetSkill = skillName? skills.find((skill) => skill.name === skillName): undefined;++ // 内置技能的安装:自动使用 builtin marketplace,不需要用户输入+ if (targetSkill?.is_builtin && targetSkill?.is_builtin_source) {+ const spec = `${skillName}@builtin`;+ setActionTarget(spec);+ setMessage(null);+ setMessageType(null);+ try {+ const data = await webRequest<{+ success: boolean;+ detail?: string;+ message?: string;+ }>("skills.install", withSession({ spec, force: false }));+ if (!data.success) {+ throw new Error(data.detail || data.message || t('skills.errors.installFailed'));+ }+ setMessage(t('skills.messages.installed', { spec }));+ setMessageType("success");+ await fetchSkills();+ if (selectedSkill) {+ await fetchSkillDetail(selectedSkill.name);+ }+ } catch (error) {+ console.error(error);+ setMessage(t('skills.errors.installFailedHint'));+ setMessageType("error");+ } finally {+ setActionTarget(null);+ }+ return;+ }++ // 其他技能的安装:提示用户输入 spec+ const marketplaceNames = marketplaces.map((m) => m.name).join(", ");const preferredMarketplace =targetSkill?.marketplace ||(targetSkill &&@@ -316,7 +353,7 @@ export function SkillPanel({ sessionId, onNavigateToConfig }: SkillPanelProps) {setActionTarget(null);}},- [fetchSkills, fetchSkillDetail, selectedSkill, marketplaces, skills, withSession]+ [fetchSkills, fetchSkillDetail, selectedSkill, marketplaces, skills, withSession, t]);const handleImportLocal = useCallback(async () => {@@ -394,14 +431,19 @@ export function SkillPanel({ sessionId, onNavigateToConfig }: SkillPanelProps) {const renderActionButton = (skill: SkillItem) => {const plugin = installedSkillMap.get(skill.name);- // 内置技能不允许卸载- if (skill.is_builtin) {+ // 未安装到用户目录的内置技能(来自内置目录,需要安装)+ // 判断条件:is_builtin_source 为 true 且不在已安装列表中+ const isInstalled = installedSkillMap.has(skill.name) || skill.source === "local";+ if (skill.is_builtin_source && !isInstalled) {return (<button- className="px-3 py-1.5 rounded-md text-sm bg-secondary text-text-muted cursor-not-allowed whitespace-nowrap"- disabled+ onClick={(event) => {+ event.stopPropagation();+ handleInstall(skill.name);+ }}+ className={`px-3 py-1.5 rounded-md text-sm transition-colors whitespace-nowrap bg-accent text-white hover:bg-accent-hover`}>- {t('skills.builtIn')}+ {t('skills.actions.install')}</button>);}@@ -470,6 +512,29 @@ export function SkillPanel({ sessionId, onNavigateToConfig }: SkillPanelProps) {);}+ // 已安装到用户目录的内置技能(从内置目录复制过来的)+ // 这种情况下 source 可能是 "project",但 is_builtin_source 为 true+ // 只对已安装的内置技能显示卸载按钮+ if (skill.is_builtin_source && isInstalled) {+ const isLoading = actionTarget === skill.name;+ return (+ <button+ onClick={(event) => {+ event.stopPropagation();+ handleUninstall(skill.name);+ }}+ className={`px-3 py-1.5 rounded-md text-sm transition-colors whitespace-nowrap ${+ isLoading+ ? "bg-secondary text-text-muted cursor-not-allowed"+ : "bg-danger text-white hover:bg-danger/90"+ }`}+ disabled={isLoading}+ >+ {t('skills.actions.uninstall')}+ </button>+ );+ }+// 默认显示内置(兜底)return (<button@@ -482,9 +547,12 @@ export function SkillPanel({ sessionId, onNavigateToConfig }: SkillPanelProps) {};const renderStatus = (skill: SkillItem) => {- if (skill.is_builtin) return t('skills.status.installed');if (installedSkillMap.has(skill.name)) return t('skills.status.installed');if (skill.source === "local") return t('skills.status.installed');+ if (skill.is_builtin) {+ // 未安装的内置技能+ return t('skills.status.notInstalled');+ }if (skill.source !== "project") return t('skills.status.notInstalled');return t('skills.status.builtIn');};@@ -593,7 +661,7 @@ export function SkillPanel({ sessionId, onNavigateToConfig }: SkillPanelProps) {</div><div className="flex flex-wrap gap-2 mt-3 text-xs text-text-muted"><span className="px-2 py-1 rounded-full bg-secondary border border-border">- {t('skills.sourceLabel')}: {getSourceLabel(selectedSkill.source, t)}+ {t('skills.sourceLabel')}: {getSourceLabel(selectedSkill.source, t, selectedSkill.is_builtin_source)}</span><span className="px-2 py-1 rounded-full bg-secondary border border-border">{t('skills.versionLabel')}: {selectedSkill.version || 'unknown'}@@ -685,7 +753,7 @@ export function SkillPanel({ sessionId, onNavigateToConfig }: SkillPanelProps) {</div><div className="flex flex-wrap gap-2 mt-3 text-xs text-text-muted"><span className="px-2 py-1 rounded-full bg-secondary border border-border">- {t('skills.sourceLabel')}: {getSourceLabel(skill.source, t)}+ {t('skills.sourceLabel')}: {getSourceLabel(skill.source, t, skill.is_builtin_source)}</span><span className="px-2 py-1 rounded-full bg-secondary border border-border">{t('skills.statusLabel')}: {renderStatus(skill)}diff --git a/jiuwenclaw/web/src/i18n/locales/en.json b/jiuwenclaw/web/src/i18n/locales/en.jsonindex d01b20939f..bdb1e63e4e 100644--- a/jiuwenclaw/web/src/i18n/locales/en.json+++ b/jiuwenclaw/web/src/i18n/locales/en.json@@ -532,6 +532,7 @@"source": {"local": "Local","project": "Project",+ "builtin": "Built-in","unknown": "Unknown"},"sourceLabel": "Source",diff --git a/jiuwenclaw/web/src/i18n/locales/zh.json b/jiuwenclaw/web/src/i18n/locales/zh.jsonindex e3a804501d..b3ddb4d969 100644--- a/jiuwenclaw/web/src/i18n/locales/zh.json+++ b/jiuwenclaw/web/src/i18n/locales/zh.json@@ -532,6 +532,7 @@"source": {"local": "本地","project": "项目",+ "builtin": "内置","unknown": "未知"},"sourceLabel": "来源",