@timurproko/a1 0.2.4 → 0.2.5-dev.698
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/dist/app/session-shell/prompt-suggestion-controller.d.ts +2 -0
- package/dist/app/session-shell/prompt-suggestion-controller.js +10 -0
- package/dist/app/session-shell/session-shell-root.d.ts +1 -0
- package/dist/app/session-shell/session-shell-root.js +19 -6
- package/dist/app/session-shell/session-shell.js +77 -19
- package/dist/app/session-shell/share-operation.d.ts +3 -0
- package/dist/app/session-shell/share-operation.js +11 -0
- package/dist/composition/owned-ui.js +1 -0
- package/dist/composition/session-info-reference.d.ts +4 -0
- package/dist/composition/session-info-reference.js +20 -0
- package/dist/composition/settings-route-host.d.ts +2 -5
- package/dist/composition/settings-route-host.js +8 -12
- package/dist/contracts/presentation/index.d.ts +5 -0
- package/dist/contracts/presentation/index.js +2 -0
- package/dist/features/owned-ui/project-trust-dialog.js +7 -5
- package/dist/features/owned-ui/reference-screen-app.d.ts +4 -2
- package/dist/features/owned-ui/reference-screen-app.js +17 -7
- package/dist/features/owned-ui/settings-app.js +10 -5
- package/dist/foundation/release/progress-palette.generated.d.ts +2 -2
- package/dist/foundation/release/progress-palette.generated.js +2 -2
- package/dist/foundation/startup/startup-descriptor.js +2 -2
- package/dist/integrations/pi/components/index.d.ts +3 -2
- package/dist/integrations/pi/components/index.js +2 -1
- package/dist/integrations/pi/components/modal-frame.d.ts +11 -1
- package/dist/integrations/pi/components/modal-frame.js +29 -1
- package/dist/integrations/pi/components/models-dialog.js +17 -17
- 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.d.ts +6 -0
- package/dist/integrations/pi/components/share-operation-dialog.js +40 -0
- package/dist/integrations/pi/components/shell-editor-autocomplete.js +15 -6
- package/dist/integrations/pi/components/shell-extension-ui.d.ts +3 -0
- package/dist/integrations/pi/components/shell-extension-ui.js +8 -4
- package/dist/integrations/pi/components/shell-presenters-info.d.ts +2 -0
- package/dist/integrations/pi/components/shell-presenters-info.js +1 -1
- package/dist/integrations/pi/components/shell-selectors-dialogs.d.ts +0 -4
- package/dist/integrations/pi/components/shell-selectors-dialogs.js +56 -34
- package/dist/integrations/pi/components/shell-session-info-reference.d.ts +10 -0
- package/dist/integrations/pi/components/shell-session-info-reference.js +94 -0
- package/dist/integrations/pi/components/shell-shared-facade.d.ts +3 -1
- package/dist/integrations/pi/components/shell-shared-facade.js +13 -1
- package/dist/integrations/pi/components/skills-dialog.js +19 -6
- package/dist/integrations/pi/components/theme.d.ts +8 -1
- package/dist/integrations/pi/components/theme.js +28 -1
- package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.d.ts +15 -7
- package/dist/integrations/pi/components/upstream/adjacent/core/keybindings.js +21 -7
- 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 +3 -3
- package/dist/integrations/pi/components/upstream/components/extension-input.js +5 -6
- package/dist/integrations/pi/components/upstream/components/extension-selector.js +3 -4
- package/dist/integrations/pi/components/upstream/components/mermaid.js +1 -1
- 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 +4 -3
- package/dist/integrations/pi/components/upstream/components/scoped-models-selector.js +4 -15
- 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.d.ts +2 -0
- package/dist/integrations/pi/components/upstream/components/session-selector.js +137 -110
- package/dist/integrations/pi/components/upstream/components/skill-invocation-message.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/components/skill-invocation-message.js +1 -1
- 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 +9 -6
- package/dist/integrations/pi/components/upstream/components/thinking-selector.js +64 -27
- package/dist/integrations/pi/components/upstream/components/tool-execution.js +1 -1
- package/dist/integrations/pi/components/upstream/components/tree-selector.d.ts +30 -21
- package/dist/integrations/pi/components/upstream/components/tree-selector.js +246 -211
- package/dist/integrations/pi/components/upstream/components/trust-selector.js +14 -16
- 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 +1 -1
- 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/theme/system-theme.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/theme/system-theme.js +1 -1
- package/dist/integrations/pi/components/upstream/theme/theme-controller.d.ts +1 -1
- package/dist/integrations/pi/components/upstream/theme/theme.js +1 -1
- package/dist/integrations/pi/engine/adapter.js +21 -2
- package/dist/integrations/pi/engine/resources/changelog.json +4 -4
- package/dist/integrations/pi/engine/workflow-runner.js +2 -1
- package/dist/integrations/pi/startup-public.js +186 -81
- package/dist/integrations/pi/startup-public.manifest.json +107 -95
- 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/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/runtime-payload-inventory.json +2717 -2630
- package/dist/ui/apps/host.d.ts +4 -3
- package/dist/ui/apps/host.js +9 -4
- package/dist/ui/components/dialog-panel.js +6 -7
- package/dist/ui/components/index.d.ts +1 -1
- package/dist/ui/components/index.js +1 -1
- package/dist/ui/components/list-view.d.ts +3 -3
- package/dist/ui/components/list-view.js +8 -9
- package/dist/ui/components/shortcut-hints.d.ts +2 -0
- package/dist/ui/components/shortcut-hints.js +17 -1
- package/dist/ui/components/theme.d.ts +1 -1
- package/docs/assets/readme/separator-dark.svg +2 -4
- package/docs/assets/readme/separator.svg +2 -4
- package/docs/releases/0.2.4.md +1 -5
- package/package.json +3 -3
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provenance: @earendil-works/pi-coding-agent 1.0.
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 1.0.4 (MIT), commit 7c10bd4337495ee613f2224843ecdf349b80d1df,
|
|
3
3
|
* packages/coding-agent/src/modes/interactive/components/trust-selector.ts.
|
|
4
4
|
* Modifications: Mechanical source-synchronized trust selector port with injected public
|
|
5
|
-
* ProjectTrustStore-derived options, remapped owned theme imports,
|
|
6
|
-
*
|
|
5
|
+
* ProjectTrustStore-derived options, remapped owned theme imports, the shared bare-A1 modal shortcut
|
|
6
|
+
* row and compact padded modal frame, and standard semantic trust styling with marker-free choice
|
|
7
|
+
* geometry.
|
|
7
8
|
* Deviations: owned-modal-shortcut-hints.
|
|
8
9
|
*/
|
|
9
10
|
import { DynamicBorder } from "../../../startup-public.js";
|
|
10
11
|
import { Container, getKeybindings, Spacer, Text } from "@earendil-works/pi-tui";
|
|
11
12
|
import { addPiModalHeader, adoptPiModalFrame } from "../../modal-frame.js";
|
|
12
|
-
import { piTheme, renderPiModalShortcutHints } from "../../theme.js";
|
|
13
|
+
import { DIALOG_CLOSE_SHORTCUT_HINT, piTheme, renderPiModalShortcutHints } from "../../theme.js";
|
|
13
14
|
function formatDecision(trustPath, decision) {
|
|
14
15
|
if (decision === null)
|
|
15
16
|
return "none";
|
|
@@ -30,11 +31,11 @@ export class TrustSelectorComponent extends Container {
|
|
|
30
31
|
&& options.savedDecision?.decision === option.trusted
|
|
31
32
|
&& options.savedDecision.path === option.savedPath;
|
|
32
33
|
this.selectedIndex = Math.max(0, this.trustOptions.findIndex(isSaved));
|
|
33
|
-
const header = addPiModalHeader(this, new DynamicBorder(), new Text(piTheme().fg("accent", piTheme().bold("Project trust")), 0, 0));
|
|
34
|
+
const header = addPiModalHeader(this, new DynamicBorder(text => piTheme().fg("border", text)), new Text(piTheme().fg("accent", piTheme().bold("Project trust")), 0, 0));
|
|
34
35
|
this.addChild(new Text(piTheme().fg("muted", options.cwd), 0, 0));
|
|
35
36
|
this.addChild(new Spacer(1));
|
|
36
|
-
this.addChild(new Text(piTheme().fg("muted",
|
|
37
|
-
this.addChild(new Text(piTheme().fg("muted",
|
|
37
|
+
this.addChild(new Text(`${piTheme().fg("muted", "Saved decision:")} ${piTheme().fg("text", formatDecision(this.trustOptions[0]?.savedPath, options.savedDecision))}`, 0, 0));
|
|
38
|
+
this.addChild(new Text(`${piTheme().fg("muted", "Current session:")} ${piTheme().fg("text", options.projectTrusted ? "trusted" : "untrusted")}`, 0, 0));
|
|
38
39
|
this.addChild(new Spacer(1));
|
|
39
40
|
this.listContainer = new Container();
|
|
40
41
|
this.addChild(this.listContainer);
|
|
@@ -43,12 +44,11 @@ export class TrustSelectorComponent extends Container {
|
|
|
43
44
|
this.addChild(new Text(renderPiModalShortcutHints([
|
|
44
45
|
{ key: "↑↓", action: "navigate" },
|
|
45
46
|
{ key: keybindings.getKeys("tui.select.confirm").join("/"), action: "save" },
|
|
46
|
-
|
|
47
|
+
DIALOG_CLOSE_SHORTCUT_HINT,
|
|
47
48
|
]), 0, 0));
|
|
48
|
-
this.addChild(new
|
|
49
|
-
this.addChild(new DynamicBorder());
|
|
49
|
+
this.addChild(new DynamicBorder(text => piTheme().fg("border", text)));
|
|
50
50
|
adoptPiModalFrame(this, { topIndex: 0, bottomIndex: this.children.length - 1, header });
|
|
51
|
-
this.updateList(
|
|
51
|
+
this.updateList();
|
|
52
52
|
this.handleInput = data => {
|
|
53
53
|
const kb = getKeybindings();
|
|
54
54
|
if (kb.matches(data, "tui.select.up") || data === "k")
|
|
@@ -67,21 +67,19 @@ export class TrustSelectorComponent extends Container {
|
|
|
67
67
|
}
|
|
68
68
|
else
|
|
69
69
|
return;
|
|
70
|
-
this.updateList(
|
|
70
|
+
this.updateList();
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
updateList(
|
|
73
|
+
updateList() {
|
|
74
74
|
this.listContainer.clear();
|
|
75
75
|
for (let index = 0; index < this.trustOptions.length; index += 1) {
|
|
76
76
|
const option = this.trustOptions[index];
|
|
77
77
|
if (!option)
|
|
78
78
|
continue;
|
|
79
79
|
const selected = index === this.selectedIndex;
|
|
80
|
-
const current = option.savedPath !== undefined && savedDecision?.decision === option.trusted && savedDecision.path === option.savedPath;
|
|
81
80
|
const prefix = selected ? piTheme().fg("accent", "→ ") : " ";
|
|
82
81
|
const label = selected ? piTheme().fg("accent", option.label) : piTheme().fg("text", option.label);
|
|
83
|
-
|
|
84
|
-
this.listContainer.addChild(new Text(`${prefix}${currentMarker}${label}`, 0, 0));
|
|
82
|
+
this.listContainer.addChild(new Text(`${prefix}${label}`, 0, 0));
|
|
85
83
|
}
|
|
86
84
|
}
|
|
87
85
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provenance: @earendil-works/pi-coding-agent 1.0.
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 1.0.4 (MIT), commit 7c10bd4337495ee613f2224843ecdf349b80d1df,
|
|
3
3
|
* packages/coding-agent/src/modes/interactive/external-editor.ts.
|
|
4
4
|
* Modifications: Mechanical port: retain temporary prompt file, asynchronous inherited-stdio editor
|
|
5
5
|
* process, completion readback, and best-effort cleanup behind the owned extension-editor component.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provenance: @earendil-works/pi-tui 1.0.
|
|
2
|
+
* Provenance: @earendil-works/pi-tui 1.0.4 (MIT), commit 7c10bd4337495ee613f2224843ecdf349b80d1df,
|
|
3
3
|
* packages/tui/src/components/editor.ts.
|
|
4
4
|
* Modifications: Owned editor core or minimal editor-local helper subset; public imports, strict
|
|
5
5
|
* types, typed persistent-history hooks, semantic border state with the user-approved numeric-only
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provenance: @earendil-works/pi-tui 1.0.
|
|
2
|
+
* Provenance: @earendil-works/pi-tui 1.0.4 (MIT), commit 7c10bd4337495ee613f2224843ecdf349b80d1df,
|
|
3
3
|
* packages/tui/src/components/editor.ts.
|
|
4
4
|
* Modifications: Owned editor core or minimal editor-local helper subset; public imports, strict
|
|
5
5
|
* types, typed persistent-history hooks, semantic border state with the user-approved numeric-only
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provenance: @earendil-works/pi-tui 1.0.
|
|
2
|
+
* Provenance: @earendil-works/pi-tui 1.0.4 (MIT), commit 7c10bd4337495ee613f2224843ecdf349b80d1df,
|
|
3
3
|
* packages/tui/src/kill-ring.ts.
|
|
4
4
|
* Modifications: Owned editor core or minimal editor-local helper subset; public imports, strict
|
|
5
5
|
* types, typed persistent-history hooks, and semantic border state. Public terminal runtime/exports
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provenance: @earendil-works/pi-tui 1.0.
|
|
2
|
+
* Provenance: @earendil-works/pi-tui 1.0.4 (MIT), commit 7c10bd4337495ee613f2224843ecdf349b80d1df,
|
|
3
3
|
* packages/tui/src/kill-ring.ts.
|
|
4
4
|
* Modifications: Owned editor core or minimal editor-local helper subset; public imports, strict
|
|
5
5
|
* types, typed persistent-history hooks, and semantic border state. Public terminal runtime/exports
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provenance: @earendil-works/pi-tui 1.0.
|
|
2
|
+
* Provenance: @earendil-works/pi-tui 1.0.4 (MIT), commit 7c10bd4337495ee613f2224843ecdf349b80d1df,
|
|
3
3
|
* packages/tui/src/keys.ts.
|
|
4
4
|
* Modifications: Owned editor core or minimal editor-local helper subset; public imports, strict
|
|
5
5
|
* types, typed persistent-history hooks, and semantic border state. Public terminal runtime/exports
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provenance: @earendil-works/pi-tui 1.0.
|
|
2
|
+
* Provenance: @earendil-works/pi-tui 1.0.4 (MIT), commit 7c10bd4337495ee613f2224843ecdf349b80d1df,
|
|
3
3
|
* packages/tui/src/utils.ts.
|
|
4
4
|
* Modifications: Owned editor core or minimal editor-local helper subset; public imports, strict
|
|
5
5
|
* types, typed persistent-history hooks, and semantic border state. Public terminal runtime/exports
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provenance: @earendil-works/pi-tui 1.0.
|
|
2
|
+
* Provenance: @earendil-works/pi-tui 1.0.4 (MIT), commit 7c10bd4337495ee613f2224843ecdf349b80d1df,
|
|
3
3
|
* packages/tui/src/undo-stack.ts.
|
|
4
4
|
* Modifications: Owned editor core or minimal editor-local helper subset; public imports, strict
|
|
5
5
|
* types, typed persistent-history hooks, and semantic border state. Public terminal runtime/exports
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provenance: @earendil-works/pi-tui 1.0.
|
|
2
|
+
* Provenance: @earendil-works/pi-tui 1.0.4 (MIT), commit 7c10bd4337495ee613f2224843ecdf349b80d1df,
|
|
3
3
|
* packages/tui/src/undo-stack.ts.
|
|
4
4
|
* Modifications: Owned editor core or minimal editor-local helper subset; public imports, strict
|
|
5
5
|
* types, typed persistent-history hooks, and semantic border state. Public terminal runtime/exports
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provenance: @earendil-works/pi-tui 1.0.
|
|
2
|
+
* Provenance: @earendil-works/pi-tui 1.0.4 (MIT), commit 7c10bd4337495ee613f2224843ecdf349b80d1df,
|
|
3
3
|
* packages/tui/src/word-navigation.ts.
|
|
4
4
|
* Modifications: Owned editor core or minimal editor-local helper subset; public imports, strict
|
|
5
5
|
* types, typed persistent-history hooks, and semantic border state. Public terminal runtime/exports
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provenance: @earendil-works/pi-coding-agent 1.0.
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 1.0.4 (MIT), commit 7c10bd4337495ee613f2224843ecdf349b80d1df,
|
|
3
3
|
* packages/coding-agent/src/modes/interactive/model-search.ts.
|
|
4
4
|
* Modifications: Mechanical source-synchronized port preserving pinned model search terms for stateful
|
|
5
5
|
* scoped-model filtering.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provenance: @earendil-works/pi-coding-agent 1.0.
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 1.0.4 (MIT), commit 7c10bd4337495ee613f2224843ecdf349b80d1df,
|
|
3
3
|
* packages/coding-agent/src/modes/interactive/theme/system-theme.ts.
|
|
4
4
|
* Modifications: Copied the system palette generator with ESM import remapping and strict
|
|
5
5
|
* indexed-access assertions; A1 retains explicit owned theme selection.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provenance: @earendil-works/pi-coding-agent 1.0.
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 1.0.4 (MIT), commit 7c10bd4337495ee613f2224843ecdf349b80d1df,
|
|
3
3
|
* packages/coding-agent/src/modes/interactive/theme/system-theme.ts.
|
|
4
4
|
* Modifications: Copied the system palette generator with ESM import remapping and strict
|
|
5
5
|
* indexed-access assertions; A1 retains explicit owned theme selection.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provenance: @earendil-works/pi-coding-agent 1.0.
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 1.0.4 (MIT), commit 7c10bd4337495ee613f2224843ecdf349b80d1df,
|
|
3
3
|
* packages/coding-agent/src/modes/interactive/theme/theme-controller.ts.
|
|
4
4
|
* Modifications: Source-synchronized controller port: renamed owner class, injected dependency-free
|
|
5
5
|
* settings/runtime ports, remapped private theme helpers to the public-backed A1 theme adapter, and
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Provenance: @earendil-works/pi-coding-agent 1.0.
|
|
2
|
+
* Provenance: @earendil-works/pi-coding-agent 1.0.4 (MIT), commit 7c10bd4337495ee613f2224843ecdf349b80d1df,
|
|
3
3
|
* packages/coding-agent/src/modes/interactive/theme/theme.ts.
|
|
4
4
|
* Modifications: Source-synchronized theme port: retain pinned theme schema, variable/color
|
|
5
5
|
* resolution, built-in and custom loading, terminal detection, and layout defaults while constructing
|
|
@@ -382,8 +382,12 @@ export class PiEngineAdapter {
|
|
|
382
382
|
reloadBlockedResult() {
|
|
383
383
|
return this.#workflows.reloadBlockedResult();
|
|
384
384
|
}
|
|
385
|
-
executeWorkflow(request) {
|
|
386
|
-
|
|
385
|
+
async executeWorkflow(request) {
|
|
386
|
+
const result = await this.#workflows.executeWorkflow(request);
|
|
387
|
+
if (request.command === "tree" && result.outcome === "completed" && request.selection !== undefined) {
|
|
388
|
+
this.#refreshNavigatedSession(result.detail);
|
|
389
|
+
}
|
|
390
|
+
return result;
|
|
387
391
|
}
|
|
388
392
|
/**
|
|
389
393
|
* The theme the engine is configured with, in the engine's own grammar: a
|
|
@@ -575,6 +579,21 @@ export class PiEngineAdapter {
|
|
|
575
579
|
throw new Error("owned UI state commands belong to the owned UI layer, not the Pi engine adapter");
|
|
576
580
|
}
|
|
577
581
|
}
|
|
582
|
+
// Invariant: in-place tree navigation rebuilds derived content without clearing the editor draft.
|
|
583
|
+
#refreshNavigatedSession(editorText) {
|
|
584
|
+
const session = this.#engine.session;
|
|
585
|
+
if (!session)
|
|
586
|
+
return;
|
|
587
|
+
if (editorText && !this.#editor.text.trim()) {
|
|
588
|
+
this.#editor = { ...this.#editor, text: editorText, selection: null, cursorOffset: editorText.length };
|
|
589
|
+
}
|
|
590
|
+
this.#activeModel = readModel(session.model);
|
|
591
|
+
this.#reconcileActiveModelAvailability();
|
|
592
|
+
this.#thinkingLevel = readThinkingLevel(session.thinkingLevel);
|
|
593
|
+
this.#projection.assets.clear();
|
|
594
|
+
this.#setTranscript(this.#projection.rebuild(session.messages, "finalized"));
|
|
595
|
+
this.#emitView();
|
|
596
|
+
}
|
|
578
597
|
// Invariant: the runtime already advanced the generation and subscribed; this rebuilds what the view derives from a session.
|
|
579
598
|
#sessionReplaced(session) {
|
|
580
599
|
this.#delivery.discardObsolete(this.#engine.generation);
|