@protolabsai/proto 0.54.1 → 0.55.1
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 +274 -181
- 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.1";
|
|
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");
|
|
@@ -190243,9 +190243,9 @@ Digest teammate findings thoroughly. Cite file paths and line numbers. NEVER wri
|
|
|
190243
190243
|
|
|
190244
190244
|
## Task Decomposition
|
|
190245
190245
|
When given a complex task:
|
|
190246
|
-
1. Break it into independent subtasks using ${ToolNames.TASK_CREATE}
|
|
190246
|
+
1. Break it into independent subtasks using ${ToolNames.TASK_CREATE} and track their status with ${ToolNames.TASK_UPDATE}
|
|
190247
190247
|
2. Identify which can run in parallel vs which have dependencies
|
|
190248
|
-
3.
|
|
190248
|
+
3. Delegate each subtask to a teammate via your team channel, briefing it per the Delegation Rules above
|
|
190249
190249
|
4. Monitor completion notifications and synthesize results
|
|
190250
190250
|
5. Run dependent tasks after prerequisites complete
|
|
190251
190251
|
|
|
@@ -190258,13 +190258,17 @@ Before reporting completion:
|
|
|
190258
190258
|
Notes:
|
|
190259
190259
|
- Agent threads always have their cwd reset between bash calls, as a result please only use absolute file paths.
|
|
190260
190260
|
- For clear communication, avoid using emojis.`,
|
|
190261
|
+
// NOTE: ToolNames.AGENT is intentionally NOT listed here. The runtime
|
|
190262
|
+
// strips the agent tool from every subagent to prevent recursion
|
|
190263
|
+
// (see agent-core.ts `excludedFromSubagents`), so listing it would only
|
|
190264
|
+
// tell the model about a tool it can't actually call. The coordinator
|
|
190265
|
+
// delegates to teammates via the team channel when run as a team lead.
|
|
190261
190266
|
tools: [
|
|
190262
190267
|
ToolNames.READ_FILE,
|
|
190263
190268
|
ToolNames.GREP,
|
|
190264
190269
|
ToolNames.GLOB,
|
|
190265
190270
|
ToolNames.SHELL,
|
|
190266
190271
|
ToolNames.LS,
|
|
190267
|
-
ToolNames.AGENT,
|
|
190268
190272
|
ToolNames.TASK_CREATE,
|
|
190269
190273
|
ToolNames.TASK_LIST,
|
|
190270
190274
|
ToolNames.TASK_UPDATE,
|
|
@@ -263484,8 +263488,8 @@ var require_src37 = __commonJS({
|
|
|
263484
263488
|
"node_modules/sisteransi/src/index.js"(exports2, module2) {
|
|
263485
263489
|
"use strict";
|
|
263486
263490
|
init_esbuild_shims();
|
|
263487
|
-
var
|
|
263488
|
-
var CSI = `${
|
|
263491
|
+
var ESC6 = "\x1B";
|
|
263492
|
+
var CSI = `${ESC6}[`;
|
|
263489
263493
|
var beep2 = "\x07";
|
|
263490
263494
|
var cursor = {
|
|
263491
263495
|
to(x3, y2) {
|
|
@@ -263509,8 +263513,8 @@ var require_src37 = __commonJS({
|
|
|
263509
263513
|
left: `${CSI}G`,
|
|
263510
263514
|
hide: `${CSI}?25l`,
|
|
263511
263515
|
show: `${CSI}?25h`,
|
|
263512
|
-
save: `${
|
|
263513
|
-
restore: `${
|
|
263516
|
+
save: `${ESC6}7`,
|
|
263517
|
+
restore: `${ESC6}8`
|
|
263514
263518
|
};
|
|
263515
263519
|
var scroll = {
|
|
263516
263520
|
up: /* @__PURE__ */ __name((count = 1) => `${CSI}S`.repeat(count), "up"),
|
|
@@ -312023,7 +312027,7 @@ var require_backend = __commonJS({
|
|
|
312023
312027
|
});
|
|
312024
312028
|
return a2._currentValue;
|
|
312025
312029
|
}, "useContext"),
|
|
312026
|
-
useEffect: /* @__PURE__ */ __name(function
|
|
312030
|
+
useEffect: /* @__PURE__ */ __name(function useEffect77(a2) {
|
|
312027
312031
|
C3();
|
|
312028
312032
|
x3.push({
|
|
312029
312033
|
primitive: "Effect",
|
|
@@ -312088,7 +312092,7 @@ var require_backend = __commonJS({
|
|
|
312088
312092
|
return [b2, function() {
|
|
312089
312093
|
}];
|
|
312090
312094
|
}, "useReducer"),
|
|
312091
|
-
useRef: /* @__PURE__ */ __name(function
|
|
312095
|
+
useRef: /* @__PURE__ */ __name(function useRef33(a2) {
|
|
312092
312096
|
var b2 = C3();
|
|
312093
312097
|
a2 = null !== b2 ? b2.memoizedState : {
|
|
312094
312098
|
current: a2
|
|
@@ -404447,7 +404451,7 @@ var measureElement = /* @__PURE__ */ __name((node) => ({
|
|
|
404447
404451
|
var measure_element_default = measureElement;
|
|
404448
404452
|
|
|
404449
404453
|
// packages/cli/src/gemini.tsx
|
|
404450
|
-
var
|
|
404454
|
+
var import_react181 = __toESM(require_react(), 1);
|
|
404451
404455
|
import dns2 from "node:dns";
|
|
404452
404456
|
import os50 from "node:os";
|
|
404453
404457
|
import { basename as basename32 } from "node:path";
|
|
@@ -416785,7 +416789,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
416785
416789
|
// packages/cli/src/utils/version.ts
|
|
416786
416790
|
async function getCliVersion() {
|
|
416787
416791
|
const pkgJson = await getPackageJson();
|
|
416788
|
-
return "0.
|
|
416792
|
+
return "0.55.1";
|
|
416789
416793
|
}
|
|
416790
416794
|
__name(getCliVersion, "getCliVersion");
|
|
416791
416795
|
|
|
@@ -424985,7 +424989,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
424985
424989
|
|
|
424986
424990
|
// packages/cli/src/generated/git-commit.ts
|
|
424987
424991
|
init_esbuild_shims();
|
|
424988
|
-
var GIT_COMMIT_INFO = "
|
|
424992
|
+
var GIT_COMMIT_INFO = "a8772314d";
|
|
424989
424993
|
|
|
424990
424994
|
// packages/cli/src/utils/systemInfo.ts
|
|
424991
424995
|
async function getNpmVersion() {
|
|
@@ -439505,7 +439509,7 @@ __name(runNonInteractiveStreamJson, "runNonInteractiveStreamJson");
|
|
|
439505
439509
|
|
|
439506
439510
|
// packages/cli/src/ui/AppContainer.tsx
|
|
439507
439511
|
init_esbuild_shims();
|
|
439508
|
-
var
|
|
439512
|
+
var import_react178 = __toESM(require_react(), 1);
|
|
439509
439513
|
|
|
439510
439514
|
// packages/cli/src/ui/App.tsx
|
|
439511
439515
|
init_esbuild_shims();
|
|
@@ -455993,8 +455997,8 @@ function KeypressProvider({
|
|
|
455993
455997
|
const shift = (modifierBits & MODIFIER_SHIFT_BIT) === MODIFIER_SHIFT_BIT;
|
|
455994
455998
|
const alt = (modifierBits & MODIFIER_ALT_BIT) === MODIFIER_ALT_BIT;
|
|
455995
455999
|
const ctrl = (modifierBits & MODIFIER_CTRL_BIT) === MODIFIER_CTRL_BIT;
|
|
455996
|
-
const
|
|
455997
|
-
if (
|
|
456000
|
+
const terminator2 = m3[4];
|
|
456001
|
+
if (terminator2 === "~") {
|
|
455998
456002
|
let name5 = null;
|
|
455999
456003
|
switch (keyCode) {
|
|
456000
456004
|
case 1:
|
|
@@ -456087,7 +456091,7 @@ function KeypressProvider({
|
|
|
456087
456091
|
length: m3[0].length
|
|
456088
456092
|
};
|
|
456089
456093
|
}
|
|
456090
|
-
if (
|
|
456094
|
+
if (terminator2 === "u" && !ctrl && keyCode >= 32 && keyCode !== 127 && keyCode <= 1114111 && !(keyCode >= 57344 && keyCode <= 63743)) {
|
|
456091
456095
|
return {
|
|
456092
456096
|
key: {
|
|
456093
456097
|
...createPrintableKey(String.fromCodePoint(keyCode)),
|
|
@@ -484200,13 +484204,97 @@ function useWindowTitle(streamingState, thought, settings2, stdout3, targetDir)
|
|
|
484200
484204
|
}
|
|
484201
484205
|
__name(useWindowTitle, "useWindowTitle");
|
|
484202
484206
|
|
|
484203
|
-
// packages/cli/src/ui/hooks/
|
|
484207
|
+
// packages/cli/src/ui/hooks/useTabStatus.ts
|
|
484204
484208
|
init_esbuild_shims();
|
|
484205
484209
|
var import_react161 = __toESM(require_react(), 1);
|
|
484210
|
+
|
|
484211
|
+
// packages/cli/src/ui/utils/terminalTabStatus.ts
|
|
484212
|
+
init_esbuild_shims();
|
|
484213
|
+
var ESC4 = "\x1B";
|
|
484214
|
+
var BEL3 = "\x07";
|
|
484215
|
+
var ST = `${ESC4}\\`;
|
|
484216
|
+
var OSC_TAB_STATUS = 21337;
|
|
484217
|
+
var PRESETS = {
|
|
484218
|
+
idle: { indicator: "#00d75f", status: "Idle", statusColor: "#888888" },
|
|
484219
|
+
busy: { indicator: "#ff9500", status: "Working\u2026", statusColor: "#ff9500" },
|
|
484220
|
+
waiting: { indicator: "#5f87ff", status: "Waiting", statusColor: "#5f87ff" }
|
|
484221
|
+
};
|
|
484222
|
+
function terminator() {
|
|
484223
|
+
const term = process.env["TERM"] ?? "";
|
|
484224
|
+
const termProgram = process.env["TERM_PROGRAM"] ?? "";
|
|
484225
|
+
const isKitty = term.includes("kitty") || termProgram === "kitty";
|
|
484226
|
+
return isKitty ? ST : BEL3;
|
|
484227
|
+
}
|
|
484228
|
+
__name(terminator, "terminator");
|
|
484229
|
+
function oscTabStatus(payload) {
|
|
484230
|
+
return `${ESC4}]${OSC_TAB_STATUS};${payload}${terminator()}`;
|
|
484231
|
+
}
|
|
484232
|
+
__name(oscTabStatus, "oscTabStatus");
|
|
484233
|
+
function escapeStatus(text) {
|
|
484234
|
+
return text.replaceAll("\\", "\\\\").replaceAll(";", "\\;");
|
|
484235
|
+
}
|
|
484236
|
+
__name(escapeStatus, "escapeStatus");
|
|
484237
|
+
function wrapForMultiplexer(sequence) {
|
|
484238
|
+
if (process.env["TMUX"]) {
|
|
484239
|
+
const escaped = sequence.replaceAll(ESC4, ESC4 + ESC4);
|
|
484240
|
+
return `${ESC4}Ptmux;${escaped}${ESC4}\\`;
|
|
484241
|
+
}
|
|
484242
|
+
if (process.env["STY"]) {
|
|
484243
|
+
return `${ESC4}P${sequence}${ESC4}\\`;
|
|
484244
|
+
}
|
|
484245
|
+
return sequence;
|
|
484246
|
+
}
|
|
484247
|
+
__name(wrapForMultiplexer, "wrapForMultiplexer");
|
|
484248
|
+
function buildTabStatus(kind2) {
|
|
484249
|
+
const p2 = PRESETS[kind2];
|
|
484250
|
+
return wrapForMultiplexer(
|
|
484251
|
+
oscTabStatus(
|
|
484252
|
+
`indicator=${p2.indicator};status=${escapeStatus(p2.status)};status-color=${p2.statusColor}`
|
|
484253
|
+
)
|
|
484254
|
+
);
|
|
484255
|
+
}
|
|
484256
|
+
__name(buildTabStatus, "buildTabStatus");
|
|
484257
|
+
function buildClearTabStatus() {
|
|
484258
|
+
return wrapForMultiplexer(oscTabStatus("indicator=;status=;status-color="));
|
|
484259
|
+
}
|
|
484260
|
+
__name(buildClearTabStatus, "buildClearTabStatus");
|
|
484261
|
+
|
|
484262
|
+
// packages/cli/src/ui/hooks/useTabStatus.ts
|
|
484263
|
+
function tabStatusKindForStreamingState(state) {
|
|
484264
|
+
switch (state) {
|
|
484265
|
+
case "responding" /* Responding */:
|
|
484266
|
+
return "busy";
|
|
484267
|
+
case "waiting_for_confirmation" /* WaitingForConfirmation */:
|
|
484268
|
+
return "waiting";
|
|
484269
|
+
default:
|
|
484270
|
+
return "idle";
|
|
484271
|
+
}
|
|
484272
|
+
}
|
|
484273
|
+
__name(tabStatusKindForStreamingState, "tabStatusKindForStreamingState");
|
|
484274
|
+
function useTabStatus(kind2, stdout3) {
|
|
484275
|
+
const prevKindRef = (0, import_react161.useRef)(null);
|
|
484276
|
+
(0, import_react161.useEffect)(() => {
|
|
484277
|
+
if (kind2 === null) {
|
|
484278
|
+
if (prevKindRef.current !== null) {
|
|
484279
|
+
stdout3.write(buildClearTabStatus());
|
|
484280
|
+
prevKindRef.current = null;
|
|
484281
|
+
}
|
|
484282
|
+
return;
|
|
484283
|
+
}
|
|
484284
|
+
if (prevKindRef.current === kind2) return;
|
|
484285
|
+
prevKindRef.current = kind2;
|
|
484286
|
+
stdout3.write(buildTabStatus(kind2));
|
|
484287
|
+
}, [kind2, stdout3]);
|
|
484288
|
+
}
|
|
484289
|
+
__name(useTabStatus, "useTabStatus");
|
|
484290
|
+
|
|
484291
|
+
// packages/cli/src/ui/hooks/useInitializationEffects.ts
|
|
484292
|
+
init_esbuild_shims();
|
|
484293
|
+
var import_react162 = __toESM(require_react(), 1);
|
|
484206
484294
|
init_dist4();
|
|
484207
484295
|
var debugLogger155 = createDebugLogger("APP_CONTAINER");
|
|
484208
484296
|
function useInitializationEffects(config2, historyManager, setConfigInitialized, setSessionName) {
|
|
484209
|
-
(0,
|
|
484297
|
+
(0, import_react162.useEffect)(() => {
|
|
484210
484298
|
(async () => {
|
|
484211
484299
|
await config2.initialize();
|
|
484212
484300
|
setConfigInitialized(true);
|
|
@@ -484280,7 +484368,7 @@ __name(useInitializationEffects, "useInitializationEffects");
|
|
|
484280
484368
|
|
|
484281
484369
|
// packages/cli/src/ui/hooks/usePromptSuggestions.ts
|
|
484282
484370
|
init_esbuild_shims();
|
|
484283
|
-
var
|
|
484371
|
+
var import_react163 = __toESM(require_react(), 1);
|
|
484284
484372
|
init_dist4();
|
|
484285
484373
|
function usePromptSuggestions(params) {
|
|
484286
484374
|
const {
|
|
@@ -484296,17 +484384,17 @@ function usePromptSuggestions(params) {
|
|
|
484296
484384
|
settingInputRequests,
|
|
484297
484385
|
pendingGeminiHistoryItems
|
|
484298
484386
|
} = params;
|
|
484299
|
-
const [promptSuggestion, setPromptSuggestion] = (0,
|
|
484300
|
-
const prevStreamingStateRef = (0,
|
|
484301
|
-
const speculationRef = (0,
|
|
484302
|
-
const suggestionAbortRef = (0,
|
|
484303
|
-
const dismissPromptSuggestion = (0,
|
|
484387
|
+
const [promptSuggestion, setPromptSuggestion] = (0, import_react163.useState)(null);
|
|
484388
|
+
const prevStreamingStateRef = (0, import_react163.useRef)("idle" /* Idle */);
|
|
484389
|
+
const speculationRef = (0, import_react163.useRef)(IDLE_SPECULATION);
|
|
484390
|
+
const suggestionAbortRef = (0, import_react163.useRef)(null);
|
|
484391
|
+
const dismissPromptSuggestion = (0, import_react163.useCallback)(() => {
|
|
484304
484392
|
setPromptSuggestion(null);
|
|
484305
484393
|
suggestionAbortRef.current?.abort();
|
|
484306
484394
|
suggestionAbortRef.current = null;
|
|
484307
484395
|
}, []);
|
|
484308
484396
|
const followupSuggestionsEnabled = settings2.merged.ui?.enableFollowupSuggestions !== false;
|
|
484309
|
-
(0,
|
|
484397
|
+
(0, import_react163.useEffect)(() => {
|
|
484310
484398
|
if (!followupSuggestionsEnabled) {
|
|
484311
484399
|
suggestionAbortRef.current?.abort();
|
|
484312
484400
|
setPromptSuggestion(null);
|
|
@@ -484379,7 +484467,7 @@ function usePromptSuggestions(params) {
|
|
|
484379
484467
|
isPermissionsDialogOpen,
|
|
484380
484468
|
settingInputRequests
|
|
484381
484469
|
]);
|
|
484382
|
-
(0,
|
|
484470
|
+
(0, import_react163.useEffect)(() => {
|
|
484383
484471
|
if (!promptSuggestion && speculationRef.current.status !== "idle") {
|
|
484384
484472
|
abortSpeculation(speculationRef.current).catch(() => {
|
|
484385
484473
|
});
|
|
@@ -484397,7 +484485,7 @@ __name(usePromptSuggestions, "usePromptSuggestions");
|
|
|
484397
484485
|
|
|
484398
484486
|
// packages/cli/src/ui/hooks/useExitHandling.ts
|
|
484399
484487
|
init_esbuild_shims();
|
|
484400
|
-
var
|
|
484488
|
+
var import_react164 = __toESM(require_react(), 1);
|
|
484401
484489
|
function useExitHandling(params) {
|
|
484402
484490
|
const {
|
|
484403
484491
|
isAuthDialogOpen,
|
|
@@ -484407,7 +484495,7 @@ function useExitHandling(params) {
|
|
|
484407
484495
|
cancelOngoingRequest,
|
|
484408
484496
|
buffer
|
|
484409
484497
|
} = params;
|
|
484410
|
-
const handleExit = (0,
|
|
484498
|
+
const handleExit = (0, import_react164.useCallback)(
|
|
484411
484499
|
(pressedOnce, setPressedOnce, timerRef) => {
|
|
484412
484500
|
if (pressedOnce) {
|
|
484413
484501
|
if (timerRef.current) {
|
|
@@ -487550,7 +487638,7 @@ __name(setUpdateHandler, "setUpdateHandler");
|
|
|
487550
487638
|
|
|
487551
487639
|
// packages/cli/src/ui/hooks/useMessageQueue.ts
|
|
487552
487640
|
init_esbuild_shims();
|
|
487553
|
-
var
|
|
487641
|
+
var import_react165 = __toESM(require_react(), 1);
|
|
487554
487642
|
var MessageQueueStore = class {
|
|
487555
487643
|
static {
|
|
487556
487644
|
__name(this, "MessageQueueStore");
|
|
@@ -487604,15 +487692,15 @@ var MessageQueueStore = class {
|
|
|
487604
487692
|
}
|
|
487605
487693
|
};
|
|
487606
487694
|
function useMessageQueue() {
|
|
487607
|
-
const store = (0,
|
|
487608
|
-
const messageQueue = (0,
|
|
487609
|
-
const addMessage = (0,
|
|
487695
|
+
const store = (0, import_react165.useMemo)(() => new MessageQueueStore(), []);
|
|
487696
|
+
const messageQueue = (0, import_react165.useSyncExternalStore)(store.subscribe, store.getSnapshot);
|
|
487697
|
+
const addMessage = (0, import_react165.useCallback)(
|
|
487610
487698
|
(message) => store.addMessage(message),
|
|
487611
487699
|
[store]
|
|
487612
487700
|
);
|
|
487613
|
-
const clearQueue = (0,
|
|
487614
|
-
const popLast = (0,
|
|
487615
|
-
const drain = (0,
|
|
487701
|
+
const clearQueue = (0, import_react165.useCallback)(() => store.clearQueue(), [store]);
|
|
487702
|
+
const popLast = (0, import_react165.useCallback)(() => store.popLast(), [store]);
|
|
487703
|
+
const drain = (0, import_react165.useCallback)(() => store.drain(), [store]);
|
|
487616
487704
|
return { messageQueue, addMessage, clearQueue, popLast, drain };
|
|
487617
487705
|
}
|
|
487618
487706
|
__name(useMessageQueue, "useMessageQueue");
|
|
@@ -487620,7 +487708,7 @@ __name(useMessageQueue, "useMessageQueue");
|
|
|
487620
487708
|
// packages/cli/src/ui/hooks/useAutoAcceptIndicator.ts
|
|
487621
487709
|
init_esbuild_shims();
|
|
487622
487710
|
init_dist4();
|
|
487623
|
-
var
|
|
487711
|
+
var import_react166 = __toESM(require_react(), 1);
|
|
487624
487712
|
function useAutoAcceptIndicator({
|
|
487625
487713
|
config: config2,
|
|
487626
487714
|
addItem,
|
|
@@ -487629,8 +487717,8 @@ function useAutoAcceptIndicator({
|
|
|
487629
487717
|
disabled
|
|
487630
487718
|
}) {
|
|
487631
487719
|
const currentConfigValue = config2.getApprovalMode();
|
|
487632
|
-
const [showAutoAcceptIndicator, setShowAutoAcceptIndicator] = (0,
|
|
487633
|
-
(0,
|
|
487720
|
+
const [showAutoAcceptIndicator, setShowAutoAcceptIndicator] = (0, import_react166.useState)(currentConfigValue);
|
|
487721
|
+
(0, import_react166.useEffect)(() => {
|
|
487634
487722
|
setShowAutoAcceptIndicator(currentConfigValue);
|
|
487635
487723
|
}, [currentConfigValue]);
|
|
487636
487724
|
useKeypress(
|
|
@@ -487668,7 +487756,7 @@ __name(useAutoAcceptIndicator, "useAutoAcceptIndicator");
|
|
|
487668
487756
|
|
|
487669
487757
|
// packages/cli/src/ui/hooks/useExtensionUpdates.ts
|
|
487670
487758
|
init_esbuild_shims();
|
|
487671
|
-
var
|
|
487759
|
+
var import_react167 = __toESM(require_react(), 1);
|
|
487672
487760
|
function confirmationRequestsReducer(state, action) {
|
|
487673
487761
|
switch (action.type) {
|
|
487674
487762
|
case "add":
|
|
@@ -487685,8 +487773,8 @@ var useConfirmUpdateRequests = /* @__PURE__ */ __name(() => {
|
|
|
487685
487773
|
const [
|
|
487686
487774
|
confirmUpdateExtensionRequests,
|
|
487687
487775
|
dispatchConfirmUpdateExtensionRequests
|
|
487688
|
-
] = (0,
|
|
487689
|
-
const addConfirmUpdateExtensionRequest = (0,
|
|
487776
|
+
] = (0, import_react167.useReducer)(confirmationRequestsReducer, []);
|
|
487777
|
+
const addConfirmUpdateExtensionRequest = (0, import_react167.useCallback)(
|
|
487690
487778
|
(original) => {
|
|
487691
487779
|
const wrappedRequest = {
|
|
487692
487780
|
prompt: original.prompt,
|
|
@@ -487724,11 +487812,11 @@ function settingInputRequestsReducer(state, action) {
|
|
|
487724
487812
|
}
|
|
487725
487813
|
__name(settingInputRequestsReducer, "settingInputRequestsReducer");
|
|
487726
487814
|
var useSettingInputRequests = /* @__PURE__ */ __name(() => {
|
|
487727
|
-
const [settingInputRequests, dispatchSettingInputRequests] = (0,
|
|
487815
|
+
const [settingInputRequests, dispatchSettingInputRequests] = (0, import_react167.useReducer)(
|
|
487728
487816
|
settingInputRequestsReducer,
|
|
487729
487817
|
[]
|
|
487730
487818
|
);
|
|
487731
|
-
const addSettingInputRequest = (0,
|
|
487819
|
+
const addSettingInputRequest = (0, import_react167.useCallback)(
|
|
487732
487820
|
(original) => {
|
|
487733
487821
|
const wrappedRequest = {
|
|
487734
487822
|
settingName: original.settingName,
|
|
@@ -487775,11 +487863,11 @@ function pluginChoiceRequestsReducer(state, action) {
|
|
|
487775
487863
|
}
|
|
487776
487864
|
__name(pluginChoiceRequestsReducer, "pluginChoiceRequestsReducer");
|
|
487777
487865
|
var usePluginChoiceRequests = /* @__PURE__ */ __name(() => {
|
|
487778
|
-
const [pluginChoiceRequests, dispatchPluginChoiceRequests] = (0,
|
|
487866
|
+
const [pluginChoiceRequests, dispatchPluginChoiceRequests] = (0, import_react167.useReducer)(
|
|
487779
487867
|
pluginChoiceRequestsReducer,
|
|
487780
487868
|
[]
|
|
487781
487869
|
);
|
|
487782
|
-
const addPluginChoiceRequest = (0,
|
|
487870
|
+
const addPluginChoiceRequest = (0, import_react167.useCallback)(
|
|
487783
487871
|
(original) => {
|
|
487784
487872
|
const wrappedRequest = {
|
|
487785
487873
|
marketplaceName: original.marketplaceName,
|
|
@@ -487813,12 +487901,12 @@ var usePluginChoiceRequests = /* @__PURE__ */ __name(() => {
|
|
|
487813
487901
|
};
|
|
487814
487902
|
}, "usePluginChoiceRequests");
|
|
487815
487903
|
var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd6) => {
|
|
487816
|
-
const [extensionsUpdateState, dispatchExtensionStateUpdate] = (0,
|
|
487904
|
+
const [extensionsUpdateState, dispatchExtensionStateUpdate] = (0, import_react167.useReducer)(
|
|
487817
487905
|
extensionUpdatesReducer,
|
|
487818
487906
|
initialExtensionUpdatesState
|
|
487819
487907
|
);
|
|
487820
487908
|
const extensions = extensionManager.getLoadedExtensions();
|
|
487821
|
-
(0,
|
|
487909
|
+
(0, import_react167.useEffect)(() => {
|
|
487822
487910
|
(async () => {
|
|
487823
487911
|
const extensionsToCheck = extensions.filter((extension) => {
|
|
487824
487912
|
const currentStatus = extensionsUpdateState.extensionStatuses.get(
|
|
@@ -487846,7 +487934,7 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
|
|
|
487846
487934
|
extensionsUpdateState.extensionStatuses,
|
|
487847
487935
|
dispatchExtensionStateUpdate
|
|
487848
487936
|
]);
|
|
487849
|
-
(0,
|
|
487937
|
+
(0, import_react167.useEffect)(() => {
|
|
487850
487938
|
if (extensionsUpdateState.batchChecksInProgress > 0) {
|
|
487851
487939
|
return;
|
|
487852
487940
|
}
|
|
@@ -487905,7 +487993,7 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
|
|
|
487905
487993
|
);
|
|
487906
487994
|
}
|
|
487907
487995
|
}, [extensions, extensionManager, extensionsUpdateState, addItem, cwd6]);
|
|
487908
|
-
const extensionsUpdateStateComputed = (0,
|
|
487996
|
+
const extensionsUpdateStateComputed = (0, import_react167.useMemo)(() => {
|
|
487909
487997
|
const result = /* @__PURE__ */ new Map();
|
|
487910
487998
|
for (const [
|
|
487911
487999
|
key,
|
|
@@ -487924,15 +488012,15 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
|
|
|
487924
488012
|
|
|
487925
488013
|
// packages/cli/src/ui/hooks/useWelcomeBack.ts
|
|
487926
488014
|
init_esbuild_shims();
|
|
487927
|
-
var
|
|
488015
|
+
var import_react168 = __toESM(require_react(), 1);
|
|
487928
488016
|
init_dist4();
|
|
487929
488017
|
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,
|
|
488018
|
+
const [welcomeBackInfo, setWelcomeBackInfo] = (0, import_react168.useState)(null);
|
|
488019
|
+
const [showWelcomeBackDialog, setShowWelcomeBackDialog] = (0, import_react168.useState)(false);
|
|
488020
|
+
const [welcomeBackChoice, setWelcomeBackChoice] = (0, import_react168.useState)(null);
|
|
488021
|
+
const [shouldFillInput, setShouldFillInput] = (0, import_react168.useState)(false);
|
|
488022
|
+
const [inputFillText, setInputFillText] = (0, import_react168.useState)(null);
|
|
488023
|
+
const checkWelcomeBack = (0, import_react168.useCallback)(async () => {
|
|
487936
488024
|
if (settings2.ui?.enableWelcomeBack === false) {
|
|
487937
488025
|
return;
|
|
487938
488026
|
}
|
|
@@ -487946,7 +488034,7 @@ function useWelcomeBack(config2, submitQuery, buffer, settings2) {
|
|
|
487946
488034
|
config2.getDebugLogger().debug("Welcome back check failed:", error40);
|
|
487947
488035
|
}
|
|
487948
488036
|
}, [config2, settings2.ui?.enableWelcomeBack]);
|
|
487949
|
-
const handleWelcomeBackSelection = (0,
|
|
488037
|
+
const handleWelcomeBackSelection = (0, import_react168.useCallback)(
|
|
487950
488038
|
(choice2) => {
|
|
487951
488039
|
setWelcomeBackChoice(choice2);
|
|
487952
488040
|
setShowWelcomeBackDialog(false);
|
|
@@ -487958,21 +488046,21 @@ function useWelcomeBack(config2, submitQuery, buffer, settings2) {
|
|
|
487958
488046
|
},
|
|
487959
488047
|
[welcomeBackInfo]
|
|
487960
488048
|
);
|
|
487961
|
-
const handleWelcomeBackClose = (0,
|
|
488049
|
+
const handleWelcomeBackClose = (0, import_react168.useCallback)(() => {
|
|
487962
488050
|
setWelcomeBackChoice("restart");
|
|
487963
488051
|
setShowWelcomeBackDialog(false);
|
|
487964
488052
|
}, []);
|
|
487965
|
-
const clearInputFill = (0,
|
|
488053
|
+
const clearInputFill = (0, import_react168.useCallback)(() => {
|
|
487966
488054
|
setShouldFillInput(false);
|
|
487967
488055
|
setInputFillText(null);
|
|
487968
488056
|
}, []);
|
|
487969
|
-
(0,
|
|
488057
|
+
(0, import_react168.useEffect)(() => {
|
|
487970
488058
|
if (shouldFillInput && inputFillText) {
|
|
487971
488059
|
buffer.setText(inputFillText);
|
|
487972
488060
|
clearInputFill();
|
|
487973
488061
|
}
|
|
487974
488062
|
}, [shouldFillInput, inputFillText, buffer, clearInputFill]);
|
|
487975
|
-
(0,
|
|
488063
|
+
(0, import_react168.useEffect)(() => {
|
|
487976
488064
|
checkWelcomeBack();
|
|
487977
488065
|
}, [checkWelcomeBack]);
|
|
487978
488066
|
return {
|
|
@@ -487993,9 +488081,9 @@ __name(useWelcomeBack, "useWelcomeBack");
|
|
|
487993
488081
|
|
|
487994
488082
|
// packages/cli/src/ui/hooks/useDialogClose.ts
|
|
487995
488083
|
init_esbuild_shims();
|
|
487996
|
-
var
|
|
488084
|
+
var import_react169 = __toESM(require_react(), 1);
|
|
487997
488085
|
function useDialogClose(options2) {
|
|
487998
|
-
const closeAnyOpenDialog = (0,
|
|
488086
|
+
const closeAnyOpenDialog = (0, import_react169.useCallback)(() => {
|
|
487999
488087
|
if (options2.isThemeDialogOpen) {
|
|
488000
488088
|
options2.handleThemeSelect(void 0, "User" /* User */);
|
|
488001
488089
|
return true;
|
|
@@ -488027,14 +488115,14 @@ __name(useDialogClose, "useDialogClose");
|
|
|
488027
488115
|
|
|
488028
488116
|
// packages/cli/src/ui/hooks/useInitializationAuthError.ts
|
|
488029
488117
|
init_esbuild_shims();
|
|
488030
|
-
var
|
|
488118
|
+
var import_react170 = __toESM(require_react(), 1);
|
|
488031
488119
|
var useInitializationAuthError = /* @__PURE__ */ __name((authError, onAuthError) => {
|
|
488032
|
-
const hasHandled = (0,
|
|
488033
|
-
const authErrorRef = (0,
|
|
488034
|
-
const onAuthErrorRef = (0,
|
|
488120
|
+
const hasHandled = (0, import_react170.useRef)(false);
|
|
488121
|
+
const authErrorRef = (0, import_react170.useRef)(authError);
|
|
488122
|
+
const onAuthErrorRef = (0, import_react170.useRef)(onAuthError);
|
|
488035
488123
|
authErrorRef.current = authError;
|
|
488036
488124
|
onAuthErrorRef.current = onAuthError;
|
|
488037
|
-
(0,
|
|
488125
|
+
(0, import_react170.useEffect)(() => {
|
|
488038
488126
|
if (hasHandled.current) {
|
|
488039
488127
|
return;
|
|
488040
488128
|
}
|
|
@@ -488047,13 +488135,13 @@ var useInitializationAuthError = /* @__PURE__ */ __name((authError, onAuthError)
|
|
|
488047
488135
|
|
|
488048
488136
|
// packages/cli/src/ui/hooks/useSubagentCreateDialog.ts
|
|
488049
488137
|
init_esbuild_shims();
|
|
488050
|
-
var
|
|
488138
|
+
var import_react171 = __toESM(require_react(), 1);
|
|
488051
488139
|
function useSubagentCreateDialog() {
|
|
488052
|
-
const [isSubagentCreateDialogOpen, setIsSubagentCreateDialogOpen] = (0,
|
|
488053
|
-
const openSubagentCreateDialog = (0,
|
|
488140
|
+
const [isSubagentCreateDialogOpen, setIsSubagentCreateDialogOpen] = (0, import_react171.useState)(false);
|
|
488141
|
+
const openSubagentCreateDialog = (0, import_react171.useCallback)(() => {
|
|
488054
488142
|
setIsSubagentCreateDialogOpen(true);
|
|
488055
488143
|
}, []);
|
|
488056
|
-
const closeSubagentCreateDialog = (0,
|
|
488144
|
+
const closeSubagentCreateDialog = (0, import_react171.useCallback)(() => {
|
|
488057
488145
|
setIsSubagentCreateDialogOpen(false);
|
|
488058
488146
|
}, []);
|
|
488059
488147
|
return {
|
|
@@ -488066,13 +488154,13 @@ __name(useSubagentCreateDialog, "useSubagentCreateDialog");
|
|
|
488066
488154
|
|
|
488067
488155
|
// packages/cli/src/ui/hooks/useAgentsManagerDialog.ts
|
|
488068
488156
|
init_esbuild_shims();
|
|
488069
|
-
var
|
|
488157
|
+
var import_react172 = __toESM(require_react(), 1);
|
|
488070
488158
|
var useAgentsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
488071
|
-
const [isAgentsManagerDialogOpen, setIsAgentsManagerDialogOpen] = (0,
|
|
488072
|
-
const openAgentsManagerDialog = (0,
|
|
488159
|
+
const [isAgentsManagerDialogOpen, setIsAgentsManagerDialogOpen] = (0, import_react172.useState)(false);
|
|
488160
|
+
const openAgentsManagerDialog = (0, import_react172.useCallback)(() => {
|
|
488073
488161
|
setIsAgentsManagerDialogOpen(true);
|
|
488074
488162
|
}, []);
|
|
488075
|
-
const closeAgentsManagerDialog = (0,
|
|
488163
|
+
const closeAgentsManagerDialog = (0, import_react172.useCallback)(() => {
|
|
488076
488164
|
setIsAgentsManagerDialogOpen(false);
|
|
488077
488165
|
}, []);
|
|
488078
488166
|
return {
|
|
@@ -488084,13 +488172,13 @@ var useAgentsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
|
488084
488172
|
|
|
488085
488173
|
// packages/cli/src/ui/hooks/useExtensionsManagerDialog.ts
|
|
488086
488174
|
init_esbuild_shims();
|
|
488087
|
-
var
|
|
488175
|
+
var import_react173 = __toESM(require_react(), 1);
|
|
488088
488176
|
var useExtensionsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
488089
|
-
const [isExtensionsManagerDialogOpen, setIsExtensionsManagerDialogOpen] = (0,
|
|
488090
|
-
const openExtensionsManagerDialog = (0,
|
|
488177
|
+
const [isExtensionsManagerDialogOpen, setIsExtensionsManagerDialogOpen] = (0, import_react173.useState)(false);
|
|
488178
|
+
const openExtensionsManagerDialog = (0, import_react173.useCallback)(() => {
|
|
488091
488179
|
setIsExtensionsManagerDialogOpen(true);
|
|
488092
488180
|
}, []);
|
|
488093
|
-
const closeExtensionsManagerDialog = (0,
|
|
488181
|
+
const closeExtensionsManagerDialog = (0, import_react173.useCallback)(() => {
|
|
488094
488182
|
setIsExtensionsManagerDialogOpen(false);
|
|
488095
488183
|
}, []);
|
|
488096
488184
|
return {
|
|
@@ -488102,13 +488190,13 @@ var useExtensionsManagerDialog = /* @__PURE__ */ __name(() => {
|
|
|
488102
488190
|
|
|
488103
488191
|
// packages/cli/src/ui/hooks/useMcpDialog.ts
|
|
488104
488192
|
init_esbuild_shims();
|
|
488105
|
-
var
|
|
488193
|
+
var import_react174 = __toESM(require_react(), 1);
|
|
488106
488194
|
var useMcpDialog = /* @__PURE__ */ __name(() => {
|
|
488107
|
-
const [isMcpDialogOpen, setIsMcpDialogOpen] = (0,
|
|
488108
|
-
const openMcpDialog = (0,
|
|
488195
|
+
const [isMcpDialogOpen, setIsMcpDialogOpen] = (0, import_react174.useState)(false);
|
|
488196
|
+
const openMcpDialog = (0, import_react174.useCallback)(() => {
|
|
488109
488197
|
setIsMcpDialogOpen(true);
|
|
488110
488198
|
}, []);
|
|
488111
|
-
const closeMcpDialog = (0,
|
|
488199
|
+
const closeMcpDialog = (0, import_react174.useCallback)(() => {
|
|
488112
488200
|
setIsMcpDialogOpen(false);
|
|
488113
488201
|
}, []);
|
|
488114
488202
|
return {
|
|
@@ -488120,13 +488208,13 @@ var useMcpDialog = /* @__PURE__ */ __name(() => {
|
|
|
488120
488208
|
|
|
488121
488209
|
// packages/cli/src/ui/hooks/useHooksDialog.ts
|
|
488122
488210
|
init_esbuild_shims();
|
|
488123
|
-
var
|
|
488211
|
+
var import_react175 = __toESM(require_react(), 1);
|
|
488124
488212
|
var useHooksDialog = /* @__PURE__ */ __name(() => {
|
|
488125
|
-
const [isHooksDialogOpen, setIsHooksDialogOpen] = (0,
|
|
488126
|
-
const openHooksDialog = (0,
|
|
488213
|
+
const [isHooksDialogOpen, setIsHooksDialogOpen] = (0, import_react175.useState)(false);
|
|
488214
|
+
const openHooksDialog = (0, import_react175.useCallback)(() => {
|
|
488127
488215
|
setIsHooksDialogOpen(true);
|
|
488128
488216
|
}, []);
|
|
488129
|
-
const closeHooksDialog = (0,
|
|
488217
|
+
const closeHooksDialog = (0, import_react175.useCallback)(() => {
|
|
488130
488218
|
setIsHooksDialogOpen(false);
|
|
488131
488219
|
}, []);
|
|
488132
488220
|
return {
|
|
@@ -488138,7 +488226,7 @@ var useHooksDialog = /* @__PURE__ */ __name(() => {
|
|
|
488138
488226
|
|
|
488139
488227
|
// packages/cli/src/ui/hooks/useAttentionNotifications.ts
|
|
488140
488228
|
init_esbuild_shims();
|
|
488141
|
-
var
|
|
488229
|
+
var import_react176 = __toESM(require_react(), 1);
|
|
488142
488230
|
|
|
488143
488231
|
// packages/cli/src/utils/attentionNotification.ts
|
|
488144
488232
|
init_esbuild_shims();
|
|
@@ -488175,10 +488263,10 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
488175
488263
|
config: config2
|
|
488176
488264
|
}) => {
|
|
488177
488265
|
const terminalBellEnabled = settings2?.merged?.general?.terminalBell ?? true;
|
|
488178
|
-
const awaitingNotificationSentRef = (0,
|
|
488179
|
-
const respondingElapsedRef = (0,
|
|
488180
|
-
const idleNotificationSentRef = (0,
|
|
488181
|
-
(0,
|
|
488266
|
+
const awaitingNotificationSentRef = (0, import_react176.useRef)(false);
|
|
488267
|
+
const respondingElapsedRef = (0, import_react176.useRef)(0);
|
|
488268
|
+
const idleNotificationSentRef = (0, import_react176.useRef)(false);
|
|
488269
|
+
(0, import_react176.useEffect)(() => {
|
|
488182
488270
|
if (streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ && !isFocused && !awaitingNotificationSentRef.current) {
|
|
488183
488271
|
notifyTerminalAttention("tool_approval" /* ToolApproval */, {
|
|
488184
488272
|
enabled: terminalBellEnabled
|
|
@@ -488189,7 +488277,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
488189
488277
|
awaitingNotificationSentRef.current = false;
|
|
488190
488278
|
}
|
|
488191
488279
|
}, [isFocused, streamingState, terminalBellEnabled]);
|
|
488192
|
-
(0,
|
|
488280
|
+
(0, import_react176.useEffect)(() => {
|
|
488193
488281
|
if (streamingState === "responding" /* Responding */) {
|
|
488194
488282
|
respondingElapsedRef.current = elapsedTime;
|
|
488195
488283
|
idleNotificationSentRef.current = false;
|
|
@@ -488225,7 +488313,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
488225
488313
|
|
|
488226
488314
|
// packages/cli/src/ui/hooks/useVoice.ts
|
|
488227
488315
|
init_esbuild_shims();
|
|
488228
|
-
var
|
|
488316
|
+
var import_react177 = __toESM(require_react(), 1);
|
|
488229
488317
|
import os46 from "node:os";
|
|
488230
488318
|
import path146 from "node:path";
|
|
488231
488319
|
import fs132 from "node:fs";
|
|
@@ -488260,12 +488348,12 @@ __name(transcribe, "transcribe");
|
|
|
488260
488348
|
|
|
488261
488349
|
// packages/cli/src/ui/hooks/useVoice.ts
|
|
488262
488350
|
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,
|
|
488351
|
+
const [voiceState, setVoiceState] = (0, import_react177.useState)("idle");
|
|
488352
|
+
const [error40, setError] = (0, import_react177.useState)(null);
|
|
488353
|
+
const procRef = (0, import_react177.useRef)(null);
|
|
488354
|
+
const audioPathRef = (0, import_react177.useRef)(null);
|
|
488355
|
+
const backend = (0, import_react177.useMemo)(() => detectBackend2(), []);
|
|
488356
|
+
const start2 = (0, import_react177.useCallback)(async () => {
|
|
488269
488357
|
if (voiceState !== "idle") return;
|
|
488270
488358
|
const tmpPath = path146.join(os46.tmpdir(), `proto-voice-${Date.now()}.wav`);
|
|
488271
488359
|
audioPathRef.current = tmpPath;
|
|
@@ -488278,7 +488366,7 @@ function useVoice(sttEndpoint, sttApiKey) {
|
|
|
488278
488366
|
setError(e4 instanceof Error ? e4.message : String(e4));
|
|
488279
488367
|
}
|
|
488280
488368
|
}, [voiceState, backend]);
|
|
488281
|
-
const stop3 = (0,
|
|
488369
|
+
const stop3 = (0, import_react177.useCallback)(async () => {
|
|
488282
488370
|
if (voiceState !== "recording" || !procRef.current || !audioPathRef.current) {
|
|
488283
488371
|
return "";
|
|
488284
488372
|
}
|
|
@@ -488311,7 +488399,7 @@ function useVoice(sttEndpoint, sttApiKey) {
|
|
|
488311
488399
|
return "";
|
|
488312
488400
|
}
|
|
488313
488401
|
}, [voiceState, sttEndpoint, sttApiKey]);
|
|
488314
|
-
const reset = (0,
|
|
488402
|
+
const reset = (0, import_react177.useCallback)(() => {
|
|
488315
488403
|
setVoiceState("idle");
|
|
488316
488404
|
setError(null);
|
|
488317
488405
|
}, []);
|
|
@@ -488346,21 +488434,21 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488346
488434
|
const { settings: settings2, config: config2, initializationResult } = props;
|
|
488347
488435
|
const historyManager = useHistory();
|
|
488348
488436
|
useMemoryMonitor(historyManager);
|
|
488349
|
-
const [debugMessage, setDebugMessage] = (0,
|
|
488350
|
-
const [quittingMessages, setQuittingMessages] = (0,
|
|
488351
|
-
const [themeError, setThemeError] = (0,
|
|
488437
|
+
const [debugMessage, setDebugMessage] = (0, import_react178.useState)("");
|
|
488438
|
+
const [quittingMessages, setQuittingMessages] = (0, import_react178.useState)(null);
|
|
488439
|
+
const [themeError, setThemeError] = (0, import_react178.useState)(
|
|
488352
488440
|
initializationResult.themeError
|
|
488353
488441
|
);
|
|
488354
|
-
const [isProcessing, setIsProcessing] = (0,
|
|
488355
|
-
const [embeddedShellFocused, setEmbeddedShellFocused] = (0,
|
|
488356
|
-
const [geminiMdFileCount, setGeminiMdFileCount] = (0,
|
|
488442
|
+
const [isProcessing, setIsProcessing] = (0, import_react178.useState)(false);
|
|
488443
|
+
const [embeddedShellFocused, setEmbeddedShellFocused] = (0, import_react178.useState)(false);
|
|
488444
|
+
const [geminiMdFileCount, setGeminiMdFileCount] = (0, import_react178.useState)(
|
|
488357
488445
|
initializationResult.geminiMdFileCount
|
|
488358
488446
|
);
|
|
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,
|
|
488447
|
+
const [shellModeActive, setShellModeActive] = (0, import_react178.useState)(false);
|
|
488448
|
+
const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = (0, import_react178.useState)(false);
|
|
488449
|
+
const [historyRemountKey, setHistoryRemountKey] = (0, import_react178.useState)(0);
|
|
488450
|
+
const [updateInfo, setUpdateInfo] = (0, import_react178.useState)(null);
|
|
488451
|
+
const [isTrustedFolder, setIsTrustedFolder] = (0, import_react178.useState)(
|
|
488364
488452
|
config2.isTrustedFolder()
|
|
488365
488453
|
);
|
|
488366
488454
|
const extensionManager = config2.getExtensionManager();
|
|
@@ -488415,43 +488503,43 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488415
488503
|
config2.getWorkingDir()
|
|
488416
488504
|
);
|
|
488417
488505
|
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,
|
|
488506
|
+
const [isTrustDialogOpen, setTrustDialogOpen] = (0, import_react178.useState)(false);
|
|
488507
|
+
const openTrustDialog = (0, import_react178.useCallback)(() => setTrustDialogOpen(true), []);
|
|
488508
|
+
const closeTrustDialog = (0, import_react178.useCallback)(() => setTrustDialogOpen(false), []);
|
|
488509
|
+
const [isPermissionsDialogOpen, setPermissionsDialogOpen] = (0, import_react178.useState)(false);
|
|
488510
|
+
const openPermissionsDialog = (0, import_react178.useCallback)(
|
|
488423
488511
|
() => setPermissionsDialogOpen(true),
|
|
488424
488512
|
[]
|
|
488425
488513
|
);
|
|
488426
|
-
const closePermissionsDialog = (0,
|
|
488514
|
+
const closePermissionsDialog = (0, import_react178.useCallback)(
|
|
488427
488515
|
() => setPermissionsDialogOpen(false),
|
|
488428
488516
|
[]
|
|
488429
488517
|
);
|
|
488430
|
-
const [currentModel, setCurrentModel] = (0,
|
|
488431
|
-
const [isConfigInitialized, setConfigInitialized] = (0,
|
|
488432
|
-
const [userMessages, setUserMessages] = (0,
|
|
488518
|
+
const [currentModel, setCurrentModel] = (0, import_react178.useState)(() => config2.getModel());
|
|
488519
|
+
const [isConfigInitialized, setConfigInitialized] = (0, import_react178.useState)(false);
|
|
488520
|
+
const [userMessages, setUserMessages] = (0, import_react178.useState)([]);
|
|
488433
488521
|
const { columns: terminalWidth, rows: terminalHeight } = useTerminalSize();
|
|
488434
488522
|
const { stdin: stdin3, setRawMode } = use_stdin_default();
|
|
488435
488523
|
const { stdout: stdout3 } = use_stdout_default();
|
|
488436
488524
|
const { stats: sessionStats, startNewSession } = useSessionStats();
|
|
488437
488525
|
const logger10 = useLogger(config2.storage, sessionStats.sessionId);
|
|
488438
488526
|
const branchName = useGitBranchName(config2.getTargetDir());
|
|
488439
|
-
const mainControlsRef = (0,
|
|
488527
|
+
const mainControlsRef = (0, import_react178.useRef)(null);
|
|
488440
488528
|
const staticExtraHeight = 3;
|
|
488441
|
-
const [sessionName, setSessionName] = (0,
|
|
488529
|
+
const [sessionName, setSessionName] = (0, import_react178.useState)(null);
|
|
488442
488530
|
useInitializationEffects(
|
|
488443
488531
|
config2,
|
|
488444
488532
|
historyManager,
|
|
488445
488533
|
setConfigInitialized,
|
|
488446
488534
|
setSessionName
|
|
488447
488535
|
);
|
|
488448
|
-
(0,
|
|
488536
|
+
(0, import_react178.useEffect)(
|
|
488449
488537
|
() => setUpdateHandler(historyManager.addItem, setUpdateInfo),
|
|
488450
488538
|
[historyManager.addItem]
|
|
488451
488539
|
);
|
|
488452
488540
|
const { lastFinished } = useBackgroundAgentProgress();
|
|
488453
488541
|
const addHistoryItem = historyManager.addItem;
|
|
488454
|
-
(0,
|
|
488542
|
+
(0, import_react178.useEffect)(() => {
|
|
488455
488543
|
if (!lastFinished?.hitLimit) return;
|
|
488456
488544
|
addHistoryItem(
|
|
488457
488545
|
{
|
|
@@ -488461,19 +488549,19 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488461
488549
|
Date.now()
|
|
488462
488550
|
);
|
|
488463
488551
|
}, [lastFinished, addHistoryItem]);
|
|
488464
|
-
(0,
|
|
488552
|
+
(0, import_react178.useEffect)(() => {
|
|
488465
488553
|
const unsubscribe = config2.onModelChange((model) => {
|
|
488466
488554
|
setCurrentModel(model);
|
|
488467
488555
|
});
|
|
488468
488556
|
return unsubscribe;
|
|
488469
488557
|
}, [config2]);
|
|
488470
|
-
const { inputWidth, suggestionsWidth } = (0,
|
|
488558
|
+
const { inputWidth, suggestionsWidth } = (0, import_react178.useMemo)(() => {
|
|
488471
488559
|
const { inputWidth: inputWidth2, suggestionsWidth: suggestionsWidth2 } = calculatePromptWidths(terminalWidth);
|
|
488472
488560
|
return { inputWidth: inputWidth2, suggestionsWidth: suggestionsWidth2 };
|
|
488473
488561
|
}, [terminalWidth]);
|
|
488474
488562
|
const mainAreaWidth = Math.min(terminalWidth - 4, 100);
|
|
488475
488563
|
const staticAreaMaxItemHeight = Math.max(terminalHeight * 4, 100);
|
|
488476
|
-
const isValidPath = (0,
|
|
488564
|
+
const isValidPath = (0, import_react178.useCallback)((filePath) => {
|
|
488477
488565
|
try {
|
|
488478
488566
|
return fs133.existsSync(filePath) && fs133.statSync(filePath).isFile();
|
|
488479
488567
|
} catch (_e2) {
|
|
@@ -488488,7 +488576,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488488
488576
|
isValidPath,
|
|
488489
488577
|
shellModeActive
|
|
488490
488578
|
});
|
|
488491
|
-
(0,
|
|
488579
|
+
(0, import_react178.useEffect)(() => {
|
|
488492
488580
|
const fetchUserMessages = /* @__PURE__ */ __name(async () => {
|
|
488493
488581
|
const pastMessagesRaw = await logger10?.getPreviousUserMessages() || [];
|
|
488494
488582
|
const currentSessionUserMessages = historyManager.history.filter(
|
|
@@ -488511,13 +488599,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488511
488599
|
}, "fetchUserMessages");
|
|
488512
488600
|
fetchUserMessages();
|
|
488513
488601
|
}, [historyManager.history, logger10]);
|
|
488514
|
-
const refreshStatic = (0,
|
|
488602
|
+
const refreshStatic = (0, import_react178.useCallback)(() => {
|
|
488515
488603
|
stdout3.write("\x1B[?2026h");
|
|
488516
488604
|
stdout3.write(base_exports.clearTerminal);
|
|
488517
488605
|
stdout3.write("\x1B[?2026l");
|
|
488518
488606
|
setHistoryRemountKey((prev) => prev + 1);
|
|
488519
488607
|
}, [setHistoryRemountKey, stdout3]);
|
|
488520
|
-
(0,
|
|
488608
|
+
(0, import_react178.useEffect)(() => {
|
|
488521
488609
|
const unsubscribe = config2.onModelChange((model) => {
|
|
488522
488610
|
setCurrentModel((prev) => {
|
|
488523
488611
|
if (prev === model) {
|
|
@@ -488559,7 +488647,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488559
488647
|
cancelAuthentication
|
|
488560
488648
|
} = useAuthCommand(settings2, config2, historyManager.addItem, refreshStatic);
|
|
488561
488649
|
useInitializationAuthError(initializationResult.authError, onAuthError);
|
|
488562
|
-
(0,
|
|
488650
|
+
(0, import_react178.useEffect)(() => {
|
|
488563
488651
|
const currentAuthType = config2.getModelsConfig().getCurrentAuthType();
|
|
488564
488652
|
if (settings2.merged.security?.auth?.enforcedType && currentAuthType && settings2.merged.security?.auth.enforcedType !== currentAuthType) {
|
|
488565
488653
|
onAuthError(
|
|
@@ -488585,7 +488673,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488585
488673
|
config2,
|
|
488586
488674
|
onAuthError
|
|
488587
488675
|
]);
|
|
488588
|
-
const [editorError, setEditorError] = (0,
|
|
488676
|
+
const [editorError, setEditorError] = (0, import_react178.useState)(null);
|
|
488589
488677
|
const {
|
|
488590
488678
|
isEditorDialogOpen,
|
|
488591
488679
|
openEditorDialog,
|
|
@@ -488639,10 +488727,10 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488639
488727
|
} = useExtensionsManagerDialog();
|
|
488640
488728
|
const { isMcpDialogOpen, openMcpDialog, closeMcpDialog } = useMcpDialog();
|
|
488641
488729
|
const { isHooksDialogOpen, openHooksDialog, closeHooksDialog } = useHooksDialog();
|
|
488642
|
-
const [isRewindDialogOpen, setIsRewindDialogOpen] = (0,
|
|
488643
|
-
const openRewindDialog = (0,
|
|
488644
|
-
const closeRewindDialog = (0,
|
|
488645
|
-
const slashCommandActions = (0,
|
|
488730
|
+
const [isRewindDialogOpen, setIsRewindDialogOpen] = (0, import_react178.useState)(false);
|
|
488731
|
+
const openRewindDialog = (0, import_react178.useCallback)(() => setIsRewindDialogOpen(true), []);
|
|
488732
|
+
const closeRewindDialog = (0, import_react178.useCallback)(() => setIsRewindDialogOpen(false), []);
|
|
488733
|
+
const slashCommandActions = (0, import_react178.useMemo)(
|
|
488646
488734
|
() => ({
|
|
488647
488735
|
openAuthDialog,
|
|
488648
488736
|
openThemeDialog,
|
|
@@ -488723,14 +488811,14 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488723
488811
|
logger10,
|
|
488724
488812
|
setSessionName
|
|
488725
488813
|
);
|
|
488726
|
-
const onDebugMessage = (0,
|
|
488814
|
+
const onDebugMessage = (0, import_react178.useCallback)(
|
|
488727
488815
|
(message) => {
|
|
488728
488816
|
config2.getDebugLogger().debug(message);
|
|
488729
488817
|
},
|
|
488730
488818
|
[config2]
|
|
488731
488819
|
);
|
|
488732
488820
|
const stableAddItem = historyManager.addItem;
|
|
488733
|
-
const performMemoryRefresh = (0,
|
|
488821
|
+
const performMemoryRefresh = (0, import_react178.useCallback)(async () => {
|
|
488734
488822
|
stableAddItem(
|
|
488735
488823
|
{
|
|
488736
488824
|
type: "info" /* INFO */,
|
|
@@ -488776,7 +488864,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488776
488864
|
debugLogger159.error("Error refreshing memory:", error40);
|
|
488777
488865
|
}
|
|
488778
488866
|
}, [config2, stableAddItem, settings2.merged]);
|
|
488779
|
-
const cancelHandlerRef = (0,
|
|
488867
|
+
const cancelHandlerRef = (0, import_react178.useRef)(() => {
|
|
488780
488868
|
});
|
|
488781
488869
|
const { messageQueue, addMessage, popLast, drain } = useMessageQueue();
|
|
488782
488870
|
const voiceEnabled = settings2.merged.voice?.enabled ?? false;
|
|
@@ -488828,7 +488916,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488828
488916
|
drain,
|
|
488829
488917
|
submitQuery
|
|
488830
488918
|
);
|
|
488831
|
-
const [hasSuggestionsVisible, setHasSuggestionsVisible] = (0,
|
|
488919
|
+
const [hasSuggestionsVisible, setHasSuggestionsVisible] = (0, import_react178.useState)(false);
|
|
488832
488920
|
const agentViewState = useAgentViewState();
|
|
488833
488921
|
const geminiClient = config2.getGeminiClient();
|
|
488834
488922
|
const showAutoAcceptIndicator = useAutoAcceptIndicator({
|
|
@@ -488856,7 +488944,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488856
488944
|
settingInputRequests,
|
|
488857
488945
|
pendingGeminiHistoryItems
|
|
488858
488946
|
});
|
|
488859
|
-
const handleFinalSubmit = (0,
|
|
488947
|
+
const handleFinalSubmit = (0, import_react178.useCallback)(
|
|
488860
488948
|
(submittedValue) => {
|
|
488861
488949
|
if (agentViewState.activeView !== "main") {
|
|
488862
488950
|
const agent = agentViewState.agents.get(agentViewState.activeView);
|
|
@@ -488971,7 +489059,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488971
489059
|
handleWelcomeBackSelection,
|
|
488972
489060
|
handleWelcomeBackClose
|
|
488973
489061
|
} = useWelcomeBack(config2, handleFinalSubmit, buffer, settings2.merged);
|
|
488974
|
-
cancelHandlerRef.current = (0,
|
|
489062
|
+
cancelHandlerRef.current = (0, import_react178.useCallback)(() => {
|
|
488975
489063
|
const pendingHistoryItems2 = [
|
|
488976
489064
|
...pendingSlashCommandHistoryItems,
|
|
488977
489065
|
...pendingGeminiHistoryItems
|
|
@@ -488996,15 +489084,15 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
488996
489084
|
pendingSlashCommandHistoryItems,
|
|
488997
489085
|
pendingGeminiHistoryItems
|
|
488998
489086
|
]);
|
|
488999
|
-
const handleClearScreen = (0,
|
|
489087
|
+
const handleClearScreen = (0, import_react178.useCallback)(() => {
|
|
489000
489088
|
historyManager.clearItems();
|
|
489001
489089
|
clearScreen2();
|
|
489002
489090
|
refreshStatic();
|
|
489003
489091
|
}, [historyManager, refreshStatic]);
|
|
489004
489092
|
const { handleInput: vimHandleInput } = useVim(buffer, handleFinalSubmit);
|
|
489005
489093
|
const isInputActive = !initError && !isProcessing && (streamingState === "idle" /* Idle */ || streamingState === "responding" /* Responding */);
|
|
489006
|
-
const [controlsHeight, setControlsHeight] = (0,
|
|
489007
|
-
(0,
|
|
489094
|
+
const [controlsHeight, setControlsHeight] = (0, import_react178.useState)(0);
|
|
489095
|
+
(0, import_react178.useLayoutEffect)(() => {
|
|
489008
489096
|
if (mainControlsRef.current) {
|
|
489009
489097
|
const fullFooterMeasurement = measure_element_default(mainControlsRef.current);
|
|
489010
489098
|
if (fullFooterMeasurement.height > 0) {
|
|
@@ -489037,13 +489125,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
489037
489125
|
history: historyManager.history,
|
|
489038
489126
|
awayThresholdMinutes: settings2.merged.general?.sessionRecapAwayThresholdMinutes
|
|
489039
489127
|
});
|
|
489040
|
-
const contextFileNames = (0,
|
|
489128
|
+
const contextFileNames = (0, import_react178.useMemo)(() => {
|
|
489041
489129
|
const fromSettings = settings2.merged.context?.fileName;
|
|
489042
489130
|
return fromSettings ? Array.isArray(fromSettings) ? fromSettings : [fromSettings] : getAllGeminiMdFilenames();
|
|
489043
489131
|
}, [settings2.merged.context?.fileName]);
|
|
489044
|
-
const initialPrompt = (0,
|
|
489045
|
-
const initialPromptSubmitted = (0,
|
|
489046
|
-
(0,
|
|
489132
|
+
const initialPrompt = (0, import_react178.useMemo)(() => config2.getQuestion(), [config2]);
|
|
489133
|
+
const initialPromptSubmitted = (0, import_react178.useRef)(false);
|
|
489134
|
+
(0, import_react178.useEffect)(() => {
|
|
489047
489135
|
if (activePtyId) {
|
|
489048
489136
|
ShellExecutionService.resizePty(
|
|
489049
489137
|
activePtyId,
|
|
@@ -489052,7 +489140,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
489052
489140
|
);
|
|
489053
489141
|
}
|
|
489054
489142
|
}, [terminalWidth, availableTerminalHeight, activePtyId]);
|
|
489055
|
-
(0,
|
|
489143
|
+
(0, import_react178.useEffect)(() => {
|
|
489056
489144
|
if (initialPrompt && isConfigInitialized && !initialPromptSubmitted.current && !isAuthenticating && !isAuthDialogOpen && !isThemeDialogOpen && !isEditorDialogOpen && !showWelcomeBackDialog && welcomeBackChoice !== "restart" && geminiClient?.isInitialized?.()) {
|
|
489057
489145
|
handleFinalSubmit(initialPrompt);
|
|
489058
489146
|
initialPromptSubmitted.current = true;
|
|
@@ -489069,9 +489157,9 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
489069
489157
|
welcomeBackChoice,
|
|
489070
489158
|
geminiClient
|
|
489071
489159
|
]);
|
|
489072
|
-
const [idePromptAnswered, setIdePromptAnswered] = (0,
|
|
489073
|
-
const [currentIDE, setCurrentIDE] = (0,
|
|
489074
|
-
(0,
|
|
489160
|
+
const [idePromptAnswered, setIdePromptAnswered] = (0, import_react178.useState)(false);
|
|
489161
|
+
const [currentIDE, setCurrentIDE] = (0, import_react178.useState)(null);
|
|
489162
|
+
(0, import_react178.useEffect)(() => {
|
|
489075
489163
|
const getIde = /* @__PURE__ */ __name(async () => {
|
|
489076
489164
|
const ideClient = await IdeClient.getInstance();
|
|
489077
489165
|
const currentIde = ideClient.getCurrentIde();
|
|
@@ -489087,24 +489175,24 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
489087
489175
|
tomlFiles: commandMigrationTomlFiles,
|
|
489088
489176
|
setShowMigrationNudge: setShowCommandMigrationNudge
|
|
489089
489177
|
} = useCommandMigration(settings2, config2.storage);
|
|
489090
|
-
const [ideContextState, setIdeContextState] = (0,
|
|
489091
|
-
const [showIdeRestartPrompt, setShowIdeRestartPrompt] = (0,
|
|
489178
|
+
const [ideContextState, setIdeContextState] = (0, import_react178.useState)();
|
|
489179
|
+
const [showIdeRestartPrompt, setShowIdeRestartPrompt] = (0, import_react178.useState)(false);
|
|
489092
489180
|
const { isFolderTrustDialogOpen, handleFolderTrustSelect, isRestarting } = useFolderTrust(settings2, setIsTrustedFolder);
|
|
489093
489181
|
const {
|
|
489094
489182
|
needsRestart: ideNeedsRestart,
|
|
489095
489183
|
restartReason: ideTrustRestartReason
|
|
489096
489184
|
} = useIdeTrustListener();
|
|
489097
|
-
(0,
|
|
489185
|
+
(0, import_react178.useEffect)(() => {
|
|
489098
489186
|
if (ideNeedsRestart) {
|
|
489099
489187
|
setShowIdeRestartPrompt(true);
|
|
489100
489188
|
}
|
|
489101
489189
|
}, [ideNeedsRestart]);
|
|
489102
|
-
(0,
|
|
489190
|
+
(0, import_react178.useEffect)(() => {
|
|
489103
489191
|
const unsubscribe = ideContextStore.subscribe(setIdeContextState);
|
|
489104
489192
|
setIdeContextState(ideContextStore.get());
|
|
489105
489193
|
return unsubscribe;
|
|
489106
489194
|
}, []);
|
|
489107
|
-
const handleIdePromptComplete = (0,
|
|
489195
|
+
const handleIdePromptComplete = (0, import_react178.useCallback)(
|
|
489108
489196
|
(result) => {
|
|
489109
489197
|
if (result.userSelection === "yes") {
|
|
489110
489198
|
if (result.isExtensionPreInstalled) {
|
|
@@ -489120,7 +489208,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
489120
489208
|
},
|
|
489121
489209
|
[handleSlashCommand2, settings2]
|
|
489122
489210
|
);
|
|
489123
|
-
const handleCommandMigrationComplete = (0,
|
|
489211
|
+
const handleCommandMigrationComplete = (0, import_react178.useCallback)(
|
|
489124
489212
|
async (result) => {
|
|
489125
489213
|
setShowCommandMigrationNudge(false);
|
|
489126
489214
|
if (result.userSelection === "yes") {
|
|
@@ -489263,6 +489351,11 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
|
|
|
489263
489351
|
stdout3,
|
|
489264
489352
|
config2.getTargetDir()
|
|
489265
489353
|
);
|
|
489354
|
+
const tabStatusEnabled = !!settings2.merged.ui?.showStatusInTitle && !settings2.merged.ui?.hideWindowTitle;
|
|
489355
|
+
useTabStatus(
|
|
489356
|
+
tabStatusEnabled ? tabStatusKindForStreamingState(streamingState) : null,
|
|
489357
|
+
stdout3
|
|
489358
|
+
);
|
|
489266
489359
|
const nightly = props.version.includes("nightly");
|
|
489267
489360
|
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
489361
|
dialogsVisibleRef.current = dialogsVisible;
|
|
@@ -489279,11 +489372,11 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
|
|
|
489279
489372
|
history: historyManager.history,
|
|
489280
489373
|
sessionStats
|
|
489281
489374
|
});
|
|
489282
|
-
const pendingHistoryItems = (0,
|
|
489375
|
+
const pendingHistoryItems = (0, import_react178.useMemo)(
|
|
489283
489376
|
() => [...pendingSlashCommandHistoryItems, ...pendingGeminiHistoryItems],
|
|
489284
489377
|
[pendingSlashCommandHistoryItems, pendingGeminiHistoryItems]
|
|
489285
489378
|
);
|
|
489286
|
-
const uiState = (0,
|
|
489379
|
+
const uiState = (0, import_react178.useMemo)(
|
|
489287
489380
|
() => ({
|
|
489288
489381
|
history: historyManager.history,
|
|
489289
489382
|
historyManager,
|
|
@@ -489520,7 +489613,7 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
|
|
|
489520
489613
|
isTranscriptOpen
|
|
489521
489614
|
]
|
|
489522
489615
|
);
|
|
489523
|
-
const uiActions = (0,
|
|
489616
|
+
const uiActions = (0, import_react178.useMemo)(
|
|
489524
489617
|
() => ({
|
|
489525
489618
|
openThemeDialog,
|
|
489526
489619
|
openEditorDialog,
|
|
@@ -489677,9 +489770,9 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
|
|
|
489677
489770
|
|
|
489678
489771
|
// packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts
|
|
489679
489772
|
init_esbuild_shims();
|
|
489680
|
-
var
|
|
489773
|
+
var import_react179 = __toESM(require_react(), 1);
|
|
489681
489774
|
function useKittyKeyboardProtocol() {
|
|
489682
|
-
const [status] = (0,
|
|
489775
|
+
const [status] = (0, import_react179.useState)({
|
|
489683
489776
|
supported: isKittyProtocolSupported(),
|
|
489684
489777
|
enabled: isKittyProtocolEnabled(),
|
|
489685
489778
|
checking: false
|
|
@@ -490659,7 +490752,7 @@ __name(validateNonInteractiveAuth, "validateNonInteractiveAuth");
|
|
|
490659
490752
|
|
|
490660
490753
|
// packages/cli/src/ui/components/StandaloneSessionPicker.tsx
|
|
490661
490754
|
init_esbuild_shims();
|
|
490662
|
-
var
|
|
490755
|
+
var import_react180 = __toESM(require_react(), 1);
|
|
490663
490756
|
init_dist4();
|
|
490664
490757
|
var import_jsx_runtime140 = __toESM(require_jsx_runtime(), 1);
|
|
490665
490758
|
var PREVIEW_CONFIG_STUB = {
|
|
@@ -490680,7 +490773,7 @@ function StandalonePickerScreen({
|
|
|
490680
490773
|
initialSessions
|
|
490681
490774
|
}) {
|
|
490682
490775
|
const { exit } = use_app_default();
|
|
490683
|
-
const [isExiting, setIsExiting] = (0,
|
|
490776
|
+
const [isExiting, setIsExiting] = (0, import_react180.useState)(false);
|
|
490684
490777
|
const handleExit = /* @__PURE__ */ __name(() => {
|
|
490685
490778
|
setIsExiting(true);
|
|
490686
490779
|
exit();
|
|
@@ -493785,7 +493878,7 @@ var QwenAgent = class {
|
|
|
493785
493878
|
async initialize(args2) {
|
|
493786
493879
|
this.clientCapabilities = args2.clientCapabilities;
|
|
493787
493880
|
const authMethods = buildAuthMethods();
|
|
493788
|
-
const version2 = "0.
|
|
493881
|
+
const version2 = "0.55.1";
|
|
493789
493882
|
return {
|
|
493790
493883
|
protocolVersion: PROTOCOL_VERSION,
|
|
493791
493884
|
agentInfo: {
|
|
@@ -494240,11 +494333,11 @@ var QwenAgent = class {
|
|
|
494240
494333
|
|
|
494241
494334
|
// packages/cli/src/ui/utils/terminalRedrawOptimizer.ts
|
|
494242
494335
|
init_esbuild_shims();
|
|
494243
|
-
var
|
|
494244
|
-
var ERASE_LINE = `${
|
|
494245
|
-
var CURSOR_UP_ONE = `${
|
|
494246
|
-
var CURSOR_DOWN_ONE = `${
|
|
494247
|
-
var CURSOR_LEFT = `${
|
|
494336
|
+
var ESC5 = "\x1B[";
|
|
494337
|
+
var ERASE_LINE = `${ESC5}2K`;
|
|
494338
|
+
var CURSOR_UP_ONE = `${ESC5}1A`;
|
|
494339
|
+
var CURSOR_DOWN_ONE = `${ESC5}1B`;
|
|
494340
|
+
var CURSOR_LEFT = `${ESC5}G`;
|
|
494248
494341
|
var MULTILINE_ERASE_LINES_PATTERN = new RegExp(
|
|
494249
494342
|
`(?:${escapeRegExp(ERASE_LINE + CURSOR_UP_ONE)})+${escapeRegExp(
|
|
494250
494343
|
ERASE_LINE + CURSOR_LEFT
|
|
@@ -494290,14 +494383,14 @@ function optimizeMultilineEraseLinesWithCount(output) {
|
|
|
494290
494383
|
return sequence;
|
|
494291
494384
|
}
|
|
494292
494385
|
optimizedSequenceCount += 1;
|
|
494293
|
-
let boundedErase = `${
|
|
494386
|
+
let boundedErase = `${ESC5}${cursorUpCount}A`;
|
|
494294
494387
|
for (let line = 0; line < lineCount; line++) {
|
|
494295
494388
|
boundedErase += ERASE_LINE;
|
|
494296
494389
|
if (line < lineCount - 1) {
|
|
494297
494390
|
boundedErase += CURSOR_DOWN_ONE;
|
|
494298
494391
|
}
|
|
494299
494392
|
}
|
|
494300
|
-
return `${boundedErase}${
|
|
494393
|
+
return `${boundedErase}${ESC5}${cursorUpCount}A${CURSOR_LEFT}`;
|
|
494301
494394
|
}
|
|
494302
494395
|
);
|
|
494303
494396
|
return { output: optimizedOutput, optimizedSequenceCount };
|
|
@@ -494528,7 +494621,7 @@ async function startInteractiveUI(config2, settings2, startupWarnings, workspace
|
|
|
494528
494621
|
) });
|
|
494529
494622
|
}, "AppWrapper");
|
|
494530
494623
|
const instance2 = render_default(
|
|
494531
|
-
process.env["DEBUG"] ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
494624
|
+
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
494625
|
{
|
|
494533
494626
|
exitOnCtrlC: false,
|
|
494534
494627
|
patchConsole: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protolabsai/proto",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.1",
|
|
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.1"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {},
|
|
27
27
|
"optionalDependencies": {
|