mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 10:39:32 +01:00
fix(story-mode): a stop says where it landed and what was saved before it
From review round 8: "STOPPED" with the balloon "Step 3: new tests under test/." read like progress, and nothing said what the stop left. The final panel now names the step Claude last announced and the commits made before the stop: "You stop Claude here, during its step 3. Saved before the stop: 2 commits." Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
88040c997d
commit
b19317175e
3 files changed
+11
-3
No files matched your search
+7
-1
@@ -2547,8 +2547,14 @@ function completePanel(turn: StoryTurn, page: Omit<StoryPage, 'panels'>, trailin
|
||||
const laterHelpers = later.filter((e) => e.helper).length;
|
||||
const laterCommands = later.length - laterHelpers;
|
||||
const done = turn.durationMs !== undefined ? `Done in ${roughDuration(turn.durationMs)}.` : 'Done.';
|
||||
// Where a stop landed: the step Claude last announced ("Step 3: …"), and what it had saved by then.
|
||||
const announced = [...page.events].reverse().find((e) => e.intent === 'say' && /^\W{0,4}step \d+\b/i.test(e.label));
|
||||
const step = announced ? /step (\d+)/i.exec(announced.label)?.[1] : undefined;
|
||||
const savedBefore = page.events.reduce((n, e) => n + (e.commits ?? 0), 0);
|
||||
const story = turn.interrupted
|
||||
? 'You stop Claude here.'
|
||||
? `You stop Claude here${step ? `, during its step ${step}` : ''}.${
|
||||
savedBefore ? ` Saved before the stop: ${plural(savedBefore, 'commit')}.` : ''
|
||||
}`
|
||||
: page.noneWorked
|
||||
? 'Nothing Claude tried worked, so the job is not done.'
|
||||
: turn.endedBy === 'next prompt'
|
||||
|
||||
Reference in new issue
Block a user