claudeup 4.35.1 → 4.37.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.
Files changed (72) hide show
  1. package/package.json +4 -4
  2. package/src/__tests__/catalog-cache-store.test.ts +271 -0
  3. package/src/__tests__/catalog-notice.test.ts +155 -0
  4. package/src/__tests__/github-budget.test.ts +200 -0
  5. package/src/__tests__/plugin-manager-fallback.test.ts +200 -8
  6. package/src/__tests__/scope-squares.test.tsx +165 -0
  7. package/src/__tests__/theme-adaptive-colors.test.ts +307 -0
  8. package/src/__tests__/uppercase-keybindings.test.ts +101 -0
  9. package/src/main.tsx +21 -5
  10. package/src/opentui.d.ts +21 -12
  11. package/src/services/catalog-cache-store.ts +218 -0
  12. package/src/services/github-budget.ts +274 -0
  13. package/src/services/marketplace-catalog-git.ts +170 -0
  14. package/src/services/marketplace-catalog.ts +95 -0
  15. package/src/services/marketplace-fetcher.ts +310 -87
  16. package/src/services/plugin-manager.ts +103 -92
  17. package/src/ui/App.tsx +19 -12
  18. package/src/ui/adapters/catalogNotice.ts +122 -0
  19. package/src/ui/adapters/pluginsAdapter.ts +174 -168
  20. package/src/ui/adapters/settingsAdapter.ts +119 -116
  21. package/src/ui/adapters/skillsAdapter.ts +203 -196
  22. package/src/ui/components/CategoryHeader.tsx +9 -8
  23. package/src/ui/components/EmptyFilterState.tsx +10 -5
  24. package/src/ui/components/FlagDetailEditor.tsx +0 -0
  25. package/src/ui/components/ScopeIndicator.tsx +10 -6
  26. package/src/ui/components/ScrollableList.tsx +3 -2
  27. package/src/ui/components/SearchInput.tsx +2 -1
  28. package/src/ui/components/StyledText.tsx +5 -4
  29. package/src/ui/components/TabBar.tsx +4 -3
  30. package/src/ui/components/layout/FooterHints.tsx +37 -30
  31. package/src/ui/components/layout/Panel.tsx +6 -5
  32. package/src/ui/components/layout/ProgressBar.tsx +7 -6
  33. package/src/ui/components/layout/ScopeTabs.tsx +6 -5
  34. package/src/ui/components/layout/ScreenLayout.tsx +46 -26
  35. package/src/ui/components/layout/index.ts +3 -3
  36. package/src/ui/components/modals/ConfirmModal.tsx +12 -11
  37. package/src/ui/components/modals/InputModal.tsx +14 -6
  38. package/src/ui/components/modals/LoadingModal.tsx +6 -5
  39. package/src/ui/components/modals/MessageModal.tsx +9 -8
  40. package/src/ui/components/modals/SelectModal.tsx +11 -7
  41. package/src/ui/components/modals/VersionMismatchModal.tsx +14 -16
  42. package/src/ui/components/primitives/ActionHints.tsx +26 -26
  43. package/src/ui/components/primitives/DetailSection.tsx +13 -12
  44. package/src/ui/components/primitives/KeyValueLine.tsx +9 -8
  45. package/src/ui/components/primitives/ListCategoryRow.tsx +25 -27
  46. package/src/ui/components/primitives/MetaText.tsx +3 -3
  47. package/src/ui/components/primitives/ScopeDetail.tsx +48 -48
  48. package/src/ui/components/primitives/ScopeSquares.tsx +47 -22
  49. package/src/ui/components/primitives/SelectableRow.tsx +22 -16
  50. package/src/ui/hooks/useGitignoreModal.ts +78 -74
  51. package/src/ui/registry.ts +11 -11
  52. package/src/ui/renderers/cliToolRenderers.tsx +260 -203
  53. package/src/ui/renderers/gitignoreRenderers.tsx +43 -42
  54. package/src/ui/renderers/mcpRenderers.tsx +121 -117
  55. package/src/ui/renderers/pluginRenderers.tsx +566 -471
  56. package/src/ui/renderers/profileRenderers.tsx +346 -300
  57. package/src/ui/renderers/settingsRenderers.tsx +183 -176
  58. package/src/ui/renderers/skillRenderers.tsx +410 -326
  59. package/src/ui/screens/AliasScreen.tsx +1336 -1309
  60. package/src/ui/screens/CliToolsScreen.tsx +92 -40
  61. package/src/ui/screens/EnvVarsScreen.tsx +19 -13
  62. package/src/ui/screens/GitignoreScreen.tsx +510 -493
  63. package/src/ui/screens/McpRegistryScreen.tsx +28 -21
  64. package/src/ui/screens/McpScreen.tsx +12 -3
  65. package/src/ui/screens/PluginsScreen.tsx +152 -33
  66. package/src/ui/screens/ProfilesScreen.tsx +39 -23
  67. package/src/ui/screens/SkillsScreen.tsx +832 -688
  68. package/src/ui/state/reducer.ts +11 -2
  69. package/src/ui/state/types.ts +16 -1
  70. package/src/ui/theme-mode.ts +73 -0
  71. package/src/ui/theme.ts +147 -53
  72. package/src/utils/config-dir.ts +47 -0
