feat: add skill installer (#279)

* feat: add skill installer with install/uninstall and settings UI

* feat: refactor skill installer with extracted SkillLibraryList component

* feat: simplify SkillsEditor, extract SkillLibraryList

* feat: refactor skill installer components and add github utility
This commit is contained in:
Chris Scott authored and GitHub committed 2026-06-17 23:11:29 -04:00
1 parent 24d34f28a3
commit 6e80cdfb8c
24 files changed
+2381 -577

No files matched your search

+3 -14
View File
@@ -1,4 +1,5 @@
import type { GitCredential } from '@opencode-manager/shared'
import { githubFetch } from './github'
export function isGitHubHttpsUrl(repoUrl: string): boolean {
const url = normalizeGitCredentialUrl(repoUrl)
@@ -202,20 +203,8 @@ export function createGitIdentityEnv(identity: GitIdentity): Record<string, stri
export async function fetchGitHubUserInfo(token: string): Promise<GitHubUserInfo | null> {
try {
const [userResponse, emailsResponse] = await Promise.all([
fetch('https://api.github.com/user', {
headers: {
'Authorization': `Bearer ${token}`,
'Accept': 'application/vnd.github+json',
'X-GitHub-Api-Version': '2022-11-28'
}
}),
fetch('https://api.github.com/user/emails', {
headers: {
'Authorization': `Bearer ${token}`,
'Accept': 'application/vnd.github+json',
'X-GitHub-Api-Version': '2022-11-28'
}
})
githubFetch('https://api.github.com/user', { token, apiVersion: '2022-11-28' }),
githubFetch('https://api.github.com/user/emails', { token, apiVersion: '2022-11-28' }),
])
if (!userResponse.ok) return null