@timurproko/a1 0.2.7-dev.1270 → 0.2.7-dev.1276
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/README.md +6 -0
- package/dist/app/session-shell/apps-dialog.d.ts +33 -0
- package/dist/app/session-shell/apps-dialog.js +62 -0
- package/dist/app/session-shell/dialog-coordinator.d.ts +12 -5
- package/dist/app/session-shell/dialog-coordinator.js +113 -15
- package/dist/app/session-shell/input-route.d.ts +23 -0
- package/dist/app/session-shell/input-route.js +59 -0
- package/dist/app/session-shell/session-selectors.d.ts +4 -4
- package/dist/app/session-shell/session-selectors.js +8 -3
- package/dist/app/session-shell/session-shell-root.js +6 -2
- package/dist/app/session-shell/session-shell.js +13 -5
- package/dist/app/session-shell/shell-host.d.ts +1 -0
- package/dist/app/session-shell/shell-host.js +22 -11
- package/dist/app/session-shell/viewport-pointer.js +5 -1
- package/dist/app/session-shell/workflow-output.js +12 -0
- package/dist/app/session-shell/workflow-router.d.ts +2 -2
- package/dist/composition/owned-ui.js +17 -13
- package/dist/composition/settings-route-host.js +1 -0
- package/dist/contracts/owned-ui/session-presenters.d.ts +1 -1
- package/dist/contracts/owned-ui/session-workflows.d.ts +3 -1
- package/dist/contracts/owned-ui/shell-components.d.ts +12 -0
- package/dist/contracts/presentation/component.d.ts +7 -0
- package/dist/contracts/presentation/index.d.ts +2 -0
- package/dist/contracts/presentation/index.js +4 -0
- package/dist/contracts/presentation/progress-palette.generated.d.ts +25 -1
- package/dist/contracts/presentation/progress-palette.generated.js +2 -135
- package/dist/contracts/presentation/terminal.d.ts +4 -0
- package/dist/contracts/presentation/theme.d.ts +2 -0
- package/dist/features/owned-ui/project-trust-dialog.d.ts +1 -1
- package/dist/features/owned-ui/project-trust-dialog.js +5 -5
- package/dist/features/owned-ui/project-trust-prompt.js +2 -2
- package/dist/features/owned-ui/reference-screen-app.d.ts +2 -0
- package/dist/features/owned-ui/reference-screen-app.js +4 -1
- package/dist/features/owned-ui/settings-app.js +6 -6
- package/dist/features/owned-ui/settings-model-dialog.js +3 -3
- package/dist/foundation/lifecycle/user-exports.d.ts +5 -0
- package/dist/foundation/lifecycle/user-exports.js +37 -0
- package/dist/foundation/startup/startup-descriptor.js +2 -2
- package/dist/integrations/pi/components/deferred-selector.d.ts +6 -0
- package/dist/integrations/pi/components/deferred-selector.js +40 -0
- package/dist/integrations/pi/components/login-dialog-loader.d.ts +3 -0
- package/dist/integrations/pi/components/login-dialog-loader.js +57 -0
- package/dist/integrations/pi/components/login-links.d.ts +6 -0
- package/dist/integrations/pi/components/login-links.js +31 -0
- package/dist/integrations/pi/components/login-text.d.ts +7 -0
- package/dist/integrations/pi/components/login-text.js +17 -0
- package/dist/integrations/pi/components/modal-frame.d.ts +5 -0
- package/dist/integrations/pi/components/modal-frame.js +30 -2
- package/dist/integrations/pi/components/models-dialog-loader.d.ts +11 -0
- package/dist/integrations/pi/components/models-dialog-loader.js +45 -0
- package/dist/integrations/pi/components/models-dialog.d.ts +2 -0
- package/dist/integrations/pi/components/models-dialog.js +13 -7
- package/dist/integrations/pi/components/resources/builtin-themes.d.ts +2 -2
- package/dist/integrations/pi/components/resources/builtin-themes.js +2 -2
- package/dist/integrations/pi/components/shell-editor-autocomplete.js +21 -15
- package/dist/integrations/pi/components/shell-footer-status.js +3 -2
- package/dist/integrations/pi/components/shell-presenters-info.js +1 -1
- package/dist/integrations/pi/components/shell-presenters-transcript.js +3 -1
- package/dist/integrations/pi/components/shell-selectors-dialogs.d.ts +13 -9
- package/dist/integrations/pi/components/shell-selectors-dialogs.js +38 -43
- package/dist/integrations/pi/components/shell-session-info-reference.d.ts +1 -1
- package/dist/integrations/pi/components/shell-session-info-reference.js +49 -46
- package/dist/integrations/pi/components/theme.d.ts +4 -0
- package/dist/integrations/pi/components/theme.js +9 -0
- package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.d.ts +8 -7
- package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.js +13 -7
- package/dist/integrations/pi/components/upstream/assets/earendil-image.json +2 -2
- package/dist/integrations/pi/components/upstream/components/auth-url.d.ts +16 -0
- package/dist/integrations/pi/components/upstream/components/auth-url.js +49 -0
- package/dist/integrations/pi/components/upstream/components/countdown-timer.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/earendil-announcement.js +1 -1
- package/dist/integrations/pi/components/upstream/components/extension-editor.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/extension-editor.js +1 -1
- package/dist/integrations/pi/components/upstream/components/extension-input.js +1 -1
- package/dist/integrations/pi/components/upstream/components/extension-selector.d.ts +1 -0
- package/dist/integrations/pi/components/upstream/components/extension-selector.js +30 -12
- package/dist/integrations/pi/components/upstream/components/login-dialog.d.ts +3 -0
- package/dist/integrations/pi/components/upstream/components/login-dialog.js +216 -0
- package/dist/integrations/pi/components/upstream/components/mermaid.d.ts +2 -1
- package/dist/integrations/pi/components/upstream/components/mermaid.js +26 -21
- package/dist/integrations/pi/components/upstream/components/oauth-selector.d.ts +19 -0
- package/dist/integrations/pi/components/upstream/components/oauth-selector.js +123 -0
- package/dist/integrations/pi/components/upstream/components/owned-editor.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/owned-editor.js +1 -1
- package/dist/integrations/pi/components/upstream/components/pi-logo.js +1 -1
- package/dist/integrations/pi/components/upstream/components/scoped-models-selector.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/session-footer.js +17 -19
- package/dist/integrations/pi/components/upstream/components/session-selector-search.js +1 -1
- package/dist/integrations/pi/components/upstream/components/session-selector.js +1 -1
- package/dist/integrations/pi/components/upstream/components/skill-invocation-message.d.ts +6 -2
- package/dist/integrations/pi/components/upstream/components/skill-invocation-message.js +27 -3
- package/dist/integrations/pi/components/upstream/components/status-indicator.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/status-indicator.js +1 -1
- package/dist/integrations/pi/components/upstream/components/themed-text.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/themed-text.js +1 -1
- package/dist/integrations/pi/components/upstream/components/thinking-selector.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/thinking-selector.js +1 -1
- package/dist/integrations/pi/components/upstream/components/tool-execution.js +1 -1
- package/dist/integrations/pi/components/upstream/components/tree-selector.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/tree-selector.js +7 -6
- package/dist/integrations/pi/components/upstream/components/trust-selector.d.ts +2 -0
- package/dist/integrations/pi/components/upstream/components/trust-selector.js +30 -13
- package/dist/integrations/pi/components/upstream/external-editor.js +1 -1
- package/dist/integrations/pi/components/upstream/history/editor-core.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/history/editor-core.js +2 -2
- package/dist/integrations/pi/components/upstream/history/kill-ring.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/history/kill-ring.js +1 -1
- package/dist/integrations/pi/components/upstream/history/printable-key.js +1 -1
- package/dist/integrations/pi/components/upstream/history/text-helpers.js +1 -1
- package/dist/integrations/pi/components/upstream/history/undo-stack.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/history/undo-stack.js +1 -1
- package/dist/integrations/pi/components/upstream/history/word-navigation.js +1 -1
- package/dist/integrations/pi/components/upstream/model-search.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/program-status-reporter.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/theme/theme.js +1 -1
- package/dist/integrations/pi/engine/adapter.d.ts +1 -1
- package/dist/integrations/pi/engine/adapter.js +3 -3
- package/dist/integrations/pi/engine/host.d.ts +1 -1
- package/dist/integrations/pi/engine/resources/changelog.json +4 -4
- package/dist/integrations/pi/engine/workflow-export.d.ts +4 -0
- package/dist/integrations/pi/engine/workflow-export.js +25 -0
- package/dist/integrations/pi/engine/workflow-runner.d.ts +1 -0
- package/dist/integrations/pi/engine/workflow-runner.js +6 -10
- package/dist/integrations/pi/engine/workflow-support.d.ts +2 -1
- package/dist/integrations/pi/engine/workflow-support.js +28 -25
- package/dist/integrations/pi/engine/workflows.d.ts +6 -1
- package/dist/integrations/pi/engine/workflows.js +1 -1
- package/dist/integrations/pi/session-presenters/components.d.ts +1 -1
- package/dist/integrations/pi/session-presenters/components.js +8 -8
- package/dist/integrations/pi/session-presenters/presentation.js +2 -1
- package/dist/integrations/pi/session-presenters/presenters.js +24 -12
- package/dist/integrations/pi/startup-public.js +289 -240
- package/dist/integrations/pi/startup-public.manifest.json +579 -363
- package/dist/integrations/pi/tui-runtime/adapter.js +3 -1
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +1 -1
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.js +1 -1
- package/dist/integrations/pi/tui-runtime/overlay-geometry.d.ts +5 -2
- package/dist/integrations/pi/tui-runtime/overlay-geometry.js +12 -2
- package/dist/runtime-payload-inventory.json +8044 -6930
- package/dist/ui/components/dialog-panel.d.ts +4 -3
- package/dist/ui/components/dialog-panel.js +9 -13
- package/dist/ui/components/index.d.ts +1 -1
- package/dist/ui/components/index.js +1 -1
- package/dist/ui/components/list-block.d.ts +2 -2
- package/dist/ui/components/list-block.js +4 -3
- package/dist/ui/components/spans.d.ts +7 -0
- package/dist/ui/components/spans.js +63 -1
- package/dist/ui/settings/early-accent.d.ts +24 -0
- package/docs/architecture/prompt-suggestions.md +1 -1
- package/docs/architecture/ui-reference-provenance.md +2 -1
- package/docs/features/prompt-history.md +1 -1
- package/docs/features/session-exports.md +15 -0
- package/docs/local-worktree-cleanup.md +24 -0
- package/package.json +6 -6
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { MOUSE_TRACKING_OFF, MOUSE_TRACKING_ON, parseMouseInput } from "../../ui/components/mouse.js";
|
|
2
|
+
import { renderModalBackdrop } from "../../ui/components/spans.js";
|
|
3
|
+
import { padToWidth } from "../../ui/components/text.js";
|
|
2
4
|
import { readVisibleHyperlinks } from "../../ui/components/visible-hyperlinks.js";
|
|
3
5
|
import { pinnedLayoutRoot, } from "./session-shell-root.js";
|
|
4
6
|
/** The size and render request a Pi component reads from the terminal it is shown on, read on every call. */
|
|
@@ -37,7 +39,7 @@ export function sessionTerminalHostOptions(options) {
|
|
|
37
39
|
export class OwnedUiTerminalHost {
|
|
38
40
|
runtime;
|
|
39
41
|
#customViewport;
|
|
40
|
-
#
|
|
42
|
+
#presentation;
|
|
41
43
|
#damageTerminal;
|
|
42
44
|
#quitOutro;
|
|
43
45
|
#presenters = new Set();
|
|
@@ -51,7 +53,7 @@ export class OwnedUiTerminalHost {
|
|
|
51
53
|
#ending;
|
|
52
54
|
constructor(options) {
|
|
53
55
|
this.#customViewport = options.layout === "custom-viewport";
|
|
54
|
-
this.#
|
|
56
|
+
this.#presentation = options.presentation;
|
|
55
57
|
this.#quitOutro = options.quitOutro;
|
|
56
58
|
const input = options.input;
|
|
57
59
|
let damageTerminal;
|
|
@@ -73,8 +75,9 @@ export class OwnedUiTerminalHost {
|
|
|
73
75
|
mouse: false,
|
|
74
76
|
consumeUnhandledMouse: true,
|
|
75
77
|
onOverlayGeometry: surfaces => this.#active?.setOverlaySurfaces(surfaces),
|
|
78
|
+
paintModalBackdrop: renderModalBackdrop,
|
|
76
79
|
decorateTerminal: (terminal) => {
|
|
77
|
-
damageTerminal = this.#
|
|
80
|
+
damageTerminal = this.#presentation.terminalRuntime.createDamageTerminal(terminal, {
|
|
78
81
|
regionalScroll: process.env.TERM !== "dumb",
|
|
79
82
|
inspectHyperlinks: readVisibleHyperlinks,
|
|
80
83
|
onResize: () => this.#active?.noteImmediatePresentation(),
|
|
@@ -84,7 +87,7 @@ export class OwnedUiTerminalHost {
|
|
|
84
87
|
},
|
|
85
88
|
...(input?.coordination === false ? {} : {
|
|
86
89
|
inputCoordination: {
|
|
87
|
-
classify: (data, focusedOverlay) => this.#
|
|
90
|
+
classify: (data, focusedOverlay) => this.#presentation.terminalRuntime.classifyInput(data, focusedOverlay ?? this.#active?.inputCoordinationSurface() ?? "opaque"),
|
|
88
91
|
onReceipt: () => this.#active?.noteImmediatePresentation(),
|
|
89
92
|
...(input?.scheduler === undefined ? {} : { scheduler: input.scheduler }),
|
|
90
93
|
},
|
|
@@ -100,7 +103,7 @@ export class OwnedUiTerminalHost {
|
|
|
100
103
|
hardwareCursor: options.hardwareCursor,
|
|
101
104
|
...(options.wheelScrollLines === undefined ? {} : { wheelScrollLines: options.wheelScrollLines }),
|
|
102
105
|
};
|
|
103
|
-
this.runtime = this.#
|
|
106
|
+
this.runtime = this.#presentation.terminalRuntime.createRuntime(runtimeOptions);
|
|
104
107
|
this.#damageTerminal = damageTerminal ?? null;
|
|
105
108
|
const background = this.#customViewport ? options.backgroundSettings : undefined;
|
|
106
109
|
if (background !== undefined)
|
|
@@ -285,7 +288,14 @@ export class OwnedUiTerminalHost {
|
|
|
285
288
|
#showOverlay(presenter, component, options) {
|
|
286
289
|
const owned = this.#overlays.get(presenter) ?? new Set();
|
|
287
290
|
this.#overlays.set(presenter, owned);
|
|
288
|
-
const overlay = new PresenterOverlay(this.runtime.showOverlay(
|
|
291
|
+
const overlay = new PresenterOverlay(this.runtime.showOverlay(this.#customViewport && options?.modal ? {
|
|
292
|
+
...component,
|
|
293
|
+
render: width => component.render(width).map(line => (this.#presentation.floatingDialogSurface ?? (text => text))(`\u001b[22;39;49m${padToWidth(line, width)}`)),
|
|
294
|
+
invalidate: () => component.invalidate(),
|
|
295
|
+
handleInput: data => component.handleInput?.(data),
|
|
296
|
+
setFocused: focused => component.setFocused?.(focused),
|
|
297
|
+
dispose: () => component.dispose?.(),
|
|
298
|
+
} : component, options), () => this.#active === presenter, () => owned.delete(overlay));
|
|
289
299
|
overlay.syncVisibility();
|
|
290
300
|
owned.add(overlay);
|
|
291
301
|
return overlay;
|
|
@@ -338,6 +348,7 @@ export class OwnedUiTerminalHost {
|
|
|
338
348
|
closed = true;
|
|
339
349
|
removeSurfacePreInput();
|
|
340
350
|
removeInterruptWatch();
|
|
351
|
+
surface.close();
|
|
341
352
|
this.#setPointerReporting(false);
|
|
342
353
|
overlay?.hide();
|
|
343
354
|
if (notify)
|
|
@@ -345,7 +356,7 @@ export class OwnedUiTerminalHost {
|
|
|
345
356
|
};
|
|
346
357
|
removeInterruptWatch = runtime.addInputListener(data => {
|
|
347
358
|
// Compatibility: a kitty-keyboard child reports Ctrl+C as a CSI-u sequence rather than the byte.
|
|
348
|
-
if (!attached() || !data.includes(INTERRUPT) && this.#
|
|
359
|
+
if (!attached() || overlay?.isFocused() !== true || !data.includes(INTERRUPT) && this.#presentation.terminalRuntime.legacyKeyInput(data) !== INTERRUPT)
|
|
349
360
|
return undefined;
|
|
350
361
|
// Protocol: route hosts decide whether one interrupt closes their app. Raw-input forwarding
|
|
351
362
|
// is required because Pi handles Ctrl+C before the fullscreen overlay receives normal input.
|
|
@@ -378,7 +389,7 @@ export class OwnedUiTerminalHost {
|
|
|
378
389
|
// at the pre-input boundary so dropdowns, value hover, and numeric +/- work,
|
|
379
390
|
// and consume even unhandled reports so settings content is never selected.
|
|
380
391
|
const routeMouse = data => {
|
|
381
|
-
if (!attached())
|
|
392
|
+
if (!attached() || overlay?.isFocused() !== true)
|
|
382
393
|
return undefined;
|
|
383
394
|
const { events, rest } = parseMouseInput(data);
|
|
384
395
|
if (events.length === 0)
|
|
@@ -404,7 +415,7 @@ export class OwnedUiTerminalHost {
|
|
|
404
415
|
for (const event of events)
|
|
405
416
|
surface.handleMouse(event);
|
|
406
417
|
// Invariant: owned screens see legacy key bytes whether the terminal reports legacy or kitty keys.
|
|
407
|
-
const key = rest.length > 0 ? this.#
|
|
418
|
+
const key = rest.length > 0 ? this.#presentation.terminalRuntime.legacyKeyInput(rest) : "";
|
|
408
419
|
if (key.length > 0)
|
|
409
420
|
surface.handleInput(key);
|
|
410
421
|
if (surface.isClosed()) {
|
|
@@ -426,7 +437,7 @@ export class OwnedUiTerminalHost {
|
|
|
426
437
|
anchor: "top-left",
|
|
427
438
|
inputCoordination: "owned",
|
|
428
439
|
});
|
|
429
|
-
return { hide: () => closeSurface(false) };
|
|
440
|
+
return { hide: () => closeSurface(false), close: () => closeSurface(true) };
|
|
430
441
|
}
|
|
431
442
|
// Invariant: the snapshot is synchronous; the outro module itself loads only at quit.
|
|
432
443
|
#captureQuitOutroFrame() {
|
|
@@ -472,7 +483,7 @@ export class OwnedUiTerminalHost {
|
|
|
472
483
|
write: data => this.runtime.writeControl(data),
|
|
473
484
|
...(capture.settings.canvasBackgroundAnsi === null
|
|
474
485
|
? {}
|
|
475
|
-
: { canvas: { ansi: capture.settings.canvasBackgroundAnsi, rebase: this.#
|
|
486
|
+
: { canvas: { ansi: capture.settings.canvasBackgroundAnsi, rebase: this.#presentation.terminalRuntime.rebaseDefaultBackground } }),
|
|
476
487
|
...(outro.now === undefined ? {} : { now: outro.now }),
|
|
477
488
|
...(outro.sleep === undefined ? {} : { sleep: outro.sleep }),
|
|
478
489
|
...(outro.seed === undefined ? {} : { seed: outro.seed }),
|
|
@@ -110,7 +110,11 @@ export class ViewportPointerGestures {
|
|
|
110
110
|
viewport.setRailHovered(false);
|
|
111
111
|
viewport.setStickyHovered(false);
|
|
112
112
|
this.#position = undefined;
|
|
113
|
-
owner.component.
|
|
113
|
+
if (owner.component.handleLocalMouse !== undefined) {
|
|
114
|
+
owner.component.handleLocalMouse({ ...event, column: event.column - owner.columnStart + 1, row: event.row - owner.rowStart + 1 });
|
|
115
|
+
}
|
|
116
|
+
else
|
|
117
|
+
owner.component.handleInput?.(report);
|
|
114
118
|
outcome.repaint = true;
|
|
115
119
|
return true;
|
|
116
120
|
}
|
|
@@ -53,6 +53,18 @@ export class WorkflowOutput {
|
|
|
53
53
|
this.#appendAnchored(width => this.#ports.components.info.commandMessage(presentation, width, this.#ports.outputPad()));
|
|
54
54
|
}
|
|
55
55
|
appendResult(result, errorCode) {
|
|
56
|
+
// Rationale: model state already repaints the footer; only actionable diagnostics need another surface.
|
|
57
|
+
if (this.#ports.customViewport && result.outcome === "completed"
|
|
58
|
+
&& result.presentation?.kind === "model-change") {
|
|
59
|
+
for (const message of result.messages ?? []) {
|
|
60
|
+
if (message.kind !== "status")
|
|
61
|
+
this.appendMessage(message, errorCode);
|
|
62
|
+
}
|
|
63
|
+
if (result.messages === undefined && (result.messageKind === "warning" || result.messageKind === "error")) {
|
|
64
|
+
this.appendMessage({ kind: result.messageKind, message: result.message }, errorCode);
|
|
65
|
+
}
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
56
68
|
if (result.messages !== undefined) {
|
|
57
69
|
for (const message of result.messages)
|
|
58
70
|
this.appendMessage(message, errorCode);
|
|
@@ -2,11 +2,11 @@ import type { OwnedUiCommandResult, OwnedUiWorkflowRequest } from "../../contrac
|
|
|
2
2
|
/** The owned selectors a workflow can open in place of asking the engine to choose. */
|
|
3
3
|
export interface WorkflowSelectors {
|
|
4
4
|
showScopedModelsSelector(): void;
|
|
5
|
-
showModelsDialog(initialQuery?: string): void
|
|
5
|
+
showModelsDialog(initialQuery?: string): void | Promise<void>;
|
|
6
6
|
showModelSelector(initialSearchInput?: string): void;
|
|
7
7
|
showForkSelector(): void;
|
|
8
8
|
showThinkingSelector(): Promise<void>;
|
|
9
|
-
showTrustSelector(): void
|
|
9
|
+
showTrustSelector(): void | Promise<void>;
|
|
10
10
|
showSettingsSelector(): void;
|
|
11
11
|
showSessionSelector(): Promise<void>;
|
|
12
12
|
showLoginAuthTypeSelector(): void;
|
|
@@ -44,21 +44,9 @@ export async function composeOwnedUi(options = {}) {
|
|
|
44
44
|
});
|
|
45
45
|
// Invariant: bare A1 owns the settings-driven ports; the comparison profile receives none of them.
|
|
46
46
|
const bareSettings = bare ? settings : null;
|
|
47
|
-
const projectTrustPrompt = options.projectTrustPrompt;
|
|
48
47
|
// Invariant: process-wide engine state has one owner. The host installs the HTTP dispatcher, applies
|
|
49
48
|
// the theme singletons, and announces startup notices once; every session is created through it.
|
|
50
|
-
const host = await (options.createEngineHost ?? (
|
|
51
|
-
productMode,
|
|
52
|
-
availableThemes: () => getAvailablePiThemes().map(theme => theme.name),
|
|
53
|
-
announceStartupChangelog: !bare,
|
|
54
|
-
theme: {
|
|
55
|
-
base: bare ? "dark" : "engine-configured",
|
|
56
|
-
accentColor: bareSettings?.value("accentColor") ?? "purple",
|
|
57
|
-
packageBorderProjection: bare,
|
|
58
|
-
apply: { base: applyConfiguredPiTheme, accentColor: setPiAccentColor, packageBorderProjection: setPiPackageBorderProjectionEnabled },
|
|
59
|
-
},
|
|
60
|
-
...(projectTrustPrompt === undefined ? {} : { projectTrustPrompt }),
|
|
61
|
-
});
|
|
49
|
+
const host = await (options.createEngineHost ?? createPiEngineHost)(engineHostOptions(options, productMode, bareSettings));
|
|
62
50
|
const sessionForkPrompt = options.sessionForkPrompt;
|
|
63
51
|
try {
|
|
64
52
|
backend = await host.create({
|
|
@@ -247,6 +235,22 @@ function bareShellPorts(settings, generator, diagnostics) {
|
|
|
247
235
|
},
|
|
248
236
|
};
|
|
249
237
|
}
|
|
238
|
+
function engineHostOptions(options, productMode, settings) {
|
|
239
|
+
const bare = productMode === "bare";
|
|
240
|
+
return {
|
|
241
|
+
productMode,
|
|
242
|
+
availableThemes: () => getAvailablePiThemes().map(theme => theme.name),
|
|
243
|
+
...(bare ? { workflowHost: { reserveExport: async (id, format) => (await import("../foundation/lifecycle/user-exports.js")).reserveUserExport(id, format) } } : {}),
|
|
244
|
+
announceStartupChangelog: !bare,
|
|
245
|
+
theme: {
|
|
246
|
+
base: bare ? "dark" : "engine-configured",
|
|
247
|
+
accentColor: settings?.value("accentColor") ?? "purple",
|
|
248
|
+
packageBorderProjection: bare,
|
|
249
|
+
apply: { base: applyConfiguredPiTheme, accentColor: setPiAccentColor, packageBorderProjection: setPiPackageBorderProjectionEnabled },
|
|
250
|
+
},
|
|
251
|
+
...(options.projectTrustPrompt === undefined ? {} : { projectTrustPrompt: options.projectTrustPrompt }),
|
|
252
|
+
};
|
|
253
|
+
}
|
|
250
254
|
async function createPromptHistoryConfiguration(settings, backend, bare) {
|
|
251
255
|
const limit = settings?.value("promptHistoryMaxItems") ?? 100;
|
|
252
256
|
const scope = settings?.value("promptHistoryScope") ?? "unique";
|
|
@@ -92,6 +92,7 @@ async function loadReferenceSurface(settings, route, title, document, options) {
|
|
|
92
92
|
id,
|
|
93
93
|
title,
|
|
94
94
|
document: content,
|
|
95
|
+
...(route === "session" ? { presentation: "dialog" } : {}),
|
|
95
96
|
scrollSettings: () => ({
|
|
96
97
|
scrollbarAppearance: settings.value("scrollbarAppearance"),
|
|
97
98
|
scrollbarStyle: settings.value("scrollbarStyle"),
|
|
@@ -80,6 +80,6 @@ export interface OwnedUiSessionPresenters {
|
|
|
80
80
|
/** `navigate` completes a selection that leaves the current leaf, including any summary prompt. */
|
|
81
81
|
openTreeSelector(host: OwnedUiDialogHost, navigate: (entryId: string, skipSummaryPrompt: boolean) => void, initialSelectedId?: string): Promise<void>;
|
|
82
82
|
openSettingsSelector(host: OwnedUiDialogHost): void;
|
|
83
|
-
openModelsDialog(host: OwnedUiDialogHost, initialQuery?: string): void
|
|
83
|
+
openModelsDialog(host: OwnedUiDialogHost, initialQuery?: string): void | Promise<void>;
|
|
84
84
|
openScopedModelsSelector(host: OwnedUiDialogHost): void;
|
|
85
85
|
}
|
|
@@ -108,7 +108,9 @@ export interface OwnedUiCacheWarmingPresentation {
|
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
export type OwnedUiWorkflowPresentation = OwnedUiSessionInfoPresentation
|
|
111
|
+
export type OwnedUiWorkflowPresentation = OwnedUiSessionInfoPresentation | {
|
|
112
|
+
readonly kind: "model-change";
|
|
113
|
+
};
|
|
112
114
|
export type OwnedUiWorkflowMessageKind = "status" | "warning" | "error" | "accent" | "silent";
|
|
113
115
|
export interface OwnedUiWorkflowMessage {
|
|
114
116
|
readonly kind: Exclude<OwnedUiWorkflowMessageKind, "silent">;
|
|
@@ -14,9 +14,19 @@ export interface OwnedUiShellKeybindingsHost {
|
|
|
14
14
|
reload(): void;
|
|
15
15
|
}
|
|
16
16
|
export interface OwnedUiShellComponentPort {
|
|
17
|
+
readonly ready?: Promise<void>;
|
|
17
18
|
render(width: number): readonly string[];
|
|
19
|
+
/** Bounds scrollable replacement inputs within the dock. */
|
|
20
|
+
renderInDock?(width: number, maxHeight: number): readonly string[];
|
|
18
21
|
invalidate(): void;
|
|
19
22
|
handleInput?(data: string): void;
|
|
23
|
+
/** Pointer input in one-based component-local coordinates, when supported. */
|
|
24
|
+
handleLocalMouse?(event: {
|
|
25
|
+
readonly kind: "press" | "release" | "motion" | "wheel-up" | "wheel-down";
|
|
26
|
+
readonly button: number;
|
|
27
|
+
readonly column: number;
|
|
28
|
+
readonly row: number;
|
|
29
|
+
}): void;
|
|
20
30
|
setFocused?(focused: boolean): void;
|
|
21
31
|
dispose?(): void;
|
|
22
32
|
}
|
|
@@ -53,6 +63,8 @@ export interface OwnedUiShellEditorPort extends OwnedUiShellComponentPort {
|
|
|
53
63
|
/** Restores the shared keybindings if anything replaced the active registry; a no-op when it is already active. */
|
|
54
64
|
activateKeybindings(): void;
|
|
55
65
|
keybindingConfig(): OwnedUiShellKeybindings;
|
|
66
|
+
/** Resolves application-host actions against the same active declarations as editor dispatch. */
|
|
67
|
+
matchesAction?(data: string, action: "owned.apps.open"): boolean;
|
|
56
68
|
reloadKeybindings(): void;
|
|
57
69
|
/** Uses the vendor's terminal decoder rather than assuming one terminal escape spelling. */
|
|
58
70
|
matchesTerminalKey(data: string, key: "home" | "end" | "pageUp" | "pageDown" | "ctrl+home" | "ctrl+end" | "alt+home" | "ctrl+v"): boolean;
|
|
@@ -2,6 +2,13 @@ export interface PresentationComponentPort {
|
|
|
2
2
|
render(width: number): readonly string[];
|
|
3
3
|
invalidate(): void;
|
|
4
4
|
handleInput?(data: string): void;
|
|
5
|
+
/** Optional pointer input in one-based component-local coordinates. */
|
|
6
|
+
handleLocalMouse?(event: {
|
|
7
|
+
readonly kind: "press" | "release" | "motion" | "wheel-up" | "wheel-down";
|
|
8
|
+
readonly button: number;
|
|
9
|
+
readonly column: number;
|
|
10
|
+
readonly row: number;
|
|
11
|
+
}): void;
|
|
5
12
|
setFocused?(focused: boolean): void;
|
|
6
13
|
dispose?(): void;
|
|
7
14
|
}
|
|
@@ -22,6 +22,8 @@ export declare const DIALOG_BACK_SHORTCUT_HINT: Readonly<{
|
|
|
22
22
|
}>;
|
|
23
23
|
/** Global inset inherited by every semantic row inside an A1-owned dialog frame. */
|
|
24
24
|
export declare const DIALOG_CONTENT_PADDING_X = 1;
|
|
25
|
+
/** Wraps choice navigation, leaving empty lists at a safe index. */
|
|
26
|
+
export declare function wrapChoiceIndex(index: number, delta: number, count: number): number;
|
|
25
27
|
export interface DialogFrameGeometry {
|
|
26
28
|
readonly frameWidth: number;
|
|
27
29
|
readonly contentPaddingX: number;
|
|
@@ -6,6 +6,10 @@ export const DIALOG_CLOSE_SHORTCUT_HINT = Object.freeze({ key: "esc", action: "c
|
|
|
6
6
|
export const DIALOG_BACK_SHORTCUT_HINT = Object.freeze({ key: "esc", action: "back" });
|
|
7
7
|
/** Global inset inherited by every semantic row inside an A1-owned dialog frame. */
|
|
8
8
|
export const DIALOG_CONTENT_PADDING_X = 1;
|
|
9
|
+
/** Wraps choice navigation, leaving empty lists at a safe index. */
|
|
10
|
+
export function wrapChoiceIndex(index, delta, count) {
|
|
11
|
+
return count > 0 ? ((index + delta) % count + count) % count : 0;
|
|
12
|
+
}
|
|
9
13
|
/** Shared full-width-rule/content-width geometry for string and component dialog renderers. */
|
|
10
14
|
export function dialogFrameGeometry(width) {
|
|
11
15
|
const frameWidth = Math.max(0, width);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generated by scripts/pi/sync-progress-palette.ts from A1's named accent projection
|
|
3
|
-
* over pinned Pi 1.5.
|
|
3
|
+
* over pinned Pi 1.5.1 (MIT), commit dd30101cfc5b0609411dd80b6f93adbc14db14cf. Do not edit directly.
|
|
4
4
|
*/
|
|
5
5
|
export declare const SHARED_PROGRESS_PALETTE: Readonly<{
|
|
6
6
|
blue: {
|
|
@@ -8,20 +8,24 @@ export declare const SHARED_PROGRESS_PALETTE: Readonly<{
|
|
|
8
8
|
truecolor: {
|
|
9
9
|
accent: string;
|
|
10
10
|
border: string;
|
|
11
|
+
selectedBg: string;
|
|
11
12
|
};
|
|
12
13
|
"256color": {
|
|
13
14
|
accent: string;
|
|
14
15
|
border: string;
|
|
16
|
+
selectedBg: string;
|
|
15
17
|
};
|
|
16
18
|
};
|
|
17
19
|
light: {
|
|
18
20
|
truecolor: {
|
|
19
21
|
accent: string;
|
|
20
22
|
border: string;
|
|
23
|
+
selectedBg: string;
|
|
21
24
|
};
|
|
22
25
|
"256color": {
|
|
23
26
|
accent: string;
|
|
24
27
|
border: string;
|
|
28
|
+
selectedBg: string;
|
|
25
29
|
};
|
|
26
30
|
};
|
|
27
31
|
};
|
|
@@ -30,20 +34,24 @@ export declare const SHARED_PROGRESS_PALETTE: Readonly<{
|
|
|
30
34
|
truecolor: {
|
|
31
35
|
accent: string;
|
|
32
36
|
border: string;
|
|
37
|
+
selectedBg: string;
|
|
33
38
|
};
|
|
34
39
|
"256color": {
|
|
35
40
|
accent: string;
|
|
36
41
|
border: string;
|
|
42
|
+
selectedBg: string;
|
|
37
43
|
};
|
|
38
44
|
};
|
|
39
45
|
light: {
|
|
40
46
|
truecolor: {
|
|
41
47
|
accent: string;
|
|
42
48
|
border: string;
|
|
49
|
+
selectedBg: string;
|
|
43
50
|
};
|
|
44
51
|
"256color": {
|
|
45
52
|
accent: string;
|
|
46
53
|
border: string;
|
|
54
|
+
selectedBg: string;
|
|
47
55
|
};
|
|
48
56
|
};
|
|
49
57
|
};
|
|
@@ -52,20 +60,24 @@ export declare const SHARED_PROGRESS_PALETTE: Readonly<{
|
|
|
52
60
|
truecolor: {
|
|
53
61
|
accent: string;
|
|
54
62
|
border: string;
|
|
63
|
+
selectedBg: string;
|
|
55
64
|
};
|
|
56
65
|
"256color": {
|
|
57
66
|
accent: string;
|
|
58
67
|
border: string;
|
|
68
|
+
selectedBg: string;
|
|
59
69
|
};
|
|
60
70
|
};
|
|
61
71
|
light: {
|
|
62
72
|
truecolor: {
|
|
63
73
|
accent: string;
|
|
64
74
|
border: string;
|
|
75
|
+
selectedBg: string;
|
|
65
76
|
};
|
|
66
77
|
"256color": {
|
|
67
78
|
accent: string;
|
|
68
79
|
border: string;
|
|
80
|
+
selectedBg: string;
|
|
69
81
|
};
|
|
70
82
|
};
|
|
71
83
|
};
|
|
@@ -74,20 +86,24 @@ export declare const SHARED_PROGRESS_PALETTE: Readonly<{
|
|
|
74
86
|
truecolor: {
|
|
75
87
|
accent: string;
|
|
76
88
|
border: string;
|
|
89
|
+
selectedBg: string;
|
|
77
90
|
};
|
|
78
91
|
"256color": {
|
|
79
92
|
accent: string;
|
|
80
93
|
border: string;
|
|
94
|
+
selectedBg: string;
|
|
81
95
|
};
|
|
82
96
|
};
|
|
83
97
|
light: {
|
|
84
98
|
truecolor: {
|
|
85
99
|
accent: string;
|
|
86
100
|
border: string;
|
|
101
|
+
selectedBg: string;
|
|
87
102
|
};
|
|
88
103
|
"256color": {
|
|
89
104
|
accent: string;
|
|
90
105
|
border: string;
|
|
106
|
+
selectedBg: string;
|
|
91
107
|
};
|
|
92
108
|
};
|
|
93
109
|
};
|
|
@@ -96,20 +112,24 @@ export declare const SHARED_PROGRESS_PALETTE: Readonly<{
|
|
|
96
112
|
truecolor: {
|
|
97
113
|
accent: string;
|
|
98
114
|
border: string;
|
|
115
|
+
selectedBg: string;
|
|
99
116
|
};
|
|
100
117
|
"256color": {
|
|
101
118
|
accent: string;
|
|
102
119
|
border: string;
|
|
120
|
+
selectedBg: string;
|
|
103
121
|
};
|
|
104
122
|
};
|
|
105
123
|
light: {
|
|
106
124
|
truecolor: {
|
|
107
125
|
accent: string;
|
|
108
126
|
border: string;
|
|
127
|
+
selectedBg: string;
|
|
109
128
|
};
|
|
110
129
|
"256color": {
|
|
111
130
|
accent: string;
|
|
112
131
|
border: string;
|
|
132
|
+
selectedBg: string;
|
|
113
133
|
};
|
|
114
134
|
};
|
|
115
135
|
};
|
|
@@ -118,20 +138,24 @@ export declare const SHARED_PROGRESS_PALETTE: Readonly<{
|
|
|
118
138
|
truecolor: {
|
|
119
139
|
accent: string;
|
|
120
140
|
border: string;
|
|
141
|
+
selectedBg: string;
|
|
121
142
|
};
|
|
122
143
|
"256color": {
|
|
123
144
|
accent: string;
|
|
124
145
|
border: string;
|
|
146
|
+
selectedBg: string;
|
|
125
147
|
};
|
|
126
148
|
};
|
|
127
149
|
light: {
|
|
128
150
|
truecolor: {
|
|
129
151
|
accent: string;
|
|
130
152
|
border: string;
|
|
153
|
+
selectedBg: string;
|
|
131
154
|
};
|
|
132
155
|
"256color": {
|
|
133
156
|
accent: string;
|
|
134
157
|
border: string;
|
|
158
|
+
selectedBg: string;
|
|
135
159
|
};
|
|
136
160
|
};
|
|
137
161
|
};
|
|
@@ -1,139 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generated by scripts/pi/sync-progress-palette.ts from A1's named accent projection
|
|
3
|
-
* over pinned Pi 1.5.
|
|
3
|
+
* over pinned Pi 1.5.1 (MIT), commit dd30101cfc5b0609411dd80b6f93adbc14db14cf. Do not edit directly.
|
|
4
4
|
*/
|
|
5
|
-
export const SHARED_PROGRESS_PALETTE = Object.freeze({
|
|
6
|
-
"blue": {
|
|
7
|
-
"dark": {
|
|
8
|
-
"truecolor": {
|
|
9
|
-
"accent": "\u001b[38;2;130;160;241m",
|
|
10
|
-
"border": "\u001b[38;2;116;102;197m"
|
|
11
|
-
},
|
|
12
|
-
"256color": {
|
|
13
|
-
"accent": "\u001b[38;5;111m",
|
|
14
|
-
"border": "\u001b[38;5;98m"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"light": {
|
|
18
|
-
"truecolor": {
|
|
19
|
-
"accent": "\u001b[38;2;63;96;226m",
|
|
20
|
-
"border": "\u001b[38;2;83;67;154m"
|
|
21
|
-
},
|
|
22
|
-
"256color": {
|
|
23
|
-
"accent": "\u001b[38;5;62m",
|
|
24
|
-
"border": "\u001b[38;5;60m"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"purple": {
|
|
29
|
-
"dark": {
|
|
30
|
-
"truecolor": {
|
|
31
|
-
"accent": "\u001b[38;2;167;152;215m",
|
|
32
|
-
"border": "\u001b[38;2;105;115;167m"
|
|
33
|
-
},
|
|
34
|
-
"256color": {
|
|
35
|
-
"accent": "\u001b[38;5;140m",
|
|
36
|
-
"border": "\u001b[38;5;61m"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"light": {
|
|
40
|
-
"truecolor": {
|
|
41
|
-
"accent": "\u001b[38;2;116;89;180m",
|
|
42
|
-
"border": "\u001b[38;2;68;77;130m"
|
|
43
|
-
},
|
|
44
|
-
"256color": {
|
|
45
|
-
"accent": "\u001b[38;5;97m",
|
|
46
|
-
"border": "\u001b[38;5;60m"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"cyan": {
|
|
51
|
-
"dark": {
|
|
52
|
-
"truecolor": {
|
|
53
|
-
"accent": "\u001b[38;2;93;179;186m",
|
|
54
|
-
"border": "\u001b[38;2;74;128;146m"
|
|
55
|
-
},
|
|
56
|
-
"256color": {
|
|
57
|
-
"accent": "\u001b[38;5;73m",
|
|
58
|
-
"border": "\u001b[38;5;66m"
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
"light": {
|
|
62
|
-
"truecolor": {
|
|
63
|
-
"accent": "\u001b[38;2;40;122;129m",
|
|
64
|
-
"border": "\u001b[38;2;40;89;106m"
|
|
65
|
-
},
|
|
66
|
-
"256color": {
|
|
67
|
-
"accent": "\u001b[38;5;30m",
|
|
68
|
-
"border": "\u001b[38;5;23m"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
"green": {
|
|
73
|
-
"dark": {
|
|
74
|
-
"truecolor": {
|
|
75
|
-
"accent": "\u001b[38;2;104;183;141m",
|
|
76
|
-
"border": "\u001b[38;2;75;132;120m"
|
|
77
|
-
},
|
|
78
|
-
"256color": {
|
|
79
|
-
"accent": "\u001b[38;5;72m",
|
|
80
|
-
"border": "\u001b[38;5;66m"
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
"light": {
|
|
84
|
-
"truecolor": {
|
|
85
|
-
"accent": "\u001b[38;2;51;126;88m",
|
|
86
|
-
"border": "\u001b[38;2;41;93;82m"
|
|
87
|
-
},
|
|
88
|
-
"256color": {
|
|
89
|
-
"accent": "\u001b[38;5;65m",
|
|
90
|
-
"border": "\u001b[38;5;23m"
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
"orange": {
|
|
95
|
-
"dark": {
|
|
96
|
-
"truecolor": {
|
|
97
|
-
"accent": "\u001b[38;2;231;135;83m",
|
|
98
|
-
"border": "\u001b[38;2;178;89;79m"
|
|
99
|
-
},
|
|
100
|
-
"256color": {
|
|
101
|
-
"accent": "\u001b[38;5;173m",
|
|
102
|
-
"border": "\u001b[38;5;131m"
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
"light": {
|
|
106
|
-
"truecolor": {
|
|
107
|
-
"accent": "\u001b[38;2;174;80;16m",
|
|
108
|
-
"border": "\u001b[38;2;133;57;49m"
|
|
109
|
-
},
|
|
110
|
-
"256color": {
|
|
111
|
-
"accent": "\u001b[38;5;130m",
|
|
112
|
-
"border": "\u001b[38;5;95m"
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
"pink": {
|
|
117
|
-
"dark": {
|
|
118
|
-
"truecolor": {
|
|
119
|
-
"accent": "\u001b[38;2;223;122;199m",
|
|
120
|
-
"border": "\u001b[38;2;150;91;171m"
|
|
121
|
-
},
|
|
122
|
-
"256color": {
|
|
123
|
-
"accent": "\u001b[38;5;176m",
|
|
124
|
-
"border": "\u001b[38;5;97m"
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
"light": {
|
|
128
|
-
"truecolor": {
|
|
129
|
-
"accent": "\u001b[38;2;178;56;153m",
|
|
130
|
-
"border": "\u001b[38;2;114;61;131m"
|
|
131
|
-
},
|
|
132
|
-
"256color": {
|
|
133
|
-
"accent": "\u001b[38;5;132m",
|
|
134
|
-
"border": "\u001b[38;5;60m"
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
});
|
|
5
|
+
export const SHARED_PROGRESS_PALETTE = Object.freeze({ "blue": { "dark": { "truecolor": { "accent": "\u001b[38;2;130;160;241m", "border": "\u001b[38;2;116;102;197m", "selectedBg": "\u001b[48;2;52;57;69m" }, "256color": { "accent": "\u001b[38;5;111m", "border": "\u001b[38;5;98m", "selectedBg": "\u001b[48;5;59m" } }, "light": { "truecolor": { "accent": "\u001b[38;2;63;96;226m", "border": "\u001b[38;2;83;67;154m", "selectedBg": "\u001b[48;2;243;244;246m" }, "256color": { "accent": "\u001b[38;5;62m", "border": "\u001b[38;5;60m", "selectedBg": "\u001b[48;5;255m" } } }, "purple": { "dark": { "truecolor": { "accent": "\u001b[38;2;167;152;215m", "border": "\u001b[38;2;105;115;167m", "selectedBg": "\u001b[48;2;58;56;66m" }, "256color": { "accent": "\u001b[38;5;140m", "border": "\u001b[38;5;61m", "selectedBg": "\u001b[48;5;59m" } }, "light": { "truecolor": { "accent": "\u001b[38;2;116;89;180m", "border": "\u001b[38;2;68;77;130m", "selectedBg": "\u001b[48;2;243;243;245m" }, "256color": { "accent": "\u001b[38;5;97m", "border": "\u001b[38;5;60m", "selectedBg": "\u001b[48;5;255m" } } }, "cyan": { "dark": { "truecolor": { "accent": "\u001b[38;2;93;179;186m", "border": "\u001b[38;2;74;128;146m", "selectedBg": "\u001b[48;2;48;60;61m" }, "256color": { "accent": "\u001b[38;5;73m", "border": "\u001b[38;5;66m", "selectedBg": "\u001b[48;5;59m" } }, "light": { "truecolor": { "accent": "\u001b[38;2;40;122;129m", "border": "\u001b[38;2;40;89;106m", "selectedBg": "\u001b[48;2;241;244;244m" }, "256color": { "accent": "\u001b[38;5;30m", "border": "\u001b[38;5;23m", "selectedBg": "\u001b[48;5;255m" } } }, "green": { "dark": { "truecolor": { "accent": "\u001b[38;2;104;183;141m", "border": "\u001b[38;2;75;132;120m", "selectedBg": "\u001b[48;2;50;60;54m" }, "256color": { "accent": "\u001b[38;5;72m", "border": "\u001b[38;5;66m", "selectedBg": "\u001b[48;5;59m" } }, "light": { "truecolor": { "accent": "\u001b[38;2;51;126;88m", "border": "\u001b[38;2;41;93;82m", "selectedBg": "\u001b[48;2;242;244;243m" }, "256color": { "accent": "\u001b[38;5;65m", "border": "\u001b[38;5;23m", "selectedBg": "\u001b[48;5;255m" } } }, "orange": { "dark": { "truecolor": { "accent": "\u001b[38;2;231;135;83m", "border": "\u001b[38;2;178;89;79m", "selectedBg": "\u001b[48;2;67;54;48m" }, "256color": { "accent": "\u001b[38;5;173m", "border": "\u001b[38;5;131m", "selectedBg": "\u001b[48;5;59m" } }, "light": { "truecolor": { "accent": "\u001b[38;2;174;80;16m", "border": "\u001b[38;2;133;57;49m", "selectedBg": "\u001b[48;2;245;243;242m" }, "256color": { "accent": "\u001b[38;5;130m", "border": "\u001b[38;5;95m", "selectedBg": "\u001b[48;5;255m" } } }, "pink": { "dark": { "truecolor": { "accent": "\u001b[38;2;223;122;199m", "border": "\u001b[38;2;150;91;171m", "selectedBg": "\u001b[48;2;65;53;62m" }, "256color": { "accent": "\u001b[38;5;176m", "border": "\u001b[38;5;97m", "selectedBg": "\u001b[48;5;59m" } }, "light": { "truecolor": { "accent": "\u001b[38;2;178;56;153m", "border": "\u001b[38;2;114;61;131m", "selectedBg": "\u001b[48;2;245;243;245m" }, "256color": { "accent": "\u001b[38;5;132m", "border": "\u001b[38;5;60m", "selectedBg": "\u001b[48;5;255m" } } } });
|
|
139
6
|
export const SHARED_PROGRESS_ACCENT_ANSI = SHARED_PROGRESS_PALETTE.blue.dark.truecolor.accent;
|
|
@@ -68,6 +68,8 @@ export interface TerminalOverlayOptions {
|
|
|
68
68
|
readonly margin?: TerminalOverlayMargin | number;
|
|
69
69
|
readonly visible?: (columns: number, rows: number) => boolean;
|
|
70
70
|
readonly nonCapturing?: boolean;
|
|
71
|
+
/** An owned floating panel; the host supplies its surface and dims the completed backdrop. */
|
|
72
|
+
readonly modal?: boolean;
|
|
71
73
|
/** A1-owned input scheduling declaration; omitted extension overlays fail closed. */
|
|
72
74
|
readonly inputCoordination?: Exclude<TerminalInputSurfaceKind, "editor">;
|
|
73
75
|
}
|
|
@@ -141,6 +143,8 @@ export interface TerminalRuntimeOptions {
|
|
|
141
143
|
readonly root: TerminalComponentPort;
|
|
142
144
|
/** Bare viewport only: painted overlays in back-to-front order; null while geometry is stale. */
|
|
143
145
|
readonly onOverlayGeometry?: (surfaces: readonly TerminalPointerSurface[] | null) => void;
|
|
146
|
+
/** Presentation policy applied after composition around the topmost owned floating panel. */
|
|
147
|
+
readonly paintModalBackdrop?: (lines: readonly string[], width: number, height: number, panel: TerminalPointerSurface) => string[];
|
|
144
148
|
readonly mode?: "regular" | "fullscreen";
|
|
145
149
|
readonly layoutRoot?: TerminalLayoutNode;
|
|
146
150
|
readonly terminal?: TerminalPort;
|
|
@@ -42,5 +42,7 @@ export interface ShellPresentationPorts {
|
|
|
42
42
|
canvasBackground(style: CanvasBackgroundStyle): string | null;
|
|
43
43
|
/** Columns the pinned comparison layout pads command output with. */
|
|
44
44
|
readonly pinnedOutputPad: 0 | 1;
|
|
45
|
+
/** Live color-capability-aware background for owned floating panels only. */
|
|
46
|
+
readonly floatingDialogSurface?: (text: string) => string;
|
|
45
47
|
readonly terminalRuntime: TerminalRuntimeFactory;
|
|
46
48
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Fixed startup-safe rendering only; project-derived presentation is forbidden before trust resolves. */
|
|
2
|
-
export declare function renderProjectTrustDialog(cwd: string, options: readonly string[], selected: number, terminalWidth: number, terminalRows: number, accent: string, border: string): readonly string[];
|
|
2
|
+
export declare function renderProjectTrustDialog(cwd: string, options: readonly string[], selected: number, terminalWidth: number, terminalRows: number, accent: string, border: string, selectedBg: string): readonly string[];
|