@@ -11,86 +11,90 @@ import type { ModalState } from "../state/types.js";
11
11
  */
12
12
 
13
13
  export interface BuildModalArgs {
14
- violationCount: number;
15
- safeCount: number;
16
- onFixSafe: () => void;
17
- onOpenTab: () => void;
18
- onDismiss: () => void;
14
+ violationCount: number;
15
+ safeCount: number;
16
+ onFixSafe: () => void;
17
+ onOpenTab: () => void;
18
+ onDismiss: () => void;
19
19
  }
20
20
 
21
21
  export function buildGitignoreModal(args: BuildModalArgs): ModalState {
22
- const { violationCount, safeCount, onFixSafe, onOpenTab, onDismiss } = args;
23
- const options = [
24
- {
25
- label:
26
- safeCount > 0
27
- ? `Add ${safeCount} missing .gitignore entr${safeCount === 1 ? "y" : "ies"}`
28
- : "(no missing .gitignore entries)",
29
- value: "fix-safe",
30
- },
31
- {
32
- label: "Open Git State tab to review",
33
- value: "open-tab",
34
- },
35
- {
36
- label: "Dismiss",
37
- value: "dismiss",
38
- },
39
- ];
40
- return {
41
- type: "select",
42
- title: "Gitignore violations detected",
43
- message:
44
- `Found ${violationCount} managed gitignore item(s) that do not match ` +
45
- `the current repo state.\n\n` +
46
- `Missing .gitignore entries can be added now. Items that change git ` +
47
- `tracking are reviewed and fixed from the Gitignore tab.`,
48
- options,
49
- onSelect: (value: string) => {
50
- if (value === "fix-safe") onFixSafe();
51
- else if (value === "open-tab") onOpenTab();
52
- else onDismiss();
53
- },
54
- onCancel: onDismiss,
55
- };
22
+ const { violationCount, safeCount, onFixSafe, onOpenTab, onDismiss } = args;
23
+ const options = [
24
+ {
25
+ label:
26
+ safeCount > 0
27
+ ? `Add ${safeCount} missing .gitignore entr${safeCount === 1 ? "y" : "ies"}`
28
+ : "(no missing .gitignore entries)",
29
+ value: "fix-safe",
30
+ },
31
+ {
32
+ label: "Open Git State tab to review",
33
+ value: "open-tab",
34
+ },
35
+ {
36
+ label: "Dismiss",
37
+ value: "dismiss",
38
+ },
39
+ ];
40
+ return {
41
+ type: "select",
42
+ title: "Gitignore violations detected",
43
+ message:
44
+ `Found ${violationCount} managed gitignore item(s) that do not match ` +
45
+ `the current repo state.\n\n` +
46
+ `Missing .gitignore entries can be added now. Items that change git ` +
47
+ `tracking are reviewed and fixed from the Gitignore tab.`,
48
+ options,
49
+ onSelect: (value: string) => {
50
+ if (value === "fix-safe") onFixSafe();
51
+ else if (value === "open-tab") onOpenTab();
52
+ else onDismiss();
53
+ },
54
+ onCancel: onDismiss,
55
+ };
56
56
  }
57
57
 
