@prestyj/cli 4.3.239 → 4.5.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/README.md +4 -2
- package/dist/cli/auth.d.ts.map +1 -1
- package/dist/cli/auth.js +17 -2
- package/dist/cli/auth.js.map +1 -1
- package/dist/cli/shared.d.ts.map +1 -1
- package/dist/cli/shared.js +27 -5
- package/dist/cli/shared.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +14 -5
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +5 -2
- package/dist/config.js.map +1 -1
- package/dist/config.test.js +10 -0
- package/dist/config.test.js.map +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +34 -15
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +18 -0
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +62 -8
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/auto-update.js +2 -2
- package/dist/core/auto-update.js.map +1 -1
- package/dist/core/compaction/compactor.d.ts.map +1 -1
- package/dist/core/compaction/compactor.js +4 -0
- package/dist/core/compaction/compactor.js.map +1 -1
- package/dist/core/goal-worker.js +1 -1
- package/dist/core/goal-worker.js.map +1 -1
- package/dist/core/goal-worker.test.js +1 -1
- package/dist/core/goal-worker.test.js.map +1 -1
- package/dist/core/mcp/defaults.d.ts.map +1 -1
- package/dist/core/mcp/defaults.js +39 -3
- package/dist/core/mcp/defaults.js.map +1 -1
- package/dist/core/model-registry.d.ts +21 -0
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +47 -16
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-registry.test.js +13 -0
- package/dist/core/model-registry.test.js.map +1 -1
- package/dist/core/oauth/gemini.d.ts.map +1 -1
- package/dist/core/oauth/gemini.js +14 -5
- package/dist/core/oauth/gemini.js.map +1 -1
- package/dist/core/oauth/kimi.d.ts +46 -0
- package/dist/core/oauth/kimi.d.ts.map +1 -0
- package/dist/core/oauth/kimi.js +278 -0
- package/dist/core/oauth/kimi.js.map +1 -0
- package/dist/core/prompt-commands.d.ts.map +1 -1
- package/dist/core/prompt-commands.js +3 -1
- package/dist/core/prompt-commands.js.map +1 -1
- package/dist/core/settings-manager.d.ts +1 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +2 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/interactive.d.ts.map +1 -1
- package/dist/interactive.js +22 -2
- package/dist/interactive.js.map +1 -1
- package/dist/system-prompt.d.ts.map +1 -1
- package/dist/system-prompt.js +54 -23
- package/dist/system-prompt.js.map +1 -1
- package/dist/system-prompt.test.js +32 -1
- package/dist/system-prompt.test.js.map +1 -1
- package/dist/tools/enter-plan.d.ts +1 -1
- package/dist/tools/enter-plan.d.ts.map +1 -1
- package/dist/tools/enter-plan.js +8 -1
- package/dist/tools/enter-plan.js.map +1 -1
- package/dist/tools/goals.d.ts +1 -1
- package/dist/tools/index.d.ts +16 -2
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +9 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/prompt-hints.d.ts +23 -4
- package/dist/tools/prompt-hints.d.ts.map +1 -1
- package/dist/tools/prompt-hints.js +35 -10
- package/dist/tools/prompt-hints.js.map +1 -1
- package/dist/tools/read.d.ts +6 -1
- package/dist/tools/read.d.ts.map +1 -1
- package/dist/tools/read.js +70 -4
- package/dist/tools/read.js.map +1 -1
- package/dist/ui/App.d.ts +7 -1
- package/dist/ui/App.d.ts.map +1 -1
- package/dist/ui/App.js +304 -28
- package/dist/ui/App.js.map +1 -1
- package/dist/ui/app-items.d.ts +4 -2
- package/dist/ui/app-items.d.ts.map +1 -1
- package/dist/ui/app-items.js +13 -4
- package/dist/ui/app-items.js.map +1 -1
- package/dist/ui/chat-layout-pinning.test.js +1 -1
- package/dist/ui/chat-layout-pinning.test.js.map +1 -1
- package/dist/ui/components/ActivityIndicator.d.ts +7 -0
- package/dist/ui/components/ActivityIndicator.d.ts.map +1 -1
- package/dist/ui/components/ActivityIndicator.js +38 -12
- package/dist/ui/components/ActivityIndicator.js.map +1 -1
- package/dist/ui/components/AssistantMessage.test.js +1 -1
- package/dist/ui/components/AssistantMessage.test.js.map +1 -1
- package/dist/ui/components/ChatInputStack.d.ts +2 -0
- package/dist/ui/components/ChatInputStack.d.ts.map +1 -1
- package/dist/ui/components/ChatInputStack.js.map +1 -1
- package/dist/ui/components/ChatScreen.d.ts +1 -0
- package/dist/ui/components/ChatScreen.d.ts.map +1 -1
- package/dist/ui/components/ChatScreen.js +1 -1
- package/dist/ui/components/ChatScreen.js.map +1 -1
- package/dist/ui/components/ChatStatusRow.d.ts +2 -0
- package/dist/ui/components/ChatStatusRow.d.ts.map +1 -1
- package/dist/ui/components/ChatStatusRow.js +40 -1
- package/dist/ui/components/ChatStatusRow.js.map +1 -1
- package/dist/ui/components/InputArea.d.ts +2 -1
- package/dist/ui/components/InputArea.d.ts.map +1 -1
- package/dist/ui/components/InputArea.js +24 -8
- package/dist/ui/components/InputArea.js.map +1 -1
- package/dist/ui/components/MessageResponse.d.ts +7 -1
- package/dist/ui/components/MessageResponse.d.ts.map +1 -1
- package/dist/ui/components/MessageResponse.js +2 -2
- package/dist/ui/components/MessageResponse.js.map +1 -1
- package/dist/ui/components/ToolExecution.d.ts.map +1 -1
- package/dist/ui/components/ToolExecution.js +72 -15
- package/dist/ui/components/ToolExecution.js.map +1 -1
- package/dist/ui/components/UserMessage.d.ts +2 -1
- package/dist/ui/components/UserMessage.d.ts.map +1 -1
- package/dist/ui/components/UserMessage.js +6 -2
- package/dist/ui/components/UserMessage.js.map +1 -1
- package/dist/ui/hooks/useAgentLoop.d.ts +16 -4
- package/dist/ui/hooks/useAgentLoop.d.ts.map +1 -1
- package/dist/ui/hooks/useAgentLoop.js +46 -2
- package/dist/ui/hooks/useAgentLoop.js.map +1 -1
- package/dist/ui/layout-decisions.d.ts +4 -0
- package/dist/ui/layout-decisions.d.ts.map +1 -1
- package/dist/ui/layout-decisions.js.map +1 -1
- package/dist/ui/login.js +2 -2
- package/dist/ui/login.js.map +1 -1
- package/dist/ui/prompt-routing.d.ts +2 -2
- package/dist/ui/prompt-routing.d.ts.map +1 -1
- package/dist/ui/prompt-routing.js +50 -1
- package/dist/ui/prompt-routing.js.map +1 -1
- package/dist/ui/queued-message.test.js +5 -1
- package/dist/ui/queued-message.test.js.map +1 -1
- package/dist/ui/render.d.ts +10 -1
- package/dist/ui/render.d.ts.map +1 -1
- package/dist/ui/render.js +35 -0
- package/dist/ui/render.js.map +1 -1
- package/dist/ui/slash-command-images.test.js +55 -3
- package/dist/ui/slash-command-images.test.js.map +1 -1
- package/dist/ui/submit-prompt-command.d.ts.map +1 -1
- package/dist/ui/submit-prompt-command.js +6 -3
- package/dist/ui/submit-prompt-command.js.map +1 -1
- package/dist/ui/terminal-history-status-renderers.d.ts +1 -1
- package/dist/ui/terminal-history-status-renderers.d.ts.map +1 -1
- package/dist/ui/terminal-history-status-renderers.js +1 -0
- package/dist/ui/terminal-history-status-renderers.js.map +1 -1
- package/dist/ui/terminal-history.js +36 -10
- package/dist/ui/terminal-history.js.map +1 -1
- package/dist/ui/terminal-history.test.js +3 -3
- package/dist/ui/terminal-history.test.js.map +1 -1
- package/dist/ui/transcript/TranscriptRenderer.d.ts.map +1 -1
- package/dist/ui/transcript/TranscriptRenderer.js +12 -10
- package/dist/ui/transcript/TranscriptRenderer.js.map +1 -1
- package/dist/ui/transcript/presentation.d.ts.map +1 -1
- package/dist/ui/transcript/presentation.js +17 -2
- package/dist/ui/transcript/presentation.js.map +1 -1
- package/dist/ui/tui-history-parity.test.js +7 -3
- package/dist/ui/tui-history-parity.test.js.map +1 -1
- package/dist/ui/utils/assistant-stream-split.d.ts +10 -0
- package/dist/ui/utils/assistant-stream-split.d.ts.map +1 -1
- package/dist/ui/utils/assistant-stream-split.js +19 -0
- package/dist/ui/utils/assistant-stream-split.js.map +1 -1
- package/dist/ui/utils/assistant-stream-split.test.js +21 -1
- package/dist/ui/utils/assistant-stream-split.test.js.map +1 -1
- package/dist/utils/image.d.ts +37 -1
- package/dist/utils/image.d.ts.map +1 -1
- package/dist/utils/image.js +156 -1
- package/dist/utils/image.js.map +1 -1
- package/dist/utils/plan-steps.d.ts +29 -2
- package/dist/utils/plan-steps.d.ts.map +1 -1
- package/dist/utils/plan-steps.js +88 -16
- package/dist/utils/plan-steps.js.map +1 -1
- package/dist/utils/plan-steps.test.js +144 -1
- package/dist/utils/plan-steps.test.js.map +1 -1
- package/package.json +4 -3
package/dist/utils/plan-steps.js
CHANGED
|
@@ -8,8 +8,17 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Extract numbered steps from a plan markdown string.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* Steps are ONLY read from a dedicated step-section heading (`## Steps` or a
|
|
12
|
+
* close synonym — see STEP_SECTION_HEADING). If the plan has no such section,
|
|
13
|
+
* this returns an empty array — progress tracking is opt-in.
|
|
14
|
+
*
|
|
15
|
+
* The previous behaviour scanned the entire document for any top-level
|
|
16
|
+
* numbered list when no step section was present, which scraped phantom
|
|
17
|
+
* "steps" out of unrelated prose (design decisions, Q&A bullets, rejected
|
|
18
|
+
* alternatives). The post-approval prompt then pushed the model to march
|
|
19
|
+
* through those non-tasks and emit `[DONE:n]` markers for them, deadlocking
|
|
20
|
+
* a model that correctly refused to fabricate completion. Requiring an
|
|
21
|
+
* explicit step-section heading keeps the progress contract honest.
|
|
13
22
|
*
|
|
14
23
|
* Looks for lines like:
|
|
15
24
|
* 1. Do something
|
|
@@ -17,9 +26,12 @@
|
|
|
17
26
|
* 3. **Bold step**
|
|
18
27
|
*/
|
|
19
28
|
export function extractPlanSteps(planContent) {
|
|
20
|
-
//
|
|
21
|
-
|
|
22
|
-
|
|
29
|
+
// Steps are read ONLY from a recognised step-section heading (see
|
|
30
|
+
// STEP_SECTION_HEADING). No such section means no tracked steps — never fall
|
|
31
|
+
// back to scanning the whole document.
|
|
32
|
+
const source = extractStepsSection(planContent);
|
|
33
|
+
if (source === undefined)
|
|
34
|
+
return [];
|
|
23
35
|
const steps = [];
|
|
24
36
|
// Only match non-indented numbered items (0-2 spaces max) to skip sub-items
|
|
25
37
|
const pattern = /^(\d+)[.)]\s+\*{0,2}([^*\n]+)/gm;
|
|
@@ -41,31 +53,89 @@ export function extractPlanSteps(planContent) {
|
|
|
41
53
|
return steps;
|
|
42
54
|
}
|
|
43
55
|
/**
|
|
44
|
-
*
|
|
45
|
-
* heading
|
|
56
|
+
* Headings that mark a dedicated, ordered implementation-step section. The
|
|
57
|
+
* canonical heading the plan-mode prompt asks for is `## Steps`, but models
|
|
58
|
+
* routinely emit close synonyms (`## Implementation Steps`, `## Steps to
|
|
59
|
+
* implement`, `## Tasks`, …). Recognising those keeps progress tracking working
|
|
60
|
+
* without falling back to scanning arbitrary prose for numbered lists, which
|
|
61
|
+
* scraped phantom steps out of design notes and Q&A bullets.
|
|
62
|
+
*
|
|
63
|
+
* Deliberately excludes broad container headings like `## Plan`: those often
|
|
64
|
+
* hold sub-sections (design, risks, steps) and matching them would re-scrape
|
|
65
|
+
* non-task numbered lists — the exact bug the `## Steps`-only rule fixed. The
|
|
66
|
+
* heading must also be the keyword phrase ON ITS OWN, so an essay heading like
|
|
67
|
+
* `## Step-by-step rationale for the design` won't match.
|
|
68
|
+
*/
|
|
69
|
+
const STEP_SECTION_HEADING = /^#{2,3}\s+(?:implementation\s+steps|steps(?:\s+to\s+implement)?|tasks|to-?dos?|todo)\s*:?\s*$/im;
|
|
70
|
+
/**
|
|
71
|
+
* Extract the content under a recognised step-section heading, stopping at the
|
|
72
|
+
* next heading of equal or higher level (or end of document).
|
|
46
73
|
*/
|
|
47
74
|
function extractStepsSection(planContent) {
|
|
48
|
-
const match = planContent.match(
|
|
75
|
+
const match = planContent.match(STEP_SECTION_HEADING);
|
|
49
76
|
if (!match || match.index === undefined)
|
|
50
77
|
return undefined;
|
|
51
78
|
const start = match.index + match[0].length;
|
|
52
|
-
// Find next heading of level 1-
|
|
79
|
+
// Find next heading of level 1-3 (or end of string)
|
|
53
80
|
const rest = planContent.slice(start);
|
|
54
|
-
const nextHeading = rest.match(/^#{1,
|
|
81
|
+
const nextHeading = rest.match(/^#{1,3}\s/m);
|
|
55
82
|
const sectionContent = nextHeading?.index !== undefined ? rest.slice(0, nextHeading.index) : rest;
|
|
56
83
|
return sectionContent;
|
|
57
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Re-base a frozen step list onto a freshly extracted one.
|
|
87
|
+
*
|
|
88
|
+
* The progress widget captures `extractPlanSteps` once, at plan-approval time.
|
|
89
|
+
* But the agent can rewrite or expand the approved plan while implementing it
|
|
90
|
+
* (e.g. a 2-step plan becomes 12 steps). When that happens the frozen snapshot
|
|
91
|
+
* goes stale: the total is wrong and `[DONE:n]` markers for the new steps can't
|
|
92
|
+
* be matched. Re-extracting from the live plan and re-basing onto it keeps the
|
|
93
|
+
* total in sync.
|
|
94
|
+
*
|
|
95
|
+
* Completion is carried over BY STEP NUMBER (not text), so a reworded step that
|
|
96
|
+
* was already done stays done. New steps adopt the fresh text and start
|
|
97
|
+
* incomplete. If the fresh plan has no steps (e.g. the step section was
|
|
98
|
+
* temporarily removed mid-edit) the previous list is returned unchanged so we
|
|
99
|
+
* never blow away real progress. The previous array reference is returned when
|
|
100
|
+
* nothing meaningfully changed, so React state setters can no-op.
|
|
101
|
+
*/
|
|
102
|
+
export function rebasePlanSteps(previous, fresh) {
|
|
103
|
+
if (fresh.length === 0)
|
|
104
|
+
return previous;
|
|
105
|
+
const completedByStep = new Set(previous.filter((s) => s.completed).map((s) => s.step));
|
|
106
|
+
const rebased = fresh.map((s) => completedByStep.has(s.step) && !s.completed ? { ...s, completed: true } : s);
|
|
107
|
+
const unchanged = rebased.length === previous.length &&
|
|
108
|
+
rebased.every((s, i) => {
|
|
109
|
+
const prev = previous[i];
|
|
110
|
+
return (prev !== undefined &&
|
|
111
|
+
prev.step === s.step &&
|
|
112
|
+
prev.text === s.text &&
|
|
113
|
+
prev.completed === s.completed);
|
|
114
|
+
});
|
|
115
|
+
return unchanged ? previous : rebased;
|
|
116
|
+
}
|
|
58
117
|
/**
|
|
59
118
|
* Strip [DONE:n] markers from text for display purposes.
|
|
60
119
|
* These markers are machine-readable signals for the progress widget,
|
|
61
120
|
* not meant to be shown to the user.
|
|
62
121
|
*/
|
|
63
122
|
export function stripDoneMarkers(text) {
|
|
64
|
-
return text
|
|
65
|
-
.
|
|
123
|
+
return (text
|
|
124
|
+
// Also consume a single backtick directly wrapping the marker. Models
|
|
125
|
+
// sometimes emit `[DONE:n]` as inline code; stripping just the bracketed
|
|
126
|
+
// marker would leave an orphan backtick that renders as a stray ` bullet.
|
|
127
|
+
.replace(/`?\s*\[DONE:\d+\]\s*`?/gi, " ")
|
|
66
128
|
.replace(/ +/g, " ")
|
|
67
129
|
.replace(/^ /, "")
|
|
68
|
-
.replace(/ $/, "");
|
|
130
|
+
.replace(/ $/, ""));
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Whether a split text fragment has any renderable content. Fragments left
|
|
134
|
+
* behind after splitting a backtick-wrapped [DONE:n] marker can be just a stray
|
|
135
|
+
* backtick or punctuation, which should not become their own assistant bullet.
|
|
136
|
+
*/
|
|
137
|
+
function hasRenderableText(text) {
|
|
138
|
+
return /[\p{L}\p{N}]/u.test(text);
|
|
69
139
|
}
|
|
70
140
|
/**
|
|
71
141
|
* Split text on [DONE:N] markers, returning an array of segments. Empty/
|
|
@@ -76,12 +146,14 @@ export function stripDoneMarkers(text) {
|
|
|
76
146
|
*/
|
|
77
147
|
export function segmentDisplayText(text, steps) {
|
|
78
148
|
const segments = [];
|
|
79
|
-
|
|
149
|
+
// Consume a single backtick directly wrapping the marker so an orphan
|
|
150
|
+
// backtick from `[DONE:n]` doesn't survive as its own text fragment.
|
|
151
|
+
const pattern = /`?\[DONE:(\d+)\]`?/gi;
|
|
80
152
|
let lastIdx = 0;
|
|
81
153
|
for (const match of text.matchAll(pattern)) {
|
|
82
154
|
const matchIdx = match.index ?? 0;
|
|
83
155
|
const before = text.slice(lastIdx, matchIdx);
|
|
84
|
-
if (before
|
|
156
|
+
if (hasRenderableText(before)) {
|
|
85
157
|
segments.push({ kind: "text", text: before });
|
|
86
158
|
}
|
|
87
159
|
const stepNum = parseInt(match[1], 10);
|
|
@@ -94,7 +166,7 @@ export function segmentDisplayText(text, steps) {
|
|
|
94
166
|
lastIdx = matchIdx + match[0].length;
|
|
95
167
|
}
|
|
96
168
|
const after = text.slice(lastIdx);
|
|
97
|
-
if (after
|
|
169
|
+
if (hasRenderableText(after)) {
|
|
98
170
|
segments.push({ kind: "text", text: after });
|
|
99
171
|
}
|
|
100
172
|
return segments;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-steps.js","sourceRoot":"","sources":["../../src/utils/plan-steps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH
|
|
1
|
+
{"version":3,"file":"plan-steps.js","sourceRoot":"","sources":["../../src/utils/plan-steps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,gBAAgB,CAAC,WAAmB;IAClD,kEAAkE;IAClE,6EAA6E;IAC7E,uCAAuC;IACvC,MAAM,MAAM,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAChD,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IAEpC,MAAM,KAAK,GAAe,EAAE,CAAC;IAC7B,4EAA4E;IAC5E,MAAM,OAAO,GAAG,iCAAiC,CAAC;IAElD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7C,IAAI,IAAI,GAA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AC;QACD,OAAO,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;AAClC,CAAC"}
|
|
@@ -1,6 +1,139 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { segmentDisplayText, stripDoneMarkers } from "./plan-steps.js";
|
|
2
|
+
import { extractPlanSteps, rebasePlanSteps, segmentDisplayText, stripDoneMarkers, } from "./plan-steps.js";
|
|
3
3
|
const steps = [{ step: 6, text: "Ship the final response", completed: false }];
|
|
4
|
+
describe("extractPlanSteps", () => {
|
|
5
|
+
it("returns no steps when the plan has no `## Steps` section", () => {
|
|
6
|
+
// Numbered prose that is NOT a task list — design decisions, Q&A bullets,
|
|
7
|
+
// rejected alternatives. None of these should be scraped as steps.
|
|
8
|
+
const plan = [
|
|
9
|
+
"# Reels Pipeline",
|
|
10
|
+
"",
|
|
11
|
+
"## Design Decisions",
|
|
12
|
+
"1. All TypeScript / Node (no Python sidecar in v1).",
|
|
13
|
+
"2. Ports & adapters (hexagonal).",
|
|
14
|
+
"",
|
|
15
|
+
"## Open Questions",
|
|
16
|
+
"1. Source format(s):",
|
|
17
|
+
"2. Caption styles:",
|
|
18
|
+
].join("\n");
|
|
19
|
+
expect(extractPlanSteps(plan)).toEqual([]);
|
|
20
|
+
});
|
|
21
|
+
it("extracts only the numbered items under a `## Steps` section", () => {
|
|
22
|
+
const plan = [
|
|
23
|
+
"# Plan",
|
|
24
|
+
"",
|
|
25
|
+
"## Design Decisions",
|
|
26
|
+
"1. Use hexagonal architecture.",
|
|
27
|
+
"",
|
|
28
|
+
"## Steps",
|
|
29
|
+
"1. Add the FFmpeg renderer adapter.",
|
|
30
|
+
"2. Wire the renderer into the CLI.",
|
|
31
|
+
"3. **Add an integration test** for the render path.",
|
|
32
|
+
"",
|
|
33
|
+
"## Risks",
|
|
34
|
+
"1. ONNX model download may be large.",
|
|
35
|
+
].join("\n");
|
|
36
|
+
expect(extractPlanSteps(plan)).toEqual([
|
|
37
|
+
{ step: 1, text: "Add the FFmpeg renderer adapter.", completed: false },
|
|
38
|
+
{ step: 2, text: "Wire the renderer into the CLI.", completed: false },
|
|
39
|
+
{ step: 3, text: "Add an integration test", completed: false },
|
|
40
|
+
]);
|
|
41
|
+
});
|
|
42
|
+
it("recognises common step-section heading synonyms", () => {
|
|
43
|
+
for (const heading of [
|
|
44
|
+
"## Implementation Steps",
|
|
45
|
+
"### Steps",
|
|
46
|
+
"## Steps to implement",
|
|
47
|
+
"## Tasks",
|
|
48
|
+
]) {
|
|
49
|
+
const plan = [heading, "1. First real step here.", "2. Second real step here."].join("\n");
|
|
50
|
+
expect(extractPlanSteps(plan)).toEqual([
|
|
51
|
+
{ step: 1, text: "First real step here.", completed: false },
|
|
52
|
+
{ step: 2, text: "Second real step here.", completed: false },
|
|
53
|
+
]);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
it("does not treat broad container or essay headings as a step section", () => {
|
|
57
|
+
for (const heading of [
|
|
58
|
+
// `## Plan` is a container heading that often holds non-task numbered
|
|
59
|
+
// lists (design decisions, risks) — must NOT be scraped as steps.
|
|
60
|
+
"## Plan",
|
|
61
|
+
"## Step-by-step rationale for the design",
|
|
62
|
+
]) {
|
|
63
|
+
const plan = [heading, "1. We chose X because Y."].join("\n");
|
|
64
|
+
expect(extractPlanSteps(plan)).toEqual([]);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
it("renumbers steps sequentially and skips sub-items / snippets", () => {
|
|
68
|
+
const plan = [
|
|
69
|
+
"## Steps",
|
|
70
|
+
"1. First real step here.",
|
|
71
|
+
" 1. nested detail that should be ignored",
|
|
72
|
+
"2. `code-only line`",
|
|
73
|
+
"3. Second real step here.",
|
|
74
|
+
].join("\n");
|
|
75
|
+
expect(extractPlanSteps(plan)).toEqual([
|
|
76
|
+
{ step: 1, text: "First real step here.", completed: false },
|
|
77
|
+
{ step: 2, text: "Second real step here.", completed: false },
|
|
78
|
+
]);
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
describe("rebasePlanSteps", () => {
|
|
82
|
+
// The agent can rewrite/expand the approved plan mid-implementation. The
|
|
83
|
+
// progress widget must track the CURRENT plan, not the snapshot captured at
|
|
84
|
+
// approval time, while preserving steps already marked done.
|
|
85
|
+
it("adopts the new step list when the plan grows", () => {
|
|
86
|
+
const frozen = [
|
|
87
|
+
{ step: 1, text: "Scaffold the helper module.", completed: true },
|
|
88
|
+
{ step: 2, text: "Wire it into the UI.", completed: false },
|
|
89
|
+
];
|
|
90
|
+
const expanded = [
|
|
91
|
+
{ step: 1, text: "Scaffold the helper module.", completed: false },
|
|
92
|
+
{ step: 2, text: "Wire it into the UI.", completed: false },
|
|
93
|
+
{ step: 3, text: "Add the header chips.", completed: false },
|
|
94
|
+
{ step: 4, text: "Add the vital-signs line.", completed: false },
|
|
95
|
+
];
|
|
96
|
+
const rebased = rebasePlanSteps(frozen, expanded);
|
|
97
|
+
expect(rebased).toHaveLength(4);
|
|
98
|
+
// Step 1 was already done — completion is preserved across the rebase.
|
|
99
|
+
expect(rebased[0]?.completed).toBe(true);
|
|
100
|
+
expect(rebased.filter((s) => s.completed)).toHaveLength(1);
|
|
101
|
+
// New steps adopt the fresh text and start incomplete.
|
|
102
|
+
expect(rebased[2]).toEqual({ step: 3, text: "Add the header chips.", completed: false });
|
|
103
|
+
});
|
|
104
|
+
it("preserves completion by step number, not text", () => {
|
|
105
|
+
const frozen = [
|
|
106
|
+
{ step: 1, text: "Old wording for step one.", completed: true },
|
|
107
|
+
{ step: 2, text: "Old wording for step two.", completed: true },
|
|
108
|
+
];
|
|
109
|
+
const rewritten = [
|
|
110
|
+
{ step: 1, text: "Reworded step one.", completed: false },
|
|
111
|
+
{ step: 2, text: "Reworded step two.", completed: false },
|
|
112
|
+
{ step: 3, text: "A brand new step three.", completed: false },
|
|
113
|
+
];
|
|
114
|
+
const rebased = rebasePlanSteps(frozen, rewritten);
|
|
115
|
+
expect(rebased[0]).toEqual({ step: 1, text: "Reworded step one.", completed: true });
|
|
116
|
+
expect(rebased[1]).toEqual({ step: 2, text: "Reworded step two.", completed: true });
|
|
117
|
+
expect(rebased[2]?.completed).toBe(false);
|
|
118
|
+
});
|
|
119
|
+
it("returns the previous array unchanged when the fresh plan has no steps", () => {
|
|
120
|
+
const frozen = [{ step: 1, text: "Only step.", completed: true }];
|
|
121
|
+
expect(rebasePlanSteps(frozen, [])).toBe(frozen);
|
|
122
|
+
});
|
|
123
|
+
it("returns the previous array reference when nothing changed", () => {
|
|
124
|
+
const frozen = [
|
|
125
|
+
{ step: 1, text: "Step one.", completed: true },
|
|
126
|
+
{ step: 2, text: "Step two.", completed: false },
|
|
127
|
+
];
|
|
128
|
+
const same = [
|
|
129
|
+
{ step: 1, text: "Step one.", completed: false },
|
|
130
|
+
{ step: 2, text: "Step two.", completed: false },
|
|
131
|
+
];
|
|
132
|
+
// Same length, same text, same derived completion → identity preserved so
|
|
133
|
+
// React state setters can no-op.
|
|
134
|
+
expect(rebasePlanSteps(frozen, same)).toBe(frozen);
|
|
135
|
+
});
|
|
136
|
+
});
|
|
4
137
|
describe("plan step display markers", () => {
|
|
5
138
|
it("strips DONE markers even when adjacent to assistant text", () => {
|
|
6
139
|
expect(stripDoneMarkers("[DONE:6]All set.")).toBe("All set.");
|
|
@@ -12,5 +145,15 @@ describe("plan step display markers", () => {
|
|
|
12
145
|
{ kind: "text", text: "All set." },
|
|
13
146
|
]);
|
|
14
147
|
});
|
|
148
|
+
it("consumes backticks the model wrapped around a DONE marker", () => {
|
|
149
|
+
expect(stripDoneMarkers("`[DONE:6]`")).toBe("");
|
|
150
|
+
expect(stripDoneMarkers("Done `[DONE:6]` next")).toBe("Done next");
|
|
151
|
+
});
|
|
152
|
+
it("drops orphan-backtick fragments left by a wrapped DONE marker", () => {
|
|
153
|
+
expect(segmentDisplayText("`[DONE:6]`\n\nStep 7 next", steps)).toEqual([
|
|
154
|
+
{ kind: "done", stepNum: 6, description: "Ship the final response" },
|
|
155
|
+
{ kind: "text", text: "\n\nStep 7 next" },
|
|
156
|
+
]);
|
|
157
|
+
});
|
|
15
158
|
});
|
|
16
159
|
//# sourceMappingURL=plan-steps.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-steps.test.js","sourceRoot":"","sources":["../../src/utils/plan-steps.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"plan-steps.test.js","sourceRoot":"","sources":["../../src/utils/plan-steps.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,GAEjB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,KAAK,GAAe,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,yBAAyB,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;AAE3F,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;QAClE,0EAA0E;QAC1E,mEAAmE;QACnE,MAAM,IAAI,GAAG;YACX,kBAAkB;YAClB,EAAE;YACF,qBAAqB;YACrB,qDAAqD;YACrD,kCAAkC;YAClC,EAAE;YACF,mBAAmB;YACnB,sBAAsB;YACtB,oBAAoB;SACrB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACb,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6DAA6D,EAAE,GAAG,EAAE;QAC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GAAG,EAAE;QACvE,MAAM,CAAC,kBAAkB,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC;YACrE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,yBAAyB,EAAE;YACpE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE;SAC1C,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prestyj/cli",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI coding agent with OAuth authentication for Anthropic, OpenAI, and Gemini",
|
|
6
6
|
"license": "MIT",
|
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"@jridgewell/trace-mapping": "^0.3.25",
|
|
94
94
|
"@kenkaiiii/agent-home-sdk": "^0.3.8",
|
|
95
|
+
"@kenkaiiii/kencode-search": "^0.1.17",
|
|
95
96
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
96
97
|
"ansi-regex": "^6.2.2",
|
|
97
98
|
"chalk": "^5.6.2",
|
|
@@ -110,9 +111,9 @@
|
|
|
110
111
|
"strip-ansi": "^7.2.0",
|
|
111
112
|
"wrap-ansi": "^10.0.0",
|
|
112
113
|
"zod": "^4.4.3",
|
|
113
|
-
"@prestyj/agent": "4.
|
|
114
|
+
"@prestyj/agent": "4.5.0",
|
|
114
115
|
"@prestyj/pixel": "4.3.101",
|
|
115
|
-
"@prestyj/ai": "4.
|
|
116
|
+
"@prestyj/ai": "4.5.0"
|
|
116
117
|
},
|
|
117
118
|
"optionalDependencies": {
|
|
118
119
|
"@huggingface/transformers": "^3.6.0",
|