yank to input

This commit is contained in:
Ian Gulliver
2026-10-17 08:49:44 -07:00
parent d6a63e09ff
commit 38643e65f5
6 changed files with 15 additions and 8 deletions
+5 -2
View File
@@ -208,7 +208,7 @@ export function taskPane() {
for (const item of fresh) {
seen.add(item.id);
}
if (state.focus.tab === "transcript" && fresh.some((item) => item.kind === "question" && item.task_id === state.selectedTaskId)) {
if (state.focus.tab === "transcript" && !hasDraft(pane) && fresh.some((item) => item.kind === "question" && item.task_id === state.selectedTaskId)) {
focusTab("inbox");
}
};
@@ -221,6 +221,9 @@ export function taskPane() {
trackPaneFocus(pane);
return pane;
}
function hasDraft(pane) {
return [...pane.querySelectorAll("textarea:not(.xterm-helper-textarea)")].some((t) => t.value.trim() !== "");
}
function trackPaneFocus(pane) {
let focused = false;
let drafting = false;
@@ -238,7 +241,7 @@ function trackPaneFocus(pane) {
}
const active = document.activeElement;
const now = document.hasFocus() && pane.contains(active);
const draft = [...pane.querySelectorAll("textarea:not(.xterm-helper-textarea)")].some((t) => t.value.trim() !== "");
const draft = hasDraft(pane);
inside = now ? active : null;
if (now === focused && draft === drafting) {
return;
+1 -1
View File
File diff suppressed because one or more lines are too long