@wrongstack/tui 0.257.0 → 0.260.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/dist/index.js +81 -57
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -126,6 +126,14 @@ function modeIcon(label) {
|
|
|
126
126
|
const icon = MODE_ICONS[label] ?? "\u25AA";
|
|
127
127
|
return `${icon} ${label}`;
|
|
128
128
|
}
|
|
129
|
+
function formatSuggestionLabel(label, maxLen = 28) {
|
|
130
|
+
const stripped = label.replace(/^\/next\s+[\d\s]+\s*/, "").trim();
|
|
131
|
+
if (!stripped) return "";
|
|
132
|
+
if (stripped.length <= maxLen) return stripped;
|
|
133
|
+
const shortened = stripped.slice(0, maxLen);
|
|
134
|
+
const lastSpace = shortened.lastIndexOf(" ");
|
|
135
|
+
return lastSpace > 10 ? `${shortened.slice(0, lastSpace)}\u2026` : `${shortened}\u2026`;
|
|
136
|
+
}
|
|
129
137
|
var COMPACT_THRESHOLD = 50;
|
|
130
138
|
var COMFORTABLE_THRESHOLD = 90;
|
|
131
139
|
var SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
|
|
@@ -161,6 +169,7 @@ function StatusBar({
|
|
|
161
169
|
debugStreamStats,
|
|
162
170
|
enhanceCountdown,
|
|
163
171
|
nextStepsAutoSubmitCountdown,
|
|
172
|
+
nextStepsAutoSubmitLabel,
|
|
164
173
|
autoProceedCountdown,
|
|
165
174
|
sessionCount,
|
|
166
175
|
mailbox,
|
|
@@ -210,6 +219,7 @@ function StatusBar({
|
|
|
210
219
|
const hasDebugStream = !!debugStreamStats;
|
|
211
220
|
const hasEnhanceCountdown = enhanceCountdown != null && enhanceCountdown > 0;
|
|
212
221
|
const hasNextStepsAutoSubmit = nextStepsAutoSubmitCountdown != null && nextStepsAutoSubmitCountdown > 0;
|
|
222
|
+
const countdownColor = nextStepsAutoSubmitCountdown != null ? nextStepsAutoSubmitCountdown > 20 ? "green" : nextStepsAutoSubmitCountdown > 10 ? "yellow" : "red" : "green";
|
|
213
223
|
const hasTaskActivity = tasks && (tasks.pending > 0 || tasks.inProgress > 0 || tasks.completed > 0 || tasks.blocked > 0 || tasks.failed > 0);
|
|
214
224
|
const hasThirdLine = todos && (todos.pending > 0 || todos.inProgress > 0 || todos.completed > 0) || plan && (plan.open > 0 || plan.inProgress > 0 || plan.done > 0) || hasTaskActivity || fleetHasActivity || hasBrainActivity || hasDebugStream || hasEnhanceCountdown || hasNextStepsAutoSubmit;
|
|
215
225
|
return /* @__PURE__ */ jsxs(
|
|
@@ -569,7 +579,7 @@ function StatusBar({
|
|
|
569
579
|
] }) : null,
|
|
570
580
|
hasEnhanceCountdown && enhanceCountdown != null ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
571
581
|
todos && (todos.pending > 0 || todos.inProgress > 0 || todos.completed > 0) || plan && (plan.open > 0 || plan.inProgress > 0 || plan.done > 0) || fleetHasActivity || hasBrainActivity || hasDebugStream ? /* @__PURE__ */ jsx(Text, { dimColor: true, children: "\u2502" }) : null,
|
|
572
|
-
/* @__PURE__ */ jsxs(Text, { color: enhanceCountdown
|
|
582
|
+
/* @__PURE__ */ jsxs(Text, { color: enhanceCountdown > 15 ? "green" : enhanceCountdown > 5 ? "yellow" : "red", children: [
|
|
573
583
|
"\u23F3 auto-send in ",
|
|
574
584
|
enhanceCountdown,
|
|
575
585
|
"s"
|
|
@@ -577,10 +587,14 @@ function StatusBar({
|
|
|
577
587
|
] }) : null,
|
|
578
588
|
hasNextStepsAutoSubmit && nextStepsAutoSubmitCountdown != null ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
579
589
|
todos && (todos.pending > 0 || todos.inProgress > 0 || todos.completed > 0) || plan && (plan.open > 0 || plan.inProgress > 0 || plan.done > 0) || fleetHasActivity || hasBrainActivity || hasDebugStream || hasEnhanceCountdown ? /* @__PURE__ */ jsx(Text, { dimColor: true, children: "\u2502" }) : null,
|
|
580
|
-
/* @__PURE__ */ jsxs(Text, { color:
|
|
581
|
-
"\u23F3
|
|
590
|
+
/* @__PURE__ */ jsxs(Text, { color: countdownColor, bold: true, children: [
|
|
591
|
+
"\u23F3 ",
|
|
582
592
|
nextStepsAutoSubmitCountdown,
|
|
583
593
|
"s"
|
|
594
|
+
] }),
|
|
595
|
+
/* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
596
|
+
" ",
|
|
597
|
+
nextStepsAutoSubmitLabel ? formatSuggestionLabel(nextStepsAutoSubmitLabel) : ""
|
|
584
598
|
] })
|
|
585
599
|
] }) : null
|
|
586
600
|
] }) : /* @__PURE__ */ jsx(Box, { height: 1, children: /* @__PURE__ */ jsx(Text, { children: " " }) }),
|
|
@@ -2851,8 +2865,7 @@ function MarkdownView({
|
|
|
2851
2865
|
text,
|
|
2852
2866
|
termWidth,
|
|
2853
2867
|
contentWidth,
|
|
2854
|
-
tableWidth
|
|
2855
|
-
panelBackground
|
|
2868
|
+
tableWidth
|
|
2856
2869
|
}) {
|
|
2857
2870
|
const lines = text.split("\n");
|
|
2858
2871
|
const rows = [];
|
|
@@ -2863,23 +2876,9 @@ function MarkdownView({
|
|
|
2863
2876
|
const tableEnd = detectTable(lines, i);
|
|
2864
2877
|
if (tableEnd > i) {
|
|
2865
2878
|
const tableText = renderTable(lines.slice(i, tableEnd), tableBudget);
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
/* @__PURE__ */ jsx(Box, { width: tableBudget, children: tableLines.map((line2, li) => {
|
|
2870
|
-
const lineW = strWidth(line2);
|
|
2871
|
-
const padding = tableBudget - lineW;
|
|
2872
|
-
return /* @__PURE__ */ jsxs(Text, { children: [
|
|
2873
|
-
/* @__PURE__ */ jsx(Text, { children: line2 }),
|
|
2874
|
-
padding > 0 && /* @__PURE__ */ jsx(Text, { backgroundColor: panelBackground, children: " ".repeat(padding) })
|
|
2875
|
-
] }, li);
|
|
2876
|
-
}) }, `t${key++}`)
|
|
2877
|
-
);
|
|
2878
|
-
} else {
|
|
2879
|
-
rows.push(
|
|
2880
|
-
/* @__PURE__ */ jsx(Box, { width: tableBudget, backgroundColor: "transparent", children: /* @__PURE__ */ jsx(Text, { children: tableText }) }, `t${key++}`)
|
|
2881
|
-
);
|
|
2882
|
-
}
|
|
2879
|
+
rows.push(
|
|
2880
|
+
/* @__PURE__ */ jsx(Box, { width: tableBudget, backgroundColor: "transparent", children: /* @__PURE__ */ jsx(Text, { children: tableText }) }, `t${key++}`)
|
|
2881
|
+
);
|
|
2883
2882
|
i = tableEnd;
|
|
2884
2883
|
continue;
|
|
2885
2884
|
}
|
|
@@ -2943,7 +2942,7 @@ function MarkdownView({
|
|
|
2943
2942
|
}
|
|
2944
2943
|
rows.push(/* @__PURE__ */ jsx(InlineLine, { tokens: parseInline(line) }, `p${key++}`));
|
|
2945
2944
|
}
|
|
2946
|
-
return /* @__PURE__ */ jsx(Box, { flexDirection: "column", children: rows });
|
|
2945
|
+
return /* @__PURE__ */ jsx(Box, { flexDirection: "column", width: Math.max(20, tableBudget), children: rows });
|
|
2947
2946
|
}
|
|
2948
2947
|
function shortenPath(p, max) {
|
|
2949
2948
|
if (p.length <= max) return p;
|
|
@@ -3699,9 +3698,7 @@ function extractDiffPreview(toolName, output) {
|
|
|
3699
3698
|
if (!diff || !diff.trim() || diff.startsWith("(no-op")) return void 0;
|
|
3700
3699
|
return parseUnifiedDiff(diff, DIFF_MAX_LINES);
|
|
3701
3700
|
}
|
|
3702
|
-
var MESSAGE_PANEL_BORDER_WIDTH = 1;
|
|
3703
3701
|
var MESSAGE_PANEL_CHROME_WIDTH = 2;
|
|
3704
|
-
var ASSISTANT_BG = "#1e1e2e";
|
|
3705
3702
|
function assistantContentWidth(termWidth) {
|
|
3706
3703
|
return Math.max(20, termWidth - MESSAGE_PANEL_CHROME_WIDTH);
|
|
3707
3704
|
}
|
|
@@ -3741,8 +3738,7 @@ function splitFencedBlocks(text) {
|
|
|
3741
3738
|
function AssistantBody({
|
|
3742
3739
|
text,
|
|
3743
3740
|
termWidth,
|
|
3744
|
-
contentWidth
|
|
3745
|
-
panelBackground
|
|
3741
|
+
contentWidth
|
|
3746
3742
|
}) {
|
|
3747
3743
|
const segments = splitFencedBlocks(text);
|
|
3748
3744
|
const inner = contentWidth ?? termWidth;
|
|
@@ -3757,8 +3753,7 @@ function AssistantBody({
|
|
|
3757
3753
|
{
|
|
3758
3754
|
text: seg.text,
|
|
3759
3755
|
termWidth: inner,
|
|
3760
|
-
|
|
3761
|
-
tableWidth: termWidth - MESSAGE_PANEL_BORDER_WIDTH
|
|
3756
|
+
tableWidth: termWidth - MESSAGE_PANEL_CHROME_WIDTH
|
|
3762
3757
|
},
|
|
3763
3758
|
i
|
|
3764
3759
|
)
|
|
@@ -3927,6 +3922,9 @@ function parseWithHeading(content, strict) {
|
|
|
3927
3922
|
if (steps.length === 0) {
|
|
3928
3923
|
return { steps: [], texts: [], stripped: content, autoTexts: [] };
|
|
3929
3924
|
}
|
|
3925
|
+
if (strict && !afterHeading.includes("</next_steps>")) {
|
|
3926
|
+
return { steps: [], texts: [], stripped: content, autoTexts: [] };
|
|
3927
|
+
}
|
|
3930
3928
|
const texts = steps.map((s2) => s2.text);
|
|
3931
3929
|
const autoTexts = steps.filter((s2) => s2.auto).map((s2) => s2.text);
|
|
3932
3930
|
const blockStart = headingMatch.index;
|
|
@@ -3960,6 +3958,9 @@ function findBlockEnd(afterHeading, stepCount) {
|
|
|
3960
3958
|
}
|
|
3961
3959
|
return consumed;
|
|
3962
3960
|
}
|
|
3961
|
+
function stripNextStepsBlock(text) {
|
|
3962
|
+
return text.replace(/<next_steps\b[^>]*>[\s\S]*?<\/next_steps>/gi, "").replace(/<next_steps\b[^>]*\/?>/gi, "").replace(/\n{3,}/g, "\n\n").trim();
|
|
3963
|
+
}
|
|
3963
3964
|
function brainStatusStyle(status) {
|
|
3964
3965
|
switch (status) {
|
|
3965
3966
|
case "thinking":
|
|
@@ -3989,7 +3990,9 @@ function brainRiskColor(risk) {
|
|
|
3989
3990
|
var Entry = React5.memo(function Entry2({
|
|
3990
3991
|
entry,
|
|
3991
3992
|
termWidth,
|
|
3992
|
-
setSuggestions
|
|
3993
|
+
setSuggestions,
|
|
3994
|
+
autonomyMode,
|
|
3995
|
+
autoSubmitCountdown
|
|
3993
3996
|
}) {
|
|
3994
3997
|
const nextSteps = useMemo(() => {
|
|
3995
3998
|
if (entry.kind !== "assistant") return { steps: [], stripped: "" };
|
|
@@ -3997,6 +4000,7 @@ var Entry = React5.memo(function Entry2({
|
|
|
3997
4000
|
}, [entry.kind, entry.text]);
|
|
3998
4001
|
useEffect(() => {
|
|
3999
4002
|
if (!setSuggestions) return;
|
|
4003
|
+
if (entry.kind !== "assistant") return;
|
|
4000
4004
|
const text = entry.text ?? "";
|
|
4001
4005
|
const { texts } = parseNextSteps(text, true);
|
|
4002
4006
|
if (texts.length > 0) setSuggestions(texts);
|
|
@@ -4012,7 +4016,6 @@ var Entry = React5.memo(function Entry2({
|
|
|
4012
4016
|
borderRight: false,
|
|
4013
4017
|
borderBottom: false,
|
|
4014
4018
|
borderColor: theme.user,
|
|
4015
|
-
backgroundColor: "#1e1e2e",
|
|
4016
4019
|
paddingLeft: 1,
|
|
4017
4020
|
children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
4018
4021
|
/* @__PURE__ */ jsx(Text, { bold: true, color: theme.user, children: "USER " }),
|
|
@@ -4044,19 +4047,10 @@ var Entry = React5.memo(function Entry2({
|
|
|
4044
4047
|
borderRight: false,
|
|
4045
4048
|
borderBottom: false,
|
|
4046
4049
|
borderColor: theme.assistant,
|
|
4047
|
-
backgroundColor: "#1e1e2e",
|
|
4048
4050
|
paddingLeft: 1,
|
|
4049
4051
|
children: [
|
|
4050
4052
|
/* @__PURE__ */ jsx(Box, { flexDirection: "row", children: /* @__PURE__ */ jsx(Text, { bold: true, color: theme.assistant, children: "ASSISTANT" }) }),
|
|
4051
|
-
/* @__PURE__ */ jsx(
|
|
4052
|
-
AssistantBody,
|
|
4053
|
-
{
|
|
4054
|
-
text: stripped,
|
|
4055
|
-
termWidth,
|
|
4056
|
-
contentWidth,
|
|
4057
|
-
panelBackground: ASSISTANT_BG
|
|
4058
|
-
}
|
|
4059
|
-
)
|
|
4053
|
+
/* @__PURE__ */ jsx(AssistantBody, { text: stripped, termWidth, contentWidth })
|
|
4060
4054
|
]
|
|
4061
4055
|
}
|
|
4062
4056
|
),
|
|
@@ -4077,9 +4071,11 @@ var Entry = React5.memo(function Entry2({
|
|
|
4077
4071
|
/* @__PURE__ */ jsx(Text, { bold: true, color: theme.accent, children: "\u{1F4A1} NEXT STEPS " }),
|
|
4078
4072
|
/* @__PURE__ */ jsx(Text, { dimColor: true, children: "(use /next 1, /next 1 2 3 to select)" })
|
|
4079
4073
|
] }),
|
|
4080
|
-
steps.map((s2) => /* @__PURE__ */ jsx(Box, { flexDirection: "row", marginTop: 0, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
4074
|
+
steps.map((s2, i) => /* @__PURE__ */ jsx(Box, { flexDirection: "row", marginTop: 0, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
4081
4075
|
/* @__PURE__ */ jsx(Text, { bold: true, color: theme.accent, children: ` ${s2.index}. ` }),
|
|
4082
|
-
/* @__PURE__ */ jsx(Text, { children: s2.text })
|
|
4076
|
+
/* @__PURE__ */ jsx(Text, { children: s2.text }),
|
|
4077
|
+
s2.auto ? /* @__PURE__ */ jsx(Text, { color: "cyan", dimColor: true, children: " auto" }) : null,
|
|
4078
|
+
autonomyMode === "auto" && i === 0 ? autoSubmitCountdown != null && autoSubmitCountdown > 0 ? /* @__PURE__ */ jsx(Text, { color: autoSubmitCountdown > 20 ? "green" : autoSubmitCountdown > 10 ? "yellow" : "red", children: ` auto in ${autoSubmitCountdown}s` }) : /* @__PURE__ */ jsx(Text, { color: "cyan", children: " \u23E9" }) : null
|
|
4083
4079
|
] }) }, s2.index))
|
|
4084
4080
|
]
|
|
4085
4081
|
}
|
|
@@ -4251,7 +4247,7 @@ var Entry = React5.memo(function Entry2({
|
|
|
4251
4247
|
}
|
|
4252
4248
|
}
|
|
4253
4249
|
});
|
|
4254
|
-
function History({ entries, generation, streamingText, toolStream, setSuggestions }) {
|
|
4250
|
+
function History({ entries, generation, streamingText, toolStream, setSuggestions, autonomyMode, autoSubmitCountdown }) {
|
|
4255
4251
|
const { stdout } = useStdout();
|
|
4256
4252
|
const [termSize, setTermSize] = useState({
|
|
4257
4253
|
columns: stdout?.columns ?? 80,
|
|
@@ -4269,7 +4265,7 @@ function History({ entries, generation, streamingText, toolStream, setSuggestion
|
|
|
4269
4265
|
const termWidth = termSize.columns;
|
|
4270
4266
|
const tail = streamingText ? tailForDisplay(streamingText, MAX_STREAM_DISPLAY_CHARS) : "";
|
|
4271
4267
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4272
|
-
/* @__PURE__ */ jsx(Static, { items: entries, children: (entry) => /* @__PURE__ */ jsx(Box, { marginBottom: entry.kind === "turn-summary" ? 1 : 0, children: /* @__PURE__ */ jsx(Entry, { entry, termWidth, setSuggestions }) }, entry.id) }, generation ?? 0),
|
|
4268
|
+
/* @__PURE__ */ jsx(Static, { items: entries, children: (entry) => /* @__PURE__ */ jsx(Box, { marginBottom: entry.kind === "turn-summary" ? 1 : 0, children: /* @__PURE__ */ jsx(Entry, { entry, termWidth, setSuggestions, autonomyMode, autoSubmitCountdown }) }, entry.id) }, generation ?? 0),
|
|
4273
4269
|
/* @__PURE__ */ jsx(Box, { flexGrow: 1, children: tail ? /* @__PURE__ */ jsx(AssistantTail, { text: tail, termWidth }) : null })
|
|
4274
4270
|
] });
|
|
4275
4271
|
}
|
|
@@ -4319,7 +4315,9 @@ function ScrollableHistory({
|
|
|
4319
4315
|
totalLines,
|
|
4320
4316
|
onMeasure,
|
|
4321
4317
|
maxWidth,
|
|
4322
|
-
setSuggestions
|
|
4318
|
+
setSuggestions,
|
|
4319
|
+
autonomyMode,
|
|
4320
|
+
autoSubmitCountdown
|
|
4323
4321
|
}) {
|
|
4324
4322
|
const { stdout } = useStdout();
|
|
4325
4323
|
const rawWidth = stdout?.columns ?? 80;
|
|
@@ -4358,7 +4356,7 @@ function ScrollableHistory({
|
|
|
4358
4356
|
flexShrink: 0,
|
|
4359
4357
|
children: [
|
|
4360
4358
|
hiddenCount > 0 ? /* @__PURE__ */ jsx(Box, { flexShrink: 0, children: /* @__PURE__ */ jsx(Text, { dimColor: true, italic: true, children: ` \u2191 ${hiddenCount} earlier ${hiddenCount === 1 ? "entry" : "entries"} (scroll lives in this session; full log on disk)` }) }) : null,
|
|
4361
|
-
shown.map((entry) => /* @__PURE__ */ jsx(Box, { marginBottom: entry.kind === "turn-summary" ? 1 : 0, flexShrink: 0, children: /* @__PURE__ */ jsx(Entry, { entry, termWidth, setSuggestions }) }, entry.id)),
|
|
4359
|
+
shown.map((entry) => /* @__PURE__ */ jsx(Box, { marginBottom: entry.kind === "turn-summary" ? 1 : 0, flexShrink: 0, children: /* @__PURE__ */ jsx(Entry, { entry, termWidth, setSuggestions, autonomyMode, autoSubmitCountdown }) }, entry.id)),
|
|
4362
4360
|
tail ? /* @__PURE__ */ jsx(AssistantTail, { text: tail, termWidth }) : null,
|
|
4363
4361
|
toolTail && toolStream ? /* @__PURE__ */ jsx(
|
|
4364
4362
|
ToolStreamBox,
|
|
@@ -6477,10 +6475,10 @@ function useDirectorFleetBridge({
|
|
|
6477
6475
|
let streamFlushTimer = null;
|
|
6478
6476
|
const flushStreamBufs = () => {
|
|
6479
6477
|
for (const [id, text] of streamBuf) {
|
|
6480
|
-
const
|
|
6481
|
-
if (!
|
|
6478
|
+
const cleaned = stripNextStepsBlock(text);
|
|
6479
|
+
if (!cleaned) continue;
|
|
6482
6480
|
const label = labelFor(labelsRef, id);
|
|
6483
|
-
enq({ type: "fleetMessage", id, text:
|
|
6481
|
+
enq({ type: "fleetMessage", id, text: cleaned });
|
|
6484
6482
|
if (streamFleetRef.current) {
|
|
6485
6483
|
enq({
|
|
6486
6484
|
type: "addEntry",
|
|
@@ -6489,7 +6487,7 @@ function useDirectorFleetBridge({
|
|
|
6489
6487
|
agentLabel: label.label,
|
|
6490
6488
|
agentColor: label.color,
|
|
6491
6489
|
icon: "\u{1F4AC}",
|
|
6492
|
-
text:
|
|
6490
|
+
text: cleaned
|
|
6493
6491
|
}
|
|
6494
6492
|
});
|
|
6495
6493
|
}
|
|
@@ -10109,23 +10107,31 @@ function App({
|
|
|
10109
10107
|
nextStepsAutoSubmitSuggestionRef.current = promptToSubmit;
|
|
10110
10108
|
const start = Date.now();
|
|
10111
10109
|
setNextStepsAutoSubmitCountdown(Math.ceil(delay / 1e3));
|
|
10110
|
+
setNextStepsAutoSubmitLabel(promptToSubmit);
|
|
10112
10111
|
nextStepsAutoSubmitTimerRef.current = setInterval(() => {
|
|
10113
10112
|
const remaining = Math.max(0, Math.ceil((delay - (Date.now() - start)) / 1e3));
|
|
10114
10113
|
if (remaining <= 0) {
|
|
10115
10114
|
clearInterval(nextStepsAutoSubmitTimerRef.current);
|
|
10116
10115
|
nextStepsAutoSubmitTimerRef.current = void 0;
|
|
10117
10116
|
setNextStepsAutoSubmitCountdown(null);
|
|
10117
|
+
setNextStepsAutoSubmitLabel(null);
|
|
10118
10118
|
const suggestion = nextStepsAutoSubmitSuggestionRef.current;
|
|
10119
10119
|
nextStepsAutoSubmitSuggestionRef.current = null;
|
|
10120
10120
|
if (suggestion) {
|
|
10121
10121
|
autoSubmitStreakRef.current += 1;
|
|
10122
|
-
setDraft(suggestion, suggestion.length);
|
|
10123
10122
|
void (async () => {
|
|
10124
10123
|
const trimmed = suggestion.trim();
|
|
10125
|
-
if (!trimmed)
|
|
10124
|
+
if (!trimmed) {
|
|
10125
|
+
clearDraft();
|
|
10126
|
+
return;
|
|
10127
|
+
}
|
|
10126
10128
|
const blocks = [{ type: "text", text: trimmed }];
|
|
10127
10129
|
dispatch({ type: "addEntry", entry: { kind: "user", text: trimmed } });
|
|
10128
|
-
|
|
10130
|
+
try {
|
|
10131
|
+
await runBlocksRef.current(blocks);
|
|
10132
|
+
} finally {
|
|
10133
|
+
clearDraft();
|
|
10134
|
+
}
|
|
10129
10135
|
})();
|
|
10130
10136
|
}
|
|
10131
10137
|
} else {
|
|
@@ -10135,6 +10141,8 @@ function App({
|
|
|
10135
10141
|
return () => {
|
|
10136
10142
|
clearInterval(nextStepsAutoSubmitTimerRef.current);
|
|
10137
10143
|
nextStepsAutoSubmitTimerRef.current = void 0;
|
|
10144
|
+
setNextStepsAutoSubmitCountdown(null);
|
|
10145
|
+
setNextStepsAutoSubmitLabel(null);
|
|
10138
10146
|
};
|
|
10139
10147
|
}, [state.status, autonomyLive, state.enhance, state.enhanceBusy, nextStepsRecheck, getSettings, getSuggestions, dispatch]);
|
|
10140
10148
|
const settingsAutoSaveGateRef = useRef(true);
|
|
@@ -10500,6 +10508,7 @@ function App({
|
|
|
10500
10508
|
const enhanceAbortRef = useRef(null);
|
|
10501
10509
|
const [enhanceCountdown, setEnhanceCountdown] = useState(null);
|
|
10502
10510
|
const [nextStepsAutoSubmitCountdown, setNextStepsAutoSubmitCountdown] = useState(null);
|
|
10511
|
+
const [nextStepsAutoSubmitLabel, setNextStepsAutoSubmitLabel] = useState(null);
|
|
10503
10512
|
const nextStepsAutoSubmitSuggestionRef = useRef(null);
|
|
10504
10513
|
const nextStepsAutoSubmitTimerRef = useRef(void 0);
|
|
10505
10514
|
useTuiEventBridge({
|
|
@@ -11479,6 +11488,7 @@ function App({
|
|
|
11479
11488
|
clearInterval(nextStepsAutoSubmitTimerRef.current);
|
|
11480
11489
|
nextStepsAutoSubmitTimerRef.current = void 0;
|
|
11481
11490
|
setNextStepsAutoSubmitCountdown(null);
|
|
11491
|
+
setNextStepsAutoSubmitLabel(null);
|
|
11482
11492
|
nextStepsAutoSubmitSuggestionRef.current = null;
|
|
11483
11493
|
}
|
|
11484
11494
|
setDraft(next2, cursor - 1);
|
|
@@ -11507,6 +11517,7 @@ function App({
|
|
|
11507
11517
|
clearInterval(nextStepsAutoSubmitTimerRef.current);
|
|
11508
11518
|
nextStepsAutoSubmitTimerRef.current = void 0;
|
|
11509
11519
|
setNextStepsAutoSubmitCountdown(null);
|
|
11520
|
+
setNextStepsAutoSubmitLabel(null);
|
|
11510
11521
|
nextStepsAutoSubmitSuggestionRef.current = null;
|
|
11511
11522
|
}
|
|
11512
11523
|
setDraft(next2, cursor);
|
|
@@ -11640,6 +11651,7 @@ function App({
|
|
|
11640
11651
|
clearInterval(nextStepsAutoSubmitTimerRef.current);
|
|
11641
11652
|
nextStepsAutoSubmitTimerRef.current = void 0;
|
|
11642
11653
|
setNextStepsAutoSubmitCountdown(null);
|
|
11654
|
+
setNextStepsAutoSubmitLabel(null);
|
|
11643
11655
|
nextStepsAutoSubmitSuggestionRef.current = null;
|
|
11644
11656
|
}
|
|
11645
11657
|
setDraft("", 0);
|
|
@@ -11653,6 +11665,7 @@ function App({
|
|
|
11653
11665
|
clearInterval(nextStepsAutoSubmitTimerRef.current);
|
|
11654
11666
|
nextStepsAutoSubmitTimerRef.current = void 0;
|
|
11655
11667
|
setNextStepsAutoSubmitCountdown(null);
|
|
11668
|
+
setNextStepsAutoSubmitLabel(null);
|
|
11656
11669
|
nextStepsAutoSubmitSuggestionRef.current = null;
|
|
11657
11670
|
}
|
|
11658
11671
|
setDraft(next2, cursor);
|
|
@@ -11665,6 +11678,7 @@ function App({
|
|
|
11665
11678
|
clearInterval(nextStepsAutoSubmitTimerRef.current);
|
|
11666
11679
|
nextStepsAutoSubmitTimerRef.current = void 0;
|
|
11667
11680
|
setNextStepsAutoSubmitCountdown(null);
|
|
11681
|
+
setNextStepsAutoSubmitLabel(null);
|
|
11668
11682
|
nextStepsAutoSubmitSuggestionRef.current = null;
|
|
11669
11683
|
}
|
|
11670
11684
|
setDraft(next2, cursor);
|
|
@@ -11688,6 +11702,7 @@ function App({
|
|
|
11688
11702
|
clearInterval(nextStepsAutoSubmitTimerRef.current);
|
|
11689
11703
|
nextStepsAutoSubmitTimerRef.current = void 0;
|
|
11690
11704
|
setNextStepsAutoSubmitCountdown(null);
|
|
11705
|
+
setNextStepsAutoSubmitLabel(null);
|
|
11691
11706
|
nextStepsAutoSubmitSuggestionRef.current = null;
|
|
11692
11707
|
}
|
|
11693
11708
|
const next = buffer.slice(0, cursor) + input + buffer.slice(cursor);
|
|
@@ -12017,7 +12032,11 @@ ${content}
|
|
|
12017
12032
|
while (stateRef.current.status !== "idle" && Date.now() - start < 1500) {
|
|
12018
12033
|
await new Promise((r) => setTimeout(r, 25));
|
|
12019
12034
|
}
|
|
12020
|
-
|
|
12035
|
+
try {
|
|
12036
|
+
await runBlocks(blocks2);
|
|
12037
|
+
} finally {
|
|
12038
|
+
clearDraft();
|
|
12039
|
+
}
|
|
12021
12040
|
}
|
|
12022
12041
|
}
|
|
12023
12042
|
const cmd = trimmed.slice(1).split(/\s+/, 1)[0];
|
|
@@ -12213,7 +12232,9 @@ User message:
|
|
|
12213
12232
|
viewportRows: state.viewportRows,
|
|
12214
12233
|
totalLines: state.totalLines,
|
|
12215
12234
|
onMeasure: (totalLines) => dispatch({ type: "setMeasuredLines", totalLines }),
|
|
12216
|
-
setSuggestions
|
|
12235
|
+
setSuggestions,
|
|
12236
|
+
autonomyMode: autonomyLive,
|
|
12237
|
+
autoSubmitCountdown: nextStepsAutoSubmitCountdown
|
|
12217
12238
|
}
|
|
12218
12239
|
) : /* @__PURE__ */ jsx(
|
|
12219
12240
|
History,
|
|
@@ -12222,7 +12243,9 @@ User message:
|
|
|
12222
12243
|
generation: state.historyGen,
|
|
12223
12244
|
streamingText: state.streamingText,
|
|
12224
12245
|
toolStream: state.toolStream,
|
|
12225
|
-
setSuggestions
|
|
12246
|
+
setSuggestions,
|
|
12247
|
+
autonomyMode: autonomyLive,
|
|
12248
|
+
autoSubmitCountdown: nextStepsAutoSubmitCountdown
|
|
12226
12249
|
}
|
|
12227
12250
|
),
|
|
12228
12251
|
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", flexShrink: 0, ref: bottomRegionRef, children: [
|
|
@@ -12482,6 +12505,7 @@ User message:
|
|
|
12482
12505
|
debugStreamStats: state.debugStreamStats,
|
|
12483
12506
|
enhanceCountdown,
|
|
12484
12507
|
nextStepsAutoSubmitCountdown,
|
|
12508
|
+
nextStepsAutoSubmitLabel,
|
|
12485
12509
|
autoProceedCountdown: state.countdown?.remainingSeconds ?? null,
|
|
12486
12510
|
sessionCount,
|
|
12487
12511
|
mailbox: mailboxStatus,
|