claudeup 4.35.0 → 4.36.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__/git-worktree.test.ts +108 -0
- 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/__tests__/worktree-registry-resolution.test.ts +107 -0
- package/src/main.tsx +21 -5
- package/src/opentui.d.ts +21 -12
- package/src/services/claude-settings.ts +37 -7
- package/src/services/git-worktree.ts +129 -0
- package/src/services/plugin-manager.ts +10 -1
- package/src/ui/App.tsx +19 -12
- 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 +27 -24
- 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 +528 -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 +17 -7
- package/src/ui/screens/ProfilesScreen.tsx +39 -23
- package/src/ui/screens/SkillsScreen.tsx +832 -688
- package/src/ui/theme-mode.ts +73 -0
- package/src/ui/theme.ts +147 -53
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
SETTINGS_CATALOG,
|
|
3
|
+
type SettingCategory,
|
|
4
|
+
type SettingDefinition,
|
|
5
5
|
} from "../../data/settings-catalog.js";
|
|
6
6
|
import type { ScopedSettingValues } from "../../services/settings-manager.js";
|
|
7
|
+
import { theme, type UiColor } from "../theme.js";
|
|
7
8
|
|
|
8
9
|
// ─── Item types ────────────────────────────────────────────────────────────────
|
|
9
10
|
|
|
10
11
|
export interface SettingsCategoryItem {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
id: string;
|
|
13
|
+
kind: "category";
|
|
14
|
+
label: string;
|
|
15
|
+
category: SettingCategory;
|
|
16
|
+
isDefault: true;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export interface SettingsSettingItem {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
id: string;
|
|
21
|
+
kind: "setting";
|
|
22
|
+
label: string;
|
|
23
|
+
category: SettingCategory;
|
|
24
|
+
setting: SettingDefinition;
|
|
25
|
+
scopedValues: ScopedSettingValues;
|
|
26
|
+
effectiveValue: string | undefined;
|
|
27
|
+
isDefault: boolean;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export type SettingsBrowserItem = SettingsCategoryItem | SettingsSettingItem;
|
|
@@ -31,92 +32,94 @@ export type SettingsBrowserItem = SettingsCategoryItem | SettingsSettingItem;
|
|
|
31
32
|
// ─── Constants ─────────────────────────────────────────────────────────────────
|
|
32
33
|
|
|
33
34
|
export const CATEGORY_LABELS: Record<SettingCategory, string> = {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
recommended: "Recommended",
|
|
36
|
+
agents: "Agents & Teams",
|
|
37
|
+
models: "Models & Thinking",
|
|
38
|
+
workflow: "Workflow",
|
|
39
|
+
terminal: "Terminal & UI",
|
|
40
|
+
performance: "Performance",
|
|
41
|
+
advanced: "Advanced",
|
|
41
42
|
};
|
|
42
43
|
|
|
43
44
|
export const CATEGORY_ORDER: SettingCategory[] = [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
"recommended",
|
|
46
|
+
"agents",
|
|
47
|
+
"models",
|
|
48
|
+
"workflow",
|
|
49
|
+
"terminal",
|
|
50
|
+
"performance",
|
|
51
|
+
"advanced",
|
|
51
52
|
];
|
|
52
53
|
|
|
53
|
-
export const CATEGORY_BG: Record<SettingCategory,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
export const CATEGORY_BG: Record<SettingCategory, UiColor> = {
|
|
55
|
+
recommended: theme.colors.success,
|
|
56
|
+
agents: theme.colors.info,
|
|
57
|
+
models: theme.colors.accent,
|
|
58
|
+
workflow: theme.colors.link,
|
|
59
|
+
terminal: theme.colors.warning,
|
|
60
|
+
performance: theme.colors.accent,
|
|
61
|
+
advanced: theme.colors.warning,
|
|
61
62
|
};
|
|
62
63
|
|
|
63
|
-
export const CATEGORY_COLOR: Record<SettingCategory,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
export const CATEGORY_COLOR: Record<SettingCategory, UiColor> = {
|
|
65
|
+
recommended: theme.colors.success,
|
|
66
|
+
agents: theme.colors.info,
|
|
67
|
+
models: theme.colors.info,
|
|
68
|
+
workflow: theme.colors.link,
|
|
69
|
+
terminal: theme.colors.link,
|
|
70
|
+
performance: "magentaBright",
|
|
71
|
+
advanced: theme.colors.warning,
|
|
71
72
|
};
|
|
72
73
|
|
|
73
74
|
export const CATEGORY_DESCRIPTIONS: Record<SettingCategory, string> = {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
recommended: "Most impactful settings every user should know.",
|
|
76
|
+
agents: "Agent teams, task lists, and subagent configuration.",
|
|
77
|
+
models: "Model selection, extended thinking, and effort.",
|
|
78
|
+
workflow: "Git, plans, permissions, output style, and languages.",
|
|
79
|
+
terminal: "Shell, spinners, progress bars, voice, and UI behavior.",
|
|
80
|
+
performance: "Compaction, token limits, timeouts, and caching.",
|
|
81
|
+
advanced: "Telemetry, updates, debugging, and internal controls.",
|
|
81
82
|
};
|
|
82
83
|
|
|
83
84
|
// ─── Helpers ───────────────────────────────────────────────────────────────────
|
|
84
85
|
|
|
85
86
|
/** Get the effective value (project overrides user) */
|
|
86
87
|
export function getEffectiveValue(
|
|
87
|
-
|
|
88
|
+
scoped: ScopedSettingValues,
|
|
88
89
|
): string | undefined {
|
|
89
|
-
|
|
90
|
+
return scoped.project !== undefined ? scoped.project : scoped.user;
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
export function formatValue(
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
setting: SettingDefinition,
|
|
95
|
+
value: string | undefined,
|
|
95
96
|
): string {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
97
|
+
if (value === undefined || value === "") {
|
|
98
|
+
if (setting.type === "boolean" && setting.defaultValue !== undefined) {
|
|
99
|
+
return setting.defaultValue === "true" ? "on" : "off";
|
|
100
|
+
}
|
|
101
|
+
if (setting.type === "select" && setting.defaultValue !== undefined) {
|
|
102
|
+
const opt = setting.options?.find(
|
|
103
|
+
(o) => o.value === setting.defaultValue,
|
|
104
|
+
);
|
|
105
|
+
return opt ? opt.label : setting.defaultValue;
|
|
106
|
+
}
|
|
107
|
+
return "—";
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (setting.type === "boolean") {
|
|
111
|
+
return value === "true" || value === "1" ? "on" : "off";
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (setting.type === "select" && setting.options) {
|
|
115
|
+
const opt = setting.options.find((o) => o.value === value);
|
|
116
|
+
return opt ? opt.label : value;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (value.length > 12) {
|
|
120
|
+
return value.slice(0, 12) + "…";
|
|
121
|
+
}
|
|
122
|
+
return value;
|
|
120
123
|
}
|
|
121
124
|
|
|
122
125
|
// ─── Adapter ───────────────────────────────────────────────────────────────────
|
|
@@ -126,40 +129,40 @@ export function formatValue(
|
|
|
126
129
|
* Extracted from SettingsScreen so it can be tested independently.
|
|
127
130
|
*/
|
|
128
131
|
export function buildSettingsBrowserItems(
|
|
129
|
-
|
|
132
|
+
values: Map<string, ScopedSettingValues>,
|
|
130
133
|
): SettingsBrowserItem[] {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
134
|
+
const items: SettingsBrowserItem[] = [];
|
|
135
|
+
|
|
136
|
+
for (const category of CATEGORY_ORDER) {
|
|
137
|
+
items.push({
|
|
138
|
+
id: `cat:${category}`,
|
|
139
|
+
kind: "category",
|
|
140
|
+
label: CATEGORY_LABELS[category],
|
|
141
|
+
category,
|
|
142
|
+
isDefault: true,
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
const categorySettings = SETTINGS_CATALOG.filter(
|
|
146
|
+
(s) => s.category === category,
|
|
147
|
+
);
|
|
148
|
+
for (const setting of categorySettings) {
|
|
149
|
+
const scoped = values.get(setting.id) || {
|
|
150
|
+
user: undefined,
|
|
151
|
+
project: undefined,
|
|
152
|
+
};
|
|
153
|
+
const effective = getEffectiveValue(scoped);
|
|
154
|
+
items.push({
|
|
155
|
+
id: `setting:${setting.id}`,
|
|
156
|
+
kind: "setting",
|
|
157
|
+
label: setting.name,
|
|
158
|
+
category,
|
|
159
|
+
setting,
|
|
160
|
+
scopedValues: scoped,
|
|
161
|
+
effectiveValue: effective,
|
|
162
|
+
isDefault: effective === undefined || effective === "",
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return items;
|
|
165
168
|
}
|