ai-devkit
ai-devkit copied to clipboard
agent console: validate name and cwd client-side before submit
Name regex (/^[a-z0-9][a-z0-9-]{0,62}[a-z0-9]$/, agent.ts:292) and cwd existence are only checked inside the spawned agent start subprocess — feedback is slow and shown as a single undifferentiated error.
Validate inline per-field in the pane: name format, empty name/cwd, fs.existsSync(cwd), and ideally name-in-use.
Refs: packages/cli/src/tui/console/StartAgentPane.tsx:51-57