feat: add delete session functionality with confirmation dialog

- Introduced a new DeleteSessionDialog component for confirming session deletions.
- Integrated the delete session dialog into the SessionManager component, allowing users to delete sessions with a confirmation prompt.
- Updated the UI to handle session deletion more intuitively, enhancing user experience.
- Refactored existing delete confirmation logic to utilize the new DeleteConfirmDialog component for consistency across the application.
This commit is contained in:
Cody Seibert
2025-12-12 19:41:52 -05:00
parent 437063630c
commit fe9b26c49e
11 changed files with 289 additions and 334 deletions

View File

@@ -313,6 +313,46 @@ export class AutoModeService {
// No worktree, use project path
}
// Load feature info for context
const feature = await this.loadFeature(projectPath, featureId);
// Load previous agent output if it exists
const contextPath = path.join(
projectPath,
".automaker",
"features",
featureId,
"agent-output.md"
);
let previousContext = "";
try {
previousContext = await fs.readFile(contextPath, "utf-8");
} catch {
// No previous context
}
// Build complete prompt with feature info, previous context, and follow-up instructions
let fullPrompt = `## Follow-up on Feature Implementation
${feature ? this.buildFeaturePrompt(feature) : `**Feature ID:** ${featureId}`}
`;
if (previousContext) {
fullPrompt += `
## Previous Agent Work
The following is the output from the previous implementation attempt:
${previousContext}
`;
}
fullPrompt += `
## Follow-up Instructions
${prompt}
## Task
Address the follow-up instructions above. Review the previous work and make the requested changes or fixes.`;
this.runningFeatures.set(featureId, {
featureId,
projectPath,
@@ -326,11 +366,14 @@ export class AutoModeService {
this.emitAutoModeEvent("auto_mode_feature_start", {
featureId,
projectPath,
feature: { id: featureId, title: "Follow-up", description: prompt.substring(0, 100) },
feature: feature || { id: featureId, title: "Follow-up", description: prompt.substring(0, 100) },
});
try {
await this.runAgent(workDir, featureId, prompt, abortController, imagePaths);
await this.runAgent(workDir, featureId, fullPrompt, abortController, imagePaths);
// Mark as waiting_approval for user review
await this.updateFeatureStatus(projectPath, featureId, "waiting_approval");
this.emitAutoModeEvent("auto_mode_feature_complete", {
featureId,