@juicesharp/rpiv-ask-user-question 2.13.1 → 2.13.3
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/package.json +4 -2
- package/state/build-questionnaire.ts +1 -0
- package/view/components/preview/preview-block-renderer.ts +39 -18
- package/view/components/preview/preview-pane.ts +121 -41
- package/view/dialog-builder.ts +51 -100
- package/view/dialog-copy.ts +51 -0
- package/view/scroll-window.ts +73 -0
- package/view/tab-content-strategy.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juicesharp/rpiv-ask-user-question",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.3",
|
|
4
4
|
"description": "Pi extension. A structured questionnaire the model can put to you when it would otherwise guess, with typed options instead of free-form replies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -74,7 +74,9 @@
|
|
|
74
74
|
"view/components/tab-bar.ts",
|
|
75
75
|
"view/components/wrapping-select.ts",
|
|
76
76
|
"view/dialog-builder.ts",
|
|
77
|
+
"view/dialog-copy.ts",
|
|
77
78
|
"view/props-adapter.ts",
|
|
79
|
+
"view/scroll-window.ts",
|
|
78
80
|
"view/stateful-view.ts",
|
|
79
81
|
"view/tab-components.ts",
|
|
80
82
|
"view/tab-content-strategy.ts"
|
|
@@ -97,6 +99,6 @@
|
|
|
97
99
|
}
|
|
98
100
|
},
|
|
99
101
|
"dependencies": {
|
|
100
|
-
"@juicesharp/rpiv-config": "^2.13.
|
|
102
|
+
"@juicesharp/rpiv-config": "^2.13.3"
|
|
101
103
|
}
|
|
102
104
|
}
|
|
@@ -29,6 +29,26 @@ function contentBudgetFor(mode: PreviewLayoutMode): number {
|
|
|
29
29
|
return Math.max(1, cap - BORDER_VERTICAL_OVERHEAD - NOTES_AFFORDANCE_OVERHEAD);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Rows a preview block uses for `rawRows` of content. Unconstrained (no `maxRows`), content is
|
|
34
|
+
* capped by the layout's fixed budget and the notes affordance is kept. Under a `maxRows`
|
|
35
|
+
* allowance that the full block would exceed, the affordance (2 rows — the footer hint already
|
|
36
|
+
* names the notes key) goes first, then content shrinks so the box still closes with its
|
|
37
|
+
* "N lines hidden" count. Undefined when not even one content row fits inside a border.
|
|
38
|
+
*/
|
|
39
|
+
function fitBlock(
|
|
40
|
+
rawRows: number,
|
|
41
|
+
mode: PreviewLayoutMode,
|
|
42
|
+
maxRows: number | undefined,
|
|
43
|
+
): { contentRows: number; affordance: boolean } | undefined {
|
|
44
|
+
const contentRows = Math.min(rawRows, contentBudgetFor(mode));
|
|
45
|
+
if (maxRows === undefined || BORDER_VERTICAL_OVERHEAD + contentRows + NOTES_AFFORDANCE_OVERHEAD <= maxRows) {
|
|
46
|
+
return { contentRows, affordance: true };
|
|
47
|
+
}
|
|
48
|
+
const fitted = Math.min(contentRows, maxRows - BORDER_VERTICAL_OVERHEAD);
|
|
49
|
+
return fitted >= 1 ? { contentRows: fitted, affordance: false } : undefined;
|
|
50
|
+
}
|
|
51
|
+
|
|
32
52
|
/** Inner (padding-aware) content width for a total block width. */
|
|
33
53
|
function innerWidthFor(width: number): number {
|
|
34
54
|
return Math.max(1, width - BORDER_HORIZONTAL_OVERHEAD - 2 * BORDER_INNER_PADDING_HORIZONTAL);
|
|
@@ -72,23 +92,23 @@ export class PreviewBlockRenderer {
|
|
|
72
92
|
}
|
|
73
93
|
|
|
74
94
|
/**
|
|
75
|
-
* Height contribution of the preview block
|
|
76
|
-
*
|
|
77
|
-
*
|
|
95
|
+
* Height contribution of the preview block — always equal to `renderBlock(...).length`
|
|
96
|
+
* for the same arguments (the affordance overhead is not gated by `focused`/`notesVisible`).
|
|
97
|
+
* `maxRows` is the row allowance the dialog can give the block; see `fitBlock`.
|
|
78
98
|
*/
|
|
79
|
-
blockHeight(width: number, optionIndex: number, mode: PreviewLayoutMode): number {
|
|
80
|
-
const
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
const contentRows = Math.min(rawRows, contentBudget);
|
|
84
|
-
return BORDER_VERTICAL_OVERHEAD + contentRows + NOTES_AFFORDANCE_OVERHEAD;
|
|
99
|
+
blockHeight(width: number, optionIndex: number, mode: PreviewLayoutMode, maxRows?: number): number {
|
|
100
|
+
const rawRows = this.cache.bodyFor(optionIndex, innerWidthFor(width)).length;
|
|
101
|
+
const fit = fitBlock(rawRows, mode, maxRows);
|
|
102
|
+
return fit ? BORDER_VERTICAL_OVERHEAD + fit.contentRows + (fit.affordance ? NOTES_AFFORDANCE_OVERHEAD : 0) : 0;
|
|
85
103
|
}
|
|
86
104
|
|
|
87
105
|
/**
|
|
88
|
-
* Render the
|
|
89
|
-
* `focused` and `notesVisible` together gate the affordance
|
|
90
|
-
* focused option carries a preview AND notes mode is inactive)
|
|
91
|
-
* emitted (
|
|
106
|
+
* Render the preview block at `width`: bordered box, then (when it fits) a blank separator
|
|
107
|
+
* and the notes-affordance row. `focused` and `notesVisible` together gate the affordance
|
|
108
|
+
* text (visible only when the focused option carries a preview AND notes mode is inactive);
|
|
109
|
+
* its row is emitted (empty when gated) whenever the block keeps it, so the row count only
|
|
110
|
+
* depends on the fit. Under a `maxRows` allowance the box always closes and its bottom border
|
|
111
|
+
* counts the lines left out; with no room for a box the block is empty.
|
|
92
112
|
*/
|
|
93
113
|
renderBlock(
|
|
94
114
|
width: number,
|
|
@@ -96,18 +116,19 @@ export class PreviewBlockRenderer {
|
|
|
96
116
|
mode: PreviewLayoutMode,
|
|
97
117
|
focused: boolean,
|
|
98
118
|
notesVisible: boolean,
|
|
119
|
+
maxRows?: number,
|
|
99
120
|
): string[] {
|
|
100
|
-
const contentBudget = contentBudgetFor(mode);
|
|
101
121
|
const maxInnerWidth = innerWidthFor(width);
|
|
102
|
-
|
|
103
122
|
const raw = this.cache.bodyFor(optionIndex, maxInnerWidth);
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
const
|
|
123
|
+
const fit = fitBlock(raw.length, mode, maxRows);
|
|
124
|
+
if (!fit) return [];
|
|
125
|
+
const hidden = raw.length - fit.contentRows;
|
|
126
|
+
const contentLines = hidden > 0 ? raw.slice(0, fit.contentRows) : raw;
|
|
107
127
|
|
|
108
128
|
const { boxWidth } = computeBoxDimensions(contentLines, maxInnerWidth);
|
|
109
129
|
const colorFn = (s: string) => this.theme.fg("accent", s);
|
|
110
130
|
const boxedLines = renderBorderedBox(contentLines, boxWidth, colorFn, hidden);
|
|
131
|
+
if (!fit.affordance) return boxedLines;
|
|
111
132
|
|
|
112
133
|
const showAffordance = focused && !notesVisible && this.cache.has(optionIndex);
|
|
113
134
|
const affordance = showAffordance
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
1
2
|
import { type Component, truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
2
3
|
import type { QuestionData } from "../../../tool/types.js";
|
|
4
|
+
import { windowLines } from "../../scroll-window.js";
|
|
3
5
|
import type { StatefulView } from "../../stateful-view.js";
|
|
4
6
|
import type { OptionListView } from "../option-list-view.js";
|
|
5
7
|
import type { PreviewBlockRenderer } from "./preview-block-renderer.js";
|
|
@@ -12,6 +14,9 @@ import {
|
|
|
12
14
|
STACKED_GAP_ROWS,
|
|
13
15
|
} from "./preview-layout-decider.js";
|
|
14
16
|
|
|
17
|
+
/** Smallest preview box worth showing: top border, one content line, bottom border. */
|
|
18
|
+
const MIN_BOX_ROWS = 3;
|
|
19
|
+
|
|
15
20
|
// ----- Re-exports for test imports — keep `./preview-pane.js` as the public surface -----
|
|
16
21
|
export {
|
|
17
22
|
MAX_PREVIEW_HEIGHT_SIDE_BY_SIDE,
|
|
@@ -59,6 +64,7 @@ export interface PreviewPaneProps {
|
|
|
59
64
|
|
|
60
65
|
export interface PreviewPaneConfig {
|
|
61
66
|
question: QuestionData;
|
|
67
|
+
theme: Theme;
|
|
62
68
|
getTerminalWidth: () => number;
|
|
63
69
|
optionListView: OptionListView;
|
|
64
70
|
previewBlock: PreviewBlockRenderer;
|
|
@@ -81,7 +87,15 @@ export class PreviewPane implements StatefulView<PreviewPaneProps>, Component {
|
|
|
81
87
|
private readonly getTerminalWidth: () => number;
|
|
82
88
|
private readonly optionListView: OptionListView;
|
|
83
89
|
private readonly previewBlock: PreviewBlockRenderer;
|
|
90
|
+
private readonly theme: Theme;
|
|
84
91
|
private props: PreviewPaneProps;
|
|
92
|
+
/**
|
|
93
|
+
* Rows the dialog can give this body this frame, set by `DialogView` before each render;
|
|
94
|
+
* undefined when unconstrained. A body taller than this fits itself instead of being cut
|
|
95
|
+
* by the dialog's scroll window: the options scroll within their column around the focused
|
|
96
|
+
* option, and the preview box shrinks but always closes (#210).
|
|
97
|
+
*/
|
|
98
|
+
private rowAllowance: number | undefined;
|
|
85
99
|
/**
|
|
86
100
|
* Cross-tab max left-width getter. Set exactly once by `buildQuestionnaire.injectGlobalLeftWidth`
|
|
87
101
|
* before any render. Initialized to a throwing sentinel so missing injection is a hard fail
|
|
@@ -96,6 +110,7 @@ export class PreviewPane implements StatefulView<PreviewPaneProps>, Component {
|
|
|
96
110
|
this.getTerminalWidth = config.getTerminalWidth;
|
|
97
111
|
this.optionListView = config.optionListView;
|
|
98
112
|
this.previewBlock = config.previewBlock;
|
|
113
|
+
this.theme = config.theme;
|
|
99
114
|
this.props = { notesVisible: false, selectedIndex: 0, focused: false, inputMode: false };
|
|
100
115
|
}
|
|
101
116
|
|
|
@@ -111,6 +126,11 @@ export class PreviewPane implements StatefulView<PreviewPaneProps>, Component {
|
|
|
111
126
|
this.props = props;
|
|
112
127
|
}
|
|
113
128
|
|
|
129
|
+
/** Render-time geometry from `DialogView` (not canonical state, so not a prop). */
|
|
130
|
+
setRowAllowance(rows: number | undefined): void {
|
|
131
|
+
this.rowAllowance = rows;
|
|
132
|
+
}
|
|
133
|
+
|
|
114
134
|
handleInput(_data: string): void {}
|
|
115
135
|
|
|
116
136
|
invalidate(): void {
|
|
@@ -128,21 +148,98 @@ export class PreviewPane implements StatefulView<PreviewPaneProps>, Component {
|
|
|
128
148
|
// Side-by-side + preview block resume verbatim on nav-away (inputMode clears).
|
|
129
149
|
if (this.props.inputMode) return this.optionListView.render(width);
|
|
130
150
|
|
|
151
|
+
return this.layout(width).lines;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Options + preview for the current layout mode, fitted to `rowAllowance` when set. The
|
|
156
|
+
* returned focus range is in the same row coordinates as `lines`, so `render`,
|
|
157
|
+
* `focusedItemRowRange` and `naturalHeight` agree by construction.
|
|
158
|
+
*/
|
|
159
|
+
private layout(width: number): { lines: string[]; focus: [number, number] | undefined } {
|
|
131
160
|
const mode = decideLayout(this.getTerminalWidth(), width);
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
161
|
+
return mode === "side-by-side" ? this.layoutSideBySide(width, mode) : this.layoutStacked(width, mode);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Stacked: options, a blank gap, then the preview block. When that exceeds the allowance,
|
|
166
|
+
* keep the focused option (plus a row either side for the overflow arrows) and give the
|
|
167
|
+
* preview the rest, so the preview of the option being considered stays in view instead
|
|
168
|
+
* of falling below the dialog's scroll window.
|
|
169
|
+
*/
|
|
170
|
+
private layoutStacked(
|
|
171
|
+
width: number,
|
|
172
|
+
mode: PreviewLayoutMode,
|
|
173
|
+
): { lines: string[]; focus: [number, number] | undefined } {
|
|
174
|
+
const { selectedIndex, focused, notesVisible } = this.props;
|
|
175
|
+
const options = this.optionListView.render(width);
|
|
176
|
+
const focus = this.optionListView.focusedItemRowRange(width);
|
|
177
|
+
const gap = Array<string>(STACKED_GAP_ROWS).fill("");
|
|
178
|
+
const allowance = this.rowAllowance;
|
|
179
|
+
const fullBlock = this.previewBlock.blockHeight(width, selectedIndex, mode);
|
|
180
|
+
if (allowance === undefined || options.length + STACKED_GAP_ROWS + fullBlock <= allowance) {
|
|
181
|
+
return {
|
|
182
|
+
lines: [
|
|
183
|
+
...options,
|
|
184
|
+
...gap,
|
|
185
|
+
...this.previewBlock.renderBlock(width, selectedIndex, mode, focused, notesVisible),
|
|
186
|
+
],
|
|
187
|
+
focus,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
// Prefer keeping a row either side of the focused option for the overflow arrows; give
|
|
191
|
+
// those up only when they are what keeps the preview box (border + 1 line) from fitting.
|
|
192
|
+
const focusRows = focus ? focus[1] - focus[0] : 1;
|
|
193
|
+
const previewRowsWith = (optionsFloor: number) =>
|
|
194
|
+
Math.min(fullBlock, allowance - STACKED_GAP_ROWS - Math.min(options.length, optionsFloor));
|
|
195
|
+
const roomy = previewRowsWith(focusRows + 2);
|
|
196
|
+
const previewRows = roomy >= MIN_BOX_ROWS ? roomy : previewRowsWith(focusRows);
|
|
197
|
+
const block = this.previewBlock.renderBlock(width, selectedIndex, mode, focused, notesVisible, previewRows);
|
|
198
|
+
const optionRows = allowance - (block.length > 0 ? STACKED_GAP_ROWS + block.length : 0);
|
|
199
|
+
const windowed = windowLines(options, Math.max(1, optionRows), focus, this.theme);
|
|
200
|
+
return {
|
|
201
|
+
lines: block.length > 0 ? [...windowed.lines, ...gap, ...block] : windowed.lines,
|
|
202
|
+
focus: windowed.focus,
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Side-by-side: options column left, preview block right. Under an allowance the options
|
|
208
|
+
* column scrolls around the focused option and the preview block shrinks, so neither
|
|
209
|
+
* column exceeds it and the dialog never slices through the preview box.
|
|
210
|
+
*/
|
|
211
|
+
private layoutSideBySide(
|
|
212
|
+
width: number,
|
|
213
|
+
mode: PreviewLayoutMode,
|
|
214
|
+
): { lines: string[]; focus: [number, number] | undefined } {
|
|
215
|
+
const adaptiveLeft = this.getAdaptiveLeft(width);
|
|
216
|
+
const { leftWidth, rightWidth, gap } = columnWidths(width, adaptiveLeft);
|
|
217
|
+
const allowance = this.rowAllowance;
|
|
218
|
+
const left =
|
|
219
|
+
allowance === undefined
|
|
220
|
+
? {
|
|
221
|
+
lines: this.optionListView.render(leftWidth),
|
|
222
|
+
focus: this.optionListView.focusedItemRowRange(leftWidth),
|
|
223
|
+
}
|
|
224
|
+
: windowLines(
|
|
225
|
+
this.optionListView.render(leftWidth),
|
|
226
|
+
allowance,
|
|
227
|
+
this.optionListView.focusedItemRowRange(leftWidth),
|
|
228
|
+
this.theme,
|
|
229
|
+
);
|
|
230
|
+
const rightLines = this.renderPaddedPreviewLines(rightWidth, mode, allowance);
|
|
231
|
+
const rows = Math.max(left.lines.length, rightLines.length);
|
|
232
|
+
const gapStr = " ".repeat(gap);
|
|
233
|
+
const out: string[] = [];
|
|
234
|
+
for (let i = 0; i < rows; i++) {
|
|
235
|
+
const leftRaw = left.lines[i] ?? "";
|
|
236
|
+
const rightRaw = rightLines[i] ?? "";
|
|
237
|
+
const leftClamped = truncateToWidth(leftRaw, leftWidth, "");
|
|
238
|
+
const leftPad = " ".repeat(Math.max(0, leftWidth - visibleWidth(leftClamped)));
|
|
239
|
+
const joined = `${leftClamped}${leftPad}${gapStr}${rightRaw}`;
|
|
240
|
+
out.push(truncateToWidth(joined, width, ""));
|
|
241
|
+
}
|
|
242
|
+
return { lines: out, focus: left.focus };
|
|
146
243
|
}
|
|
147
244
|
|
|
148
245
|
focusedItemRowRange(width: number): [number, number] {
|
|
@@ -151,11 +248,7 @@ export class PreviewPane implements StatefulView<PreviewPaneProps>, Component {
|
|
|
151
248
|
// `inputMode`: compute the focused row range against the FULL pane width (not the
|
|
152
249
|
// side-by-side leftWidth), mirroring `render`'s full-width option list.
|
|
153
250
|
if (this.props.inputMode) return this.optionListView.focusedItemRowRange(width);
|
|
154
|
-
|
|
155
|
-
if (mode === "stacked") return this.optionListView.focusedItemRowRange(width);
|
|
156
|
-
const adaptiveLeft = this.getAdaptiveLeft(width);
|
|
157
|
-
const { leftWidth } = columnWidths(width, adaptiveLeft);
|
|
158
|
-
return this.optionListView.focusedItemRowRange(leftWidth);
|
|
251
|
+
return this.layout(width).focus ?? [0, 1];
|
|
159
252
|
}
|
|
160
253
|
|
|
161
254
|
naturalHeight(width: number): number {
|
|
@@ -164,6 +257,7 @@ export class PreviewPane implements StatefulView<PreviewPaneProps>, Component {
|
|
|
164
257
|
// `inputMode`: height is the full-width option list only (no preview block) — preserves
|
|
165
258
|
// the `naturalHeight === render.length` parity invariant.
|
|
166
259
|
if (this.props.inputMode) return this.optionListView.render(width).length;
|
|
260
|
+
if (this.rowAllowance !== undefined) return this.layout(width).lines.length;
|
|
167
261
|
const mode = decideLayout(this.getTerminalWidth(), width);
|
|
168
262
|
const adaptiveLeft = this.getAdaptiveLeft(width);
|
|
169
263
|
const { optionsWidth, previewWidth } = bodyWidths(width, mode, adaptiveLeft);
|
|
@@ -188,30 +282,15 @@ export class PreviewPane implements StatefulView<PreviewPaneProps>, Component {
|
|
|
188
282
|
const h = this.previewBlock.blockHeight(previewWidth, i, mode);
|
|
189
283
|
if (h > maxPreviewBlock) maxPreviewBlock = h;
|
|
190
284
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
const { leftWidth, rightWidth, gap } = columnWidths(width, adaptiveLeft);
|
|
198
|
-
const leftLines = this.optionListView.render(leftWidth);
|
|
199
|
-
const rightLines = this.renderPaddedPreviewLines(rightWidth, mode);
|
|
200
|
-
const rows = Math.max(leftLines.length, rightLines.length);
|
|
201
|
-
const gapStr = " ".repeat(gap);
|
|
202
|
-
const out: string[] = [];
|
|
203
|
-
for (let i = 0; i < rows; i++) {
|
|
204
|
-
const leftRaw = leftLines[i] ?? "";
|
|
205
|
-
const rightRaw = rightLines[i] ?? "";
|
|
206
|
-
const leftClamped = truncateToWidth(leftRaw, leftWidth, "");
|
|
207
|
-
const leftPad = " ".repeat(Math.max(0, leftWidth - visibleWidth(leftClamped)));
|
|
208
|
-
const joined = `${leftClamped}${leftPad}${gapStr}${rightRaw}`;
|
|
209
|
-
out.push(truncateToWidth(joined, width, ""));
|
|
210
|
-
}
|
|
211
|
-
return out;
|
|
285
|
+
const max =
|
|
286
|
+
mode === "side-by-side"
|
|
287
|
+
? Math.max(optionsHeight, maxPreviewBlock)
|
|
288
|
+
: optionsHeight + STACKED_GAP_ROWS + maxPreviewBlock;
|
|
289
|
+
// A fitted body never exceeds the allowance, whichever option is focused.
|
|
290
|
+
return this.rowAllowance === undefined ? max : Math.min(max, this.rowAllowance);
|
|
212
291
|
}
|
|
213
292
|
|
|
214
|
-
private renderPaddedPreviewLines(colWidth: number, mode: PreviewLayoutMode): string[] {
|
|
293
|
+
private renderPaddedPreviewLines(colWidth: number, mode: PreviewLayoutMode, maxRows: number | undefined): string[] {
|
|
215
294
|
const inner = Math.max(1, colWidth - PREVIEW_PADDING_LEFT);
|
|
216
295
|
const contentLines = this.previewBlock.renderBlock(
|
|
217
296
|
inner,
|
|
@@ -219,6 +298,7 @@ export class PreviewPane implements StatefulView<PreviewPaneProps>, Component {
|
|
|
219
298
|
mode,
|
|
220
299
|
this.props.focused,
|
|
221
300
|
this.props.notesVisible,
|
|
301
|
+
maxRows,
|
|
222
302
|
);
|
|
223
303
|
const boxWidth = Math.max(1, visibleWidth(contentLines[0] ?? ""));
|
|
224
304
|
const boxAlignedPad = Math.max(PREVIEW_PADDING_LEFT, colWidth - boxWidth);
|
package/view/dialog-builder.ts
CHANGED
|
@@ -1,61 +1,34 @@
|
|
|
1
1
|
import { DynamicBorder, type Theme } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import { type Component, Container, type Editor, Spacer } from "@earendil-works/pi-tui";
|
|
3
|
-
import { DEFAULT_COLLAPSE_KEY, formatKeySpecForDisplay } from "../config.js";
|
|
4
3
|
import type { QuestionnaireState } from "../state/state.js";
|
|
5
4
|
import type { QuestionData } from "../tool/types.js";
|
|
6
5
|
import type { PreviewPaneProps } from "./components/preview/preview-pane.js";
|
|
7
6
|
import type { TabBar } from "./components/tab-bar.js";
|
|
7
|
+
import { computeScrollStart, decorateOverflow } from "./scroll-window.js";
|
|
8
8
|
import type { StatefulView } from "./stateful-view.js";
|
|
9
9
|
import type { TabComponents } from "./tab-components.js";
|
|
10
10
|
import { QuestionTabStrategy, SubmitTabStrategy, type TabContentStrategy } from "./tab-content-strategy.js";
|
|
11
11
|
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export const HINT_PART_COLLAPSE_TEMPLATE = `${KEY_PLACEHOLDER} to collapse`;
|
|
29
|
-
export const HINT_PART_EXPAND_TEMPLATE = `${KEY_PLACEHOLDER} to expand`;
|
|
30
|
-
/** Default-key (`Ctrl+]`) rendering of the collapse template, for tests and default-config assertions. */
|
|
31
|
-
export const HINT_PART_COLLAPSE = HINT_PART_COLLAPSE_TEMPLATE.replace(
|
|
12
|
+
export {
|
|
13
|
+
COLLAPSED_HINT_TEMPLATE,
|
|
14
|
+
HINT_MULTI,
|
|
15
|
+
HINT_PART_CANCEL,
|
|
16
|
+
HINT_PART_CLEAR,
|
|
17
|
+
HINT_PART_COLLAPSE,
|
|
18
|
+
HINT_PART_COLLAPSE_TEMPLATE,
|
|
19
|
+
HINT_PART_ENTER,
|
|
20
|
+
HINT_PART_EXPAND_TEMPLATE,
|
|
21
|
+
HINT_PART_NAV,
|
|
22
|
+
HINT_PART_NEW_LINE,
|
|
23
|
+
HINT_PART_NOTES,
|
|
24
|
+
HINT_PART_TAB,
|
|
25
|
+
HINT_PART_TOGGLE,
|
|
26
|
+
HINT_SINGLE,
|
|
27
|
+
INCOMPLETE_WARNING_PREFIX,
|
|
32
28
|
KEY_PLACEHOLDER,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
* `HINT_SINGLE` / `HINT_MULTI` are the resting core hint for NON-multiSelect
|
|
37
|
-
* question tabs only: `buildHintText` drops `NOTES` while the notes editor is
|
|
38
|
-
* open (`state.notesVisible`) or the "Type something." row is capturing text
|
|
39
|
-
* (`state.inputMode`), and on multiSelect tabs it interleaves `TOGGLE` between
|
|
40
|
-
* `NAV` and `NOTES`, so neither composite is a substring there — assert on
|
|
41
|
-
* `HINT_PART_*` constants in those states instead. The collapse affordance is
|
|
42
|
-
* appended AFTER cancel by `buildHintText` so the resting core stays a contiguous
|
|
43
|
-
* prefix substring of the rendered line. On narrow terminals the collapse tail
|
|
44
|
-
* clips with `…` (`OneLineClippedText`); the core is preserved.
|
|
45
|
-
*/
|
|
46
|
-
export const HINT_SINGLE = [HINT_PART_ENTER, HINT_PART_NAV, HINT_PART_NOTES, HINT_PART_CANCEL].join(" · ");
|
|
47
|
-
export const HINT_MULTI = [HINT_PART_ENTER, HINT_PART_NAV, HINT_PART_NOTES, HINT_PART_TAB, HINT_PART_CANCEL].join(
|
|
48
|
-
" · ",
|
|
49
|
-
);
|
|
50
|
-
/**
|
|
51
|
-
* Template for the single-line footer shown by `QuestionnaireSession` when
|
|
52
|
-
* `state.collapsed === true`. Bypasses `buildHintText`; the session replaces
|
|
53
|
-
* `KEY_PLACEHOLDER` with the configured key's display form.
|
|
54
|
-
*/
|
|
55
|
-
export const COLLAPSED_HINT_TEMPLATE = [HINT_PART_EXPAND_TEMPLATE, HINT_PART_CANCEL].join(" · ");
|
|
56
|
-
export const REVIEW_HEADING = "Review your answers";
|
|
57
|
-
export const READY_PROMPT = "Ready to submit your answers?";
|
|
58
|
-
export const INCOMPLETE_WARNING_PREFIX = "⚠ Answer remaining questions before submitting:";
|
|
29
|
+
READY_PROMPT,
|
|
30
|
+
REVIEW_HEADING,
|
|
31
|
+
} from "./dialog-copy.js";
|
|
59
32
|
|
|
60
33
|
/**
|
|
61
34
|
* Rows the scroll window must keep for the body before the heading (header badge +
|
|
@@ -64,10 +37,6 @@ export const INCOMPLETE_WARNING_PREFIX = "⚠ Answer remaining questions before
|
|
|
64
37
|
*/
|
|
65
38
|
const MIN_SCROLL_ROWS_WITH_PINNED_HEADING = 3;
|
|
66
39
|
|
|
67
|
-
const OVERFLOW_UP = "↑";
|
|
68
|
-
const OVERFLOW_DOWN = "↓";
|
|
69
|
-
const OVERFLOW_BOTH = "↕";
|
|
70
|
-
|
|
71
40
|
/** No-overflow path: append the residual spacer rows after the footer. */
|
|
72
41
|
function renderFitsTerminal(natural: string[], spacerRows: number): string[] {
|
|
73
42
|
return spacerRows > 0 ? [...natural, ...Array<string>(spacerRows).fill("")] : natural;
|
|
@@ -79,49 +48,6 @@ function renderChromeOnly(natural: string[], topFixed: number, bottomFixed: numb
|
|
|
79
48
|
return chromeOnly.length > termRows ? chromeOnly.slice(0, termRows) : chromeOnly;
|
|
80
49
|
}
|
|
81
50
|
|
|
82
|
-
/** Scroll window start, centered on the focused option; top-anchored when there is no interactive focus. */
|
|
83
|
-
function computeScrollStart(
|
|
84
|
-
bodyRange: [number, number] | undefined,
|
|
85
|
-
rowsBeforeBody: number,
|
|
86
|
-
availableMiddle: number,
|
|
87
|
-
middleRows: number,
|
|
88
|
-
): number {
|
|
89
|
-
if (!bodyRange) return 0;
|
|
90
|
-
const focusedRowInMiddle = rowsBeforeBody + bodyRange[0];
|
|
91
|
-
const focusedHeight = bodyRange[1] - bodyRange[0];
|
|
92
|
-
// Center the focused item vertically in the available middle space.
|
|
93
|
-
const idealStart = focusedRowInMiddle - Math.floor(Math.max(0, availableMiddle - focusedHeight) / 2);
|
|
94
|
-
return Math.max(0, Math.min(idealStart, middleRows - availableMiddle));
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Mark the scroll window edges with overflow arrows; combined ↕ on a single-row middle.
|
|
99
|
-
* An arrow replaces the row it lands on, so rows inside `protectedRows` (the focused item,
|
|
100
|
-
* in window coordinates, end-exclusive) are never drawn over — losing the affordance beats
|
|
101
|
-
* losing the row the user is on (#261).
|
|
102
|
-
*/
|
|
103
|
-
function decorateOverflow(
|
|
104
|
-
scrollableMiddle: string[],
|
|
105
|
-
hasUp: boolean,
|
|
106
|
-
hasDown: boolean,
|
|
107
|
-
theme: Theme,
|
|
108
|
-
protectedRows: readonly [number, number] | undefined,
|
|
109
|
-
): void {
|
|
110
|
-
const drawable = (row: number) => !protectedRows || row < protectedRows[0] || row >= protectedRows[1];
|
|
111
|
-
if (hasUp && hasDown && scrollableMiddle.length === 1) {
|
|
112
|
-
// Single-row middle: combined ↕ avoids the prior collision where ↓ overwrote ↑.
|
|
113
|
-
if (drawable(0)) scrollableMiddle[0] = theme.fg("dim", OVERFLOW_BOTH);
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
if (hasUp && scrollableMiddle.length > 0 && drawable(0)) {
|
|
117
|
-
scrollableMiddle[0] = theme.fg("dim", OVERFLOW_UP);
|
|
118
|
-
}
|
|
119
|
-
const last = scrollableMiddle.length - 1;
|
|
120
|
-
if (hasDown && last > 0 && drawable(last)) {
|
|
121
|
-
scrollableMiddle[last] = theme.fg("dim", OVERFLOW_DOWN);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
51
|
export type DialogState = QuestionnaireState;
|
|
126
52
|
|
|
127
53
|
/** Per-tick projection of dialog state. Written by the adapter; read by the strategy thunk. */
|
|
@@ -215,14 +141,22 @@ export class DialogView implements StatefulView<DialogProps> {
|
|
|
215
141
|
|
|
216
142
|
// Cache heading rows (avoid double construction in render and container build).
|
|
217
143
|
const headingRowCache = strategy.headingRows(state);
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
const natural = this.buildContainerFromStrategy(strategy, headingRowCache).render(width);
|
|
144
|
+
// Rendered rows, not components: a long question wraps.
|
|
145
|
+
const headingHeight = headingRowCache.reduce((rows, c) => rows + c.render(width).length, 0);
|
|
221
146
|
|
|
222
147
|
// Fixed region sizes (deterministic from structure).
|
|
223
148
|
// TabBar.render() returns [tabLine, ""] — always 2 rows.
|
|
224
149
|
const topFixed = 1 + (this.config.isMulti && this.config.tabBar ? 2 : 0) + 1;
|
|
225
150
|
const bottomFixed = 1 + strategy.footerRowCount;
|
|
151
|
+
const termRows = this.config.getTerminalRows();
|
|
152
|
+
|
|
153
|
+
this.allotBodyRows(
|
|
154
|
+
onSubmit,
|
|
155
|
+
termRows - topFixed - headingHeight - bottomFixed - this.rowsAroundBody(strategy, width),
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
// Build container WITHOUT residual spacer — spacer handled below based on overflow.
|
|
159
|
+
const natural = this.buildContainerFromStrategy(strategy, headingRowCache).render(width);
|
|
226
160
|
|
|
227
161
|
// Residual spacer: equalizes total height across tabs (only needed when no overflow).
|
|
228
162
|
const spacerRows = Math.max(
|
|
@@ -233,8 +167,6 @@ export class DialogView implements StatefulView<DialogProps> {
|
|
|
233
167
|
strategy.footerRowCount,
|
|
234
168
|
);
|
|
235
169
|
|
|
236
|
-
const termRows = this.config.getTerminalRows();
|
|
237
|
-
|
|
238
170
|
// The spacer is padding for a stable cross-tab footprint, not content: when only the
|
|
239
171
|
// padding overflows, clamp it rather than entering the scroll partition, which assumes
|
|
240
172
|
// the middle region itself is longer than the window (#260).
|
|
@@ -246,7 +178,6 @@ export class DialogView implements StatefulView<DialogProps> {
|
|
|
246
178
|
// fixed top whenever the body keeps a usable window, so the question being answered
|
|
247
179
|
// never scrolls out of view; heading height is measured in rendered rows, since a
|
|
248
180
|
// long question wraps.
|
|
249
|
-
const headingHeight = headingRowCache.reduce((rows, c) => rows + c.render(width).length, 0);
|
|
250
181
|
const pinHeading = termRows - topFixed - headingHeight - bottomFixed >= MIN_SCROLL_ROWS_WITH_PINNED_HEADING;
|
|
251
182
|
const top = pinHeading ? topFixed + headingHeight : topFixed;
|
|
252
183
|
const middleRows = natural.length - top - bottomFixed;
|
|
@@ -280,6 +211,26 @@ export class DialogView implements StatefulView<DialogProps> {
|
|
|
280
211
|
return result.length > termRows ? result.slice(0, termRows) : result;
|
|
281
212
|
}
|
|
282
213
|
|
|
214
|
+
/** Rows between the body and the bottom border: the body's trailing Spacer(1) plus any mid rows (e.g. the notes editor). */
|
|
215
|
+
private rowsAroundBody(strategy: TabContentStrategy, width: number): number {
|
|
216
|
+
return 1 + strategy.midRows(this.liveProps.state).reduce((rows, c) => rows + c.render(width).length, 0);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Hand the active question's preview pane the rows its body may use this frame, so a body
|
|
221
|
+
* taller than the space fits itself — options scroll in their column, the preview box
|
|
222
|
+
* shrinks but closes — instead of the scroll window below slicing through it (#210).
|
|
223
|
+
* Other tabs' panes are cleared so a stale allowance never skews the cross-tab height.
|
|
224
|
+
* Below `MIN_SCROLL_ROWS_WITH_PINNED_HEADING` the dialog's own scroll window takes over.
|
|
225
|
+
*/
|
|
226
|
+
private allotBodyRows(onSubmit: boolean, bodyRows: number): void {
|
|
227
|
+
const active =
|
|
228
|
+
onSubmit || bodyRows < MIN_SCROLL_ROWS_WITH_PINNED_HEADING ? undefined : this.liveProps.activePreviewPane;
|
|
229
|
+
for (const tab of this.config.tabsByIndex) {
|
|
230
|
+
tab.preview?.setRowAllowance?.(tab.preview === active ? bodyRows : undefined);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
283
234
|
private buildContainerFromStrategy(strategy: TabContentStrategy, headingRowCache: Component[]): Container {
|
|
284
235
|
const { theme, isMulti, tabBar } = this.config;
|
|
285
236
|
const state = this.liveProps.state;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { DEFAULT_COLLAPSE_KEY, formatKeySpecForDisplay } from "../config.js";
|
|
2
|
+
|
|
3
|
+
/** Leaf: imports nothing from `view/`, so `dialog-builder` and `tab-content-strategy` never form a runtime cycle (#208). */
|
|
4
|
+
|
|
5
|
+
export const HINT_PART_ENTER = "Enter to select";
|
|
6
|
+
export const HINT_PART_NAV = "↑/↓ to navigate";
|
|
7
|
+
export const HINT_PART_NEW_LINE = "Shift+Enter for newline";
|
|
8
|
+
export const HINT_PART_CLEAR = "Ctrl+U to clear";
|
|
9
|
+
export const HINT_PART_TOGGLE = "Space to toggle";
|
|
10
|
+
export const HINT_PART_NOTES = "n to add notes";
|
|
11
|
+
export const HINT_PART_TAB = "Tab to switch questions";
|
|
12
|
+
export const HINT_PART_CANCEL = "Esc to cancel";
|
|
13
|
+
/**
|
|
14
|
+
* Collapse/expand hint copy is templated on `KEY_PLACEHOLDER` because the
|
|
15
|
+
* shortcut is configurable (`collapseKey`) and `rpiv-i18n`'s `tr` has no
|
|
16
|
+
* interpolation — locale entries carry the same `{key}` placeholder and call
|
|
17
|
+
* sites `.replace()` it with `formatKeySpecForDisplay(collapseKey)` after
|
|
18
|
+
* lookup, so per-locale word order is preserved.
|
|
19
|
+
*/
|
|
20
|
+
export const KEY_PLACEHOLDER = "{key}";
|
|
21
|
+
export const HINT_PART_COLLAPSE_TEMPLATE = `${KEY_PLACEHOLDER} to collapse`;
|
|
22
|
+
export const HINT_PART_EXPAND_TEMPLATE = `${KEY_PLACEHOLDER} to expand`;
|
|
23
|
+
/** Default-key (`Ctrl+]`) rendering of the collapse template, for tests and default-config assertions. */
|
|
24
|
+
export const HINT_PART_COLLAPSE = HINT_PART_COLLAPSE_TEMPLATE.replace(
|
|
25
|
+
KEY_PLACEHOLDER,
|
|
26
|
+
formatKeySpecForDisplay(DEFAULT_COLLAPSE_KEY),
|
|
27
|
+
);
|
|
28
|
+
/**
|
|
29
|
+
* `HINT_SINGLE` / `HINT_MULTI` are the resting core hint for NON-multiSelect
|
|
30
|
+
* question tabs only: `buildHintText` drops `NOTES` while the notes editor is
|
|
31
|
+
* open (`state.notesVisible`) or the "Type something." row is capturing text
|
|
32
|
+
* (`state.inputMode`), and on multiSelect tabs it interleaves `TOGGLE` between
|
|
33
|
+
* `NAV` and `NOTES`, so neither composite is a substring there — assert on
|
|
34
|
+
* `HINT_PART_*` constants in those states instead. The collapse affordance is
|
|
35
|
+
* appended AFTER cancel by `buildHintText` so the resting core stays a contiguous
|
|
36
|
+
* prefix substring of the rendered line. On narrow terminals the collapse tail
|
|
37
|
+
* clips with `…` (`OneLineClippedText`); the core is preserved.
|
|
38
|
+
*/
|
|
39
|
+
export const HINT_SINGLE = [HINT_PART_ENTER, HINT_PART_NAV, HINT_PART_NOTES, HINT_PART_CANCEL].join(" · ");
|
|
40
|
+
export const HINT_MULTI = [HINT_PART_ENTER, HINT_PART_NAV, HINT_PART_NOTES, HINT_PART_TAB, HINT_PART_CANCEL].join(
|
|
41
|
+
" · ",
|
|
42
|
+
);
|
|
43
|
+
/**
|
|
44
|
+
* Template for the single-line footer shown by `QuestionnaireSession` when
|
|
45
|
+
* `state.collapsed === true`. Bypasses `buildHintText`; the session replaces
|
|
46
|
+
* `KEY_PLACEHOLDER` with the configured key's display form.
|
|
47
|
+
*/
|
|
48
|
+
export const COLLAPSED_HINT_TEMPLATE = [HINT_PART_EXPAND_TEMPLATE, HINT_PART_CANCEL].join(" · ");
|
|
49
|
+
export const REVIEW_HEADING = "Review your answers";
|
|
50
|
+
export const READY_PROMPT = "Ready to submit your answers?";
|
|
51
|
+
export const INCOMPLETE_WARNING_PREFIX = "⚠ Answer remaining questions before submitting:";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Scroll-window row math shared by `DialogView` (the dialog's middle region) and
|
|
5
|
+
* `PreviewPane` (an options column fitted to the row allowance the dialog gives it) —
|
|
6
|
+
* one implementation, so both windows centre, clamp and mark overflow identically.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
const OVERFLOW_UP = "↑";
|
|
10
|
+
const OVERFLOW_DOWN = "↓";
|
|
11
|
+
const OVERFLOW_BOTH = "↕";
|
|
12
|
+
|
|
13
|
+
/** Scroll window start, centered on the focused option; top-anchored when there is no interactive focus. */
|
|
14
|
+
export function computeScrollStart(
|
|
15
|
+
bodyRange: [number, number] | undefined,
|
|
16
|
+
rowsBeforeBody: number,
|
|
17
|
+
availableMiddle: number,
|
|
18
|
+
middleRows: number,
|
|
19
|
+
): number {
|
|
20
|
+
if (!bodyRange) return 0;
|
|
21
|
+
const focusedRowInMiddle = rowsBeforeBody + bodyRange[0];
|
|
22
|
+
const focusedHeight = bodyRange[1] - bodyRange[0];
|
|
23
|
+
// Center the focused item vertically in the available middle space.
|
|
24
|
+
const idealStart = focusedRowInMiddle - Math.floor(Math.max(0, availableMiddle - focusedHeight) / 2);
|
|
25
|
+
return Math.max(0, Math.min(idealStart, middleRows - availableMiddle));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Mark the scroll window edges with overflow arrows; combined ↕ on a single-row middle.
|
|
30
|
+
* An arrow replaces the row it lands on, so rows inside `protectedRows` (the focused item,
|
|
31
|
+
* in window coordinates, end-exclusive) are never drawn over — losing the affordance beats
|
|
32
|
+
* losing the row the user is on (#261).
|
|
33
|
+
*/
|
|
34
|
+
export function decorateOverflow(
|
|
35
|
+
scrollableMiddle: string[],
|
|
36
|
+
hasUp: boolean,
|
|
37
|
+
hasDown: boolean,
|
|
38
|
+
theme: Theme,
|
|
39
|
+
protectedRows: readonly [number, number] | undefined,
|
|
40
|
+
): void {
|
|
41
|
+
const drawable = (row: number) => !protectedRows || row < protectedRows[0] || row >= protectedRows[1];
|
|
42
|
+
if (hasUp && hasDown && scrollableMiddle.length === 1) {
|
|
43
|
+
// Single-row middle: combined ↕ avoids the prior collision where ↓ overwrote ↑.
|
|
44
|
+
if (drawable(0)) scrollableMiddle[0] = theme.fg("dim", OVERFLOW_BOTH);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (hasUp && scrollableMiddle.length > 0 && drawable(0)) {
|
|
48
|
+
scrollableMiddle[0] = theme.fg("dim", OVERFLOW_UP);
|
|
49
|
+
}
|
|
50
|
+
const last = scrollableMiddle.length - 1;
|
|
51
|
+
if (hasDown && last > 0 && drawable(last)) {
|
|
52
|
+
scrollableMiddle[last] = theme.fg("dim", OVERFLOW_DOWN);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Window `lines` to at most `rows` rows, centred on `focus` (end-exclusive row range),
|
|
58
|
+
* with overflow arrows that never cover the focused rows. Returns the visible lines and
|
|
59
|
+
* the focus range in window coordinates. Lines that already fit are returned unchanged.
|
|
60
|
+
*/
|
|
61
|
+
export function windowLines(
|
|
62
|
+
lines: readonly string[],
|
|
63
|
+
rows: number,
|
|
64
|
+
focus: [number, number] | undefined,
|
|
65
|
+
theme: Theme,
|
|
66
|
+
): { lines: string[]; focus: [number, number] | undefined } {
|
|
67
|
+
if (lines.length <= rows) return { lines: [...lines], focus };
|
|
68
|
+
const start = computeScrollStart(focus, 0, rows, lines.length);
|
|
69
|
+
const visible = lines.slice(start, start + rows);
|
|
70
|
+
const inWindow: [number, number] | undefined = focus && [focus[0] - start, focus[1] - start];
|
|
71
|
+
decorateOverflow(visible, start > 0, start + rows < lines.length, theme, inWindow);
|
|
72
|
+
return { lines: visible, focus: inWindow };
|
|
73
|
+
}
|
|
@@ -5,8 +5,8 @@ import { t } from "../state/i18n-bridge.js";
|
|
|
5
5
|
import { formatAnswerScalar } from "../tool/format-answer.js";
|
|
6
6
|
import type { QuestionData } from "../tool/types.js";
|
|
7
7
|
import type { PreviewPane, PreviewPaneProps } from "./components/preview/preview-pane.js";
|
|
8
|
+
import type { DialogState } from "./dialog-builder.js";
|
|
8
9
|
import {
|
|
9
|
-
type DialogState,
|
|
10
10
|
HINT_PART_CANCEL,
|
|
11
11
|
HINT_PART_CLEAR,
|
|
12
12
|
HINT_PART_COLLAPSE_TEMPLATE,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
KEY_PLACEHOLDER,
|
|
21
21
|
READY_PROMPT,
|
|
22
22
|
REVIEW_HEADING,
|
|
23
|
-
} from "./dialog-
|
|
23
|
+
} from "./dialog-copy.js";
|
|
24
24
|
import type { StatefulView } from "./stateful-view.js";
|
|
25
25
|
import type { TabComponents } from "./tab-components.js";
|
|
26
26
|
|