Skip to content

Commit dfb3b5a

Browse files
committed
Restore Forest color scheme as default
1 parent 8a68dc7 commit dfb3b5a

6 files changed

Lines changed: 363 additions & 170 deletions

File tree

src/cli/commands/config.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as clack from '@clack/prompts';
22
import { loadConfig, saveConfig, getConfigPath, type ForestConfig } from '../../lib/config';
3+
import { DEFAULT_COLOR_SCHEME, listColorSchemes } from '../../lib/color-schemes';
34

45
type ClercModule = typeof import('clerc');
56

@@ -229,6 +230,23 @@ async function runConfigWizard() {
229230
newConfig.llmTaggerModel = llmModel;
230231
}
231232

233+
const colorScheme = (await clack.select({
234+
message: 'Color scheme',
235+
options: listColorSchemes().map(({ value, label, description }) => ({
236+
value,
237+
label,
238+
hint: description,
239+
})),
240+
initialValue: currentConfig.colorScheme || DEFAULT_COLOR_SCHEME,
241+
})) as ForestConfig['colorScheme'];
242+
243+
if (clack.isCancel(colorScheme)) {
244+
clack.cancel('Configuration cancelled');
245+
return;
246+
}
247+
248+
newConfig.colorScheme = colorScheme;
249+
232250
// Save config
233251
saveConfig(newConfig);
234252

0 commit comments

Comments
 (0)