@cydm/pie 1.0.31 → 1.0.33
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/dist/builtin/extensions/ask-user/index.js +1 -1
- package/dist/builtin/extensions/plan-mode/index.js +1 -1
- package/dist/builtin/extensions/subagent/index.js +2 -2
- package/dist/builtin/extensions/todo/index.js +1 -1
- package/dist/chunks/{chunk-BOFCKEV5.js → chunk-MGZHZSHB.js} +23 -4
- package/dist/chunks/{chunk-PLJQYVFC.js → chunk-QXTAEPLR.js} +55 -2
- package/dist/cli.js +76 -36
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
createAskUserCapability
|
|
4
|
-
} from "../../../chunks/chunk-
|
|
4
|
+
} from "../../../chunks/chunk-MGZHZSHB.js";
|
|
5
5
|
import "../../../chunks/chunk-4B42ZU4B.js";
|
|
6
6
|
import "../../../chunks/chunk-64XJIKVK.js";
|
|
7
7
|
import "../../../chunks/chunk-TG2EQLX2.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
isPlanModeSafeCommand,
|
|
8
8
|
markCompletedPlanSteps,
|
|
9
9
|
restoreExecutionState
|
|
10
|
-
} from "../../../chunks/chunk-
|
|
10
|
+
} from "../../../chunks/chunk-MGZHZSHB.js";
|
|
11
11
|
import "../../../chunks/chunk-4B42ZU4B.js";
|
|
12
12
|
import "../../../chunks/chunk-64XJIKVK.js";
|
|
13
13
|
import "../../../chunks/chunk-TG2EQLX2.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
createCliHostCapabilities
|
|
4
|
-
} from "../../../chunks/chunk-
|
|
4
|
+
} from "../../../chunks/chunk-QXTAEPLR.js";
|
|
5
5
|
import {
|
|
6
6
|
createSharedFileSystemTools,
|
|
7
7
|
createSubagentCapability
|
|
8
|
-
} from "../../../chunks/chunk-
|
|
8
|
+
} from "../../../chunks/chunk-MGZHZSHB.js";
|
|
9
9
|
import "../../../chunks/chunk-4B42ZU4B.js";
|
|
10
10
|
import "../../../chunks/chunk-64XJIKVK.js";
|
|
11
11
|
import "../../../chunks/chunk-TG2EQLX2.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
executeManageTodoList,
|
|
8
8
|
executionStateToTodos,
|
|
9
9
|
restoreExecutionState
|
|
10
|
-
} from "../../../chunks/chunk-
|
|
10
|
+
} from "../../../chunks/chunk-MGZHZSHB.js";
|
|
11
11
|
import "../../../chunks/chunk-4B42ZU4B.js";
|
|
12
12
|
import "../../../chunks/chunk-64XJIKVK.js";
|
|
13
13
|
import "../../../chunks/chunk-TG2EQLX2.js";
|
|
@@ -4109,6 +4109,11 @@ var AgentSessionQueueDispatcher = class {
|
|
|
4109
4109
|
if (this.options.getDisposed() || this.options.isStreaming() || this.options.isBlockedByRuntimePolicy()) {
|
|
4110
4110
|
return false;
|
|
4111
4111
|
}
|
|
4112
|
+
await this.options.agent.waitForIdle();
|
|
4113
|
+
if (this.options.getDisposed() || this.options.isStreaming() || this.options.isBlockedByRuntimePolicy()) {
|
|
4114
|
+
this.schedule(100);
|
|
4115
|
+
return false;
|
|
4116
|
+
}
|
|
4112
4117
|
const queuedInput = this.options.queue.peek();
|
|
4113
4118
|
if (!queuedInput) {
|
|
4114
4119
|
return false;
|
|
@@ -4382,8 +4387,18 @@ function summarizeToolFailureSignature(result) {
|
|
|
4382
4387
|
}
|
|
4383
4388
|
return summary.slice(-TOOL_FAILURE_SIGNATURE_CHARS);
|
|
4384
4389
|
}
|
|
4390
|
+
function toolOutcomeKind(event) {
|
|
4391
|
+
const result = event.result && typeof event.result === "object" ? event.result : void 0;
|
|
4392
|
+
const kind = result?.details?.outcome?.kind;
|
|
4393
|
+
return typeof kind === "string" ? kind : void 0;
|
|
4394
|
+
}
|
|
4395
|
+
function isCommandNonzero(event) {
|
|
4396
|
+
return event.toolName === "bash" && toolOutcomeKind(event) === "command_nonzero";
|
|
4397
|
+
}
|
|
4385
4398
|
function isStateChangingSuccess(event) {
|
|
4386
4399
|
if (event.isError) return false;
|
|
4400
|
+
const outcomeKind = toolOutcomeKind(event);
|
|
4401
|
+
if (outcomeKind === "command_nonzero" || outcomeKind === "timeout" || outcomeKind === "signal") return false;
|
|
4387
4402
|
if (event.toolName === "edit_file" || event.toolName === "write_file") return true;
|
|
4388
4403
|
const details = event.result && typeof event.result === "object" ? event.result.details : void 0;
|
|
4389
4404
|
return event.toolName === "bash" && details?.commandClass === "filesystem_write";
|
|
@@ -4443,7 +4458,8 @@ var AgentSessionRuntimeGuard = class {
|
|
|
4443
4458
|
}
|
|
4444
4459
|
}
|
|
4445
4460
|
recordToolExecutionEnd(event) {
|
|
4446
|
-
|
|
4461
|
+
const commandNonzero = isCommandNonzero(event);
|
|
4462
|
+
if (!event.isError && !commandNonzero) {
|
|
4447
4463
|
if (isStateChangingSuccess(event)) {
|
|
4448
4464
|
this.repeatedToolFailures.clear();
|
|
4449
4465
|
return;
|
|
@@ -4457,14 +4473,15 @@ var AgentSessionRuntimeGuard = class {
|
|
|
4457
4473
|
return;
|
|
4458
4474
|
}
|
|
4459
4475
|
const resultSummary = summarizeToolFailureSignature(event.result);
|
|
4460
|
-
const
|
|
4476
|
+
const reason = commandNonzero ? "repeated_command_nonzero" : "repeated_tool_error";
|
|
4477
|
+
const key = `${event.toolName}:${reason}:${stableStringify(event.args)}:${resultSummary}`;
|
|
4461
4478
|
const repeatCount = (this.repeatedToolFailures.get(key) ?? 0) + 1;
|
|
4462
4479
|
this.repeatedToolFailures.set(key, repeatCount);
|
|
4463
4480
|
if (repeatCount < 3 || this.isTriggered) {
|
|
4464
4481
|
return;
|
|
4465
4482
|
}
|
|
4466
4483
|
this.isTriggered = true;
|
|
4467
|
-
this.trigger(event.toolName, repeatCount,
|
|
4484
|
+
this.trigger(event.toolName, repeatCount, reason);
|
|
4468
4485
|
}
|
|
4469
4486
|
};
|
|
4470
4487
|
|
|
@@ -10763,7 +10780,8 @@ function summarizeToolResultDetails(result) {
|
|
|
10763
10780
|
"costEstimate",
|
|
10764
10781
|
"browserReadSummary",
|
|
10765
10782
|
"guardFindings",
|
|
10766
|
-
"timedOut"
|
|
10783
|
+
"timedOut",
|
|
10784
|
+
"outcome"
|
|
10767
10785
|
];
|
|
10768
10786
|
const summary = {};
|
|
10769
10787
|
for (const key of keys) {
|
|
@@ -11350,6 +11368,7 @@ var SessionTraceController = class {
|
|
|
11350
11368
|
target.status = isError ? "failed" : "completed";
|
|
11351
11369
|
target.endedAt = Date.now();
|
|
11352
11370
|
target.resultSummary = summarizeToolResult(result);
|
|
11371
|
+
target.outcome = isRecord3(result) && isRecord3(result.details) ? result.details.outcome : void 0;
|
|
11353
11372
|
if (!existing) {
|
|
11354
11373
|
this.trace.activeTurn.toolCalls.push(target);
|
|
11355
11374
|
}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
createSharedWebSearchTool,
|
|
9
9
|
interpretShellExit,
|
|
10
10
|
requestInteraction
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MGZHZSHB.js";
|
|
12
12
|
import {
|
|
13
13
|
Type
|
|
14
14
|
} from "./chunk-64XJIKVK.js";
|
|
@@ -462,6 +462,45 @@ function buildBashRecoveryHint(command, output) {
|
|
|
462
462
|
}
|
|
463
463
|
return void 0;
|
|
464
464
|
}
|
|
465
|
+
function classifyBashOutcome(params) {
|
|
466
|
+
if (params.timedOut) {
|
|
467
|
+
return {
|
|
468
|
+
kind: "timeout",
|
|
469
|
+
toolFailure: true,
|
|
470
|
+
summary: "command timed out"
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
if (params.exitCode === 0) {
|
|
474
|
+
return {
|
|
475
|
+
kind: "success",
|
|
476
|
+
toolFailure: false,
|
|
477
|
+
summary: "command succeeded"
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
if (params.exitCode !== null) {
|
|
481
|
+
if (!params.semanticIsError) {
|
|
482
|
+
return {
|
|
483
|
+
kind: "semantic_non_error",
|
|
484
|
+
toolFailure: false,
|
|
485
|
+
summary: params.semanticExitMeaning ?? `command exited with code ${params.exitCode}`
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
return {
|
|
489
|
+
kind: "command_nonzero",
|
|
490
|
+
toolFailure: false,
|
|
491
|
+
summary: params.semanticExitMeaning ?? `command exited with code ${params.exitCode}`
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
return {
|
|
495
|
+
kind: "signal",
|
|
496
|
+
toolFailure: true,
|
|
497
|
+
summary: params.signal ? `command terminated by signal ${params.signal}` : "command exited without a numeric status"
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
function formatCommandNonzeroHint(outcome) {
|
|
501
|
+
if (outcome.kind !== "command_nonzero") return void 0;
|
|
502
|
+
return `[Command outcome: ${outcome.summary}. The shell tool ran correctly; inspect this as command/test output, not as a tool malfunction.]`;
|
|
503
|
+
}
|
|
465
504
|
function killProcessTree(pid) {
|
|
466
505
|
if (process.platform === "win32") {
|
|
467
506
|
try {
|
|
@@ -726,9 +765,23 @@ ${fullOutput}`;
|
|
|
726
765
|
if (resolvedShell === "powershell" && code === 0 && /^\s*(?:diff|Compare-Object)\b/i.test(effectiveCommand) && /\bSideIndicator\b/.test(fullOutput)) {
|
|
727
766
|
details.semanticExitMeaning = "files differ";
|
|
728
767
|
}
|
|
768
|
+
const outcome = classifyBashOutcome({
|
|
769
|
+
exitCode: code,
|
|
770
|
+
signal: sig?.toString() ?? null,
|
|
771
|
+
timedOut,
|
|
772
|
+
semanticIsError: semantic.isError,
|
|
773
|
+
semanticExitMeaning: details.semanticExitMeaning
|
|
774
|
+
});
|
|
775
|
+
details.outcome = outcome;
|
|
729
776
|
if (semantic.isError && !timedOut && fullOutput.trim().length === 0) {
|
|
730
777
|
outputText += "\n\n[Empty failure hint: command exited non-zero without output. If this was a chained diagnostic, an earlier command may be missing; split the check or print explicit fallback output.]";
|
|
731
778
|
}
|
|
779
|
+
const commandNonzeroHint = formatCommandNonzeroHint(outcome);
|
|
780
|
+
if (commandNonzeroHint) {
|
|
781
|
+
outputText += `
|
|
782
|
+
|
|
783
|
+
${commandNonzeroHint}`;
|
|
784
|
+
}
|
|
732
785
|
if (truncation.truncated) {
|
|
733
786
|
details.truncation = {
|
|
734
787
|
truncated: true,
|
|
@@ -774,7 +827,7 @@ ${fullOutput}`;
|
|
|
774
827
|
}
|
|
775
828
|
const content = [{ type: "text", text: outputText }];
|
|
776
829
|
settled = true;
|
|
777
|
-
resolve3({ content, details, isError:
|
|
830
|
+
resolve3({ content, details, isError: outcome.toolFailure });
|
|
778
831
|
} catch (error) {
|
|
779
832
|
discardOutputArtifact(tempFilePath, tempFileStream);
|
|
780
833
|
settled = true;
|
package/dist/cli.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
getThemesDir,
|
|
20
20
|
migrateConfigFromAgentDir,
|
|
21
21
|
truncateHeadTail
|
|
22
|
-
} from "./chunks/chunk-
|
|
22
|
+
} from "./chunks/chunk-QXTAEPLR.js";
|
|
23
23
|
import {
|
|
24
24
|
AGENTS_CONTEXT_FILE_NAME,
|
|
25
25
|
AgentSessionController,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
setExtensionEnabledInSettings,
|
|
70
70
|
shouldPreserveExecutionStateForUserText,
|
|
71
71
|
supersedeExecutionState
|
|
72
|
-
} from "./chunks/chunk-
|
|
72
|
+
} from "./chunks/chunk-MGZHZSHB.js";
|
|
73
73
|
import "./chunks/chunk-4B42ZU4B.js";
|
|
74
74
|
import {
|
|
75
75
|
Deref,
|
|
@@ -50616,26 +50616,32 @@ var Editor = class {
|
|
|
50616
50616
|
return;
|
|
50617
50617
|
}
|
|
50618
50618
|
if (kb.matches(data, "selectConfirm")) {
|
|
50619
|
-
const
|
|
50620
|
-
|
|
50621
|
-
|
|
50622
|
-
this.
|
|
50623
|
-
|
|
50624
|
-
|
|
50625
|
-
|
|
50626
|
-
this.
|
|
50627
|
-
|
|
50628
|
-
this.
|
|
50629
|
-
|
|
50630
|
-
|
|
50631
|
-
|
|
50632
|
-
|
|
50633
|
-
|
|
50634
|
-
|
|
50635
|
-
|
|
50636
|
-
this.
|
|
50637
|
-
|
|
50638
|
-
|
|
50619
|
+
const currentLine = this.state.lines[this.state.cursorLine] || "";
|
|
50620
|
+
const isBareSlashSubmit = this.state.lines.length === 1 && currentLine === "/" && this.state.cursorCol === 1;
|
|
50621
|
+
if (isBareSlashSubmit) {
|
|
50622
|
+
this.cancelAutocomplete();
|
|
50623
|
+
} else {
|
|
50624
|
+
const selected = this.autocompleteList.getSelectedItem();
|
|
50625
|
+
if (selected && this.autocompleteProvider) {
|
|
50626
|
+
this.pushUndoSnapshot();
|
|
50627
|
+
this.lastAction = null;
|
|
50628
|
+
const result = this.autocompleteProvider.applyCompletion(
|
|
50629
|
+
this.state.lines,
|
|
50630
|
+
this.state.cursorLine,
|
|
50631
|
+
this.state.cursorCol,
|
|
50632
|
+
selected,
|
|
50633
|
+
this.autocompletePrefix
|
|
50634
|
+
);
|
|
50635
|
+
this.state.lines = result.lines;
|
|
50636
|
+
this.state.cursorLine = result.cursorLine;
|
|
50637
|
+
this.setCursorCol(result.cursorCol);
|
|
50638
|
+
if (this.autocompletePrefix.startsWith("/")) {
|
|
50639
|
+
this.cancelAutocomplete();
|
|
50640
|
+
} else {
|
|
50641
|
+
this.cancelAutocomplete();
|
|
50642
|
+
if (this.onChange) this.onChange(this.getText());
|
|
50643
|
+
return;
|
|
50644
|
+
}
|
|
50639
50645
|
}
|
|
50640
50646
|
}
|
|
50641
50647
|
}
|
|
@@ -63067,10 +63073,11 @@ var TITLE_SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\
|
|
|
63067
63073
|
var TITLE_SPINNER_INTERVAL_MS = 80;
|
|
63068
63074
|
var TITLE_WAITING_PREFIX = "\u23F8";
|
|
63069
63075
|
var titleSpinnerTimers = /* @__PURE__ */ new WeakMap();
|
|
63076
|
+
var explicitSubmitLockHosts = /* @__PURE__ */ new WeakSet();
|
|
63070
63077
|
var controllerBusyHosts = /* @__PURE__ */ new WeakSet();
|
|
63071
63078
|
var waitingForUserHosts = /* @__PURE__ */ new WeakSet();
|
|
63072
63079
|
function isHostBusy(host) {
|
|
63073
|
-
return host
|
|
63080
|
+
return explicitSubmitLockHosts.has(host) || controllerBusyHosts.has(host);
|
|
63074
63081
|
}
|
|
63075
63082
|
function isWaitingForUser(host) {
|
|
63076
63083
|
return waitingForUserHosts.has(host);
|
|
@@ -63127,10 +63134,17 @@ function syncTitleActivity(host) {
|
|
|
63127
63134
|
host.updateTerminalTitle();
|
|
63128
63135
|
}
|
|
63129
63136
|
function setSubmitLock(host, locked) {
|
|
63130
|
-
|
|
63137
|
+
const hadExplicitLock = explicitSubmitLockHosts.has(host);
|
|
63138
|
+
if (locked) {
|
|
63139
|
+
explicitSubmitLockHosts.add(host);
|
|
63140
|
+
} else {
|
|
63141
|
+
explicitSubmitLockHosts.delete(host);
|
|
63142
|
+
}
|
|
63143
|
+
const nextSubmitLock = explicitSubmitLockHosts.has(host) || controllerBusyHosts.has(host);
|
|
63144
|
+
if (hadExplicitLock === locked && host.submitLock === nextSubmitLock) {
|
|
63131
63145
|
return;
|
|
63132
63146
|
}
|
|
63133
|
-
host.submitLock =
|
|
63147
|
+
host.submitLock = nextSubmitLock;
|
|
63134
63148
|
syncTitleActivity(host);
|
|
63135
63149
|
}
|
|
63136
63150
|
function setControllerBusy(host, busy) {
|
|
@@ -63143,6 +63157,7 @@ function setControllerBusy(host, busy) {
|
|
|
63143
63157
|
} else {
|
|
63144
63158
|
controllerBusyHosts.delete(host);
|
|
63145
63159
|
}
|
|
63160
|
+
host.submitLock = explicitSubmitLockHosts.has(host) || controllerBusyHosts.has(host);
|
|
63146
63161
|
syncTitleActivity(host);
|
|
63147
63162
|
}
|
|
63148
63163
|
function setWaitingForUser(host, waiting) {
|
|
@@ -64672,6 +64687,16 @@ function handleToolStart(host, event) {
|
|
|
64672
64687
|
if (event.toolCallId) {
|
|
64673
64688
|
const toolComponent = host.pendingTools.get(event.toolCallId);
|
|
64674
64689
|
if (toolComponent) {
|
|
64690
|
+
toolComponent.updateArgs(event.args);
|
|
64691
|
+
} else {
|
|
64692
|
+
const newToolComponent = new ToolExecutionComponent(
|
|
64693
|
+
event.toolName,
|
|
64694
|
+
event.args,
|
|
64695
|
+
{ expanded: host.toolOutputExpanded },
|
|
64696
|
+
host.ui
|
|
64697
|
+
);
|
|
64698
|
+
host.pendingTools.set(event.toolCallId, newToolComponent);
|
|
64699
|
+
host.chatContainer.addChild(newToolComponent);
|
|
64675
64700
|
}
|
|
64676
64701
|
}
|
|
64677
64702
|
host.footer.setState({ lifecycleEvent: formatFooterLifecycleEvent(event) });
|
|
@@ -64750,6 +64775,12 @@ function handleMessageEnd(host, event) {
|
|
|
64750
64775
|
}
|
|
64751
64776
|
|
|
64752
64777
|
// src/input/interactive-input-pipeline.ts
|
|
64778
|
+
function shouldQueueUserInput(host) {
|
|
64779
|
+
return host.submitLock || (host.agentSessionController?.hasQueuedMessages ?? false);
|
|
64780
|
+
}
|
|
64781
|
+
function showBusyCommandStatus(host, command) {
|
|
64782
|
+
host.showStatus(`Wait for the current response to finish before running ${command}`);
|
|
64783
|
+
}
|
|
64753
64784
|
function setupInteractiveEditorSubmitHandler(host) {
|
|
64754
64785
|
host.editor.onSubmit = async (text) => {
|
|
64755
64786
|
text = text.trim();
|
|
@@ -64758,7 +64789,7 @@ function setupInteractiveEditorSubmitHandler(host) {
|
|
|
64758
64789
|
const skillText = text.slice("/skills/".length);
|
|
64759
64790
|
const expanded = host.expandSkillCommand(skillText);
|
|
64760
64791
|
if (expanded !== skillText) {
|
|
64761
|
-
if (host
|
|
64792
|
+
if (shouldQueueUserInput(host)) {
|
|
64762
64793
|
host.queueMessage(expanded, "followUp", { deliverWhileStreaming: false });
|
|
64763
64794
|
return;
|
|
64764
64795
|
}
|
|
@@ -64789,8 +64820,8 @@ function setupInteractiveEditorSubmitHandler(host) {
|
|
|
64789
64820
|
}
|
|
64790
64821
|
if (text.startsWith("/tools/subagent")) {
|
|
64791
64822
|
const args = text.slice("/tools/subagent".length).trim();
|
|
64792
|
-
if (host
|
|
64793
|
-
host
|
|
64823
|
+
if (shouldQueueUserInput(host)) {
|
|
64824
|
+
showBusyCommandStatus(host, "/tools/subagent");
|
|
64794
64825
|
return;
|
|
64795
64826
|
}
|
|
64796
64827
|
host.editor.setText("");
|
|
@@ -64804,12 +64835,12 @@ function setupInteractiveEditorSubmitHandler(host) {
|
|
|
64804
64835
|
const firstPartSegments = firstPart.slice(1).split("/").filter(Boolean);
|
|
64805
64836
|
const exactMatch = commandTree.find(firstPartSegments);
|
|
64806
64837
|
if (exactMatch?.handler) {
|
|
64807
|
-
if (host
|
|
64838
|
+
if (shouldQueueUserInput(host)) {
|
|
64808
64839
|
if (firstPart === "/sessions/compact") {
|
|
64809
64840
|
host.showStatus("Wait for the current response to finish before compacting");
|
|
64810
64841
|
return;
|
|
64811
64842
|
}
|
|
64812
|
-
host
|
|
64843
|
+
showBusyCommandStatus(host, firstPart);
|
|
64813
64844
|
return;
|
|
64814
64845
|
}
|
|
64815
64846
|
host.editor.setText("");
|
|
@@ -64860,12 +64891,12 @@ function setupInteractiveEditorSubmitHandler(host) {
|
|
|
64860
64891
|
}
|
|
64861
64892
|
}
|
|
64862
64893
|
if (node?.handler) {
|
|
64863
|
-
if (host
|
|
64894
|
+
if (shouldQueueUserInput(host)) {
|
|
64864
64895
|
if (commandSegments.join("/") === "sessions/compact") {
|
|
64865
64896
|
host.showStatus("Wait for the current response to finish before compacting");
|
|
64866
64897
|
return;
|
|
64867
64898
|
}
|
|
64868
|
-
host
|
|
64899
|
+
showBusyCommandStatus(host, "/" + commandSegments.join("/"));
|
|
64869
64900
|
return;
|
|
64870
64901
|
}
|
|
64871
64902
|
host.editor.setText("");
|
|
@@ -64905,8 +64936,8 @@ function setupInteractiveEditorSubmitHandler(host) {
|
|
|
64905
64936
|
for (const ext of host.extensions) {
|
|
64906
64937
|
for (const [name, command] of ext.commands) {
|
|
64907
64938
|
if (command.path?.join("/") === fullPath) {
|
|
64908
|
-
if (host
|
|
64909
|
-
host
|
|
64939
|
+
if (shouldQueueUserInput(host)) {
|
|
64940
|
+
showBusyCommandStatus(host, "/" + fullPath);
|
|
64910
64941
|
return;
|
|
64911
64942
|
}
|
|
64912
64943
|
host.editor.setText("");
|
|
@@ -64960,7 +64991,7 @@ function setupInteractiveEditorSubmitHandler(host) {
|
|
|
64960
64991
|
host.agentSessionController?.requestQueueDispatch();
|
|
64961
64992
|
return;
|
|
64962
64993
|
}
|
|
64963
|
-
if (host
|
|
64994
|
+
if (shouldQueueUserInput(host)) {
|
|
64964
64995
|
host.queueMessage(text, "followUp", { deliverWhileStreaming: false });
|
|
64965
64996
|
return;
|
|
64966
64997
|
}
|
|
@@ -66831,7 +66862,11 @@ function queueMessage(host, text, mode, options = {}) {
|
|
|
66831
66862
|
function handleFollowUp(host) {
|
|
66832
66863
|
const text = host.editor.getText().trim();
|
|
66833
66864
|
if (!text) return;
|
|
66834
|
-
if (
|
|
66865
|
+
if (isCommandLikeInput(text)) {
|
|
66866
|
+
host.editor.onSubmit?.(text);
|
|
66867
|
+
return;
|
|
66868
|
+
}
|
|
66869
|
+
if (host.submitLock || (host.agentSessionController?.hasQueuedMessages ?? false)) {
|
|
66835
66870
|
queueMessage(host, text, "followUp");
|
|
66836
66871
|
} else if (host.editor.onSubmit) {
|
|
66837
66872
|
void host.editor.onSubmit(text);
|
|
@@ -66841,6 +66876,9 @@ function truncate(text, maxLength) {
|
|
|
66841
66876
|
if (text.length <= maxLength) return text;
|
|
66842
66877
|
return text.slice(0, maxLength) + "...";
|
|
66843
66878
|
}
|
|
66879
|
+
function isCommandLikeInput(text) {
|
|
66880
|
+
return text.startsWith("/") || text.startsWith("!!");
|
|
66881
|
+
}
|
|
66844
66882
|
|
|
66845
66883
|
// src/components/footer.ts
|
|
66846
66884
|
var SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
|
|
@@ -67973,6 +68011,8 @@ function createInteractiveAgentSessionController(host) {
|
|
|
67973
68011
|
}
|
|
67974
68012
|
host.sessionTrace.completeTurn(event.message, false);
|
|
67975
68013
|
host._semanticTurnIndex++;
|
|
68014
|
+
} else if (event.type === "turn_settled") {
|
|
68015
|
+
host.setControllerBusy(false);
|
|
67976
68016
|
} else if (event.type === "turn_failed_terminal") {
|
|
67977
68017
|
host.clearContinuationTimeout("turn_failed_terminal");
|
|
67978
68018
|
if (event.message) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cydm/pie",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.33",
|
|
4
4
|
"description": "Pie AI Agent CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"posttest:offline": "node --test --import tsx test/remote-model-catalog.test.ts",
|
|
21
21
|
"test:offline": "node --test --import tsx test/core-services.test.ts test/cli.test.ts test/cli-auto-compaction.test.ts test/execution-state-manager.test.ts test/queued-steer-execution-state.test.ts test/architecture-boundaries.test.ts test/attachment-resolver.test.ts test/kimi-attachment-extension.test.ts test/document-attachment-extension.test.ts test/auto-compact-overflow.test.ts test/hierarchical-command-system.test.ts test/extensions-enablement.test.ts test/message-queue-unit.test.ts test/evals-harness.test.ts test/session-trace.test.ts test/runtime-mode-context.test.ts test/tool-policy.test.ts test/retry-policy.test.ts test/yolo-command.test.ts test/footer-lifecycle.test.ts test/files-utils.test.ts test/source-size-guard.test.ts test/runtime-logger.test.ts test/release-readiness.test.ts test/package-artifacts.test.ts test/code-intel-typescript-provider.test.ts test/init-extension-contract.test.ts test/skills-runtime.test.ts test/cross-host-parity.test.ts test/tool-name-rendering.test.ts test/session-selector.test.ts test/terminal-title.test.ts test/tools-registry.test.ts test/system-prompt-contract.test.ts test/direct-bash.test.ts test/daily-agent-smoke.terminal.test.ts",
|
|
22
22
|
"test:all": "npm run test:offline && npm run test:terminal:vitest",
|
|
23
|
-
"test:terminal:vitest": "vitest run test/mention-file-select.terminal.test.ts test/tool-partial-display.terminal.test.ts test/viewport-position-final.test.ts",
|
|
23
|
+
"test:terminal:vitest": "vitest run test/mention-file-select.terminal.test.ts test/tool-partial-display.terminal.test.ts test/viewport-position-final.test.ts --no-file-parallelism",
|
|
24
24
|
"test:todo-tui": "PIE_REAL_TODO_TUI=1 node --test --import tsx test/todo-closure.terminal.test.ts",
|
|
25
25
|
"test:daily-tui": "npm run test:daily-tui:quick",
|
|
26
26
|
"test:daily-tui:quick": "PIE_REAL_DAILY_TUI=1 PIE_DAILY_TUI_LEVEL=quick node --test --import tsx test/daily-agent-smoke.terminal.test.ts",
|