58
58
  export function useGitignoreModal() {
59
- const { dispatch } = useApp();
60
- const { navigateToScreen } = useNavigation();
59
+ const { dispatch } = useApp();
60
+ const { navigateToScreen } = useNavigation();
61
61
 
62
- const show = useCallback(
63
- (args: { violationCount: number; safeCount: number; onFixSafe: () => Promise<void> | void }) => {
64
- if (args.violationCount === 0) return;
65
- const dismiss = () => dispatch({ type: "HIDE_MODAL" });
66
- const modal = buildGitignoreModal({
67
- violationCount: args.violationCount,
68
- safeCount: args.safeCount,
69
- onFixSafe: () => {
70
- dispatch({ type: "HIDE_MODAL" });
71
- void Promise.resolve(args.onFixSafe()).catch((err) => {
72
- dispatch({
73
- type: "SHOW_MODAL",
74
- modal: {
75
- type: "message",
76
- title: "Safe fixes failed",
77
- message: err instanceof Error ? err.message : String(err),
78
- variant: "error",
79
- onDismiss: dismiss,
80
- },
81
- });
82
- });
83
- },
84
- onOpenTab: () => {
85
- dispatch({ type: "HIDE_MODAL" });
86
- navigateToScreen("gitignore");
87
- },
88
- onDismiss: dismiss,
89
- });
90
- dispatch({ type: "SHOW_MODAL", modal });
91
- },
92
- [dispatch, navigateToScreen],
93
- );
62
+ const show = useCallback(
63
+ (args: {
64
+ violationCount: number;
65
+ safeCount: number;
66
+ onFixSafe: () => Promise<void> | void;
67
+ }) => {
68
+ if (args.violationCount === 0) return;
69
+ const dismiss = () => dispatch({ type: "HIDE_MODAL" });
70
+ const modal = buildGitignoreModal({
71
+ violationCount: args.violationCount,
72
+ safeCount: args.safeCount,
73
+ onFixSafe: () => {
74
+ dispatch({ type: "HIDE_MODAL" });
75
+ void Promise.resolve(args.onFixSafe()).catch((err) => {
76
+ dispatch({
77
+ type: "SHOW_MODAL",
78
+ modal: {
79
+ type: "message",
80
+ title: "Safe fixes failed",
81
+ message: err instanceof Error ? err.message : String(err),
82
+ variant: "error",
83
+ onDismiss: dismiss,
84
+ },
85
+ });
86
+ });
87
+ },
88
+ onOpenTab: () => {
89
+ dispatch({ type: "HIDE_MODAL" });
90
+ navigateToScreen("gitignore");
91
+ },
92
+ onDismiss: dismiss,
93
+ });
94
+ dispatch({ type: "SHOW_MODAL", modal });
95
+ },
96
+ [dispatch, navigateToScreen],
97
+ );
94
98
 
95
- return { show };
99
+ return { show };
96
100
  }
@@ -1,27 +1,27 @@
1
1
  import type React from "react";
2
2
 
3
3
  export interface RowRenderProps<T> {
4
- item: T;
5
- isSelected: boolean;
6
- width?: number;
4
+ item: T;
5
+ isSelected: boolean;
6
+ width?: number;
7
7
  }
8
8
 
9
9
  export interface DetailRenderProps<T> {
10
- item: T;
10
+ item: T;
11
11
  }
12
12
 
13
13
  export interface Hint {
14
- key: string;
15
- label: string;
16
- tone?: "default" | "primary" | "danger";
14
+ key: string;
15
+ label: string;
16
+ tone?: "default" | "primary" | "danger";
17
17
  }
18
18
 
19
19
  export interface ItemRenderer<T> {
20
- renderRow: (props: RowRenderProps<T>) => React.ReactNode;
21
- renderDetail: (props: DetailRenderProps<T>) => React.ReactNode;
22
- getActionHints?: (item: T) => Hint[];
20
+ renderRow: (props: RowRenderProps<T>) => React.ReactNode;
21
+ renderDetail: (props: DetailRenderProps<T>) => React.ReactNode;
22
+ getActionHints?: (item: T) => Hint[];
23
23
  }
24
24
 
25
25
  export type RendererRegistry<TItem extends { kind: string }> = {
26
- [K in TItem["kind"]]: ItemRenderer<Extract<TItem, { kind: K }>>;
26
+ [K in TItem["kind"]]: ItemRenderer<Extract<TItem, { kind: K }>>;
27
27
  };