@protolabsai/proto 0.54.1 → 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +267 -178
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -168684,7 +168684,7 @@ __export(geminiContentGenerator_exports, {
|
|
|
168684
168684
|
createGeminiContentGenerator: () => createGeminiContentGenerator
|
|
168685
168685
|
});
|
|
168686
168686
|
function createGeminiContentGenerator(config2, gcConfig) {
|
|
168687
|
-
const version2 = "0.
|
|
168687
|
+
const version2 = "0.55.0";
|
|
168688
168688
|
const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
|
|
168689
168689
|
const baseHeaders = {
|
|
168690
168690
|
"User-Agent": userAgent2
|
|
@@ -176239,8 +176239,8 @@ __export(ansi_regex_exports, {
|
|
|
176239
176239
|
default: () => ansiRegex
|
|
176240
176240
|
});
|
|
176241
176241
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
176242
|
-
const
|
|
176243
|
-
const osc = `(?:\\u001B\\][\\s\\S]*?${
|
|
176242
|
+
const ST2 = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
176243
|
+
const osc = `(?:\\u001B\\][\\s\\S]*?${ST2})`;
|
|
176244
176244
|
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
176245
176245
|
const pattern = `${osc}|${csi}`;
|
|
176246
176246
|
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
@@ -263484,8 +263484,8 @@ var require_src37 = __commonJS({
|
|
|
263484
263484
|
"node_modules/sisteransi/src/index.js"(exports2, module2) {
|
|
263485
263485
|
"use strict";
|
|
263486
263486
|
init_esbuild_shims();
|
|
263487
|
-
var
|
|
263488
|
-
var CSI = `${
|
|
263487
|
+
var ESC6 = "\x1B";
|
|
263488
|
+
var CSI = `${ESC6}[`;
|
|
263489
263489
|
var beep2 = "\x07";
|
|
263490
263490
|
var cursor = {
|
|
263491
263491
|
to(x3, y2) {
|
|
@@ -263509,8 +263509,8 @@ var require_src37 = __commonJS({
|
|
|
263509
263509
|
left: `${CSI}G`,
|
|
263510
263510
|
hide: `${CSI}?25l`,
|
|
263511
263511
|
show: `${CSI}?25h`,
|
|
263512
|
-
save: `${
|
|
263513
|
-
restore: `${
|
|
263512
|
+
save: `${ESC6}7`,
|
|
263513
|
+
restore: `${ESC6}8`
|
|
263514
263514
|
};
|
|
263515
263515
|
var scroll = {
|
|
263516
263516
|
up: /* @__PURE__ */ __name((count = 1) => `${CSI}S`.repeat(count), "up"),
|
|
@@ -312023,7 +312023,7 @@ var require_backend = __commonJS({
|
|
|
312023
312023
|
});
|
|
312024
312024
|
return a2._currentValue;
|
|
312025
312025
|
}, "useContext"),
|
|
312026
|
-
useEffect: /* @__PURE__ */ __name(function
|
|
312026
|
+
useEffect: /* @__PURE__ */ __name(function useEffect77(a2) {
|
|
312027
312027
|
C3();
|
|
312028
312028
|
x3.push({
|
|
312029
312029
|
primitive: "Effect",
|
|
@@ -312088,7 +312088,7 @@ var require_backend = __commonJS({
|
|
|
312088
312088
|
return [b2, function() {
|
|
312089
312089
|
}];
|
|
312090
312090
|
}, "useReducer"),
|
|
312091
|
-
useRef: /* @__PURE__ */ __name(function
|
|
312091
|
+
useRef: /* @__PURE__ */ __name(function useRef33(a2) {
|
|
312092
312092
|
var b2 = C3();
|
|
312093
312093
|
a2 = null !== b2 ? b2.memoizedState : {
|
|
312094
312094
|
current: a2
|
|
@@ -404447,7 +404447,7 @@ var measureElement = /* @__PURE__ */ __name((node) => ({
|
|
|
404447
404447
|
var measure_element_default = measureElement;
|
|
404448
404448
|
|
|
404449
404449
|
// packages/cli/src/gemini.tsx
|
|
404450
|
-
var
|
|
404450
|
+
var import_react181 = __toESM(require_react(), 1);
|
|
404451
404451
|
import dns2 from "node:dns";
|
|
404452
404452
|
import os50 from "node:os";
|
|
404453
404453
|
import { basename as basename32 } from "node:path";
|
|
@@ -416785,7 +416785,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
416785
416785
|
// packages/cli/src/utils/version.ts
|
|
416786
416786
|
async function getCliVersion() {
|
|
416787
416787
|
const pkgJson = await getPackageJson();
|
|
416788
|
-
return "0.
|
|
416788
|
+
return "0.55.0";
|
|
416789
416789
|
}
|
|
416790
416790
|
__name(getCliVersion, "getCliVersion");
|
|
416791
416791
|
|
|
@@ -424985,7 +424985,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
424985
424985
|
|
|
424986
424986
|
// packages/cli/src/generated/git-commit.ts
|
|
424987
424987
|
init_esbuild_shims();
|
|
424988
|
-
var GIT_COMMIT_INFO = "
|
|
424988
|
+
var GIT_COMMIT_INFO = "c2271eacc";
|
|
424989
424989
|
|
|
424990
424990
|
// packages/cli/src/utils/systemInfo.ts
|
|
424991
424991
|
async function getNpmVersion() {
|
|
@@ -439505,7 +439505,7 @@ __name(runNonInteractiveStreamJson, "runNonInteractiveStreamJson");
|
|
|
439505
439505
|
|
|
439506
439506
|
// packages/cli/src/ui/AppContainer.tsx
|
|
439507
439507
|
init_esbuild_shims();
|
|
439508
|
-
var
|
|
439508
|
+
var import_react178 = __toESM(require_react(), 1);
|
|
439509
439509
|
|
|
439510
439510
|
// packages/cli/src/ui/App.tsx
|
|
439511
439511
|
init_esbuild_shims();
|
|
@@ -455993,8 +455993,8 @@ function KeypressProvider({
|
|
|
455993
455993
|
const shift = (modifierBits & MODIFIER_SHIFT_BIT) === MODIFIER_SHIFT_BIT;
|
|
455994
455994
|
const alt = (modifierBits & MODIFIER_ALT_BIT) === MODIFIER_ALT_BIT;
|
|
455995
455995
|
const ctrl = (modifierBits & MODIFIER_CTRL_BIT) === MODIFIER_CTRL_BIT;
|
|
455996
|
-
const
|
|
455997
|
-
if (
|
|
455996
|
+
const terminator2 = m3[4];
|
|
455997
|
+
if (terminator2 === "~") {
|
|
455998
455998
|
let name5 = null;
|
|
455999
455999
|
switch (keyCode) {
|
|
456000
456000
|
case 1:
|
|
@@ -456087,7 +456087,7 @@ function KeypressProvider({
|
|
|
456087
456087
|
length: m3[0].length
|
|
456088
456088
|
};
|
|
456089
456089
|
}
|
|
456090
|
-
if (
|
|
456090
|
+
if (terminator2 === "u" && !ctrl && keyCode >= 32 && keyCode !== 127 && keyCode <= 1114111 && !(keyCode >= 57344 && keyCode <= 63743)) {
|
|
456091
456091
|
return {
|
|
456092
456092
|
key: {
|
|
456093
456093
|
...createPrintableKey(String.fromCodePoint(keyCode)),
|
|
@@ -484200,13 +484200,97 @@ function useWindowTitle(streamingState, thought, settings2, stdout3, targetDir)
|
|
|
484200
484200
|
}
|
|
484201
484201
|
__name(useWindowTitle, "useWindowTitle");
|
|
484202
484202
|
|
|
484203
|
-
// packages/cli/src/ui/hooks/
|
|
484203
|
+
// packages/cli/src/ui/hooks/useTabStatus.ts
|
|
484204
484204
|
init_esbuild_shims();
|
|
484205
484205
|
var import_react161 = __toESM(require_react(), 1);
|
|
484206
|
+
|
|
484207
|
+
// packages/cli/src/ui/utils/terminalTabStatus.ts
|
|
484208
|
+
init_esbuild_shims();
|
|
484209
|
+
var ESC4 = "\x1B";
|
|
484210
|
+
var BEL3 = "\x07";
|
|
484211
|
+
var ST = `${ESC4}\\`;
|
|
484212
|
+
var OSC_TAB_STATUS = 21337;
|
|
484213
|
+
var PRESETS = {
|
|
484214
|
+
idle: { indicator: "#00d75f", status: "Idle", statusColor: "#888888" },
|
|
484215
|
+
busy: { indicator: "#ff9500", status: "Working\u2026", statusColor: "#ff9500" },
|
|
484216
|
+
waiting: { indicator: "#5f87ff", status: "Waiting", statusColor: "#5f87ff" }
|
|
484217
|
+
};
|
|
484218
|
+
function terminator() {
|
|
484219
|
+
const term = process.env["TERM"] ?? "";
|
|
484220
|
+
const termProgram = process.env["TERM_PROGRAM"] ?? "";
|
|
484221
|
+
const isKitty = term.includes("kitty") || termProgram === "kitty";
|
|
484222
|
+
return isKitty ? ST : BEL3;
|
|
484223
|
+
}
|
|
484224
|
+
__name(terminator, "terminator");
|
|
484225
|
+
function oscTabStatus(payload) {
|
|
484226
|
+
return `${ESC4}]${OSC_TAB_STATUS};${payload}${terminator()}`;
|
|
484227
|
+
}
|
|
484228
|
+
__name(oscTabStatus, "oscTabStatus");
|
|
484229
|
+
function escapeStatus(text) {
|
|
484230
|
+
return text.replaceAll("\\", "\\\\").replaceAll(";", "\\;");
|
|
484231
|
+
}
|
|
484232
|
+
__name(escapeStatus, "escapeStatus");
|
|
484233
|
+
function wrapForMultiplexer(sequence) {
|
|
484234
|
+
if (process.env["TMUX"]) {
|
|
484235
|
+
const escaped = sequence.replaceAll(ESC4, ESC4 + ESC4);
|
|
484236
|
+
return `${ESC4}Ptmux;${escaped}${ESC4}\\`;
|
|
484237
|
+
}
|
|
484238
|
+
if (process.env["STY"]) {
|
|
484239
|
+
return `${ESC4}P${sequence}${ESC4}\\`;
|
|
484240
|
+
}
|
|
484241
|
+
return sequence;
|
|
484242
|
+
}
|
|
484243
|
+
__name(wrapForMultiplexer, "wrapForMultiplexer");
|
|
484244
|
+
function buildTabStatus(kind2) {
|
|
484245
|
+
const p2 = PRESETS[kind2];
|
|
484246
|
+
return wrapForMultiplexer(
|
|
484247
|
+
oscTabStatus(
|
|
484248
|
+
`indicator=${p2.indicator};status=${escapeStatus(p2.status)};status-color=${p2.statusColor}`
|
|
484249
|
+
)
|
|
484250
|
+
);
|
|
484251
|
+
}
|
|
484252
|
+
__name(buildTabStatus, "buildTabStatus");
|
|
484253
|
+
function buildClearTabStatus() {
|
|
484254
|
+
return wrapForMultiplexer(oscTabStatus("indicator=;status=;status-color="));
|
|
484255
|
+
}
|
|
484256
|
+
__name(buildClearTabStatus, "buildClearTabStatus");
|
|
484257
|
+
|
|
484258
|
+
// packages/cli/src/ui/hooks/useTabStatus.ts
|
|
484259
|
+
function tabStatusKindForStreamingState(state) {
|
|
484260
|
+
switch (state) {
|
|
484261
|
+
case "responding" /* Responding */:
|
|
484262
|
+
return "busy";
|
|
484263
|
+
case "waiting_for_confirmation" /* WaitingForConfirmation */:
|
|
484264
|
+
return "waiting";
|
|
484265
|
+
default:
|
|
484266
|
+
return "idle";
|
|
484267
|
+
}
|
|
484268
|
+
}
|
|
484269
|
+
__name(tabStatusKindForStreamingState, "tabStatusKindForStreamingState");
|
|
484270
|
+
function useTabStatus(kind2, stdout3) {
|
|
484271
|
+
const prevKindRef = (0, import_react161.useRef)(null);
|
|
484272
|
+
(0, import_react161.useEffect)(() => {
|
|
484273
|
+
if (kind2 === null) {
|
|
484274
|
+
if (prevKindRef.current !== null) {
|
|
484275
|
+
stdout3.write(buildClearTabStatus());
|
|
484276
|
+
prevKindRef.current = null;
|
|
484277
|
+
}
|
|
484278
|
+
return;
|
|
484279
|
+
}
|
|
484280
|
+
if (prevKindRef.current === kind2) return;
|
|
484281
|
+
prevKindRef.current = kind2;
|
|
484282
|
+
stdout3.write(buildTabStatus(kind2));
|
|
484283
|
+
}, [kind2, stdout3]);
|
|
484284
|
+
}
|
|
484285
|
+
__name(useTabStatus, "useTabStatus");
|
|
484286
|
+
|
|
484287
|
+
// packages/cli/src/ui/hooks/useInitializationEffects.ts
|
|
484288
|
+
init_esbuild_shims();
|
|
484289
|
+
var import_react162 = __toESM(require_react(), 1);
|
|
484206
484290
|
init_dist4();
|
|
484207
484291
|
var debugLogger155 = createDebugLogger("APP_CONTAINER");
|
|
484208
484292
|
function useInitializationEffects(config2, historyManager, setConfigInitialized, setSessionName) {
|
|
484209
|
-
(0,
|
|
484293
|
+
(0, import_react162.useEffect)(() => {
|
|
484210
484294
|
(async () => {
|
|
484211
484295
|
await config2.initialize();
|
|
484212
484296
|
setConfigInitialized(true);
|
|
@@ -484280,7 +484364,7 @@ __name(useInitializationEffects, "useInitializationEffects");
|
|
|
484280
484364
|
|
|
484281
484365
|
// packages/cli/src/ui/hooks/usePromptSuggestions.ts
|
|
484282
484366
|
init_esbuild_shims();
|
|
484283
|
-
var
|
|
484367
|
+
var import_react163 = __toESM(require_react(), 1);
|
|
484284
484368
|
init_dist4();
|
|
484285
484369
|
function usePromptSuggestions(params) {
|
|
484286
484370
|
const {
|
|
@@ -484296,17 +484380,17 @@ function usePromptSuggestions(params) {
|
|
|
484296
484380
|
settingInputRequests,
|
|
484297
484381
|
pendingGeminiHistoryItems
|
|
484298
484382
|
} = params;
|
|
484299
|
-
const [promptSuggestion, setPromptSuggestion] = (0,
|
|
484300
|
-
const prevStreamingStateRef = (0,
|
|
484301
|
-
const speculationRef = (0,
|
|
484302
|
-
const suggestionAbortRef = (0,
|
|
484303
|
-
const dismissPromptSuggestion = (0,
|
|
484383
|
+
const [promptSuggestion, setPromptSuggestion] = (0, import_react163.useState)(null);
|
|
484384
|
+
const prevStreamingStateRef = (0, import_react163.useRef)("idle" /* Idle */);
|
|
484385
|
+
const speculationRef = (0, import_react163.useRef)(IDLE_SPECULATION);
|
|
484386
|
+
const suggestionAbortRef = (0, import_react163.useRef)(null);
|
|
484387
|
+
const dismissPromptSuggestion = (0, import_react163.useCallback)(() => {
|
|
484304
484388
|
setPromptSuggestion(null);
|
|
484305
484389
|
suggestionAbortRef.current?.abort();
|
|
484306
484390
|
suggestionAbortRef.current = null;
|
|
484307
484391
|
}, []);
|
|
484308
484392
|
const followupSuggestionsEnabled = settings2.merged.ui?.enableFollowupSuggestions !== false;
|
|
484309
|
-
(0,
|
|
484393
|
+
(0, import_react163.useEffect)(() => {
|
|
484310
484394
|
if (!followupSuggestionsEnabled) {
|
|
484311
484395
|
suggestionAbortRef.current?.abort();
|
|
484312
484396
|
setPromptSuggestion(null);
|
|
@@ -484379,7 +484463,7 @@ function usePromptSuggestions(params) {
|
|
|
484379
484463
|
isPermissionsDialogOpen,
|
|
484380
484464
|
settingInputRequests
|
|
484381
484465
|
]);
|
|
484382
|
-
(0,
|
|
484466
|
+
(0, import_react163.useEffect)(() => {
|
|
484383
484467
|
if (!promptSuggestion && speculationRef.current.status !== "idle") {
|
|
484384
484468
|
abortSpeculation(speculationRef.current).catch(() => {
|
|
484385
484469
|
});
|
|
@@ -484397,7 +484481,7 @@ __name(usePromptSuggestions, "usePromptSuggestions");
|
|
|
484397
484481
|
|
|
484398
484482
|
// packages/cli/src/ui/hooks/useExitHandling.ts
|
|
484399
484483
|
init_esbuild_shims();
|
|
484400
|
-
var
|
|
484484
|
+
var import_react164 = __toESM(require_react(), 1);
|
|
484401
484485
|
function useExitHandling(params) {
|
|
484402
484486
|
const {
|
|
484403
484487
|
isAuthDialogOpen,
|
|
@@ -484407,7 +484491,7 @@ function useExitHandling(params) {
|
|
|
484407
484491
|
cancelOngoingRequest,
|
|
484408
484492
|
buffer
|
|
484409
484493
|
} = params;
|
|
484410
|
-
const handleExit = (0,
|
|
484494
|
+
const handleExit = (0, import_react164.useCallback)(
|
|
484411
484495
|
(pressedOnce, setPressedOnce, timerRef) => {
|
|
484412
484496
|
if (pressedOnce) {
|
|
484413
484497
|
if (timerRef.current) {
|
|
@@ -487550,7 +487634,7 @@ __name(setUpdateHandler, "setUpdateHandler");
|
|
|
487550
487634
|
|
|
487551
487635
|
// packages/cli/src/ui/hooks/useMessageQueue.ts
|
|
487552
487636
|
init_esbuild_shims();
|
|
487553
|
-
var
|
|
487637
|
+
var import_react165 = __toESM(require_react(), 1);
|
|
487554
487638
|
var MessageQueueStore = class {
|
|
487555
487639
|
static {
|
|
487556
487640
|
__name(this, "MessageQueueStore");
|
|
@@ -487604,15 +487688,15 @@ var MessageQueueStore = class {
|
|
|
487604
487688
|
}
|
|
487605
487689
|
};
|
|
487606
487690
|
function useMessageQueue() {
|
|
487607
|
-
const store = (0,
|
|
487608
|
-
const messageQueue = (0,
|
|
487609
|
-
const addMessage = (0,
|
|
487691
|
+
const store = (0, import_react165.useMemo)(() => new MessageQueueStore(), []);
|
|
487692
|
+
const messageQueue = (0, import_react165.useSyncExternalStore)(store.subscribe, store.getSnapshot);
|
|
487693
|
+
const addMessage = (0, import_react165.useCallback)(
|
|
487610
487694
|
(message) => store.addMessage(message),
|
|
487611
487695
|
[store]
|
|
487612
487696
|
);
|
|
487613
|
-
const clearQueue = (0,
|
|
487614
|
-
const popLast = (0,
|
|
487615
|
-
const drain = (0,
|
|
487697
|
+
const clearQueue = (0, import_react165.useCallback)(() => store.clearQueue(), [store]);
|
|
487698
|
+
const popLast = (0, import_react165.useCallback)(() => store.popLast(), [store]);
|
|
487699
|
+
const drain = (0, import_react165.useCallback)(() => store.drain(), [store]);
|
|
487616
487700
|
return { messageQueue, addMessage, clearQueue, popLast, drain };
|
|
487617
487701
|
}
|
|
487618
487702
|
__name(useMessageQueue, "useMessageQueue");
|
|
@@ -487620,7 +487704,7 @@ __name(useMessageQueue, "useMessageQueue");
|
|
|
487620
487704
|
// packages/cli/src/ui/hooks/useAutoAcceptIndicator.ts
|
|
487621
487705
|
init_esbuild_shims();
|
|
487622
487706
|
init_dist4();
|
|
487623
|
-
var
|
|
487707
|
+
var import_react166 = __toESM(require_react(), 1);
|
|
487624
487708
|
function useAutoAcceptIndicator({
|
|
487625
487709
|
config: config2,
|
|
487626
487710
|
addItem,
|
|
@@ -487629,8 +487713,8 @@ function useAutoAcceptIndicator({
|
|
|
487629
487713
|
disabled
|
|
487630
487714
|
}) {
|
|
487631
487715
|
const currentConfigValue = config2.getApprovalMode();
|
|
487632
|
-
const [showAutoAcceptIndicator, setShowAutoAcceptIndicator] = (0,
|
|
487633
|
-
(0,
|
|
487716
|
+
const [showAutoAcceptIndicator, setShowAutoAcceptIndicator] = (0, import_react166.useState)(currentConfigValue);
|
|
487717
|
+
(0, import_react166.useEffect)(() => {
|
|
487634
487718
|
setShowAutoAcceptIndicator(currentConfigValue);
|
|
487635
487719
|
}, [currentConfigValue]);
|
|
487636
487720
|
useKeypress(
|
|
@@ -487668,7 +487752,7 @@ __name(useAutoAcceptIndicator, "useAutoAcceptIndicator");
|
|
|
487668
487752
|
|
|
487669
487753
|
// packages/cli/src/ui/hooks/useExtensionUpdates.ts
|
|
487670
487754
|
init_esbuild_shims();
|
|
487671
|
-
var
|
|
487755
|
+
var import_react167 = __toESM(require_react(), 1);
|
|
487672
487756
|
function confirmationRequestsReducer(state, action) {
|
|
487673
487757
|
switch (action.type) {
|
|
487674
487758
|
case "add":
|
|
@@ -487685,8 +487769,8 @@ var useConfirmUpdateRequests = /* @__PURE__ */ __name(() => {
|
|
|
487685
487769
|
const [
|
|
487686
487770
|
confirmUpdateExtensionRequests,
|
|
487687
487771
|
dispatchConfirmUpdateExtensionRequests
|
|
487688
|
-
] = (0,
|
|
487689
|
-
const addConfirmUpdateExtensionRequest = (0,
|
|
487772
|
+
] = (0, import_react167.useReducer)(confirmationRequestsReducer, []);
|
|
487773
|
+
const addConfirmUpdateExtensionRequest = (0, import_react167.useCallback)(
|
|
487690
487774
|
(original) => {
|
|
487691
487775
|
const wrappedRequest = {
|
|
487692
487776
|
prompt: original.prompt,
|
|
@@ -487724,11 +487808,11 @@ function settingInputRequestsReducer(state, action) {
|
|
|
487724
487808
|
}
|
|
487725
487809
|
__name(settingInputRequestsReducer, "settingInputRequestsReducer");
|
|
487726
487810
|
var useSettingInputRequests = /* @__PURE__ */ __name(() => {
|
|
487727
|
-
const [settingInputRequests, dispatchSettingInputRequests] = (0,
|
|
487811
|
+
const [settingInputRequests, dispatchSettingInputRequests] = (0, import_react167.useReducer)(
|
|
487728
487812
|
settingInputRequestsReducer,
|
|
487729
487813
|
[]
|
|
487730
487814
|
);
|
|
487731
|
-
const addSettingInputRequest = (0,
|
|
487815
|
+
const addSettingInputRequest = (0, import_react167.useCallback)(
|
|
487732
487816
|
(original) => {
|
|
487733
487817
|
const wrappedRequest = {
|
|
487734
487818
|
settingName: original.settingName,
|
|
@@ -487775,11 +487859,11 @@ function pluginChoiceRequestsReducer(state, action) {
|
|
|
487775
487859
|
}
|
|
487776
487860
|
__name(pluginChoiceRequestsReducer, "pluginChoiceRequestsReducer");
|
|
487777
487861
|
var usePluginChoiceRequests = /* @__PURE__ */ __name(() => {
|
|
487778
|
-
const [pluginChoiceRequests, dispatchPluginChoiceRequests] = (0,
|
|
487862
|
+
const [pluginChoiceRequests, dispatchPluginChoiceRequests] = (0, import_react167.useReducer)(
|
|
487779
487863
|
pluginChoiceRequestsReducer,
|
|
487780
487864
|
[]
|
|
487781
487865
|
);
|
|
487782
|
-
const addPluginChoiceRequest = (0,
|
|
487866
|
+
const addPluginChoiceRequest = (0, import_react167.useCallback)(
|
|
487783
487867
|
(original) => {
|
|
487784
487868
|
const wrappedRequest = {
|
|
487785
487869
|
marketplaceName: original.marketplaceName,
|
|
@@ -487813,12 +487897,12 @@ var usePluginChoiceRequests = /* @__PURE__ */ __name(() => {
|
|
|
487813
487897
|
};
|
|
487814
487898
|
}, "usePluginChoiceRequests");
|
|
487815
487899
|
var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd6) => {
|
|
487816
|
-
const [extensionsUpdateState, dispatchExtensionStateUpdate] = (0,
|
|
487900
|
+
const [extensionsUpdateState, dispatchExtensionStateUpdate] = (0, import_react167.useReducer)(
|
|
487817
487901
|
extensionUpdatesReducer,
|
|
487818
487902
|
initialExtensionUpdatesState
|
|
487819
487903
|
);
|
|
487820
487904
|
const extensions = extensionManager.getLoadedExtensions();
|
|
487821
|
-
(0,
|
|
487905
|
+
(0, import_react167.useEffect)(() => {
|
|
487822
487906
|
(async () => {
|
|
487823
487907
|
const extensionsToCheck = extensions.filter((extension) => {
|
|
487824
487908
|
const currentStatus = extensionsUpdateState.extensionStatuses.get(
|
|
@@ -487846,7 +487930,7 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
|
|
|
487846
487930
|
extensionsUpdateState.extensionStatuses,
|
|
487847
487931
|
dispatchExtensionStateUpdate
|
|
487848
487932
|
]);
|
|
487849
|
-
(0,
|
|
487933
|
+
(0, import_react167.useEffect)(() => {
|
|
487850
487934
|
if (extensionsUpdateState.batchChecksInProgress > 0) {
|
|
487851
487935
|
return;
|
|
487852
487936
|
}
|
|
@@ -487905,7 +487989,7 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
|
|
|
487905
487989
|
);
|
|
487906
487990
|
}
|
|
487907
487991
|
}, [extensions, extensionManager, extensionsUpdateState, addItem, cwd6]);
|
|
487908
|
-
const extensionsUpdateStateComputed = (0,
|
|
487992
|
+
const extensionsUpdateStateComputed = (0, import_react167.useMemo)(() => {
|
|
487909
487993
|
const result = /* @__PURE__ */ new Map();
|
|
487910
487994
|
for (const [
|
|
487911
487995
|
key,
|
|
@@ -487924,15 +488008,15 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
|
|
|
487924
488008
|
|
|
487925
488009
|
// packages/cli/src/ui/hooks/useWelcomeBack.ts
|
|
487926
488010
|
init_esbuild_shims();
|
|
487927
|
-
var
|
|
488011
|
+
var import_react168 = __toESM(require_react(), 1);
|
|
487928
488012
|
init_dist4();
|
|
487929
488013
|
function useWelcomeBack(config2, submitQuery, buffer, settings2) {
|
|
487930
|
-
const [welcomeBackInfo, setWelcomeBackInfo] = (0,
|
|
487931
|
-
const [showWelcomeBackDialog, setShowWelcomeBackDialog] = (0,
|
|
487932
|
-
const [welcomeBackChoice, setWelcomeBackChoice] = (0,
|
|
487933
|
-
const [shouldFillInput, setShouldFillInput] = (0,
|
|
487934
|
-
const [inputFillText, setInputFillText] = (0,
|
|
487935
|
-
const checkWelcomeBack = (0,
|
|
488014
|
+
const [welcomeBackInfo, setWelcomeBackInfo] = (0, import_react168.useState)(null);
|
|
488015
|
+
const [showWelcomeBackDialog, setShowWelcomeBackDialog] = (0, import_react168.useState)(false);
|
|
488016
|
+
const [welcomeBackChoice, setWelcomeBackChoice] = (0, import_react168.useState)(null);
|
|
488017
|
+
const [shouldFillInput, setShouldFillInput] = (0, import_react168.useState)(false);
|
|
488018
|
+
const [inputFillText, setInputFillText] = (0, import_react168.useState)(null);
|
|
488019
|
+
const checkWelcomeBack = (0, import_react168.useCallback)(async () => {
|
|
487936
488020
|
if (settings2.ui?.enableWelcomeBack === false) {
|
|
487937
488021
|
return;
|
|
487938
488022
|
}
|
|
@@ -487946,7 +488030,7 @@ function useWelcomeBack(config2, submitQuery, buffer, settings2) {
|
|
|
487946
488030
|
config2.getDebugLogger().debug("Welcome back check failed:", error40);
|
|
487947
488031
|
}
|
|
487948
488032
|
}, [config2, settings2.ui?.enableWelcomeBack]);
|
|
487949
|
-
const handleWelcomeBackSelection = (0,
|
|
488033
|
+
const handleWelcomeBackSelection = (0, import_react168.useCallback)(
|
|
487950
488034
|
(choice2) => {
|
|
487951
488035
|
setWelcomeBackChoice(choice2);
|
|
487952
488036
|
setShowWelcomeBackDialog(false);
|
|
@@ -487958,21 +488042,21 @@ function useWelcomeBack(config2, submitQuery, buffer, settings2) {
|
|
|
487958
488042
|
},
|
|
487959
488043
|
[welcomeBackInfo]
|
|
487960
488044
|
);
|
|
487961
|
-
const handleWelcomeBackClose = (0,
|
|
488045
|
+
const handleWelcomeBackClose = (0, import_react168.useCallback)(() => {
|
|
487962
488046
|
setWelcomeBackChoice("restart");
|
|
487963
488047
|
setShowWelcomeBackDialog(false);
|
|
487964
488048
|
}, []);
|
|
487965
|
-
const clearInputFill = (0,
|
|
488049
|
+
const clearInputFill = (0, import_react168.useCallback)(() => {
|
|
487966
488050
|
setShouldFillInput(false);
|
|
487967
488051
|
setInputFillText(null);
|
|
487968
488052
|
}, []);
|
|
487969
|
-
(0,
|
|
488053
|
+
(0, import_react168.useEffect)(() => {
|
|
487970
488054
|
if (shouldFillInput && inputFillText) {
|
|
487971
488055
|
buffer.setText(inputFillText);
|
|
487972
488056
|
clearInputFill();
|
|
487973
488057
|
}
|
|
487974
488058
|
}, [shouldFillInput, inputFillText, buffer, clearInputFill]);
|
|
487975
|
-
(0,
|
|
488059
|
+
(0, import_react168.useEffect)(() => {
|
|
487976
488060
|
checkWelcomeBack();
|
|
487977
488061
|
}, [checkWelcomeBack]);
|
|
487978
488062
|
return {
|
|
@@ -487993,9 +488077,9 @@ __name(useWelcomeBack, "useWelcomeBack");
|
|
|
487993
488077
|
|
|
487994
488078
|
// packages/cli/src/ui/hooks/useDialogClose.ts
|
|
487995
488079
|
init_esbuild_shims();
|
|
487996
|
-
var
|
|
488080
|
+
var import_react169 = __toESM(require_react(), 1);
|
|
487997
488081
|
function useDialogClose(options2) {
|
|
487998
|
-
const closeAnyOpenDialog = (0,
|
|
488082
|
+
const closeAnyOpenDialog = (0, import_react169.useCallback)(() => {
|
|
487999
488083
|
if (options2.isThemeDialogOpen) {
|
|
488000
488084
|
options2.handleThemeSelect(void 0, "User" /* User */);
|
|
488001
488085
|
return true;
|
|
@@ -488027,14 +488111,14 @@ __name(useDialogClose, "useDialogClose");
|
|
|
488027
488111
|
|
|
488028
488112
|
// packages/cli/src/ui/hooks/useInitializationAuthError.ts
|
|
488029
488113
|
init_esbuild_shims();
|
|
488030
|
-
var
|
|
488114
|
+
var import_react170 = __toESM(require_react(), 1);
|
|
488031
488115
|
var useInitializationAuthError = /* @__PURE__ */ __name((authError, onAuthError) => {
|
|
488032
|
-
const hasHandled = (0,
|
|
488033
|
-
const authErrorRef = (0,
|
|
488034
|
-
const onAuthErrorRef = (0,
|
|
488116
|
+
const hasHandled = (0, import_react170.useRef)(false);
|
|
488117
|
+
const authErrorRef = (0, import_react170.useRef)(authError);
|
|
488118
|
+
const onAuthErrorRef = (0, import_react170.useRef)(onAuthError);
|
|
488035
488119
|
authErrorRef.current = authError;
|
|
488036
488120
|
onAuthErrorRef.current = onAuthError;
|
|
488037
|
-
(0,
|
|
488121
|
+
(0, import_react170.useEffect)(() => {
|
|
488038
488122
|
if (hasHandled.current) {
|
|
488039
488123
|
return;
|
|
488040
488124
|
}
|
|
@@ -488047,13 +488131,13 @@ var useInitializationAuthError = /* @__PURE__ */ __name((authError, onAuthError)
|
|
|
488047
488131
|
|
|
488048
488132
|
// packages/cli/src/ui/hooks/useSubagentCreateDialog.ts
|
|
488049
488133
|
init_esbuild_shims();
|
|
488050
|
-
var
|
|
488134
|
+
var import_react171 = __toESM(require_react(), 1);
|
|
488051
488135
|
function useSubagentCreateDialog() {
|
|
488052
|
-
const [isSubagentCreateDialogOpen, setIsSubagentCreateDialogOpen] = (0,
|
|
488053
|
-
const openSubagentCreateDialog = (0,
|
|
488136
|
+
const [isSubagentCreateDialogOpen, setIsSubagentCreateDialogOpen] = (0, import_react171.useState)(false);
|
|
488137
|
+
const openSubagentCreateDialog = (0, import_react171.useCallback)(() => {
|
|
488054
488138
|
setIsSubagentCreateDialogOpen(true);
|
|
488055
488139
|
}, []);
|
|
488056
|
-
const closeSubagentCreateDialog = (0,
|
|
488140
|
+
const closeSubagentCreateDialog = (0, import_react171.useCallback)(() => {
|
|
488057
488141
|
setIsSubagentCreateDialogOpen(false);
|
|
488058
488142
|
}, []);
|
|
488059
488143
|
return {
|
|
@@ -488066,13 +488150,13 @@ __name(useSubagentCreateDialog, "useSubagentCreateDialog");
|
|
|
488066
488150
|
|
|
488067
488151
|
// packages/cli/src/ui/hooks/useAgentsManagerDialog.ts
|
|
488068
488152
|
init_esbuild_shims();
|
|
488069
|
-
var
|
|
488153
|
+
var import_react172 = __toESM(require_react(), 1);
|
|
488070
488154
|
var useAgentsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
488071
|
-
const [isAgentsManagerDialogOpen, setIsAgentsManagerDialogOpen] = (0,
|
|
488072
|
-
const openAgentsManagerDialog = (0,
|
|
488155
|
+
const [isAgentsManagerDialogOpen, setIsAgentsManagerDialogOpen] = (0, import_react172.useState)(false);
|
|
488156
|
+
const openAgentsManagerDialog = (0, import_react172.useCallback)(() => {
|
|
488073
488157
|
setIsAgentsManagerDialogOpen(true);
|
|
488074
488158
|
}, []);
|
|
488075
|
-
const closeAgentsManagerDialog = (0,
|
|
488159
|
+
const closeAgentsManagerDialog = (0, import_react172.useCallback)(() => {
|
|
488076
488160
|
setIsAgentsManagerDialogOpen(false);
|
|
488077
488161
|
}, []);
|
|
488078
488162
|
return {
|
|
@@ -488084,13 +488168,13 @@ var useAgentsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
|
488084
488168
|
|
|
488085
488169
|
// packages/cli/src/ui/hooks/useExtensionsManagerDialog.ts
|
|
488086
488170
|
init_esbuild_shims();
|
|
488087
|
-
var
|
|
488171
|
+
var import_react173 = __toESM(require_react(), 1);
|
|
488088
488172
|
var useExtensionsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
488089
|
-
const [isExtensionsManagerDialogOpen, setIsExtensionsManagerDialogOpen] = (0,
|
|
488090
|
-
const openExtensionsManagerDialog = (0,
|
|
488173
|
+
const [isExtensionsManagerDialogOpen, setIsExtensionsManagerDialogOpen] = (0, import_react173.useState)(false);
|
|
488174
|
+
const openExtensionsManagerDialog = (0, import_react173.useCallback)(() => {
|
|
488091
488175
|
setIsExtensionsManagerDialogOpen(true);
|
|
488092
488176
|
}, []);
|
|
488093
|
-
const closeExtensionsManagerDialog = (0,
|
|
488177
|
+
const closeExtensionsManagerDialog = (0, import_react173.useCallback)(() => {
|
|
488094
488178
|
setIsExtensionsManagerDialogOpen(false);
|
|
488095
488179
|
}, []);
|
|
488096
488180
|
return {
|
|
@@ -488102,13 +488186,13 @@ var useExtensionsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
|
488102
488186
|
|
|
488103
488187
|
// packages/cli/src/ui/hooks/useMcpDialog.ts
|
|
488104
488188
|
init_esbuild_shims();
|
|
488105
|
-
var
|
|
488189
|
+
var import_react174 = __toESM(require_react(), 1);
|
|
488106
488190
|
var useMcpDialog = /* @__PURE__ */ __name(() => {
|
|
488107
|
-
const [isMcpDialogOpen, setIsMcpDialogOpen] = (0,
|
|
488108
|
-
const openMcpDialog = (0,
|
|
488191
|
+
const [isMcpDialogOpen, setIsMcpDialogOpen] = (0, import_react174.useState)(false);
|
|
488192
|
+
const openMcpDialog = (0, import_react174.useCallback)(() => {
|
|
488109
488193
|
setIsMcpDialogOpen(true);
|
|
488110
488194
|
}, []);
|
|
488111
|
-
const closeMcpDialog = (0,
|
|
488195
|
+
const closeMcpDialog = (0, import_react174.useCallback)(() => {
|
|
488112
488196
|
setIsMcpDialogOpen(false);
|
|
488113
488197
|
}, []);
|
|
488114
488198
|
return {
|
|
@@ -488120,13 +488204,13 @@ var useMcpDialog = /* @__PURE__ */ __name(() => {
|
|
|
488120
488204
|
|
|
488121
488205
|
// packages/cli/src/ui/hooks/useHooksDialog.ts
|
|
488122
488206
|
init_esbuild_shims();
|
|
488123
|
-
var
|
|
488207
|
+
var import_react175 = __toESM(require_react(), 1);
|
|
488124
488208
|
var useHooksDialog = /* @__PURE__ */ __name(() => {
|
|
488125
|
-
const [isHooksDialogOpen, setIsHooksDialogOpen] = (0,
|
|
488126
|
-
const openHooksDialog = (0,
|
|
488209
|
+
const [isHooksDialogOpen, setIsHooksDialogOpen] = (0, import_react175.useState)(false);
|
|
488210
|
+
const openHooksDialog = (0, import_react175.useCallback)(() => {
|
|
488127
488211
|
setIsHooksDialogOpen(true);
|
|
488128
488212
|
}, []);
|
|
488129
|
-
const closeHooksDialog = (0,
|
|
488213
|
+
const closeHooksDialog = (0, import_react175.useCallback)(() => {
|
|
488130
488214
|
setIsHooksDialogOpen(false);
|
|
488131
488215
|
}, []);
|
|
488132
488216
|
return {
|
|
@@ -488138,7 +488222,7 @@ var useHooksDialog = /* @__PURE__ */ __name(() => {
|
|
|
488138
488222
|
|
|
488139
488223
|
// packages/cli/src/ui/hooks/useAttentionNotifications.ts
|
|
488140
488224
|
init_esbuild_shims();
|
|
488141
|
-
var
|
|
488225
|
+
var import_react176 = __toESM(require_react(), 1);
|
|
488142
488226
|
|
|
488143
488227
|
// packages/cli/src/utils/attentionNotification.ts
|
|
488144
488228
|
init_esbuild_shims();
|
|
@@ -488175,10 +488259,10 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
488175
488259
|
config: config2
|
|
488176
488260
|
}) => {
|
|
488177
488261
|
const terminalBellEnabled = settings2?.merged?.general?.terminalBell ?? true;
|
|
488178
|
-
const awaitingNotificationSentRef = (0,
|
|
488179
|
-
const respondingElapsedRef = (0,
|
|
488180
|
-
const idleNotificationSentRef = (0,
|
|
488181
|
-
(0,
|
|
488262
|
+
const awaitingNotificationSentRef = (0, import_react176.useRef)(false);
|
|
488263
|
+
const respondingElapsedRef = (0, import_react176.useRef)(0);
|
|
488264
|
+
const idleNotificationSentRef = (0, import_react176.useRef)(false);
|
|
488265
|
+
(0, import_react176.useEffect)(() => {
|
|
488182
488266
|
if (streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ && !isFocused && !awaitingNotificationSentRef.current) {
|
|
488183
488267
|
notifyTerminalAttention("tool_approval" /* ToolApproval */, {
|
|
488184
488268
|
enabled: terminalBellEnabled
|
|
@@ -488189,7 +488273,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
488189
488273
|
awaitingNotificationSentRef.current = false;
|
|
488190
488274
|
}
|
|
488191
488275
|
}, [isFocused, streamingState, terminalBellEnabled]);
|
|
488192
|
-
(0,
|
|
488276
|
+
(0, import_react176.useEffect)(() => {
|
|
488193
488277
|
if (streamingState === "responding" /* Responding */) {
|
|
488194
488278
|
respondingElapsedRef.current = elapsedTime;
|
|
488195
488279
|
idleNotificationSentRef.current = false;
|
|
@@ -488225,7 +488309,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
488225
488309
|
|
|
488226
488310
|
// packages/cli/src/ui/hooks/useVoice.ts
|
|
488227
488311
|
init_esbuild_shims();
|
|
488228
|
-
var
|
|
488312
|
+
var import_react177 = __toESM(require_react(), 1);
|
|
488229
488313
|
import os46 from "node:os";
|
|
488230
488314
|
import path146 from "node:path";
|
|
488231
488315
|
import fs132 from "node:fs";
|
|
@@ -488260,12 +488344,12 @@ __name(transcribe, "transcribe");
|
|
|
488260
488344
|
|
|
488261
488345
|
// packages/cli/src/ui/hooks/useVoice.ts
|
|
488262
488346
|
function useVoice(sttEndpoint, sttApiKey) {
|
|
488263
|
-
const [voiceState, setVoiceState] = (0,
|
|
488264
|
-
const [error40, setError] = (0,
|
|
488265
|
-
const procRef = (0,
|
|
488266
|
-
const audioPathRef = (0,
|
|
488267
|
-
const backend = (0,
|
|
488268
|
-
const start2 = (0,
|
|
488347
|
+
const [voiceState, setVoiceState] = (0, import_react177.useState)("idle");
|
|
488348
|
+
const [error40, setError] = (0, import_react177.useState)(null);
|
|
488349
|
+
const procRef = (0, import_react177.useRef)(null);
|
|
488350
|
+
const audioPathRef = (0, import_react177.useRef)(null);
|
|
488351
|
+
const backend = (0, import_react177.useMemo)(() => detectBackend2(), []);
|
|
488352
|
+
const start2 = (0, import_react177.useCallback)(async () => {
|
|
488269
488353
|
if (voiceState !== "idle") return;
|
|
488270
488354
|
const tmpPath = path146.join(os46.tmpdir(), `proto-voice-${Date.now()}.wav`);
|
|
488271
488355
|
audioPathRef.current = tmpPath;
|
|
@@ -488278,7 +488362,7 @@ function useVoice(sttEndpoint, sttApiKey) {
|
|
|
488278
488362
|
setError(e4 instanceof Error ? e4.message : String(e4));
|
|
488279
488363
|
}
|
|
488280
488364
|
}, [voiceState, backend]);
|
|
488281
|
-
const stop3 = (0,
|
|
488365
|
+
const stop3 = (0, import_react177.useCallback)(async () => {
|
|
488282
488366
|
if (voiceState !== "recording" || !procRef.current || !audioPathRef.current) {
|
|
488283
488367
|
return "";
|
|
488284
488368
|
}
|
|
@@ -488311,7 +488395,7 @@ function useVoice(sttEndpoint, sttApiKey) {
|
|
|
488311
488395
|
return "";
|
|
488312
488396
|
}
|
|
488313
488397
|
}, [voiceState, sttEndpoint, sttApiKey]);
|
|
488314
|
-
const reset = (0,
|
|
488398
|
+
const reset = (0, import_react177.useCallback)(() => {
|
|
488315
488399
|
setVoiceState("idle");
|
|
488316
488400
|
setError(null);
|
|
488317
488401
|
}, []);
|
|
@@ -488346,21 +488430,21 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488346
488430
|
const { settings: settings2, config: config2, initializationResult } = props;
|
|
488347
488431
|
const historyManager = useHistory();
|
|
488348
488432
|
useMemoryMonitor(historyManager);
|
|
488349
|
-
const [debugMessage, setDebugMessage] = (0,
|
|
488350
|
-
const [quittingMessages, setQuittingMessages] = (0,
|
|
488351
|
-
const [themeError, setThemeError] = (0,
|
|
488433
|
+
const [debugMessage, setDebugMessage] = (0, import_react178.useState)("");
|
|
488434
|
+
const [quittingMessages, setQuittingMessages] = (0, import_react178.useState)(null);
|
|
488435
|
+
const [themeError, setThemeError] = (0, import_react178.useState)(
|
|
488352
488436
|
initializationResult.themeError
|
|
488353
488437
|
);
|
|
488354
|
-
const [isProcessing, setIsProcessing] = (0,
|
|
488355
|
-
const [embeddedShellFocused, setEmbeddedShellFocused] = (0,
|
|
488356
|
-
const [geminiMdFileCount, setGeminiMdFileCount] = (0,
|
|
488438
|
+
const [isProcessing, setIsProcessing] = (0, import_react178.useState)(false);
|
|
488439
|
+
const [embeddedShellFocused, setEmbeddedShellFocused] = (0, import_react178.useState)(false);
|
|
488440
|
+
const [geminiMdFileCount, setGeminiMdFileCount] = (0, import_react178.useState)(
|
|
488357
488441
|
initializationResult.geminiMdFileCount
|
|
488358
488442
|
);
|
|
488359
|
-
const [shellModeActive, setShellModeActive] = (0,
|
|
488360
|
-
const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = (0,
|
|
488361
|
-
const [historyRemountKey, setHistoryRemountKey] = (0,
|
|
488362
|
-
const [updateInfo, setUpdateInfo] = (0,
|
|
488363
|
-
const [isTrustedFolder, setIsTrustedFolder] = (0,
|
|
488443
|
+
const [shellModeActive, setShellModeActive] = (0, import_react178.useState)(false);
|
|
488444
|
+
const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = (0, import_react178.useState)(false);
|
|
488445
|
+
const [historyRemountKey, setHistoryRemountKey] = (0, import_react178.useState)(0);
|
|
488446
|
+
const [updateInfo, setUpdateInfo] = (0, import_react178.useState)(null);
|
|
488447
|
+
const [isTrustedFolder, setIsTrustedFolder] = (0, import_react178.useState)(
|
|
488364
488448
|
config2.isTrustedFolder()
|
|
488365
488449
|
);
|
|
488366
488450
|
const extensionManager = config2.getExtensionManager();
|
|
@@ -488415,43 +488499,43 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488415
488499
|
config2.getWorkingDir()
|
|
488416
488500
|
);
|
|
488417
488501
|
const { codingPlanUpdateRequest, dismissCodingPlanUpdate } = useCodingPlanUpdates(settings2, config2, historyManager.addItem);
|
|
488418
|
-
const [isTrustDialogOpen, setTrustDialogOpen] = (0,
|
|
488419
|
-
const openTrustDialog = (0,
|
|
488420
|
-
const closeTrustDialog = (0,
|
|
488421
|
-
const [isPermissionsDialogOpen, setPermissionsDialogOpen] = (0,
|
|
488422
|
-
const openPermissionsDialog = (0,
|
|
488502
|
+
const [isTrustDialogOpen, setTrustDialogOpen] = (0, import_react178.useState)(false);
|
|
488503
|
+
const openTrustDialog = (0, import_react178.useCallback)(() => setTrustDialogOpen(true), []);
|
|
488504
|
+
const closeTrustDialog = (0, import_react178.useCallback)(() => setTrustDialogOpen(false), []);
|
|
488505
|
+
const [isPermissionsDialogOpen, setPermissionsDialogOpen] = (0, import_react178.useState)(false);
|
|
488506
|
+
const openPermissionsDialog = (0, import_react178.useCallback)(
|
|
488423
488507
|
() => setPermissionsDialogOpen(true),
|
|
488424
488508
|
[]
|
|
488425
488509
|
);
|
|
488426
|
-
const closePermissionsDialog = (0,
|
|
488510
|
+
const closePermissionsDialog = (0, import_react178.useCallback)(
|
|
488427
488511
|
() => setPermissionsDialogOpen(false),
|
|
488428
488512
|
[]
|
|
488429
488513
|
);
|
|
488430
|
-
const [currentModel, setCurrentModel] = (0,
|
|
488431
|
-
const [isConfigInitialized, setConfigInitialized] = (0,
|
|
488432
|
-
const [userMessages, setUserMessages] = (0,
|
|
488514
|
+
const [currentModel, setCurrentModel] = (0, import_react178.useState)(() => config2.getModel());
|
|
488515
|
+
const [isConfigInitialized, setConfigInitialized] = (0, import_react178.useState)(false);
|
|
488516
|
+
const [userMessages, setUserMessages] = (0, import_react178.useState)([]);
|
|
488433
488517
|
const { columns: terminalWidth, rows: terminalHeight } = useTerminalSize();
|
|
488434
488518
|
const { stdin: stdin3, setRawMode } = use_stdin_default();
|
|
488435
488519
|
const { stdout: stdout3 } = use_stdout_default();
|
|
488436
488520
|
const { stats: sessionStats, startNewSession } = useSessionStats();
|
|
488437
488521
|
const logger10 = useLogger(config2.storage, sessionStats.sessionId);
|
|
488438
488522
|
const branchName = useGitBranchName(config2.getTargetDir());
|
|
488439
|
-
const mainControlsRef = (0,
|
|
488523
|
+
const mainControlsRef = (0, import_react178.useRef)(null);
|
|
488440
488524
|
const staticExtraHeight = 3;
|
|
488441
|
-
const [sessionName, setSessionName] = (0,
|
|
488525
|
+
const [sessionName, setSessionName] = (0, import_react178.useState)(null);
|
|
488442
488526
|
useInitializationEffects(
|
|
488443
488527
|
config2,
|
|
488444
488528
|
historyManager,
|
|
488445
488529
|
setConfigInitialized,
|
|
488446
488530
|
setSessionName
|
|
488447
488531
|
);
|
|
488448
|
-
(0,
|
|
488532
|
+
(0, import_react178.useEffect)(
|
|
488449
488533
|
() => setUpdateHandler(historyManager.addItem, setUpdateInfo),
|
|
488450
488534
|
[historyManager.addItem]
|
|
488451
488535
|
);
|
|
488452
488536
|
const { lastFinished } = useBackgroundAgentProgress();
|
|
488453
488537
|
const addHistoryItem = historyManager.addItem;
|
|
488454
|
-
(0,
|
|
488538
|
+
(0, import_react178.useEffect)(() => {
|
|
488455
488539
|
if (!lastFinished?.hitLimit) return;
|
|
488456
488540
|
addHistoryItem(
|
|
488457
488541
|
{
|
|
@@ -488461,19 +488545,19 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488461
488545
|
Date.now()
|
|
488462
488546
|
);
|
|
488463
488547
|
}, [lastFinished, addHistoryItem]);
|
|
488464
|
-
(0,
|
|
488548
|
+
(0, import_react178.useEffect)(() => {
|
|
488465
488549
|
const unsubscribe = config2.onModelChange((model) => {
|
|
488466
488550
|
setCurrentModel(model);
|
|
488467
488551
|
});
|
|
488468
488552
|
return unsubscribe;
|
|
488469
488553
|
}, [config2]);
|
|
488470
|
-
const { inputWidth, suggestionsWidth } = (0,
|
|
488554
|
+
const { inputWidth, suggestionsWidth } = (0, import_react178.useMemo)(() => {
|
|
488471
488555
|
const { inputWidth: inputWidth2, suggestionsWidth: suggestionsWidth2 } = calculatePromptWidths(terminalWidth);
|
|
488472
488556
|
return { inputWidth: inputWidth2, suggestionsWidth: suggestionsWidth2 };
|
|
488473
488557
|
}, [terminalWidth]);
|
|
488474
488558
|
const mainAreaWidth = Math.min(terminalWidth - 4, 100);
|
|
488475
488559
|
const staticAreaMaxItemHeight = Math.max(terminalHeight * 4, 100);
|
|
488476
|
-
const isValidPath = (0,
|
|
488560
|
+
const isValidPath = (0, import_react178.useCallback)((filePath) => {
|
|
488477
488561
|
try {
|
|
488478
488562
|
return fs133.existsSync(filePath) && fs133.statSync(filePath).isFile();
|
|
488479
488563
|
} catch (_e2) {
|
|
@@ -488488,7 +488572,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488488
488572
|
isValidPath,
|
|
488489
488573
|
shellModeActive
|
|
488490
488574
|
});
|
|
488491
|
-
(0,
|
|
488575
|
+
(0, import_react178.useEffect)(() => {
|
|
488492
488576
|
const fetchUserMessages = /* @__PURE__ */ __name(async () => {
|
|
488493
488577
|
const pastMessagesRaw = await logger10?.getPreviousUserMessages() || [];
|
|
488494
488578
|
const currentSessionUserMessages = historyManager.history.filter(
|
|
@@ -488511,13 +488595,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488511
488595
|
}, "fetchUserMessages");
|
|
488512
488596
|
fetchUserMessages();
|
|
488513
488597
|
}, [historyManager.history, logger10]);
|
|
488514
|
-
const refreshStatic = (0,
|
|
488598
|
+
const refreshStatic = (0, import_react178.useCallback)(() => {
|
|
488515
488599
|
stdout3.write("\x1B[?2026h");
|
|
488516
488600
|
stdout3.write(base_exports.clearTerminal);
|
|
488517
488601
|
stdout3.write("\x1B[?2026l");
|
|
488518
488602
|
setHistoryRemountKey((prev) => prev + 1);
|
|
488519
488603
|
}, [setHistoryRemountKey, stdout3]);
|
|
488520
|
-
(0,
|
|
488604
|
+
(0, import_react178.useEffect)(() => {
|
|
488521
488605
|
const unsubscribe = config2.onModelChange((model) => {
|
|
488522
488606
|
setCurrentModel((prev) => {
|
|
488523
488607
|
if (prev === model) {
|
|
@@ -488559,7 +488643,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488559
488643
|
cancelAuthentication
|
|
488560
488644
|
} = useAuthCommand(settings2, config2, historyManager.addItem, refreshStatic);
|
|
488561
488645
|
useInitializationAuthError(initializationResult.authError, onAuthError);
|
|
488562
|
-
(0,
|
|
488646
|
+
(0, import_react178.useEffect)(() => {
|
|
488563
488647
|
const currentAuthType = config2.getModelsConfig().getCurrentAuthType();
|
|
488564
488648
|
if (settings2.merged.security?.auth?.enforcedType && currentAuthType && settings2.merged.security?.auth.enforcedType !== currentAuthType) {
|
|
488565
488649
|
onAuthError(
|
|
@@ -488585,7 +488669,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488585
488669
|
config2,
|
|
488586
488670
|
onAuthError
|
|
488587
488671
|
]);
|
|
488588
|
-
const [editorError, setEditorError] = (0,
|
|
488672
|
+
const [editorError, setEditorError] = (0, import_react178.useState)(null);
|
|
488589
488673
|
const {
|
|
488590
488674
|
isEditorDialogOpen,
|
|
488591
488675
|
openEditorDialog,
|
|
@@ -488639,10 +488723,10 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488639
488723
|
} = useExtensionsManagerDialog();
|
|
488640
488724
|
const { isMcpDialogOpen, openMcpDialog, closeMcpDialog } = useMcpDialog();
|
|
488641
488725
|
const { isHooksDialogOpen, openHooksDialog, closeHooksDialog } = useHooksDialog();
|
|
488642
|
-
const [isRewindDialogOpen, setIsRewindDialogOpen] = (0,
|
|
488643
|
-
const openRewindDialog = (0,
|
|
488644
|
-
const closeRewindDialog = (0,
|
|
488645
|
-
const slashCommandActions = (0,
|
|
488726
|
+
const [isRewindDialogOpen, setIsRewindDialogOpen] = (0, import_react178.useState)(false);
|
|
488727
|
+
const openRewindDialog = (0, import_react178.useCallback)(() => setIsRewindDialogOpen(true), []);
|
|
488728
|
+
const closeRewindDialog = (0, import_react178.useCallback)(() => setIsRewindDialogOpen(false), []);
|
|
488729
|
+
const slashCommandActions = (0, import_react178.useMemo)(
|
|
488646
488730
|
() => ({
|
|
488647
488731
|
openAuthDialog,
|
|
488648
488732
|
openThemeDialog,
|
|
@@ -488723,14 +488807,14 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488723
488807
|
logger10,
|
|
488724
488808
|
setSessionName
|
|
488725
488809
|
);
|
|
488726
|
-
const onDebugMessage = (0,
|
|
488810
|
+
const onDebugMessage = (0, import_react178.useCallback)(
|
|
488727
488811
|
(message) => {
|
|
488728
488812
|
config2.getDebugLogger().debug(message);
|
|
488729
488813
|
},
|
|
488730
488814
|
[config2]
|
|
488731
488815
|
);
|
|
488732
488816
|
const stableAddItem = historyManager.addItem;
|
|
488733
|
-
const performMemoryRefresh = (0,
|
|
488817
|
+
const performMemoryRefresh = (0, import_react178.useCallback)(async () => {
|
|
488734
488818
|
stableAddItem(
|
|
488735
488819
|
{
|
|
488736
488820
|
type: "info" /* INFO */,
|
|
@@ -488776,7 +488860,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488776
488860
|
debugLogger159.error("Error refreshing memory:", error40);
|
|
488777
488861
|
}
|
|
488778
488862
|
}, [config2, stableAddItem, settings2.merged]);
|
|
488779
|
-
const cancelHandlerRef = (0,
|
|
488863
|
+
const cancelHandlerRef = (0, import_react178.useRef)(() => {
|
|
488780
488864
|
});
|
|
488781
488865
|
const { messageQueue, addMessage, popLast, drain } = useMessageQueue();
|
|
488782
488866
|
const voiceEnabled = settings2.merged.voice?.enabled ?? false;
|
|
@@ -488828,7 +488912,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488828
488912
|
drain,
|
|
488829
488913
|
submitQuery
|
|
488830
488914
|
);
|
|
488831
|
-
const [hasSuggestionsVisible, setHasSuggestionsVisible] = (0,
|
|
488915
|
+
const [hasSuggestionsVisible, setHasSuggestionsVisible] = (0, import_react178.useState)(false);
|
|
488832
488916
|
const agentViewState = useAgentViewState();
|
|
488833
488917
|
const geminiClient = config2.getGeminiClient();
|
|
488834
488918
|
const showAutoAcceptIndicator = useAutoAcceptIndicator({
|
|
@@ -488856,7 +488940,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488856
488940
|
settingInputRequests,
|
|
488857
488941
|
pendingGeminiHistoryItems
|
|
488858
488942
|
});
|
|
488859
|
-
const handleFinalSubmit = (0,
|
|
488943
|
+
const handleFinalSubmit = (0, import_react178.useCallback)(
|
|
488860
488944
|
(submittedValue) => {
|
|
488861
488945
|
if (agentViewState.activeView !== "main") {
|
|
488862
488946
|
const agent = agentViewState.agents.get(agentViewState.activeView);
|
|
@@ -488971,7 +489055,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488971
489055
|
handleWelcomeBackSelection,
|
|
488972
489056
|
handleWelcomeBackClose
|
|
488973
489057
|
} = useWelcomeBack(config2, handleFinalSubmit, buffer, settings2.merged);
|
|
488974
|
-
cancelHandlerRef.current = (0,
|
|
489058
|
+
cancelHandlerRef.current = (0, import_react178.useCallback)(() => {
|
|
488975
489059
|
const pendingHistoryItems2 = [
|
|
488976
489060
|
...pendingSlashCommandHistoryItems,
|
|
488977
489061
|
...pendingGeminiHistoryItems
|
|
@@ -488996,15 +489080,15 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488996
489080
|
pendingSlashCommandHistoryItems,
|
|
488997
489081
|
pendingGeminiHistoryItems
|
|
488998
489082
|
]);
|
|
488999
|
-
const handleClearScreen = (0,
|
|
489083
|
+
const handleClearScreen = (0, import_react178.useCallback)(() => {
|
|
489000
489084
|
historyManager.clearItems();
|
|
489001
489085
|
clearScreen2();
|
|
489002
489086
|
refreshStatic();
|
|
489003
489087
|
}, [historyManager, refreshStatic]);
|
|
489004
489088
|
const { handleInput: vimHandleInput } = useVim(buffer, handleFinalSubmit);
|
|
489005
489089
|
const isInputActive = !initError && !isProcessing && (streamingState === "idle" /* Idle */ || streamingState === "responding" /* Responding */);
|
|
489006
|
-
const [controlsHeight, setControlsHeight] = (0,
|
|
489007
|
-
(0,
|
|
489090
|
+
const [controlsHeight, setControlsHeight] = (0, import_react178.useState)(0);
|
|
489091
|
+
(0, import_react178.useLayoutEffect)(() => {
|
|
489008
489092
|
if (mainControlsRef.current) {
|
|
489009
489093
|
const fullFooterMeasurement = measure_element_default(mainControlsRef.current);
|
|
489010
489094
|
if (fullFooterMeasurement.height > 0) {
|
|
@@ -489037,13 +489121,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
489037
489121
|
history: historyManager.history,
|
|
489038
489122
|
awayThresholdMinutes: settings2.merged.general?.sessionRecapAwayThresholdMinutes
|
|
489039
489123
|
});
|
|
489040
|
-
const contextFileNames = (0,
|
|
489124
|
+
const contextFileNames = (0, import_react178.useMemo)(() => {
|
|
489041
489125
|
const fromSettings = settings2.merged.context?.fileName;
|
|
489042
489126
|
return fromSettings ? Array.isArray(fromSettings) ? fromSettings : [fromSettings] : getAllGeminiMdFilenames();
|
|
489043
489127
|
}, [settings2.merged.context?.fileName]);
|
|
489044
|
-
const initialPrompt = (0,
|
|
489045
|
-
const initialPromptSubmitted = (0,
|
|
489046
|
-
(0,
|
|
489128
|
+
const initialPrompt = (0, import_react178.useMemo)(() => config2.getQuestion(), [config2]);
|
|
489129
|
+
const initialPromptSubmitted = (0, import_react178.useRef)(false);
|
|
489130
|
+
(0, import_react178.useEffect)(() => {
|
|
489047
489131
|
if (activePtyId) {
|
|
489048
489132
|
ShellExecutionService.resizePty(
|
|
489049
489133
|
activePtyId,
|
|
@@ -489052,7 +489136,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
489052
489136
|
);
|
|
489053
489137
|
}
|
|
489054
489138
|
}, [terminalWidth, availableTerminalHeight, activePtyId]);
|
|
489055
|
-
(0,
|
|
489139
|
+
(0, import_react178.useEffect)(() => {
|
|
489056
489140
|
if (initialPrompt && isConfigInitialized && !initialPromptSubmitted.current && !isAuthenticating && !isAuthDialogOpen && !isThemeDialogOpen && !isEditorDialogOpen && !showWelcomeBackDialog && welcomeBackChoice !== "restart" && geminiClient?.isInitialized?.()) {
|
|
489057
489141
|
handleFinalSubmit(initialPrompt);
|
|
489058
489142
|
initialPromptSubmitted.current = true;
|
|
@@ -489069,9 +489153,9 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
489069
489153
|
welcomeBackChoice,
|
|
489070
489154
|
geminiClient
|
|
489071
489155
|
]);
|
|
489072
|
-
const [idePromptAnswered, setIdePromptAnswered] = (0,
|
|
489073
|
-
const [currentIDE, setCurrentIDE] = (0,
|
|
489074
|
-
(0,
|
|
489156
|
+
const [idePromptAnswered, setIdePromptAnswered] = (0, import_react178.useState)(false);
|
|
489157
|
+
const [currentIDE, setCurrentIDE] = (0, import_react178.useState)(null);
|
|
489158
|
+
(0, import_react178.useEffect)(() => {
|
|
489075
489159
|
const getIde = /* @__PURE__ */ __name(async () => {
|
|
489076
489160
|
const ideClient = await IdeClient.getInstance();
|
|
489077
489161
|
const currentIde = ideClient.getCurrentIde();
|
|
@@ -489087,24 +489171,24 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
489087
489171
|
tomlFiles: commandMigrationTomlFiles,
|
|
489088
489172
|
setShowMigrationNudge: setShowCommandMigrationNudge
|
|
489089
489173
|
} = useCommandMigration(settings2, config2.storage);
|
|
489090
|
-
const [ideContextState, setIdeContextState] = (0,
|
|
489091
|
-
const [showIdeRestartPrompt, setShowIdeRestartPrompt] = (0,
|
|
489174
|
+
const [ideContextState, setIdeContextState] = (0, import_react178.useState)();
|
|
489175
|
+
const [showIdeRestartPrompt, setShowIdeRestartPrompt] = (0, import_react178.useState)(false);
|
|
489092
489176
|
const { isFolderTrustDialogOpen, handleFolderTrustSelect, isRestarting } = useFolderTrust(settings2, setIsTrustedFolder);
|
|
489093
489177
|
const {
|
|
489094
489178
|
needsRestart: ideNeedsRestart,
|
|
489095
489179
|
restartReason: ideTrustRestartReason
|
|
489096
489180
|
} = useIdeTrustListener();
|
|
489097
|
-
(0,
|
|
489181
|
+
(0, import_react178.useEffect)(() => {
|
|
489098
489182
|
if (ideNeedsRestart) {
|
|
489099
489183
|
setShowIdeRestartPrompt(true);
|
|
489100
489184
|
}
|
|
489101
489185
|
}, [ideNeedsRestart]);
|
|
489102
|
-
(0,
|
|
489186
|
+
(0, import_react178.useEffect)(() => {
|
|
489103
489187
|
const unsubscribe = ideContextStore.subscribe(setIdeContextState);
|
|
489104
489188
|
setIdeContextState(ideContextStore.get());
|
|
489105
489189
|
return unsubscribe;
|
|
489106
489190
|
}, []);
|
|
489107
|
-
const handleIdePromptComplete = (0,
|
|
489191
|
+
const handleIdePromptComplete = (0, import_react178.useCallback)(
|
|
489108
489192
|
(result) => {
|
|
489109
489193
|
if (result.userSelection === "yes") {
|
|
489110
489194
|
if (result.isExtensionPreInstalled) {
|
|
@@ -489120,7 +489204,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
489120
489204
|
},
|
|
489121
489205
|
[handleSlashCommand2, settings2]
|
|
489122
489206
|
);
|
|
489123
|
-
const handleCommandMigrationComplete = (0,
|
|
489207
|
+
const handleCommandMigrationComplete = (0, import_react178.useCallback)(
|
|
489124
489208
|
async (result) => {
|
|
489125
489209
|
setShowCommandMigrationNudge(false);
|
|
489126
489210
|
if (result.userSelection === "yes") {
|
|
@@ -489263,6 +489347,11 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
|
|
|
489263
489347
|
stdout3,
|
|
489264
489348
|
config2.getTargetDir()
|
|
489265
489349
|
);
|
|
489350
|
+
const tabStatusEnabled = !!settings2.merged.ui?.showStatusInTitle && !settings2.merged.ui?.hideWindowTitle;
|
|
489351
|
+
useTabStatus(
|
|
489352
|
+
tabStatusEnabled ? tabStatusKindForStreamingState(streamingState) : null,
|
|
489353
|
+
stdout3
|
|
489354
|
+
);
|
|
489266
489355
|
const nightly = props.version.includes("nightly");
|
|
489267
489356
|
const dialogsVisible = showWelcomeBackDialog || shouldShowIdePrompt || shouldShowCommandMigrationNudge || isFolderTrustDialogOpen || !!shellConfirmationRequest || !!confirmationRequest || confirmUpdateExtensionRequests.length > 0 || !!codingPlanUpdateRequest || settingInputRequests.length > 0 || pluginChoiceRequests.length > 0 || !!loopDetectionConfirmationRequest || isThemeDialogOpen || isSettingsDialogOpen || isModelDialogOpen || isTrustDialogOpen || isPermissionsDialogOpen || isAuthDialogOpen || isAuthenticating || isEditorDialogOpen || showIdeRestartPrompt || isSubagentCreateDialogOpen || isAgentsManagerDialogOpen || isMcpDialogOpen || isHooksDialogOpen || isApprovalModeDialogOpen || isResumeDialogOpen || isRewindDialogOpen || isDeleteDialogOpen || isExtensionsManagerDialogOpen;
|
|
489268
489357
|
dialogsVisibleRef.current = dialogsVisible;
|
|
@@ -489279,11 +489368,11 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
|
|
|
489279
489368
|
history: historyManager.history,
|
|
489280
489369
|
sessionStats
|
|
489281
489370
|
});
|
|
489282
|
-
const pendingHistoryItems = (0,
|
|
489371
|
+
const pendingHistoryItems = (0, import_react178.useMemo)(
|
|
489283
489372
|
() => [...pendingSlashCommandHistoryItems, ...pendingGeminiHistoryItems],
|
|
489284
489373
|
[pendingSlashCommandHistoryItems, pendingGeminiHistoryItems]
|
|
489285
489374
|
);
|
|
489286
|
-
const uiState = (0,
|
|
489375
|
+
const uiState = (0, import_react178.useMemo)(
|
|
489287
489376
|
() => ({
|
|
489288
489377
|
history: historyManager.history,
|
|
489289
489378
|
historyManager,
|
|
@@ -489520,7 +489609,7 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
|
|
|
489520
489609
|
isTranscriptOpen
|
|
489521
489610
|
]
|
|
489522
489611
|
);
|
|
489523
|
-
const uiActions = (0,
|
|
489612
|
+
const uiActions = (0, import_react178.useMemo)(
|
|
489524
489613
|
() => ({
|
|
489525
489614
|
openThemeDialog,
|
|
489526
489615
|
openEditorDialog,
|
|
@@ -489677,9 +489766,9 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
|
|
|
489677
489766
|
|
|
489678
489767
|
// packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts
|
|
489679
489768
|
init_esbuild_shims();
|
|
489680
|
-
var
|
|
489769
|
+
var import_react179 = __toESM(require_react(), 1);
|
|
489681
489770
|
function useKittyKeyboardProtocol() {
|
|
489682
|
-
const [status] = (0,
|
|
489771
|
+
const [status] = (0, import_react179.useState)({
|
|
489683
489772
|
supported: isKittyProtocolSupported(),
|
|
489684
489773
|
enabled: isKittyProtocolEnabled(),
|
|
489685
489774
|
checking: false
|
|
@@ -490659,7 +490748,7 @@ __name(validateNonInteractiveAuth, "validateNonInteractiveAuth");
|
|
|
490659
490748
|
|
|
490660
490749
|
// packages/cli/src/ui/components/StandaloneSessionPicker.tsx
|
|
490661
490750
|
init_esbuild_shims();
|
|
490662
|
-
var
|
|
490751
|
+
var import_react180 = __toESM(require_react(), 1);
|
|
490663
490752
|
init_dist4();
|
|
490664
490753
|
var import_jsx_runtime140 = __toESM(require_jsx_runtime(), 1);
|
|
490665
490754
|
var PREVIEW_CONFIG_STUB = {
|
|
@@ -490680,7 +490769,7 @@ function StandalonePickerScreen({
|
|
|
490680
490769
|
initialSessions
|
|
490681
490770
|
}) {
|
|
490682
490771
|
const { exit } = use_app_default();
|
|
490683
|
-
const [isExiting, setIsExiting] = (0,
|
|
490772
|
+
const [isExiting, setIsExiting] = (0, import_react180.useState)(false);
|
|
490684
490773
|
const handleExit = /* @__PURE__ */ __name(() => {
|
|
490685
490774
|
setIsExiting(true);
|
|
490686
490775
|
exit();
|
|
@@ -493785,7 +493874,7 @@ var QwenAgent = class {
|
|
|
493785
493874
|
async initialize(args2) {
|
|
493786
493875
|
this.clientCapabilities = args2.clientCapabilities;
|
|
493787
493876
|
const authMethods = buildAuthMethods();
|
|
493788
|
-
const version2 = "0.
|
|
493877
|
+
const version2 = "0.55.0";
|
|
493789
493878
|
return {
|
|
493790
493879
|
protocolVersion: PROTOCOL_VERSION,
|
|
493791
493880
|
agentInfo: {
|
|
@@ -494240,11 +494329,11 @@ var QwenAgent = class {
|
|
|
494240
494329
|
|
|
494241
494330
|
// packages/cli/src/ui/utils/terminalRedrawOptimizer.ts
|
|
494242
494331
|
init_esbuild_shims();
|
|
494243
|
-
var
|
|
494244
|
-
var ERASE_LINE = `${
|
|
494245
|
-
var CURSOR_UP_ONE = `${
|
|
494246
|
-
var CURSOR_DOWN_ONE = `${
|
|
494247
|
-
var CURSOR_LEFT = `${
|
|
494332
|
+
var ESC5 = "\x1B[";
|
|
494333
|
+
var ERASE_LINE = `${ESC5}2K`;
|
|
494334
|
+
var CURSOR_UP_ONE = `${ESC5}1A`;
|
|
494335
|
+
var CURSOR_DOWN_ONE = `${ESC5}1B`;
|
|
494336
|
+
var CURSOR_LEFT = `${ESC5}G`;
|
|
494248
494337
|
var MULTILINE_ERASE_LINES_PATTERN = new RegExp(
|
|
494249
494338
|
`(?:${escapeRegExp(ERASE_LINE + CURSOR_UP_ONE)})+${escapeRegExp(
|
|
494250
494339
|
ERASE_LINE + CURSOR_LEFT
|
|
@@ -494290,14 +494379,14 @@ function optimizeMultilineEraseLinesWithCount(output) {
|
|
|
494290
494379
|
return sequence;
|
|
494291
494380
|
}
|
|
494292
494381
|
optimizedSequenceCount += 1;
|
|
494293
|
-
let boundedErase = `${
|
|
494382
|
+
let boundedErase = `${ESC5}${cursorUpCount}A`;
|
|
494294
494383
|
for (let line = 0; line < lineCount; line++) {
|
|
494295
494384
|
boundedErase += ERASE_LINE;
|
|
494296
494385
|
if (line < lineCount - 1) {
|
|
494297
494386
|
boundedErase += CURSOR_DOWN_ONE;
|
|
494298
494387
|
}
|
|
494299
494388
|
}
|
|
494300
|
-
return `${boundedErase}${
|
|
494389
|
+
return `${boundedErase}${ESC5}${cursorUpCount}A${CURSOR_LEFT}`;
|
|
494301
494390
|
}
|
|
494302
494391
|
);
|
|
494303
494392
|
return { output: optimizedOutput, optimizedSequenceCount };
|
|
@@ -494528,7 +494617,7 @@ async function startInteractiveUI(config2, settings2, startupWarnings, workspace
|
|
|
494528
494617
|
) });
|
|
494529
494618
|
}, "AppWrapper");
|
|
494530
494619
|
const instance2 = render_default(
|
|
494531
|
-
process.env["DEBUG"] ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
494620
|
+
process.env["DEBUG"] ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_react181.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(AppWrapper, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(AppWrapper, {}),
|
|
494532
494621
|
{
|
|
494533
494622
|
exitOnCtrlC: false,
|
|
494534
494623
|
patchConsole: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protolabsai/proto",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.0",
|
|
4
4
|
"description": "proto - AI-powered coding agent",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"bundled"
|
|
22
22
|
],
|
|
23
23
|
"config": {
|
|
24
|
-
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.
|
|
24
|
+
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.55.0"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {},
|
|
27
27
|
"optionalDependencies": {
|