@timurproko/a1 0.2.6-dev.717 → 0.2.6-dev.734
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/bin/cli.js +13 -2
- package/bin/ui.js +13 -0
- package/dist/app/session-shell/clipboard-services.d.ts +19 -0
- package/dist/app/session-shell/clipboard-services.js +7 -0
- package/dist/app/session-shell/exit-notice.d.ts +9 -5
- package/dist/app/session-shell/exit-notice.js +5 -5
- package/dist/app/session-shell/index.d.ts +3 -1
- package/dist/app/session-shell/index.js +1 -0
- package/dist/app/session-shell/paste-preparation-client.d.ts +3 -0
- package/dist/app/session-shell/paste-preparation-client.js +5 -2
- package/dist/app/session-shell/path-chip-presentation.d.ts +10 -3
- package/dist/app/session-shell/path-chip-presentation.js +48 -6
- package/dist/app/session-shell/prompt-chips.js +30 -4
- package/dist/app/session-shell/prompt-suggestion-controller.d.ts +5 -4
- package/dist/app/session-shell/prompt-suggestion-controller.js +148 -58
- package/dist/app/session-shell/quit-outro.d.ts +3 -1
- package/dist/app/session-shell/quit-outro.js +23 -8
- package/dist/app/session-shell/response-copy-transport.d.ts +6 -1
- package/dist/app/session-shell/response-copy-transport.js +8 -2
- package/dist/app/session-shell/session-shell-root.d.ts +22 -11
- package/dist/app/session-shell/session-shell-root.js +19 -12
- package/dist/app/session-shell/session-shell.d.ts +19 -21
- package/dist/app/session-shell/session-shell.js +678 -840
- package/dist/app/session-shell/session-viewport-controller.js +33 -21
- package/dist/cli/dispatch.js +5 -3
- package/dist/cli/session-context.d.ts +5 -1
- package/dist/cli/session-context.js +25 -8
- package/dist/composition/owned-ui.d.ts +23 -2
- package/dist/composition/owned-ui.js +124 -33
- package/dist/composition/session-info-reference.d.ts +2 -2
- package/dist/composition/session-info-reference.js +2 -2
- package/dist/composition/settings-route-host.js +2 -1
- package/dist/contracts/agent-engine/capability-ports.d.ts +1 -85
- package/dist/contracts/agent-engine/capability-ports.js +1 -35
- package/dist/contracts/agent-engine/index.d.ts +1 -7
- package/dist/contracts/agent-engine/index.js +0 -4
- package/dist/contracts/owned-ui/index.d.ts +9 -3
- package/dist/contracts/owned-ui/index.js +2 -1
- package/dist/contracts/owned-ui/model.d.ts +10 -0
- package/dist/contracts/owned-ui/session-backend.d.ts +119 -0
- package/dist/contracts/owned-ui/session-presenters.d.ts +55 -0
- package/dist/contracts/owned-ui/session-presenters.js +1 -0
- package/dist/contracts/owned-ui/session-workflows.d.ts +342 -0
- package/dist/contracts/owned-ui/session-workflows.js +30 -0
- package/dist/contracts/owned-ui/suggestion-diagnostics.d.ts +5 -1
- package/dist/contracts/owned-ui/suggestion-diagnostics.js +3 -1
- package/dist/contracts/owned-ui/validation.js +7 -0
- package/dist/features/launch/index.d.ts +1 -1
- package/dist/features/launch/session-context.d.ts +17 -2
- package/dist/features/launch/session-context.js +9 -5
- package/dist/features/owned-ui/settings-app.js +56 -54
- package/dist/features/prompt-suggestions/diagnostics.js +4 -1
- package/dist/foundation/lifecycle/index.d.ts +2 -2
- package/dist/foundation/lifecycle/index.js +1 -1
- package/dist/foundation/lifecycle/session-repository-context.d.ts +19 -2
- package/dist/foundation/lifecycle/session-repository-context.js +434 -66
- package/dist/foundation/process-containment/index.d.ts +1 -0
- package/dist/foundation/process-containment/index.js +1 -0
- package/dist/foundation/process-containment/native-process-inspector.d.ts +3 -0
- package/dist/foundation/process-containment/native-process-inspector.js +21 -0
- package/dist/foundation/release/bootstrap.js +1 -2
- package/dist/foundation/release/progress-palette.generated.d.ts +2 -2
- package/dist/foundation/release/progress-palette.generated.js +2 -2
- package/dist/foundation/release/release-gc.js +1 -1
- package/dist/foundation/release/update.js +0 -4
- package/dist/foundation/startup/startup-descriptor.js +2 -2
- package/dist/foundation/storage/control-store.js +0 -12
- package/dist/integrations/pi/components/components.js +2 -18
- package/dist/integrations/pi/components/index.d.ts +4 -4
- package/dist/integrations/pi/components/index.js +2 -2
- package/dist/integrations/pi/components/modal-frame.js +3 -4
- package/dist/integrations/pi/components/models-dialog.js +6 -35
- package/dist/integrations/pi/components/prompt-input-port.d.ts +1 -0
- 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/share-operation-dialog.js +3 -3
- package/dist/integrations/pi/components/shell-editor-autocomplete.js +19 -16
- package/dist/integrations/pi/components/shell-extension-ui.d.ts +5 -3
- package/dist/integrations/pi/components/shell-extension-ui.js +26 -12
- package/dist/integrations/pi/components/shell-hotkey-sections.js +2 -2
- package/dist/integrations/pi/components/shell-presenters-info.js +10 -10
- package/dist/integrations/pi/components/shell-presenters-transcript.js +13 -13
- package/dist/integrations/pi/components/shell-selectors-dialogs.js +5 -6
- package/dist/integrations/pi/components/shell-shared-facade.d.ts +21 -1
- package/dist/integrations/pi/components/shell-shared-facade.js +19 -3
- package/dist/integrations/pi/components/skills-dialog.js +3 -3
- package/dist/integrations/pi/components/submitted-prompt-adapter.js +2 -3
- package/dist/integrations/pi/components/theme.d.ts +9 -0
- package/dist/integrations/pi/components/theme.js +30 -0
- package/dist/integrations/pi/components/tool-result-adapter.js +6 -1
- package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.js +1 -1
- package/dist/integrations/pi/components/upstream/assets/earendil-image.json +2 -2
- 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 +6 -6
- package/dist/integrations/pi/components/upstream/components/extension-input.js +4 -4
- package/dist/integrations/pi/components/upstream/components/extension-selector.js +4 -4
- package/dist/integrations/pi/components/upstream/components/mermaid.js +1 -1
- package/dist/integrations/pi/components/upstream/components/owned-editor.d.ts +5 -5
- package/dist/integrations/pi/components/upstream/components/owned-editor.js +8 -5
- 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/scoped-models-selector.js +3 -3
- package/dist/integrations/pi/components/upstream/components/session-footer.js +1 -1
- package/dist/integrations/pi/components/upstream/components/session-selector-search.js +1 -1
- package/dist/integrations/pi/components/upstream/components/session-selector.js +9 -9
- package/dist/integrations/pi/components/upstream/components/skill-invocation-message.d.ts +3 -2
- package/dist/integrations/pi/components/upstream/components/skill-invocation-message.js +6 -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 +2 -2
- package/dist/integrations/pi/components/upstream/components/tool-execution.d.ts +4 -0
- package/dist/integrations/pi/components/upstream/components/tool-execution.js +11 -1
- package/dist/integrations/pi/components/upstream/components/tree-selector.d.ts +2 -2
- package/dist/integrations/pi/components/upstream/components/tree-selector.js +27 -18
- package/dist/integrations/pi/components/upstream/components/trust-selector.js +1 -1
- package/dist/integrations/pi/components/upstream/external-editor.js +1 -1
- package/dist/integrations/pi/components/upstream/history/editor-core.d.ts +4 -4
- package/dist/integrations/pi/components/upstream/history/editor-core.js +11 -7
- 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 +31 -0
- package/dist/integrations/pi/components/upstream/program-status-reporter.js +89 -0
- package/dist/integrations/pi/components/upstream/theme/theme-controller.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/theme/theme.d.ts +22 -1
- package/dist/integrations/pi/components/upstream/theme/theme.js +225 -10
- package/dist/integrations/pi/engine/adapter.d.ts +44 -24
- package/dist/integrations/pi/engine/adapter.js +130 -22
- package/dist/integrations/pi/engine/command-dispatch.d.ts +2 -5
- package/dist/integrations/pi/engine/extension-ui-binding.d.ts +2 -11
- package/dist/integrations/pi/engine/host-ports.d.ts +20 -0
- package/dist/integrations/pi/engine/host-ports.js +13 -0
- package/dist/integrations/pi/engine/host.d.ts +70 -0
- package/dist/integrations/pi/engine/host.js +147 -0
- package/dist/integrations/pi/engine/index.d.ts +8 -4
- package/dist/integrations/pi/engine/index.js +3 -1
- package/dist/integrations/pi/engine/pi-settings-metadata.json +1 -1
- package/dist/integrations/pi/engine/resource-catalog.d.ts +4 -23
- package/dist/integrations/pi/engine/resources/changelog.json +4 -4
- package/dist/integrations/pi/engine/runtime-integration.d.ts +8 -2
- package/dist/integrations/pi/engine/runtime-integration.js +12 -7
- package/dist/integrations/pi/engine/session-events.js +10 -2
- package/dist/integrations/pi/engine/session-integration.d.ts +3 -8
- package/dist/integrations/pi/engine/session-integration.js +0 -49
- package/dist/integrations/pi/engine/session-runtime.d.ts +18 -3
- package/dist/integrations/pi/engine/session-runtime.js +18 -7
- package/dist/integrations/pi/engine/settings-bridge.d.ts +2 -2
- package/dist/integrations/pi/engine/settings-bridge.js +0 -2
- package/dist/integrations/pi/engine/settings-port.d.ts +2 -0
- package/dist/integrations/pi/engine/settings-port.js +3 -5
- package/dist/integrations/pi/engine/transcript-projection.js +2 -1
- package/dist/integrations/pi/engine/workflows.d.ts +33 -260
- package/dist/integrations/pi/engine/workflows.js +6 -28
- package/dist/integrations/pi/session-presenters/index.d.ts +2 -0
- package/dist/integrations/pi/session-presenters/index.js +1 -0
- package/dist/integrations/pi/session-presenters/presenters.d.ts +16 -0
- package/dist/integrations/pi/session-presenters/presenters.js +341 -0
- package/dist/integrations/pi/startup-public.js +306 -290
- package/dist/integrations/pi/startup-public.manifest.json +289 -265
- package/dist/integrations/pi/tui-runtime/adapter.d.ts +2 -1
- package/dist/integrations/pi/tui-runtime/adapter.js +7 -2
- package/dist/integrations/pi/tui-runtime/contracts.d.ts +3 -1
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.d.ts +8 -1
- package/dist/integrations/pi/tui-runtime/damage-aware-terminal.js +67 -2
- package/dist/integrations/pi/tui-runtime/index.d.ts +1 -1
- package/dist/integrations/pi/tui-runtime/index.js +1 -1
- package/dist/native/darwin-arm64/manifest.json +1 -1
- package/dist/native/linux-x64/manifest.json +1 -1
- package/dist/native/win32-x64/manifest.json +2 -2
- package/dist/native/win32-x64/process-guardian.exe +0 -0
- package/dist/product-identity.d.ts +2 -2
- package/dist/product-identity.js +2 -2
- package/dist/product-identity.json +3 -1
- package/dist/runtime-payload-inventory.json +3092 -2878
- package/dist/ui/components/prompt-input.d.ts +2 -0
- package/dist/ui/components/prompt-input.js +5 -1
- package/dist/ui/components/text-selection.d.ts +1 -1
- package/dist/ui/components/text-selection.js +3 -1
- package/dist/ui/components/theme.d.ts +2 -0
- package/dist/ui/components/transcript-viewport.d.ts +6 -4
- package/dist/ui/components/transcript-viewport.js +94 -16
- package/dist/ui/components/value-menu.d.ts +2 -0
- package/dist/ui/components/value-menu.js +13 -8
- package/dist/ui/settings/declarations.d.ts +38 -14
- package/dist/ui/settings/declarations.js +35 -11
- package/dist/ui/settings/migrations.js +23 -0
- package/docs/architecture/boundaries.md +9 -1
- package/docs/architecture/project-structure.md +7 -5
- package/docs/architecture/prompt-suggestions.md +14 -10
- package/docs/local-worktree-cleanup.md +11 -5
- package/docs/openspec-archive-automation.md +6 -5
- package/package.json +3 -3
- package/dist/contracts/agent-engine/model.d.ts +0 -78
- package/dist/contracts/agent-engine/model.js +0 -1
- package/dist/contracts/agent-engine/ports.d.ts +0 -18
- package/dist/contracts/agent-engine/serialization.d.ts +0 -7
- package/dist/contracts/agent-engine/serialization.js +0 -58
- package/dist/contracts/agent-engine/validation.d.ts +0 -5
- package/dist/contracts/agent-engine/validation.js +0 -128
- package/dist/integrations/pi/components/upstream/theme/system-theme.d.ts +0 -61
- package/dist/integrations/pi/components/upstream/theme/system-theme.js +0 -709
- /package/dist/contracts/{agent-engine/ports.js → owned-ui/session-backend.js} +0 -0
|
@@ -5,11 +5,9 @@ import { composeSubmittedPromptRows, formatSubmittedPromptTime, submittedPromptL
|
|
|
5
5
|
import { backgroundSgrSpan, heldNativeHyperlinkStyle, hyperlinkSgrSpan, nativeHyperlinkStyle, overlaySpan, } from "../../ui/components/spans.js";
|
|
6
6
|
import { progressStatusFrame, progressStatusText } from "../../ui/components/progress-status.js";
|
|
7
7
|
import { displayWidth, faint, stripAnsi } from "../../ui/components/text.js";
|
|
8
|
-
import { PINNED_PI_HIDDEN_COMMAND_NAMES, PINNED_PI_WORKFLOW_COMMAND_NAMES } from "../../integrations/pi/engine/workflows.js";
|
|
9
|
-
import { createPiExtensionUiBridge } from "../../integrations/pi/components/shell-extension-ui.js";
|
|
10
8
|
import { createPiShellEditor } from "../../integrations/pi/components/shell-editor-autocomplete.js";
|
|
11
9
|
import { createPiQueuedInputStatus, createPiShellFooter, createPiShellHeader, createPiShellLoadedResources, createPiShellStatus, } from "../../integrations/pi/components/shell-footer-status.js";
|
|
12
|
-
import { createPiShellArmin,
|
|
10
|
+
import { createPiShellArmin, createPiShellEarendilAnnouncement, } from "../../integrations/pi/components/shell-selectors-dialogs.js";
|
|
13
11
|
import { createPiShellChangelog, createPiShellCollapsedChangelog, createPiShellHotkeys, createPiShellSessionInfo, renderPiShellCommandMessage, renderPiShellPackageUpdateNotice, renderPiShellReleaseUpdateBanner, renderPiShellReleaseUpdateNotice, renderPiShellStatusText, } from "../../integrations/pi/components/shell-presenters-info.js";
|
|
14
12
|
import { createPiShellTranscriptComponent, isPiPromptStyleCompaction, paintPiSubmittedPromptTimestamp, renderPiShellStartupDiagnostic, renderPiShellTranscriptBlock, } from "../../integrations/pi/components/shell-presenters-transcript.js";
|
|
15
13
|
import { onPiThemeChange, PINNED_PI_LAYOUT, piTheme } from "../../integrations/pi/components/upstream/theme/theme.js";
|
|
@@ -48,6 +46,7 @@ export class OwnedUiSessionShellRoot {
|
|
|
48
46
|
#viewportTheme;
|
|
49
47
|
#onViewportFrame;
|
|
50
48
|
#onInputSurfaceChanged;
|
|
49
|
+
#onPromptSuggestionEligibilityChanged;
|
|
51
50
|
#componentRuntime;
|
|
52
51
|
#toolsExpanded = false;
|
|
53
52
|
#thinkingVisible = true;
|
|
@@ -87,6 +86,7 @@ export class OwnedUiSessionShellRoot {
|
|
|
87
86
|
constructor(view, cwd, handlers, startup = {}, agentDir, extensionRenderers = {
|
|
88
87
|
getMessageRenderer: () => undefined,
|
|
89
88
|
getToolRenderers: () => undefined,
|
|
89
|
+
getShortcuts: () => [],
|
|
90
90
|
}, sessionLayout = "pinned", imageAssets) {
|
|
91
91
|
this.#view = view;
|
|
92
92
|
this.#customViewport = sessionLayout === "custom-viewport";
|
|
@@ -107,6 +107,7 @@ export class OwnedUiSessionShellRoot {
|
|
|
107
107
|
this.#componentRuntime = handlers;
|
|
108
108
|
this.#onViewportFrame = handlers.onViewportFrame;
|
|
109
109
|
this.#onInputSurfaceChanged = handlers.onInputSurfaceChanged;
|
|
110
|
+
this.#onPromptSuggestionEligibilityChanged = handlers.onPromptSuggestionEligibilityChanged;
|
|
110
111
|
this.#dockInputReuseEnabled = handlers.enableDockInputReuse ?? true;
|
|
111
112
|
this.header = createPiShellHeader({
|
|
112
113
|
...startup,
|
|
@@ -122,6 +123,7 @@ export class OwnedUiSessionShellRoot {
|
|
|
122
123
|
this.editor = createPiShellEditor({
|
|
123
124
|
...handlers,
|
|
124
125
|
keybindingProfile: this.#customViewport ? "a1" : "pi",
|
|
126
|
+
...(handlers.keybindings === undefined ? {} : { keybindings: handlers.keybindings }),
|
|
125
127
|
paintEditorSelection: (line, from, to, atomic) => backgroundSgrSpan(line, from, to, atomic ? "\u001b[7m" : "\u001b[27m\u001b[48;2;38;79;120m", atomic ? "\u001b[27m" : "\u001b[49m", piShellVisibleWidth),
|
|
126
128
|
transformPastedContent: content => {
|
|
127
129
|
try {
|
|
@@ -223,8 +225,8 @@ export class OwnedUiSessionShellRoot {
|
|
|
223
225
|
// Invariant: colours come from the active theme, so rendered rows outlive their revision only
|
|
224
226
|
// until the theme under them changes.
|
|
225
227
|
this.#themeUnsubscribe = onPiThemeChange(() => {
|
|
226
|
-
this
|
|
227
|
-
this.#
|
|
228
|
+
this.invalidate();
|
|
229
|
+
this.#componentRuntime.requestRender(true);
|
|
228
230
|
});
|
|
229
231
|
}
|
|
230
232
|
setEditorPaddingX(padding) {
|
|
@@ -327,6 +329,7 @@ export class OwnedUiSessionShellRoot {
|
|
|
327
329
|
this.editor.setPromptSuggestion(text);
|
|
328
330
|
}
|
|
329
331
|
update(view) {
|
|
332
|
+
const becameReady = this.#view.lifecycle !== "ready" && view.lifecycle === "ready";
|
|
330
333
|
if (view.diagnostics.length !== this.#view.diagnostics.length
|
|
331
334
|
|| view.diagnostics.some((diagnostic, index) => diagnostic.sequence !== this.#view.diagnostics[index]?.sequence)) {
|
|
332
335
|
this.#documentLayouts.clear();
|
|
@@ -349,6 +352,8 @@ export class OwnedUiSessionShellRoot {
|
|
|
349
352
|
this.editor.setThinkingLevel(view.thinkingLevel);
|
|
350
353
|
// Performance: semantic updates already invalidate affected transcript blocks. Chrome is a separate authority.
|
|
351
354
|
this.#invalidateChrome();
|
|
355
|
+
if (becameReady)
|
|
356
|
+
this.#onPromptSuggestionEligibilityChanged?.();
|
|
352
357
|
}
|
|
353
358
|
/**
|
|
354
359
|
* Applies one block: its component is created or updated in place and the order grows
|
|
@@ -458,13 +463,13 @@ export class OwnedUiSessionShellRoot {
|
|
|
458
463
|
if (frame === null) {
|
|
459
464
|
frame = this.#viewportController.compose({
|
|
460
465
|
// Performance: do not copy the complete document on unchanged dock-only input.
|
|
461
|
-
// Steering and Working retain their one non-
|
|
466
|
+
// Steering and Working retain their one non-persistent viewport-tail ownership.
|
|
462
467
|
documentRows: [...document.rows, ...steeringRows, ...statusRows],
|
|
463
468
|
...(this.#viewportController.transcriptPointerSelecting
|
|
464
469
|
? { paintDocumentRow: heldNativeHyperlinkStyle }
|
|
465
470
|
: {}),
|
|
466
|
-
// Invariant:
|
|
467
|
-
//
|
|
471
|
+
// Invariant: this boundary tracks persistent transcript rows for streaming and
|
|
472
|
+
// geometry; transient Steering and Working rows remain complete-frame selectable.
|
|
468
473
|
selectableDocumentRowCount,
|
|
469
474
|
...(document.liveTailStartRow === undefined ? {} : { liveTailStartRow: document.liveTailStartRow }),
|
|
470
475
|
bottomAlignedTailRowCount: steeringRows.length + statusRows.length,
|
|
@@ -527,7 +532,7 @@ export class OwnedUiSessionShellRoot {
|
|
|
527
532
|
cause: frame?.descriptor.cause ?? null,
|
|
528
533
|
};
|
|
529
534
|
}
|
|
530
|
-
/** Visible non-
|
|
535
|
+
/** Visible non-persistent Steering, alignment, and Working rows, for rendering evidence. */
|
|
531
536
|
viewportTransientTailRowCount() {
|
|
532
537
|
return this.#viewportController.frame?.hits.transientTail.length ?? 0;
|
|
533
538
|
}
|
|
@@ -1066,7 +1071,7 @@ export class OwnedUiSessionShellRoot {
|
|
|
1066
1071
|
hotkeysPresentation() {
|
|
1067
1072
|
return {
|
|
1068
1073
|
bindings: this.editor.keybindingConfig(),
|
|
1069
|
-
getShortcuts: bindings => this.#extensionRenderers.getShortcuts
|
|
1074
|
+
getShortcuts: bindings => this.#extensionRenderers.getShortcuts(bindings),
|
|
1070
1075
|
profile: this.#customViewport ? "a1" : "pi",
|
|
1071
1076
|
};
|
|
1072
1077
|
}
|
|
@@ -1179,6 +1184,8 @@ export class OwnedUiSessionShellRoot {
|
|
|
1179
1184
|
}
|
|
1180
1185
|
setFocused(focused) {
|
|
1181
1186
|
this.#inputSurface.setFocused?.(focused);
|
|
1187
|
+
if (focused)
|
|
1188
|
+
this.#onPromptSuggestionEligibilityChanged?.();
|
|
1182
1189
|
}
|
|
1183
1190
|
dispose() {
|
|
1184
1191
|
this.#clearCopyAcknowledgement(false);
|
|
@@ -1374,7 +1381,7 @@ function layoutPort(render, invalidate, handleInput) {
|
|
|
1374
1381
|
};
|
|
1375
1382
|
}
|
|
1376
1383
|
export function shellResourceEntries(backend) {
|
|
1377
|
-
const resources = backend.nonVisualResources().map(resource => ({
|
|
1384
|
+
const resources = backend.extensions.nonVisualResources().map(resource => ({
|
|
1378
1385
|
section: resource.kind === "skill"
|
|
1379
1386
|
? "Skills"
|
|
1380
1387
|
: resource.kind === "prompt-template"
|
|
@@ -1390,7 +1397,7 @@ export function shellResourceEntries(backend) {
|
|
|
1390
1397
|
sourcePath: resource.sourcePath,
|
|
1391
1398
|
diagnostic: resource.diagnostic,
|
|
1392
1399
|
}));
|
|
1393
|
-
const extensions = backend.extensionResources().filter(extension => !extension.hidden);
|
|
1400
|
+
const extensions = backend.extensions.extensionResources().filter(extension => !extension.hidden);
|
|
1394
1401
|
const loadedExtensions = extensions.filter(extension => extension.diagnostic === null);
|
|
1395
1402
|
const extensionLabels = compactExtensionLabels(loadedExtensions);
|
|
1396
1403
|
for (const extension of extensions) {
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import type { OwnedUiSessionViewModel, OwnedUiThinkingLevel } from "../../contracts/owned-ui/index.js";
|
|
2
|
-
import type { AdapterCommandResult } from "../../integrations/pi/engine/adapter.js";
|
|
3
|
-
import type { PiWorkflowRequest } from "../../integrations/pi/engine/workflows.js";
|
|
1
|
+
import type { OwnedUiCommandResult, OwnedUiSessionBackend, OwnedUiSessionViewModel, OwnedUiThinkingLevel, OwnedUiWorkflowRequest } from "../../contracts/owned-ui/index.js";
|
|
4
2
|
import { type PiShellSkillSummary } from "../../integrations/pi/components/skills-command.js";
|
|
5
3
|
import { type PiShellHotkeysPresentation } from "../../integrations/pi/components/shell-presenters-info.js";
|
|
6
4
|
import type { PiShellSelectorOption } from "../../integrations/pi/components/shell-shared-facade.js";
|
|
7
5
|
import { type PiTuiDamageDecision } from "../../integrations/pi/tui-runtime/damage-aware-terminal.js";
|
|
8
6
|
import { PiTuiRuntimeAdapter } from "../../integrations/pi/tui-runtime/adapter.js";
|
|
9
7
|
import type { PiTuiOverlayHandle } from "../../integrations/pi/tui-runtime/contracts.js";
|
|
10
|
-
import { OwnedUiSessionShellRoot, type
|
|
11
|
-
export { OwnedUiSessionShellRoot, type OwnedUiSessionShellOptions, type OwnedUiShellDiagnosticOptions, type OwnedUiShellEngineOptions, type OwnedUiShellHistoryOptions, type OwnedUiShellPresentationOptions, type OwnedUiShellPromptImagesOptions, type OwnedUiShellSkillsOptions, type OwnedUiShellSuggestionOptions, } from "./session-shell-root.js";
|
|
8
|
+
import { OwnedUiSessionShellRoot, type OwnedUiSessionShellOptions } from "./session-shell-root.js";
|
|
9
|
+
export { OwnedUiSessionShellRoot, type OwnedUiSessionShellOptions, type OwnedUiShellDiagnosticOptions, type OwnedUiShellEngineOptions, type OwnedUiShellHistoryOptions, type OwnedUiShellPresentationOptions, type OwnedUiShellPromptImagesOptions, type OwnedUiShellSharedServices, type OwnedUiShellSkillsOptions, type OwnedUiShellSuggestionOptions, } from "./session-shell-root.js";
|
|
12
10
|
/** Coordinates backend, owned presentation, and Pi TUI lifecycles for one interactive session. */
|
|
13
11
|
export declare class OwnedUiSessionShell {
|
|
14
12
|
#private;
|
|
15
|
-
readonly backend:
|
|
13
|
+
readonly backend: OwnedUiSessionBackend;
|
|
16
14
|
readonly root: OwnedUiSessionShellRoot;
|
|
17
15
|
readonly runtime: PiTuiRuntimeAdapter;
|
|
18
16
|
constructor(options: OwnedUiSessionShellOptions);
|
|
@@ -21,19 +19,19 @@ export declare class OwnedUiSessionShell {
|
|
|
21
19
|
start(): void;
|
|
22
20
|
onView(listener: (view: OwnedUiSessionViewModel) => void): () => void;
|
|
23
21
|
waitUntilStopped(): Promise<void>;
|
|
24
|
-
submit(text: string): Promise<
|
|
25
|
-
clearOrExit(now?: number): Promise<
|
|
26
|
-
interrupt(now?: number): Promise<
|
|
27
|
-
abort(): Promise<
|
|
28
|
-
retry(): Promise<
|
|
29
|
-
compact(): Promise<
|
|
30
|
-
newSession(): Promise<
|
|
31
|
-
resumeSession(sessionPath: string): Promise<
|
|
32
|
-
setModel(providerId: string, modelId: string): Promise<
|
|
33
|
-
setThinkingLevel(thinkingLevel: OwnedUiThinkingLevel): Promise<
|
|
34
|
-
cycleThinkingLevel(): Promise<
|
|
35
|
-
cycleModel(direction: "forward" | "backward"): Promise<
|
|
36
|
-
queueFollowUp(): Promise<
|
|
22
|
+
submit(text: string): Promise<OwnedUiCommandResult>;
|
|
23
|
+
clearOrExit(now?: number): Promise<OwnedUiCommandResult>;
|
|
24
|
+
interrupt(now?: number): Promise<OwnedUiCommandResult>;
|
|
25
|
+
abort(): Promise<OwnedUiCommandResult>;
|
|
26
|
+
retry(): Promise<OwnedUiCommandResult>;
|
|
27
|
+
compact(): Promise<OwnedUiCommandResult>;
|
|
28
|
+
newSession(): Promise<OwnedUiCommandResult>;
|
|
29
|
+
resumeSession(sessionPath: string): Promise<OwnedUiCommandResult>;
|
|
30
|
+
setModel(providerId: string, modelId: string): Promise<OwnedUiCommandResult>;
|
|
31
|
+
setThinkingLevel(thinkingLevel: OwnedUiThinkingLevel): Promise<OwnedUiCommandResult>;
|
|
32
|
+
cycleThinkingLevel(): Promise<OwnedUiCommandResult>;
|
|
33
|
+
cycleModel(direction: "forward" | "backward"): Promise<OwnedUiCommandResult>;
|
|
34
|
+
queueFollowUp(): Promise<OwnedUiCommandResult>;
|
|
37
35
|
restoreQueuedInput(): void;
|
|
38
36
|
showSelector(title: string, options: readonly PiShellSelectorOption[], onSelect: (id: string) => void, onCancel?: () => void): PiTuiOverlayHandle;
|
|
39
37
|
showThinkingSelector(): Promise<void>;
|
|
@@ -48,8 +46,8 @@ export declare class OwnedUiSessionShell {
|
|
|
48
46
|
showLoginProviderSelector(authType?: "oauth" | "api_key", initialSearchInput?: string): void;
|
|
49
47
|
showSessionSelector(): Promise<void>;
|
|
50
48
|
showSettingsSelector(): void;
|
|
51
|
-
shutdown(): Promise<
|
|
52
|
-
runWorkflow(request:
|
|
49
|
+
shutdown(): Promise<OwnedUiCommandResult>;
|
|
50
|
+
runWorkflow(request: OwnedUiWorkflowRequest): Promise<OwnedUiCommandResult>;
|
|
53
51
|
showTrustSelector(): void;
|
|
54
52
|
showScopedModelsSelector(): void;
|
|
55
53
|
/** The bare-A1 unified Models dialog: switch on Enter, scope on Space, persist on Ctrl+S, all through the engine. */
|