@protolabsai/proto 0.54.0 → 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 +275 -202
- 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";
|
|
@@ -405845,7 +405845,7 @@ var SETTINGS_SCHEMA = {
|
|
|
405845
405845
|
category: "UI",
|
|
405846
405846
|
requiresRestart: false,
|
|
405847
405847
|
default: true,
|
|
405848
|
-
description: "Show proto status and thoughts in the terminal window/tab title, with
|
|
405848
|
+
description: "Show proto status and thoughts in the terminal window/tab title, prefixed with a status dot (\u25CF working / \u25CB idle) so you can tell which tabs are active. Set to false to leave the title untouched.",
|
|
405849
405849
|
showInDialog: false
|
|
405850
405850
|
},
|
|
405851
405851
|
hideTips: {
|
|
@@ -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)),
|
|
@@ -484174,38 +484174,22 @@ function computeWindowTitle(folderName) {
|
|
|
484174
484174
|
__name(computeWindowTitle, "computeWindowTitle");
|
|
484175
484175
|
|
|
484176
484176
|
// packages/cli/src/ui/hooks/useWindowTitle.ts
|
|
484177
|
-
var
|
|
484178
|
-
var
|
|
484177
|
+
var GLYPH_ACTIVE = "\u25CF";
|
|
484178
|
+
var GLYPH_IDLE = "\u25CB";
|
|
484179
484179
|
function useWindowTitle(streamingState, thought, settings2, stdout3, targetDir) {
|
|
484180
484180
|
const originalTitleRef = (0, import_react160.useRef)(computeWindowTitle(basename31(targetDir)));
|
|
484181
484181
|
const lastTitleRef = (0, import_react160.useRef)(null);
|
|
484182
484182
|
(0, import_react160.useEffect)(() => {
|
|
484183
484183
|
if (!settings2.merged.ui?.showStatusInTitle || settings2.merged.ui?.hideWindowTitle)
|
|
484184
484184
|
return;
|
|
484185
|
-
const
|
|
484186
|
-
|
|
484187
|
-
|
|
484185
|
+
const isActive = streamingState === "responding" /* Responding */;
|
|
484186
|
+
const glyph = isActive ? GLYPH_ACTIVE : GLYPH_IDLE;
|
|
484187
|
+
const text = streamingState === "idle" /* Idle */ ? originalTitleRef.current : thought?.subject?.replace(/[\r\n]+/g, " ").substring(0, 80) || originalTitleRef.current;
|
|
484188
|
+
const paddedTitle = `${glyph} ${text}`.padEnd(80, " ");
|
|
484189
|
+
if (lastTitleRef.current !== paddedTitle) {
|
|
484188
484190
|
lastTitleRef.current = paddedTitle;
|
|
484189
484191
|
stdout3.write(`\x1B[?2026h\x1B]2;${paddedTitle}\x07\x1B[?2026l`);
|
|
484190
|
-
}, "writeTitle");
|
|
484191
|
-
if (streamingState === "idle" /* Idle */) {
|
|
484192
|
-
writeTitle(originalTitleRef.current);
|
|
484193
|
-
return;
|
|
484194
484192
|
}
|
|
484195
|
-
const statusText2 = thought?.subject?.replace(/[\r\n]+/g, " ").substring(0, 80) || originalTitleRef.current;
|
|
484196
|
-
if (streamingState !== "responding" /* Responding */) {
|
|
484197
|
-
writeTitle(statusText2);
|
|
484198
|
-
return;
|
|
484199
|
-
}
|
|
484200
|
-
let frame = 0;
|
|
484201
|
-
const renderFrame = /* @__PURE__ */ __name(() => {
|
|
484202
|
-
const glyph = SPINNER_FRAMES[frame % SPINNER_FRAMES.length];
|
|
484203
|
-
writeTitle(`${glyph} ${statusText2}`);
|
|
484204
|
-
frame++;
|
|
484205
|
-
}, "renderFrame");
|
|
484206
|
-
renderFrame();
|
|
484207
|
-
const intervalId = setInterval(renderFrame, SPINNER_INTERVAL_MS);
|
|
484208
|
-
return () => clearInterval(intervalId);
|
|
484209
484193
|
}, [
|
|
484210
484194
|
streamingState,
|
|
484211
484195
|
thought,
|
|
@@ -484216,13 +484200,97 @@ function useWindowTitle(streamingState, thought, settings2, stdout3, targetDir)
|
|
|
484216
484200
|
}
|
|
484217
484201
|
__name(useWindowTitle, "useWindowTitle");
|
|
484218
484202
|
|
|
484219
|
-
// packages/cli/src/ui/hooks/
|
|
484203
|
+
// packages/cli/src/ui/hooks/useTabStatus.ts
|
|
484220
484204
|
init_esbuild_shims();
|
|
484221
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);
|
|
484222
484290
|
init_dist4();
|
|
484223
484291
|
var debugLogger155 = createDebugLogger("APP_CONTAINER");
|
|
484224
484292
|
function useInitializationEffects(config2, historyManager, setConfigInitialized, setSessionName) {
|
|
484225
|
-
(0,
|
|
484293
|
+
(0, import_react162.useEffect)(() => {
|
|
484226
484294
|
(async () => {
|
|
484227
484295
|
await config2.initialize();
|
|
484228
484296
|
setConfigInitialized(true);
|
|
@@ -484296,7 +484364,7 @@ __name(useInitializationEffects, "useInitializationEffects");
|
|
|
484296
484364
|
|
|
484297
484365
|
// packages/cli/src/ui/hooks/usePromptSuggestions.ts
|
|
484298
484366
|
init_esbuild_shims();
|
|
484299
|
-
var
|
|
484367
|
+
var import_react163 = __toESM(require_react(), 1);
|
|
484300
484368
|
init_dist4();
|
|
484301
484369
|
function usePromptSuggestions(params) {
|
|
484302
484370
|
const {
|
|
@@ -484312,17 +484380,17 @@ function usePromptSuggestions(params) {
|
|
|
484312
484380
|
settingInputRequests,
|
|
484313
484381
|
pendingGeminiHistoryItems
|
|
484314
484382
|
} = params;
|
|
484315
|
-
const [promptSuggestion, setPromptSuggestion] = (0,
|
|
484316
|
-
const prevStreamingStateRef = (0,
|
|
484317
|
-
const speculationRef = (0,
|
|
484318
|
-
const suggestionAbortRef = (0,
|
|
484319
|
-
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)(() => {
|
|
484320
484388
|
setPromptSuggestion(null);
|
|
484321
484389
|
suggestionAbortRef.current?.abort();
|
|
484322
484390
|
suggestionAbortRef.current = null;
|
|
484323
484391
|
}, []);
|
|
484324
484392
|
const followupSuggestionsEnabled = settings2.merged.ui?.enableFollowupSuggestions !== false;
|
|
484325
|
-
(0,
|
|
484393
|
+
(0, import_react163.useEffect)(() => {
|
|
484326
484394
|
if (!followupSuggestionsEnabled) {
|
|
484327
484395
|
suggestionAbortRef.current?.abort();
|
|
484328
484396
|
setPromptSuggestion(null);
|
|
@@ -484395,7 +484463,7 @@ function usePromptSuggestions(params) {
|
|
|
484395
484463
|
isPermissionsDialogOpen,
|
|
484396
484464
|
settingInputRequests
|
|
484397
484465
|
]);
|
|
484398
|
-
(0,
|
|
484466
|
+
(0, import_react163.useEffect)(() => {
|
|
484399
484467
|
if (!promptSuggestion && speculationRef.current.status !== "idle") {
|
|
484400
484468
|
abortSpeculation(speculationRef.current).catch(() => {
|
|
484401
484469
|
});
|
|
@@ -484413,7 +484481,7 @@ __name(usePromptSuggestions, "usePromptSuggestions");
|
|
|
484413
484481
|
|
|
484414
484482
|
// packages/cli/src/ui/hooks/useExitHandling.ts
|
|
484415
484483
|
init_esbuild_shims();
|
|
484416
|
-
var
|
|
484484
|
+
var import_react164 = __toESM(require_react(), 1);
|
|
484417
484485
|
function useExitHandling(params) {
|
|
484418
484486
|
const {
|
|
484419
484487
|
isAuthDialogOpen,
|
|
@@ -484423,7 +484491,7 @@ function useExitHandling(params) {
|
|
|
484423
484491
|
cancelOngoingRequest,
|
|
484424
484492
|
buffer
|
|
484425
484493
|
} = params;
|
|
484426
|
-
const handleExit = (0,
|
|
484494
|
+
const handleExit = (0, import_react164.useCallback)(
|
|
484427
484495
|
(pressedOnce, setPressedOnce, timerRef) => {
|
|
484428
484496
|
if (pressedOnce) {
|
|
484429
484497
|
if (timerRef.current) {
|
|
@@ -487566,7 +487634,7 @@ __name(setUpdateHandler, "setUpdateHandler");
|
|
|
487566
487634
|
|
|
487567
487635
|
// packages/cli/src/ui/hooks/useMessageQueue.ts
|
|
487568
487636
|
init_esbuild_shims();
|
|
487569
|
-
var
|
|
487637
|
+
var import_react165 = __toESM(require_react(), 1);
|
|
487570
487638
|
var MessageQueueStore = class {
|
|
487571
487639
|
static {
|
|
487572
487640
|
__name(this, "MessageQueueStore");
|
|
@@ -487620,15 +487688,15 @@ var MessageQueueStore = class {
|
|
|
487620
487688
|
}
|
|
487621
487689
|
};
|
|
487622
487690
|
function useMessageQueue() {
|
|
487623
|
-
const store = (0,
|
|
487624
|
-
const messageQueue = (0,
|
|
487625
|
-
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)(
|
|
487626
487694
|
(message) => store.addMessage(message),
|
|
487627
487695
|
[store]
|
|
487628
487696
|
);
|
|
487629
|
-
const clearQueue = (0,
|
|
487630
|
-
const popLast = (0,
|
|
487631
|
-
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]);
|
|
487632
487700
|
return { messageQueue, addMessage, clearQueue, popLast, drain };
|
|
487633
487701
|
}
|
|
487634
487702
|
__name(useMessageQueue, "useMessageQueue");
|
|
@@ -487636,7 +487704,7 @@ __name(useMessageQueue, "useMessageQueue");
|
|
|
487636
487704
|
// packages/cli/src/ui/hooks/useAutoAcceptIndicator.ts
|
|
487637
487705
|
init_esbuild_shims();
|
|
487638
487706
|
init_dist4();
|
|
487639
|
-
var
|
|
487707
|
+
var import_react166 = __toESM(require_react(), 1);
|
|
487640
487708
|
function useAutoAcceptIndicator({
|
|
487641
487709
|
config: config2,
|
|
487642
487710
|
addItem,
|
|
@@ -487645,8 +487713,8 @@ function useAutoAcceptIndicator({
|
|
|
487645
487713
|
disabled
|
|
487646
487714
|
}) {
|
|
487647
487715
|
const currentConfigValue = config2.getApprovalMode();
|
|
487648
|
-
const [showAutoAcceptIndicator, setShowAutoAcceptIndicator] = (0,
|
|
487649
|
-
(0,
|
|
487716
|
+
const [showAutoAcceptIndicator, setShowAutoAcceptIndicator] = (0, import_react166.useState)(currentConfigValue);
|
|
487717
|
+
(0, import_react166.useEffect)(() => {
|
|
487650
487718
|
setShowAutoAcceptIndicator(currentConfigValue);
|
|
487651
487719
|
}, [currentConfigValue]);
|
|
487652
487720
|
useKeypress(
|
|
@@ -487684,7 +487752,7 @@ __name(useAutoAcceptIndicator, "useAutoAcceptIndicator");
|
|
|
487684
487752
|
|
|
487685
487753
|
// packages/cli/src/ui/hooks/useExtensionUpdates.ts
|
|
487686
487754
|
init_esbuild_shims();
|
|
487687
|
-
var
|
|
487755
|
+
var import_react167 = __toESM(require_react(), 1);
|
|
487688
487756
|
function confirmationRequestsReducer(state, action) {
|
|
487689
487757
|
switch (action.type) {
|
|
487690
487758
|
case "add":
|
|
@@ -487701,8 +487769,8 @@ var useConfirmUpdateRequests = /* @__PURE__ */ __name(() => {
|
|
|
487701
487769
|
const [
|
|
487702
487770
|
confirmUpdateExtensionRequests,
|
|
487703
487771
|
dispatchConfirmUpdateExtensionRequests
|
|
487704
|
-
] = (0,
|
|
487705
|
-
const addConfirmUpdateExtensionRequest = (0,
|
|
487772
|
+
] = (0, import_react167.useReducer)(confirmationRequestsReducer, []);
|
|
487773
|
+
const addConfirmUpdateExtensionRequest = (0, import_react167.useCallback)(
|
|
487706
487774
|
(original) => {
|
|
487707
487775
|
const wrappedRequest = {
|
|
487708
487776
|
prompt: original.prompt,
|
|
@@ -487740,11 +487808,11 @@ function settingInputRequestsReducer(state, action) {
|
|
|
487740
487808
|
}
|
|
487741
487809
|
__name(settingInputRequestsReducer, "settingInputRequestsReducer");
|
|
487742
487810
|
var useSettingInputRequests = /* @__PURE__ */ __name(() => {
|
|
487743
|
-
const [settingInputRequests, dispatchSettingInputRequests] = (0,
|
|
487811
|
+
const [settingInputRequests, dispatchSettingInputRequests] = (0, import_react167.useReducer)(
|
|
487744
487812
|
settingInputRequestsReducer,
|
|
487745
487813
|
[]
|
|
487746
487814
|
);
|
|
487747
|
-
const addSettingInputRequest = (0,
|
|
487815
|
+
const addSettingInputRequest = (0, import_react167.useCallback)(
|
|
487748
487816
|
(original) => {
|
|
487749
487817
|
const wrappedRequest = {
|
|
487750
487818
|
settingName: original.settingName,
|
|
@@ -487791,11 +487859,11 @@ function pluginChoiceRequestsReducer(state, action) {
|
|
|
487791
487859
|
}
|
|
487792
487860
|
__name(pluginChoiceRequestsReducer, "pluginChoiceRequestsReducer");
|
|
487793
487861
|
var usePluginChoiceRequests = /* @__PURE__ */ __name(() => {
|
|
487794
|
-
const [pluginChoiceRequests, dispatchPluginChoiceRequests] = (0,
|
|
487862
|
+
const [pluginChoiceRequests, dispatchPluginChoiceRequests] = (0, import_react167.useReducer)(
|
|
487795
487863
|
pluginChoiceRequestsReducer,
|
|
487796
487864
|
[]
|
|
487797
487865
|
);
|
|
487798
|
-
const addPluginChoiceRequest = (0,
|
|
487866
|
+
const addPluginChoiceRequest = (0, import_react167.useCallback)(
|
|
487799
487867
|
(original) => {
|
|
487800
487868
|
const wrappedRequest = {
|
|
487801
487869
|
marketplaceName: original.marketplaceName,
|
|
@@ -487829,12 +487897,12 @@ var usePluginChoiceRequests = /* @__PURE__ */ __name(() => {
|
|
|
487829
487897
|
};
|
|
487830
487898
|
}, "usePluginChoiceRequests");
|
|
487831
487899
|
var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd6) => {
|
|
487832
|
-
const [extensionsUpdateState, dispatchExtensionStateUpdate] = (0,
|
|
487900
|
+
const [extensionsUpdateState, dispatchExtensionStateUpdate] = (0, import_react167.useReducer)(
|
|
487833
487901
|
extensionUpdatesReducer,
|
|
487834
487902
|
initialExtensionUpdatesState
|
|
487835
487903
|
);
|
|
487836
487904
|
const extensions = extensionManager.getLoadedExtensions();
|
|
487837
|
-
(0,
|
|
487905
|
+
(0, import_react167.useEffect)(() => {
|
|
487838
487906
|
(async () => {
|
|
487839
487907
|
const extensionsToCheck = extensions.filter((extension) => {
|
|
487840
487908
|
const currentStatus = extensionsUpdateState.extensionStatuses.get(
|
|
@@ -487862,7 +487930,7 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
|
|
|
487862
487930
|
extensionsUpdateState.extensionStatuses,
|
|
487863
487931
|
dispatchExtensionStateUpdate
|
|
487864
487932
|
]);
|
|
487865
|
-
(0,
|
|
487933
|
+
(0, import_react167.useEffect)(() => {
|
|
487866
487934
|
if (extensionsUpdateState.batchChecksInProgress > 0) {
|
|
487867
487935
|
return;
|
|
487868
487936
|
}
|
|
@@ -487921,7 +487989,7 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
|
|
|
487921
487989
|
);
|
|
487922
487990
|
}
|
|
487923
487991
|
}, [extensions, extensionManager, extensionsUpdateState, addItem, cwd6]);
|
|
487924
|
-
const extensionsUpdateStateComputed = (0,
|
|
487992
|
+
const extensionsUpdateStateComputed = (0, import_react167.useMemo)(() => {
|
|
487925
487993
|
const result = /* @__PURE__ */ new Map();
|
|
487926
487994
|
for (const [
|
|
487927
487995
|
key,
|
|
@@ -487940,15 +488008,15 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
|
|
|
487940
488008
|
|
|
487941
488009
|
// packages/cli/src/ui/hooks/useWelcomeBack.ts
|
|
487942
488010
|
init_esbuild_shims();
|
|
487943
|
-
var
|
|
488011
|
+
var import_react168 = __toESM(require_react(), 1);
|
|
487944
488012
|
init_dist4();
|
|
487945
488013
|
function useWelcomeBack(config2, submitQuery, buffer, settings2) {
|
|
487946
|
-
const [welcomeBackInfo, setWelcomeBackInfo] = (0,
|
|
487947
|
-
const [showWelcomeBackDialog, setShowWelcomeBackDialog] = (0,
|
|
487948
|
-
const [welcomeBackChoice, setWelcomeBackChoice] = (0,
|
|
487949
|
-
const [shouldFillInput, setShouldFillInput] = (0,
|
|
487950
|
-
const [inputFillText, setInputFillText] = (0,
|
|
487951
|
-
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 () => {
|
|
487952
488020
|
if (settings2.ui?.enableWelcomeBack === false) {
|
|
487953
488021
|
return;
|
|
487954
488022
|
}
|
|
@@ -487962,7 +488030,7 @@ function useWelcomeBack(config2, submitQuery, buffer, settings2) {
|
|
|
487962
488030
|
config2.getDebugLogger().debug("Welcome back check failed:", error40);
|
|
487963
488031
|
}
|
|
487964
488032
|
}, [config2, settings2.ui?.enableWelcomeBack]);
|
|
487965
|
-
const handleWelcomeBackSelection = (0,
|
|
488033
|
+
const handleWelcomeBackSelection = (0, import_react168.useCallback)(
|
|
487966
488034
|
(choice2) => {
|
|
487967
488035
|
setWelcomeBackChoice(choice2);
|
|
487968
488036
|
setShowWelcomeBackDialog(false);
|
|
@@ -487974,21 +488042,21 @@ function useWelcomeBack(config2, submitQuery, buffer, settings2) {
|
|
|
487974
488042
|
},
|
|
487975
488043
|
[welcomeBackInfo]
|
|
487976
488044
|
);
|
|
487977
|
-
const handleWelcomeBackClose = (0,
|
|
488045
|
+
const handleWelcomeBackClose = (0, import_react168.useCallback)(() => {
|
|
487978
488046
|
setWelcomeBackChoice("restart");
|
|
487979
488047
|
setShowWelcomeBackDialog(false);
|
|
487980
488048
|
}, []);
|
|
487981
|
-
const clearInputFill = (0,
|
|
488049
|
+
const clearInputFill = (0, import_react168.useCallback)(() => {
|
|
487982
488050
|
setShouldFillInput(false);
|
|
487983
488051
|
setInputFillText(null);
|
|
487984
488052
|
}, []);
|
|
487985
|
-
(0,
|
|
488053
|
+
(0, import_react168.useEffect)(() => {
|
|
487986
488054
|
if (shouldFillInput && inputFillText) {
|
|
487987
488055
|
buffer.setText(inputFillText);
|
|
487988
488056
|
clearInputFill();
|
|
487989
488057
|
}
|
|
487990
488058
|
}, [shouldFillInput, inputFillText, buffer, clearInputFill]);
|
|
487991
|
-
(0,
|
|
488059
|
+
(0, import_react168.useEffect)(() => {
|
|
487992
488060
|
checkWelcomeBack();
|
|
487993
488061
|
}, [checkWelcomeBack]);
|
|
487994
488062
|
return {
|
|
@@ -488009,9 +488077,9 @@ __name(useWelcomeBack, "useWelcomeBack");
|
|
|
488009
488077
|
|
|
488010
488078
|
// packages/cli/src/ui/hooks/useDialogClose.ts
|
|
488011
488079
|
init_esbuild_shims();
|
|
488012
|
-
var
|
|
488080
|
+
var import_react169 = __toESM(require_react(), 1);
|
|
488013
488081
|
function useDialogClose(options2) {
|
|
488014
|
-
const closeAnyOpenDialog = (0,
|
|
488082
|
+
const closeAnyOpenDialog = (0, import_react169.useCallback)(() => {
|
|
488015
488083
|
if (options2.isThemeDialogOpen) {
|
|
488016
488084
|
options2.handleThemeSelect(void 0, "User" /* User */);
|
|
488017
488085
|
return true;
|
|
@@ -488043,14 +488111,14 @@ __name(useDialogClose, "useDialogClose");
|
|
|
488043
488111
|
|
|
488044
488112
|
// packages/cli/src/ui/hooks/useInitializationAuthError.ts
|
|
488045
488113
|
init_esbuild_shims();
|
|
488046
|
-
var
|
|
488114
|
+
var import_react170 = __toESM(require_react(), 1);
|
|
488047
488115
|
var useInitializationAuthError = /* @__PURE__ */ __name((authError, onAuthError) => {
|
|
488048
|
-
const hasHandled = (0,
|
|
488049
|
-
const authErrorRef = (0,
|
|
488050
|
-
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);
|
|
488051
488119
|
authErrorRef.current = authError;
|
|
488052
488120
|
onAuthErrorRef.current = onAuthError;
|
|
488053
|
-
(0,
|
|
488121
|
+
(0, import_react170.useEffect)(() => {
|
|
488054
488122
|
if (hasHandled.current) {
|
|
488055
488123
|
return;
|
|
488056
488124
|
}
|
|
@@ -488063,13 +488131,13 @@ var useInitializationAuthError = /* @__PURE__ */ __name((authError, onAuthError)
|
|
|
488063
488131
|
|
|
488064
488132
|
// packages/cli/src/ui/hooks/useSubagentCreateDialog.ts
|
|
488065
488133
|
init_esbuild_shims();
|
|
488066
|
-
var
|
|
488134
|
+
var import_react171 = __toESM(require_react(), 1);
|
|
488067
488135
|
function useSubagentCreateDialog() {
|
|
488068
|
-
const [isSubagentCreateDialogOpen, setIsSubagentCreateDialogOpen] = (0,
|
|
488069
|
-
const openSubagentCreateDialog = (0,
|
|
488136
|
+
const [isSubagentCreateDialogOpen, setIsSubagentCreateDialogOpen] = (0, import_react171.useState)(false);
|
|
488137
|
+
const openSubagentCreateDialog = (0, import_react171.useCallback)(() => {
|
|
488070
488138
|
setIsSubagentCreateDialogOpen(true);
|
|
488071
488139
|
}, []);
|
|
488072
|
-
const closeSubagentCreateDialog = (0,
|
|
488140
|
+
const closeSubagentCreateDialog = (0, import_react171.useCallback)(() => {
|
|
488073
488141
|
setIsSubagentCreateDialogOpen(false);
|
|
488074
488142
|
}, []);
|
|
488075
488143
|
return {
|
|
@@ -488082,13 +488150,13 @@ __name(useSubagentCreateDialog, "useSubagentCreateDialog");
|
|
|
488082
488150
|
|
|
488083
488151
|
// packages/cli/src/ui/hooks/useAgentsManagerDialog.ts
|
|
488084
488152
|
init_esbuild_shims();
|
|
488085
|
-
var
|
|
488153
|
+
var import_react172 = __toESM(require_react(), 1);
|
|
488086
488154
|
var useAgentsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
488087
|
-
const [isAgentsManagerDialogOpen, setIsAgentsManagerDialogOpen] = (0,
|
|
488088
|
-
const openAgentsManagerDialog = (0,
|
|
488155
|
+
const [isAgentsManagerDialogOpen, setIsAgentsManagerDialogOpen] = (0, import_react172.useState)(false);
|
|
488156
|
+
const openAgentsManagerDialog = (0, import_react172.useCallback)(() => {
|
|
488089
488157
|
setIsAgentsManagerDialogOpen(true);
|
|
488090
488158
|
}, []);
|
|
488091
|
-
const closeAgentsManagerDialog = (0,
|
|
488159
|
+
const closeAgentsManagerDialog = (0, import_react172.useCallback)(() => {
|
|
488092
488160
|
setIsAgentsManagerDialogOpen(false);
|
|
488093
488161
|
}, []);
|
|
488094
488162
|
return {
|
|
@@ -488100,13 +488168,13 @@ var useAgentsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
|
488100
488168
|
|
|
488101
488169
|
// packages/cli/src/ui/hooks/useExtensionsManagerDialog.ts
|
|
488102
488170
|
init_esbuild_shims();
|
|
488103
|
-
var
|
|
488171
|
+
var import_react173 = __toESM(require_react(), 1);
|
|
488104
488172
|
var useExtensionsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
488105
|
-
const [isExtensionsManagerDialogOpen, setIsExtensionsManagerDialogOpen] = (0,
|
|
488106
|
-
const openExtensionsManagerDialog = (0,
|
|
488173
|
+
const [isExtensionsManagerDialogOpen, setIsExtensionsManagerDialogOpen] = (0, import_react173.useState)(false);
|
|
488174
|
+
const openExtensionsManagerDialog = (0, import_react173.useCallback)(() => {
|
|
488107
488175
|
setIsExtensionsManagerDialogOpen(true);
|
|
488108
488176
|
}, []);
|
|
488109
|
-
const closeExtensionsManagerDialog = (0,
|
|
488177
|
+
const closeExtensionsManagerDialog = (0, import_react173.useCallback)(() => {
|
|
488110
488178
|
setIsExtensionsManagerDialogOpen(false);
|
|
488111
488179
|
}, []);
|
|
488112
488180
|
return {
|
|
@@ -488118,13 +488186,13 @@ var useExtensionsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
|
488118
488186
|
|
|
488119
488187
|
// packages/cli/src/ui/hooks/useMcpDialog.ts
|
|
488120
488188
|
init_esbuild_shims();
|
|
488121
|
-
var
|
|
488189
|
+
var import_react174 = __toESM(require_react(), 1);
|
|
488122
488190
|
var useMcpDialog = /* @__PURE__ */ __name(() => {
|
|
488123
|
-
const [isMcpDialogOpen, setIsMcpDialogOpen] = (0,
|
|
488124
|
-
const openMcpDialog = (0,
|
|
488191
|
+
const [isMcpDialogOpen, setIsMcpDialogOpen] = (0, import_react174.useState)(false);
|
|
488192
|
+
const openMcpDialog = (0, import_react174.useCallback)(() => {
|
|
488125
488193
|
setIsMcpDialogOpen(true);
|
|
488126
488194
|
}, []);
|
|
488127
|
-
const closeMcpDialog = (0,
|
|
488195
|
+
const closeMcpDialog = (0, import_react174.useCallback)(() => {
|
|
488128
488196
|
setIsMcpDialogOpen(false);
|
|
488129
488197
|
}, []);
|
|
488130
488198
|
return {
|
|
@@ -488136,13 +488204,13 @@ var useMcpDialog = /* @__PURE__ */ __name(() => {
|
|
|
488136
488204
|
|
|
488137
488205
|
// packages/cli/src/ui/hooks/useHooksDialog.ts
|
|
488138
488206
|
init_esbuild_shims();
|
|
488139
|
-
var
|
|
488207
|
+
var import_react175 = __toESM(require_react(), 1);
|
|
488140
488208
|
var useHooksDialog = /* @__PURE__ */ __name(() => {
|
|
488141
|
-
const [isHooksDialogOpen, setIsHooksDialogOpen] = (0,
|
|
488142
|
-
const openHooksDialog = (0,
|
|
488209
|
+
const [isHooksDialogOpen, setIsHooksDialogOpen] = (0, import_react175.useState)(false);
|
|
488210
|
+
const openHooksDialog = (0, import_react175.useCallback)(() => {
|
|
488143
488211
|
setIsHooksDialogOpen(true);
|
|
488144
488212
|
}, []);
|
|
488145
|
-
const closeHooksDialog = (0,
|
|
488213
|
+
const closeHooksDialog = (0, import_react175.useCallback)(() => {
|
|
488146
488214
|
setIsHooksDialogOpen(false);
|
|
488147
488215
|
}, []);
|
|
488148
488216
|
return {
|
|
@@ -488154,7 +488222,7 @@ var useHooksDialog = /* @__PURE__ */ __name(() => {
|
|
|
488154
488222
|
|
|
488155
488223
|
// packages/cli/src/ui/hooks/useAttentionNotifications.ts
|
|
488156
488224
|
init_esbuild_shims();
|
|
488157
|
-
var
|
|
488225
|
+
var import_react176 = __toESM(require_react(), 1);
|
|
488158
488226
|
|
|
488159
488227
|
// packages/cli/src/utils/attentionNotification.ts
|
|
488160
488228
|
init_esbuild_shims();
|
|
@@ -488191,10 +488259,10 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
488191
488259
|
config: config2
|
|
488192
488260
|
}) => {
|
|
488193
488261
|
const terminalBellEnabled = settings2?.merged?.general?.terminalBell ?? true;
|
|
488194
|
-
const awaitingNotificationSentRef = (0,
|
|
488195
|
-
const respondingElapsedRef = (0,
|
|
488196
|
-
const idleNotificationSentRef = (0,
|
|
488197
|
-
(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)(() => {
|
|
488198
488266
|
if (streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ && !isFocused && !awaitingNotificationSentRef.current) {
|
|
488199
488267
|
notifyTerminalAttention("tool_approval" /* ToolApproval */, {
|
|
488200
488268
|
enabled: terminalBellEnabled
|
|
@@ -488205,7 +488273,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
488205
488273
|
awaitingNotificationSentRef.current = false;
|
|
488206
488274
|
}
|
|
488207
488275
|
}, [isFocused, streamingState, terminalBellEnabled]);
|
|
488208
|
-
(0,
|
|
488276
|
+
(0, import_react176.useEffect)(() => {
|
|
488209
488277
|
if (streamingState === "responding" /* Responding */) {
|
|
488210
488278
|
respondingElapsedRef.current = elapsedTime;
|
|
488211
488279
|
idleNotificationSentRef.current = false;
|
|
@@ -488241,7 +488309,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
488241
488309
|
|
|
488242
488310
|
// packages/cli/src/ui/hooks/useVoice.ts
|
|
488243
488311
|
init_esbuild_shims();
|
|
488244
|
-
var
|
|
488312
|
+
var import_react177 = __toESM(require_react(), 1);
|
|
488245
488313
|
import os46 from "node:os";
|
|
488246
488314
|
import path146 from "node:path";
|
|
488247
488315
|
import fs132 from "node:fs";
|
|
@@ -488276,12 +488344,12 @@ __name(transcribe, "transcribe");
|
|
|
488276
488344
|
|
|
488277
488345
|
// packages/cli/src/ui/hooks/useVoice.ts
|
|
488278
488346
|
function useVoice(sttEndpoint, sttApiKey) {
|
|
488279
|
-
const [voiceState, setVoiceState] = (0,
|
|
488280
|
-
const [error40, setError] = (0,
|
|
488281
|
-
const procRef = (0,
|
|
488282
|
-
const audioPathRef = (0,
|
|
488283
|
-
const backend = (0,
|
|
488284
|
-
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 () => {
|
|
488285
488353
|
if (voiceState !== "idle") return;
|
|
488286
488354
|
const tmpPath = path146.join(os46.tmpdir(), `proto-voice-${Date.now()}.wav`);
|
|
488287
488355
|
audioPathRef.current = tmpPath;
|
|
@@ -488294,7 +488362,7 @@ function useVoice(sttEndpoint, sttApiKey) {
|
|
|
488294
488362
|
setError(e4 instanceof Error ? e4.message : String(e4));
|
|
488295
488363
|
}
|
|
488296
488364
|
}, [voiceState, backend]);
|
|
488297
|
-
const stop3 = (0,
|
|
488365
|
+
const stop3 = (0, import_react177.useCallback)(async () => {
|
|
488298
488366
|
if (voiceState !== "recording" || !procRef.current || !audioPathRef.current) {
|
|
488299
488367
|
return "";
|
|
488300
488368
|
}
|
|
@@ -488327,7 +488395,7 @@ function useVoice(sttEndpoint, sttApiKey) {
|
|
|
488327
488395
|
return "";
|
|
488328
488396
|
}
|
|
488329
488397
|
}, [voiceState, sttEndpoint, sttApiKey]);
|
|
488330
|
-
const reset = (0,
|
|
488398
|
+
const reset = (0, import_react177.useCallback)(() => {
|
|
488331
488399
|
setVoiceState("idle");
|
|
488332
488400
|
setError(null);
|
|
488333
488401
|
}, []);
|
|
@@ -488362,21 +488430,21 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488362
488430
|
const { settings: settings2, config: config2, initializationResult } = props;
|
|
488363
488431
|
const historyManager = useHistory();
|
|
488364
488432
|
useMemoryMonitor(historyManager);
|
|
488365
|
-
const [debugMessage, setDebugMessage] = (0,
|
|
488366
|
-
const [quittingMessages, setQuittingMessages] = (0,
|
|
488367
|
-
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)(
|
|
488368
488436
|
initializationResult.themeError
|
|
488369
488437
|
);
|
|
488370
|
-
const [isProcessing, setIsProcessing] = (0,
|
|
488371
|
-
const [embeddedShellFocused, setEmbeddedShellFocused] = (0,
|
|
488372
|
-
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)(
|
|
488373
488441
|
initializationResult.geminiMdFileCount
|
|
488374
488442
|
);
|
|
488375
|
-
const [shellModeActive, setShellModeActive] = (0,
|
|
488376
|
-
const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = (0,
|
|
488377
|
-
const [historyRemountKey, setHistoryRemountKey] = (0,
|
|
488378
|
-
const [updateInfo, setUpdateInfo] = (0,
|
|
488379
|
-
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)(
|
|
488380
488448
|
config2.isTrustedFolder()
|
|
488381
488449
|
);
|
|
488382
488450
|
const extensionManager = config2.getExtensionManager();
|
|
@@ -488431,43 +488499,43 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488431
488499
|
config2.getWorkingDir()
|
|
488432
488500
|
);
|
|
488433
488501
|
const { codingPlanUpdateRequest, dismissCodingPlanUpdate } = useCodingPlanUpdates(settings2, config2, historyManager.addItem);
|
|
488434
|
-
const [isTrustDialogOpen, setTrustDialogOpen] = (0,
|
|
488435
|
-
const openTrustDialog = (0,
|
|
488436
|
-
const closeTrustDialog = (0,
|
|
488437
|
-
const [isPermissionsDialogOpen, setPermissionsDialogOpen] = (0,
|
|
488438
|
-
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)(
|
|
488439
488507
|
() => setPermissionsDialogOpen(true),
|
|
488440
488508
|
[]
|
|
488441
488509
|
);
|
|
488442
|
-
const closePermissionsDialog = (0,
|
|
488510
|
+
const closePermissionsDialog = (0, import_react178.useCallback)(
|
|
488443
488511
|
() => setPermissionsDialogOpen(false),
|
|
488444
488512
|
[]
|
|
488445
488513
|
);
|
|
488446
|
-
const [currentModel, setCurrentModel] = (0,
|
|
488447
|
-
const [isConfigInitialized, setConfigInitialized] = (0,
|
|
488448
|
-
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)([]);
|
|
488449
488517
|
const { columns: terminalWidth, rows: terminalHeight } = useTerminalSize();
|
|
488450
488518
|
const { stdin: stdin3, setRawMode } = use_stdin_default();
|
|
488451
488519
|
const { stdout: stdout3 } = use_stdout_default();
|
|
488452
488520
|
const { stats: sessionStats, startNewSession } = useSessionStats();
|
|
488453
488521
|
const logger10 = useLogger(config2.storage, sessionStats.sessionId);
|
|
488454
488522
|
const branchName = useGitBranchName(config2.getTargetDir());
|
|
488455
|
-
const mainControlsRef = (0,
|
|
488523
|
+
const mainControlsRef = (0, import_react178.useRef)(null);
|
|
488456
488524
|
const staticExtraHeight = 3;
|
|
488457
|
-
const [sessionName, setSessionName] = (0,
|
|
488525
|
+
const [sessionName, setSessionName] = (0, import_react178.useState)(null);
|
|
488458
488526
|
useInitializationEffects(
|
|
488459
488527
|
config2,
|
|
488460
488528
|
historyManager,
|
|
488461
488529
|
setConfigInitialized,
|
|
488462
488530
|
setSessionName
|
|
488463
488531
|
);
|
|
488464
|
-
(0,
|
|
488532
|
+
(0, import_react178.useEffect)(
|
|
488465
488533
|
() => setUpdateHandler(historyManager.addItem, setUpdateInfo),
|
|
488466
488534
|
[historyManager.addItem]
|
|
488467
488535
|
);
|
|
488468
488536
|
const { lastFinished } = useBackgroundAgentProgress();
|
|
488469
488537
|
const addHistoryItem = historyManager.addItem;
|
|
488470
|
-
(0,
|
|
488538
|
+
(0, import_react178.useEffect)(() => {
|
|
488471
488539
|
if (!lastFinished?.hitLimit) return;
|
|
488472
488540
|
addHistoryItem(
|
|
488473
488541
|
{
|
|
@@ -488477,19 +488545,19 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488477
488545
|
Date.now()
|
|
488478
488546
|
);
|
|
488479
488547
|
}, [lastFinished, addHistoryItem]);
|
|
488480
|
-
(0,
|
|
488548
|
+
(0, import_react178.useEffect)(() => {
|
|
488481
488549
|
const unsubscribe = config2.onModelChange((model) => {
|
|
488482
488550
|
setCurrentModel(model);
|
|
488483
488551
|
});
|
|
488484
488552
|
return unsubscribe;
|
|
488485
488553
|
}, [config2]);
|
|
488486
|
-
const { inputWidth, suggestionsWidth } = (0,
|
|
488554
|
+
const { inputWidth, suggestionsWidth } = (0, import_react178.useMemo)(() => {
|
|
488487
488555
|
const { inputWidth: inputWidth2, suggestionsWidth: suggestionsWidth2 } = calculatePromptWidths(terminalWidth);
|
|
488488
488556
|
return { inputWidth: inputWidth2, suggestionsWidth: suggestionsWidth2 };
|
|
488489
488557
|
}, [terminalWidth]);
|
|
488490
488558
|
const mainAreaWidth = Math.min(terminalWidth - 4, 100);
|
|
488491
488559
|
const staticAreaMaxItemHeight = Math.max(terminalHeight * 4, 100);
|
|
488492
|
-
const isValidPath = (0,
|
|
488560
|
+
const isValidPath = (0, import_react178.useCallback)((filePath) => {
|
|
488493
488561
|
try {
|
|
488494
488562
|
return fs133.existsSync(filePath) && fs133.statSync(filePath).isFile();
|
|
488495
488563
|
} catch (_e2) {
|
|
@@ -488504,7 +488572,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488504
488572
|
isValidPath,
|
|
488505
488573
|
shellModeActive
|
|
488506
488574
|
});
|
|
488507
|
-
(0,
|
|
488575
|
+
(0, import_react178.useEffect)(() => {
|
|
488508
488576
|
const fetchUserMessages = /* @__PURE__ */ __name(async () => {
|
|
488509
488577
|
const pastMessagesRaw = await logger10?.getPreviousUserMessages() || [];
|
|
488510
488578
|
const currentSessionUserMessages = historyManager.history.filter(
|
|
@@ -488527,13 +488595,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488527
488595
|
}, "fetchUserMessages");
|
|
488528
488596
|
fetchUserMessages();
|
|
488529
488597
|
}, [historyManager.history, logger10]);
|
|
488530
|
-
const refreshStatic = (0,
|
|
488598
|
+
const refreshStatic = (0, import_react178.useCallback)(() => {
|
|
488531
488599
|
stdout3.write("\x1B[?2026h");
|
|
488532
488600
|
stdout3.write(base_exports.clearTerminal);
|
|
488533
488601
|
stdout3.write("\x1B[?2026l");
|
|
488534
488602
|
setHistoryRemountKey((prev) => prev + 1);
|
|
488535
488603
|
}, [setHistoryRemountKey, stdout3]);
|
|
488536
|
-
(0,
|
|
488604
|
+
(0, import_react178.useEffect)(() => {
|
|
488537
488605
|
const unsubscribe = config2.onModelChange((model) => {
|
|
488538
488606
|
setCurrentModel((prev) => {
|
|
488539
488607
|
if (prev === model) {
|
|
@@ -488575,7 +488643,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488575
488643
|
cancelAuthentication
|
|
488576
488644
|
} = useAuthCommand(settings2, config2, historyManager.addItem, refreshStatic);
|
|
488577
488645
|
useInitializationAuthError(initializationResult.authError, onAuthError);
|
|
488578
|
-
(0,
|
|
488646
|
+
(0, import_react178.useEffect)(() => {
|
|
488579
488647
|
const currentAuthType = config2.getModelsConfig().getCurrentAuthType();
|
|
488580
488648
|
if (settings2.merged.security?.auth?.enforcedType && currentAuthType && settings2.merged.security?.auth.enforcedType !== currentAuthType) {
|
|
488581
488649
|
onAuthError(
|
|
@@ -488601,7 +488669,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488601
488669
|
config2,
|
|
488602
488670
|
onAuthError
|
|
488603
488671
|
]);
|
|
488604
|
-
const [editorError, setEditorError] = (0,
|
|
488672
|
+
const [editorError, setEditorError] = (0, import_react178.useState)(null);
|
|
488605
488673
|
const {
|
|
488606
488674
|
isEditorDialogOpen,
|
|
488607
488675
|
openEditorDialog,
|
|
@@ -488655,10 +488723,10 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488655
488723
|
} = useExtensionsManagerDialog();
|
|
488656
488724
|
const { isMcpDialogOpen, openMcpDialog, closeMcpDialog } = useMcpDialog();
|
|
488657
488725
|
const { isHooksDialogOpen, openHooksDialog, closeHooksDialog } = useHooksDialog();
|
|
488658
|
-
const [isRewindDialogOpen, setIsRewindDialogOpen] = (0,
|
|
488659
|
-
const openRewindDialog = (0,
|
|
488660
|
-
const closeRewindDialog = (0,
|
|
488661
|
-
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)(
|
|
488662
488730
|
() => ({
|
|
488663
488731
|
openAuthDialog,
|
|
488664
488732
|
openThemeDialog,
|
|
@@ -488739,14 +488807,14 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488739
488807
|
logger10,
|
|
488740
488808
|
setSessionName
|
|
488741
488809
|
);
|
|
488742
|
-
const onDebugMessage = (0,
|
|
488810
|
+
const onDebugMessage = (0, import_react178.useCallback)(
|
|
488743
488811
|
(message) => {
|
|
488744
488812
|
config2.getDebugLogger().debug(message);
|
|
488745
488813
|
},
|
|
488746
488814
|
[config2]
|
|
488747
488815
|
);
|
|
488748
488816
|
const stableAddItem = historyManager.addItem;
|
|
488749
|
-
const performMemoryRefresh = (0,
|
|
488817
|
+
const performMemoryRefresh = (0, import_react178.useCallback)(async () => {
|
|
488750
488818
|
stableAddItem(
|
|
488751
488819
|
{
|
|
488752
488820
|
type: "info" /* INFO */,
|
|
@@ -488792,7 +488860,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488792
488860
|
debugLogger159.error("Error refreshing memory:", error40);
|
|
488793
488861
|
}
|
|
488794
488862
|
}, [config2, stableAddItem, settings2.merged]);
|
|
488795
|
-
const cancelHandlerRef = (0,
|
|
488863
|
+
const cancelHandlerRef = (0, import_react178.useRef)(() => {
|
|
488796
488864
|
});
|
|
488797
488865
|
const { messageQueue, addMessage, popLast, drain } = useMessageQueue();
|
|
488798
488866
|
const voiceEnabled = settings2.merged.voice?.enabled ?? false;
|
|
@@ -488844,7 +488912,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488844
488912
|
drain,
|
|
488845
488913
|
submitQuery
|
|
488846
488914
|
);
|
|
488847
|
-
const [hasSuggestionsVisible, setHasSuggestionsVisible] = (0,
|
|
488915
|
+
const [hasSuggestionsVisible, setHasSuggestionsVisible] = (0, import_react178.useState)(false);
|
|
488848
488916
|
const agentViewState = useAgentViewState();
|
|
488849
488917
|
const geminiClient = config2.getGeminiClient();
|
|
488850
488918
|
const showAutoAcceptIndicator = useAutoAcceptIndicator({
|
|
@@ -488872,7 +488940,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488872
488940
|
settingInputRequests,
|
|
488873
488941
|
pendingGeminiHistoryItems
|
|
488874
488942
|
});
|
|
488875
|
-
const handleFinalSubmit = (0,
|
|
488943
|
+
const handleFinalSubmit = (0, import_react178.useCallback)(
|
|
488876
488944
|
(submittedValue) => {
|
|
488877
488945
|
if (agentViewState.activeView !== "main") {
|
|
488878
488946
|
const agent = agentViewState.agents.get(agentViewState.activeView);
|
|
@@ -488987,7 +489055,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488987
489055
|
handleWelcomeBackSelection,
|
|
488988
489056
|
handleWelcomeBackClose
|
|
488989
489057
|
} = useWelcomeBack(config2, handleFinalSubmit, buffer, settings2.merged);
|
|
488990
|
-
cancelHandlerRef.current = (0,
|
|
489058
|
+
cancelHandlerRef.current = (0, import_react178.useCallback)(() => {
|
|
488991
489059
|
const pendingHistoryItems2 = [
|
|
488992
489060
|
...pendingSlashCommandHistoryItems,
|
|
488993
489061
|
...pendingGeminiHistoryItems
|
|
@@ -489012,15 +489080,15 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
489012
489080
|
pendingSlashCommandHistoryItems,
|
|
489013
489081
|
pendingGeminiHistoryItems
|
|
489014
489082
|
]);
|
|
489015
|
-
const handleClearScreen = (0,
|
|
489083
|
+
const handleClearScreen = (0, import_react178.useCallback)(() => {
|
|
489016
489084
|
historyManager.clearItems();
|
|
489017
489085
|
clearScreen2();
|
|
489018
489086
|
refreshStatic();
|
|
489019
489087
|
}, [historyManager, refreshStatic]);
|
|
489020
489088
|
const { handleInput: vimHandleInput } = useVim(buffer, handleFinalSubmit);
|
|
489021
489089
|
const isInputActive = !initError && !isProcessing && (streamingState === "idle" /* Idle */ || streamingState === "responding" /* Responding */);
|
|
489022
|
-
const [controlsHeight, setControlsHeight] = (0,
|
|
489023
|
-
(0,
|
|
489090
|
+
const [controlsHeight, setControlsHeight] = (0, import_react178.useState)(0);
|
|
489091
|
+
(0, import_react178.useLayoutEffect)(() => {
|
|
489024
489092
|
if (mainControlsRef.current) {
|
|
489025
489093
|
const fullFooterMeasurement = measure_element_default(mainControlsRef.current);
|
|
489026
489094
|
if (fullFooterMeasurement.height > 0) {
|
|
@@ -489053,13 +489121,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
489053
489121
|
history: historyManager.history,
|
|
489054
489122
|
awayThresholdMinutes: settings2.merged.general?.sessionRecapAwayThresholdMinutes
|
|
489055
489123
|
});
|
|
489056
|
-
const contextFileNames = (0,
|
|
489124
|
+
const contextFileNames = (0, import_react178.useMemo)(() => {
|
|
489057
489125
|
const fromSettings = settings2.merged.context?.fileName;
|
|
489058
489126
|
return fromSettings ? Array.isArray(fromSettings) ? fromSettings : [fromSettings] : getAllGeminiMdFilenames();
|
|
489059
489127
|
}, [settings2.merged.context?.fileName]);
|
|
489060
|
-
const initialPrompt = (0,
|
|
489061
|
-
const initialPromptSubmitted = (0,
|
|
489062
|
-
(0,
|
|
489128
|
+
const initialPrompt = (0, import_react178.useMemo)(() => config2.getQuestion(), [config2]);
|
|
489129
|
+
const initialPromptSubmitted = (0, import_react178.useRef)(false);
|
|
489130
|
+
(0, import_react178.useEffect)(() => {
|
|
489063
489131
|
if (activePtyId) {
|
|
489064
489132
|
ShellExecutionService.resizePty(
|
|
489065
489133
|
activePtyId,
|
|
@@ -489068,7 +489136,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
489068
489136
|
);
|
|
489069
489137
|
}
|
|
489070
489138
|
}, [terminalWidth, availableTerminalHeight, activePtyId]);
|
|
489071
|
-
(0,
|
|
489139
|
+
(0, import_react178.useEffect)(() => {
|
|
489072
489140
|
if (initialPrompt && isConfigInitialized && !initialPromptSubmitted.current && !isAuthenticating && !isAuthDialogOpen && !isThemeDialogOpen && !isEditorDialogOpen && !showWelcomeBackDialog && welcomeBackChoice !== "restart" && geminiClient?.isInitialized?.()) {
|
|
489073
489141
|
handleFinalSubmit(initialPrompt);
|
|
489074
489142
|
initialPromptSubmitted.current = true;
|
|
@@ -489085,9 +489153,9 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
489085
489153
|
welcomeBackChoice,
|
|
489086
489154
|
geminiClient
|
|
489087
489155
|
]);
|
|
489088
|
-
const [idePromptAnswered, setIdePromptAnswered] = (0,
|
|
489089
|
-
const [currentIDE, setCurrentIDE] = (0,
|
|
489090
|
-
(0,
|
|
489156
|
+
const [idePromptAnswered, setIdePromptAnswered] = (0, import_react178.useState)(false);
|
|
489157
|
+
const [currentIDE, setCurrentIDE] = (0, import_react178.useState)(null);
|
|
489158
|
+
(0, import_react178.useEffect)(() => {
|
|
489091
489159
|
const getIde = /* @__PURE__ */ __name(async () => {
|
|
489092
489160
|
const ideClient = await IdeClient.getInstance();
|
|
489093
489161
|
const currentIde = ideClient.getCurrentIde();
|
|
@@ -489103,24 +489171,24 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
489103
489171
|
tomlFiles: commandMigrationTomlFiles,
|
|
489104
489172
|
setShowMigrationNudge: setShowCommandMigrationNudge
|
|
489105
489173
|
} = useCommandMigration(settings2, config2.storage);
|
|
489106
|
-
const [ideContextState, setIdeContextState] = (0,
|
|
489107
|
-
const [showIdeRestartPrompt, setShowIdeRestartPrompt] = (0,
|
|
489174
|
+
const [ideContextState, setIdeContextState] = (0, import_react178.useState)();
|
|
489175
|
+
const [showIdeRestartPrompt, setShowIdeRestartPrompt] = (0, import_react178.useState)(false);
|
|
489108
489176
|
const { isFolderTrustDialogOpen, handleFolderTrustSelect, isRestarting } = useFolderTrust(settings2, setIsTrustedFolder);
|
|
489109
489177
|
const {
|
|
489110
489178
|
needsRestart: ideNeedsRestart,
|
|
489111
489179
|
restartReason: ideTrustRestartReason
|
|
489112
489180
|
} = useIdeTrustListener();
|
|
489113
|
-
(0,
|
|
489181
|
+
(0, import_react178.useEffect)(() => {
|
|
489114
489182
|
if (ideNeedsRestart) {
|
|
489115
489183
|
setShowIdeRestartPrompt(true);
|
|
489116
489184
|
}
|
|
489117
489185
|
}, [ideNeedsRestart]);
|
|
489118
|
-
(0,
|
|
489186
|
+
(0, import_react178.useEffect)(() => {
|
|
489119
489187
|
const unsubscribe = ideContextStore.subscribe(setIdeContextState);
|
|
489120
489188
|
setIdeContextState(ideContextStore.get());
|
|
489121
489189
|
return unsubscribe;
|
|
489122
489190
|
}, []);
|
|
489123
|
-
const handleIdePromptComplete = (0,
|
|
489191
|
+
const handleIdePromptComplete = (0, import_react178.useCallback)(
|
|
489124
489192
|
(result) => {
|
|
489125
489193
|
if (result.userSelection === "yes") {
|
|
489126
489194
|
if (result.isExtensionPreInstalled) {
|
|
@@ -489136,7 +489204,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
489136
489204
|
},
|
|
489137
489205
|
[handleSlashCommand2, settings2]
|
|
489138
489206
|
);
|
|
489139
|
-
const handleCommandMigrationComplete = (0,
|
|
489207
|
+
const handleCommandMigrationComplete = (0, import_react178.useCallback)(
|
|
489140
489208
|
async (result) => {
|
|
489141
489209
|
setShowCommandMigrationNudge(false);
|
|
489142
489210
|
if (result.userSelection === "yes") {
|
|
@@ -489279,6 +489347,11 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
|
|
|
489279
489347
|
stdout3,
|
|
489280
489348
|
config2.getTargetDir()
|
|
489281
489349
|
);
|
|
489350
|
+
const tabStatusEnabled = !!settings2.merged.ui?.showStatusInTitle && !settings2.merged.ui?.hideWindowTitle;
|
|
489351
|
+
useTabStatus(
|
|
489352
|
+
tabStatusEnabled ? tabStatusKindForStreamingState(streamingState) : null,
|
|
489353
|
+
stdout3
|
|
489354
|
+
);
|
|
489282
489355
|
const nightly = props.version.includes("nightly");
|
|
489283
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;
|
|
489284
489357
|
dialogsVisibleRef.current = dialogsVisible;
|
|
@@ -489295,11 +489368,11 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
|
|
|
489295
489368
|
history: historyManager.history,
|
|
489296
489369
|
sessionStats
|
|
489297
489370
|
});
|
|
489298
|
-
const pendingHistoryItems = (0,
|
|
489371
|
+
const pendingHistoryItems = (0, import_react178.useMemo)(
|
|
489299
489372
|
() => [...pendingSlashCommandHistoryItems, ...pendingGeminiHistoryItems],
|
|
489300
489373
|
[pendingSlashCommandHistoryItems, pendingGeminiHistoryItems]
|
|
489301
489374
|
);
|
|
489302
|
-
const uiState = (0,
|
|
489375
|
+
const uiState = (0, import_react178.useMemo)(
|
|
489303
489376
|
() => ({
|
|
489304
489377
|
history: historyManager.history,
|
|
489305
489378
|
historyManager,
|
|
@@ -489536,7 +489609,7 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
|
|
|
489536
489609
|
isTranscriptOpen
|
|
489537
489610
|
]
|
|
489538
489611
|
);
|
|
489539
|
-
const uiActions = (0,
|
|
489612
|
+
const uiActions = (0, import_react178.useMemo)(
|
|
489540
489613
|
() => ({
|
|
489541
489614
|
openThemeDialog,
|
|
489542
489615
|
openEditorDialog,
|
|
@@ -489693,9 +489766,9 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
|
|
|
489693
489766
|
|
|
489694
489767
|
// packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts
|
|
489695
489768
|
init_esbuild_shims();
|
|
489696
|
-
var
|
|
489769
|
+
var import_react179 = __toESM(require_react(), 1);
|
|
489697
489770
|
function useKittyKeyboardProtocol() {
|
|
489698
|
-
const [status] = (0,
|
|
489771
|
+
const [status] = (0, import_react179.useState)({
|
|
489699
489772
|
supported: isKittyProtocolSupported(),
|
|
489700
489773
|
enabled: isKittyProtocolEnabled(),
|
|
489701
489774
|
checking: false
|
|
@@ -490675,7 +490748,7 @@ __name(validateNonInteractiveAuth, "validateNonInteractiveAuth");
|
|
|
490675
490748
|
|
|
490676
490749
|
// packages/cli/src/ui/components/StandaloneSessionPicker.tsx
|
|
490677
490750
|
init_esbuild_shims();
|
|
490678
|
-
var
|
|
490751
|
+
var import_react180 = __toESM(require_react(), 1);
|
|
490679
490752
|
init_dist4();
|
|
490680
490753
|
var import_jsx_runtime140 = __toESM(require_jsx_runtime(), 1);
|
|
490681
490754
|
var PREVIEW_CONFIG_STUB = {
|
|
@@ -490696,7 +490769,7 @@ function StandalonePickerScreen({
|
|
|
490696
490769
|
initialSessions
|
|
490697
490770
|
}) {
|
|
490698
490771
|
const { exit } = use_app_default();
|
|
490699
|
-
const [isExiting, setIsExiting] = (0,
|
|
490772
|
+
const [isExiting, setIsExiting] = (0, import_react180.useState)(false);
|
|
490700
490773
|
const handleExit = /* @__PURE__ */ __name(() => {
|
|
490701
490774
|
setIsExiting(true);
|
|
490702
490775
|
exit();
|
|
@@ -493801,7 +493874,7 @@ var QwenAgent = class {
|
|
|
493801
493874
|
async initialize(args2) {
|
|
493802
493875
|
this.clientCapabilities = args2.clientCapabilities;
|
|
493803
493876
|
const authMethods = buildAuthMethods();
|
|
493804
|
-
const version2 = "0.
|
|
493877
|
+
const version2 = "0.55.0";
|
|
493805
493878
|
return {
|
|
493806
493879
|
protocolVersion: PROTOCOL_VERSION,
|
|
493807
493880
|
agentInfo: {
|
|
@@ -494256,11 +494329,11 @@ var QwenAgent = class {
|
|
|
494256
494329
|
|
|
494257
494330
|
// packages/cli/src/ui/utils/terminalRedrawOptimizer.ts
|
|
494258
494331
|
init_esbuild_shims();
|
|
494259
|
-
var
|
|
494260
|
-
var ERASE_LINE = `${
|
|
494261
|
-
var CURSOR_UP_ONE = `${
|
|
494262
|
-
var CURSOR_DOWN_ONE = `${
|
|
494263
|
-
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`;
|
|
494264
494337
|
var MULTILINE_ERASE_LINES_PATTERN = new RegExp(
|
|
494265
494338
|
`(?:${escapeRegExp(ERASE_LINE + CURSOR_UP_ONE)})+${escapeRegExp(
|
|
494266
494339
|
ERASE_LINE + CURSOR_LEFT
|
|
@@ -494306,14 +494379,14 @@ function optimizeMultilineEraseLinesWithCount(output) {
|
|
|
494306
494379
|
return sequence;
|
|
494307
494380
|
}
|
|
494308
494381
|
optimizedSequenceCount += 1;
|
|
494309
|
-
let boundedErase = `${
|
|
494382
|
+
let boundedErase = `${ESC5}${cursorUpCount}A`;
|
|
494310
494383
|
for (let line = 0; line < lineCount; line++) {
|
|
494311
494384
|
boundedErase += ERASE_LINE;
|
|
494312
494385
|
if (line < lineCount - 1) {
|
|
494313
494386
|
boundedErase += CURSOR_DOWN_ONE;
|
|
494314
494387
|
}
|
|
494315
494388
|
}
|
|
494316
|
-
return `${boundedErase}${
|
|
494389
|
+
return `${boundedErase}${ESC5}${cursorUpCount}A${CURSOR_LEFT}`;
|
|
494317
494390
|
}
|
|
494318
494391
|
);
|
|
494319
494392
|
return { output: optimizedOutput, optimizedSequenceCount };
|
|
@@ -494544,7 +494617,7 @@ async function startInteractiveUI(config2, settings2, startupWarnings, workspace
|
|
|
494544
494617
|
) });
|
|
494545
494618
|
}, "AppWrapper");
|
|
494546
494619
|
const instance2 = render_default(
|
|
494547
|
-
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, {}),
|
|
494548
494621
|
{
|
|
494549
494622
|
exitOnCtrlC: false,
|
|
494550
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": {
|