kaizen-agent 1.34.5 → 1.34.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/web/term.ts CHANGED
@@ -95,14 +95,26 @@ function mountTerm(el: HTMLElement, key: string, onEnd?: () => void): () => void
95
95
  if (v === "alt") b.classList.add(v);
96
96
  grid.append(b);
97
97
  }
98
- const hide = key("⌨ ▾", () => {
99
- const off = hide.textContent === "⌨ ▾";
98
+ const hide = key("Keys ▾", () => {
99
+ const off = hide.textContent === "Keys ▾";
100
100
  grid.hidden = pad.hidden = true;
101
101
  if (!off) grid.hidden = false;
102
- hide.textContent = off ? "⌨ ▴" : "⌨ ▾";
102
+ hide.textContent = off ? "Keys ▴" : "Keys ▾";
103
103
  });
104
- hide.className = "keyhide";
105
- bar.append(hide, pad, grid);
104
+ // The native keyboard stays shut (inputmode none) until this button asks for it, so
105
+ // tapping the terminal or a key never pops it over the Ctrl pad and Paste.
106
+ const ta = term.textarea;
107
+ if (ta) ta.inputMode = "none";
108
+ const kbd = key("⌨", () => {
109
+ if (!ta) return;
110
+ const on = kbd.classList.toggle("on");
111
+ ta.inputMode = on ? "text" : "none";
112
+ ta.blur(); // inputmode is read on focus; the key's term.focus() reopens it
113
+ });
114
+ const top = document.createElement("div");
115
+ top.className = "keytop";
116
+ top.append(hide, kbd);
117
+ bar.append(top, pad, grid);
106
118
  el.after(bar);
107
119
  }
108
120
  // xterm.js has no touch scrolling, so on a phone a swipe did nothing. Each line's