Inline question choices, compact one-click inbox cards, drop snooze
This commit is contained in:
+8
-2
@@ -160,9 +160,15 @@ export function mountTranscript(root: HTMLElement): () => void {
|
||||
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