claude-scope 0.8.2 → 0.8.3
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/dist/claude-scope.cjs +33 -7
- package/package.json +1 -1
package/dist/claude-scope.cjs
CHANGED
|
@@ -1185,13 +1185,13 @@ var init_constants = __esm({
|
|
|
1185
1185
|
/** Demo total output tokens */
|
|
1186
1186
|
TOTAL_OUTPUT_TOKENS: 5e4,
|
|
1187
1187
|
/** Demo current input tokens */
|
|
1188
|
-
CURRENT_INPUT_TOKENS:
|
|
1188
|
+
CURRENT_INPUT_TOKENS: 8e4,
|
|
1189
1189
|
/** Demo current output tokens */
|
|
1190
|
-
CURRENT_OUTPUT_TOKENS:
|
|
1190
|
+
CURRENT_OUTPUT_TOKENS: 3e4,
|
|
1191
1191
|
/** Demo cache creation tokens */
|
|
1192
|
-
CACHE_CREATION_TOKENS:
|
|
1192
|
+
CACHE_CREATION_TOKENS: 1e3,
|
|
1193
1193
|
/** Demo cache read tokens */
|
|
1194
|
-
CACHE_READ_TOKENS:
|
|
1194
|
+
CACHE_READ_TOKENS: 15e3
|
|
1195
1195
|
};
|
|
1196
1196
|
DEFAULT_PROGRESS_BAR_WIDTH = DEFAULTS.PROGRESS_BAR_WIDTH;
|
|
1197
1197
|
}
|
|
@@ -6486,12 +6486,32 @@ __export(select_with_preview_exports, {
|
|
|
6486
6486
|
});
|
|
6487
6487
|
async function generatePreviews(choices, style, themeName) {
|
|
6488
6488
|
const previews = [];
|
|
6489
|
+
const isStyleSelection = choices.length >= 3 && choices.every((c) => isQuickConfigStyle(c.value));
|
|
6490
|
+
const availableThemes = [
|
|
6491
|
+
"monokai",
|
|
6492
|
+
"nord",
|
|
6493
|
+
"dracula",
|
|
6494
|
+
"catppuccin-mocha",
|
|
6495
|
+
"tokyo-night",
|
|
6496
|
+
"vscode-dark-plus",
|
|
6497
|
+
"github-dark-dimmed",
|
|
6498
|
+
"dusty-sage"
|
|
6499
|
+
];
|
|
6500
|
+
const isThemeSelection = choices.some((c) => isThemeName(c.value, availableThemes));
|
|
6489
6501
|
for (const choice of choices) {
|
|
6490
6502
|
try {
|
|
6503
|
+
let previewStyle = style;
|
|
6504
|
+
if (isStyleSelection) {
|
|
6505
|
+
previewStyle = choice.value;
|
|
6506
|
+
}
|
|
6507
|
+
let previewTheme = themeName;
|
|
6508
|
+
if (isThemeSelection && isThemeName(choice.value, availableThemes)) {
|
|
6509
|
+
previewTheme = choice.value;
|
|
6510
|
+
}
|
|
6491
6511
|
const preview = await renderPreviewFromConfig(
|
|
6492
|
-
choice.getConfig(
|
|
6493
|
-
|
|
6494
|
-
|
|
6512
|
+
choice.getConfig(previewStyle, previewTheme),
|
|
6513
|
+
previewStyle,
|
|
6514
|
+
previewTheme
|
|
6495
6515
|
);
|
|
6496
6516
|
previews.push(preview);
|
|
6497
6517
|
} catch (error) {
|
|
@@ -6501,6 +6521,12 @@ async function generatePreviews(choices, style, themeName) {
|
|
|
6501
6521
|
}
|
|
6502
6522
|
return previews;
|
|
6503
6523
|
}
|
|
6524
|
+
function isQuickConfigStyle(value) {
|
|
6525
|
+
return typeof value === "string" && ["balanced", "playful", "compact"].includes(value);
|
|
6526
|
+
}
|
|
6527
|
+
function isThemeName(value, availableThemes) {
|
|
6528
|
+
return typeof value === "string" && availableThemes.includes(value);
|
|
6529
|
+
}
|
|
6504
6530
|
function selectWithPreviewImpl(config, done) {
|
|
6505
6531
|
const [active, setActive] = useState(0);
|
|
6506
6532
|
const [status, setStatus] = useState("idle");
|