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

@@ -1,38 +0,0 @@
[
{
"id": "msg_1765523527444_d8xyk8rh9",
"role": "user",
"content": "this is a test",
"timestamp": "2025-12-12T07:12:07.444Z"
},
{
"id": "msg_1765523534075_351i0rcft",
"role": "assistant",
"content": "Hello! This is a test response. I'm working correctly and ready to help you with your software development projects.\n\nIs there something specific you'd like to work on today? I can help you with:\n\n- **Planning a new project** - Define requirements, architecture, and technical approach\n- **Writing code** - Create new files, implement features, or build components\n- **Editing existing code** - Modify, refactor, or fix bugs in your codebase\n- **Running commands** - Execute tests, builds, or other terminal commands\n- **Exploring your codebase** - Search for patterns, understand existing code structure\n\nJust let me know what you need!",
"timestamp": "2025-12-12T07:12:14.075Z"
},
{
"id": "msg_1765524006202_3d2cuya6b",
"role": "user",
"content": "test",
"timestamp": "2025-12-12T07:20:06.202Z"
},
{
"id": "msg_1765524011389_sdfbuai3k",
"role": "assistant",
"content": "Hello! I'm here to help you build software. How can I assist you today?\n\nI can help you with:\n\n- **Planning** - Define requirements, discuss architecture, and design your project\n- **Coding** - Write, edit, and modify code files\n- **Debugging** - Analyze issues and fix bugs\n- **Testing** - Run tests and verify functionality\n- **Exploring** - Search and understand existing codebases\n\nWhat would you like to work on?",
"timestamp": "2025-12-12T07:20:11.389Z"
},
{
"id": "msg_1765524491273_7ocghnbb5",
"role": "user",
"content": "test",
"timestamp": "2025-12-12T07:28:11.273Z"
},
{
"id": "msg_1765524498237_x8b4148gc",
"role": "assistant",
"content": "Hello! I'm here to help you build software. How can I assist you today?\n\nI can help you with:\n- **Planning** - Define requirements, architecture, and technical approaches\n- **Coding** - Write, edit, and modify code files\n- **Debugging** - Find and fix issues in your codebase\n- **Testing** - Run tests and help improve test coverage\n- **Exploring** - Search and analyze your existing codebase\n\nWhat would you like to work on?",
"timestamp": "2025-12-12T07:28:18.237Z"
}
]

File diff suppressed because one or more lines are too long

View File

@@ -1,18 +0,0 @@
{
"msg_1765523524581_xhk6u45v2": {
"id": "msg_1765523524581_xhk6u45v2",
"name": "Bright Agent 2",
"projectPath": "/Users/webdevcody/Workspace/automaker",
"workingDirectory": "/Users/webdevcody/Workspace/automaker",
"createdAt": "2025-12-12T07:12:04.582Z",
"updatedAt": "2025-12-12T07:28:18.571Z"
},
"msg_1765525491205_xeuqv7i9v": {
"id": "msg_1765525491205_xeuqv7i9v",
"name": "Optimal Helper 52",
"projectPath": "/Users/webdevcody/Workspace/automaker",
"workingDirectory": "/Users/webdevcody/Workspace/automaker",
"createdAt": "2025-12-12T07:44:51.205Z",
"updatedAt": "2025-12-12T07:46:03.339Z"
}
}

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,