fix installed skills discovery and improve editor UX (#1296)

* fix skills discovery from opencode

* Fix stale skill description after frontmatter removal

* fix: align vscode skill discovery parity
This commit is contained in:
jkker
2026-05-23 20:58:12 +03:00
committed by GitHub
parent fd01a0ba62
commit 1663185a75
13 changed files with 635 additions and 65 deletions
+13 -1
View File
@@ -2,7 +2,7 @@ import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path';
import * as vscode from 'vscode';
import { type DiscoveredSkill, type SkillScope, type SkillSource } from './opencodeConfig';
import { BUILT_IN_SKILL_LOCATION, type DiscoveredSkill, type SkillScope, type SkillSource } from './opencodeConfig';
import type { BridgeContext } from './bridge';
const SETTINGS_KEY = 'openchamber.settings';
@@ -129,9 +129,20 @@ export const fetchOpenCodeSkillsFromApi = async (
const name = typeof item?.name === 'string' ? item.name.trim() : '';
const location = typeof item?.location === 'string' ? item.location : '';
const description = typeof item?.description === 'string' ? item.description : '';
const content = typeof item?.content === 'string' ? item.content : '';
if (!name || !location) {
return null;
}
if (location === BUILT_IN_SKILL_LOCATION) {
return {
name,
path: location,
scope: 'user',
source: 'opencode',
description,
content,
} as DiscoveredSkill;
}
const inferred = inferSkillScopeAndSourceFromLocation(location, workingDirectory);
return {
name,
@@ -139,6 +150,7 @@ export const fetchOpenCodeSkillsFromApi = async (
scope: inferred.scope,
source: inferred.source,
description,
content,
} as DiscoveredSkill;
})
.filter((item): item is DiscoveredSkill => item !== null);