@google/gemini-cli 0.41.0-preview.1 → 0.42.0-nightly.20260501.gcaa046641
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-36LZQV4W.js → chunk-2HOG45IA.js} +1047 -1240
- package/bundle/{chunk-NGB7ZVQL.js → chunk-2WK6K7H4.js} +67 -507
- package/bundle/{chunk-DOHALVIP.js → chunk-3Y7ZPPS2.js} +1047 -1240
- package/bundle/chunk-4SBF4FWA.js +512 -0
- package/bundle/{chunk-XRLFHCHC.js → chunk-533APETE.js} +30 -12
- package/bundle/{chunk-T5I4M6M4.js → chunk-747IFMEA.js} +3 -3
- package/bundle/chunk-CTSXRP2T.js +512 -0
- package/bundle/{chunk-DCHOW6BK.js → chunk-CVJABGPV.js} +2 -2
- package/bundle/{chunk-VWYB6GSK.js → chunk-DDX3KSOF.js} +67 -507
- package/bundle/{chunk-DAEE6Y5T.js → chunk-EGV36KAI.js} +1047 -1240
- package/bundle/chunk-ESRGVL52.js +512 -0
- package/bundle/{chunk-SAJ72M2G.js → chunk-FABHOVMY.js} +23 -7
- package/bundle/chunk-FNLKMX3W.js +391 -0
- package/bundle/chunk-FTIY7CSS.js +391 -0
- package/bundle/{chunk-C5CRFFTY.js → chunk-GXIITUGM.js} +1 -1
- package/bundle/{chunk-45OGXTFK.js → chunk-HIYYW6PF.js} +3 -3
- package/bundle/chunk-IDYSRNE5.js +511 -0
- package/bundle/{chunk-QRSHDIRX.js → chunk-IJA7QQHF.js} +1 -1
- package/bundle/{chunk-U6WUS35U.js → chunk-ILECTCCH.js} +2 -2
- package/bundle/{chunk-R4LSW45D.js → chunk-J44J2AAV.js} +1 -1
- package/bundle/{chunk-KCDF3RDO.js → chunk-JPGLBVDA.js} +3 -3
- package/bundle/{chunk-VJ6K3S57.js → chunk-K5CA5JX2.js} +2 -2
- package/bundle/{chunk-6NFVEILC.js → chunk-L6URBAMF.js} +262 -81
- package/bundle/{chunk-5Z2T77EB.js → chunk-NNAHWZGK.js} +66 -507
- package/bundle/{chunk-KJ4M7JXR.js → chunk-SFDJ7FIE.js} +2 -2
- package/bundle/{chunk-QY23ZEK3.js → chunk-SYZNFSS3.js} +262 -81
- package/bundle/chunk-TBIPLAJP.js +391 -0
- package/bundle/{chunk-FFVUMIL3.js → chunk-TMQACI5N.js} +1047 -1240
- package/bundle/{chunk-XO6NKGWV.js → chunk-UCTXAZT6.js} +262 -81
- package/bundle/{chunk-VLSVN2FJ.js → chunk-USFRINC4.js} +1 -1
- package/bundle/chunk-VJOUKBFO.js +391 -0
- package/bundle/{chunk-EQSLZT5Z.js → chunk-VUMF52YD.js} +271 -81
- package/bundle/{chunk-5QI3ZXQB.js → chunk-WGWUS5AF.js} +67 -507
- package/bundle/{chunk-TBBDQEFQ.js → chunk-WTLXL6OZ.js} +3 -3
- package/bundle/{cleanup-3COTQVPP.js → cleanup-GQXJGC2H.js} +3 -3
- package/bundle/{cleanup-FIE6MCAE.js → cleanup-OSSEOJVY.js} +3 -3
- package/bundle/{cleanup-PREOBLFK.js → cleanup-TDBASRR5.js} +3 -3
- package/bundle/{cleanup-YY2EUT56.js → cleanup-XLWNSNLT.js} +3 -3
- package/bundle/{core-GZOFEER4.js → core-JH4LXS4F.js} +8 -2
- package/bundle/{devtoolsService-QXOHXSMJ.js → devtoolsService-DFWZ34A5.js} +3 -3
- package/bundle/{devtoolsService-DV36S632.js → devtoolsService-KZLK5WRW.js} +3 -3
- package/bundle/{devtoolsService-JPBL5I7F.js → devtoolsService-XIWMIEMB.js} +3 -3
- package/bundle/{devtoolsService-M4LZEBZD.js → devtoolsService-ZV5MJUBY.js} +3 -3
- package/bundle/{dist-HASTHPE3.js → dist-ATBEVH4R.js} +8 -2
- package/bundle/{dist-JVRDP7SO.js → dist-BOCIGIGG.js} +8 -2
- package/bundle/{dist-NSJ6AA4L.js → dist-TDGPCKNF.js} +8 -2
- package/bundle/docs/changelogs/index.md +18 -0
- package/bundle/docs/changelogs/latest.md +167 -242
- package/bundle/docs/changelogs/preview.md +99 -385
- package/bundle/docs/cli/cli-reference.md +1 -0
- package/bundle/docs/cli/creating-skills.md +165 -38
- package/bundle/docs/cli/custom-commands.md +1 -0
- package/bundle/docs/cli/model-routing.md +3 -3
- package/bundle/docs/cli/plan-mode.md +2 -1
- package/bundle/docs/cli/skills-best-practices.md +78 -0
- package/bundle/docs/cli/skills.md +98 -93
- package/bundle/docs/cli/tutorials/session-management.md +13 -0
- package/bundle/docs/cli/tutorials/skills-getting-started.md +140 -92
- package/bundle/docs/cli/using-agent-skills.md +89 -0
- package/bundle/docs/core/gemma-setup.md +83 -0
- package/bundle/docs/core/index.md +3 -2
- package/bundle/docs/core/local-model-routing.md +14 -7
- package/bundle/docs/reference/commands.md +14 -4
- package/bundle/docs/reference/configuration.md +76 -4
- package/bundle/docs/reference/keyboard-shortcuts.md +1 -1
- package/bundle/docs/reference/policy-engine.md +14 -3
- package/bundle/docs/sidebar.json +24 -2
- package/bundle/docs/tools/activate-skill.md +1 -1
- package/bundle/{gemini-IGRTXHCM.js → gemini-ETBA6M7V.js} +1067 -850
- package/bundle/{gemini-KIM7O55W.js → gemini-FUGMMZB7.js} +1067 -850
- package/bundle/{gemini-SFFHSCEY.js → gemini-QDNEMFTK.js} +1067 -850
- package/bundle/{gemini-FTUVOUHP.js → gemini-TZ26TZKD.js} +1067 -848
- package/bundle/gemini.js +20 -13
- package/bundle/{interactiveCli-LTPR447O.js → interactiveCli-74QXEIGP.js} +682 -609
- package/bundle/{interactiveCli-K4FIT7TA.js → interactiveCli-IBVICRF7.js} +682 -609
- package/bundle/{interactiveCli-7HPLINVC.js → interactiveCli-OKS4NPC7.js} +682 -609
- package/bundle/{interactiveCli-JOX7MFFH.js → interactiveCli-ZS4ZQWNV.js} +682 -609
- package/bundle/{liteRtServerManager-BENLLSF2.js → liteRtServerManager-I5CSGWRL.js} +5 -4
- package/bundle/{liteRtServerManager-KDO6UAQ5.js → liteRtServerManager-IDNLXYHP.js} +5 -4
- package/bundle/{liteRtServerManager-MQIQXXZQ.js → liteRtServerManager-J33F7APP.js} +5 -4
- package/bundle/{liteRtServerManager-VGYEHFUE.js → liteRtServerManager-RJF74BUI.js} +5 -4
- package/bundle/{memoryDiscovery-FN3IAPBT.js → memoryDiscovery-LIJKMASE.js} +1 -1
- package/bundle/{memoryDiscovery-R7PAR2NY.js → memoryDiscovery-WVH7QDNJ.js} +1 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-JPCBTTS2.js → oauth2-provider-7UM3XCQ4.js} +2 -2
- package/bundle/{oauth2-provider-EWMNT6D6.js → oauth2-provider-BFW5HE2U.js} +2 -2
- package/bundle/{oauth2-provider-M3WV4GJM.js → oauth2-provider-LONBXYVY.js} +2 -2
- package/bundle/{oauth2-provider-UVXCM7G3.js → oauth2-provider-N65VILW5.js} +2 -2
- package/bundle/{start-4MSISK2E.js → start-3B4FNGNM.js} +7 -6
- package/bundle/{start-ATOE57Z4.js → start-3OM5OXD2.js} +7 -6
- package/bundle/{start-AVEON6UU.js → start-N3S3BSEF.js} +7 -6
- package/bundle/{start-KBB2UTE5.js → start-PLPHF43U.js} +7 -6
- package/package.json +1 -1
|
@@ -83,12 +83,10 @@ import {
|
|
|
83
83
|
getTransformUnderCursor,
|
|
84
84
|
getUsedStatusColor,
|
|
85
85
|
handleAtCommand,
|
|
86
|
-
handleAutoUpdate,
|
|
87
86
|
isAtCommand,
|
|
88
87
|
isAutoExecutableCommand,
|
|
89
88
|
isBrowser,
|
|
90
89
|
isContextUsageHigh,
|
|
91
|
-
isDevelopment,
|
|
92
90
|
isInSettingsScope,
|
|
93
91
|
isNarrowWidth,
|
|
94
92
|
isNewFile,
|
|
@@ -105,14 +103,12 @@ import {
|
|
|
105
103
|
parseSlashCommand,
|
|
106
104
|
persistentState,
|
|
107
105
|
profiler,
|
|
108
|
-
relaunchApp,
|
|
109
106
|
renderDiffLines,
|
|
110
107
|
render_default,
|
|
111
108
|
requestConsentInteractive,
|
|
112
109
|
require_jsx_runtime,
|
|
113
110
|
require_semver,
|
|
114
111
|
saveClipboardImage,
|
|
115
|
-
setUpdateHandler,
|
|
116
112
|
shouldSwitchTheme,
|
|
117
113
|
startAutoMemoryIfEnabled,
|
|
118
114
|
styledCharsWidth,
|
|
@@ -152,13 +148,13 @@ import {
|
|
|
152
148
|
widestLineFromStyledChars,
|
|
153
149
|
wordBreakStyledChars,
|
|
154
150
|
wrapStyledChars
|
|
155
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-EGV36KAI.js";
|
|
156
152
|
import {
|
|
157
153
|
appEvents
|
|
158
154
|
} from "./chunk-5PS3AYFU.js";
|
|
159
155
|
import {
|
|
160
156
|
require_source
|
|
161
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-J44J2AAV.js";
|
|
162
158
|
import {
|
|
163
159
|
ACTIVE_SHELL_MAX_LINES,
|
|
164
160
|
COMPACT_TOOL_SUBVIEW_MAX_LINES,
|
|
@@ -198,26 +194,34 @@ import {
|
|
|
198
194
|
getSessionFiles,
|
|
199
195
|
interpolateColor,
|
|
200
196
|
isLoadableSettingScope,
|
|
201
|
-
isTodoList,
|
|
202
197
|
isWorkspaceTrusted,
|
|
203
198
|
loadTrustedFolders,
|
|
204
|
-
mapCoreStatusToDisplayStatus,
|
|
205
199
|
normalizeEscapedNewlines,
|
|
206
200
|
pickDefaultThemeName,
|
|
207
|
-
require_react,
|
|
208
201
|
require_tinygradient,
|
|
209
202
|
resolveColor,
|
|
210
203
|
sanitizeForDisplay,
|
|
211
204
|
stringWidth,
|
|
212
205
|
stripUnsafeCharacters,
|
|
213
206
|
toCodePoints
|
|
214
|
-
} from "./chunk-
|
|
207
|
+
} from "./chunk-2WK6K7H4.js";
|
|
208
|
+
import {
|
|
209
|
+
handleAutoUpdate,
|
|
210
|
+
isDevelopment,
|
|
211
|
+
relaunchApp,
|
|
212
|
+
setUpdateHandler
|
|
213
|
+
} from "./chunk-FTIY7CSS.js";
|
|
214
|
+
import {
|
|
215
|
+
isTodoList,
|
|
216
|
+
mapCoreStatusToDisplayStatus,
|
|
217
|
+
require_react
|
|
218
|
+
} from "./chunk-ESRGVL52.js";
|
|
215
219
|
import {
|
|
216
220
|
registerCleanup,
|
|
217
221
|
removeCleanup,
|
|
218
222
|
runExitCleanup,
|
|
219
223
|
setupTtyCheck
|
|
220
|
-
} from "./chunk-
|
|
224
|
+
} from "./chunk-K5CA5JX2.js";
|
|
221
225
|
import {
|
|
222
226
|
ApiKeyUpdatedEvent,
|
|
223
227
|
AsyncFzf,
|
|
@@ -251,6 +255,7 @@ import {
|
|
|
251
255
|
OverageOptionSelectedEvent,
|
|
252
256
|
PolicyIntegrityManager,
|
|
253
257
|
ProjectIdRequiredError,
|
|
258
|
+
RELEASE_CHANNEL_STABILITY,
|
|
254
259
|
ROOT_SCHEDULER_ID,
|
|
255
260
|
Scheduler,
|
|
256
261
|
SessionEndReason,
|
|
@@ -289,6 +294,7 @@ import {
|
|
|
289
294
|
geminiPartsToContentParts,
|
|
290
295
|
generateSummary,
|
|
291
296
|
getAdminErrorMessage,
|
|
297
|
+
getChannelFromVersion,
|
|
292
298
|
getCodeAssistServer,
|
|
293
299
|
getEditorDisplayName,
|
|
294
300
|
getG1CreditBalance,
|
|
@@ -349,7 +355,7 @@ import {
|
|
|
349
355
|
validatePlanContent,
|
|
350
356
|
validatePlanPath,
|
|
351
357
|
writeToStdout
|
|
352
|
-
} from "./chunk-
|
|
358
|
+
} from "./chunk-SYZNFSS3.js";
|
|
353
359
|
import {
|
|
354
360
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
355
361
|
AGENT_TOOL_NAME,
|
|
@@ -416,7 +422,7 @@ import {
|
|
|
416
422
|
safeJsonToMarkdown,
|
|
417
423
|
shortenPath,
|
|
418
424
|
tildeifyPath
|
|
419
|
-
} from "./chunk-
|
|
425
|
+
} from "./chunk-FABHOVMY.js";
|
|
420
426
|
import "./chunk-664ZODQF.js";
|
|
421
427
|
import "./chunk-RJTRUG2J.js";
|
|
422
428
|
import "./chunk-IUUIT4SU.js";
|
|
@@ -5838,7 +5844,8 @@ var ToolInfo = ({
|
|
|
5838
5844
|
status: coreStatus,
|
|
5839
5845
|
emphasis,
|
|
5840
5846
|
progressMessage: _progressMessage,
|
|
5841
|
-
originalRequestName
|
|
5847
|
+
originalRequestName,
|
|
5848
|
+
isExpanded = false
|
|
5842
5849
|
}) => {
|
|
5843
5850
|
const status = mapCoreStatusToDisplayStatus(coreStatus);
|
|
5844
5851
|
const nameColor = import_react16.default.useMemo(() => {
|
|
@@ -5856,19 +5863,35 @@ var ToolInfo = ({
|
|
|
5856
5863
|
}
|
|
5857
5864
|
}, [emphasis]);
|
|
5858
5865
|
const isCompletedAskUser = isCompletedAskUserTool(name, status);
|
|
5859
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
5867
|
+
Box_default,
|
|
5868
|
+
{
|
|
5869
|
+
overflow: "hidden",
|
|
5870
|
+
height: isExpanded ? void 0 : 1,
|
|
5871
|
+
flexGrow: 1,
|
|
5872
|
+
flexShrink: 1,
|
|
5873
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
5874
|
+
Text,
|
|
5875
|
+
{
|
|
5876
|
+
strikethrough: status === "Canceled" /* Canceled */,
|
|
5877
|
+
wrap: isExpanded ? "wrap" : "truncate",
|
|
5878
|
+
children: [
|
|
5879
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { color: nameColor, bold: true, children: name }),
|
|
5880
|
+
originalRequestName && originalRequestName !== name && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Text, { color: theme.text.secondary, italic: true, children: [
|
|
5881
|
+
" ",
|
|
5882
|
+
"(redirection from ",
|
|
5883
|
+
originalRequestName,
|
|
5884
|
+
")"
|
|
5885
|
+
] }),
|
|
5886
|
+
!isCompletedAskUser && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
5887
|
+
" ",
|
|
5888
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { color: theme.text.secondary, children: description })
|
|
5889
|
+
] })
|
|
5890
|
+
]
|
|
5891
|
+
}
|
|
5892
|
+
)
|
|
5893
|
+
}
|
|
5894
|
+
);
|
|
5872
5895
|
};
|
|
5873
5896
|
var McpProgressIndicator = ({
|
|
5874
5897
|
progress,
|
|
@@ -6294,14 +6317,121 @@ var ShellInputPrompt = ({
|
|
|
6294
6317
|
return null;
|
|
6295
6318
|
};
|
|
6296
6319
|
|
|
6320
|
+
// packages/cli/src/ui/contexts/ToolActionsContext.tsx
|
|
6321
|
+
var import_react19 = __toESM(require_react(), 1);
|
|
6322
|
+
var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
|
|
6323
|
+
function hasLegacyCallback(details) {
|
|
6324
|
+
return !!details && "onConfirm" in details && typeof details.onConfirm === "function";
|
|
6325
|
+
}
|
|
6326
|
+
var ToolActionsContext = (0, import_react19.createContext)(null);
|
|
6327
|
+
var useToolActions = () => {
|
|
6328
|
+
const context = (0, import_react19.useContext)(ToolActionsContext);
|
|
6329
|
+
if (!context) {
|
|
6330
|
+
throw new Error("useToolActions must be used within a ToolActionsProvider");
|
|
6331
|
+
}
|
|
6332
|
+
return context;
|
|
6333
|
+
};
|
|
6334
|
+
var ToolActionsProvider = (props) => {
|
|
6335
|
+
const {
|
|
6336
|
+
children,
|
|
6337
|
+
config,
|
|
6338
|
+
toolCalls,
|
|
6339
|
+
isExpanded,
|
|
6340
|
+
toggleExpansion,
|
|
6341
|
+
toggleAllExpansion
|
|
6342
|
+
} = props;
|
|
6343
|
+
const [ideClient, setIdeClient] = (0, import_react19.useState)(null);
|
|
6344
|
+
const [isDiffingEnabled, setIsDiffingEnabled] = (0, import_react19.useState)(false);
|
|
6345
|
+
(0, import_react19.useEffect)(() => {
|
|
6346
|
+
let isMounted = true;
|
|
6347
|
+
let activeClient = null;
|
|
6348
|
+
const handleStatusChange = () => {
|
|
6349
|
+
if (isMounted && activeClient) {
|
|
6350
|
+
setIsDiffingEnabled(activeClient.isDiffingEnabled());
|
|
6351
|
+
}
|
|
6352
|
+
};
|
|
6353
|
+
if (config.getIdeMode()) {
|
|
6354
|
+
IdeClient.getInstance().then((client) => {
|
|
6355
|
+
if (!isMounted) return;
|
|
6356
|
+
activeClient = client;
|
|
6357
|
+
setIdeClient(client);
|
|
6358
|
+
setIsDiffingEnabled(client.isDiffingEnabled());
|
|
6359
|
+
client.addStatusChangeListener(handleStatusChange);
|
|
6360
|
+
}).catch((error) => {
|
|
6361
|
+
debugLogger.error("Failed to get IdeClient instance:", error);
|
|
6362
|
+
});
|
|
6363
|
+
}
|
|
6364
|
+
return () => {
|
|
6365
|
+
isMounted = false;
|
|
6366
|
+
if (activeClient) {
|
|
6367
|
+
activeClient.removeStatusChangeListener(handleStatusChange);
|
|
6368
|
+
}
|
|
6369
|
+
};
|
|
6370
|
+
}, [config]);
|
|
6371
|
+
const confirm = (0, import_react19.useCallback)(
|
|
6372
|
+
async (callId, outcome, payload) => {
|
|
6373
|
+
const tool = toolCalls.find((t) => t.callId === callId);
|
|
6374
|
+
if (!tool) {
|
|
6375
|
+
debugLogger.warn(`ToolActions: Tool ${callId} not found`);
|
|
6376
|
+
return;
|
|
6377
|
+
}
|
|
6378
|
+
const details = tool.confirmationDetails;
|
|
6379
|
+
if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
|
|
6380
|
+
const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
|
|
6381
|
+
await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
|
|
6382
|
+
}
|
|
6383
|
+
if (tool.correlationId) {
|
|
6384
|
+
await config.getMessageBus().publish({
|
|
6385
|
+
type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
|
|
6386
|
+
correlationId: tool.correlationId,
|
|
6387
|
+
confirmed: outcome !== ToolConfirmationOutcome.Cancel,
|
|
6388
|
+
requiresUserConfirmation: false,
|
|
6389
|
+
outcome,
|
|
6390
|
+
payload
|
|
6391
|
+
});
|
|
6392
|
+
return;
|
|
6393
|
+
}
|
|
6394
|
+
if (hasLegacyCallback(details)) {
|
|
6395
|
+
await details.onConfirm(outcome, payload);
|
|
6396
|
+
return;
|
|
6397
|
+
}
|
|
6398
|
+
debugLogger.warn(
|
|
6399
|
+
`ToolActions: No correlationId or callback for ${callId}`
|
|
6400
|
+
);
|
|
6401
|
+
},
|
|
6402
|
+
[config, ideClient, toolCalls, isDiffingEnabled]
|
|
6403
|
+
);
|
|
6404
|
+
const cancel = (0, import_react19.useCallback)(
|
|
6405
|
+
async (callId) => {
|
|
6406
|
+
await confirm(callId, ToolConfirmationOutcome.Cancel);
|
|
6407
|
+
},
|
|
6408
|
+
[confirm]
|
|
6409
|
+
);
|
|
6410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
6411
|
+
ToolActionsContext.Provider,
|
|
6412
|
+
{
|
|
6413
|
+
value: {
|
|
6414
|
+
confirm,
|
|
6415
|
+
cancel,
|
|
6416
|
+
isDiffingEnabled,
|
|
6417
|
+
isExpanded,
|
|
6418
|
+
toggleExpansion,
|
|
6419
|
+
toggleAllExpansion
|
|
6420
|
+
},
|
|
6421
|
+
children
|
|
6422
|
+
}
|
|
6423
|
+
);
|
|
6424
|
+
};
|
|
6425
|
+
|
|
6297
6426
|
// packages/cli/src/ui/components/messages/ToolMessage.tsx
|
|
6298
|
-
var
|
|
6427
|
+
var import_jsx_runtime21 = (
|
|
6299
6428
|
// It is crucial we don't replace this <> with a Box because otherwise the
|
|
6300
6429
|
// sticky header inside it would be sticky to that box rather than to the
|
|
6301
6430
|
// parent component of this ToolMessage.
|
|
6302
6431
|
__toESM(require_jsx_runtime(), 1)
|
|
6303
6432
|
);
|
|
6304
6433
|
var ToolMessage = ({
|
|
6434
|
+
callId,
|
|
6305
6435
|
name,
|
|
6306
6436
|
description,
|
|
6307
6437
|
resultDisplay,
|
|
@@ -6323,6 +6453,8 @@ var ToolMessage = ({
|
|
|
6323
6453
|
progress,
|
|
6324
6454
|
progressTotal
|
|
6325
6455
|
}) => {
|
|
6456
|
+
const { isExpanded: isExpandedInContext } = useToolActions();
|
|
6457
|
+
const isExpanded = (isExpandedInContext ? isExpandedInContext(callId) : false) || availableTerminalHeight === void 0;
|
|
6326
6458
|
const isThisShellFocused2 = isThisShellFocused(
|
|
6327
6459
|
name,
|
|
6328
6460
|
status,
|
|
@@ -6336,8 +6468,8 @@ var ToolMessage = ({
|
|
|
6336
6468
|
isThisShellFocused2,
|
|
6337
6469
|
resultDisplay
|
|
6338
6470
|
);
|
|
6339
|
-
return /* @__PURE__ */ (0,
|
|
6340
|
-
/* @__PURE__ */ (0,
|
|
6471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
6472
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
6341
6473
|
StickyHeader,
|
|
6342
6474
|
{
|
|
6343
6475
|
width: terminalWidth,
|
|
@@ -6345,7 +6477,7 @@ var ToolMessage = ({
|
|
|
6345
6477
|
borderColor,
|
|
6346
6478
|
borderDimColor,
|
|
6347
6479
|
children: [
|
|
6348
|
-
/* @__PURE__ */ (0,
|
|
6480
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
6349
6481
|
ToolStatusIndicator,
|
|
6350
6482
|
{
|
|
6351
6483
|
status,
|
|
@@ -6353,7 +6485,7 @@ var ToolMessage = ({
|
|
|
6353
6485
|
isFocused: isThisShellFocused2
|
|
6354
6486
|
}
|
|
6355
6487
|
),
|
|
6356
|
-
/* @__PURE__ */ (0,
|
|
6488
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
6357
6489
|
ToolInfo,
|
|
6358
6490
|
{
|
|
6359
6491
|
name,
|
|
@@ -6361,21 +6493,22 @@ var ToolMessage = ({
|
|
|
6361
6493
|
description,
|
|
6362
6494
|
emphasis,
|
|
6363
6495
|
progressMessage,
|
|
6364
|
-
originalRequestName
|
|
6496
|
+
originalRequestName,
|
|
6497
|
+
isExpanded
|
|
6365
6498
|
}
|
|
6366
6499
|
),
|
|
6367
|
-
/* @__PURE__ */ (0,
|
|
6500
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
6368
6501
|
FocusHint,
|
|
6369
6502
|
{
|
|
6370
6503
|
shouldShowFocusHint,
|
|
6371
6504
|
isThisShellFocused: isThisShellFocused2
|
|
6372
6505
|
}
|
|
6373
6506
|
),
|
|
6374
|
-
emphasis === "high" && /* @__PURE__ */ (0,
|
|
6507
|
+
emphasis === "high" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TrailingIndicator, {})
|
|
6375
6508
|
]
|
|
6376
6509
|
}
|
|
6377
6510
|
),
|
|
6378
|
-
/* @__PURE__ */ (0,
|
|
6511
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
6379
6512
|
Box_default,
|
|
6380
6513
|
{
|
|
6381
6514
|
width: terminalWidth,
|
|
@@ -6389,7 +6522,7 @@ var ToolMessage = ({
|
|
|
6389
6522
|
paddingX: 1,
|
|
6390
6523
|
flexDirection: "column",
|
|
6391
6524
|
children: [
|
|
6392
|
-
status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0,
|
|
6525
|
+
status === CoreToolCallStatus.Executing && progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
6393
6526
|
McpProgressIndicator,
|
|
6394
6527
|
{
|
|
6395
6528
|
progress,
|
|
@@ -6398,7 +6531,7 @@ var ToolMessage = ({
|
|
|
6398
6531
|
barWidth: 20
|
|
6399
6532
|
}
|
|
6400
6533
|
),
|
|
6401
|
-
/* @__PURE__ */ (0,
|
|
6534
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
6402
6535
|
ToolResultDisplay,
|
|
6403
6536
|
{
|
|
6404
6537
|
resultDisplay,
|
|
@@ -6410,7 +6543,7 @@ var ToolMessage = ({
|
|
|
6410
6543
|
overflowDirection: kind === Kind.Agent ? "bottom" : "top"
|
|
6411
6544
|
}
|
|
6412
6545
|
),
|
|
6413
|
-
isThisShellFocused2 && config && /* @__PURE__ */ (0,
|
|
6546
|
+
isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { paddingLeft: STATUS_INDICATOR_WIDTH, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
6414
6547
|
ShellInputPrompt,
|
|
6415
6548
|
{
|
|
6416
6549
|
activeShellPtyId: activeShellPtyId ?? null,
|
|
@@ -6424,13 +6557,13 @@ var ToolMessage = ({
|
|
|
6424
6557
|
};
|
|
6425
6558
|
|
|
6426
6559
|
// packages/cli/src/ui/components/messages/ShellToolMessage.tsx
|
|
6427
|
-
var
|
|
6560
|
+
var import_react24 = __toESM(require_react(), 1);
|
|
6428
6561
|
|
|
6429
6562
|
// packages/cli/src/ui/contexts/UIActionsContext.tsx
|
|
6430
|
-
var
|
|
6563
|
+
var import_react23 = __toESM(require_react(), 1);
|
|
6431
6564
|
|
|
6432
6565
|
// packages/cli/src/ui/IdeIntegrationNudge.tsx
|
|
6433
|
-
var
|
|
6566
|
+
var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
|
|
6434
6567
|
function IdeIntegrationNudge({
|
|
6435
6568
|
ide,
|
|
6436
6569
|
onComplete
|
|
@@ -6477,7 +6610,7 @@ function IdeIntegrationNudge({
|
|
|
6477
6610
|
}
|
|
6478
6611
|
];
|
|
6479
6612
|
const installText = isExtensionPreInstalled ? `If you select Yes, the CLI will have access to your open files and display diffs directly in ${ideName ?? "your editor"}.` : `If you select Yes, we'll install an extension that allows the CLI to access your open files and display diffs directly in ${ideName ?? "your editor"}.`;
|
|
6480
|
-
return /* @__PURE__ */ (0,
|
|
6613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
6481
6614
|
Box_default,
|
|
6482
6615
|
{
|
|
6483
6616
|
flexDirection: "column",
|
|
@@ -6487,26 +6620,26 @@ function IdeIntegrationNudge({
|
|
|
6487
6620
|
width: "100%",
|
|
6488
6621
|
marginLeft: 1,
|
|
6489
6622
|
children: [
|
|
6490
|
-
/* @__PURE__ */ (0,
|
|
6491
|
-
/* @__PURE__ */ (0,
|
|
6492
|
-
/* @__PURE__ */ (0,
|
|
6623
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Box_default, { marginBottom: 1, flexDirection: "column", children: [
|
|
6624
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Text, { children: [
|
|
6625
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: theme.status.warning, children: "> " }),
|
|
6493
6626
|
`Do you want to connect ${ideName ?? "your editor"} to Gemini CLI?`
|
|
6494
6627
|
] }),
|
|
6495
|
-
/* @__PURE__ */ (0,
|
|
6628
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: theme.text.secondary, children: installText })
|
|
6496
6629
|
] }),
|
|
6497
|
-
/* @__PURE__ */ (0,
|
|
6630
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(RadioButtonSelect, { items: OPTIONS, onSelect: onComplete })
|
|
6498
6631
|
]
|
|
6499
6632
|
}
|
|
6500
6633
|
);
|
|
6501
6634
|
}
|
|
6502
6635
|
|
|
6503
6636
|
// packages/cli/src/ui/components/FolderTrustDialog.tsx
|
|
6504
|
-
var
|
|
6637
|
+
var import_react20 = __toESM(require_react(), 1);
|
|
6505
6638
|
import * as process2 from "node:process";
|
|
6506
6639
|
import * as path from "node:path";
|
|
6507
6640
|
|
|
6508
6641
|
// packages/cli/src/ui/components/ShowMoreLines.tsx
|
|
6509
|
-
var
|
|
6642
|
+
var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
|
|
6510
6643
|
var ShowMoreLines = ({
|
|
6511
6644
|
constrainHeight,
|
|
6512
6645
|
isOverflowing: isOverflowingProp
|
|
@@ -6517,21 +6650,21 @@ var ShowMoreLines = ({
|
|
|
6517
6650
|
if (!isOverflowing || !constrainHeight || !(streamingState === "idle" /* Idle */ || streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ || streamingState === "responding" /* Responding */)) {
|
|
6518
6651
|
return null;
|
|
6519
6652
|
}
|
|
6520
|
-
return /* @__PURE__ */ (0,
|
|
6653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Box_default, { paddingX: 1, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { color: theme.text.accent, wrap: "truncate", children: "Press Ctrl+O to show more lines" }) });
|
|
6521
6654
|
};
|
|
6522
6655
|
|
|
6523
6656
|
// packages/cli/src/ui/components/FolderTrustDialog.tsx
|
|
6524
|
-
var
|
|
6657
|
+
var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
|
|
6525
6658
|
var FolderTrustDialog = ({
|
|
6526
6659
|
onSelect,
|
|
6527
6660
|
isRestarting,
|
|
6528
6661
|
discoveryResults
|
|
6529
6662
|
}) => {
|
|
6530
|
-
const [exiting, setExiting] = (0,
|
|
6663
|
+
const [exiting, setExiting] = (0, import_react20.useState)(false);
|
|
6531
6664
|
const { terminalHeight, terminalWidth, constrainHeight } = useUIState();
|
|
6532
6665
|
const isAlternateBuffer = useAlternateBuffer();
|
|
6533
6666
|
const isExpanded = !constrainHeight;
|
|
6534
|
-
(0,
|
|
6667
|
+
(0, import_react20.useEffect)(() => {
|
|
6535
6668
|
let timer;
|
|
6536
6669
|
if (isRestarting) {
|
|
6537
6670
|
timer = setTimeout(relaunchApp, 250);
|
|
@@ -6540,7 +6673,7 @@ var FolderTrustDialog = ({
|
|
|
6540
6673
|
if (timer) clearTimeout(timer);
|
|
6541
6674
|
};
|
|
6542
6675
|
}, [isRestarting]);
|
|
6543
|
-
const handleExit = (0,
|
|
6676
|
+
const handleExit = (0, import_react20.useCallback)(() => {
|
|
6544
6677
|
setExiting(true);
|
|
6545
6678
|
setTimeout(async () => {
|
|
6546
6679
|
await runExitCleanup();
|
|
@@ -6591,41 +6724,41 @@ var FolderTrustDialog = ({
|
|
|
6591
6724
|
{ label: "Agents", items: discoveryResults?.agents ?? [] },
|
|
6592
6725
|
{ label: "Setting overrides", items: discoveryResults?.settings ?? [] }
|
|
6593
6726
|
].filter((g) => g.items.length > 0);
|
|
6594
|
-
const discoveryContent = /* @__PURE__ */ (0,
|
|
6595
|
-
/* @__PURE__ */ (0,
|
|
6596
|
-
hasErrors && /* @__PURE__ */ (0,
|
|
6597
|
-
/* @__PURE__ */ (0,
|
|
6598
|
-
discoveryResults.discoveryErrors.map((error, i) => /* @__PURE__ */ (0,
|
|
6727
|
+
const discoveryContent = /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
6728
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.primary, children: "Trusting a folder allows Gemini CLI to load its local configurations, including custom commands, hooks, MCP servers, agent skills, and settings. These configurations could execute code on your behalf or change the behavior of the CLI." }) }),
|
|
6729
|
+
hasErrors && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
6730
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.error, bold: true, children: "\u274C Discovery Errors:" }),
|
|
6731
|
+
discoveryResults.discoveryErrors.map((error, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme.status.error, children: [
|
|
6599
6732
|
"\u2022 ",
|
|
6600
6733
|
stripAnsi(error)
|
|
6601
6734
|
] }) }, i))
|
|
6602
6735
|
] }),
|
|
6603
|
-
hasWarnings && /* @__PURE__ */ (0,
|
|
6604
|
-
/* @__PURE__ */ (0,
|
|
6605
|
-
discoveryResults.securityWarnings.map((warning, i) => /* @__PURE__ */ (0,
|
|
6736
|
+
hasWarnings && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
6737
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.warning, bold: true, children: "\u26A0\uFE0F Security Warnings:" }),
|
|
6738
|
+
discoveryResults.securityWarnings.map((warning, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme.status.warning, children: [
|
|
6606
6739
|
"\u2022 ",
|
|
6607
6740
|
stripAnsi(warning)
|
|
6608
6741
|
] }) }, i))
|
|
6609
6742
|
] }),
|
|
6610
|
-
hasDiscovery && /* @__PURE__ */ (0,
|
|
6611
|
-
/* @__PURE__ */ (0,
|
|
6612
|
-
groups.map((group) => /* @__PURE__ */ (0,
|
|
6613
|
-
/* @__PURE__ */ (0,
|
|
6743
|
+
hasDiscovery && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
6744
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.primary, bold: true, children: "This folder contains:" }),
|
|
6745
|
+
groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", marginLeft: 2, children: [
|
|
6746
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme.text.primary, bold: true, children: [
|
|
6614
6747
|
"\u2022 ",
|
|
6615
6748
|
group.label,
|
|
6616
6749
|
" (",
|
|
6617
6750
|
group.items.length,
|
|
6618
6751
|
"):"
|
|
6619
6752
|
] }),
|
|
6620
|
-
group.items.map((item, idx) => /* @__PURE__ */ (0,
|
|
6753
|
+
group.items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme.text.primary, children: [
|
|
6621
6754
|
"- ",
|
|
6622
6755
|
stripAnsi(item)
|
|
6623
6756
|
] }) }, idx))
|
|
6624
6757
|
] }, group.label))
|
|
6625
6758
|
] })
|
|
6626
6759
|
] });
|
|
6627
|
-
const title = /* @__PURE__ */ (0,
|
|
6628
|
-
const selectOptions = /* @__PURE__ */ (0,
|
|
6760
|
+
const title = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { bold: true, color: theme.text.primary, children: "Do you trust the files in this folder?" });
|
|
6761
|
+
const selectOptions = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
6629
6762
|
RadioButtonSelect,
|
|
6630
6763
|
{
|
|
6631
6764
|
items: options,
|
|
@@ -6635,8 +6768,8 @@ var FolderTrustDialog = ({
|
|
|
6635
6768
|
);
|
|
6636
6769
|
const renderContent = () => {
|
|
6637
6770
|
if (isAlternateBuffer) {
|
|
6638
|
-
return /* @__PURE__ */ (0,
|
|
6639
|
-
/* @__PURE__ */ (0,
|
|
6771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", width: dialogWidth, children: [
|
|
6772
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
6640
6773
|
StickyHeader,
|
|
6641
6774
|
{
|
|
6642
6775
|
width: dialogWidth,
|
|
@@ -6646,7 +6779,7 @@ var FolderTrustDialog = ({
|
|
|
6646
6779
|
children: title
|
|
6647
6780
|
}
|
|
6648
6781
|
),
|
|
6649
|
-
/* @__PURE__ */ (0,
|
|
6782
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
6650
6783
|
Box_default,
|
|
6651
6784
|
{
|
|
6652
6785
|
flexDirection: "column",
|
|
@@ -6658,20 +6791,20 @@ var FolderTrustDialog = ({
|
|
|
6658
6791
|
borderBottom: false,
|
|
6659
6792
|
width: dialogWidth,
|
|
6660
6793
|
children: [
|
|
6661
|
-
/* @__PURE__ */ (0,
|
|
6794
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
6662
6795
|
Scrollable,
|
|
6663
6796
|
{
|
|
6664
6797
|
hasFocus: !isRestarting,
|
|
6665
6798
|
height: scrollableHeight,
|
|
6666
6799
|
width: dialogWidth - 2,
|
|
6667
|
-
children: /* @__PURE__ */ (0,
|
|
6800
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { flexDirection: "column", paddingX: 1, children: discoveryContent })
|
|
6668
6801
|
}
|
|
6669
6802
|
),
|
|
6670
|
-
/* @__PURE__ */ (0,
|
|
6803
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { paddingX: 1, marginY: 1, children: selectOptions })
|
|
6671
6804
|
]
|
|
6672
6805
|
}
|
|
6673
6806
|
),
|
|
6674
|
-
/* @__PURE__ */ (0,
|
|
6807
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
6675
6808
|
Box_default,
|
|
6676
6809
|
{
|
|
6677
6810
|
height: 0,
|
|
@@ -6686,7 +6819,7 @@ var FolderTrustDialog = ({
|
|
|
6686
6819
|
)
|
|
6687
6820
|
] });
|
|
6688
6821
|
}
|
|
6689
|
-
return /* @__PURE__ */ (0,
|
|
6822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
6690
6823
|
Box_default,
|
|
6691
6824
|
{
|
|
6692
6825
|
flexDirection: "column",
|
|
@@ -6695,8 +6828,8 @@ var FolderTrustDialog = ({
|
|
|
6695
6828
|
padding: 1,
|
|
6696
6829
|
width: "100%",
|
|
6697
6830
|
children: [
|
|
6698
|
-
/* @__PURE__ */ (0,
|
|
6699
|
-
/* @__PURE__ */ (0,
|
|
6831
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginBottom: 1, children: title }),
|
|
6832
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
6700
6833
|
MaxSizedBox,
|
|
6701
6834
|
{
|
|
6702
6835
|
maxHeight: isExpanded ? void 0 : Math.max(4, terminalHeight - 12),
|
|
@@ -6704,18 +6837,18 @@ var FolderTrustDialog = ({
|
|
|
6704
6837
|
children: discoveryContent
|
|
6705
6838
|
}
|
|
6706
6839
|
),
|
|
6707
|
-
/* @__PURE__ */ (0,
|
|
6840
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginTop: 1, children: selectOptions })
|
|
6708
6841
|
]
|
|
6709
6842
|
}
|
|
6710
6843
|
);
|
|
6711
6844
|
};
|
|
6712
|
-
const content = /* @__PURE__ */ (0,
|
|
6713
|
-
/* @__PURE__ */ (0,
|
|
6714
|
-
/* @__PURE__ */ (0,
|
|
6715
|
-
isRestarting && /* @__PURE__ */ (0,
|
|
6716
|
-
exiting && /* @__PURE__ */ (0,
|
|
6845
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", width: "100%", children: [
|
|
6846
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { flexDirection: "column", marginLeft: 1, marginRight: 1, children: renderContent() }),
|
|
6847
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { paddingX: 2, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ShowMoreLines, { constrainHeight }) }),
|
|
6848
|
+
isRestarting && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginLeft: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.warning, children: "Gemini CLI is restarting to apply the trust changes..." }) }),
|
|
6849
|
+
exiting && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginLeft: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.status.warning, children: "A folder trust level must be selected to continue. Exiting since escape was pressed." }) })
|
|
6717
6850
|
] });
|
|
6718
|
-
return /* @__PURE__ */ (0,
|
|
6851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(OverflowProvider, { children: content });
|
|
6719
6852
|
};
|
|
6720
6853
|
|
|
6721
6854
|
// packages/cli/src/ui/components/PermissionsModifyTrustDialog.tsx
|
|
@@ -6723,7 +6856,7 @@ import * as process4 from "node:process";
|
|
|
6723
6856
|
import * as path3 from "node:path";
|
|
6724
6857
|
|
|
6725
6858
|
// packages/cli/src/ui/hooks/usePermissionsModifyTrust.ts
|
|
6726
|
-
var
|
|
6859
|
+
var import_react21 = __toESM(require_react(), 1);
|
|
6727
6860
|
import * as process3 from "node:process";
|
|
6728
6861
|
import * as path2 from "node:path";
|
|
6729
6862
|
function getInitialTrustState(settings, cwd5, isCurrentWorkspace) {
|
|
@@ -6751,22 +6884,22 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
|
|
|
6751
6884
|
const settings = useSettings();
|
|
6752
6885
|
const cwd5 = targetDirectory;
|
|
6753
6886
|
const isCurrentWorkspace = path2.resolve(targetDirectory).toLowerCase() === path2.resolve(process3.cwd()).toLowerCase();
|
|
6754
|
-
const [initialState5] = (0,
|
|
6887
|
+
const [initialState5] = (0, import_react21.useState)(
|
|
6755
6888
|
() => getInitialTrustState(settings, cwd5, isCurrentWorkspace)
|
|
6756
6889
|
);
|
|
6757
|
-
const [currentTrustLevel] = (0,
|
|
6890
|
+
const [currentTrustLevel] = (0, import_react21.useState)(
|
|
6758
6891
|
initialState5.currentTrustLevel
|
|
6759
6892
|
);
|
|
6760
|
-
const [pendingTrustLevel, setPendingTrustLevel] = (0,
|
|
6761
|
-
const [isInheritedTrustFromParent] = (0,
|
|
6893
|
+
const [pendingTrustLevel, setPendingTrustLevel] = (0, import_react21.useState)();
|
|
6894
|
+
const [isInheritedTrustFromParent] = (0, import_react21.useState)(
|
|
6762
6895
|
initialState5.isInheritedTrustFromParent
|
|
6763
6896
|
);
|
|
6764
|
-
const [isInheritedTrustFromIde] = (0,
|
|
6897
|
+
const [isInheritedTrustFromIde] = (0, import_react21.useState)(
|
|
6765
6898
|
initialState5.isInheritedTrustFromIde
|
|
6766
6899
|
);
|
|
6767
|
-
const [needsRestart, setNeedsRestart] = (0,
|
|
6900
|
+
const [needsRestart, setNeedsRestart] = (0, import_react21.useState)(false);
|
|
6768
6901
|
const isFolderTrustEnabled = settings.merged.security.folderTrust.enabled ?? true;
|
|
6769
|
-
const updateTrustLevel = (0,
|
|
6902
|
+
const updateTrustLevel = (0, import_react21.useCallback)(
|
|
6770
6903
|
async (trustLevel) => {
|
|
6771
6904
|
if (!isCurrentWorkspace) {
|
|
6772
6905
|
const folders = loadTrustedFolders();
|
|
@@ -6816,7 +6949,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
|
|
|
6816
6949
|
},
|
|
6817
6950
|
[cwd5, settings.merged, onExit, addItem, isCurrentWorkspace]
|
|
6818
6951
|
);
|
|
6819
|
-
const commitTrustLevelChange = (0,
|
|
6952
|
+
const commitTrustLevelChange = (0, import_react21.useCallback)(async () => {
|
|
6820
6953
|
if (pendingTrustLevel) {
|
|
6821
6954
|
const folders = loadTrustedFolders();
|
|
6822
6955
|
try {
|
|
@@ -6847,7 +6980,7 @@ var usePermissionsModifyTrust = (onExit, addItem, targetDirectory) => {
|
|
|
6847
6980
|
};
|
|
6848
6981
|
|
|
6849
6982
|
// packages/cli/src/ui/components/PermissionsModifyTrustDialog.tsx
|
|
6850
|
-
var
|
|
6983
|
+
var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
|
|
6851
6984
|
function PermissionsModifyTrustDialog({
|
|
6852
6985
|
onExit,
|
|
6853
6986
|
addItem,
|
|
@@ -6907,8 +7040,8 @@ function PermissionsModifyTrustDialog({
|
|
|
6907
7040
|
(item) => item.value === currentTrustLevel
|
|
6908
7041
|
);
|
|
6909
7042
|
const initialIndex = index === -1 ? 0 : index;
|
|
6910
|
-
return /* @__PURE__ */ (0,
|
|
6911
|
-
/* @__PURE__ */ (0,
|
|
7043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
7044
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
6912
7045
|
Box_default,
|
|
6913
7046
|
{
|
|
6914
7047
|
borderStyle: "round",
|
|
@@ -6916,24 +7049,24 @@ function PermissionsModifyTrustDialog({
|
|
|
6916
7049
|
flexDirection: "column",
|
|
6917
7050
|
padding: 1,
|
|
6918
7051
|
children: [
|
|
6919
|
-
/* @__PURE__ */ (0,
|
|
6920
|
-
/* @__PURE__ */ (0,
|
|
7052
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Box_default, { flexDirection: "column", paddingBottom: 1, children: [
|
|
7053
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { bold: true, children: [
|
|
6921
7054
|
"> ",
|
|
6922
7055
|
"Modify Trust Level"
|
|
6923
7056
|
] }),
|
|
6924
|
-
/* @__PURE__ */ (0,
|
|
6925
|
-
/* @__PURE__ */ (0,
|
|
7057
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { marginTop: 1 }),
|
|
7058
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { children: [
|
|
6926
7059
|
"Folder: ",
|
|
6927
7060
|
cwd5
|
|
6928
7061
|
] }),
|
|
6929
|
-
/* @__PURE__ */ (0,
|
|
7062
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Text, { children: [
|
|
6930
7063
|
"Current Level: ",
|
|
6931
|
-
/* @__PURE__ */ (0,
|
|
7064
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { bold: true, children: currentTrustLevel || "Not Set" })
|
|
6932
7065
|
] }),
|
|
6933
|
-
isInheritedTrustFromParent && /* @__PURE__ */ (0,
|
|
6934
|
-
isInheritedTrustFromIde && /* @__PURE__ */ (0,
|
|
7066
|
+
isInheritedTrustFromParent && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.secondary, children: "Note: This folder behaves as a trusted folder because one of the parent folders is trusted. It will remain trusted even if you set a different trust level here. To change this, you need to modify the trust setting in the parent folder." }),
|
|
7067
|
+
isInheritedTrustFromIde && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.secondary, children: "Note: This folder behaves as a trusted folder because the connected IDE workspace is trusted. It will remain trusted even if you set a different trust level here." })
|
|
6935
7068
|
] }),
|
|
6936
|
-
/* @__PURE__ */ (0,
|
|
7069
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
6937
7070
|
RadioButtonSelect,
|
|
6938
7071
|
{
|
|
6939
7072
|
items: TRUST_LEVEL_ITEMS,
|
|
@@ -6942,22 +7075,22 @@ function PermissionsModifyTrustDialog({
|
|
|
6942
7075
|
initialIndex
|
|
6943
7076
|
}
|
|
6944
7077
|
),
|
|
6945
|
-
/* @__PURE__ */ (0,
|
|
7078
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.text.secondary, children: "(Use Enter to select, Esc to close)" }) })
|
|
6946
7079
|
]
|
|
6947
7080
|
}
|
|
6948
7081
|
),
|
|
6949
|
-
needsRestart && /* @__PURE__ */ (0,
|
|
7082
|
+
needsRestart && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Box_default, { marginLeft: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { color: theme.status.warning, children: "To apply the trust changes, Gemini CLI must be restarted. Press 'r' to restart CLI now." }) })
|
|
6950
7083
|
] });
|
|
6951
7084
|
}
|
|
6952
7085
|
|
|
6953
7086
|
// packages/cli/src/ui/components/NewAgentsNotification.tsx
|
|
6954
|
-
var
|
|
6955
|
-
var
|
|
7087
|
+
var import_react22 = __toESM(require_react(), 1);
|
|
7088
|
+
var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
|
|
6956
7089
|
var NewAgentsNotification = ({
|
|
6957
7090
|
agents,
|
|
6958
7091
|
onSelect
|
|
6959
7092
|
}) => {
|
|
6960
|
-
const [isProcessing, setIsProcessing] = (0,
|
|
7093
|
+
const [isProcessing, setIsProcessing] = (0, import_react22.useState)(false);
|
|
6961
7094
|
const options = [
|
|
6962
7095
|
{
|
|
6963
7096
|
label: "Acknowledge and Enable",
|
|
@@ -6981,7 +7114,7 @@ var NewAgentsNotification = ({
|
|
|
6981
7114
|
const MAX_DISPLAYED_AGENTS = 5;
|
|
6982
7115
|
const displayAgents = agents.slice(0, MAX_DISPLAYED_AGENTS);
|
|
6983
7116
|
const remaining = agents.length - MAX_DISPLAYED_AGENTS;
|
|
6984
|
-
return /* @__PURE__ */ (0,
|
|
7117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { flexDirection: "column", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
6985
7118
|
Box_default,
|
|
6986
7119
|
{
|
|
6987
7120
|
flexDirection: "column",
|
|
@@ -6991,10 +7124,10 @@ var NewAgentsNotification = ({
|
|
|
6991
7124
|
marginLeft: 1,
|
|
6992
7125
|
marginRight: 1,
|
|
6993
7126
|
children: [
|
|
6994
|
-
/* @__PURE__ */ (0,
|
|
6995
|
-
/* @__PURE__ */ (0,
|
|
6996
|
-
/* @__PURE__ */ (0,
|
|
6997
|
-
/* @__PURE__ */ (0,
|
|
7127
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
7128
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { bold: true, color: theme.text.primary, children: "New Agents Discovered" }),
|
|
7129
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: theme.text.primary, children: "The following agents were found in this project. Please review them:" }),
|
|
7130
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
6998
7131
|
Box_default,
|
|
6999
7132
|
{
|
|
7000
7133
|
flexDirection: "column",
|
|
@@ -7005,20 +7138,20 @@ var NewAgentsNotification = ({
|
|
|
7005
7138
|
displayAgents.map((agent) => {
|
|
7006
7139
|
const mcpServers = agent.kind === "local" ? agent.mcpServers : void 0;
|
|
7007
7140
|
const hasMcpServers = mcpServers && Object.keys(mcpServers).length > 0;
|
|
7008
|
-
return /* @__PURE__ */ (0,
|
|
7009
|
-
/* @__PURE__ */ (0,
|
|
7010
|
-
/* @__PURE__ */ (0,
|
|
7141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
7142
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Box_default, { children: [
|
|
7143
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { bold: true, color: theme.text.primary, children: [
|
|
7011
7144
|
"- ",
|
|
7012
7145
|
agent.name,
|
|
7013
7146
|
":",
|
|
7014
7147
|
" "
|
|
7015
7148
|
] }) }),
|
|
7016
|
-
/* @__PURE__ */ (0,
|
|
7149
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
7017
7150
|
" ",
|
|
7018
7151
|
agent.description
|
|
7019
7152
|
] })
|
|
7020
7153
|
] }),
|
|
7021
|
-
hasMcpServers && /* @__PURE__ */ (0,
|
|
7154
|
+
hasMcpServers && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
7022
7155
|
"(Includes MCP servers:",
|
|
7023
7156
|
" ",
|
|
7024
7157
|
Object.keys(mcpServers).join(", "),
|
|
@@ -7026,7 +7159,7 @@ var NewAgentsNotification = ({
|
|
|
7026
7159
|
] }) })
|
|
7027
7160
|
] }, agent.name);
|
|
7028
7161
|
}),
|
|
7029
|
-
remaining > 0 && /* @__PURE__ */ (0,
|
|
7162
|
+
remaining > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
7030
7163
|
"... and ",
|
|
7031
7164
|
remaining,
|
|
7032
7165
|
" more."
|
|
@@ -7035,10 +7168,10 @@ var NewAgentsNotification = ({
|
|
|
7035
7168
|
}
|
|
7036
7169
|
)
|
|
7037
7170
|
] }),
|
|
7038
|
-
isProcessing ? /* @__PURE__ */ (0,
|
|
7039
|
-
/* @__PURE__ */ (0,
|
|
7040
|
-
/* @__PURE__ */ (0,
|
|
7041
|
-
] }) : /* @__PURE__ */ (0,
|
|
7171
|
+
isProcessing ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Box_default, { children: [
|
|
7172
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CliSpinner, {}),
|
|
7173
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { color: theme.text.primary, children: " Processing..." })
|
|
7174
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
7042
7175
|
RadioButtonSelect,
|
|
7043
7176
|
{
|
|
7044
7177
|
items: options,
|
|
@@ -7052,9 +7185,9 @@ var NewAgentsNotification = ({
|
|
|
7052
7185
|
};
|
|
7053
7186
|
|
|
7054
7187
|
// packages/cli/src/ui/contexts/UIActionsContext.tsx
|
|
7055
|
-
var UIActionsContext = (0,
|
|
7188
|
+
var UIActionsContext = (0, import_react23.createContext)(null);
|
|
7056
7189
|
var useUIActions = () => {
|
|
7057
|
-
const context = (0,
|
|
7190
|
+
const context = (0, import_react23.useContext)(UIActionsContext);
|
|
7058
7191
|
if (!context) {
|
|
7059
7192
|
throw new Error("useUIActions must be used within a UIActionsProvider");
|
|
7060
7193
|
}
|
|
@@ -7062,8 +7195,9 @@ var useUIActions = () => {
|
|
|
7062
7195
|
};
|
|
7063
7196
|
|
|
7064
7197
|
// packages/cli/src/ui/components/messages/ShellToolMessage.tsx
|
|
7065
|
-
var
|
|
7198
|
+
var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
|
|
7066
7199
|
var ShellToolMessage = ({
|
|
7200
|
+
callId,
|
|
7067
7201
|
name,
|
|
7068
7202
|
description,
|
|
7069
7203
|
resultDisplay,
|
|
@@ -7080,6 +7214,8 @@ var ShellToolMessage = ({
|
|
|
7080
7214
|
isExpandable,
|
|
7081
7215
|
originalRequestName
|
|
7082
7216
|
}) => {
|
|
7217
|
+
const { isExpanded: isExpandedInContext } = useToolActions();
|
|
7218
|
+
const isExpanded = (isExpandedInContext ? isExpandedInContext(callId) : false) || availableTerminalHeight === void 0;
|
|
7083
7219
|
const {
|
|
7084
7220
|
activePtyId: activeShellPtyId,
|
|
7085
7221
|
embeddedShellFocused,
|
|
@@ -7106,7 +7242,7 @@ var ShellToolMessage = ({
|
|
|
7106
7242
|
isAlternateBuffer,
|
|
7107
7243
|
maxLinesLimit: maxLines
|
|
7108
7244
|
});
|
|
7109
|
-
|
|
7245
|
+
import_react24.default.useEffect(() => {
|
|
7110
7246
|
const isExecuting = status === CoreToolCallStatus.Executing;
|
|
7111
7247
|
if (isExecuting && ptyId) {
|
|
7112
7248
|
try {
|
|
@@ -7125,8 +7261,8 @@ var ShellToolMessage = ({
|
|
|
7125
7261
|
}
|
|
7126
7262
|
}, [ptyId, status, terminalWidth, availableHeight]);
|
|
7127
7263
|
const { setEmbeddedShellFocused } = useUIActions();
|
|
7128
|
-
const wasFocusedRef =
|
|
7129
|
-
|
|
7264
|
+
const wasFocusedRef = import_react24.default.useRef(false);
|
|
7265
|
+
import_react24.default.useEffect(() => {
|
|
7130
7266
|
if (isThisShellFocused2) {
|
|
7131
7267
|
wasFocusedRef.current = true;
|
|
7132
7268
|
} else if (wasFocusedRef.current) {
|
|
@@ -7136,8 +7272,8 @@ var ShellToolMessage = ({
|
|
|
7136
7272
|
wasFocusedRef.current = false;
|
|
7137
7273
|
}
|
|
7138
7274
|
}, [isThisShellFocused2, embeddedShellFocused, setEmbeddedShellFocused]);
|
|
7139
|
-
const headerRef =
|
|
7140
|
-
const contentRef =
|
|
7275
|
+
const headerRef = import_react24.default.useRef(null);
|
|
7276
|
+
const contentRef = import_react24.default.useRef(null);
|
|
7141
7277
|
const isThisShellFocusable2 = isThisShellFocusable(name, status, config);
|
|
7142
7278
|
const handleFocus = () => {
|
|
7143
7279
|
if (isThisShellFocusable2) {
|
|
@@ -7151,8 +7287,8 @@ var ShellToolMessage = ({
|
|
|
7151
7287
|
isThisShellFocused2,
|
|
7152
7288
|
resultDisplay
|
|
7153
7289
|
);
|
|
7154
|
-
return /* @__PURE__ */ (0,
|
|
7155
|
-
/* @__PURE__ */ (0,
|
|
7290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
7291
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
7156
7292
|
StickyHeader,
|
|
7157
7293
|
{
|
|
7158
7294
|
width: terminalWidth,
|
|
@@ -7161,7 +7297,7 @@ var ShellToolMessage = ({
|
|
|
7161
7297
|
borderDimColor,
|
|
7162
7298
|
containerRef: headerRef,
|
|
7163
7299
|
children: [
|
|
7164
|
-
/* @__PURE__ */ (0,
|
|
7300
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
7165
7301
|
ToolStatusIndicator,
|
|
7166
7302
|
{
|
|
7167
7303
|
status,
|
|
@@ -7169,28 +7305,29 @@ var ShellToolMessage = ({
|
|
|
7169
7305
|
isFocused: isThisShellFocused2
|
|
7170
7306
|
}
|
|
7171
7307
|
),
|
|
7172
|
-
/* @__PURE__ */ (0,
|
|
7308
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
7173
7309
|
ToolInfo,
|
|
7174
7310
|
{
|
|
7175
7311
|
name,
|
|
7176
7312
|
status,
|
|
7177
7313
|
description,
|
|
7178
7314
|
emphasis,
|
|
7179
|
-
originalRequestName
|
|
7315
|
+
originalRequestName,
|
|
7316
|
+
isExpanded
|
|
7180
7317
|
}
|
|
7181
7318
|
),
|
|
7182
|
-
/* @__PURE__ */ (0,
|
|
7319
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
7183
7320
|
FocusHint,
|
|
7184
7321
|
{
|
|
7185
7322
|
shouldShowFocusHint,
|
|
7186
7323
|
isThisShellFocused: isThisShellFocused2
|
|
7187
7324
|
}
|
|
7188
7325
|
),
|
|
7189
|
-
emphasis === "high" && /* @__PURE__ */ (0,
|
|
7326
|
+
emphasis === "high" && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TrailingIndicator, {})
|
|
7190
7327
|
]
|
|
7191
7328
|
}
|
|
7192
7329
|
),
|
|
7193
|
-
/* @__PURE__ */ (0,
|
|
7330
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
7194
7331
|
Box_default,
|
|
7195
7332
|
{
|
|
7196
7333
|
ref: contentRef,
|
|
@@ -7205,7 +7342,7 @@ var ShellToolMessage = ({
|
|
|
7205
7342
|
paddingX: 1,
|
|
7206
7343
|
flexDirection: "column",
|
|
7207
7344
|
children: [
|
|
7208
|
-
/* @__PURE__ */ (0,
|
|
7345
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
7209
7346
|
ToolResultDisplay,
|
|
7210
7347
|
{
|
|
7211
7348
|
resultDisplay,
|
|
@@ -7216,7 +7353,7 @@ var ShellToolMessage = ({
|
|
|
7216
7353
|
maxLines
|
|
7217
7354
|
}
|
|
7218
7355
|
),
|
|
7219
|
-
isThisShellFocused2 && config && /* @__PURE__ */ (0,
|
|
7356
|
+
isThisShellFocused2 && config && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
7220
7357
|
ShellInputPrompt,
|
|
7221
7358
|
{
|
|
7222
7359
|
activeShellPtyId: activeShellPtyId ?? null,
|
|
@@ -7232,114 +7369,6 @@ var ShellToolMessage = ({
|
|
|
7232
7369
|
|
|
7233
7370
|
// packages/cli/src/ui/components/messages/TopicMessage.tsx
|
|
7234
7371
|
var import_react25 = __toESM(require_react(), 1);
|
|
7235
|
-
|
|
7236
|
-
// packages/cli/src/ui/contexts/ToolActionsContext.tsx
|
|
7237
|
-
var import_react24 = __toESM(require_react(), 1);
|
|
7238
|
-
var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
|
|
7239
|
-
function hasLegacyCallback(details) {
|
|
7240
|
-
return !!details && "onConfirm" in details && typeof details.onConfirm === "function";
|
|
7241
|
-
}
|
|
7242
|
-
var ToolActionsContext = (0, import_react24.createContext)(null);
|
|
7243
|
-
var useToolActions = () => {
|
|
7244
|
-
const context = (0, import_react24.useContext)(ToolActionsContext);
|
|
7245
|
-
if (!context) {
|
|
7246
|
-
throw new Error("useToolActions must be used within a ToolActionsProvider");
|
|
7247
|
-
}
|
|
7248
|
-
return context;
|
|
7249
|
-
};
|
|
7250
|
-
var ToolActionsProvider = (props) => {
|
|
7251
|
-
const {
|
|
7252
|
-
children,
|
|
7253
|
-
config,
|
|
7254
|
-
toolCalls,
|
|
7255
|
-
isExpanded,
|
|
7256
|
-
toggleExpansion,
|
|
7257
|
-
toggleAllExpansion
|
|
7258
|
-
} = props;
|
|
7259
|
-
const [ideClient, setIdeClient] = (0, import_react24.useState)(null);
|
|
7260
|
-
const [isDiffingEnabled, setIsDiffingEnabled] = (0, import_react24.useState)(false);
|
|
7261
|
-
(0, import_react24.useEffect)(() => {
|
|
7262
|
-
let isMounted = true;
|
|
7263
|
-
let activeClient = null;
|
|
7264
|
-
const handleStatusChange = () => {
|
|
7265
|
-
if (isMounted && activeClient) {
|
|
7266
|
-
setIsDiffingEnabled(activeClient.isDiffingEnabled());
|
|
7267
|
-
}
|
|
7268
|
-
};
|
|
7269
|
-
if (config.getIdeMode()) {
|
|
7270
|
-
IdeClient.getInstance().then((client) => {
|
|
7271
|
-
if (!isMounted) return;
|
|
7272
|
-
activeClient = client;
|
|
7273
|
-
setIdeClient(client);
|
|
7274
|
-
setIsDiffingEnabled(client.isDiffingEnabled());
|
|
7275
|
-
client.addStatusChangeListener(handleStatusChange);
|
|
7276
|
-
}).catch((error) => {
|
|
7277
|
-
debugLogger.error("Failed to get IdeClient instance:", error);
|
|
7278
|
-
});
|
|
7279
|
-
}
|
|
7280
|
-
return () => {
|
|
7281
|
-
isMounted = false;
|
|
7282
|
-
if (activeClient) {
|
|
7283
|
-
activeClient.removeStatusChangeListener(handleStatusChange);
|
|
7284
|
-
}
|
|
7285
|
-
};
|
|
7286
|
-
}, [config]);
|
|
7287
|
-
const confirm = (0, import_react24.useCallback)(
|
|
7288
|
-
async (callId, outcome, payload) => {
|
|
7289
|
-
const tool = toolCalls.find((t) => t.callId === callId);
|
|
7290
|
-
if (!tool) {
|
|
7291
|
-
debugLogger.warn(`ToolActions: Tool ${callId} not found`);
|
|
7292
|
-
return;
|
|
7293
|
-
}
|
|
7294
|
-
const details = tool.confirmationDetails;
|
|
7295
|
-
if (details?.type === "edit" && isDiffingEnabled && "filePath" in details) {
|
|
7296
|
-
const cliOutcome = outcome === ToolConfirmationOutcome.Cancel ? "rejected" : "accepted";
|
|
7297
|
-
await ideClient?.resolveDiffFromCli(details.filePath, cliOutcome);
|
|
7298
|
-
}
|
|
7299
|
-
if (tool.correlationId) {
|
|
7300
|
-
await config.getMessageBus().publish({
|
|
7301
|
-
type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
|
|
7302
|
-
correlationId: tool.correlationId,
|
|
7303
|
-
confirmed: outcome !== ToolConfirmationOutcome.Cancel,
|
|
7304
|
-
requiresUserConfirmation: false,
|
|
7305
|
-
outcome,
|
|
7306
|
-
payload
|
|
7307
|
-
});
|
|
7308
|
-
return;
|
|
7309
|
-
}
|
|
7310
|
-
if (hasLegacyCallback(details)) {
|
|
7311
|
-
await details.onConfirm(outcome, payload);
|
|
7312
|
-
return;
|
|
7313
|
-
}
|
|
7314
|
-
debugLogger.warn(
|
|
7315
|
-
`ToolActions: No correlationId or callback for ${callId}`
|
|
7316
|
-
);
|
|
7317
|
-
},
|
|
7318
|
-
[config, ideClient, toolCalls, isDiffingEnabled]
|
|
7319
|
-
);
|
|
7320
|
-
const cancel = (0, import_react24.useCallback)(
|
|
7321
|
-
async (callId) => {
|
|
7322
|
-
await confirm(callId, ToolConfirmationOutcome.Cancel);
|
|
7323
|
-
},
|
|
7324
|
-
[confirm]
|
|
7325
|
-
);
|
|
7326
|
-
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
7327
|
-
ToolActionsContext.Provider,
|
|
7328
|
-
{
|
|
7329
|
-
value: {
|
|
7330
|
-
confirm,
|
|
7331
|
-
cancel,
|
|
7332
|
-
isDiffingEnabled,
|
|
7333
|
-
isExpanded,
|
|
7334
|
-
toggleExpansion,
|
|
7335
|
-
toggleAllExpansion
|
|
7336
|
-
},
|
|
7337
|
-
children
|
|
7338
|
-
}
|
|
7339
|
-
);
|
|
7340
|
-
};
|
|
7341
|
-
|
|
7342
|
-
// packages/cli/src/ui/components/messages/TopicMessage.tsx
|
|
7343
7372
|
var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
|
|
7344
7373
|
var isTopicTool = (name) => name === UPDATE_TOPIC_TOOL_NAME || name === UPDATE_TOPIC_DISPLAY_NAME;
|
|
7345
7374
|
var TopicMessage = ({
|
|
@@ -15145,7 +15174,8 @@ function AuthDialog({
|
|
|
15145
15174
|
return;
|
|
15146
15175
|
}
|
|
15147
15176
|
if (authType) {
|
|
15148
|
-
|
|
15177
|
+
const needsRestart = authType === AuthType.LOGIN_WITH_GOOGLE || authType === AuthType.USE_VERTEX_AI && process.env["CLOUD_SHELL"] === "true";
|
|
15178
|
+
if (needsRestart) {
|
|
15149
15179
|
setAuthContext({ requiresRestart: true });
|
|
15150
15180
|
} else {
|
|
15151
15181
|
setAuthContext({});
|
|
@@ -17974,8 +18004,55 @@ var PolicyUpdateDialog = ({
|
|
|
17974
18004
|
) });
|
|
17975
18005
|
};
|
|
17976
18006
|
|
|
17977
|
-
// packages/cli/src/ui/
|
|
18007
|
+
// packages/cli/src/ui/auth/LoginRestartDialog.tsx
|
|
17978
18008
|
var import_jsx_runtime105 = __toESM(require_jsx_runtime(), 1);
|
|
18009
|
+
var LoginRestartDialog = ({
|
|
18010
|
+
onDismiss,
|
|
18011
|
+
config,
|
|
18012
|
+
message
|
|
18013
|
+
}) => {
|
|
18014
|
+
useKeypress(
|
|
18015
|
+
(key) => {
|
|
18016
|
+
if (key.name === "escape") {
|
|
18017
|
+
onDismiss();
|
|
18018
|
+
return true;
|
|
18019
|
+
} else if (key.name === "r" || key.name === "R") {
|
|
18020
|
+
setTimeout(async () => {
|
|
18021
|
+
if (process.send) {
|
|
18022
|
+
const remoteSettings = config.getRemoteAdminSettings();
|
|
18023
|
+
if (remoteSettings) {
|
|
18024
|
+
process.send({
|
|
18025
|
+
type: "admin-settings-update",
|
|
18026
|
+
settings: remoteSettings
|
|
18027
|
+
});
|
|
18028
|
+
}
|
|
18029
|
+
}
|
|
18030
|
+
await relaunchApp();
|
|
18031
|
+
}, 100);
|
|
18032
|
+
return true;
|
|
18033
|
+
}
|
|
18034
|
+
return false;
|
|
18035
|
+
},
|
|
18036
|
+
{ isActive: true }
|
|
18037
|
+
);
|
|
18038
|
+
const displayMessage = message ?? "You've successfully signed in with Google. Gemini CLI needs to be restarted.";
|
|
18039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
18040
|
+
Box_default,
|
|
18041
|
+
{
|
|
18042
|
+
borderStyle: "round",
|
|
18043
|
+
borderColor: theme.status.warning,
|
|
18044
|
+
paddingX: 1,
|
|
18045
|
+
flexDirection: "column",
|
|
18046
|
+
children: [
|
|
18047
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Text, { color: theme.status.warning, children: displayMessage }),
|
|
18048
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Text, { color: theme.status.warning, children: "Press R to restart, or Esc to choose a different authentication method." })
|
|
18049
|
+
]
|
|
18050
|
+
}
|
|
18051
|
+
);
|
|
18052
|
+
};
|
|
18053
|
+
|
|
18054
|
+
// packages/cli/src/ui/components/DialogManager.tsx
|
|
18055
|
+
var import_jsx_runtime106 = __toESM(require_jsx_runtime(), 1);
|
|
17979
18056
|
var DialogManager = ({
|
|
17980
18057
|
addItem,
|
|
17981
18058
|
terminalWidth
|
|
@@ -17992,13 +18069,13 @@ var DialogManager = ({
|
|
|
17992
18069
|
terminalWidth: uiTerminalWidth
|
|
17993
18070
|
} = uiState;
|
|
17994
18071
|
if (uiState.adminSettingsChanged) {
|
|
17995
|
-
return /* @__PURE__ */ (0,
|
|
18072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(AdminSettingsChangedDialog, {});
|
|
17996
18073
|
}
|
|
17997
18074
|
if (uiState.showIdeRestartPrompt) {
|
|
17998
|
-
return /* @__PURE__ */ (0,
|
|
18075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(IdeTrustChangeDialog, { reason: uiState.ideTrustRestartReason });
|
|
17999
18076
|
}
|
|
18000
18077
|
if (uiState.newAgents) {
|
|
18001
|
-
return /* @__PURE__ */ (0,
|
|
18078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18002
18079
|
NewAgentsNotification,
|
|
18003
18080
|
{
|
|
18004
18081
|
agents: uiState.newAgents,
|
|
@@ -18007,7 +18084,7 @@ var DialogManager = ({
|
|
|
18007
18084
|
);
|
|
18008
18085
|
}
|
|
18009
18086
|
if (quotaState.proQuotaRequest) {
|
|
18010
|
-
return /* @__PURE__ */ (0,
|
|
18087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18011
18088
|
ProQuotaDialog,
|
|
18012
18089
|
{
|
|
18013
18090
|
failedModel: quotaState.proQuotaRequest.failedModel,
|
|
@@ -18022,7 +18099,7 @@ var DialogManager = ({
|
|
|
18022
18099
|
);
|
|
18023
18100
|
}
|
|
18024
18101
|
if (quotaState.validationRequest) {
|
|
18025
|
-
return /* @__PURE__ */ (0,
|
|
18102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18026
18103
|
ValidationDialog,
|
|
18027
18104
|
{
|
|
18028
18105
|
validationLink: quotaState.validationRequest.validationLink,
|
|
@@ -18033,7 +18110,7 @@ var DialogManager = ({
|
|
|
18033
18110
|
);
|
|
18034
18111
|
}
|
|
18035
18112
|
if (quotaState.overageMenuRequest) {
|
|
18036
|
-
return /* @__PURE__ */ (0,
|
|
18113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18037
18114
|
OverageMenuDialog,
|
|
18038
18115
|
{
|
|
18039
18116
|
failedModel: quotaState.overageMenuRequest.failedModel,
|
|
@@ -18045,7 +18122,7 @@ var DialogManager = ({
|
|
|
18045
18122
|
);
|
|
18046
18123
|
}
|
|
18047
18124
|
if (quotaState.emptyWalletRequest) {
|
|
18048
|
-
return /* @__PURE__ */ (0,
|
|
18125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18049
18126
|
EmptyWalletDialog,
|
|
18050
18127
|
{
|
|
18051
18128
|
failedModel: quotaState.emptyWalletRequest.failedModel,
|
|
@@ -18057,7 +18134,7 @@ var DialogManager = ({
|
|
|
18057
18134
|
);
|
|
18058
18135
|
}
|
|
18059
18136
|
if (uiState.shouldShowIdePrompt) {
|
|
18060
|
-
return /* @__PURE__ */ (0,
|
|
18137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18061
18138
|
IdeIntegrationNudge,
|
|
18062
18139
|
{
|
|
18063
18140
|
ide: uiState.currentIDE,
|
|
@@ -18066,7 +18143,7 @@ var DialogManager = ({
|
|
|
18066
18143
|
);
|
|
18067
18144
|
}
|
|
18068
18145
|
if (uiState.isFolderTrustDialogOpen) {
|
|
18069
|
-
return /* @__PURE__ */ (0,
|
|
18146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18070
18147
|
FolderTrustDialog,
|
|
18071
18148
|
{
|
|
18072
18149
|
onSelect: uiActions.handleFolderTrustSelect,
|
|
@@ -18076,7 +18153,7 @@ var DialogManager = ({
|
|
|
18076
18153
|
);
|
|
18077
18154
|
}
|
|
18078
18155
|
if (uiState.isPolicyUpdateDialogOpen) {
|
|
18079
|
-
return /* @__PURE__ */ (0,
|
|
18156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18080
18157
|
PolicyUpdateDialog,
|
|
18081
18158
|
{
|
|
18082
18159
|
config,
|
|
@@ -18086,7 +18163,7 @@ var DialogManager = ({
|
|
|
18086
18163
|
);
|
|
18087
18164
|
}
|
|
18088
18165
|
if (uiState.loopDetectionConfirmationRequest) {
|
|
18089
|
-
return /* @__PURE__ */ (0,
|
|
18166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18090
18167
|
LoopDetectionConfirmation,
|
|
18091
18168
|
{
|
|
18092
18169
|
onComplete: uiState.loopDetectionConfirmationRequest.onComplete
|
|
@@ -18096,7 +18173,7 @@ var DialogManager = ({
|
|
|
18096
18173
|
if (uiState.permissionConfirmationRequest) {
|
|
18097
18174
|
const files = uiState.permissionConfirmationRequest.files;
|
|
18098
18175
|
const filesList = files.map((f) => `- ${f}`).join("\n");
|
|
18099
|
-
return /* @__PURE__ */ (0,
|
|
18176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18100
18177
|
ConsentPrompt,
|
|
18101
18178
|
{
|
|
18102
18179
|
prompt: `The following files are outside your workspace:
|
|
@@ -18112,7 +18189,7 @@ Do you want to allow this read?`,
|
|
|
18112
18189
|
);
|
|
18113
18190
|
}
|
|
18114
18191
|
if (uiState.commandConfirmationRequest) {
|
|
18115
|
-
return /* @__PURE__ */ (0,
|
|
18192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18116
18193
|
ConsentPrompt,
|
|
18117
18194
|
{
|
|
18118
18195
|
prompt: uiState.commandConfirmationRequest.prompt,
|
|
@@ -18122,7 +18199,7 @@ Do you want to allow this read?`,
|
|
|
18122
18199
|
);
|
|
18123
18200
|
}
|
|
18124
18201
|
if (uiState.authConsentRequest) {
|
|
18125
|
-
return /* @__PURE__ */ (0,
|
|
18202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18126
18203
|
ConsentPrompt,
|
|
18127
18204
|
{
|
|
18128
18205
|
prompt: uiState.authConsentRequest.prompt,
|
|
@@ -18133,7 +18210,7 @@ Do you want to allow this read?`,
|
|
|
18133
18210
|
}
|
|
18134
18211
|
if (uiState.confirmUpdateExtensionRequests.length > 0) {
|
|
18135
18212
|
const request = uiState.confirmUpdateExtensionRequests[0];
|
|
18136
|
-
return /* @__PURE__ */ (0,
|
|
18213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18137
18214
|
ConsentPrompt,
|
|
18138
18215
|
{
|
|
18139
18216
|
prompt: request.prompt,
|
|
@@ -18143,9 +18220,9 @@ Do you want to allow this read?`,
|
|
|
18143
18220
|
);
|
|
18144
18221
|
}
|
|
18145
18222
|
if (uiState.isThemeDialogOpen) {
|
|
18146
|
-
return /* @__PURE__ */ (0,
|
|
18147
|
-
uiState.themeError && /* @__PURE__ */ (0,
|
|
18148
|
-
/* @__PURE__ */ (0,
|
|
18223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18224
|
+
uiState.themeError && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text, { color: theme.status.error, children: uiState.themeError }) }),
|
|
18225
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18149
18226
|
ThemeDialog,
|
|
18150
18227
|
{
|
|
18151
18228
|
onSelect: uiActions.handleThemeSelect,
|
|
@@ -18159,7 +18236,7 @@ Do you want to allow this read?`,
|
|
|
18159
18236
|
] });
|
|
18160
18237
|
}
|
|
18161
18238
|
if (uiState.isSettingsDialogOpen) {
|
|
18162
|
-
return /* @__PURE__ */ (0,
|
|
18239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18163
18240
|
SettingsDialog,
|
|
18164
18241
|
{
|
|
18165
18242
|
onSelect: () => uiActions.closeSettingsDialog(),
|
|
@@ -18169,13 +18246,13 @@ Do you want to allow this read?`,
|
|
|
18169
18246
|
) });
|
|
18170
18247
|
}
|
|
18171
18248
|
if (uiState.isModelDialogOpen) {
|
|
18172
|
-
return /* @__PURE__ */ (0,
|
|
18249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ModelDialog, { onClose: uiActions.closeModelDialog });
|
|
18173
18250
|
}
|
|
18174
18251
|
if (uiState.isVoiceModelDialogOpen) {
|
|
18175
|
-
return /* @__PURE__ */ (0,
|
|
18252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(VoiceModelDialog, { onClose: uiActions.closeVoiceModelDialog });
|
|
18176
18253
|
}
|
|
18177
18254
|
if (uiState.isAgentConfigDialogOpen && uiState.selectedAgentName && uiState.selectedAgentDisplayName && uiState.selectedAgentDefinition) {
|
|
18178
|
-
return /* @__PURE__ */ (0,
|
|
18255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18179
18256
|
AgentConfigDialog,
|
|
18180
18257
|
{
|
|
18181
18258
|
agentName: uiState.selectedAgentName,
|
|
@@ -18194,7 +18271,7 @@ Do you want to allow this read?`,
|
|
|
18194
18271
|
) });
|
|
18195
18272
|
}
|
|
18196
18273
|
if (uiState.accountSuspensionInfo) {
|
|
18197
|
-
return /* @__PURE__ */ (0,
|
|
18274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18198
18275
|
BannedAccountDialog,
|
|
18199
18276
|
{
|
|
18200
18277
|
accountSuspensionInfo: uiState.accountSuspensionInfo,
|
|
@@ -18208,7 +18285,7 @@ Do you want to allow this read?`,
|
|
|
18208
18285
|
) });
|
|
18209
18286
|
}
|
|
18210
18287
|
if (uiState.isAuthenticating) {
|
|
18211
|
-
return /* @__PURE__ */ (0,
|
|
18288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18212
18289
|
AuthInProgress,
|
|
18213
18290
|
{
|
|
18214
18291
|
onTimeout: () => {
|
|
@@ -18218,7 +18295,7 @@ Do you want to allow this read?`,
|
|
|
18218
18295
|
);
|
|
18219
18296
|
}
|
|
18220
18297
|
if (uiState.isAwaitingApiKeyInput) {
|
|
18221
|
-
return /* @__PURE__ */ (0,
|
|
18298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18222
18299
|
ApiAuthDialog,
|
|
18223
18300
|
{
|
|
18224
18301
|
onSubmit: uiActions.handleApiKeySubmit,
|
|
@@ -18229,8 +18306,18 @@ Do you want to allow this read?`,
|
|
|
18229
18306
|
uiState.apiKeyDefaultValue
|
|
18230
18307
|
) });
|
|
18231
18308
|
}
|
|
18309
|
+
if (uiState.isAwaitingLoginRestart) {
|
|
18310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18311
|
+
LoginRestartDialog,
|
|
18312
|
+
{
|
|
18313
|
+
onDismiss: uiActions.dismissLoginRestart,
|
|
18314
|
+
config,
|
|
18315
|
+
message: uiState.loginRestartMessage
|
|
18316
|
+
}
|
|
18317
|
+
) });
|
|
18318
|
+
}
|
|
18232
18319
|
if (uiState.isAuthDialogOpen) {
|
|
18233
|
-
return /* @__PURE__ */ (0,
|
|
18320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18234
18321
|
AuthDialog,
|
|
18235
18322
|
{
|
|
18236
18323
|
config,
|
|
@@ -18243,9 +18330,9 @@ Do you want to allow this read?`,
|
|
|
18243
18330
|
) });
|
|
18244
18331
|
}
|
|
18245
18332
|
if (uiState.isEditorDialogOpen) {
|
|
18246
|
-
return /* @__PURE__ */ (0,
|
|
18247
|
-
uiState.editorError && /* @__PURE__ */ (0,
|
|
18248
|
-
/* @__PURE__ */ (0,
|
|
18333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
18334
|
+
uiState.editorError && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text, { color: theme.status.error, children: uiState.editorError }) }),
|
|
18335
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18249
18336
|
EditorSettingsDialog,
|
|
18250
18337
|
{
|
|
18251
18338
|
onSelect: uiActions.handleEditorSelect,
|
|
@@ -18256,7 +18343,7 @@ Do you want to allow this read?`,
|
|
|
18256
18343
|
] });
|
|
18257
18344
|
}
|
|
18258
18345
|
if (uiState.showPrivacyNotice) {
|
|
18259
|
-
return /* @__PURE__ */ (0,
|
|
18346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18260
18347
|
PrivacyNotice,
|
|
18261
18348
|
{
|
|
18262
18349
|
onExit: () => uiActions.exitPrivacyNotice(),
|
|
@@ -18265,7 +18352,7 @@ Do you want to allow this read?`,
|
|
|
18265
18352
|
);
|
|
18266
18353
|
}
|
|
18267
18354
|
if (uiState.isSessionBrowserOpen) {
|
|
18268
|
-
return /* @__PURE__ */ (0,
|
|
18355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18269
18356
|
SessionBrowser,
|
|
18270
18357
|
{
|
|
18271
18358
|
config,
|
|
@@ -18276,7 +18363,7 @@ Do you want to allow this read?`,
|
|
|
18276
18363
|
);
|
|
18277
18364
|
}
|
|
18278
18365
|
if (uiState.isPermissionsDialogOpen) {
|
|
18279
|
-
return /* @__PURE__ */ (0,
|
|
18366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18280
18367
|
PermissionsModifyTrustDialog,
|
|
18281
18368
|
{
|
|
18282
18369
|
onExit: uiActions.closePermissionsDialog,
|
|
@@ -18292,7 +18379,7 @@ Do you want to allow this read?`,
|
|
|
18292
18379
|
var import_react89 = __toESM(require_react(), 1);
|
|
18293
18380
|
|
|
18294
18381
|
// packages/cli/src/ui/components/ToastDisplay.tsx
|
|
18295
|
-
var
|
|
18382
|
+
var import_jsx_runtime107 = __toESM(require_jsx_runtime(), 1);
|
|
18296
18383
|
function shouldShowToast(uiState, inputState) {
|
|
18297
18384
|
return uiState.ctrlCPressedOnce || Boolean(uiState.transientMessage) || uiState.ctrlDPressedOnce || inputState.showEscapePrompt && (inputState.buffer.text.length > 0 || uiState.history.length > 0) || Boolean(uiState.queueErrorMessage) || uiState.showIsExpandableHint;
|
|
18298
18385
|
}
|
|
@@ -18300,13 +18387,13 @@ var ToastDisplay = () => {
|
|
|
18300
18387
|
const uiState = useUIState();
|
|
18301
18388
|
const inputState = useInputState();
|
|
18302
18389
|
if (uiState.ctrlCPressedOnce) {
|
|
18303
|
-
return /* @__PURE__ */ (0,
|
|
18390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text, { color: theme.status.warning, children: "Press Ctrl+C again to exit." });
|
|
18304
18391
|
}
|
|
18305
18392
|
if (uiState.transientMessage?.type === "warning" /* Warning */ && uiState.transientMessage.text) {
|
|
18306
|
-
return /* @__PURE__ */ (0,
|
|
18393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text, { color: theme.status.warning, children: uiState.transientMessage.text });
|
|
18307
18394
|
}
|
|
18308
18395
|
if (uiState.ctrlDPressedOnce) {
|
|
18309
|
-
return /* @__PURE__ */ (0,
|
|
18396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text, { color: theme.status.warning, children: "Press Ctrl+D again to exit." });
|
|
18310
18397
|
}
|
|
18311
18398
|
if (inputState.showEscapePrompt) {
|
|
18312
18399
|
const isPromptEmpty = inputState.buffer.text.length === 0;
|
|
@@ -18314,21 +18401,21 @@ var ToastDisplay = () => {
|
|
|
18314
18401
|
if (isPromptEmpty && !hasHistory) {
|
|
18315
18402
|
return null;
|
|
18316
18403
|
}
|
|
18317
|
-
return /* @__PURE__ */ (0,
|
|
18404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18318
18405
|
"Press Esc again to ",
|
|
18319
18406
|
isPromptEmpty ? "rewind" : "clear prompt",
|
|
18320
18407
|
"."
|
|
18321
18408
|
] });
|
|
18322
18409
|
}
|
|
18323
18410
|
if (uiState.transientMessage?.type === "hint" /* Hint */ && uiState.transientMessage.text) {
|
|
18324
|
-
return /* @__PURE__ */ (0,
|
|
18411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text, { color: theme.text.secondary, children: uiState.transientMessage.text });
|
|
18325
18412
|
}
|
|
18326
18413
|
if (uiState.queueErrorMessage) {
|
|
18327
|
-
return /* @__PURE__ */ (0,
|
|
18414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text, { color: theme.status.error, children: uiState.queueErrorMessage });
|
|
18328
18415
|
}
|
|
18329
18416
|
if (uiState.showIsExpandableHint) {
|
|
18330
18417
|
const action = uiState.constrainHeight ? "show more" : "collapse";
|
|
18331
|
-
return /* @__PURE__ */ (0,
|
|
18418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18332
18419
|
"Press Ctrl+O to ",
|
|
18333
18420
|
action,
|
|
18334
18421
|
" lines of the last response"
|
|
@@ -18440,7 +18527,7 @@ function useErrorCount() {
|
|
|
18440
18527
|
}
|
|
18441
18528
|
|
|
18442
18529
|
// packages/cli/src/ui/components/DetailedMessagesDisplay.tsx
|
|
18443
|
-
var
|
|
18530
|
+
var import_jsx_runtime108 = __toESM(require_jsx_runtime(), 1);
|
|
18444
18531
|
var iconBoxWidth = 3;
|
|
18445
18532
|
var DetailedMessagesDisplay = ({ maxHeight, width, hasFocus }) => {
|
|
18446
18533
|
const scrollableListRef = (0, import_react67.useRef)(null);
|
|
@@ -18471,7 +18558,7 @@ var DetailedMessagesDisplay = ({ maxHeight, width, hasFocus }) => {
|
|
|
18471
18558
|
if (messages.length === 0) {
|
|
18472
18559
|
return null;
|
|
18473
18560
|
}
|
|
18474
|
-
return /* @__PURE__ */ (0,
|
|
18561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
18475
18562
|
Box_default,
|
|
18476
18563
|
{
|
|
18477
18564
|
flexDirection: "column",
|
|
@@ -18485,11 +18572,11 @@ var DetailedMessagesDisplay = ({ maxHeight, width, hasFocus }) => {
|
|
|
18485
18572
|
flexGrow: 0,
|
|
18486
18573
|
overflow: "hidden",
|
|
18487
18574
|
children: [
|
|
18488
|
-
/* @__PURE__ */ (0,
|
|
18575
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Text, { bold: true, color: theme.text.primary, children: [
|
|
18489
18576
|
"Debug Console ",
|
|
18490
|
-
/* @__PURE__ */ (0,
|
|
18577
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Text, { color: theme.text.secondary, children: "(F12 to close)" })
|
|
18491
18578
|
] }) }),
|
|
18492
|
-
/* @__PURE__ */ (0,
|
|
18579
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Box_default, { height: maxHeight, width: width - borderAndPadding, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
18493
18580
|
ScrollableListWithForwardRef,
|
|
18494
18581
|
{
|
|
18495
18582
|
ref: scrollableListRef,
|
|
@@ -18514,11 +18601,11 @@ var DetailedMessagesDisplay = ({ maxHeight, width, hasFocus }) => {
|
|
|
18514
18601
|
default:
|
|
18515
18602
|
break;
|
|
18516
18603
|
}
|
|
18517
|
-
return /* @__PURE__ */ (0,
|
|
18518
|
-
/* @__PURE__ */ (0,
|
|
18519
|
-
/* @__PURE__ */ (0,
|
|
18604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18605
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Box_default, { minWidth: iconBoxWidth, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Text, { color: textColor, children: icon }) }),
|
|
18606
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Text, { color: textColor, wrap: "wrap", children: [
|
|
18520
18607
|
msg.content,
|
|
18521
|
-
msg.count && msg.count > 1 && /* @__PURE__ */ (0,
|
|
18608
|
+
msg.count && msg.count > 1 && /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18522
18609
|
" (x",
|
|
18523
18610
|
msg.count,
|
|
18524
18611
|
")"
|
|
@@ -18538,12 +18625,12 @@ var DetailedMessagesDisplay = ({ maxHeight, width, hasFocus }) => {
|
|
|
18538
18625
|
};
|
|
18539
18626
|
|
|
18540
18627
|
// packages/cli/src/ui/components/shared/SectionHeader.tsx
|
|
18541
|
-
var
|
|
18628
|
+
var import_jsx_runtime109 = __toESM(require_jsx_runtime(), 1);
|
|
18542
18629
|
var SectionHeader = ({
|
|
18543
18630
|
title,
|
|
18544
18631
|
subtitle
|
|
18545
|
-
}) => /* @__PURE__ */ (0,
|
|
18546
|
-
/* @__PURE__ */ (0,
|
|
18632
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Box_default, { width: "100%", flexDirection: "column", overflow: "hidden", children: [
|
|
18633
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
18547
18634
|
Box_default,
|
|
18548
18635
|
{
|
|
18549
18636
|
width: "100%",
|
|
@@ -18555,14 +18642,14 @@ var SectionHeader = ({
|
|
|
18555
18642
|
borderColor: theme.text.secondary
|
|
18556
18643
|
}
|
|
18557
18644
|
),
|
|
18558
|
-
/* @__PURE__ */ (0,
|
|
18559
|
-
/* @__PURE__ */ (0,
|
|
18560
|
-
subtitle && /* @__PURE__ */ (0,
|
|
18645
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18646
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Text, { color: theme.text.primary, bold: true, wrap: "truncate-end", children: title }),
|
|
18647
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: subtitle })
|
|
18561
18648
|
] })
|
|
18562
18649
|
] });
|
|
18563
18650
|
|
|
18564
18651
|
// packages/cli/src/ui/components/ShortcutsHelp.tsx
|
|
18565
|
-
var
|
|
18652
|
+
var import_jsx_runtime110 = __toESM(require_jsx_runtime(), 1);
|
|
18566
18653
|
var buildShortcutItems = () => [
|
|
18567
18654
|
{ key: "!", description: "shell mode" },
|
|
18568
18655
|
{ key: "@", description: "select file or folder" },
|
|
@@ -18590,9 +18677,9 @@ var buildShortcutItems = () => [
|
|
|
18590
18677
|
description: "open external editor"
|
|
18591
18678
|
}
|
|
18592
18679
|
];
|
|
18593
|
-
var Shortcut = ({ item }) => /* @__PURE__ */ (0,
|
|
18594
|
-
/* @__PURE__ */ (0,
|
|
18595
|
-
/* @__PURE__ */ (0,
|
|
18680
|
+
var Shortcut = ({ item }) => /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
18681
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Box_default, { flexShrink: 0, marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Text, { color: theme.text.accent, children: item.key }) }),
|
|
18682
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Text, { color: theme.text.primary, children: item.description }) })
|
|
18596
18683
|
] });
|
|
18597
18684
|
var ShortcutsHelp = () => {
|
|
18598
18685
|
const { terminalWidth } = useUIState();
|
|
@@ -18611,14 +18698,14 @@ var ShortcutsHelp = () => {
|
|
|
18611
18698
|
items[9],
|
|
18612
18699
|
items[3]
|
|
18613
18700
|
];
|
|
18614
|
-
return /* @__PURE__ */ (0,
|
|
18615
|
-
/* @__PURE__ */ (0,
|
|
18616
|
-
/* @__PURE__ */ (0,
|
|
18701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(Box_default, { flexDirection: "column", width: "100%", children: [
|
|
18702
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SectionHeader, { title: " Shortcuts", subtitle: " See /help for more" }),
|
|
18703
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Box_default, { flexDirection: "row", flexWrap: "wrap", paddingLeft: 1, paddingRight: 2, children: itemsForDisplay.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
18617
18704
|
Box_default,
|
|
18618
18705
|
{
|
|
18619
18706
|
width: isNarrow ? "100%" : "33%",
|
|
18620
18707
|
paddingRight: isNarrow ? 0 : 2,
|
|
18621
|
-
children: /* @__PURE__ */ (0,
|
|
18708
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Shortcut, { item })
|
|
18622
18709
|
},
|
|
18623
18710
|
`${item.key}-${index}`
|
|
18624
18711
|
)) })
|
|
@@ -18629,7 +18716,7 @@ var ShortcutsHelp = () => {
|
|
|
18629
18716
|
var import_react81 = __toESM(require_react(), 1);
|
|
18630
18717
|
|
|
18631
18718
|
// packages/cli/src/ui/components/SuggestionsDisplay.tsx
|
|
18632
|
-
var
|
|
18719
|
+
var import_jsx_runtime111 = __toESM(require_jsx_runtime(), 1);
|
|
18633
18720
|
var MAX_SUGGESTIONS_TO_SHOW = 8;
|
|
18634
18721
|
function SuggestionsDisplay({
|
|
18635
18722
|
suggestions,
|
|
@@ -18642,7 +18729,7 @@ function SuggestionsDisplay({
|
|
|
18642
18729
|
expandedIndex
|
|
18643
18730
|
}) {
|
|
18644
18731
|
if (isLoading) {
|
|
18645
|
-
return /* @__PURE__ */ (0,
|
|
18732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Box_default, { paddingX: 1, width, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: "gray", children: "Loading suggestions..." }) });
|
|
18646
18733
|
}
|
|
18647
18734
|
if (suggestions.length === 0) {
|
|
18648
18735
|
return null;
|
|
@@ -18662,8 +18749,8 @@ function SuggestionsDisplay({
|
|
|
18662
18749
|
...suggestions.map((s) => getFullLabel(s).length)
|
|
18663
18750
|
);
|
|
18664
18751
|
const commandColumnWidth = mode === "slash" ? Math.min(maxLabelLength, Math.floor(width * 0.5)) : 0;
|
|
18665
|
-
return /* @__PURE__ */ (0,
|
|
18666
|
-
scrollOffset > 0 && /* @__PURE__ */ (0,
|
|
18752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, width, children: [
|
|
18753
|
+
scrollOffset > 0 && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: theme.text.primary, children: "\u25B2" }),
|
|
18667
18754
|
visibleSuggestions.map((suggestion, index) => {
|
|
18668
18755
|
const originalIndex = startIndex + index;
|
|
18669
18756
|
const isActive = originalIndex === activeIndex;
|
|
@@ -18672,7 +18759,7 @@ function SuggestionsDisplay({
|
|
|
18672
18759
|
const isLong = suggestion.value.length >= MAX_WIDTH;
|
|
18673
18760
|
const previousSectionTitle = suggestions[originalIndex - 1]?.sectionTitle;
|
|
18674
18761
|
const shouldRenderSectionHeader = mode === "slash" && !!suggestion.sectionTitle && suggestion.sectionTitle !== previousSectionTitle;
|
|
18675
|
-
const labelElement = /* @__PURE__ */ (0,
|
|
18762
|
+
const labelElement = /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
18676
18763
|
ExpandableText,
|
|
18677
18764
|
{
|
|
18678
18765
|
label: suggestion.value,
|
|
@@ -18682,34 +18769,34 @@ function SuggestionsDisplay({
|
|
|
18682
18769
|
isExpanded
|
|
18683
18770
|
}
|
|
18684
18771
|
);
|
|
18685
|
-
return /* @__PURE__ */ (0,
|
|
18772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
18686
18773
|
Box_default,
|
|
18687
18774
|
{
|
|
18688
18775
|
flexDirection: "column",
|
|
18689
18776
|
children: [
|
|
18690
|
-
shouldRenderSectionHeader && /* @__PURE__ */ (0,
|
|
18777
|
+
shouldRenderSectionHeader && /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
18691
18778
|
"-- ",
|
|
18692
18779
|
suggestion.sectionTitle,
|
|
18693
18780
|
" --"
|
|
18694
18781
|
] }),
|
|
18695
|
-
/* @__PURE__ */ (0,
|
|
18782
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
18696
18783
|
Box_default,
|
|
18697
18784
|
{
|
|
18698
18785
|
flexDirection: "row",
|
|
18699
18786
|
backgroundColor: isActive ? theme.background.focus : void 0,
|
|
18700
18787
|
children: [
|
|
18701
|
-
/* @__PURE__ */ (0,
|
|
18788
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
18702
18789
|
Box_default,
|
|
18703
18790
|
{
|
|
18704
18791
|
...mode === "slash" ? { width: commandColumnWidth, flexShrink: 0 } : { flexShrink: 1 },
|
|
18705
|
-
children: /* @__PURE__ */ (0,
|
|
18792
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Box_default, { children: [
|
|
18706
18793
|
labelElement,
|
|
18707
|
-
suggestion.commandKind && COMMAND_KIND_SUFFIX[suggestion.commandKind] && /* @__PURE__ */ (0,
|
|
18794
|
+
suggestion.commandKind && COMMAND_KIND_SUFFIX[suggestion.commandKind] && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: textColor, children: COMMAND_KIND_SUFFIX[suggestion.commandKind] })
|
|
18708
18795
|
] })
|
|
18709
18796
|
}
|
|
18710
18797
|
),
|
|
18711
|
-
suggestion.description && /* @__PURE__ */ (0,
|
|
18712
|
-
isActive && isLong && /* @__PURE__ */ (0,
|
|
18798
|
+
suggestion.description && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Box_default, { flexGrow: 1, paddingLeft: 3, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: textColor, wrap: "truncate", children: sanitizeForDisplay(suggestion.description, 100) }) }),
|
|
18799
|
+
isActive && isLong && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Box_default, { width: 3, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: Colors.Gray, children: isExpanded ? " \u2190 " : " \u2192 " }) })
|
|
18713
18800
|
]
|
|
18714
18801
|
}
|
|
18715
18802
|
)
|
|
@@ -18718,8 +18805,8 @@ function SuggestionsDisplay({
|
|
|
18718
18805
|
`${suggestion.value}-${originalIndex}`
|
|
18719
18806
|
);
|
|
18720
18807
|
}),
|
|
18721
|
-
endIndex < suggestions.length && /* @__PURE__ */ (0,
|
|
18722
|
-
suggestions.length > MAX_SUGGESTIONS_TO_SHOW && /* @__PURE__ */ (0,
|
|
18808
|
+
endIndex < suggestions.length && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Text, { color: "gray", children: "\u25BC" }),
|
|
18809
|
+
suggestions.length > MAX_SUGGESTIONS_TO_SHOW && /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Text, { color: "gray", children: [
|
|
18723
18810
|
"(",
|
|
18724
18811
|
activeIndex + 1,
|
|
18725
18812
|
"/",
|
|
@@ -21356,7 +21443,7 @@ function useRepeatedKeyPress(options) {
|
|
|
21356
21443
|
}
|
|
21357
21444
|
|
|
21358
21445
|
// packages/cli/src/ui/components/InputPrompt.tsx
|
|
21359
|
-
var
|
|
21446
|
+
var import_jsx_runtime112 = __toESM(require_jsx_runtime(), 1);
|
|
21360
21447
|
function isTerminalPasteTrusted(kittyProtocolSupported) {
|
|
21361
21448
|
return kittyProtocolSupported;
|
|
21362
21449
|
}
|
|
@@ -21548,6 +21635,15 @@ var InputPrompt = ({
|
|
|
21548
21635
|
setForceShowShellSuggestions,
|
|
21549
21636
|
isShellSuggestionsVisible
|
|
21550
21637
|
} = completion;
|
|
21638
|
+
const effectivePlaceholder = (0, import_react81.useMemo)(() => {
|
|
21639
|
+
if (!isVoiceModeEnabled) return placeholder;
|
|
21640
|
+
const voiceAction = (settings.experimental.voice?.activationMode ?? "push-to-talk") === "push-to-talk" ? "hold space to talk" : "space to talk";
|
|
21641
|
+
return ` Type your message or ${voiceAction} (Esc to exit)`;
|
|
21642
|
+
}, [
|
|
21643
|
+
isVoiceModeEnabled,
|
|
21644
|
+
placeholder,
|
|
21645
|
+
settings.experimental.voice?.activationMode
|
|
21646
|
+
]);
|
|
21551
21647
|
const showCursor = focus && isShellFocused && !isEmbeddedShellFocused && !copyModeEnabled;
|
|
21552
21648
|
(0, import_react81.useEffect)(() => {
|
|
21553
21649
|
appEvents.emit("scroll-to-bottom" /* ScrollToBottom */);
|
|
@@ -22403,14 +22499,14 @@ var InputPrompt = ({
|
|
|
22403
22499
|
({ item }) => {
|
|
22404
22500
|
if (item.type === "ghostLine") {
|
|
22405
22501
|
const padding = Math.max(0, inputWidth - stringWidth(item.ghostLine));
|
|
22406
|
-
return /* @__PURE__ */ (0,
|
|
22502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Box_default, { height: 1, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
22407
22503
|
item.ghostLine,
|
|
22408
22504
|
" ".repeat(padding)
|
|
22409
22505
|
] }) });
|
|
22410
22506
|
}
|
|
22411
22507
|
const { lineText, absoluteVisualIdx } = item;
|
|
22412
22508
|
const mapEntry = buffer.visualToLogicalMap[absoluteVisualIdx];
|
|
22413
|
-
if (!mapEntry) return /* @__PURE__ */ (0,
|
|
22509
|
+
if (!mapEntry) return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { children: " " });
|
|
22414
22510
|
const isOnCursorLine = focus && absoluteVisualIdx === cursorVisualRowAbsolute;
|
|
22415
22511
|
const renderedLine = [];
|
|
22416
22512
|
const [logicalLineIdx] = mapEntry;
|
|
@@ -22452,17 +22548,17 @@ var InputPrompt = ({
|
|
|
22452
22548
|
}
|
|
22453
22549
|
const color = seg.type === "command" || seg.type === "file" || seg.type === "paste" ? theme.text.accent : theme.text.primary;
|
|
22454
22550
|
renderedLine.push(
|
|
22455
|
-
/* @__PURE__ */ (0,
|
|
22551
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { color, children: display }, `token-${segIdx}`)
|
|
22456
22552
|
);
|
|
22457
22553
|
});
|
|
22458
22554
|
const currentLineGhost = isOnCursorLine ? inlineGhost : "";
|
|
22459
22555
|
if (isOnCursorLine && cursorVisualColAbsolute === cpLen(lineText) && !currentLineGhost) {
|
|
22460
22556
|
renderedLine.push(
|
|
22461
|
-
/* @__PURE__ */ (0,
|
|
22557
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { children: showCursor ? import_chalk3.default.inverse(" ") : " " }, `cursor-end-${cursorVisualColAbsolute}`)
|
|
22462
22558
|
);
|
|
22463
22559
|
}
|
|
22464
22560
|
const showCursorBeforeGhost = focus && isOnCursorLine && cursorVisualColAbsolute === cpLen(lineText) && currentLineGhost;
|
|
22465
|
-
return /* @__PURE__ */ (0,
|
|
22561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Box_default, { height: 1, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
22466
22562
|
Text,
|
|
22467
22563
|
{
|
|
22468
22564
|
terminalCursorFocus: showCursor && isOnCursorLine,
|
|
@@ -22473,7 +22569,7 @@ var InputPrompt = ({
|
|
|
22473
22569
|
children: [
|
|
22474
22570
|
renderedLine,
|
|
22475
22571
|
showCursorBeforeGhost && (showCursor ? import_chalk3.default.inverse(" ") : " "),
|
|
22476
|
-
currentLineGhost && /* @__PURE__ */ (0,
|
|
22572
|
+
currentLineGhost && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { color: theme.text.secondary, children: currentLineGhost })
|
|
22477
22573
|
]
|
|
22478
22574
|
}
|
|
22479
22575
|
) });
|
|
@@ -22541,7 +22637,7 @@ var InputPrompt = ({
|
|
|
22541
22637
|
statusColor = theme.status.warning;
|
|
22542
22638
|
statusText = "Accepting edits";
|
|
22543
22639
|
}
|
|
22544
|
-
const suggestionsNode = shouldShowSuggestions ? /* @__PURE__ */ (0,
|
|
22640
|
+
const suggestionsNode = shouldShowSuggestions ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Box_default, { paddingRight: 2, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
22545
22641
|
SuggestionsDisplay,
|
|
22546
22642
|
{
|
|
22547
22643
|
suggestions: activeCompletion.suggestions,
|
|
@@ -22555,9 +22651,9 @@ var InputPrompt = ({
|
|
|
22555
22651
|
}
|
|
22556
22652
|
) }) : null;
|
|
22557
22653
|
const borderColor = isShellFocused && !isEmbeddedShellFocused ? statusColor ?? theme.ui.focus : theme.border.default;
|
|
22558
|
-
return /* @__PURE__ */ (0,
|
|
22654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_jsx_runtime112.Fragment, { children: [
|
|
22559
22655
|
suggestionsPosition === "above" && suggestionsNode,
|
|
22560
|
-
useLineFallback || !useBackgroundColor ? /* @__PURE__ */ (0,
|
|
22656
|
+
useLineFallback || !useBackgroundColor ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
22561
22657
|
Box_default,
|
|
22562
22658
|
{
|
|
22563
22659
|
borderStyle: "round",
|
|
@@ -22572,20 +22668,21 @@ var InputPrompt = ({
|
|
|
22572
22668
|
height: 0
|
|
22573
22669
|
}
|
|
22574
22670
|
) : null,
|
|
22575
|
-
/* @__PURE__ */ (0,
|
|
22671
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
22576
22672
|
HalfLinePaddedBox,
|
|
22577
22673
|
{
|
|
22578
22674
|
backgroundBaseColor: theme.background.input,
|
|
22579
22675
|
backgroundOpacity: 1,
|
|
22580
22676
|
useBackgroundColor,
|
|
22581
|
-
children: /* @__PURE__ */ (0,
|
|
22582
|
-
/* @__PURE__ */ (0,
|
|
22677
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(Box_default, { flexGrow: 1, flexDirection: "row", paddingX: 1, children: [
|
|
22678
|
+
isVoiceModeEnabled && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { color: theme.text.accent, children: "\u{1F3A4} " }),
|
|
22679
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
22583
22680
|
Text,
|
|
22584
22681
|
{
|
|
22585
22682
|
color: statusColor ?? theme.text.accent,
|
|
22586
22683
|
"aria-label": statusText || void 0,
|
|
22587
22684
|
children: [
|
|
22588
|
-
shellModeActive ? reverseSearchActive ? /* @__PURE__ */ (0,
|
|
22685
|
+
shellModeActive ? reverseSearchActive ? /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
22589
22686
|
Text,
|
|
22590
22687
|
{
|
|
22591
22688
|
color: theme.text.link,
|
|
@@ -22595,37 +22692,30 @@ var InputPrompt = ({
|
|
|
22595
22692
|
" "
|
|
22596
22693
|
]
|
|
22597
22694
|
}
|
|
22598
|
-
) : "!" : commandSearchActive ? /* @__PURE__ */ (0,
|
|
22695
|
+
) : "!" : commandSearchActive ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { color: theme.text.accent, children: "(r:) " }) : showYoloStyling ? "*" : ">",
|
|
22599
22696
|
" "
|
|
22600
22697
|
]
|
|
22601
22698
|
}
|
|
22602
22699
|
),
|
|
22603
|
-
/* @__PURE__ */ (0,
|
|
22604
|
-
isRecording && /* @__PURE__ */ (0,
|
|
22605
|
-
|
|
22606
|
-
"> Voice mode:",
|
|
22607
|
-
" ",
|
|
22608
|
-
(settings.experimental.voice?.activationMode ?? "push-to-talk") === "push-to-talk" ? "Hold Space to record" : "Space to start/stop recording",
|
|
22609
|
-
" ",
|
|
22610
|
-
"(Esc to exit)"
|
|
22611
|
-
] }) }),
|
|
22612
|
-
buffer.text.length === 0 && !isRecording ? !isVoiceModeEnabled && placeholder ? showCursor ? /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
22700
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(Box_default, { flexGrow: 1, flexDirection: "column", ref: innerBoxRef, children: [
|
|
22701
|
+
isRecording && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Box_default, { flexDirection: "row", marginBottom: 0, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { color: theme.status.success, children: "Listening..." }) }),
|
|
22702
|
+
buffer.text.length === 0 && !isRecording ? effectivePlaceholder ? showCursor ? /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
22613
22703
|
Text,
|
|
22614
22704
|
{
|
|
22615
22705
|
terminalCursorFocus: showCursor,
|
|
22616
22706
|
terminalCursorPosition: 0,
|
|
22617
22707
|
children: [
|
|
22618
|
-
import_chalk3.default.inverse(
|
|
22619
|
-
/* @__PURE__ */ (0,
|
|
22708
|
+
import_chalk3.default.inverse(effectivePlaceholder.slice(0, 1)),
|
|
22709
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { color: theme.text.secondary, children: effectivePlaceholder.slice(1) })
|
|
22620
22710
|
]
|
|
22621
22711
|
}
|
|
22622
|
-
) : /* @__PURE__ */ (0,
|
|
22712
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { color: theme.text.secondary, children: effectivePlaceholder }) : null : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
22623
22713
|
Box_default,
|
|
22624
22714
|
{
|
|
22625
22715
|
flexDirection: "column",
|
|
22626
22716
|
height: Math.min(buffer.viewportHeight, scrollableData.length),
|
|
22627
22717
|
width: "100%",
|
|
22628
|
-
children: config.getUseTerminalBuffer() ? /* @__PURE__ */ (0,
|
|
22718
|
+
children: config.getUseTerminalBuffer() ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
22629
22719
|
ScrollableListWithForwardRef,
|
|
22630
22720
|
{
|
|
22631
22721
|
ref: listRef,
|
|
@@ -22648,7 +22738,7 @@ var InputPrompt = ({
|
|
|
22648
22738
|
).map((item, index) => {
|
|
22649
22739
|
const actualIndex = buffer.visualScrollRow + index;
|
|
22650
22740
|
const key = item.type === "visualLine" ? `line-${item.absoluteVisualIdx}` : `ghost-${item.index}`;
|
|
22651
|
-
return /* @__PURE__ */ (0,
|
|
22741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_react81.Fragment, { children: renderItem({ item, index: actualIndex }) }, key);
|
|
22652
22742
|
})
|
|
22653
22743
|
}
|
|
22654
22744
|
)
|
|
@@ -22656,7 +22746,7 @@ var InputPrompt = ({
|
|
|
22656
22746
|
] })
|
|
22657
22747
|
}
|
|
22658
22748
|
),
|
|
22659
|
-
useLineFallback || !useBackgroundColor ? /* @__PURE__ */ (0,
|
|
22749
|
+
useLineFallback || !useBackgroundColor ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
22660
22750
|
Box_default,
|
|
22661
22751
|
{
|
|
22662
22752
|
borderStyle: "round",
|
|
@@ -23087,7 +23177,7 @@ var usePhraseCycler = (isActive, isWaiting, shouldShowFocusHint, showTips = true
|
|
|
23087
23177
|
// packages/cli/src/ui/components/GeminiSpinner.tsx
|
|
23088
23178
|
var import_react83 = __toESM(require_react(), 1);
|
|
23089
23179
|
var import_tinygradient = __toESM(require_tinygradient(), 1);
|
|
23090
|
-
var
|
|
23180
|
+
var import_jsx_runtime113 = __toESM(require_jsx_runtime(), 1);
|
|
23091
23181
|
var COLOR_CYCLE_DURATION_MS = 4e3;
|
|
23092
23182
|
var GeminiSpinner = ({
|
|
23093
23183
|
spinnerType = "dots",
|
|
@@ -23117,11 +23207,11 @@ var GeminiSpinner = ({
|
|
|
23117
23207
|
}, [isScreenReaderEnabled]);
|
|
23118
23208
|
const progress = time % COLOR_CYCLE_DURATION_MS / COLOR_CYCLE_DURATION_MS;
|
|
23119
23209
|
const currentColor = googleGradient.rgbAt(progress).toHexString();
|
|
23120
|
-
return isScreenReaderEnabled ? /* @__PURE__ */ (0,
|
|
23210
|
+
return isScreenReaderEnabled ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Text, { children: altText }) : /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Text, { color: currentColor, children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(CliSpinner, { type: spinnerType }) });
|
|
23121
23211
|
};
|
|
23122
23212
|
|
|
23123
23213
|
// packages/cli/src/ui/components/GeminiRespondingSpinner.tsx
|
|
23124
|
-
var
|
|
23214
|
+
var import_jsx_runtime114 = __toESM(require_jsx_runtime(), 1);
|
|
23125
23215
|
var GeminiRespondingSpinner = ({
|
|
23126
23216
|
nonRespondingDisplay,
|
|
23127
23217
|
spinnerType = "dots",
|
|
@@ -23131,7 +23221,7 @@ var GeminiRespondingSpinner = ({
|
|
|
23131
23221
|
const streamingState = useStreamingContext();
|
|
23132
23222
|
const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
|
|
23133
23223
|
if (streamingState === "responding" /* Responding */ && !isHookActive) {
|
|
23134
|
-
return /* @__PURE__ */ (0,
|
|
23224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
23135
23225
|
GeminiSpinner,
|
|
23136
23226
|
{
|
|
23137
23227
|
spinnerType,
|
|
@@ -23140,13 +23230,13 @@ var GeminiRespondingSpinner = ({
|
|
|
23140
23230
|
);
|
|
23141
23231
|
}
|
|
23142
23232
|
if (nonRespondingDisplay) {
|
|
23143
|
-
return isScreenReaderEnabled ? /* @__PURE__ */ (0,
|
|
23233
|
+
return isScreenReaderEnabled ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Text, { children: SCREEN_READER_LOADING }) : /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Text, { color: color ?? theme.text.primary, children: nonRespondingDisplay });
|
|
23144
23234
|
}
|
|
23145
23235
|
return null;
|
|
23146
23236
|
};
|
|
23147
23237
|
|
|
23148
23238
|
// packages/cli/src/ui/components/LoadingIndicator.tsx
|
|
23149
|
-
var
|
|
23239
|
+
var import_jsx_runtime115 = __toESM(require_jsx_runtime(), 1);
|
|
23150
23240
|
var LoadingIndicator = ({
|
|
23151
23241
|
currentLoadingPhrase,
|
|
23152
23242
|
wittyPhrase,
|
|
@@ -23169,72 +23259,72 @@ var LoadingIndicator = ({
|
|
|
23169
23259
|
}
|
|
23170
23260
|
const primaryText = currentLoadingPhrase === INTERACTIVE_SHELL_WAITING_PHRASE ? currentLoadingPhrase : thought?.subject ? thoughtLabel ?? thought.subject : currentLoadingPhrase || (streamingState === "responding" /* Responding */ ? "Thinking..." : void 0);
|
|
23171
23261
|
const cancelAndTimerContent = showCancelAndTimer && streamingState === "responding" /* Responding */ ? `(esc to cancel, ${elapsedTime < 60 ? `${elapsedTime}s` : formatDuration(elapsedTime * 1e3)})` : null;
|
|
23172
|
-
const wittyPhraseNode = !forceRealStatusOnly && showWit && wittyPhrase && primaryText === "Thinking..." ? /* @__PURE__ */ (0,
|
|
23262
|
+
const wittyPhraseNode = !forceRealStatusOnly && showWit && wittyPhrase && primaryText === "Thinking..." ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Text, { color: theme.text.secondary, dimColor: true, italic: true, children: wittyPhrase }) }) : null;
|
|
23173
23263
|
if (inline) {
|
|
23174
|
-
return /* @__PURE__ */ (0,
|
|
23175
|
-
/* @__PURE__ */ (0,
|
|
23264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Box_default, { children: [
|
|
23265
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
23176
23266
|
GeminiRespondingSpinner,
|
|
23177
23267
|
{
|
|
23178
23268
|
nonRespondingDisplay: spinnerIcon ?? (streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ ? "\u280F" : ""),
|
|
23179
23269
|
isHookActive
|
|
23180
23270
|
}
|
|
23181
23271
|
) }),
|
|
23182
|
-
primaryText && /* @__PURE__ */ (0,
|
|
23183
|
-
/* @__PURE__ */ (0,
|
|
23184
|
-
primaryText === INTERACTIVE_SHELL_WAITING_PHRASE && /* @__PURE__ */ (0,
|
|
23272
|
+
primaryText && /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Box_default, { flexShrink: 1, children: [
|
|
23273
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Text, { color: theme.text.primary, italic: true, wrap: "truncate-end", children: primaryText }),
|
|
23274
|
+
primaryText === INTERACTIVE_SHELL_WAITING_PHRASE && /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Text, { color: theme.ui.active, italic: true, children: [
|
|
23185
23275
|
" ",
|
|
23186
23276
|
"(press tab to focus)"
|
|
23187
23277
|
] })
|
|
23188
23278
|
] }),
|
|
23189
|
-
cancelAndTimerContent && /* @__PURE__ */ (0,
|
|
23190
|
-
/* @__PURE__ */ (0,
|
|
23191
|
-
/* @__PURE__ */ (0,
|
|
23279
|
+
cancelAndTimerContent && /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(import_jsx_runtime115.Fragment, { children: [
|
|
23280
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { flexShrink: 0, width: 1 }),
|
|
23281
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Text, { color: theme.text.secondary, children: cancelAndTimerContent })
|
|
23192
23282
|
] }),
|
|
23193
23283
|
wittyPhraseNode
|
|
23194
23284
|
] });
|
|
23195
23285
|
}
|
|
23196
|
-
return /* @__PURE__ */ (0,
|
|
23197
|
-
/* @__PURE__ */ (0,
|
|
23286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Box_default, { paddingLeft: 0, flexDirection: "column", children: [
|
|
23287
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
23198
23288
|
Box_default,
|
|
23199
23289
|
{
|
|
23200
23290
|
width: "100%",
|
|
23201
23291
|
flexDirection: isNarrow ? "column" : "row",
|
|
23202
23292
|
alignItems: isNarrow ? "flex-start" : "center",
|
|
23203
23293
|
children: [
|
|
23204
|
-
/* @__PURE__ */ (0,
|
|
23205
|
-
/* @__PURE__ */ (0,
|
|
23294
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Box_default, { children: [
|
|
23295
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
23206
23296
|
GeminiRespondingSpinner,
|
|
23207
23297
|
{
|
|
23208
23298
|
nonRespondingDisplay: spinnerIcon ?? (streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ ? "\u280F" : ""),
|
|
23209
23299
|
isHookActive
|
|
23210
23300
|
}
|
|
23211
23301
|
) }),
|
|
23212
|
-
primaryText && /* @__PURE__ */ (0,
|
|
23213
|
-
/* @__PURE__ */ (0,
|
|
23214
|
-
primaryText === INTERACTIVE_SHELL_WAITING_PHRASE && /* @__PURE__ */ (0,
|
|
23302
|
+
primaryText && /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Box_default, { flexShrink: 1, children: [
|
|
23303
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Text, { color: theme.text.primary, italic: true, wrap: "truncate-end", children: primaryText }),
|
|
23304
|
+
primaryText === INTERACTIVE_SHELL_WAITING_PHRASE && /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Text, { color: theme.ui.active, italic: true, children: [
|
|
23215
23305
|
" ",
|
|
23216
23306
|
"(press tab to focus)"
|
|
23217
23307
|
] })
|
|
23218
23308
|
] }),
|
|
23219
|
-
!isNarrow && cancelAndTimerContent && /* @__PURE__ */ (0,
|
|
23220
|
-
/* @__PURE__ */ (0,
|
|
23221
|
-
/* @__PURE__ */ (0,
|
|
23309
|
+
!isNarrow && cancelAndTimerContent && /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(import_jsx_runtime115.Fragment, { children: [
|
|
23310
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { flexShrink: 0, width: 1 }),
|
|
23311
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Text, { color: theme.text.secondary, children: cancelAndTimerContent })
|
|
23222
23312
|
] }),
|
|
23223
23313
|
!isNarrow && wittyPhraseNode
|
|
23224
23314
|
] }),
|
|
23225
|
-
!isNarrow && /* @__PURE__ */ (0,
|
|
23226
|
-
!isNarrow && rightContent && /* @__PURE__ */ (0,
|
|
23315
|
+
!isNarrow && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { flexGrow: 1 }),
|
|
23316
|
+
!isNarrow && rightContent && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { children: rightContent })
|
|
23227
23317
|
]
|
|
23228
23318
|
}
|
|
23229
23319
|
),
|
|
23230
|
-
isNarrow && cancelAndTimerContent && /* @__PURE__ */ (0,
|
|
23320
|
+
isNarrow && cancelAndTimerContent && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Text, { color: theme.text.secondary, children: cancelAndTimerContent }) }),
|
|
23231
23321
|
isNarrow && wittyPhraseNode,
|
|
23232
|
-
isNarrow && rightContent && /* @__PURE__ */ (0,
|
|
23322
|
+
isNarrow && rightContent && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Box_default, { children: rightContent })
|
|
23233
23323
|
] });
|
|
23234
23324
|
};
|
|
23235
23325
|
|
|
23236
23326
|
// packages/cli/src/ui/components/ContextSummaryDisplay.tsx
|
|
23237
|
-
var
|
|
23327
|
+
var import_jsx_runtime116 = __toESM(require_jsx_runtime(), 1);
|
|
23238
23328
|
var ContextSummaryDisplay = ({
|
|
23239
23329
|
geminiMdFileCount,
|
|
23240
23330
|
contextFileNames,
|
|
@@ -23302,14 +23392,14 @@ var ContextSummaryDisplay = ({
|
|
|
23302
23392
|
skillText,
|
|
23303
23393
|
backgroundText
|
|
23304
23394
|
].filter(Boolean);
|
|
23305
|
-
return /* @__PURE__ */ (0,
|
|
23306
|
-
index > 0 && /* @__PURE__ */ (0,
|
|
23307
|
-
/* @__PURE__ */ (0,
|
|
23395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Box_default, { paddingX: 1, flexDirection: "row", flexWrap: "wrap", children: summaryParts.map((part, index) => /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
23396
|
+
index > 0 && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.text.secondary, children: " \xB7 " }),
|
|
23397
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Text, { color: theme.text.secondary, children: part })
|
|
23308
23398
|
] }, index)) });
|
|
23309
23399
|
};
|
|
23310
23400
|
|
|
23311
23401
|
// packages/cli/src/ui/components/StatusDisplay.tsx
|
|
23312
|
-
var
|
|
23402
|
+
var import_jsx_runtime117 = __toESM(require_jsx_runtime(), 1);
|
|
23313
23403
|
var StatusDisplay = ({
|
|
23314
23404
|
hideContextSummary
|
|
23315
23405
|
}) => {
|
|
@@ -23317,10 +23407,10 @@ var StatusDisplay = ({
|
|
|
23317
23407
|
const settings = useSettings();
|
|
23318
23408
|
const config = useConfig();
|
|
23319
23409
|
if (process.env["GEMINI_SYSTEM_MD"]) {
|
|
23320
|
-
return /* @__PURE__ */ (0,
|
|
23410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Text, { color: theme.status.error, children: "|\u2310\u25A0_\u25A0|" });
|
|
23321
23411
|
}
|
|
23322
23412
|
if (!settings.merged.ui.hideContextSummary && !hideContextSummary) {
|
|
23323
|
-
return /* @__PURE__ */ (0,
|
|
23413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
23324
23414
|
ContextSummaryDisplay,
|
|
23325
23415
|
{
|
|
23326
23416
|
ideContext: uiState.ideContextState,
|
|
@@ -23337,11 +23427,11 @@ var StatusDisplay = ({
|
|
|
23337
23427
|
};
|
|
23338
23428
|
|
|
23339
23429
|
// packages/cli/src/ui/components/shared/HorizontalLine.tsx
|
|
23340
|
-
var
|
|
23430
|
+
var import_jsx_runtime118 = __toESM(require_jsx_runtime(), 1);
|
|
23341
23431
|
var HorizontalLine = ({
|
|
23342
23432
|
color = theme.border.default,
|
|
23343
23433
|
dim = false
|
|
23344
|
-
}) => /* @__PURE__ */ (0,
|
|
23434
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
23345
23435
|
Box_default,
|
|
23346
23436
|
{
|
|
23347
23437
|
width: "100%",
|
|
@@ -23356,7 +23446,7 @@ var HorizontalLine = ({
|
|
|
23356
23446
|
);
|
|
23357
23447
|
|
|
23358
23448
|
// packages/cli/src/ui/components/ApprovalModeIndicator.tsx
|
|
23359
|
-
var
|
|
23449
|
+
var import_jsx_runtime119 = __toESM(require_jsx_runtime(), 1);
|
|
23360
23450
|
var ApprovalModeIndicator = ({
|
|
23361
23451
|
approvalMode,
|
|
23362
23452
|
allowPlanMode
|
|
@@ -23389,9 +23479,9 @@ var ApprovalModeIndicator = ({
|
|
|
23389
23479
|
subText = `${cycleHint} to accept edits`;
|
|
23390
23480
|
break;
|
|
23391
23481
|
}
|
|
23392
|
-
return /* @__PURE__ */ (0,
|
|
23482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(Text, { color: textColor, children: [
|
|
23393
23483
|
textContent ? textContent : null,
|
|
23394
|
-
subText ? /* @__PURE__ */ (0,
|
|
23484
|
+
subText ? /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
23395
23485
|
textContent ? " " : "",
|
|
23396
23486
|
subText
|
|
23397
23487
|
] }) : null
|
|
@@ -23399,19 +23489,19 @@ var ApprovalModeIndicator = ({
|
|
|
23399
23489
|
};
|
|
23400
23490
|
|
|
23401
23491
|
// packages/cli/src/ui/components/ShellModeIndicator.tsx
|
|
23402
|
-
var
|
|
23403
|
-
var ShellModeIndicator = () => /* @__PURE__ */ (0,
|
|
23492
|
+
var import_jsx_runtime120 = __toESM(require_jsx_runtime(), 1);
|
|
23493
|
+
var ShellModeIndicator = () => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(Text, { color: theme.ui.symbol, children: [
|
|
23404
23494
|
"shell mode enabled",
|
|
23405
|
-
/* @__PURE__ */ (0,
|
|
23495
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Text, { color: theme.text.secondary, children: " (esc to disable)" })
|
|
23406
23496
|
] }) });
|
|
23407
23497
|
|
|
23408
23498
|
// packages/cli/src/ui/components/RawMarkdownIndicator.tsx
|
|
23409
|
-
var
|
|
23499
|
+
var import_jsx_runtime121 = __toESM(require_jsx_runtime(), 1);
|
|
23410
23500
|
var RawMarkdownIndicator = () => {
|
|
23411
23501
|
const modKey = formatCommand("app.toggleMarkdown" /* TOGGLE_MARKDOWN */);
|
|
23412
|
-
return /* @__PURE__ */ (0,
|
|
23502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(Text, { children: [
|
|
23413
23503
|
"raw markdown mode",
|
|
23414
|
-
/* @__PURE__ */ (0,
|
|
23504
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
23415
23505
|
" (",
|
|
23416
23506
|
modKey,
|
|
23417
23507
|
" to toggle) "
|
|
@@ -23483,7 +23573,7 @@ var useComposerStatus = () => {
|
|
|
23483
23573
|
};
|
|
23484
23574
|
|
|
23485
23575
|
// packages/cli/src/ui/components/StatusRow.tsx
|
|
23486
|
-
var
|
|
23576
|
+
var import_jsx_runtime122 = __toESM(require_jsx_runtime(), 1);
|
|
23487
23577
|
var LAYOUT = {
|
|
23488
23578
|
STATUS_MIN_HEIGHT: 1,
|
|
23489
23579
|
TIP_LEFT_MARGIN: 2,
|
|
@@ -23555,7 +23645,7 @@ var StatusNode = ({
|
|
|
23555
23645
|
} else {
|
|
23556
23646
|
currentThought = thought ? { ...thought, subject: stripAnsi(thought.subject) } : null;
|
|
23557
23647
|
}
|
|
23558
|
-
return /* @__PURE__ */ (0,
|
|
23648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { ref: onRefChange, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
23559
23649
|
LoadingIndicator,
|
|
23560
23650
|
{
|
|
23561
23651
|
inline: true,
|
|
@@ -23637,7 +23727,7 @@ var StatusRow = ({
|
|
|
23637
23727
|
const onStatusResize = (0, import_react85.useCallback)((width) => {
|
|
23638
23728
|
if (width > 0) setStatusWidth(width);
|
|
23639
23729
|
}, []);
|
|
23640
|
-
const statusNode = /* @__PURE__ */ (0,
|
|
23730
|
+
const statusNode = /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
23641
23731
|
StatusNode,
|
|
23642
23732
|
{
|
|
23643
23733
|
showTips,
|
|
@@ -23655,7 +23745,7 @@ var StatusRow = ({
|
|
|
23655
23745
|
if (!tipContentStr) return null;
|
|
23656
23746
|
const isShortcutHint = tipContentStr === "? for shortcuts" || tipContentStr === "press tab twice for more";
|
|
23657
23747
|
const color = isShortcutHint && uiState.shortcutsHelpVisible ? theme.text.accent : theme.text.secondary;
|
|
23658
|
-
return /* @__PURE__ */ (0,
|
|
23748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { flexDirection: "row", justifyContent: "flex-end", ref: onTipRefChange, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
23659
23749
|
Text,
|
|
23660
23750
|
{
|
|
23661
23751
|
color,
|
|
@@ -23666,10 +23756,10 @@ var StatusRow = ({
|
|
|
23666
23756
|
) });
|
|
23667
23757
|
};
|
|
23668
23758
|
if (!showUiDetails && !showRow1Minimal && !showRow2Minimal) {
|
|
23669
|
-
return /* @__PURE__ */ (0,
|
|
23759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { height: LAYOUT.STATUS_MIN_HEIGHT });
|
|
23670
23760
|
}
|
|
23671
|
-
return /* @__PURE__ */ (0,
|
|
23672
|
-
showRow1 && /* @__PURE__ */ (0,
|
|
23761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Box_default, { flexDirection: "column", width: "100%", children: [
|
|
23762
|
+
showRow1 && /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
23673
23763
|
Box_default,
|
|
23674
23764
|
{
|
|
23675
23765
|
width: "100%",
|
|
@@ -23678,13 +23768,13 @@ var StatusRow = ({
|
|
|
23678
23768
|
justifyContent: "space-between",
|
|
23679
23769
|
minHeight: LAYOUT.STATUS_MIN_HEIGHT,
|
|
23680
23770
|
children: [
|
|
23681
|
-
/* @__PURE__ */ (0,
|
|
23771
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { flexDirection: "row", flexGrow: 1, flexShrink: 1, children: !showUiDetails && showRow1Minimal ? /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Box_default, { flexDirection: "row", columnGap: 1, children: [
|
|
23682
23772
|
statusNode,
|
|
23683
|
-
!showUiDetails && showRow2Minimal && modeContentObj && /* @__PURE__ */ (0,
|
|
23773
|
+
!showUiDetails && showRow2Minimal && modeContentObj && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Text, { color: modeContentObj.color, children: [
|
|
23684
23774
|
"\u25CF ",
|
|
23685
23775
|
modeContentObj.text
|
|
23686
23776
|
] }) })
|
|
23687
|
-
] }) : isInteractiveShellWaiting ? /* @__PURE__ */ (0,
|
|
23777
|
+
] }) : isInteractiveShellWaiting ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { width: "100%", marginLeft: LAYOUT.INDICATOR_LEFT_MARGIN, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Text, { color: theme.status.warning, children: INTERACTIVE_SHELL_WAITING_PHRASE }) }) : /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
23688
23778
|
Box_default,
|
|
23689
23779
|
{
|
|
23690
23780
|
flexDirection: "row",
|
|
@@ -23695,7 +23785,7 @@ var StatusRow = ({
|
|
|
23695
23785
|
children: statusNode
|
|
23696
23786
|
}
|
|
23697
23787
|
) }),
|
|
23698
|
-
/* @__PURE__ */ (0,
|
|
23788
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
23699
23789
|
Box_default,
|
|
23700
23790
|
{
|
|
23701
23791
|
flexShrink: 0,
|
|
@@ -23709,8 +23799,8 @@ var StatusRow = ({
|
|
|
23709
23799
|
]
|
|
23710
23800
|
}
|
|
23711
23801
|
),
|
|
23712
|
-
showRow1 && showRow2 && (showUiDetails || showRow1Minimal && showRow2Minimal) && /* @__PURE__ */ (0,
|
|
23713
|
-
showRow2 && /* @__PURE__ */ (0,
|
|
23802
|
+
showRow1 && showRow2 && (showUiDetails || showRow1Minimal && showRow2Minimal) && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(HorizontalLine, { dim: true }) }),
|
|
23803
|
+
showRow2 && /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
23714
23804
|
Box_default,
|
|
23715
23805
|
{
|
|
23716
23806
|
width: "100%",
|
|
@@ -23718,29 +23808,29 @@ var StatusRow = ({
|
|
|
23718
23808
|
alignItems: isNarrow ? "flex-start" : "center",
|
|
23719
23809
|
justifyContent: "space-between",
|
|
23720
23810
|
children: [
|
|
23721
|
-
/* @__PURE__ */ (0,
|
|
23811
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
23722
23812
|
Box_default,
|
|
23723
23813
|
{
|
|
23724
23814
|
flexDirection: "row",
|
|
23725
23815
|
alignItems: "center",
|
|
23726
23816
|
marginLeft: LAYOUT.INDICATOR_LEFT_MARGIN,
|
|
23727
|
-
children: showUiDetails ? /* @__PURE__ */ (0,
|
|
23728
|
-
!hideUiDetailsForSuggestions && !inputState.shellModeActive && /* @__PURE__ */ (0,
|
|
23817
|
+
children: showUiDetails ? /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_jsx_runtime122.Fragment, { children: [
|
|
23818
|
+
!hideUiDetailsForSuggestions && !inputState.shellModeActive && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
23729
23819
|
ApprovalModeIndicator,
|
|
23730
23820
|
{
|
|
23731
23821
|
approvalMode: uiState.showApprovalModeIndicator,
|
|
23732
23822
|
allowPlanMode: uiState.allowPlanMode
|
|
23733
23823
|
}
|
|
23734
23824
|
),
|
|
23735
|
-
inputState.shellModeActive && /* @__PURE__ */ (0,
|
|
23736
|
-
!uiState.renderMarkdown && /* @__PURE__ */ (0,
|
|
23737
|
-
] }) : showRow2Minimal && modeContentObj && /* @__PURE__ */ (0,
|
|
23825
|
+
inputState.shellModeActive && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { marginLeft: LAYOUT.INDICATOR_LEFT_MARGIN, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(ShellModeIndicator, {}) }),
|
|
23826
|
+
!uiState.renderMarkdown && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { marginLeft: LAYOUT.INDICATOR_LEFT_MARGIN, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(RawMarkdownIndicator, {}) })
|
|
23827
|
+
] }) : showRow2Minimal && modeContentObj && /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(Text, { color: modeContentObj.color, children: [
|
|
23738
23828
|
"\u25CF ",
|
|
23739
23829
|
modeContentObj.text
|
|
23740
23830
|
] })
|
|
23741
23831
|
}
|
|
23742
23832
|
),
|
|
23743
|
-
/* @__PURE__ */ (0,
|
|
23833
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
23744
23834
|
Box_default,
|
|
23745
23835
|
{
|
|
23746
23836
|
marginTop: isNarrow ? LAYOUT.CONTEXT_DISPLAY_TOP_MARGIN_NARROW : 0,
|
|
@@ -23748,8 +23838,8 @@ var StatusRow = ({
|
|
|
23748
23838
|
alignItems: "center",
|
|
23749
23839
|
marginLeft: isNarrow ? LAYOUT.CONTEXT_DISPLAY_LEFT_MARGIN_NARROW : LAYOUT.CONTEXT_DISPLAY_LEFT_MARGIN_WIDE,
|
|
23750
23840
|
children: [
|
|
23751
|
-
(showUiDetails || showMinimalContext) && /* @__PURE__ */ (0,
|
|
23752
|
-
showMinimalContext && !showUiDetails && /* @__PURE__ */ (0,
|
|
23841
|
+
(showUiDetails || showMinimalContext) && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(StatusDisplay, { hideContextSummary }),
|
|
23842
|
+
showMinimalContext && !showUiDetails && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Box_default, { marginLeft: LAYOUT.INDICATOR_LEFT_MARGIN, children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
23753
23843
|
ContextUsageDisplay,
|
|
23754
23844
|
{
|
|
23755
23845
|
promptTokenCount: uiState.sessionStats.lastPromptTokenCount,
|
|
@@ -23767,7 +23857,7 @@ var StatusRow = ({
|
|
|
23767
23857
|
};
|
|
23768
23858
|
|
|
23769
23859
|
// packages/cli/src/ui/components/QueuedMessageDisplay.tsx
|
|
23770
|
-
var
|
|
23860
|
+
var import_jsx_runtime123 = __toESM(require_jsx_runtime(), 1);
|
|
23771
23861
|
var MAX_DISPLAYED_QUEUED_MESSAGES = 3;
|
|
23772
23862
|
var QueuedMessageDisplay = ({
|
|
23773
23863
|
messageQueue: messageQueue2
|
|
@@ -23775,13 +23865,13 @@ var QueuedMessageDisplay = ({
|
|
|
23775
23865
|
if (messageQueue2.length === 0) {
|
|
23776
23866
|
return null;
|
|
23777
23867
|
}
|
|
23778
|
-
return /* @__PURE__ */ (0,
|
|
23779
|
-
/* @__PURE__ */ (0,
|
|
23868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
23869
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Text, { dimColor: true, children: "Queued (press \u2191 to edit):" }) }),
|
|
23780
23870
|
messageQueue2.slice(0, MAX_DISPLAYED_QUEUED_MESSAGES).map((message, index) => {
|
|
23781
23871
|
const preview = message.replace(/\s+/g, " ");
|
|
23782
|
-
return /* @__PURE__ */ (0,
|
|
23872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { paddingLeft: 4, width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Text, { dimColor: true, wrap: "truncate", children: preview }) }, index);
|
|
23783
23873
|
}),
|
|
23784
|
-
messageQueue2.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ (0,
|
|
23874
|
+
messageQueue2.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Box_default, { paddingLeft: 4, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(Text, { dimColor: true, children: [
|
|
23785
23875
|
"... (+",
|
|
23786
23876
|
messageQueue2.length - MAX_DISPLAYED_QUEUED_MESSAGES,
|
|
23787
23877
|
" more)"
|
|
@@ -23791,7 +23881,7 @@ var QueuedMessageDisplay = ({
|
|
|
23791
23881
|
|
|
23792
23882
|
// packages/cli/src/ui/components/ConfigInitDisplay.tsx
|
|
23793
23883
|
var import_react86 = __toESM(require_react(), 1);
|
|
23794
|
-
var
|
|
23884
|
+
var import_jsx_runtime124 = __toESM(require_jsx_runtime(), 1);
|
|
23795
23885
|
var ConfigInitDisplay = ({
|
|
23796
23886
|
message: initialMessage = "Working..."
|
|
23797
23887
|
}) => {
|
|
@@ -23832,10 +23922,10 @@ var ConfigInitDisplay = ({
|
|
|
23832
23922
|
coreEvents.off(CoreEvent.McpClientUpdate, onChange);
|
|
23833
23923
|
};
|
|
23834
23924
|
}, [initialMessage]);
|
|
23835
|
-
return /* @__PURE__ */ (0,
|
|
23836
|
-
/* @__PURE__ */ (0,
|
|
23925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(Text, { children: [
|
|
23926
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(GeminiSpinner, {}),
|
|
23837
23927
|
" ",
|
|
23838
|
-
/* @__PURE__ */ (0,
|
|
23928
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Text, { color: theme.text.primary, children: message })
|
|
23839
23929
|
] }) });
|
|
23840
23930
|
};
|
|
23841
23931
|
|
|
@@ -23846,21 +23936,21 @@ var import_react88 = __toESM(require_react(), 1);
|
|
|
23846
23936
|
var import_react87 = __toESM(require_react(), 1);
|
|
23847
23937
|
|
|
23848
23938
|
// packages/cli/src/ui/components/ChecklistItem.tsx
|
|
23849
|
-
var
|
|
23939
|
+
var import_jsx_runtime125 = __toESM(require_jsx_runtime(), 1);
|
|
23850
23940
|
var ChecklistStatusDisplay = ({
|
|
23851
23941
|
status
|
|
23852
23942
|
}) => {
|
|
23853
23943
|
switch (status) {
|
|
23854
23944
|
case "completed":
|
|
23855
|
-
return /* @__PURE__ */ (0,
|
|
23945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Text, { color: theme.status.success, "aria-label": "Completed", children: "\u2713" });
|
|
23856
23946
|
case "in_progress":
|
|
23857
|
-
return /* @__PURE__ */ (0,
|
|
23947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Text, { color: theme.text.accent, "aria-label": "In Progress", children: "\xBB" });
|
|
23858
23948
|
case "pending":
|
|
23859
|
-
return /* @__PURE__ */ (0,
|
|
23949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Text, { color: theme.text.secondary, "aria-label": "Pending", children: "\u2610" });
|
|
23860
23950
|
case "cancelled":
|
|
23861
|
-
return /* @__PURE__ */ (0,
|
|
23951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Text, { color: theme.status.error, "aria-label": "Cancelled", children: "\u2717" });
|
|
23862
23952
|
case "blocked":
|
|
23863
|
-
return /* @__PURE__ */ (0,
|
|
23953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Text, { color: theme.status.warning, "aria-label": "Blocked", children: "\u26D4" });
|
|
23864
23954
|
default:
|
|
23865
23955
|
checkExhaustive(status);
|
|
23866
23956
|
}
|
|
@@ -23885,14 +23975,14 @@ var ChecklistItem = ({
|
|
|
23885
23975
|
}
|
|
23886
23976
|
})();
|
|
23887
23977
|
const strikethrough = item.status === "cancelled";
|
|
23888
|
-
return /* @__PURE__ */ (0,
|
|
23889
|
-
/* @__PURE__ */ (0,
|
|
23890
|
-
/* @__PURE__ */ (0,
|
|
23978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(Box_default, { flexDirection: "row", columnGap: 1, "aria-role": ariaRole, children: [
|
|
23979
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ChecklistStatusDisplay, { status: item.status }),
|
|
23980
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Box_default, { flexShrink: 1, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Text, { color: textColor, wrap, strikethrough, children: item.label }) })
|
|
23891
23981
|
] });
|
|
23892
23982
|
};
|
|
23893
23983
|
|
|
23894
23984
|
// packages/cli/src/ui/components/Checklist.tsx
|
|
23895
|
-
var
|
|
23985
|
+
var import_jsx_runtime126 = __toESM(require_jsx_runtime(), 1);
|
|
23896
23986
|
var ChecklistTitleDisplay = ({ title, items, toggleHint }) => {
|
|
23897
23987
|
const score = (0, import_react87.useMemo)(() => {
|
|
23898
23988
|
let total = 0;
|
|
@@ -23907,9 +23997,9 @@ var ChecklistTitleDisplay = ({ title, items, toggleHint }) => {
|
|
|
23907
23997
|
}
|
|
23908
23998
|
return `${completed}/${total} completed`;
|
|
23909
23999
|
}, [items]);
|
|
23910
|
-
return /* @__PURE__ */ (0,
|
|
23911
|
-
/* @__PURE__ */ (0,
|
|
23912
|
-
/* @__PURE__ */ (0,
|
|
24000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(Box_default, { flexDirection: "row", columnGap: 2, height: 1, children: [
|
|
24001
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Text, { color: theme.text.primary, bold: true, "aria-label": `${title} list`, children: title }),
|
|
24002
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
23913
24003
|
score,
|
|
23914
24004
|
toggleHint ? ` (${toggleHint})` : ""
|
|
23915
24005
|
] })
|
|
@@ -23917,7 +24007,7 @@ var ChecklistTitleDisplay = ({ title, items, toggleHint }) => {
|
|
|
23917
24007
|
};
|
|
23918
24008
|
var ChecklistListDisplay = ({
|
|
23919
24009
|
items
|
|
23920
|
-
}) => /* @__PURE__ */ (0,
|
|
24010
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Box_default, { flexDirection: "column", "aria-role": "list", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
23921
24011
|
ChecklistItem,
|
|
23922
24012
|
{
|
|
23923
24013
|
item,
|
|
@@ -23944,7 +24034,7 @@ var Checklist = ({
|
|
|
23944
24034
|
if (items.length === 0 || !isExpanded && !hasActiveItems) {
|
|
23945
24035
|
return null;
|
|
23946
24036
|
}
|
|
23947
|
-
return /* @__PURE__ */ (0,
|
|
24037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
23948
24038
|
Box_default,
|
|
23949
24039
|
{
|
|
23950
24040
|
borderStyle: "single",
|
|
@@ -23954,8 +24044,8 @@ var Checklist = ({
|
|
|
23954
24044
|
borderColor: theme.border.default,
|
|
23955
24045
|
paddingLeft: 1,
|
|
23956
24046
|
paddingRight: 1,
|
|
23957
|
-
children: isExpanded ? /* @__PURE__ */ (0,
|
|
23958
|
-
/* @__PURE__ */ (0,
|
|
24047
|
+
children: isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(Box_default, { flexDirection: "column", rowGap: 1, children: [
|
|
24048
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
23959
24049
|
ChecklistTitleDisplay,
|
|
23960
24050
|
{
|
|
23961
24051
|
title,
|
|
@@ -23963,9 +24053,9 @@ var Checklist = ({
|
|
|
23963
24053
|
toggleHint
|
|
23964
24054
|
}
|
|
23965
24055
|
),
|
|
23966
|
-
/* @__PURE__ */ (0,
|
|
23967
|
-
] }) : /* @__PURE__ */ (0,
|
|
23968
|
-
/* @__PURE__ */ (0,
|
|
24056
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ChecklistListDisplay, { items })
|
|
24057
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(Box_default, { flexDirection: "row", columnGap: 1, height: 1, children: [
|
|
24058
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Box_default, { flexShrink: 0, flexGrow: 0, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
23969
24059
|
ChecklistTitleDisplay,
|
|
23970
24060
|
{
|
|
23971
24061
|
title,
|
|
@@ -23973,14 +24063,14 @@ var Checklist = ({
|
|
|
23973
24063
|
toggleHint
|
|
23974
24064
|
}
|
|
23975
24065
|
) }),
|
|
23976
|
-
inProgress && /* @__PURE__ */ (0,
|
|
24066
|
+
inProgress && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Box_default, { flexShrink: 1, flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ChecklistItem, { item: inProgress, wrap: "truncate" }) })
|
|
23977
24067
|
] })
|
|
23978
24068
|
}
|
|
23979
24069
|
);
|
|
23980
24070
|
};
|
|
23981
24071
|
|
|
23982
24072
|
// packages/cli/src/ui/components/messages/Todo.tsx
|
|
23983
|
-
var
|
|
24073
|
+
var import_jsx_runtime127 = __toESM(require_jsx_runtime(), 1);
|
|
23984
24074
|
var TodoTray = () => {
|
|
23985
24075
|
const uiState = useUIState();
|
|
23986
24076
|
const todos = (0, import_react88.useMemo)(() => {
|
|
@@ -24011,7 +24101,7 @@ var TodoTray = () => {
|
|
|
24011
24101
|
if (!todos || !todos.todos) {
|
|
24012
24102
|
return null;
|
|
24013
24103
|
}
|
|
24014
|
-
return /* @__PURE__ */ (0,
|
|
24104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
24015
24105
|
Checklist,
|
|
24016
24106
|
{
|
|
24017
24107
|
title: "Todo",
|
|
@@ -24023,7 +24113,7 @@ var TodoTray = () => {
|
|
|
24023
24113
|
};
|
|
24024
24114
|
|
|
24025
24115
|
// packages/cli/src/ui/components/Composer.tsx
|
|
24026
|
-
var
|
|
24116
|
+
var import_jsx_runtime128 = __toESM(require_jsx_runtime(), 1);
|
|
24027
24117
|
var Composer = ({ isFocused = true }) => {
|
|
24028
24118
|
const uiState = useUIState();
|
|
24029
24119
|
const inputState = useInputState();
|
|
@@ -24064,7 +24154,7 @@ var Composer = ({ isFocused = true }) => {
|
|
|
24064
24154
|
const showToast = shouldShowToast(uiState, inputState);
|
|
24065
24155
|
const hideUiDetailsForSuggestions = suggestionsVisible && suggestionsPosition === "above";
|
|
24066
24156
|
const showMinimalToast = showToast;
|
|
24067
|
-
return /* @__PURE__ */ (0,
|
|
24157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
24068
24158
|
Box_default,
|
|
24069
24159
|
{
|
|
24070
24160
|
flexDirection: "column",
|
|
@@ -24072,12 +24162,12 @@ var Composer = ({ isFocused = true }) => {
|
|
|
24072
24162
|
flexGrow: 0,
|
|
24073
24163
|
flexShrink: 0,
|
|
24074
24164
|
children: [
|
|
24075
|
-
uiState.isResuming && /* @__PURE__ */ (0,
|
|
24076
|
-
showUiDetails && /* @__PURE__ */ (0,
|
|
24077
|
-
showUiDetails && /* @__PURE__ */ (0,
|
|
24078
|
-
showShortcutsHelp && /* @__PURE__ */ (0,
|
|
24079
|
-
(showUiDetails || showMinimalToast) && /* @__PURE__ */ (0,
|
|
24080
|
-
/* @__PURE__ */ (0,
|
|
24165
|
+
uiState.isResuming && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(ConfigInitDisplay, { message: "Resuming session..." }),
|
|
24166
|
+
showUiDetails && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(QueuedMessageDisplay, { messageQueue: uiState.messageQueue }),
|
|
24167
|
+
showUiDetails && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(TodoTray, {}),
|
|
24168
|
+
showShortcutsHelp && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(ShortcutsHelp, {}),
|
|
24169
|
+
(showUiDetails || showMinimalToast) && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Box_default, { minHeight: 1, marginLeft: isNarrow ? 0 : 1, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(ToastDisplay, {}) }),
|
|
24170
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Box_default, { width: "100%", flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
24081
24171
|
StatusRow,
|
|
24082
24172
|
{
|
|
24083
24173
|
showUiDetails,
|
|
@@ -24088,8 +24178,8 @@ var Composer = ({ isFocused = true }) => {
|
|
|
24088
24178
|
hasPendingActionRequired
|
|
24089
24179
|
}
|
|
24090
24180
|
) }),
|
|
24091
|
-
showUiDetails && uiState.showErrorDetails && /* @__PURE__ */ (0,
|
|
24092
|
-
/* @__PURE__ */ (0,
|
|
24181
|
+
showUiDetails && uiState.showErrorDetails && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(OverflowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
24182
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
24093
24183
|
DetailedMessagesDisplay,
|
|
24094
24184
|
{
|
|
24095
24185
|
maxHeight: uiState.constrainHeight ? debugConsoleMaxHeight : void 0,
|
|
@@ -24097,9 +24187,9 @@ var Composer = ({ isFocused = true }) => {
|
|
|
24097
24187
|
hasFocus: uiState.showErrorDetails
|
|
24098
24188
|
}
|
|
24099
24189
|
),
|
|
24100
|
-
/* @__PURE__ */ (0,
|
|
24190
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(ShowMoreLines, { constrainHeight: uiState.constrainHeight })
|
|
24101
24191
|
] }) }),
|
|
24102
|
-
uiState.isInputActive && /* @__PURE__ */ (0,
|
|
24192
|
+
uiState.isInputActive && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
24103
24193
|
InputPrompt,
|
|
24104
24194
|
{
|
|
24105
24195
|
onSubmit: uiActions.handleFinalSubmit,
|
|
@@ -24123,19 +24213,19 @@ var Composer = ({ isFocused = true }) => {
|
|
|
24123
24213
|
onSuggestionsVisibilityChange: setSuggestionsVisible
|
|
24124
24214
|
}
|
|
24125
24215
|
),
|
|
24126
|
-
showUiDetails && !settings.merged.ui.hideFooter && !isScreenReaderEnabled && /* @__PURE__ */ (0,
|
|
24216
|
+
showUiDetails && !settings.merged.ui.hideFooter && !isScreenReaderEnabled && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Footer, {})
|
|
24127
24217
|
]
|
|
24128
24218
|
}
|
|
24129
24219
|
);
|
|
24130
24220
|
};
|
|
24131
24221
|
|
|
24132
24222
|
// packages/cli/src/ui/components/ExitWarning.tsx
|
|
24133
|
-
var
|
|
24223
|
+
var import_jsx_runtime129 = __toESM(require_jsx_runtime(), 1);
|
|
24134
24224
|
var ExitWarning = () => {
|
|
24135
24225
|
const uiState = useUIState();
|
|
24136
|
-
return /* @__PURE__ */ (0,
|
|
24137
|
-
uiState.dialogsVisible && uiState.ctrlCPressedOnce && /* @__PURE__ */ (0,
|
|
24138
|
-
uiState.dialogsVisible && uiState.ctrlDPressedOnce && /* @__PURE__ */ (0,
|
|
24226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(import_jsx_runtime129.Fragment, { children: [
|
|
24227
|
+
uiState.dialogsVisible && uiState.ctrlCPressedOnce && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Text, { color: theme.status.warning, children: "Press Ctrl+C again to exit." }) }),
|
|
24228
|
+
uiState.dialogsVisible && uiState.ctrlDPressedOnce && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Text, { color: theme.status.warning, children: "Press Ctrl+D again to exit." }) })
|
|
24139
24229
|
] });
|
|
24140
24230
|
};
|
|
24141
24231
|
|
|
@@ -24159,12 +24249,12 @@ function useFlickerDetector(rootUiRef, terminalHeight) {
|
|
|
24159
24249
|
}
|
|
24160
24250
|
|
|
24161
24251
|
// packages/cli/src/ui/layouts/ScreenReaderAppLayout.tsx
|
|
24162
|
-
var
|
|
24252
|
+
var import_jsx_runtime130 = __toESM(require_jsx_runtime(), 1);
|
|
24163
24253
|
var ScreenReaderAppLayout = () => {
|
|
24164
24254
|
const uiState = useUIState();
|
|
24165
24255
|
const { rootUiRef, terminalHeight } = uiState;
|
|
24166
24256
|
useFlickerDetector(rootUiRef, terminalHeight);
|
|
24167
|
-
return /* @__PURE__ */ (0,
|
|
24257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
24168
24258
|
Box_default,
|
|
24169
24259
|
{
|
|
24170
24260
|
flexDirection: "column",
|
|
@@ -24172,27 +24262,27 @@ var ScreenReaderAppLayout = () => {
|
|
|
24172
24262
|
height: "100%",
|
|
24173
24263
|
ref: uiState.rootUiRef,
|
|
24174
24264
|
children: [
|
|
24175
|
-
/* @__PURE__ */ (0,
|
|
24176
|
-
/* @__PURE__ */ (0,
|
|
24177
|
-
/* @__PURE__ */ (0,
|
|
24178
|
-
uiState.dialogsVisible ? /* @__PURE__ */ (0,
|
|
24265
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Notifications, {}),
|
|
24266
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Footer, {}),
|
|
24267
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Box_default, { flexGrow: 1, overflow: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(MainContent, {}) }),
|
|
24268
|
+
uiState.dialogsVisible ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
24179
24269
|
DialogManager,
|
|
24180
24270
|
{
|
|
24181
24271
|
terminalWidth: uiState.terminalWidth,
|
|
24182
24272
|
addItem: uiState.historyManager.addItem
|
|
24183
24273
|
}
|
|
24184
|
-
) : /* @__PURE__ */ (0,
|
|
24185
|
-
/* @__PURE__ */ (0,
|
|
24274
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Composer, {}),
|
|
24275
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ExitWarning, {})
|
|
24186
24276
|
]
|
|
24187
24277
|
}
|
|
24188
24278
|
);
|
|
24189
24279
|
};
|
|
24190
24280
|
|
|
24191
24281
|
// packages/cli/src/ui/components/CopyModeWarning.tsx
|
|
24192
|
-
var
|
|
24282
|
+
var import_jsx_runtime131 = __toESM(require_jsx_runtime(), 1);
|
|
24193
24283
|
var CopyModeWarning = () => {
|
|
24194
24284
|
const { copyModeEnabled } = useInputState();
|
|
24195
|
-
return /* @__PURE__ */ (0,
|
|
24285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Box_default, { height: 1, children: copyModeEnabled && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Text, { color: theme.status.warning, children: "In Copy Mode. Use Page Up/Down to scroll. Press Ctrl+S or any other key to exit." }) });
|
|
24196
24286
|
};
|
|
24197
24287
|
|
|
24198
24288
|
// packages/cli/src/ui/components/BackgroundTaskDisplay.tsx
|
|
@@ -24817,7 +24907,7 @@ ${mainContent}`;
|
|
|
24817
24907
|
};
|
|
24818
24908
|
|
|
24819
24909
|
// packages/cli/src/ui/components/BackgroundTaskDisplay.tsx
|
|
24820
|
-
var
|
|
24910
|
+
var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
|
|
24821
24911
|
var CONTENT_PADDING_X = 1;
|
|
24822
24912
|
var BORDER_WIDTH = 2;
|
|
24823
24913
|
var MAIN_BORDER_HEIGHT = 2;
|
|
@@ -24950,11 +25040,11 @@ var BackgroundTaskDisplay = ({
|
|
|
24950
25040
|
{ label: "List", command: "background.toggleList" /* TOGGLE_BACKGROUND_SHELL_LIST */ }
|
|
24951
25041
|
];
|
|
24952
25042
|
const helpTextStr = helpTextParts.map((p) => `${p.label} (${formatCommand(p.command)})`).join(" | ");
|
|
24953
|
-
const renderHelpText = () => /* @__PURE__ */ (0,
|
|
25043
|
+
const renderHelpText = () => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Text, { children: helpTextParts.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Text, { children: [
|
|
24954
25044
|
i > 0 ? " | " : "",
|
|
24955
25045
|
p.label,
|
|
24956
25046
|
" (",
|
|
24957
|
-
/* @__PURE__ */ (0,
|
|
25047
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Text, { color: theme.text.accent, children: formatCommand(p.command) }),
|
|
24958
25048
|
")"
|
|
24959
25049
|
] }, p.label)) });
|
|
24960
25050
|
const renderTabs = () => {
|
|
@@ -24985,7 +25075,7 @@ var BackgroundTaskDisplay = ({
|
|
|
24985
25075
|
}
|
|
24986
25076
|
const isActive = shell.pid === activePid;
|
|
24987
25077
|
tabs.push(
|
|
24988
|
-
/* @__PURE__ */ (0,
|
|
25078
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
24989
25079
|
Text,
|
|
24990
25080
|
{
|
|
24991
25081
|
color: isActive ? theme.text.primary : theme.text.secondary,
|
|
@@ -25003,7 +25093,7 @@ var BackgroundTaskDisplay = ({
|
|
|
25003
25093
|
const shouldShowOverflow = tabs.length > 1 || availableWidth - currentWidth >= overflowWidth;
|
|
25004
25094
|
if (shouldShowOverflow) {
|
|
25005
25095
|
tabs.push(
|
|
25006
|
-
/* @__PURE__ */ (0,
|
|
25096
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Text, { color: theme.status.warning, bold: true, children: overflowLabel }, "overflow")
|
|
25007
25097
|
);
|
|
25008
25098
|
}
|
|
25009
25099
|
}
|
|
@@ -25032,9 +25122,9 @@ var BackgroundTaskDisplay = ({
|
|
|
25032
25122
|
};
|
|
25033
25123
|
});
|
|
25034
25124
|
const initialIndex = items.findIndex((item) => item.value === activePid);
|
|
25035
|
-
return /* @__PURE__ */ (0,
|
|
25036
|
-
/* @__PURE__ */ (0,
|
|
25037
|
-
/* @__PURE__ */ (0,
|
|
25125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Box_default, { flexDirection: "column", height: "100%", width: "100%", children: [
|
|
25126
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Box_default, { flexShrink: 0, marginBottom: 1, paddingTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Text, { bold: true, children: `Select Process (${formatCommand("background.select" /* BACKGROUND_SHELL_SELECT */)} to select, ${formatCommand("background.kill" /* KILL_BACKGROUND_SHELL */)} to kill, ${formatCommand("background.escape" /* BACKGROUND_SHELL_ESCAPE */)} to cancel):` }) }),
|
|
25127
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Box_default, { flexGrow: 1, width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
25038
25128
|
RadioButtonSelect,
|
|
25039
25129
|
{
|
|
25040
25130
|
items,
|
|
@@ -25051,17 +25141,17 @@ var BackgroundTaskDisplay = ({
|
|
|
25051
25141
|
),
|
|
25052
25142
|
renderItem: (item, { isSelected: _isSelected, titleColor: _titleColor }) => {
|
|
25053
25143
|
const shell = shells.get(item.value);
|
|
25054
|
-
if (!shell) return /* @__PURE__ */ (0,
|
|
25144
|
+
if (!shell) return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Text, { children: item.label });
|
|
25055
25145
|
const truncatedCommand = formatShellCommandForDisplay(
|
|
25056
25146
|
shell.command,
|
|
25057
25147
|
maxCommandLength
|
|
25058
25148
|
);
|
|
25059
|
-
return /* @__PURE__ */ (0,
|
|
25149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Text, { children: [
|
|
25060
25150
|
truncatedCommand,
|
|
25061
25151
|
" (PID: ",
|
|
25062
25152
|
shell.pid,
|
|
25063
25153
|
")",
|
|
25064
|
-
shell.status === "exited" ? /* @__PURE__ */ (0,
|
|
25154
|
+
shell.status === "exited" ? /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
25065
25155
|
Text,
|
|
25066
25156
|
{
|
|
25067
25157
|
color: shell.exitCode === 0 ? theme.status.success : theme.status.error,
|
|
@@ -25087,23 +25177,23 @@ var BackgroundTaskDisplay = ({
|
|
|
25087
25177
|
tildeifyPath(logPath),
|
|
25088
25178
|
width - LOG_PATH_OVERHEAD
|
|
25089
25179
|
);
|
|
25090
|
-
return /* @__PURE__ */ (0,
|
|
25180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
25091
25181
|
"Log: ",
|
|
25092
25182
|
displayPath
|
|
25093
25183
|
] }) });
|
|
25094
25184
|
};
|
|
25095
25185
|
const renderOutput = () => {
|
|
25096
25186
|
const lines = typeof output === "string" ? output.split("\n") : output;
|
|
25097
|
-
return /* @__PURE__ */ (0,
|
|
25187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
25098
25188
|
ScrollableListWithForwardRef,
|
|
25099
25189
|
{
|
|
25100
25190
|
ref: outputRef,
|
|
25101
25191
|
data: lines,
|
|
25102
25192
|
renderItem: ({ item: line, index }) => {
|
|
25103
25193
|
if (typeof line === "string") {
|
|
25104
|
-
return /* @__PURE__ */ (0,
|
|
25194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Text, { children: line }, index);
|
|
25105
25195
|
}
|
|
25106
|
-
return /* @__PURE__ */ (0,
|
|
25196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Text, { wrap: "truncate", children: line.length > 0 ? line.map((token, tokenIndex) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
25107
25197
|
Text,
|
|
25108
25198
|
{
|
|
25109
25199
|
color: token.fg,
|
|
@@ -25125,7 +25215,7 @@ var BackgroundTaskDisplay = ({
|
|
|
25125
25215
|
}
|
|
25126
25216
|
);
|
|
25127
25217
|
};
|
|
25128
|
-
return /* @__PURE__ */ (0,
|
|
25218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
25129
25219
|
Box_default,
|
|
25130
25220
|
{
|
|
25131
25221
|
flexDirection: "column",
|
|
@@ -25134,7 +25224,7 @@ var BackgroundTaskDisplay = ({
|
|
|
25134
25224
|
borderStyle: "single",
|
|
25135
25225
|
borderColor: isFocused ? theme.ui.focus : void 0,
|
|
25136
25226
|
children: [
|
|
25137
|
-
/* @__PURE__ */ (0,
|
|
25227
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
25138
25228
|
Box_default,
|
|
25139
25229
|
{
|
|
25140
25230
|
flexDirection: "row",
|
|
@@ -25147,9 +25237,9 @@ var BackgroundTaskDisplay = ({
|
|
|
25147
25237
|
paddingX: 1,
|
|
25148
25238
|
borderColor: isFocused ? theme.ui.focus : void 0,
|
|
25149
25239
|
children: [
|
|
25150
|
-
/* @__PURE__ */ (0,
|
|
25240
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
25151
25241
|
renderTabs(),
|
|
25152
|
-
/* @__PURE__ */ (0,
|
|
25242
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Text, { bold: true, children: [
|
|
25153
25243
|
" ",
|
|
25154
25244
|
"(PID: ",
|
|
25155
25245
|
activeShell?.pid,
|
|
@@ -25161,7 +25251,7 @@ var BackgroundTaskDisplay = ({
|
|
|
25161
25251
|
]
|
|
25162
25252
|
}
|
|
25163
25253
|
),
|
|
25164
|
-
/* @__PURE__ */ (0,
|
|
25254
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Box_default, { flexGrow: 1, overflow: "hidden", paddingX: CONTENT_PADDING_X, children: isListOpenProp ? renderProcessList() : renderOutput() }),
|
|
25165
25255
|
renderFooter()
|
|
25166
25256
|
]
|
|
25167
25257
|
}
|
|
@@ -25169,14 +25259,14 @@ var BackgroundTaskDisplay = ({
|
|
|
25169
25259
|
};
|
|
25170
25260
|
|
|
25171
25261
|
// packages/cli/src/ui/layouts/DefaultAppLayout.tsx
|
|
25172
|
-
var
|
|
25262
|
+
var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
|
|
25173
25263
|
var DefaultAppLayout = () => {
|
|
25174
25264
|
const uiState = useUIState();
|
|
25175
25265
|
const { copyModeEnabled } = useInputState();
|
|
25176
25266
|
const isAlternateBuffer = useAlternateBuffer();
|
|
25177
25267
|
const { rootUiRef, terminalHeight } = uiState;
|
|
25178
25268
|
useFlickerDetector(rootUiRef, terminalHeight);
|
|
25179
|
-
return /* @__PURE__ */ (0,
|
|
25269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
25180
25270
|
Box_default,
|
|
25181
25271
|
{
|
|
25182
25272
|
flexDirection: "column",
|
|
@@ -25187,8 +25277,8 @@ var DefaultAppLayout = () => {
|
|
|
25187
25277
|
flexGrow: 0,
|
|
25188
25278
|
ref: uiState.rootUiRef,
|
|
25189
25279
|
children: [
|
|
25190
|
-
/* @__PURE__ */ (0,
|
|
25191
|
-
uiState.isBackgroundTaskVisible && uiState.backgroundTasks.size > 0 && uiState.activeBackgroundTaskPid && uiState.backgroundTaskHeight > 0 && uiState.streamingState !== "waiting_for_confirmation" /* WaitingForConfirmation */ && /* @__PURE__ */ (0,
|
|
25280
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(MainContent, {}),
|
|
25281
|
+
uiState.isBackgroundTaskVisible && uiState.backgroundTasks.size > 0 && uiState.activeBackgroundTaskPid && uiState.backgroundTaskHeight > 0 && uiState.streamingState !== "waiting_for_confirmation" /* WaitingForConfirmation */ && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Box_default, { height: uiState.backgroundTaskHeight, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
25192
25282
|
BackgroundTaskDisplay,
|
|
25193
25283
|
{
|
|
25194
25284
|
shells: uiState.backgroundTasks,
|
|
@@ -25199,7 +25289,7 @@ var DefaultAppLayout = () => {
|
|
|
25199
25289
|
isListOpenProp: uiState.isBackgroundTaskListOpen
|
|
25200
25290
|
}
|
|
25201
25291
|
) }),
|
|
25202
|
-
/* @__PURE__ */ (0,
|
|
25292
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
25203
25293
|
Box_default,
|
|
25204
25294
|
{
|
|
25205
25295
|
flexDirection: "column",
|
|
@@ -25209,16 +25299,16 @@ var DefaultAppLayout = () => {
|
|
|
25209
25299
|
width: uiState.terminalWidth,
|
|
25210
25300
|
height: copyModeEnabled ? uiState.stableControlsHeight : void 0,
|
|
25211
25301
|
children: [
|
|
25212
|
-
/* @__PURE__ */ (0,
|
|
25213
|
-
/* @__PURE__ */ (0,
|
|
25214
|
-
uiState.customDialog ? uiState.customDialog : uiState.dialogsVisible ? /* @__PURE__ */ (0,
|
|
25302
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Notifications, {}),
|
|
25303
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(CopyModeWarning, {}),
|
|
25304
|
+
uiState.customDialog ? uiState.customDialog : uiState.dialogsVisible ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
25215
25305
|
DialogManager,
|
|
25216
25306
|
{
|
|
25217
25307
|
terminalWidth: uiState.terminalWidth,
|
|
25218
25308
|
addItem: uiState.historyManager.addItem
|
|
25219
25309
|
}
|
|
25220
|
-
) : /* @__PURE__ */ (0,
|
|
25221
|
-
/* @__PURE__ */ (0,
|
|
25310
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Composer, { isFocused: true }),
|
|
25311
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(ExitWarning, {})
|
|
25222
25312
|
]
|
|
25223
25313
|
}
|
|
25224
25314
|
)
|
|
@@ -25228,13 +25318,13 @@ var DefaultAppLayout = () => {
|
|
|
25228
25318
|
};
|
|
25229
25319
|
|
|
25230
25320
|
// packages/cli/src/ui/components/AlternateBufferQuittingDisplay.tsx
|
|
25231
|
-
var
|
|
25321
|
+
var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
|
|
25232
25322
|
var AlternateBufferQuittingDisplay = () => {
|
|
25233
25323
|
const { version } = useAppContext();
|
|
25234
25324
|
const uiState = useUIState();
|
|
25235
25325
|
const confirmingTool = useConfirmingTool();
|
|
25236
25326
|
const showPromptedTool = confirmingTool !== null;
|
|
25237
|
-
return /* @__PURE__ */ (0,
|
|
25327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
25238
25328
|
Box_default,
|
|
25239
25329
|
{
|
|
25240
25330
|
flexDirection: "column",
|
|
@@ -25242,8 +25332,8 @@ var AlternateBufferQuittingDisplay = () => {
|
|
|
25242
25332
|
flexGrow: 0,
|
|
25243
25333
|
width: uiState.terminalWidth,
|
|
25244
25334
|
children: [
|
|
25245
|
-
/* @__PURE__ */ (0,
|
|
25246
|
-
uiState.history.map((h) => /* @__PURE__ */ (0,
|
|
25335
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(AppHeader, { version }, "app-header"),
|
|
25336
|
+
uiState.history.map((h) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
25247
25337
|
HistoryItemDisplay,
|
|
25248
25338
|
{
|
|
25249
25339
|
terminalWidth: uiState.mainAreaWidth,
|
|
@@ -25255,7 +25345,7 @@ var AlternateBufferQuittingDisplay = () => {
|
|
|
25255
25345
|
},
|
|
25256
25346
|
h.id
|
|
25257
25347
|
)),
|
|
25258
|
-
uiState.pendingHistoryItems.map((item, i) => /* @__PURE__ */ (0,
|
|
25348
|
+
uiState.pendingHistoryItems.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
25259
25349
|
HistoryItemDisplay,
|
|
25260
25350
|
{
|
|
25261
25351
|
availableTerminalHeight: void 0,
|
|
@@ -25265,17 +25355,17 @@ var AlternateBufferQuittingDisplay = () => {
|
|
|
25265
25355
|
},
|
|
25266
25356
|
i
|
|
25267
25357
|
)),
|
|
25268
|
-
showPromptedTool && /* @__PURE__ */ (0,
|
|
25269
|
-
/* @__PURE__ */ (0,
|
|
25270
|
-
/* @__PURE__ */ (0,
|
|
25271
|
-
/* @__PURE__ */ (0,
|
|
25358
|
+
showPromptedTool && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, marginBottom: 1, children: [
|
|
25359
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Text, { color: theme.status.warning, bold: true, children: "Action Required (was prompted):" }),
|
|
25360
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(Box_default, { marginTop: 1, children: [
|
|
25361
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
25272
25362
|
ToolStatusIndicator,
|
|
25273
25363
|
{
|
|
25274
25364
|
status: confirmingTool.tool.status,
|
|
25275
25365
|
name: confirmingTool.tool.name
|
|
25276
25366
|
}
|
|
25277
25367
|
),
|
|
25278
|
-
/* @__PURE__ */ (0,
|
|
25368
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
25279
25369
|
ToolInfo,
|
|
25280
25370
|
{
|
|
25281
25371
|
name: confirmingTool.tool.name,
|
|
@@ -25286,26 +25376,26 @@ var AlternateBufferQuittingDisplay = () => {
|
|
|
25286
25376
|
)
|
|
25287
25377
|
] })
|
|
25288
25378
|
] }),
|
|
25289
|
-
/* @__PURE__ */ (0,
|
|
25379
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(QuittingDisplay, {})
|
|
25290
25380
|
]
|
|
25291
25381
|
}
|
|
25292
25382
|
);
|
|
25293
25383
|
};
|
|
25294
25384
|
|
|
25295
25385
|
// packages/cli/src/ui/App.tsx
|
|
25296
|
-
var
|
|
25386
|
+
var import_jsx_runtime135 = __toESM(require_jsx_runtime(), 1);
|
|
25297
25387
|
var App = () => {
|
|
25298
25388
|
const uiState = useUIState();
|
|
25299
25389
|
const isAlternateBuffer = useAlternateBuffer();
|
|
25300
25390
|
const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
|
|
25301
25391
|
if (uiState.quittingMessages) {
|
|
25302
25392
|
if (isAlternateBuffer) {
|
|
25303
|
-
return /* @__PURE__ */ (0,
|
|
25393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(StreamingContext.Provider, { value: uiState.streamingState, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(AlternateBufferQuittingDisplay, {}) });
|
|
25304
25394
|
} else {
|
|
25305
|
-
return /* @__PURE__ */ (0,
|
|
25395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(QuittingDisplay, {});
|
|
25306
25396
|
}
|
|
25307
25397
|
}
|
|
25308
|
-
return /* @__PURE__ */ (0,
|
|
25398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(StreamingContext.Provider, { value: uiState.streamingState, children: isScreenReaderEnabled ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ScreenReaderAppLayout, {}) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DefaultAppLayout, {}) });
|
|
25309
25399
|
};
|
|
25310
25400
|
|
|
25311
25401
|
// packages/cli/src/ui/AppContainer.tsx
|
|
@@ -25341,7 +25431,7 @@ import process7 from "node:process";
|
|
|
25341
25431
|
|
|
25342
25432
|
// packages/cli/src/ui/contexts/TerminalContext.tsx
|
|
25343
25433
|
var import_react94 = __toESM(require_react(), 1);
|
|
25344
|
-
var
|
|
25434
|
+
var import_jsx_runtime136 = __toESM(require_jsx_runtime(), 1);
|
|
25345
25435
|
var TerminalContext = (0, import_react94.createContext)(
|
|
25346
25436
|
void 0
|
|
25347
25437
|
);
|
|
@@ -25411,7 +25501,7 @@ function TerminalProvider({ children }) {
|
|
|
25411
25501
|
stdin.removeListener("data", handleData);
|
|
25412
25502
|
};
|
|
25413
25503
|
}, [stdin, subscribers]);
|
|
25414
|
-
return /* @__PURE__ */ (0,
|
|
25504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
25415
25505
|
TerminalContext.Provider,
|
|
25416
25506
|
{
|
|
25417
25507
|
value: { subscribe: subscribe2, unsubscribe, queryTerminalBackground },
|
|
@@ -26036,7 +26126,7 @@ var SkillCommandLoader = class {
|
|
|
26036
26126
|
};
|
|
26037
26127
|
|
|
26038
26128
|
// packages/cli/src/ui/components/LogoutConfirmationDialog.tsx
|
|
26039
|
-
var
|
|
26129
|
+
var import_jsx_runtime137 = __toESM(require_jsx_runtime(), 1);
|
|
26040
26130
|
var LogoutConfirmationDialog = ({ onSelect }) => {
|
|
26041
26131
|
useKeypress(
|
|
26042
26132
|
(key) => {
|
|
@@ -26060,7 +26150,7 @@ var LogoutConfirmationDialog = ({ onSelect }) => {
|
|
|
26060
26150
|
key: "exit"
|
|
26061
26151
|
}
|
|
26062
26152
|
];
|
|
26063
|
-
return /* @__PURE__ */ (0,
|
|
26153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Box_default, { flexDirection: "row", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
|
|
26064
26154
|
Box_default,
|
|
26065
26155
|
{
|
|
26066
26156
|
flexDirection: "column",
|
|
@@ -26071,12 +26161,12 @@ var LogoutConfirmationDialog = ({ onSelect }) => {
|
|
|
26071
26161
|
marginLeft: 1,
|
|
26072
26162
|
marginRight: 1,
|
|
26073
26163
|
children: [
|
|
26074
|
-
/* @__PURE__ */ (0,
|
|
26075
|
-
/* @__PURE__ */ (0,
|
|
26076
|
-
/* @__PURE__ */ (0,
|
|
26164
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
26165
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Text, { bold: true, color: theme.text.primary, children: "You are now signed out" }),
|
|
26166
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Text, { color: theme.text.secondary, children: "Sign in again to continue using Gemini CLI, or exit the application." })
|
|
26077
26167
|
] }),
|
|
26078
|
-
/* @__PURE__ */ (0,
|
|
26079
|
-
/* @__PURE__ */ (0,
|
|
26168
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(RadioButtonSelect, { items: options, onSelect, isFocused: true }),
|
|
26169
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Text, { color: theme.text.secondary, children: "(Use Enter to select, Esc to close)" }) })
|
|
26080
26170
|
]
|
|
26081
26171
|
}
|
|
26082
26172
|
) });
|
|
@@ -26458,6 +26548,15 @@ var useSlashCommandProcessor = (config, settings, addItem, clearItems, loadHisto
|
|
|
26458
26548
|
return { type: "handled" };
|
|
26459
26549
|
}
|
|
26460
26550
|
case "quit":
|
|
26551
|
+
if (result.deleteSession) {
|
|
26552
|
+
try {
|
|
26553
|
+
const chatRecordingService = config?.getGeminiClient()?.getChatRecordingService();
|
|
26554
|
+
if (chatRecordingService) {
|
|
26555
|
+
await chatRecordingService.deleteCurrentSessionAsync();
|
|
26556
|
+
}
|
|
26557
|
+
} catch {
|
|
26558
|
+
}
|
|
26559
|
+
}
|
|
26461
26560
|
actions.quit(result.messages);
|
|
26462
26561
|
return { type: "handled" };
|
|
26463
26562
|
case "submit_prompt":
|
|
@@ -28988,12 +29087,14 @@ var useAgentStream = ({
|
|
|
28988
29087
|
);
|
|
28989
29088
|
break;
|
|
28990
29089
|
}
|
|
28991
|
-
case "error":
|
|
29090
|
+
case "error": {
|
|
29091
|
+
const message = event._meta?.["code"] === "AGENT_EXECUTION_BLOCKED" ? `Agent execution blocked: ${event.message}` : event.message;
|
|
28992
29092
|
addItem(
|
|
28993
|
-
{ type: "error" /* ERROR */, text:
|
|
29093
|
+
{ type: "error" /* ERROR */, text: message },
|
|
28994
29094
|
userMessageTimestampRef.current
|
|
28995
29095
|
);
|
|
28996
29096
|
break;
|
|
29097
|
+
}
|
|
28997
29098
|
case "initialize":
|
|
28998
29099
|
case "session_update":
|
|
28999
29100
|
case "elicitation_request":
|
|
@@ -31452,6 +31553,7 @@ async function checkForUpdates(settings) {
|
|
|
31452
31553
|
return null;
|
|
31453
31554
|
}
|
|
31454
31555
|
const { name, version: currentVersion } = packageJson2;
|
|
31556
|
+
const currentChannel = getChannelFromVersion(currentVersion);
|
|
31455
31557
|
const isNightly = currentVersion.includes("nightly");
|
|
31456
31558
|
if (isNightly) {
|
|
31457
31559
|
const [nightlyUpdate, latestUpdate] = await Promise.all([
|
|
@@ -31474,7 +31576,14 @@ async function checkForUpdates(settings) {
|
|
|
31474
31576
|
}
|
|
31475
31577
|
} else {
|
|
31476
31578
|
const latestUpdate = await latestVersion(name);
|
|
31477
|
-
if (latestUpdate
|
|
31579
|
+
if (!latestUpdate) {
|
|
31580
|
+
return null;
|
|
31581
|
+
}
|
|
31582
|
+
const targetChannel = getChannelFromVersion(latestUpdate);
|
|
31583
|
+
if (RELEASE_CHANNEL_STABILITY[targetChannel] < RELEASE_CHANNEL_STABILITY[currentChannel]) {
|
|
31584
|
+
return null;
|
|
31585
|
+
}
|
|
31586
|
+
if (import_semver2.default.gt(latestUpdate, currentVersion)) {
|
|
31478
31587
|
const message = `Gemini CLI update available! ${currentVersion} \u2192 ${latestUpdate}`;
|
|
31479
31588
|
const type = import_semver2.default.diff(latestUpdate, currentVersion) || void 0;
|
|
31480
31589
|
return {
|
|
@@ -31784,7 +31893,7 @@ function useSessionResume({
|
|
|
31784
31893
|
|
|
31785
31894
|
// packages/cli/src/ui/hooks/useIncludeDirsTrust.tsx
|
|
31786
31895
|
var import_react117 = __toESM(require_react(), 1);
|
|
31787
|
-
var
|
|
31896
|
+
var import_jsx_runtime138 = __toESM(require_jsx_runtime(), 1);
|
|
31788
31897
|
async function finishAddingDirectories(config, addItem, added, errors) {
|
|
31789
31898
|
if (!config) {
|
|
31790
31899
|
addItem({
|
|
@@ -31871,7 +31980,7 @@ Please use the permissions command to modify their trust level.`
|
|
|
31871
31980
|
undefinedTrustDirs
|
|
31872
31981
|
);
|
|
31873
31982
|
setCustomDialog(
|
|
31874
|
-
/* @__PURE__ */ (0,
|
|
31983
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
31875
31984
|
MultiFolderTrustDialog,
|
|
31876
31985
|
{
|
|
31877
31986
|
folders: undefinedTrustDirs,
|
|
@@ -32092,43 +32201,6 @@ function useBackgroundTaskManager({
|
|
|
32092
32201
|
};
|
|
32093
32202
|
}
|
|
32094
32203
|
|
|
32095
|
-
// packages/cli/src/ui/auth/LoginWithGoogleRestartDialog.tsx
|
|
32096
|
-
var import_jsx_runtime138 = __toESM(require_jsx_runtime(), 1);
|
|
32097
|
-
var LoginWithGoogleRestartDialog = ({
|
|
32098
|
-
onDismiss,
|
|
32099
|
-
config
|
|
32100
|
-
}) => {
|
|
32101
|
-
useKeypress(
|
|
32102
|
-
(key) => {
|
|
32103
|
-
if (key.name === "escape") {
|
|
32104
|
-
onDismiss();
|
|
32105
|
-
return true;
|
|
32106
|
-
} else if (key.name === "r" || key.name === "R") {
|
|
32107
|
-
setTimeout(async () => {
|
|
32108
|
-
if (process.send) {
|
|
32109
|
-
const remoteSettings = config.getRemoteAdminSettings();
|
|
32110
|
-
if (remoteSettings) {
|
|
32111
|
-
process.send({
|
|
32112
|
-
type: "admin-settings-update",
|
|
32113
|
-
settings: remoteSettings
|
|
32114
|
-
});
|
|
32115
|
-
}
|
|
32116
|
-
}
|
|
32117
|
-
await relaunchApp();
|
|
32118
|
-
}, 100);
|
|
32119
|
-
return true;
|
|
32120
|
-
}
|
|
32121
|
-
return false;
|
|
32122
|
-
},
|
|
32123
|
-
{ isActive: true }
|
|
32124
|
-
);
|
|
32125
|
-
const message = "You've successfully signed in with Google. Gemini CLI needs to be restarted.";
|
|
32126
|
-
return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Box_default, { borderStyle: "round", borderColor: theme.status.warning, paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(Text, { color: theme.status.warning, children: [
|
|
32127
|
-
message,
|
|
32128
|
-
" Press R to restart, or Esc to choose a different authentication method."
|
|
32129
|
-
] }) });
|
|
32130
|
-
};
|
|
32131
|
-
|
|
32132
32204
|
// packages/cli/src/ui/hooks/useTerminalTheme.ts
|
|
32133
32205
|
var import_react121 = __toESM(require_react(), 1);
|
|
32134
32206
|
function useTerminalTheme(handleThemeSelect, config, refreshStatic) {
|
|
@@ -33115,7 +33187,7 @@ var AppContainer = (props) => {
|
|
|
33115
33187
|
);
|
|
33116
33188
|
(0, import_react127.useEffect)(() => {
|
|
33117
33189
|
if (authState === "authenticated" /* Authenticated */ && authContext.requiresRestart) {
|
|
33118
|
-
setAuthState("
|
|
33190
|
+
setAuthState("awaiting_login_restart" /* AwaitingLoginRestart */);
|
|
33119
33191
|
setAuthContext({});
|
|
33120
33192
|
}
|
|
33121
33193
|
}, [authState, authContext, setAuthState]);
|
|
@@ -33213,10 +33285,8 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
|
|
33213
33285
|
async (apiKey) => {
|
|
33214
33286
|
try {
|
|
33215
33287
|
onAuthError(null);
|
|
33216
|
-
if (!apiKey.trim()
|
|
33217
|
-
onAuthError(
|
|
33218
|
-
"API key cannot be empty string with length greater than 1."
|
|
33219
|
-
);
|
|
33288
|
+
if (!apiKey.trim()) {
|
|
33289
|
+
onAuthError("API key cannot be empty or whitespace only.");
|
|
33220
33290
|
return;
|
|
33221
33291
|
}
|
|
33222
33292
|
await saveApiKey(apiKey);
|
|
@@ -34050,7 +34120,7 @@ ${queuedText}` : queuedText;
|
|
|
34050
34120
|
if (keyMatchers["app.showErrorDetails" /* SHOW_ERROR_DETAILS */](key)) {
|
|
34051
34121
|
if (settings.merged.general.devtools) {
|
|
34052
34122
|
void (async () => {
|
|
34053
|
-
const { toggleDevToolsPanel } = await import("./devtoolsService-
|
|
34123
|
+
const { toggleDevToolsPanel } = await import("./devtoolsService-KZLK5WRW.js");
|
|
34054
34124
|
await toggleDevToolsPanel(
|
|
34055
34125
|
config,
|
|
34056
34126
|
showErrorDetails,
|
|
@@ -34277,7 +34347,9 @@ ${queuedText}` : queuedText;
|
|
|
34277
34347
|
};
|
|
34278
34348
|
}, [historyManager]);
|
|
34279
34349
|
const nightly = props.version.includes("nightly");
|
|
34280
|
-
const
|
|
34350
|
+
const isAwaitingLoginRestart = authState === "awaiting_login_restart" /* AwaitingLoginRestart */;
|
|
34351
|
+
const loginRestartMessage = settings.merged.security.auth.selectedType === AuthType.USE_VERTEX_AI ? "Authenticating to Vertex AI in Cloud Shell requires a restart to apply project settings." : void 0;
|
|
34352
|
+
const dialogsVisible = shouldShowIdePrompt || isFolderTrustDialogOpen || isPolicyUpdateDialogOpen || adminSettingsChanged || !!commandConfirmationRequest || !!authConsentRequest || !!permissionConfirmationRequest || !!customDialog || confirmUpdateExtensionRequests.length > 0 || !!loopDetectionConfirmationRequest || isThemeDialogOpen || isSettingsDialogOpen || isModelDialogOpen || isVoiceModelDialogOpen || isAgentConfigDialogOpen || isPermissionsDialogOpen || isAuthenticating || isAuthDialogOpen || isEditorDialogOpen || showPrivacyNotice || showIdeRestartPrompt || !!proQuotaRequest || !!validationRequest || !!overageMenuRequest || !!emptyWalletRequest || isSessionBrowserOpen || authState === "awaiting_api_key_input" /* AwaitingApiKeyInput */ || isAwaitingLoginRestart || !!newAgents;
|
|
34281
34353
|
const hasPendingToolConfirmation = (0, import_react127.useMemo)(
|
|
34282
34354
|
() => isToolAwaitingConfirmation(pendingHistoryItems),
|
|
34283
34355
|
[pendingHistoryItems]
|
|
@@ -34450,6 +34522,8 @@ ${queuedText}` : queuedText;
|
|
|
34450
34522
|
accountSuspensionInfo,
|
|
34451
34523
|
isAuthDialogOpen,
|
|
34452
34524
|
isAwaitingApiKeyInput: authState === "awaiting_api_key_input" /* AwaitingApiKeyInput */,
|
|
34525
|
+
isAwaitingLoginRestart,
|
|
34526
|
+
loginRestartMessage,
|
|
34453
34527
|
apiKeyDefaultValue,
|
|
34454
34528
|
editorError,
|
|
34455
34529
|
isEditorDialogOpen,
|
|
@@ -34653,6 +34727,8 @@ ${queuedText}` : queuedText;
|
|
|
34653
34727
|
customDialog,
|
|
34654
34728
|
apiKeyDefaultValue,
|
|
34655
34729
|
authState,
|
|
34730
|
+
isAwaitingLoginRestart,
|
|
34731
|
+
loginRestartMessage,
|
|
34656
34732
|
transientMessage,
|
|
34657
34733
|
bannerData,
|
|
34658
34734
|
bannerVisible,
|
|
@@ -34725,6 +34801,10 @@ ${queuedText}` : queuedText;
|
|
|
34725
34801
|
setActiveBackgroundTaskPid,
|
|
34726
34802
|
setIsBackgroundTaskListOpen,
|
|
34727
34803
|
setAuthContext,
|
|
34804
|
+
dismissLoginRestart: () => {
|
|
34805
|
+
setAuthContext({});
|
|
34806
|
+
setAuthState("updating" /* Updating */);
|
|
34807
|
+
},
|
|
34728
34808
|
onHintInput: () => {
|
|
34729
34809
|
},
|
|
34730
34810
|
onHintBackspace: () => {
|
|
@@ -34834,18 +34914,6 @@ ${queuedText}` : queuedText;
|
|
|
34834
34914
|
setVoiceModeEnabled
|
|
34835
34915
|
]
|
|
34836
34916
|
);
|
|
34837
|
-
if (authState === "awaiting_google_login_restart" /* AwaitingGoogleLoginRestart */) {
|
|
34838
|
-
return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
34839
|
-
LoginWithGoogleRestartDialog,
|
|
34840
|
-
{
|
|
34841
|
-
onDismiss: () => {
|
|
34842
|
-
setAuthContext({});
|
|
34843
|
-
setAuthState("updating" /* Updating */);
|
|
34844
|
-
},
|
|
34845
|
-
config
|
|
34846
|
-
}
|
|
34847
|
-
);
|
|
34848
|
-
}
|
|
34849
34917
|
return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(QuotaContext.Provider, { value: quotaState, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(InputContext.Provider, { value: inputState, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
34850
34918
|
AppContext.Provider,
|
|
34851
34919
|
{
|
|
@@ -34945,7 +35013,12 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
|
|
|
34945
35013
|
registerCleanup(cleanupLineWrapping);
|
|
34946
35014
|
}
|
|
34947
35015
|
checkForUpdates(settings).then((info) => {
|
|
34948
|
-
handleAutoUpdate(
|
|
35016
|
+
handleAutoUpdate(
|
|
35017
|
+
info,
|
|
35018
|
+
settings,
|
|
35019
|
+
config.getProjectRoot(),
|
|
35020
|
+
config.getSandboxEnabled()
|
|
35021
|
+
);
|
|
34949
35022
|
}).catch((err) => {
|
|
34950
35023
|
if (config.getDebugMode()) {
|
|
34951
35024
|
debugLogger.warn("Update check failed:", err);
|