refactor: create reusable PromptTabContent component and add {{count}} placeholder

- Create PromptTabContent reusable component in prompt-customization-section.tsx
- Update all tabs (Agent, Commit Message, Title Generation, Ideation, App Spec,
  Context Description, Suggestions, Task Execution) to use the new component
- Add {{count}} placeholder to DEFAULT_SUGGESTIONS_SYSTEM_PROMPT for dynamic
  suggestion count

Addresses PR review comments from Gemini.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Shirone
2026-01-15 21:00:32 +01:00
parent 3a2ba6dbfe
commit 1abf219230
2 changed files with 326 additions and 376 deletions

View File

@@ -65,6 +65,44 @@ function calculateMinHeight(text: string): string {
return `${minHeight}px`; return `${minHeight}px`;
} }
/**
* PromptTabContent Component
*
* Reusable container for prompt customization tabs.
* Provides consistent header with title and reset button.
*/
interface PromptTabContentProps {
value: string;
title: string;
category: keyof PromptCustomization;
onReset: (category: keyof PromptCustomization) => void;
children: React.ReactNode;
infoBanner?: React.ReactNode;
}
function PromptTabContent({
value,
title,
category,
onReset,
children,
infoBanner,
}: PromptTabContentProps) {
return (
<TabsContent value={value} className="space-y-6 mt-6">
<div className="flex items-center justify-between mb-4">
<h3 className="text-sm font-medium text-foreground">{title}</h3>
<Button variant="ghost" size="sm" onClick={() => onReset(category)} className="gap-2">
<RotateCcw className="w-3 h-3" />
Reset Section
</Button>
</div>
{infoBanner}
<div className="space-y-4">{children}</div>
</TabsContent>
);
}
/** /**
* PromptField Component * PromptField Component
* *
@@ -423,30 +461,20 @@ export function PromptCustomizationSection({
</TabsContent> </TabsContent>
{/* Agent Tab */} {/* Agent Tab */}
<TabsContent value="agent" className="space-y-6 mt-6"> <PromptTabContent
<div className="flex items-center justify-between mb-4"> value="agent"
<h3 className="text-sm font-medium text-foreground">Agent Runner Prompts</h3> title="Agent Runner Prompts"
<Button category="agent"
variant="ghost" onReset={resetToDefaults}
size="sm" >
onClick={() => resetToDefaults('agent')} <PromptField
className="gap-2" label="System Prompt"
> description="Defines the AI's role and behavior in interactive chat sessions"
<RotateCcw className="w-3 h-3" /> defaultValue={DEFAULT_AGENT_PROMPTS.systemPrompt}
Reset Section customValue={promptCustomization?.agent?.systemPrompt}
</Button> onCustomValueChange={(value) => updatePrompt('agent', 'systemPrompt', value)}
</div> />
</PromptTabContent>
<div className="space-y-4">
<PromptField
label="System Prompt"
description="Defines the AI's role and behavior in interactive chat sessions"
defaultValue={DEFAULT_AGENT_PROMPTS.systemPrompt}
customValue={promptCustomization?.agent?.systemPrompt}
onCustomValueChange={(value) => updatePrompt('agent', 'systemPrompt', value)}
/>
</div>
</TabsContent>
{/* Backlog Plan Tab */} {/* Backlog Plan Tab */}
<TabsContent value="backlog-plan" className="space-y-6 mt-6"> <TabsContent value="backlog-plan" className="space-y-6 mt-6">
@@ -569,60 +597,38 @@ export function PromptCustomizationSection({
</TabsContent> </TabsContent>
{/* Commit Message Tab */} {/* Commit Message Tab */}
<TabsContent value="commit-message" className="space-y-6 mt-6"> <PromptTabContent
<div className="flex items-center justify-between mb-4"> value="commit-message"
<h3 className="text-sm font-medium text-foreground">Commit Message Prompts</h3> title="Commit Message Prompts"
<Button category="commitMessage"
variant="ghost" onReset={resetToDefaults}
size="sm" >
onClick={() => resetToDefaults('commitMessage')} <PromptField
className="gap-2" label="System Prompt"
> description="Instructions for generating git commit messages from diffs. The AI will receive the git diff and generate a conventional commit message."
<RotateCcw className="w-3 h-3" /> defaultValue={DEFAULT_COMMIT_MESSAGE_PROMPTS.systemPrompt}
Reset Section customValue={promptCustomization?.commitMessage?.systemPrompt}
</Button> onCustomValueChange={(value) => updatePrompt('commitMessage', 'systemPrompt', value)}
</div> />
</PromptTabContent>
<div className="space-y-4">
<PromptField
label="System Prompt"
description="Instructions for generating git commit messages from diffs. The AI will receive the git diff and generate a conventional commit message."
defaultValue={DEFAULT_COMMIT_MESSAGE_PROMPTS.systemPrompt}
customValue={promptCustomization?.commitMessage?.systemPrompt}
onCustomValueChange={(value) =>
updatePrompt('commitMessage', 'systemPrompt', value)
}
/>
</div>
</TabsContent>
{/* Title Generation Tab */} {/* Title Generation Tab */}
<TabsContent value="title-generation" className="space-y-6 mt-6"> <PromptTabContent
<div className="flex items-center justify-between mb-4"> value="title-generation"
<h3 className="text-sm font-medium text-foreground">Title Generation Prompts</h3> title="Title Generation Prompts"
<Button category="titleGeneration"
variant="ghost" onReset={resetToDefaults}
size="sm" >
onClick={() => resetToDefaults('titleGeneration')} <PromptField
className="gap-2" label="System Prompt"
> description="Instructions for generating concise, descriptive feature titles from descriptions. Used when auto-generating titles for new features."
<RotateCcw className="w-3 h-3" /> defaultValue={DEFAULT_TITLE_GENERATION_PROMPTS.systemPrompt}
Reset Section customValue={promptCustomization?.titleGeneration?.systemPrompt}
</Button> onCustomValueChange={(value) =>
</div> updatePrompt('titleGeneration', 'systemPrompt', value)
}
<div className="space-y-4"> />
<PromptField </PromptTabContent>
label="System Prompt"
description="Instructions for generating concise, descriptive feature titles from descriptions. Used when auto-generating titles for new features."
defaultValue={DEFAULT_TITLE_GENERATION_PROMPTS.systemPrompt}
customValue={promptCustomization?.titleGeneration?.systemPrompt}
onCustomValueChange={(value) =>
updatePrompt('titleGeneration', 'systemPrompt', value)
}
/>
</div>
</TabsContent>
{/* Issue Validation Tab */} {/* Issue Validation Tab */}
<TabsContent value="issue-validation" className="space-y-6 mt-6"> <TabsContent value="issue-validation" className="space-y-6 mt-6">
@@ -667,330 +673,274 @@ export function PromptCustomizationSection({
</TabsContent> </TabsContent>
{/* Ideation Tab */} {/* Ideation Tab */}
<TabsContent value="ideation" className="space-y-6 mt-6"> <PromptTabContent
<div className="flex items-center justify-between mb-4"> value="ideation"
<h3 className="text-sm font-medium text-foreground">Ideation Prompts</h3> title="Ideation Prompts"
<Button category="ideation"
variant="ghost" onReset={resetToDefaults}
size="sm" >
onClick={() => resetToDefaults('ideation')} <PromptField
className="gap-2" label="Ideation Chat System Prompt"
> description="System prompt for AI-powered ideation chat conversations. Guides the AI to brainstorm and suggest feature ideas."
<RotateCcw className="w-3 h-3" /> defaultValue={DEFAULT_IDEATION_PROMPTS.ideationSystemPrompt}
Reset Section customValue={promptCustomization?.ideation?.ideationSystemPrompt}
</Button> onCustomValueChange={(value) =>
</div> updatePrompt('ideation', 'ideationSystemPrompt', value)
}
/>
<div className="space-y-4"> <PromptField
<PromptField label="Suggestions System Prompt"
label="Ideation Chat System Prompt" description="System prompt for generating structured feature suggestions. Used when generating batch suggestions from prompts."
description="System prompt for AI-powered ideation chat conversations. Guides the AI to brainstorm and suggest feature ideas." defaultValue={DEFAULT_IDEATION_PROMPTS.suggestionsSystemPrompt}
defaultValue={DEFAULT_IDEATION_PROMPTS.ideationSystemPrompt} customValue={promptCustomization?.ideation?.suggestionsSystemPrompt}
customValue={promptCustomization?.ideation?.ideationSystemPrompt} onCustomValueChange={(value) =>
onCustomValueChange={(value) => updatePrompt('ideation', 'suggestionsSystemPrompt', value)
updatePrompt('ideation', 'ideationSystemPrompt', value) }
} critical={true}
/> />
</PromptTabContent>
<PromptField
label="Suggestions System Prompt"
description="System prompt for generating structured feature suggestions. Used when generating batch suggestions from prompts."
defaultValue={DEFAULT_IDEATION_PROMPTS.suggestionsSystemPrompt}
customValue={promptCustomization?.ideation?.suggestionsSystemPrompt}
onCustomValueChange={(value) =>
updatePrompt('ideation', 'suggestionsSystemPrompt', value)
}
critical={true}
/>
</div>
</TabsContent>
{/* App Spec Tab */} {/* App Spec Tab */}
<TabsContent value="app-spec" className="space-y-6 mt-6"> <PromptTabContent
<div className="flex items-center justify-between mb-4"> value="app-spec"
<h3 className="text-sm font-medium text-foreground">App Specification Prompts</h3> title="App Specification Prompts"
<Button category="appSpec"
variant="ghost" onReset={resetToDefaults}
size="sm" >
onClick={() => resetToDefaults('appSpec')} <PromptField
className="gap-2" label="Generate Spec System Prompt"
> description="System prompt for generating project specifications from overview"
<RotateCcw className="w-3 h-3" /> defaultValue={DEFAULT_APP_SPEC_PROMPTS.generateSpecSystemPrompt}
Reset Section customValue={promptCustomization?.appSpec?.generateSpecSystemPrompt}
</Button> onCustomValueChange={(value) =>
</div> updatePrompt('appSpec', 'generateSpecSystemPrompt', value)
}
/>
<div className="space-y-4"> <PromptField
<PromptField label="Structured Spec Instructions"
label="Generate Spec System Prompt" description="Instructions for structured specification output format"
description="System prompt for generating project specifications from overview" defaultValue={DEFAULT_APP_SPEC_PROMPTS.structuredSpecInstructions}
defaultValue={DEFAULT_APP_SPEC_PROMPTS.generateSpecSystemPrompt} customValue={promptCustomization?.appSpec?.structuredSpecInstructions}
customValue={promptCustomization?.appSpec?.generateSpecSystemPrompt} onCustomValueChange={(value) =>
onCustomValueChange={(value) => updatePrompt('appSpec', 'structuredSpecInstructions', value)
updatePrompt('appSpec', 'generateSpecSystemPrompt', value) }
} critical={true}
/> />
<PromptField <PromptField
label="Structured Spec Instructions" label="Generate Features from Spec"
description="Instructions for structured specification output format" description="Prompt for generating features from a project specification"
defaultValue={DEFAULT_APP_SPEC_PROMPTS.structuredSpecInstructions} defaultValue={DEFAULT_APP_SPEC_PROMPTS.generateFeaturesFromSpecPrompt}
customValue={promptCustomization?.appSpec?.structuredSpecInstructions} customValue={promptCustomization?.appSpec?.generateFeaturesFromSpecPrompt}
onCustomValueChange={(value) => onCustomValueChange={(value) =>
updatePrompt('appSpec', 'structuredSpecInstructions', value) updatePrompt('appSpec', 'generateFeaturesFromSpecPrompt', value)
} }
critical={true} critical={true}
/> />
</PromptTabContent>
<PromptField
label="Generate Features from Spec"
description="Prompt for generating features from a project specification"
defaultValue={DEFAULT_APP_SPEC_PROMPTS.generateFeaturesFromSpecPrompt}
customValue={promptCustomization?.appSpec?.generateFeaturesFromSpecPrompt}
onCustomValueChange={(value) =>
updatePrompt('appSpec', 'generateFeaturesFromSpecPrompt', value)
}
critical={true}
/>
</div>
</TabsContent>
{/* Context Description Tab */} {/* Context Description Tab */}
<TabsContent value="context-description" className="space-y-6 mt-6"> <PromptTabContent
<div className="flex items-center justify-between mb-4"> value="context-description"
<h3 className="text-sm font-medium text-foreground">Context Description Prompts</h3> title="Context Description Prompts"
<Button category="contextDescription"
variant="ghost" onReset={resetToDefaults}
size="sm" >
onClick={() => resetToDefaults('contextDescription')} <PromptField
className="gap-2" label="Describe File Prompt"
> description="Prompt for generating descriptions of text files added as context"
<RotateCcw className="w-3 h-3" /> defaultValue={DEFAULT_CONTEXT_DESCRIPTION_PROMPTS.describeFilePrompt}
Reset Section customValue={promptCustomization?.contextDescription?.describeFilePrompt}
</Button> onCustomValueChange={(value) =>
</div> updatePrompt('contextDescription', 'describeFilePrompt', value)
}
/>
<div className="space-y-4"> <PromptField
<PromptField label="Describe Image Prompt"
label="Describe File Prompt" description="Prompt for generating descriptions of images added as context"
description="Prompt for generating descriptions of text files added as context" defaultValue={DEFAULT_CONTEXT_DESCRIPTION_PROMPTS.describeImagePrompt}
defaultValue={DEFAULT_CONTEXT_DESCRIPTION_PROMPTS.describeFilePrompt} customValue={promptCustomization?.contextDescription?.describeImagePrompt}
customValue={promptCustomization?.contextDescription?.describeFilePrompt} onCustomValueChange={(value) =>
onCustomValueChange={(value) => updatePrompt('contextDescription', 'describeImagePrompt', value)
updatePrompt('contextDescription', 'describeFilePrompt', value) }
} />
/> </PromptTabContent>
<PromptField
label="Describe Image Prompt"
description="Prompt for generating descriptions of images added as context"
defaultValue={DEFAULT_CONTEXT_DESCRIPTION_PROMPTS.describeImagePrompt}
customValue={promptCustomization?.contextDescription?.describeImagePrompt}
onCustomValueChange={(value) =>
updatePrompt('contextDescription', 'describeImagePrompt', value)
}
/>
</div>
</TabsContent>
{/* Suggestions Tab */} {/* Suggestions Tab */}
<TabsContent value="suggestions" className="space-y-6 mt-6"> <PromptTabContent
<div className="flex items-center justify-between mb-4"> value="suggestions"
<h3 className="text-sm font-medium text-foreground">Suggestions Prompts</h3> title="Suggestions Prompts"
<Button category="suggestions"
variant="ghost" onReset={resetToDefaults}
size="sm" >
onClick={() => resetToDefaults('suggestions')} <PromptField
className="gap-2" label="Features Suggestion Prompt"
> description="Prompt for analyzing the project and suggesting new features"
<RotateCcw className="w-3 h-3" /> defaultValue={DEFAULT_SUGGESTIONS_PROMPTS.featuresPrompt}
Reset Section customValue={promptCustomization?.suggestions?.featuresPrompt}
</Button> onCustomValueChange={(value) => updatePrompt('suggestions', 'featuresPrompt', value)}
</div> />
<div className="space-y-4"> <PromptField
<PromptField label="Refactoring Suggestion Prompt"
label="Features Suggestion Prompt" description="Prompt for identifying refactoring opportunities"
description="Prompt for analyzing the project and suggesting new features" defaultValue={DEFAULT_SUGGESTIONS_PROMPTS.refactoringPrompt}
defaultValue={DEFAULT_SUGGESTIONS_PROMPTS.featuresPrompt} customValue={promptCustomization?.suggestions?.refactoringPrompt}
customValue={promptCustomization?.suggestions?.featuresPrompt} onCustomValueChange={(value) =>
onCustomValueChange={(value) => updatePrompt('suggestions', 'refactoringPrompt', value)
updatePrompt('suggestions', 'featuresPrompt', value) }
} />
/>
<PromptField <PromptField
label="Refactoring Suggestion Prompt" label="Security Suggestion Prompt"
description="Prompt for identifying refactoring opportunities" description="Prompt for analyzing security vulnerabilities"
defaultValue={DEFAULT_SUGGESTIONS_PROMPTS.refactoringPrompt} defaultValue={DEFAULT_SUGGESTIONS_PROMPTS.securityPrompt}
customValue={promptCustomization?.suggestions?.refactoringPrompt} customValue={promptCustomization?.suggestions?.securityPrompt}
onCustomValueChange={(value) => onCustomValueChange={(value) => updatePrompt('suggestions', 'securityPrompt', value)}
updatePrompt('suggestions', 'refactoringPrompt', value) />
}
/>
<PromptField <PromptField
label="Security Suggestion Prompt" label="Performance Suggestion Prompt"
description="Prompt for analyzing security vulnerabilities" description="Prompt for identifying performance issues"
defaultValue={DEFAULT_SUGGESTIONS_PROMPTS.securityPrompt} defaultValue={DEFAULT_SUGGESTIONS_PROMPTS.performancePrompt}
customValue={promptCustomization?.suggestions?.securityPrompt} customValue={promptCustomization?.suggestions?.performancePrompt}
onCustomValueChange={(value) => onCustomValueChange={(value) =>
updatePrompt('suggestions', 'securityPrompt', value) updatePrompt('suggestions', 'performancePrompt', value)
} }
/> />
<PromptField <PromptField
label="Performance Suggestion Prompt" label="Base Template"
description="Prompt for identifying performance issues" description="Base template applied to all suggestion types"
defaultValue={DEFAULT_SUGGESTIONS_PROMPTS.performancePrompt} defaultValue={DEFAULT_SUGGESTIONS_PROMPTS.baseTemplate}
customValue={promptCustomization?.suggestions?.performancePrompt} customValue={promptCustomization?.suggestions?.baseTemplate}
onCustomValueChange={(value) => onCustomValueChange={(value) => updatePrompt('suggestions', 'baseTemplate', value)}
updatePrompt('suggestions', 'performancePrompt', value) />
} </PromptTabContent>
/>
<PromptField
label="Base Template"
description="Base template applied to all suggestion types"
defaultValue={DEFAULT_SUGGESTIONS_PROMPTS.baseTemplate}
customValue={promptCustomization?.suggestions?.baseTemplate}
onCustomValueChange={(value) => updatePrompt('suggestions', 'baseTemplate', value)}
/>
</div>
</TabsContent>
{/* Task Execution Tab */} {/* Task Execution Tab */}
<TabsContent value="task-execution" className="space-y-6 mt-6"> <PromptTabContent
<div className="flex items-center justify-between mb-4"> value="task-execution"
<h3 className="text-sm font-medium text-foreground">Task Execution Prompts</h3> title="Task Execution Prompts"
<Button category="taskExecution"
variant="ghost" onReset={resetToDefaults}
size="sm" infoBanner={
onClick={() => resetToDefaults('taskExecution')} <div className="flex items-start gap-3 p-4 rounded-xl bg-blue-500/10 border border-blue-500/20">
className="gap-2" <Info className="w-5 h-5 text-blue-500 mt-0.5 shrink-0" />
> <div className="space-y-1">
<RotateCcw className="w-3 h-3" /> <p className="text-sm text-foreground font-medium">Template Variables</p>
Reset Section <p className="text-xs text-muted-foreground/80 leading-relaxed">
</Button> Task execution prompts use Handlebars syntax for variable substitution.
</div> Variables include{' '}
<code className="px-1 py-0.5 rounded bg-muted text-xs">{'{{taskId}}'}</code>,{' '}
{/* Info Banner for Task Execution */} <code className="px-1 py-0.5 rounded bg-muted text-xs">
<div className="flex items-start gap-3 p-4 rounded-xl bg-blue-500/10 border border-blue-500/20"> {'{{taskDescription}}'}
<Info className="w-5 h-5 text-blue-500 mt-0.5 flex-shrink-0" /> </code>
<div className="space-y-1"> ,{' '}
<p className="text-sm text-foreground font-medium">Template Variables</p> <code className="px-1 py-0.5 rounded bg-muted text-xs">
<p className="text-xs text-muted-foreground/80 leading-relaxed"> {'{{completedTasks}}'}
Task execution prompts use Handlebars syntax for variable substitution. Variables </code>
include{' '} , etc.
<code className="px-1 py-0.5 rounded bg-muted text-xs">{'{{taskId}}'}</code>,{' '} </p>
<code className="px-1 py-0.5 rounded bg-muted text-xs"> </div>
{'{{taskDescription}}'}
</code>
,{' '}
<code className="px-1 py-0.5 rounded bg-muted text-xs">
{'{{completedTasks}}'}
</code>
, etc.
</p>
</div> </div>
</div> }
>
<PromptField
label="Task Prompt Template"
description="Template for building individual task execution prompts"
defaultValue={DEFAULT_TASK_EXECUTION_PROMPTS.taskPromptTemplate}
customValue={promptCustomization?.taskExecution?.taskPromptTemplate}
onCustomValueChange={(value) =>
updatePrompt('taskExecution', 'taskPromptTemplate', value)
}
/>
<div className="space-y-4"> <PromptField
<PromptField label="Implementation Instructions"
label="Task Prompt Template" description="Instructions appended to feature implementation prompts"
description="Template for building individual task execution prompts" defaultValue={DEFAULT_TASK_EXECUTION_PROMPTS.implementationInstructions}
defaultValue={DEFAULT_TASK_EXECUTION_PROMPTS.taskPromptTemplate} customValue={promptCustomization?.taskExecution?.implementationInstructions}
customValue={promptCustomization?.taskExecution?.taskPromptTemplate} onCustomValueChange={(value) =>
onCustomValueChange={(value) => updatePrompt('taskExecution', 'implementationInstructions', value)
updatePrompt('taskExecution', 'taskPromptTemplate', value) }
} />
/>
<PromptField <PromptField
label="Implementation Instructions" label="Playwright Verification Instructions"
description="Instructions appended to feature implementation prompts" description="Instructions for automated Playwright verification (when enabled)"
defaultValue={DEFAULT_TASK_EXECUTION_PROMPTS.implementationInstructions} defaultValue={DEFAULT_TASK_EXECUTION_PROMPTS.playwrightVerificationInstructions}
customValue={promptCustomization?.taskExecution?.implementationInstructions} customValue={promptCustomization?.taskExecution?.playwrightVerificationInstructions}
onCustomValueChange={(value) => onCustomValueChange={(value) =>
updatePrompt('taskExecution', 'implementationInstructions', value) updatePrompt('taskExecution', 'playwrightVerificationInstructions', value)
} }
/> />
<PromptField <PromptField
label="Playwright Verification Instructions" label="Learning Extraction System Prompt"
description="Instructions for automated Playwright verification (when enabled)" description="System prompt for extracting learnings/ADRs from implementation output"
defaultValue={DEFAULT_TASK_EXECUTION_PROMPTS.playwrightVerificationInstructions} defaultValue={DEFAULT_TASK_EXECUTION_PROMPTS.learningExtractionSystemPrompt}
customValue={promptCustomization?.taskExecution?.playwrightVerificationInstructions} customValue={promptCustomization?.taskExecution?.learningExtractionSystemPrompt}
onCustomValueChange={(value) => onCustomValueChange={(value) =>
updatePrompt('taskExecution', 'playwrightVerificationInstructions', value) updatePrompt('taskExecution', 'learningExtractionSystemPrompt', value)
} }
/> critical={true}
/>
<PromptField <PromptField
label="Learning Extraction System Prompt" label="Learning Extraction User Template"
description="System prompt for extracting learnings/ADRs from implementation output" description="User prompt template for learning extraction. Variables: featureTitle, implementationLog"
defaultValue={DEFAULT_TASK_EXECUTION_PROMPTS.learningExtractionSystemPrompt} defaultValue={DEFAULT_TASK_EXECUTION_PROMPTS.learningExtractionUserPromptTemplate}
customValue={promptCustomization?.taskExecution?.learningExtractionSystemPrompt} customValue={promptCustomization?.taskExecution?.learningExtractionUserPromptTemplate}
onCustomValueChange={(value) => onCustomValueChange={(value) =>
updatePrompt('taskExecution', 'learningExtractionSystemPrompt', value) updatePrompt('taskExecution', 'learningExtractionUserPromptTemplate', value)
} }
critical={true} critical={true}
/> />
<PromptField <PromptField
label="Learning Extraction User Template" label="Plan Revision Template"
description="User prompt template for learning extraction. Variables: featureTitle, implementationLog" description="Template for prompting plan revisions. Variables: planVersion, previousPlan, userFeedback"
defaultValue={DEFAULT_TASK_EXECUTION_PROMPTS.learningExtractionUserPromptTemplate} defaultValue={DEFAULT_TASK_EXECUTION_PROMPTS.planRevisionTemplate}
customValue={ customValue={promptCustomization?.taskExecution?.planRevisionTemplate}
promptCustomization?.taskExecution?.learningExtractionUserPromptTemplate onCustomValueChange={(value) =>
} updatePrompt('taskExecution', 'planRevisionTemplate', value)
onCustomValueChange={(value) => }
updatePrompt('taskExecution', 'learningExtractionUserPromptTemplate', value) />
}
critical={true}
/>
<PromptField <PromptField
label="Plan Revision Template" label="Continuation After Approval Template"
description="Template for prompting plan revisions. Variables: planVersion, previousPlan, userFeedback" description="Template for continuation after plan approval. Variables: userFeedback, approvedPlan"
defaultValue={DEFAULT_TASK_EXECUTION_PROMPTS.planRevisionTemplate} defaultValue={DEFAULT_TASK_EXECUTION_PROMPTS.continuationAfterApprovalTemplate}
customValue={promptCustomization?.taskExecution?.planRevisionTemplate} customValue={promptCustomization?.taskExecution?.continuationAfterApprovalTemplate}
onCustomValueChange={(value) => onCustomValueChange={(value) =>
updatePrompt('taskExecution', 'planRevisionTemplate', value) updatePrompt('taskExecution', 'continuationAfterApprovalTemplate', value)
} }
/> />
<PromptField <PromptField
label="Continuation After Approval Template" label="Resume Feature Template"
description="Template for continuation after plan approval. Variables: userFeedback, approvedPlan" description="Template for resuming interrupted features. Variables: featurePrompt, previousContext"
defaultValue={DEFAULT_TASK_EXECUTION_PROMPTS.continuationAfterApprovalTemplate} defaultValue={DEFAULT_TASK_EXECUTION_PROMPTS.resumeFeatureTemplate}
customValue={promptCustomization?.taskExecution?.continuationAfterApprovalTemplate} customValue={promptCustomization?.taskExecution?.resumeFeatureTemplate}
onCustomValueChange={(value) => onCustomValueChange={(value) =>
updatePrompt('taskExecution', 'continuationAfterApprovalTemplate', value) updatePrompt('taskExecution', 'resumeFeatureTemplate', value)
} }
/> />
<PromptField <PromptField
label="Resume Feature Template" label="Project Analysis Prompt"
description="Template for resuming interrupted features. Variables: featurePrompt, previousContext" description="Prompt for AI-powered project analysis"
defaultValue={DEFAULT_TASK_EXECUTION_PROMPTS.resumeFeatureTemplate} defaultValue={DEFAULT_TASK_EXECUTION_PROMPTS.projectAnalysisPrompt}
customValue={promptCustomization?.taskExecution?.resumeFeatureTemplate} customValue={promptCustomization?.taskExecution?.projectAnalysisPrompt}
onCustomValueChange={(value) => onCustomValueChange={(value) =>
updatePrompt('taskExecution', 'resumeFeatureTemplate', value) updatePrompt('taskExecution', 'projectAnalysisPrompt', value)
} }
/> />
</PromptTabContent>
<PromptField
label="Project Analysis Prompt"
description="Prompt for AI-powered project analysis"
defaultValue={DEFAULT_TASK_EXECUTION_PROMPTS.projectAnalysisPrompt}
customValue={promptCustomization?.taskExecution?.projectAnalysisPrompt}
onCustomValueChange={(value) =>
updatePrompt('taskExecution', 'projectAnalysisPrompt', value)
}
/>
</div>
</TabsContent>
</Tabs> </Tabs>
</div> </div>
</div> </div>

View File

@@ -604,7 +604,7 @@ IMPORTANT: You do NOT have access to any tools. You CANNOT read files, search co
You must generate suggestions based ONLY on the project context provided below. You must generate suggestions based ONLY on the project context provided below.
Do NOT say "I'll analyze" or "Let me explore" - you cannot do those things. Do NOT say "I'll analyze" or "Let me explore" - you cannot do those things.
Based on the project context and the user's prompt, generate creative and actionable feature suggestions. Based on the project context and the user's prompt, generate exactly {{count}} creative and actionable feature suggestions.
YOUR RESPONSE MUST BE ONLY A JSON ARRAY - nothing else. No explanation, no preamble, no markdown code fences. YOUR RESPONSE MUST BE ONLY A JSON ARRAY - nothing else. No explanation, no preamble, no markdown code fences.