feat(plans): save assistant messages as editable project plans with improve/implement flows
Add Save-as-plan action on assistant messages that writes a markdown plan into the project plans directory and suggests a title from the text. Plan view opens a specific saved plan via targetPath, supports inline edits, and can kick off improve or implement flows in a new or worktree session. Ship the matching hidden magic prompts (plan.todo/improve/implement) so the instructions applied by these flows are visible and editable in the Magic Prompts page. Remove the plan editor font override, CodeMirror now uses the app font stack.
This commit is contained in:
@@ -100,6 +100,30 @@ const PROMPT_PAGE_MAP: Record<string, PromptPageConfig> = {
|
||||
{ id: 'git.integrate.cherrypick.resolve.instructions', title: 'Instructions' },
|
||||
],
|
||||
},
|
||||
'plan.improve': {
|
||||
title: 'Improve Plan',
|
||||
description: 'Hidden prompt used when sending a saved plan into an improve flow.',
|
||||
blocks: [
|
||||
{ id: 'plan.improve.visible', title: 'Visible Prompt' },
|
||||
{ id: 'plan.improve.instructions', title: 'Instructions' },
|
||||
],
|
||||
},
|
||||
'plan.todo': {
|
||||
title: 'Todo Planning',
|
||||
description: 'Hidden prompt used when sending a todo into a new planning session.',
|
||||
blocks: [
|
||||
{ id: 'plan.todo.visible', title: 'Visible Prompt' },
|
||||
{ id: 'plan.todo.instructions', title: 'Instructions' },
|
||||
],
|
||||
},
|
||||
'plan.implement': {
|
||||
title: 'Implement Plan',
|
||||
description: 'Hidden prompt used when sending a saved plan into an implement flow.',
|
||||
blocks: [
|
||||
{ id: 'plan.implement.visible', title: 'Visible Prompt' },
|
||||
{ id: 'plan.implement.instructions', title: 'Instructions' },
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
const hasOwn = (input: Record<string, string>, key: string) => Object.prototype.hasOwnProperty.call(input, key);
|
||||
|
||||
@@ -32,6 +32,14 @@ export const MagicPromptsSidebar: React.FC<MagicPromptsSidebarProps> = ({ onItem
|
||||
{ id: 'github.pr.comment.single', title: 'Single PR Comment Review' },
|
||||
],
|
||||
},
|
||||
{
|
||||
group: 'Planning',
|
||||
items: [
|
||||
{ id: 'plan.todo', title: 'Todo Planning' },
|
||||
{ id: 'plan.improve', title: 'Improve Plan' },
|
||||
{ id: 'plan.implement', title: 'Implement Plan' },
|
||||
],
|
||||
},
|
||||
] as const;
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user