claudeup 3.8.0 → 3.9.0

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.
@@ -64,6 +64,14 @@ export const initialState: AppState = {
64
64
  selectedIndex: 0,
65
65
  profiles: { status: "idle" },
66
66
  },
67
+
68
+ skills: {
69
+ scope: "user",
70
+ selectedIndex: 0,
71
+ searchQuery: "",
72
+ skills: { status: "idle" },
73
+ updateStatus: null,
74
+ },
67
75
  };
68
76
 
69
77
  export function appReducer(state: AppState, action: AppAction): AppState {
@@ -477,6 +485,97 @@ export function appReducer(state: AppState, action: AppAction): AppState {
477
485
  },
478
486
  };
479
487
 
488
+ // =========================================================================
489
+ // Skills Screen
490
+ // =========================================================================
491
+ case "SKILLS_SET_SCOPE":
492
+ return {
493
+ ...state,
494
+ skills: {
495
+ ...state.skills,
496
+ scope: action.scope,
497
+ selectedIndex: 0,
498
+ skills: { status: "loading" },
499
+ },
500
+ };
501
+
502
+ case "SKILLS_TOGGLE_SCOPE":
503
+ return appReducer(state, {
504
+ type: "SKILLS_SET_SCOPE",
505
+ scope: state.skills.scope === "user" ? "project" : "user",
506
+ });
507
+
508
+ case "SKILLS_SELECT":
509
+ return {
510
+ ...state,
511
+ skills: {
512
+ ...state.skills,
513
+ selectedIndex: action.index,
514
+ },
515
+ };
516
+
517
+ case "SKILLS_SET_SEARCH":
518
+ return {
519
+ ...state,
520
+ skills: {
521
+ ...state.skills,
522
+ searchQuery: action.query,
523
+ selectedIndex: 0,
524
+ },
525
+ };
526
+
527
+ case "SKILLS_DATA_LOADING":
528
+ return {
529
+ ...state,
530
+ skills: {
531
+ ...state.skills,
532
+ skills: { status: "loading" },
533
+ },
534
+ };
535
+
536
+ case "SKILLS_DATA_SUCCESS":
537
+ return {
538
+ ...state,
539
+ skills: {
540
+ ...state.skills,
541
+ skills: { status: "success", data: action.skills },
542
+ },
543
+ };
544
+
545
+ case "SKILLS_DATA_ERROR":
546
+ return {
547
+ ...state,
548
+ skills: {
549
+ ...state.skills,
550
+ skills: { status: "error", error: action.error },
551
+ },
552
+ };
553
+
554
+ case "SKILLS_UPDATE_STATUS":
555
+ return {
556
+ ...state,
557
+ skills: {
558
+ ...state.skills,
559
+ updateStatus: action.updates,
560
+ },
561
+ };
562
+
563
+ case "SKILLS_UPDATE_ITEM": {
564
+ if (state.skills.skills.status !== "success") return state;
565
+ return {
566
+ ...state,
567
+ skills: {
568
+ ...state.skills,
569
+ skills: {
570
+ status: "success",
571
+ data: state.skills.skills.data.map((s) =>
572
+ s.name === action.name ? { ...s, ...action.updates } : s,
573
+ ),
574
+ },
575
+ },
576
+ };
577
+ }
578
+
480
579
  // =========================================================================
481
580
  // Modals
482
581
  // =========================================================================
@@ -3,6 +3,7 @@ import type {
3
3
  McpServer,
4
4
  StatusLineConfig,
5
5
  ProfileEntry,
6
+ SkillInfo,
6
7
  } from "../../types/index.js";
7
8
  import type { PluginInfo } from "../../services/plugin-manager.js";
8
9
 
@@ -17,7 +18,8 @@ export type Screen =
17
18
  | "settings"
18
19
  | "cli-tools"
19
20
  | "model-selector"
20
- | "profiles";
21
+ | "profiles"
22
+ | "skills";
21
23
 
22
24
  export type Route =
23
25
  | { screen: "plugins" }
@@ -26,7 +28,8 @@ export type Route =
26
28
  | { screen: "settings" }
27
29
  | { screen: "cli-tools" }
28
30
  | { screen: "model-selector" }
29
- | { screen: "profiles" };
31
+ | { screen: "profiles" }
32
+ | { screen: "skills" };
30
33
 
31
34
  // ============================================================================
32
35
  // Async Data Types
@@ -168,6 +171,16 @@ export interface ProfilesScreenState {
168
171
  profiles: AsyncData<ProfileEntry[]>;
169
172
  }
170
173
 
174
+ export interface SkillsScreenState {
175
+ scope: "user" | "project";
176
+ selectedIndex: number;
177
+ searchQuery: string;
178
+ /** Available skills from Tree API, cross-referenced with lock files */
179
+ skills: AsyncData<SkillInfo[]>;
180
+ /** Null until check completes; then Map<skillName, hasUpdate> */
181
+ updateStatus: Map<string, boolean> | null;
182
+ }
183
+
171
184
  // ============================================================================
172
185
  // App State
173
186
  // ============================================================================
@@ -197,6 +210,7 @@ export interface AppState {
197
210
  cliTools: CliToolsScreenState;
198
211
  modelSelector: ModelSelectorScreenState;
199
212
  profiles: ProfilesScreenState;
213
+ skills: SkillsScreenState;
200
214
  }
201
215
 
202
216
  // ============================================================================
@@ -288,5 +302,16 @@ export type AppAction =
288
302
  | { type: "PROFILES_DATA_SUCCESS"; profiles: ProfileEntry[] }
289
303
  | { type: "PROFILES_DATA_ERROR"; error: Error }
290
304
 
305
+ // Skills screen
306
+ | { type: "SKILLS_SET_SCOPE"; scope: "user" | "project" }
307
+ | { type: "SKILLS_TOGGLE_SCOPE" }
308
+ | { type: "SKILLS_SELECT"; index: number }
309
+ | { type: "SKILLS_SET_SEARCH"; query: string }
310
+ | { type: "SKILLS_DATA_LOADING" }
311
+ | { type: "SKILLS_DATA_SUCCESS"; skills: SkillInfo[] }
312
+ | { type: "SKILLS_DATA_ERROR"; error: Error }
313
+ | { type: "SKILLS_UPDATE_STATUS"; updates: Map<string, boolean> }
314
+ | { type: "SKILLS_UPDATE_ITEM"; name: string; updates: Partial<SkillInfo> }
315
+
291
316
  // Data refresh - triggers screens to refetch
292
317
  | { type: "DATA_REFRESH_COMPLETE" };