Inline question choices, compact one-click inbox cards, drop snooze
This commit is contained in:
Vendored
+9
-2
@@ -126,9 +126,16 @@ export function mountTranscript(root) {
|
||||
const live = sess && sess.state !== "completed" ? sess : undefined;
|
||||
composerModel = live ? live.model || context.get(live.id)?.model || "" : "";
|
||||
const form = composeForm(task.id, live?.id, live?.state ?? "idle", composerModel, showPending);
|
||||
const old = composer.querySelector("textarea");
|
||||
const caret = old !== null && document.activeElement === old ? [old.selectionStart, old.selectionEnd] : undefined;
|
||||
replace(composer, form);
|
||||
if (focusStart && !sess) {
|
||||
form.querySelector("textarea")?.focus();
|
||||
const text = form.querySelector("textarea");
|
||||
if (caret) {
|
||||
text.focus();
|
||||
text.setSelectionRange(caret[0], caret[1]);
|
||||
}
|
||||
else if (focusStart && !sess) {
|
||||
text.focus();
|
||||
}
|
||||
focusStart = false;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user