agent terminal: multi-line textarea input

swap the single-line <input> for an auto-growing <textarea>. enter
submits, shift+enter newlines, ime composition respected (skip submit
while isComposing). height caps at ~12em then scrolls. submit-hint
updates to '↵ send · ⇧↵ newline'. async-form handler now also clears
textareas on success.
This commit is contained in:
müde 2026-05-15 19:21:00 +02:00
parent fd39226883
commit 85e1f1a8f4
2 changed files with 36 additions and 12 deletions

View file

@ -156,18 +156,21 @@ pre.diff {
.term-input { padding: 0.4em 1em 0.8em; }
.term-input .sendform-term {
display: flex;
align-items: center;
align-items: flex-start;
gap: 0.5em;
border-top: 1px dashed var(--purple-dim);
padding-top: 0.5em;
}
.term-input .prompt, .term-input .submit-hint {
padding-top: 0.25em;
}
.term-input .prompt {
color: var(--green);
text-shadow: 0 0 6px rgba(166, 227, 161, 0.6);
user-select: none;
flex: 0 0 auto;
}
.term-input input {
.term-input textarea {
flex: 1;
background: transparent;
border: 0;
@ -177,11 +180,15 @@ pre.diff {
font-size: 1em;
padding: 0.2em 0;
caret-color: var(--green);
resize: none;
overflow-y: auto;
line-height: 1.4;
min-height: 1.4em;
}
.term-input input::placeholder { color: var(--muted); }
.term-input textarea::placeholder { color: var(--muted); }
.term-input .submit-hint { color: var(--muted); font-size: 0.8em; flex: 0 0 auto; }
.term-input.disabled .prompt { color: var(--muted); text-shadow: none; }
.term-input.disabled input { color: var(--muted); }
.term-input.disabled textarea { color: var(--muted); }
.live {
background: rgba(255, 255, 255, 0.02);
border: 1px solid var(--purple-dim);