@dreki-gg/pi-questionnaire 0.2.2 → 0.2.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @dreki-gg/pi-questionnaire
2
2
 
3
+ ## 0.2.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`54e5fd9`](https://github.com/dreki-gg/pi-extensions/commit/54e5fd9b15573fd4729f89ed85e31cd4648cb6c8) Thanks [@jalbarrang](https://github.com/jalbarrang)! - fix(questionnaire): prevent navigation keys from interrupting "Other" text input
8
+
9
+ When typing custom text in the "Other" input field, keys like Space, Left/Right arrows, and 'r' were intercepted by tab navigation handlers instead of being sent to the text editor. This caused accidental tab switches that cleared the input mode and lost any typed text.
10
+
11
+ ## 0.2.3
12
+
13
+ ### Patch Changes
14
+
15
+ - [`d133c3d`](https://github.com/dreki-gg/pi-extensions/commit/d133c3da917e7e5def568d27d6cde8ae8a6c00d2) Thanks [@jalbarrang](https://github.com/jalbarrang)! - Mark pi peer dependencies as optional so npm does not auto-install pi internals when installing extension packages.
16
+
3
17
  ## 0.2.2
4
18
 
5
19
  ### Patch Changes
@@ -1,5 +1,5 @@
1
- import type { ExtensionAPI, Theme } from '@mariozechner/pi-coding-agent';
2
- import { Container, Spacer, Text } from '@mariozechner/pi-tui';
1
+ import type { ExtensionAPI, Theme } from '@earendil-works/pi-coding-agent';
2
+ import { Container, Spacer, Text } from '@earendil-works/pi-tui';
3
3
  import {
4
4
  formatCancelledSummary,
5
5
  formatCompletedSummary,
@@ -138,6 +138,7 @@ export default function questionnaireExtension(pi: ExtensionAPI) {
138
138
  return {
139
139
  content: [{ type: 'text' as const, text: formatToolContentSummary(uiResult) }],
140
140
  details: uiResult,
141
+ terminate: true,
141
142
  };
142
143
  },
143
144
 
@@ -1,4 +1,4 @@
1
- import { StringEnum } from '@mariozechner/pi-ai';
1
+ import { StringEnum } from '@earendil-works/pi-ai';
2
2
  import { Type, type Static } from 'typebox';
3
3
 
4
4
  export const SelectionModeSchema = StringEnum(['single', 'multiple'] as const, {
@@ -1,4 +1,4 @@
1
- import { StringEnum } from '@mariozechner/pi-ai';
1
+ import { StringEnum } from '@earendil-works/pi-ai';
2
2
  import { Type, type Static } from 'typebox';
3
3
  import {
4
4
  type QuestionInput as QuestionInputSchema,
@@ -1,5 +1,5 @@
1
- import type { ExtensionContext } from '@mariozechner/pi-coding-agent';
2
- import { Editor, type EditorTheme, Key, matchesKey, truncateToWidth } from '@mariozechner/pi-tui';
1
+ import type { ExtensionContext } from '@earendil-works/pi-coding-agent';
2
+ import { Editor, type EditorTheme, Key, matchesKey, truncateToWidth } from '@earendil-works/pi-tui';
3
3
  import {
4
4
  areAllAnswersValid,
5
5
  createInitialQuestionStateById,
@@ -221,8 +221,13 @@ export async function runQuestionnaireUI(
221
221
  }
222
222
 
223
223
  function handleInput(data: string) {
224
- if (uiState.inputMode === 'otherInput' && matchesKey(data, Key.escape)) {
225
- clearInputMode();
224
+ if (uiState.inputMode === 'otherInput') {
225
+ if (matchesKey(data, Key.escape)) {
226
+ clearInputMode();
227
+ invalidate();
228
+ return;
229
+ }
230
+ editor.handleInput(data);
226
231
  invalidate();
227
232
  return;
228
233
  }
@@ -242,12 +247,6 @@ export async function runQuestionnaireUI(
242
247
  return;
243
248
  }
244
249
 
245
- if (uiState.inputMode === 'otherInput') {
246
- editor.handleInput(data);
247
- invalidate();
248
- return;
249
- }
250
-
251
250
  if (uiState.activeTabIndex === reviewTabIndex) {
252
251
  if (matchesKey(data, Key.up)) {
253
252
  uiState.reviewCursor = clamp(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreki-gg/pi-questionnaire",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Tool-first questionnaire flow for pi with shared tabbed TUI and custom rendering",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -31,9 +31,23 @@
31
31
  "typescript": "^6.0.0"
32
32
  },
33
33
  "peerDependencies": {
34
- "@mariozechner/pi-ai": "*",
35
- "@mariozechner/pi-coding-agent": "*",
36
- "@mariozechner/pi-tui": "*",
34
+ "@earendil-works/pi-ai": "*",
35
+ "@earendil-works/pi-coding-agent": "*",
36
+ "@earendil-works/pi-tui": "*",
37
37
  "typebox": "*"
38
+ },
39
+ "peerDependenciesMeta": {
40
+ "@earendil-works/pi-ai": {
41
+ "optional": true
42
+ },
43
+ "@earendil-works/pi-coding-agent": {
44
+ "optional": true
45
+ },
46
+ "@earendil-works/pi-tui": {
47
+ "optional": true
48
+ },
49
+ "typebox": {
50
+ "optional": true
51
+ }
38
52
  }
39
53
  }