@google/gemini-cli 0.40.0-preview.2 → 0.40.0-preview.4
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/bundle/{chunk-3GU3LF3I.js → chunk-4XVBQQNJ.js} +181 -16
- package/bundle/{chunk-PLUWJHZZ.js → chunk-547AWTTH.js} +238 -61
- package/bundle/{chunk-EFCQXWIF.js → chunk-63PTTRTA.js} +3 -3
- package/bundle/{chunk-IMEC72NS.js → chunk-ATGIEBEB.js} +1 -1
- package/bundle/{chunk-WL5MCPV2.js → chunk-BV2W6YE6.js} +2 -2
- package/bundle/{chunk-QK7UWGBN.js → chunk-CIO3GUGQ.js} +1382 -1083
- package/bundle/{chunk-HV36F4CL.js → chunk-CJQVVQSH.js} +134 -354
- package/bundle/{chunk-VCGILCZV.js → chunk-F73F75XM.js} +16 -0
- package/bundle/{chunk-TDW6FM3A.js → chunk-G356GKHH.js} +1 -1
- package/bundle/{chunk-4IJPDKI6.js → chunk-H4NQBTXN.js} +146 -364
- package/bundle/{chunk-GXRQOXQF.js → chunk-H7F2VOIJ.js} +178 -14
- package/bundle/chunk-HF7X35D3.js +80012 -0
- package/bundle/{chunk-WHIWQCI5.js → chunk-HGFADN5A.js} +1 -1
- package/bundle/{chunk-NO7STVVM.js → chunk-KG7ZFMJL.js} +1413 -1089
- package/bundle/{chunk-33ANPP4S.js → chunk-LMVZLINC.js} +3 -3
- package/bundle/chunk-LODNDE3S.js +17505 -0
- package/bundle/{chunk-IUVLJUOL.js → chunk-LVHUYMBU.js} +2 -2
- package/bundle/{chunk-NIVCRM5L.js → chunk-M76FWZ5L.js} +134 -354
- package/bundle/{chunk-RM43GNQQ.js → chunk-NV6UCR4K.js} +7711 -12909
- package/bundle/{chunk-MUGUV6RZ.js → chunk-PRZIW6SM.js} +2 -2
- package/bundle/chunk-RENFZ63F.js +351149 -0
- package/bundle/chunk-SYPUOR3U.js +156 -0
- package/bundle/{chunk-2RHFUIH4.js → chunk-UHHRGNIO.js} +16 -0
- package/bundle/chunk-VQ7N6NVX.js +1571 -0
- package/bundle/{chunk-UBXB5AEJ.js → chunk-WSTHO4WR.js} +3 -3
- package/bundle/chunk-ZQNX6OWU.js +118 -0
- package/bundle/{cleanup-A7WXWAMI.js → cleanup-4EFDM2N7.js} +3 -3
- package/bundle/{cleanup-EWPIME2M.js → cleanup-4RRVO4GO.js} +3 -3
- package/bundle/{cleanup-IPLJJT5S.js → cleanup-DNS7PXYC.js} +3 -3
- package/bundle/cleanup-DXHNV2J6.js +33 -0
- package/bundle/{core-VCDK23ZC.js → core-WQSFCPEO.js} +28 -2
- package/bundle/{devtoolsService-6Y6YER6T.js → devtoolsService-JWET4G6G.js} +3 -3
- package/bundle/{devtoolsService-B5VVZ752.js → devtoolsService-LPEBYJVD.js} +3 -3
- package/bundle/{devtoolsService-2JXSALRU.js → devtoolsService-S2LBUUZU.js} +5 -4
- package/bundle/devtoolsService-YCRNWWXE.js +852 -0
- package/bundle/{dist-UIXQETMC.js → dist-ANTOB3YW.js} +28 -2
- package/bundle/{core-BQT6T3CH.js → dist-RIVCP5ZD.js} +28 -2
- package/bundle/dist-UH565MTG.js +2046 -0
- package/bundle/docs/cli/cli-reference.md +1 -0
- package/bundle/docs/cli/trusted-folders.md +28 -0
- package/bundle/docs/reference/configuration.md +14 -0
- package/bundle/{gemini-ID44Z5SV.js → gemini-27FQ5BI4.js} +66 -22
- package/bundle/{gemini-54LH6RUH.js → gemini-57EC2ZF7.js} +241 -182
- package/bundle/{gemini-44W2QEZI.js → gemini-JAZVYRDD.js} +64 -21
- package/bundle/gemini-TQZRS37Q.js +16087 -0
- package/bundle/gemini.js +3 -3
- package/bundle/{interactiveCli-5MTJDFYC.js → interactiveCli-E35R6QQC.js} +17 -167
- package/bundle/{interactiveCli-JFBPGMNM.js → interactiveCli-FPHSBRV3.js} +30 -179
- package/bundle/{interactiveCli-5B3X6RNB.js → interactiveCli-L3EK4XEX.js} +300 -432
- package/bundle/interactiveCli-MVHR4VV7.js +34448 -0
- package/bundle/{liteRtServerManager-76V63PRJ.js → liteRtServerManager-LXEAYAUP.js} +4 -4
- package/bundle/{liteRtServerManager-WQMDPACQ.js → liteRtServerManager-ORSW3R4F.js} +4 -4
- package/bundle/{liteRtServerManager-6GJWEP5W.js → liteRtServerManager-PI4ZNFB5.js} +4 -4
- package/bundle/liteRtServerManager-YYXO5Q3I.js +65 -0
- package/bundle/{memoryDiscovery-RYHYLAPJ.js → memoryDiscovery-CZURD35O.js} +1 -1
- package/bundle/{memoryDiscovery-HWEYBJE7.js → memoryDiscovery-GZLXKRGB.js} +1 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-EX6SQEZP.js → oauth2-provider-B3NTBNAM.js} +2 -2
- package/bundle/{oauth2-provider-ZF52AWQY.js → oauth2-provider-ENF2D4Q7.js} +39 -73
- package/bundle/{oauth2-provider-JCKLNKRV.js → oauth2-provider-I3G773GE.js} +2 -2
- package/bundle/oauth2-provider-WTF7AHQ2.js +237 -0
- package/bundle/{start-CYDJTOAP.js → start-CRIFZ3SW.js} +6 -6
- package/bundle/{start-SHOUHW3Y.js → start-KVFKS3IT.js} +6 -6
- package/bundle/{start-B6EMQCH5.js → start-OTLGMCNH.js} +6 -6
- package/bundle/start-S3REI3X2.js +18 -0
- package/package.json +1 -1
package/bundle/gemini.js
CHANGED
|
@@ -103,9 +103,9 @@ ${error instanceof Error ? error.stack ?? error.message : String(error)}
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
} else {
|
|
106
|
-
const { main } = await import("./gemini-
|
|
107
|
-
const { FatalError, writeToStderr } = await import("./dist-
|
|
108
|
-
const { runExitCleanup } = await import("./cleanup-
|
|
106
|
+
const { main } = await import("./gemini-27FQ5BI4.js");
|
|
107
|
+
const { FatalError, writeToStderr } = await import("./dist-ANTOB3YW.js");
|
|
108
|
+
const { runExitCleanup } = await import("./cleanup-4RRVO4GO.js");
|
|
109
109
|
main().catch(async (error) => {
|
|
110
110
|
const cleanupTimeout = setTimeout(() => {
|
|
111
111
|
writeToStderr("Cleanup timed out, forcing exit...\n");
|
|
@@ -70,8 +70,15 @@ import {
|
|
|
70
70
|
formatDuration,
|
|
71
71
|
formatResetTime,
|
|
72
72
|
getBoundingBox,
|
|
73
|
+
getDialogRestartRequiredSettings,
|
|
74
|
+
getDialogSettingKeys,
|
|
75
|
+
getDisplayValue,
|
|
76
|
+
getEditValue,
|
|
77
|
+
getEffectiveValue,
|
|
73
78
|
getFileExtension,
|
|
74
79
|
getFormattedSettingValue,
|
|
80
|
+
getNestedValue,
|
|
81
|
+
getSettingDefinition,
|
|
75
82
|
getStatusColor,
|
|
76
83
|
getTransformUnderCursor,
|
|
77
84
|
getUsedStatusColor,
|
|
@@ -83,8 +90,10 @@ import {
|
|
|
83
90
|
isBrowser,
|
|
84
91
|
isContextUsageHigh,
|
|
85
92
|
isDevelopment,
|
|
93
|
+
isInSettingsScope,
|
|
86
94
|
isNarrowWidth,
|
|
87
95
|
isNewFile,
|
|
96
|
+
isRecord,
|
|
88
97
|
isSlashCommand,
|
|
89
98
|
isUltraTier,
|
|
90
99
|
loadKeyMatchers,
|
|
@@ -93,6 +102,7 @@ import {
|
|
|
93
102
|
openFileInEditor,
|
|
94
103
|
parseColor,
|
|
95
104
|
parseDiffWithLineNumbers,
|
|
105
|
+
parseEditedValue,
|
|
96
106
|
parseSlashCommand,
|
|
97
107
|
persistentState,
|
|
98
108
|
profiler,
|
|
@@ -144,13 +154,13 @@ import {
|
|
|
144
154
|
widestLineFromStyledChars,
|
|
145
155
|
wordBreakStyledChars,
|
|
146
156
|
wrapStyledChars
|
|
147
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-H7F2VOIJ.js";
|
|
148
158
|
import {
|
|
149
159
|
appEvents
|
|
150
160
|
} from "./chunk-5PS3AYFU.js";
|
|
151
161
|
import {
|
|
152
162
|
require_source
|
|
153
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-VQ7N6NVX.js";
|
|
154
164
|
import {
|
|
155
165
|
ACTIVE_SHELL_MAX_LINES,
|
|
156
166
|
COMPACT_TOOL_SUBVIEW_MAX_LINES,
|
|
@@ -188,7 +198,6 @@ import {
|
|
|
188
198
|
getCachedStringWidth,
|
|
189
199
|
getLuminance,
|
|
190
200
|
getSessionFiles,
|
|
191
|
-
getSettingsSchema,
|
|
192
201
|
interpolateColor,
|
|
193
202
|
isLoadableSettingScope,
|
|
194
203
|
isTodoList,
|
|
@@ -204,13 +213,13 @@ import {
|
|
|
204
213
|
stringWidth,
|
|
205
214
|
stripUnsafeCharacters,
|
|
206
215
|
toCodePoints
|
|
207
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-M76FWZ5L.js";
|
|
208
217
|
import {
|
|
209
218
|
registerCleanup,
|
|
210
219
|
removeCleanup,
|
|
211
220
|
runExitCleanup,
|
|
212
221
|
setupTtyCheck
|
|
213
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-PRZIW6SM.js";
|
|
214
223
|
import {
|
|
215
224
|
ApiKeyUpdatedEvent,
|
|
216
225
|
AsyncFzf,
|
|
@@ -327,7 +336,7 @@ import {
|
|
|
327
336
|
validatePlanContent,
|
|
328
337
|
validatePlanPath,
|
|
329
338
|
writeToStdout
|
|
330
|
-
} from "./chunk-
|
|
339
|
+
} from "./chunk-KG7ZFMJL.js";
|
|
331
340
|
import {
|
|
332
341
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
333
342
|
AGENT_TOOL_NAME,
|
|
@@ -385,7 +394,7 @@ import {
|
|
|
385
394
|
safeJsonToMarkdown,
|
|
386
395
|
shortenPath,
|
|
387
396
|
tildeifyPath
|
|
388
|
-
} from "./chunk-
|
|
397
|
+
} from "./chunk-UHHRGNIO.js";
|
|
389
398
|
import "./chunk-664ZODQF.js";
|
|
390
399
|
import "./chunk-RJTRUG2J.js";
|
|
391
400
|
import "./chunk-IUUIT4SU.js";
|
|
@@ -13514,165 +13523,6 @@ var ConsentPrompt = (props) => {
|
|
|
13514
13523
|
// packages/cli/src/ui/components/ThemeDialog.tsx
|
|
13515
13524
|
var import_react47 = __toESM(require_react(), 1);
|
|
13516
13525
|
|
|
13517
|
-
// packages/cli/src/utils/settingsUtils.ts
|
|
13518
|
-
function flattenSchema(schema, prefix = "") {
|
|
13519
|
-
let result = {};
|
|
13520
|
-
for (const key in schema) {
|
|
13521
|
-
const newKey = prefix ? `${prefix}.${key}` : key;
|
|
13522
|
-
const definition = schema[key];
|
|
13523
|
-
result[newKey] = { ...definition, key: newKey };
|
|
13524
|
-
if (definition.properties) {
|
|
13525
|
-
result = { ...result, ...flattenSchema(definition.properties, newKey) };
|
|
13526
|
-
}
|
|
13527
|
-
}
|
|
13528
|
-
return result;
|
|
13529
|
-
}
|
|
13530
|
-
var _FLATTENED_SCHEMA;
|
|
13531
|
-
function getFlattenedSchema() {
|
|
13532
|
-
return _FLATTENED_SCHEMA ?? (_FLATTENED_SCHEMA = flattenSchema(getSettingsSchema()));
|
|
13533
|
-
}
|
|
13534
|
-
function getSettingDefinition(key) {
|
|
13535
|
-
return getFlattenedSchema()[key];
|
|
13536
|
-
}
|
|
13537
|
-
function getDefaultValue(key) {
|
|
13538
|
-
return getFlattenedSchema()[key]?.default;
|
|
13539
|
-
}
|
|
13540
|
-
function getDialogRestartRequiredSettings() {
|
|
13541
|
-
return Object.values(getFlattenedSchema()).filter(
|
|
13542
|
-
(definition) => definition.requiresRestart && definition.showInDialog !== false
|
|
13543
|
-
).map((definition) => definition.key);
|
|
13544
|
-
}
|
|
13545
|
-
function isRecord(value) {
|
|
13546
|
-
return typeof value === "object" && value !== null;
|
|
13547
|
-
}
|
|
13548
|
-
function isSettingsValue(value) {
|
|
13549
|
-
if (value === void 0) return true;
|
|
13550
|
-
if (value === null) return false;
|
|
13551
|
-
const type = typeof value;
|
|
13552
|
-
return type === "string" || type === "number" || type === "boolean" || type === "object";
|
|
13553
|
-
}
|
|
13554
|
-
function getNestedValue(obj, path15) {
|
|
13555
|
-
let current = obj;
|
|
13556
|
-
for (const key of path15) {
|
|
13557
|
-
if (!isRecord(current) || !(key in current)) {
|
|
13558
|
-
return void 0;
|
|
13559
|
-
}
|
|
13560
|
-
current = current[key];
|
|
13561
|
-
}
|
|
13562
|
-
return current;
|
|
13563
|
-
}
|
|
13564
|
-
function getEffectiveValue(key, settings) {
|
|
13565
|
-
const definition = getSettingDefinition(key);
|
|
13566
|
-
if (!definition) {
|
|
13567
|
-
return void 0;
|
|
13568
|
-
}
|
|
13569
|
-
const path15 = key.split(".");
|
|
13570
|
-
const value = getNestedValue(settings, path15);
|
|
13571
|
-
if (value !== void 0 && isSettingsValue(value)) {
|
|
13572
|
-
return value;
|
|
13573
|
-
}
|
|
13574
|
-
return definition.default;
|
|
13575
|
-
}
|
|
13576
|
-
function getDialogSettingKeys() {
|
|
13577
|
-
return Object.values(getFlattenedSchema()).filter((definition) => definition.showInDialog !== false).map((definition) => definition.key);
|
|
13578
|
-
}
|
|
13579
|
-
function isInSettingsScope(key, scopeSettings) {
|
|
13580
|
-
const path15 = key.split(".");
|
|
13581
|
-
const value = getNestedValue(scopeSettings, path15);
|
|
13582
|
-
return value !== void 0;
|
|
13583
|
-
}
|
|
13584
|
-
function getDisplayValue(key, scopeSettings, _mergedSettings) {
|
|
13585
|
-
const definition = getSettingDefinition(key);
|
|
13586
|
-
const existsInScope = isInSettingsScope(key, scopeSettings);
|
|
13587
|
-
let value;
|
|
13588
|
-
if (existsInScope) {
|
|
13589
|
-
value = getEffectiveValue(key, scopeSettings);
|
|
13590
|
-
} else {
|
|
13591
|
-
value = getDefaultValue(key);
|
|
13592
|
-
}
|
|
13593
|
-
let valueString = String(value);
|
|
13594
|
-
if (definition?.type === "object" && value !== null && typeof value === "object") {
|
|
13595
|
-
valueString = JSON.stringify(value);
|
|
13596
|
-
} else if (definition?.type === "enum" && definition.options) {
|
|
13597
|
-
const option = definition.options?.find((option2) => option2.value === value);
|
|
13598
|
-
valueString = option?.label ?? `${value}`;
|
|
13599
|
-
}
|
|
13600
|
-
if (definition?.unit === "%" && typeof value === "number") {
|
|
13601
|
-
valueString = `${value} (${Math.round(value * 100)}%)`;
|
|
13602
|
-
} else if (definition?.unit) {
|
|
13603
|
-
valueString = `${valueString}${definition.unit}`;
|
|
13604
|
-
}
|
|
13605
|
-
if (existsInScope) {
|
|
13606
|
-
return `${valueString}*`;
|
|
13607
|
-
}
|
|
13608
|
-
return valueString;
|
|
13609
|
-
}
|
|
13610
|
-
function tryParseJsonStringArray(input) {
|
|
13611
|
-
try {
|
|
13612
|
-
const parsed = JSON.parse(input);
|
|
13613
|
-
if (Array.isArray(parsed) && parsed.every((item) => typeof item === "string")) {
|
|
13614
|
-
return parsed;
|
|
13615
|
-
}
|
|
13616
|
-
return null;
|
|
13617
|
-
} catch {
|
|
13618
|
-
return null;
|
|
13619
|
-
}
|
|
13620
|
-
}
|
|
13621
|
-
function tryParseJsonObject(input) {
|
|
13622
|
-
try {
|
|
13623
|
-
const parsed = JSON.parse(input);
|
|
13624
|
-
if (isRecord(parsed) && !Array.isArray(parsed)) {
|
|
13625
|
-
return parsed;
|
|
13626
|
-
}
|
|
13627
|
-
return null;
|
|
13628
|
-
} catch {
|
|
13629
|
-
return null;
|
|
13630
|
-
}
|
|
13631
|
-
}
|
|
13632
|
-
function parseStringArrayValue(input) {
|
|
13633
|
-
const trimmed = input.trim();
|
|
13634
|
-
if (trimmed === "") return [];
|
|
13635
|
-
return tryParseJsonStringArray(trimmed) ?? input.split(",").map((p) => p.trim()).filter((p) => p.length > 0);
|
|
13636
|
-
}
|
|
13637
|
-
function parseObjectValue(input) {
|
|
13638
|
-
const trimmed = input.trim();
|
|
13639
|
-
if (trimmed === "") {
|
|
13640
|
-
return null;
|
|
13641
|
-
}
|
|
13642
|
-
return tryParseJsonObject(trimmed);
|
|
13643
|
-
}
|
|
13644
|
-
function parseEditedValue(type, newValue) {
|
|
13645
|
-
if (type === "number") {
|
|
13646
|
-
if (newValue.trim() === "") {
|
|
13647
|
-
return null;
|
|
13648
|
-
}
|
|
13649
|
-
const numParsed = Number(newValue.trim());
|
|
13650
|
-
if (Number.isNaN(numParsed)) {
|
|
13651
|
-
return null;
|
|
13652
|
-
}
|
|
13653
|
-
return numParsed;
|
|
13654
|
-
}
|
|
13655
|
-
if (type === "array") {
|
|
13656
|
-
return parseStringArrayValue(newValue);
|
|
13657
|
-
}
|
|
13658
|
-
if (type === "object") {
|
|
13659
|
-
return parseObjectValue(newValue);
|
|
13660
|
-
}
|
|
13661
|
-
return newValue;
|
|
13662
|
-
}
|
|
13663
|
-
function getEditValue(type, rawValue) {
|
|
13664
|
-
if (rawValue === void 0) {
|
|
13665
|
-
return void 0;
|
|
13666
|
-
}
|
|
13667
|
-
if (type === "array" && Array.isArray(rawValue)) {
|
|
13668
|
-
return rawValue.join(", ");
|
|
13669
|
-
}
|
|
13670
|
-
if (type === "object" && rawValue !== null && typeof rawValue === "object") {
|
|
13671
|
-
return JSON.stringify(rawValue);
|
|
13672
|
-
}
|
|
13673
|
-
return void 0;
|
|
13674
|
-
}
|
|
13675
|
-
|
|
13676
13526
|
// packages/cli/src/utils/dialogScopeUtils.ts
|
|
13677
13527
|
var SCOPE_LABELS = {
|
|
13678
13528
|
["User" /* User */]: "User Settings",
|
|
@@ -33590,7 +33440,7 @@ ${queuedText}` : queuedText;
|
|
|
33590
33440
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
33591
33441
|
if (settings.merged.general.devtools) {
|
|
33592
33442
|
void (async () => {
|
|
33593
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
33443
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-JWET4G6G.js");
|
|
33594
33444
|
await toggleDevToolsPanel(
|
|
33595
33445
|
config,
|
|
33596
33446
|
showErrorDetails,
|
|
@@ -70,8 +70,15 @@ import {
|
|
|
70
70
|
formatDuration,
|
|
71
71
|
formatResetTime,
|
|
72
72
|
getBoundingBox,
|
|
73
|
+
getDialogRestartRequiredSettings,
|
|
74
|
+
getDialogSettingKeys,
|
|
75
|
+
getDisplayValue,
|
|
76
|
+
getEditValue,
|
|
77
|
+
getEffectiveValue,
|
|
73
78
|
getFileExtension,
|
|
74
79
|
getFormattedSettingValue,
|
|
80
|
+
getNestedValue,
|
|
81
|
+
getSettingDefinition,
|
|
75
82
|
getStatusColor,
|
|
76
83
|
getTransformUnderCursor,
|
|
77
84
|
getUsedStatusColor,
|
|
@@ -83,8 +90,10 @@ import {
|
|
|
83
90
|
isBrowser,
|
|
84
91
|
isContextUsageHigh,
|
|
85
92
|
isDevelopment,
|
|
93
|
+
isInSettingsScope,
|
|
86
94
|
isNarrowWidth,
|
|
87
95
|
isNewFile,
|
|
96
|
+
isRecord,
|
|
88
97
|
isSlashCommand,
|
|
89
98
|
isUltraTier,
|
|
90
99
|
loadKeyMatchers,
|
|
@@ -93,6 +102,7 @@ import {
|
|
|
93
102
|
openFileInEditor,
|
|
94
103
|
parseColor,
|
|
95
104
|
parseDiffWithLineNumbers,
|
|
105
|
+
parseEditedValue,
|
|
96
106
|
parseSlashCommand,
|
|
97
107
|
persistentState,
|
|
98
108
|
profiler,
|
|
@@ -144,13 +154,13 @@ import {
|
|
|
144
154
|
widestLineFromStyledChars,
|
|
145
155
|
wordBreakStyledChars,
|
|
146
156
|
wrapStyledChars
|
|
147
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-HF7X35D3.js";
|
|
148
158
|
import {
|
|
149
159
|
appEvents
|
|
150
160
|
} from "./chunk-5PS3AYFU.js";
|
|
151
161
|
import {
|
|
152
162
|
require_source
|
|
153
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-G356GKHH.js";
|
|
154
164
|
import {
|
|
155
165
|
ACTIVE_SHELL_MAX_LINES,
|
|
156
166
|
COMPACT_TOOL_SUBVIEW_MAX_LINES,
|
|
@@ -188,7 +198,6 @@ import {
|
|
|
188
198
|
getCachedStringWidth,
|
|
189
199
|
getLuminance,
|
|
190
200
|
getSessionFiles,
|
|
191
|
-
getSettingsSchema,
|
|
192
201
|
interpolateColor,
|
|
193
202
|
isLoadableSettingScope,
|
|
194
203
|
isTodoList,
|
|
@@ -204,13 +213,13 @@ import {
|
|
|
204
213
|
stringWidth,
|
|
205
214
|
stripUnsafeCharacters,
|
|
206
215
|
toCodePoints
|
|
207
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-CJQVVQSH.js";
|
|
208
217
|
import {
|
|
209
218
|
registerCleanup,
|
|
210
219
|
removeCleanup,
|
|
211
220
|
runExitCleanup,
|
|
212
221
|
setupTtyCheck
|
|
213
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-BV2W6YE6.js";
|
|
214
223
|
import {
|
|
215
224
|
ApiKeyUpdatedEvent,
|
|
216
225
|
AsyncFzf,
|
|
@@ -250,6 +259,7 @@ import {
|
|
|
250
259
|
ShellExecutionService,
|
|
251
260
|
SlashCommandStatus,
|
|
252
261
|
TerminalQuotaError,
|
|
262
|
+
TrustLevel,
|
|
253
263
|
UserAccountManager,
|
|
254
264
|
UserPromptEvent,
|
|
255
265
|
UserTierId,
|
|
@@ -337,7 +347,7 @@ import {
|
|
|
337
347
|
validatePlanContent,
|
|
338
348
|
validatePlanPath,
|
|
339
349
|
writeToStdout
|
|
340
|
-
} from "./chunk-
|
|
350
|
+
} from "./chunk-NV6UCR4K.js";
|
|
341
351
|
import {
|
|
342
352
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
343
353
|
AGENT_TOOL_NAME,
|
|
@@ -402,7 +412,7 @@ import {
|
|
|
402
412
|
safeJsonToMarkdown,
|
|
403
413
|
shortenPath,
|
|
404
414
|
tildeifyPath
|
|
405
|
-
} from "./chunk-
|
|
415
|
+
} from "./chunk-F73F75XM.js";
|
|
406
416
|
import "./chunk-664ZODQF.js";
|
|
407
417
|
import "./chunk-RJTRUG2J.js";
|
|
408
418
|
import "./chunk-IUUIT4SU.js";
|
|
@@ -6717,7 +6727,7 @@ function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
|
|
|
6717
6727
|
settings.merged,
|
|
6718
6728
|
process3.cwd()
|
|
6719
6729
|
);
|
|
6720
|
-
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel ===
|
|
6730
|
+
const isInheritedTrust = isTrusted && (!explicitTrustLevel || explicitTrustLevel === TrustLevel.DO_NOT_TRUST);
|
|
6721
6731
|
return {
|
|
6722
6732
|
currentTrustLevel: explicitTrustLevel,
|
|
6723
6733
|
isInheritedTrustFromParent: !!(source === "file" && isInheritedTrust),
|
|
@@ -6762,7 +6772,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
|
|
|
6762
6772
|
process3.cwd(),
|
|
6763
6773
|
newConfig
|
|
6764
6774
|
);
|
|
6765
|
-
if (trustLevel ===
|
|
6775
|
+
if (trustLevel === TrustLevel.DO_NOT_TRUST && isTrusted) {
|
|
6766
6776
|
let message = "Note: This folder is still trusted because the connected IDE workspace is trusted.";
|
|
6767
6777
|
if (source === "file") {
|
|
6768
6778
|
message = "Note: This folder is still trusted because a parent folder is trusted.";
|
|
@@ -6836,18 +6846,18 @@ function PermissionsModifyTrustDialog({
|
|
|
6836
6846
|
const TRUST_LEVEL_ITEMS = [
|
|
6837
6847
|
{
|
|
6838
6848
|
label: `Trust this folder (${dirName})`,
|
|
6839
|
-
value:
|
|
6840
|
-
key:
|
|
6849
|
+
value: TrustLevel.TRUST_FOLDER,
|
|
6850
|
+
key: TrustLevel.TRUST_FOLDER
|
|
6841
6851
|
},
|
|
6842
6852
|
{
|
|
6843
6853
|
label: `Trust parent folder (${parentFolder})`,
|
|
6844
|
-
value:
|
|
6845
|
-
key:
|
|
6854
|
+
value: TrustLevel.TRUST_PARENT,
|
|
6855
|
+
key: TrustLevel.TRUST_PARENT
|
|
6846
6856
|
},
|
|
6847
6857
|
{
|
|
6848
6858
|
label: "Don't trust",
|
|
6849
|
-
value:
|
|
6850
|
-
key:
|
|
6859
|
+
value: TrustLevel.DO_NOT_TRUST,
|
|
6860
|
+
key: TrustLevel.DO_NOT_TRUST
|
|
6851
6861
|
}
|
|
6852
6862
|
];
|
|
6853
6863
|
const {
|
|
@@ -13531,165 +13541,6 @@ var ConsentPrompt = (props) => {
|
|
|
13531
13541
|
// packages/cli/src/ui/components/ThemeDialog.tsx
|
|
13532
13542
|
var import_react47 = __toESM(require_react(), 1);
|
|
13533
13543
|
|
|
13534
|
-
// packages/cli/src/utils/settingsUtils.ts
|
|
13535
|
-
function flattenSchema(schema, prefix = "") {
|
|
13536
|
-
let result = {};
|
|
13537
|
-
for (const key in schema) {
|
|
13538
|
-
const newKey = prefix ? `${prefix}.${key}` : key;
|
|
13539
|
-
const definition = schema[key];
|
|
13540
|
-
result[newKey] = { ...definition, key: newKey };
|
|
13541
|
-
if (definition.properties) {
|
|
13542
|
-
result = { ...result, ...flattenSchema(definition.properties, newKey) };
|
|
13543
|
-
}
|
|
13544
|
-
}
|
|
13545
|
-
return result;
|
|
13546
|
-
}
|
|
13547
|
-
var _FLATTENED_SCHEMA;
|
|
13548
|
-
function getFlattenedSchema() {
|
|
13549
|
-
return _FLATTENED_SCHEMA ?? (_FLATTENED_SCHEMA = flattenSchema(getSettingsSchema()));
|
|
13550
|
-
}
|
|
13551
|
-
function getSettingDefinition(key) {
|
|
13552
|
-
return getFlattenedSchema()[key];
|
|
13553
|
-
}
|
|
13554
|
-
function getDefaultValue(key) {
|
|
13555
|
-
return getFlattenedSchema()[key]?.default;
|
|
13556
|
-
}
|
|
13557
|
-
function getDialogRestartRequiredSettings() {
|
|
13558
|
-
return Object.values(getFlattenedSchema()).filter(
|
|
13559
|
-
(definition) => definition.requiresRestart && definition.showInDialog !== false
|
|
13560
|
-
).map((definition) => definition.key);
|
|
13561
|
-
}
|
|
13562
|
-
function isRecord(value) {
|
|
13563
|
-
return typeof value === "object" && value !== null;
|
|
13564
|
-
}
|
|
13565
|
-
function isSettingsValue(value) {
|
|
13566
|
-
if (value === void 0) return true;
|
|
13567
|
-
if (value === null) return false;
|
|
13568
|
-
const type = typeof value;
|
|
13569
|
-
return type === "string" || type === "number" || type === "boolean" || type === "object";
|
|
13570
|
-
}
|
|
13571
|
-
function getNestedValue(obj, path15) {
|
|
13572
|
-
let current = obj;
|
|
13573
|
-
for (const key of path15) {
|
|
13574
|
-
if (!isRecord(current) || !(key in current)) {
|
|
13575
|
-
return void 0;
|
|
13576
|
-
}
|
|
13577
|
-
current = current[key];
|
|
13578
|
-
}
|
|
13579
|
-
return current;
|
|
13580
|
-
}
|
|
13581
|
-
function getEffectiveValue(key, settings) {
|
|
13582
|
-
const definition = getSettingDefinition(key);
|
|
13583
|
-
if (!definition) {
|
|
13584
|
-
return void 0;
|
|
13585
|
-
}
|
|
13586
|
-
const path15 = key.split(".");
|
|
13587
|
-
const value = getNestedValue(settings, path15);
|
|
13588
|
-
if (value !== void 0 && isSettingsValue(value)) {
|
|
13589
|
-
return value;
|
|
13590
|
-
}
|
|
13591
|
-
return definition.default;
|
|
13592
|
-
}
|
|
13593
|
-
function getDialogSettingKeys() {
|
|
13594
|
-
return Object.values(getFlattenedSchema()).filter((definition) => definition.showInDialog !== false).map((definition) => definition.key);
|
|
13595
|
-
}
|
|
13596
|
-
function isInSettingsScope(key, scopeSettings) {
|
|
13597
|
-
const path15 = key.split(".");
|
|
13598
|
-
const value = getNestedValue(scopeSettings, path15);
|
|
13599
|
-
return value !== void 0;
|
|
13600
|
-
}
|
|
13601
|
-
function getDisplayValue(key, scopeSettings, _mergedSettings) {
|
|
13602
|
-
const definition = getSettingDefinition(key);
|
|
13603
|
-
const existsInScope = isInSettingsScope(key, scopeSettings);
|
|
13604
|
-
let value;
|
|
13605
|
-
if (existsInScope) {
|
|
13606
|
-
value = getEffectiveValue(key, scopeSettings);
|
|
13607
|
-
} else {
|
|
13608
|
-
value = getDefaultValue(key);
|
|
13609
|
-
}
|
|
13610
|
-
let valueString = String(value);
|
|
13611
|
-
if (definition?.type === "object" && value !== null && typeof value === "object") {
|
|
13612
|
-
valueString = JSON.stringify(value);
|
|
13613
|
-
} else if (definition?.type === "enum" && definition.options) {
|
|
13614
|
-
const option = definition.options?.find((option2) => option2.value === value);
|
|
13615
|
-
valueString = option?.label ?? `${value}`;
|
|
13616
|
-
}
|
|
13617
|
-
if (definition?.unit === "%" && typeof value === "number") {
|
|
13618
|
-
valueString = `${value} (${Math.round(value * 100)}%)`;
|
|
13619
|
-
} else if (definition?.unit) {
|
|
13620
|
-
valueString = `${valueString}${definition.unit}`;
|
|
13621
|
-
}
|
|
13622
|
-
if (existsInScope) {
|
|
13623
|
-
return `${valueString}*`;
|
|
13624
|
-
}
|
|
13625
|
-
return valueString;
|
|
13626
|
-
}
|
|
13627
|
-
function tryParseJsonStringArray(input) {
|
|
13628
|
-
try {
|
|
13629
|
-
const parsed = JSON.parse(input);
|
|
13630
|
-
if (Array.isArray(parsed) && parsed.every((item) => typeof item === "string")) {
|
|
13631
|
-
return parsed;
|
|
13632
|
-
}
|
|
13633
|
-
return null;
|
|
13634
|
-
} catch {
|
|
13635
|
-
return null;
|
|
13636
|
-
}
|
|
13637
|
-
}
|
|
13638
|
-
function tryParseJsonObject(input) {
|
|
13639
|
-
try {
|
|
13640
|
-
const parsed = JSON.parse(input);
|
|
13641
|
-
if (isRecord(parsed) && !Array.isArray(parsed)) {
|
|
13642
|
-
return parsed;
|
|
13643
|
-
}
|
|
13644
|
-
return null;
|
|
13645
|
-
} catch {
|
|
13646
|
-
return null;
|
|
13647
|
-
}
|
|
13648
|
-
}
|
|
13649
|
-
function parseStringArrayValue(input) {
|
|
13650
|
-
const trimmed = input.trim();
|
|
13651
|
-
if (trimmed === "") return [];
|
|
13652
|
-
return tryParseJsonStringArray(trimmed) ?? input.split(",").map((p) => p.trim()).filter((p) => p.length > 0);
|
|
13653
|
-
}
|
|
13654
|
-
function parseObjectValue(input) {
|
|
13655
|
-
const trimmed = input.trim();
|
|
13656
|
-
if (trimmed === "") {
|
|
13657
|
-
return null;
|
|
13658
|
-
}
|
|
13659
|
-
return tryParseJsonObject(trimmed);
|
|
13660
|
-
}
|
|
13661
|
-
function parseEditedValue(type, newValue) {
|
|
13662
|
-
if (type === "number") {
|
|
13663
|
-
if (newValue.trim() === "") {
|
|
13664
|
-
return null;
|
|
13665
|
-
}
|
|
13666
|
-
const numParsed = Number(newValue.trim());
|
|
13667
|
-
if (Number.isNaN(numParsed)) {
|
|
13668
|
-
return null;
|
|
13669
|
-
}
|
|
13670
|
-
return numParsed;
|
|
13671
|
-
}
|
|
13672
|
-
if (type === "array") {
|
|
13673
|
-
return parseStringArrayValue(newValue);
|
|
13674
|
-
}
|
|
13675
|
-
if (type === "object") {
|
|
13676
|
-
return parseObjectValue(newValue);
|
|
13677
|
-
}
|
|
13678
|
-
return newValue;
|
|
13679
|
-
}
|
|
13680
|
-
function getEditValue(type, rawValue) {
|
|
13681
|
-
if (rawValue === void 0) {
|
|
13682
|
-
return void 0;
|
|
13683
|
-
}
|
|
13684
|
-
if (type === "array" && Array.isArray(rawValue)) {
|
|
13685
|
-
return rawValue.join(", ");
|
|
13686
|
-
}
|
|
13687
|
-
if (type === "object" && rawValue !== null && typeof rawValue === "object") {
|
|
13688
|
-
return JSON.stringify(rawValue);
|
|
13689
|
-
}
|
|
13690
|
-
return void 0;
|
|
13691
|
-
}
|
|
13692
|
-
|
|
13693
13544
|
// packages/cli/src/utils/dialogScopeUtils.ts
|
|
13694
13545
|
var SCOPE_LABELS = {
|
|
13695
13546
|
["User" /* User */]: "User Settings",
|
|
@@ -30098,9 +29949,9 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30098
29949
|
const handleFolderTrustSelect = (0, import_react108.useCallback)(
|
|
30099
29950
|
async (choice) => {
|
|
30100
29951
|
const trustLevelMap = {
|
|
30101
|
-
["trust_folder" /* TRUST_FOLDER */]:
|
|
30102
|
-
["trust_parent" /* TRUST_PARENT */]:
|
|
30103
|
-
["do_not_trust" /* DO_NOT_TRUST */]:
|
|
29952
|
+
["trust_folder" /* TRUST_FOLDER */]: TrustLevel.TRUST_FOLDER,
|
|
29953
|
+
["trust_parent" /* TRUST_PARENT */]: TrustLevel.TRUST_PARENT,
|
|
29954
|
+
["do_not_trust" /* DO_NOT_TRUST */]: TrustLevel.DO_NOT_TRUST
|
|
30104
29955
|
};
|
|
30105
29956
|
const trustLevel = trustLevelMap[choice];
|
|
30106
29957
|
if (!trustLevel) return;
|
|
@@ -30119,7 +29970,7 @@ var useFolderTrust = (settings, onTrustChange, addItem) => {
|
|
|
30119
29970
|
}, 100);
|
|
30120
29971
|
return;
|
|
30121
29972
|
}
|
|
30122
|
-
const currentIsTrusted = trustLevel ===
|
|
29973
|
+
const currentIsTrusted = trustLevel === TrustLevel.TRUST_FOLDER || trustLevel === TrustLevel.TRUST_PARENT;
|
|
30123
29974
|
onTrustChange(currentIsTrusted);
|
|
30124
29975
|
setIsTrusted(currentIsTrusted);
|
|
30125
29976
|
const wasTrusted = isTrusted ?? false;
|
|
@@ -33607,7 +33458,7 @@ ${queuedText}` : queuedText;
|
|
|
33607
33458
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
33608
33459
|
if (settings.merged.general.devtools) {
|
|
33609
33460
|
void (async () => {
|
|
33610
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
33461
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-S2LBUUZU.js");
|
|
33611
33462
|
await toggleDevToolsPanel(
|
|
33612
33463
|
config,
|
|
33613
33464
|
showErrorDetails,
|