mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 10:39:32 +01:00
fix(story-mode): a second opinion in front of helpers neither splits them nor counts as one
Since second opinions ride on the next panel, an advisor call sorted to
the front of a helper panel tripped the old rule that kept advisor
panels apart, so "advisor, helper A, helper B" drew two helper panels,
and the first counted the advisor as a helper ("Claude calls in 2
helpers" for one helper). The rule has no job left and is gone; a
riding second opinion is never counted as a helper. One recorded page
changes: "Claude sends 1 helper off to work in the background."
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
6a6c7c0949
commit
277cc88148
3 files changed
+30
-7
No files matched your search
@@ -51,7 +51,7 @@
|
||||
{
|
||||
"kind": "backup",
|
||||
"ok": null,
|
||||
"story": "Claude calls in 2 helpers.",
|
||||
"story": "Claude sends 1 helper off to work in the background.",
|
||||
"director": "Agent · general-purpose · 6 calls inside · after 1 second opinion",
|
||||
"balloon": null,
|
||||
"tests": null,
|
||||
|
||||
@@ -1312,6 +1312,32 @@ describe('buildStoryPage', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('a second opinion in front of two helpers neither splits them nor counts as one', () => {
|
||||
const advisor = {
|
||||
type: 'assistant',
|
||||
timestamp: '2026-10-18T09:41:20.000Z',
|
||||
message: {
|
||||
content: [
|
||||
{ type: 'server_tool_use', id: 'srv1', name: 'advisor', input: {} },
|
||||
{ type: 'advisor_tool_result', tool_use_id: 'srv1', content: { type: 'advisor_redacted_result' } },
|
||||
],
|
||||
},
|
||||
};
|
||||
const page = pageOf([
|
||||
prompt('go'),
|
||||
advisor,
|
||||
tool('a1', 'Agent', { description: 'A', subagent_type: 'general-purpose', prompt: 'x' }),
|
||||
result('a1', 'done A'),
|
||||
tool('a2', 'Agent', { description: 'B', subagent_type: 'general-purpose', prompt: 'y' }),
|
||||
result('a2', 'done B'),
|
||||
end(1000),
|
||||
]);
|
||||
const backups = page.panels.filter((p) => p.kind === 'backup');
|
||||
expect(backups).toHaveLength(1);
|
||||
expect(backups[0]).toMatchObject({ secondOpinion: 1, caption: { story: 'Claude calls in 2 helpers.' } });
|
||||
expect(backups[0].helpers?.map((h) => h.task)).toEqual(['A', 'B']);
|
||||
});
|
||||
|
||||
it('the advisor (a server tool) is a helper giving a second opinion', () => {
|
||||
const page = pageOf([
|
||||
prompt('think hard'),
|
||||
|
||||
Reference in new issue
Block a user