Skip to content

Commit ce04b10

Browse files
committed
feat($skill): add skill list to State + bootstrap fetch for popover data
- State.skill[] added for available skill list (name, description, location, content) - Bootstrap: input.sdk.app.skills() fetch with catch (non-blocking) - child-store: skill: [] in initial state - test: skill: [] in baseState - This provides the data source for the $ skill popover
1 parent 9aaa29f commit ce04b10

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

packages/app/src/context/global-sync/bootstrap.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ export async function bootstrapDirectory(input: {
151151
Promise.all([
152152
input.sdk.path.get().then((x) => input.setStore("path", x.data!)),
153153
input.sdk.command.list().then((x) => input.setStore("command", x.data ?? [])),
154+
// Load available skills for $ popover (non-blocking — popover shows empty state until loaded)
155+
input.sdk.app.skills().then((x) => input.setStore("skill", x.data ?? [])).catch(() => {}),
154156
input.sdk.session.status().then((x) => input.setStore("session_status", x.data!)),
155157
input.loadSessions(input.directory),
156158
input.sdk.mcp.status().then((x) => input.setStore("mcp", x.data!)),

packages/app/src/context/global-sync/child-store.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ export function createChildStoreManager(input: {
164164
path: { state: "", config: "", worktree: "", directory: "", home: "" },
165165
status: "loading" as const,
166166
agent: [],
167+
skill: [],
167168
command: [],
168169
session: [],
169170
sessionTotal: 0,

packages/app/src/context/global-sync/event-reducer.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ const baseState = (input: Partial<State> = {}) =>
6161
({
6262
status: "complete",
6363
agent: [],
64+
skill: [],
6465
command: [],
6566
project: "",
6667
projectMeta: undefined,

packages/app/src/context/global-sync/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export type ProjectMeta = {
3434
export type State = {
3535
status: "loading" | "partial" | "complete"
3636
agent: Agent[]
37+
skill: { name: string; description: string; location: string; content: string }[]
3738
command: Command[]
3839
project: string
3940
projectMeta: ProjectMeta | undefined

0 commit comments

Comments
 (0)