@wrongstack/tui 0.302.0 → 0.302.2
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.
|
@@ -31,6 +31,7 @@ export interface AutoProceedCandidate {
|
|
|
31
31
|
source: 'todo' | 'suggestion' | 'auto-suggestion';
|
|
32
32
|
prompt: string;
|
|
33
33
|
label: string;
|
|
34
|
+
todoId?: string | undefined;
|
|
34
35
|
}
|
|
35
36
|
/** Resolve one grounded automatic turn without mutating either suggestion store. */
|
|
36
37
|
export declare function selectAutoProceedCandidate({ todos, suggestions, autoSuggestions, yolo, autonomyNextPrompt, }: AutoProceedCandidateInput): AutoProceedCandidate | null;
|
package/dist/index.js
CHANGED
|
@@ -34405,7 +34405,7 @@ function selectAutoProceedCandidate({
|
|
|
34405
34405
|
}) {
|
|
34406
34406
|
const todo = resolveContinuation({ todos, suggestions: [] });
|
|
34407
34407
|
if (todo.source === "todo") {
|
|
34408
|
-
return { source: "todo", prompt: todo.text, label: todo.label };
|
|
34408
|
+
return { source: "todo", prompt: todo.text, label: todo.label, todoId: todo.todoId };
|
|
34409
34409
|
}
|
|
34410
34410
|
const automatic = yolo ? autoSuggestions.find((item) => item.trim().length > 0)?.trim() : void 0;
|
|
34411
34411
|
if (automatic) {
|
|
@@ -34436,6 +34436,7 @@ function useNextStepsAutoSubmit({
|
|
|
34436
34436
|
const [nextStepsAutoSubmitLabel, setNextStepsAutoSubmitLabel] = useState32(null);
|
|
34437
34437
|
const nextStepsAutoSubmitSuggestionRef = useRef28(null);
|
|
34438
34438
|
const nextStepsAutoSubmitSourceRef = useRef28(null);
|
|
34439
|
+
const nextStepsAutoSubmitTodoIdRef = useRef28(null);
|
|
34439
34440
|
const nextStepsAutoSubmitTodosRef = useRef28([]);
|
|
34440
34441
|
const nextStepsAutoSubmitTimerRef = useRef28(void 0);
|
|
34441
34442
|
const autoSubmitStreakRef = useRef28(0);
|
|
@@ -34458,6 +34459,7 @@ function useNextStepsAutoSubmit({
|
|
|
34458
34459
|
setNextStepsAutoSubmitLabel(null);
|
|
34459
34460
|
nextStepsAutoSubmitSuggestionRef.current = null;
|
|
34460
34461
|
nextStepsAutoSubmitSourceRef.current = null;
|
|
34462
|
+
nextStepsAutoSubmitTodoIdRef.current = null;
|
|
34461
34463
|
return;
|
|
34462
34464
|
}
|
|
34463
34465
|
if (state.enhance != null || state.enhanceBusy || state.topicCheckBusy || state.refineCountdown != null || state.refineFailure != null || state.continueConfirm != null || state.clearConfirm != null || state.slashConfirm != null || state.escConfirm != null || state.sendModePicker != null || state.confirmQueue.length > 0 || state.shellCommandWarning != null || state.brainPrompt != null) {
|
|
@@ -34501,6 +34503,7 @@ function useNextStepsAutoSubmit({
|
|
|
34501
34503
|
const delay = cfg?.delayMs ?? 45e3;
|
|
34502
34504
|
nextStepsAutoSubmitSuggestionRef.current = candidate.prompt;
|
|
34503
34505
|
nextStepsAutoSubmitSourceRef.current = candidate.source;
|
|
34506
|
+
nextStepsAutoSubmitTodoIdRef.current = candidate.todoId ?? null;
|
|
34504
34507
|
const start = Date.now();
|
|
34505
34508
|
setNextStepsAutoSubmitCountdown(Math.ceil(delay / 1e3));
|
|
34506
34509
|
setNextStepsAutoSubmitLabel(candidate.label);
|
|
@@ -34514,13 +34517,29 @@ function useNextStepsAutoSubmit({
|
|
|
34514
34517
|
if ((getAutonomy?.() ?? autonomyLive) !== "auto") {
|
|
34515
34518
|
nextStepsAutoSubmitSuggestionRef.current = null;
|
|
34516
34519
|
nextStepsAutoSubmitSourceRef.current = null;
|
|
34520
|
+
nextStepsAutoSubmitTodoIdRef.current = null;
|
|
34517
34521
|
return;
|
|
34518
34522
|
}
|
|
34519
34523
|
const suggestion = nextStepsAutoSubmitSuggestionRef.current;
|
|
34520
34524
|
const source = nextStepsAutoSubmitSourceRef.current;
|
|
34525
|
+
const todoId = nextStepsAutoSubmitTodoIdRef.current;
|
|
34521
34526
|
nextStepsAutoSubmitSuggestionRef.current = null;
|
|
34522
34527
|
nextStepsAutoSubmitSourceRef.current = null;
|
|
34528
|
+
nextStepsAutoSubmitTodoIdRef.current = null;
|
|
34523
34529
|
if (suggestion) {
|
|
34530
|
+
if (source === "todo" && todoId) {
|
|
34531
|
+
if (agent?.ctx?.state) {
|
|
34532
|
+
const liveTodos = agent.ctx.todos;
|
|
34533
|
+
const selected = liveTodos.find((todo) => todo.id === todoId);
|
|
34534
|
+
if (selected?.status === "pending") {
|
|
34535
|
+
agent.ctx.state.replaceTodos(
|
|
34536
|
+
liveTodos.map(
|
|
34537
|
+
(todo) => todo.id === todoId ? { ...todo, status: "in_progress" } : todo.status === "in_progress" ? { ...todo, status: "pending" } : todo
|
|
34538
|
+
)
|
|
34539
|
+
);
|
|
34540
|
+
}
|
|
34541
|
+
}
|
|
34542
|
+
}
|
|
34524
34543
|
const repetition = source === "todo" ? autoSubmitLoopGuardRef.current.recordGrounded(suggestion) : autoSubmitLoopGuardRef.current.record(suggestion);
|
|
34525
34544
|
if (repetition.shouldHalt) {
|
|
34526
34545
|
let stalledMatchFailed = false;
|
|
@@ -34540,11 +34559,10 @@ function useNextStepsAutoSubmit({
|
|
|
34540
34559
|
(t) => t.id !== stalled.id && !continuationAttemptTrackerRef.current.isSkipped(t.id)
|
|
34541
34560
|
);
|
|
34542
34561
|
if (nextTodo) {
|
|
34543
|
-
const
|
|
34544
|
-
|
|
34545
|
-
|
|
34546
|
-
|
|
34547
|
-
const freshTodos = [...todos2];
|
|
34562
|
+
const freshTodos = todos2.map(
|
|
34563
|
+
(todo) => todo.id === stalled.id ? { ...todo, status: "pending" } : todo.id === nextTodo.id ? { ...todo, status: "in_progress" } : todo.status === "in_progress" ? { ...todo, status: "pending" } : todo
|
|
34564
|
+
);
|
|
34565
|
+
agent?.ctx?.state?.replaceTodos(freshTodos);
|
|
34548
34566
|
nextStepsAutoSubmitTodosRef.current = freshTodos;
|
|
34549
34567
|
const advancementPrompt = generateAdvancementPrompt(
|
|
34550
34568
|
{ id: stalled.id, content: stalled.content },
|
|
@@ -34653,6 +34671,7 @@ ${GROUNDED_NO_PROGRESS_STEER}` : suggestion;
|
|
|
34653
34671
|
setNextStepsAutoSubmitLabel(null);
|
|
34654
34672
|
nextStepsAutoSubmitSuggestionRef.current = null;
|
|
34655
34673
|
nextStepsAutoSubmitSourceRef.current = null;
|
|
34674
|
+
nextStepsAutoSubmitTodoIdRef.current = null;
|
|
34656
34675
|
}, []);
|
|
34657
34676
|
return {
|
|
34658
34677
|
nextStepsAutoSubmitCountdown,
|
|
@@ -39168,6 +39187,16 @@ function createSubmitController(host) {
|
|
|
39168
39187
|
todos: agent.ctx.todos,
|
|
39169
39188
|
suggestions: getSuggestions?.() ?? []
|
|
39170
39189
|
}) : null;
|
|
39190
|
+
if (continueResolved?.source === "todo" && continueResolved.todoId) {
|
|
39191
|
+
const selected = agent.ctx.todos.find((todo) => todo.id === continueResolved.todoId);
|
|
39192
|
+
if (selected?.status === "pending") {
|
|
39193
|
+
agent.ctx.state.replaceTodos(
|
|
39194
|
+
agent.ctx.todos.map(
|
|
39195
|
+
(todo) => todo.id === continueResolved.todoId ? { ...todo, status: "in_progress" } : todo.status === "in_progress" ? { ...todo, status: "pending" } : todo
|
|
39196
|
+
)
|
|
39197
|
+
);
|
|
39198
|
+
}
|
|
39199
|
+
}
|
|
39171
39200
|
const sddContext = await getSDDContext?.();
|
|
39172
39201
|
if (!steering && stateRef.current.status === "idle" && continueResolved === null && !sddContext) {
|
|
39173
39202
|
const liveState = stateRef.current;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/tui",
|
|
3
|
-
"version": "0.302.
|
|
3
|
+
"version": "0.302.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "WrongStack terminal UI: Ink-based interactive renderer with history, pickers, and slash menus.",
|
|
6
6
|
"repository": {
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"ink": "7.1.1",
|
|
30
30
|
"react": "^19.2.8",
|
|
31
31
|
"string-width": "8.2.2",
|
|
32
|
-
"@wrongstack/core": "0.302.
|
|
33
|
-
"@wrongstack/
|
|
34
|
-
"@wrongstack/
|
|
35
|
-
"@wrongstack/kanban": "0.302.
|
|
36
|
-
"@wrongstack/
|
|
37
|
-
"@wrongstack/
|
|
32
|
+
"@wrongstack/core": "0.302.2",
|
|
33
|
+
"@wrongstack/sage": "0.302.2",
|
|
34
|
+
"@wrongstack/sdd": "0.302.2",
|
|
35
|
+
"@wrongstack/kanban": "0.302.2",
|
|
36
|
+
"@wrongstack/tools": "0.302.2",
|
|
37
|
+
"@wrongstack/runtime": "0.302.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@testing-library/dom": "^10.4.1",
|