@selesai/code 0.5.26 → 0.5.27

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.
@@ -1144,6 +1144,42 @@ test("terminal split keyboard scroll supports Pi page aliases and preserves app
1144
1144
  compositor.dispose();
1145
1145
  });
1146
1146
 
1147
+ test("terminal split leaves PgUp/PgDn to a focused custom view", () => {
1148
+ const terminal = new FakeTerminal();
1149
+ let ownsKeyboardScroll = true;
1150
+ let inputListener: ((data: string) => { consume?: boolean; data?: string } | undefined) | null = null;
1151
+ const tui = {
1152
+ terminal,
1153
+ addInputListener(listener: (data: string) => { consume?: boolean; data?: string } | undefined) {
1154
+ inputListener = listener;
1155
+ return () => {
1156
+ inputListener = null;
1157
+ };
1158
+ },
1159
+ requestRender() {},
1160
+ render() {
1161
+ return Array.from({ length: 30 }, (_, index) => `line-${index}`);
1162
+ },
1163
+ };
1164
+
1165
+ const compositor = new TerminalSplitCompositor({
1166
+ tui,
1167
+ terminal,
1168
+ shouldCaptureKeyboardScroll: () => ownsKeyboardScroll,
1169
+ renderCluster: () => ({ lines: ["cluster-a", "cluster-b"], cursor: null }),
1170
+ });
1171
+
1172
+ compositor.install();
1173
+ tui.render();
1174
+
1175
+ assert.deepEqual(inputListener?.("\x1b[5~"), { consume: true });
1176
+ ownsKeyboardScroll = false;
1177
+ assert.equal(inputListener?.("\x1b[5~"), undefined);
1178
+ assert.equal(inputListener?.("\x1b[6~"), undefined);
1179
+
1180
+ compositor.dispose();
1181
+ });
1182
+
1147
1183
  test("terminal split keyboard scroll accepts configured shortcuts", () => {
1148
1184
  const terminal = new FakeTerminal();
1149
1185
  const renderRequests: Array<boolean | undefined> = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@selesai/code",
3
- "version": "0.5.26",
3
+ "version": "0.5.27",
4
4
  "description": "Maintained, extension-first Pi coding agent with built-in workflows, subagents, web research, questions, skills, and an enhanced terminal UI.",
5
5
  "type": "module",
6
6
  "repository": {