fix(omp): hide the Oh My Pi choice when importing skills

Like Pi, Oh My Pi's skill state is whether the directory exists in its
native skills folder, and the import overwrites the submitted choice with
that fact. Showing the checkbox let users tick an option with no effect.
This commit is contained in:
Jason authored and Jason Young committed 2026-10-24 15:30:32 +08:00
1 parent d9422e7d6a
commit d01daa0d65
1 file changed
+6 -3
+6 -3
View File
@@ -11,8 +11,11 @@ import { cn } from "@/lib/utils";
import { MatrixSearch } from "@/components/mcp/AppMatrix";
import { CHECKBOX_CLASS, V7Dialog } from "@/components/mcp/formBits";
/** Pi 的启用状态由 ~/.pi/agent/skills 里有没有这个目录决定,导入时不勾选 */
const IMPORT_APP_IDS = SKILLS_APP_IDS.filter((app) => app !== "pi");
/** Pi 与 Oh My Pi 的启用状态由各自原生 skills 目录里有没有这个目录决定,导入时不勾选 */
const NATIVE_DIR_APPS: AppId[] = ["pi", "omp"];
const IMPORT_APP_IDS = SKILLS_APP_IDS.filter(
(app) => !NATIVE_DIR_APPS.includes(app),
);
interface SkillImportDialogProps {
skills: UnmanagedSkill[];
@@ -46,7 +49,7 @@ export function SkillImportDialog({
const set = new Set<AppId>();
for (const skill of skills) {
for (const found of skill.foundIn) {
if (isAppId(found) && found !== "pi" && found !== "omp") set.add(found);
if (isAppId(found) && !NATIVE_DIR_APPS.includes(found)) set.add(found);
}
}
return set;