feat: errand review & request changes

Add errand.requestChanges procedure that re-spawns an agent in the
existing worktree with user feedback. Replace raw <pre> diff blocks
with syntax-highlighted ErrandDiffView using FileCard components.
Add Output/Changes tabs to the active errand view.
This commit is contained in:
Lukas May
2026-03-06 22:09:01 +01:00
parent dca4224d26
commit 6482960c6f
5 changed files with 278 additions and 17 deletions

View File

@@ -14,3 +14,24 @@ If you cannot complete the change:
Do not create any other output files.`;
}
export function buildErrandRevisionPrompt(description: string, feedback: string): string {
return `You are revising a previous change in an isolated worktree. The worktree already contains your prior work.
Original description: ${description}
The user reviewed your changes and requested revisions:
${feedback}
Make only the changes needed to address the feedback. Do not undo prior work unless the feedback specifically asks for it.
When you are done, write .cw/output/signal.json:
{ "status": "done", "result": { "message": "<one-sentence summary of what you changed>" } }
If you cannot complete the change:
{ "status": "error", "error": "<explanation>" }
Do not create any other output files.`;
}

View File

@@ -13,7 +13,7 @@ export { buildDetailPrompt } from './detail.js';
export { buildRefinePrompt } from './refine.js';
export { buildChatPrompt } from './chat.js';
export type { ChatHistoryEntry } from './chat.js';
export { buildErrandPrompt } from './errand.js';
export { buildErrandPrompt, buildErrandRevisionPrompt } from './errand.js';
export { buildWorkspaceLayout } from './workspace.js';
export { buildPreviewInstructions } from './preview.js';
export { buildConflictResolutionPrompt, buildConflictResolutionDescription } from './conflict-resolution.js';