feat(run): Enter sends the prompt, and a busy lane attaches instead of failing
- The prompt box sends on Enter (Ctrl/Cmd+Enter still works); Shift+Enter inserts a newline, and IME composition (Vietnamese/CJK) never sends. - Starting or resuming into a lane that still holds a live run answered a raw 409 ERUNLIVE; the console now attaches to that run with a notice. Checked by error code, since the server's message is prose. - Active runs gains a two-click Kill for live dashboard-spawned rows, the way to free a lane when the previous session really should go.
This commit is contained in:
@@ -77,7 +77,9 @@ interface PromptEditorProps {
|
||||
|
||||
function PromptEditor({ value, onChange, onSubmit, placeholder, rows = 5 }: PromptEditorProps) {
|
||||
const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
|
||||
if ((e.ctrlKey || e.metaKey) && e.key === "Enter") {
|
||||
// Enter sends (Ctrl/Cmd+Enter still does); Shift+Enter inserts a newline.
|
||||
// isComposing guards IME input (Vietnamese/CJK), where Enter commits the candidate.
|
||||
if (e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing) {
|
||||
e.preventDefault();
|
||||
onSubmit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user