mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-02-02 07:23:35 +00:00
Merge pull request #145 from nogataka/fix/agent-auto-start-from-empty-kanban
Fix: auto-start agent after spec creation from empty Kanban
This commit is contained in:
@@ -28,7 +28,7 @@ import { KeyboardShortcutsHelp } from './components/KeyboardShortcutsHelp'
|
|||||||
import { ThemeSelector } from './components/ThemeSelector'
|
import { ThemeSelector } from './components/ThemeSelector'
|
||||||
import { ResetProjectModal } from './components/ResetProjectModal'
|
import { ResetProjectModal } from './components/ResetProjectModal'
|
||||||
import { ProjectSetupRequired } from './components/ProjectSetupRequired'
|
import { ProjectSetupRequired } from './components/ProjectSetupRequired'
|
||||||
import { getDependencyGraph } from './lib/api'
|
import { getDependencyGraph, startAgent } from './lib/api'
|
||||||
import { Loader2, Settings, Moon, Sun, RotateCcw } from 'lucide-react'
|
import { Loader2, Settings, Moon, Sun, RotateCcw } from 'lucide-react'
|
||||||
import type { Feature } from './lib/types'
|
import type { Feature } from './lib/types'
|
||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
@@ -495,7 +495,16 @@ function App() {
|
|||||||
<div className="fixed inset-0 z-50 bg-background">
|
<div className="fixed inset-0 z-50 bg-background">
|
||||||
<SpecCreationChat
|
<SpecCreationChat
|
||||||
projectName={selectedProject}
|
projectName={selectedProject}
|
||||||
onComplete={() => {
|
onComplete={async (_specPath, yoloMode) => {
|
||||||
|
// Auto-start the agent after spec creation (same as NewProjectModal)
|
||||||
|
try {
|
||||||
|
await startAgent(selectedProject, {
|
||||||
|
yoloMode: yoloMode ?? false,
|
||||||
|
maxConcurrency: 3,
|
||||||
|
})
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Failed to start agent:', err)
|
||||||
|
}
|
||||||
setShowSpecChat(false)
|
setShowSpecChat(false)
|
||||||
// Refresh projects to update has_spec
|
// Refresh projects to update has_spec
|
||||||
queryClient.invalidateQueries({ queryKey: ['projects'] })
|
queryClient.invalidateQueries({ queryKey: ['projects'] })
|
||||||
|
|||||||
Reference in New Issue
Block a user