@skillsgate/tui 0.1.12 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -8
- package/src/components/help-overlay.tsx +2 -4
- package/src/components/layout.tsx +8 -34
- package/src/components/status-bar.tsx +4 -7
- package/src/data/api-client.ts +78 -109
- package/src/data/use-favorites.ts +18 -4
- package/src/data/use-installed-skills.ts +173 -85
- package/src/data/use-search.ts +14 -31
- package/src/data/use-skill-actions.ts +68 -16
- package/src/db/migrations.ts +20 -0
- package/src/db/skills-cache.ts +89 -0
- package/src/views/discover.tsx +33 -126
- package/src/views/favorites.tsx +10 -354
- package/src/views/settings.tsx +0 -6
- package/src/views/skill-detail.tsx +15 -14
- package/tmp.json +0 -0
|
@@ -6,6 +6,7 @@ import { useKeyboard } from "@opentui/react"
|
|
|
6
6
|
import { useStore, useDispatch } from "../store/context.js"
|
|
7
7
|
import { useSkillActions } from "../data/use-skill-actions.js"
|
|
8
8
|
import { ConfirmDialog } from "../components/confirm-dialog.js"
|
|
9
|
+
import { fetchSkillContent } from "../data/api-client.js"
|
|
9
10
|
import { colors, agentBadges as badgeMap } from "../utils/colors.js"
|
|
10
11
|
import { agents } from "../../../cli/src/core/agents.js"
|
|
11
12
|
|
|
@@ -75,19 +76,15 @@ export function SkillDetailView() {
|
|
|
75
76
|
return
|
|
76
77
|
}
|
|
77
78
|
|
|
78
|
-
// Catalog skill: fetch content from
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
if (
|
|
79
|
+
// Catalog skill: fetch SKILL.md content from GitHub
|
|
80
|
+
const source = skill.metadata?.source as string | undefined
|
|
81
|
+
const skillId = skill.metadata?.skillId as string | undefined
|
|
82
|
+
if (source && skillId) {
|
|
82
83
|
setContentLoading(true)
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
.then(res => res.ok ? res.json() : null)
|
|
88
|
-
.then((data: any) => {
|
|
89
|
-
if (data?.content) {
|
|
90
|
-
setContent(stripFrontmatter(data.content))
|
|
84
|
+
fetchSkillContent(source, skillId)
|
|
85
|
+
.then((md) => {
|
|
86
|
+
if (md) {
|
|
87
|
+
setContent(stripFrontmatter(md))
|
|
91
88
|
} else {
|
|
92
89
|
setContent(skill.description || "(No content available)")
|
|
93
90
|
}
|
|
@@ -424,8 +421,12 @@ export function SkillDetailView() {
|
|
|
424
421
|
<text>{" "}</text>
|
|
425
422
|
|
|
426
423
|
{/* Description */}
|
|
427
|
-
|
|
428
|
-
|
|
424
|
+
{skill.description ? (
|
|
425
|
+
<>
|
|
426
|
+
<text fg={colors.text}>{skill.description}</text>
|
|
427
|
+
<text>{" "}</text>
|
|
428
|
+
</>
|
|
429
|
+
) : null}
|
|
429
430
|
|
|
430
431
|
{/* Source */}
|
|
431
432
|
<text fg={colors.textDim}>Source</text>
|
package/tmp.json
ADDED
|
File without changes
|