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.
- package/package.json +4 -4
- package/src/__tests__/catalog-cache-store.test.ts +271 -0
- package/src/__tests__/catalog-notice.test.ts +155 -0
- package/src/__tests__/github-budget.test.ts +200 -0
- package/src/__tests__/plugin-manager-fallback.test.ts +200 -8
- package/src/__tests__/scope-squares.test.tsx +165 -0
- package/src/__tests__/theme-adaptive-colors.test.ts +307 -0
- package/src/__tests__/uppercase-keybindings.test.ts +101 -0
- package/src/main.tsx +21 -5
- package/src/opentui.d.ts +21 -12
- package/src/services/catalog-cache-store.ts +218 -0
- package/src/services/github-budget.ts +274 -0
- package/src/services/marketplace-catalog-git.ts +170 -0
- package/src/services/marketplace-catalog.ts +95 -0
- package/src/services/marketplace-fetcher.ts +310 -87
- package/src/services/plugin-manager.ts +103 -92
- package/src/ui/App.tsx +19 -12
- package/src/ui/adapters/catalogNotice.ts +122 -0
- package/src/ui/adapters/pluginsAdapter.ts +174 -168
- package/src/ui/adapters/settingsAdapter.ts +119 -116
- package/src/ui/adapters/skillsAdapter.ts +203 -196
- package/src/ui/components/CategoryHeader.tsx +9 -8
- package/src/ui/components/EmptyFilterState.tsx +10 -5
- package/src/ui/components/FlagDetailEditor.tsx +0 -0
- package/src/ui/components/ScopeIndicator.tsx +10 -6
- package/src/ui/components/ScrollableList.tsx +3 -2
- package/src/ui/components/SearchInput.tsx +2 -1
- package/src/ui/components/StyledText.tsx +5 -4
- package/src/ui/components/TabBar.tsx +4 -3
- package/src/ui/components/layout/FooterHints.tsx +37 -30
- package/src/ui/components/layout/Panel.tsx +6 -5
- package/src/ui/components/layout/ProgressBar.tsx +7 -6
- package/src/ui/components/layout/ScopeTabs.tsx +6 -5
- package/src/ui/components/layout/ScreenLayout.tsx +46 -26
- package/src/ui/components/layout/index.ts +3 -3
- package/src/ui/components/modals/ConfirmModal.tsx +12 -11
- package/src/ui/components/modals/InputModal.tsx +14 -6
- package/src/ui/components/modals/LoadingModal.tsx +6 -5
- package/src/ui/components/modals/MessageModal.tsx +9 -8
- package/src/ui/components/modals/SelectModal.tsx +11 -7
- package/src/ui/components/modals/VersionMismatchModal.tsx +14 -16
- package/src/ui/components/primitives/ActionHints.tsx +26 -26
- package/src/ui/components/primitives/DetailSection.tsx +13 -12
- package/src/ui/components/primitives/KeyValueLine.tsx +9 -8
- package/src/ui/components/primitives/ListCategoryRow.tsx +25 -27
- package/src/ui/components/primitives/MetaText.tsx +3 -3
- package/src/ui/components/primitives/ScopeDetail.tsx +48 -48
- package/src/ui/components/primitives/ScopeSquares.tsx +47 -22
- package/src/ui/components/primitives/SelectableRow.tsx +22 -16
- package/src/ui/hooks/useGitignoreModal.ts +78 -74
- package/src/ui/registry.ts +11 -11
- package/src/ui/renderers/cliToolRenderers.tsx +260 -203
- package/src/ui/renderers/gitignoreRenderers.tsx +43 -42
- package/src/ui/renderers/mcpRenderers.tsx +121 -117
- package/src/ui/renderers/pluginRenderers.tsx +566 -471
- package/src/ui/renderers/profileRenderers.tsx +346 -300
- package/src/ui/renderers/settingsRenderers.tsx +183 -176
- package/src/ui/renderers/skillRenderers.tsx +410 -326
- package/src/ui/screens/AliasScreen.tsx +1336 -1309
- package/src/ui/screens/CliToolsScreen.tsx +92 -40
- package/src/ui/screens/EnvVarsScreen.tsx +19 -13
- package/src/ui/screens/GitignoreScreen.tsx +510 -493
- package/src/ui/screens/McpRegistryScreen.tsx +28 -21
- package/src/ui/screens/McpScreen.tsx +12 -3
- package/src/ui/screens/PluginsScreen.tsx +152 -33
- package/src/ui/screens/ProfilesScreen.tsx +39 -23
- package/src/ui/screens/SkillsScreen.tsx +832 -688
- package/src/ui/state/reducer.ts +11 -2
- package/src/ui/state/types.ts +16 -1
- package/src/ui/theme-mode.ts +73 -0
- package/src/ui/theme.ts +147 -53
- 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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
|
|
60
|
-
|
|
59
|
+
const { dispatch } = useApp();
|
|
60
|
+
const { navigateToScreen } = useNavigation();
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
-
|
|
99
|
+
return { show };
|
|
96
100
|
}
|
package/src/ui/registry.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
2
|
|
|
3
3
|
export interface RowRenderProps<T> {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
item: T;
|
|
5
|
+
isSelected: boolean;
|
|
6
|
+
width?: number;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export interface DetailRenderProps<T> {
|
|
10
|
-
|
|
10
|
+
item: T;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export interface Hint {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
key: string;
|
|
15
|
+
label: string;
|
|
16
|
+
tone?: "default" | "primary" | "danger";
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export interface ItemRenderer<T> {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
26
|
+
[K in TItem["kind"]]: ItemRenderer<Extract<TItem, { kind: K }>>;
|
|
27
27
|
};
|