dsh-builtin-browser 1.0.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +61 -0
- package/README.md +1 -1
- package/assets/browser-panel-locales.mjs +37 -5
- package/assets/browser-policy.d.mts +29 -0
- package/assets/browser-policy.mjs +40 -0
- package/desktop-bridge/desktop-discovery.d.mts +1 -1
- package/desktop-bridge/desktop-discovery.mjs +59 -9
- package/desktop-bridge/desktop-identity.json +12 -0
- package/desktop-bridge/install.mjs +14 -7
- package/desktop-bridge/plugin-browser-bridge.js +19 -7
- package/docs/acceptance-2026-11-27.md +67 -0
- package/docs/architecture.md +1 -1
- package/docs/development.md +33 -4
- package/docs/dsh-0.2.3-host-patch-task.md +34 -0
- package/docs/hardcoding-audit.md +28 -8
- package/docs/known-issues.md +26 -0
- package/docs/limitations.md +6 -2
- package/docs/pr64-maintenance.md +1 -1
- package/docs/tool-reference.md +1 -1
- package/docs/user-guide.md +1 -1
- package/docs/v1.1.0-bu-data-batching-task.md +66 -0
- package/docs/v1.1.0-compat-hardcoding-task.md +85 -0
- package/dsh-builtin-browser-1.0.3-publish.tgz +0 -0
- package/dsh-builtin-browser-1.0.3.tgz +0 -0
- package/dsh-host-patch/README.md +4 -0
- package/dsh-host-patch/apply.mjs +61 -13
- package/dsh-host-patch/rc3-revision9.json.gz +0 -0
- package/dsh-host-patch/rc5-revision9.json.gz +0 -0
- package/dsh-host-patch/sources/main/0001-feat-sidebar-right-add-session-rendering-holds.patch.gz +0 -0
- package/dsh-host-patch/sources/main/0002-feat-desktop-load-trusted-profile-main-extensions.patch.gz +0 -0
- package/dsh-host-patch/sources/main/0003-feat-desktop-report-resolved-and-running-main-extens.patch.gz +0 -0
- package/dsh-host-patch/sources/main/0004-feat-desktop-compose-admitted-native-sidebar-views.patch.gz +0 -0
- package/dsh-host-patch/sources/main/0005-fix-client-admit-coded-browser-errors-in-native-comp.patch.gz +0 -0
- package/dsh-host-patch/sources/main/0006-fix-desktop-acknowledge-native-same-document-navigat.patch.gz +0 -0
- package/dsh-host-patch/sources/main/0007-fix-desktop-restore-auth-in-the-native-lease-partiti.patch.gz +0 -0
- package/dsh-host-patch/sources/main/0008-feat-desktop-adopt-native-children-in-admitted-sideb.patch.gz +0 -0
- package/dsh-host-patch/sources/main/0009-fix-desktop-publish-complete-native-child-close-reco.patch.gz +0 -0
- package/dsh-host-patch/sources/main/0010-fix-desktop-bundle-structured-errors-in-sandboxed-pr.patch.gz +0 -0
- package/dsh-host-patch/sources/main/0011-feat-desktop-offer-persistent-Sidebar-sessions-per-D.patch.gz +0 -0
- package/dsh-host-patch/sources/main/0012-feat-desktop-retain-sidebar-session-cookies-across-r.patch.gz +0 -0
- package/dsh-host-patch/sources/main/0013-fix-desktop-honor-sidebar-session-cookie-sidecar-con.patch.gz +0 -0
- package/dsh-host-patch/sources/main/0014-fix-desktop-retry-cookie-protection-without-failing-.patch.gz +0 -0
- package/dsh-host-patch/sources/main/0015-fix-desktop-preserve-host-only-cookie-identity-in-se.patch.gz +0 -0
- package/dsh-host-patch/sources/main/0016-fix-desktop-restore-session-cookies-before-checkpoin.patch.gz +0 -0
- package/dsh-host-patch/sources/main/0017-fix-desktop-restore-sidebar-cookies-once-before-gues.patch.gz +0 -0
- package/dsh-host-patch/sources/main/0018-fix-sidebar-right-follow-animated-native-slot-placem.patch.gz +0 -0
- package/dsh-host-patch/sources/manifest.json +218 -0
- package/dsh-host-patch/sources/rc3/0001-feat-sidebar-right-add-session-rendering-holds.patch.gz +0 -0
- package/dsh-host-patch/sources/rc3/0002-feat-desktop-load-trusted-profile-main-extensions.patch.gz +0 -0
- package/dsh-host-patch/sources/rc3/0003-feat-desktop-report-resolved-and-running-main-extens.patch.gz +0 -0
- package/dsh-host-patch/sources/rc3/0004-feat-desktop-compose-admitted-native-sidebar-views.patch.gz +0 -0
- package/dsh-host-patch/sources/rc3/0005-fix-client-admit-coded-browser-errors-in-native-comp.patch.gz +0 -0
- package/dsh-host-patch/sources/rc3/0006-fix-desktop-acknowledge-native-same-document-navigat.patch.gz +0 -0
- package/dsh-host-patch/sources/rc3/0007-fix-desktop-restore-auth-in-the-native-lease-partiti.patch.gz +0 -0
- package/dsh-host-patch/sources/rc3/0008-feat-desktop-adopt-native-children-in-admitted-sideb.patch.gz +0 -0
- package/dsh-host-patch/sources/rc3/0009-fix-desktop-publish-complete-native-child-close-reco.patch.gz +0 -0
- package/dsh-host-patch/sources/rc3/0010-fix-desktop-bundle-structured-errors-in-sandboxed-pr.patch.gz +0 -0
- package/dsh-host-patch/sources/rc3/0011-feat-desktop-offer-persistent-Sidebar-sessions-per-D.patch.gz +0 -0
- package/dsh-host-patch/sources/rc3/0012-feat-desktop-retain-sidebar-session-cookies-across-r.patch.gz +0 -0
- package/dsh-host-patch/sources/rc3/0013-fix-desktop-honor-sidebar-session-cookie-sidecar-con.patch.gz +0 -0
- package/dsh-host-patch/sources/rc3/0014-fix-desktop-retry-cookie-protection-without-failing-.patch.gz +0 -0
- package/dsh-host-patch/sources/rc3/0015-fix-desktop-preserve-host-only-cookie-identity-in-se.patch.gz +0 -0
- package/dsh-host-patch/sources/rc3/0016-fix-desktop-restore-session-cookies-before-checkpoin.patch.gz +0 -0
- package/dsh-host-patch/sources/rc3/0017-fix-desktop-restore-sidebar-cookies-once-before-gues.patch.gz +0 -0
- package/dsh-host-patch/sources/rc3/0018-fix-sidebar-right-follow-animated-native-slot-placem.patch.gz +0 -0
- package/dsh-host-patch/sources/rc5/0001-feat-sidebar-right-add-session-rendering-holds.patch.gz +0 -0
- package/dsh-host-patch/sources/rc5/0002-feat-desktop-load-trusted-profile-main-extensions.patch.gz +0 -0
- package/dsh-host-patch/sources/rc5/0003-feat-desktop-report-resolved-and-running-main-extens.patch.gz +0 -0
- package/dsh-host-patch/sources/rc5/0004-feat-desktop-compose-admitted-native-sidebar-views.patch.gz +0 -0
- package/dsh-host-patch/sources/rc5/0005-fix-client-admit-coded-browser-errors-in-native-comp.patch.gz +0 -0
- package/dsh-host-patch/sources/rc5/0006-fix-desktop-acknowledge-native-same-document-navigat.patch.gz +0 -0
- package/dsh-host-patch/sources/rc5/0007-fix-desktop-restore-auth-in-the-native-lease-partiti.patch.gz +0 -0
- package/dsh-host-patch/sources/rc5/0008-feat-desktop-adopt-native-children-in-admitted-sideb.patch.gz +0 -0
- package/dsh-host-patch/sources/rc5/0009-fix-desktop-publish-complete-native-child-close-reco.patch.gz +0 -0
- package/dsh-host-patch/sources/rc5/0010-fix-desktop-bundle-structured-errors-in-sandboxed-pr.patch.gz +0 -0
- package/dsh-host-patch/sources/rc5/0011-feat-desktop-offer-persistent-Sidebar-sessions-per-D.patch.gz +0 -0
- package/dsh-host-patch/sources/rc5/0012-feat-desktop-retain-sidebar-session-cookies-across-r.patch.gz +0 -0
- package/dsh-host-patch/sources/rc5/0013-fix-desktop-honor-sidebar-session-cookie-sidecar-con.patch.gz +0 -0
- package/dsh-host-patch/sources/rc5/0014-fix-desktop-retry-cookie-protection-without-failing-.patch.gz +0 -0
- package/dsh-host-patch/sources/rc5/0015-fix-desktop-preserve-host-only-cookie-identity-in-se.patch.gz +0 -0
- package/dsh-host-patch/sources/rc5/0016-fix-desktop-restore-session-cookies-before-checkpoin.patch.gz +0 -0
- package/dsh-host-patch/sources/rc5/0017-fix-desktop-restore-sidebar-cookies-once-before-gues.patch.gz +0 -0
- package/dsh-host-patch/sources/rc5/0018-fix-sidebar-right-follow-animated-native-slot-placem.patch.gz +0 -0
- package/dsh-host-patch/sources/series.json +260 -0
- package/dsh-host-patch/tauri/desktop-main.cjs +62 -0
- package/dsh-host-patch/tauri/sidebar-session.cjs +104 -0
- package/dsh-host-patch/tauri-revision1.json +39 -0
- package/dsh-host-patch/tauri.json +43 -0
- package/dsh-host-patch/v023-alpha2.json +153 -0
- package/lib/browser/anti-bot.js +215 -0
- package/lib/browser/deep-dom.js +39 -0
- package/lib/browser/runtime.js +15 -0
- package/lib/browser/takeover-target.js +13 -6
- package/lib/browser/types.js +30 -1
- package/lib/browser-electron/authenticated-route.js +16 -2
- package/lib/browser-electron/automatic-maintenance.js +16 -10
- package/lib/browser-electron/bridge-connection.js +3 -8
- package/lib/browser-electron/bridge-install.js +2 -1
- package/lib/browser-electron/bridge-status.js +55 -26
- package/lib/browser-electron/desktop-bridge-host.js +7 -6
- package/lib/browser-electron/desktop-identity.js +28 -5
- package/lib/browser-electron/desktop-shell.js +64 -0
- package/lib/browser-electron/electron-provision.js +105 -18
- package/lib/browser-electron/entry.js +129 -46
- package/lib/browser-electron/extension-browser.js +4 -4
- package/lib/browser-electron/foreground-watch.js +134 -0
- package/lib/browser-electron/guest-cookie-jar.js +13 -13
- package/lib/browser-electron/guest-route.js +181 -32
- package/lib/browser-electron/guest-runtime.js +61 -10
- package/lib/browser-electron/guest-storage.js +2 -2
- package/lib/browser-electron/history-store.js +1 -5
- package/lib/browser-electron/host-main.js +8 -4
- package/lib/browser-electron/host-patch-maintenance.js +14 -8
- package/lib/browser-electron/maintenance-route.js +2 -1
- package/lib/browser-electron/missing-system-browser.js +5 -9
- package/lib/browser-electron/preferred-browser.js +7 -3
- package/lib/browser-electron/preview-route.js +9 -13
- package/lib/browser-electron/process-ownership.js +1 -1
- package/lib/browser-electron/profile-command.js +2 -1
- package/lib/browser-electron/profile-extension.js +5 -0
- package/lib/browser-electron/profile-lease.js +152 -47
- package/lib/browser-electron/provider-core.js +527 -0
- package/lib/browser-electron/provider-interaction.js +963 -0
- package/lib/browser-electron/provider-media.js +518 -0
- package/lib/browser-electron/provider-navigation.js +301 -0
- package/lib/browser-electron/provider-observation.js +623 -0
- package/lib/browser-electron/provider-tabs.js +372 -0
- package/lib/browser-electron/provider.js +150 -3301
- package/lib/browser-electron/reference-route.js +9 -18
- package/lib/browser-electron/remote-host.js +79 -34
- package/lib/browser-electron/runtime-status.js +56 -6
- package/lib/browser-electron/settings-store.js +3 -6
- package/lib/browser-electron/sidebar-only-host.js +1 -1
- package/lib/browser-electron/system-browser.js +539 -172
- package/lib/browser-electron/tauri-host.js +208 -0
- package/lib/browser-electron/virtual-cursor.js +23 -13
- package/lib/browser-reference/service.js +22 -4
- package/lib/browser-reference/web-sources.js +1 -1
- package/lib/client.js +43409 -0
- package/lib/compat/host-features.js +75 -0
- package/lib/reference-source.js +1 -1
- package/lib/reference-text.js +23 -1
- package/lib/takeover-protocol.js +1 -1
- package/lib/tool-browser/block-recovery.js +69 -0
- package/lib/tool-browser/code-tool.js +170 -19
- package/lib/tool-browser/code-worker.js +115 -20
- package/lib/tool-browser/errors.js +34 -0
- package/lib/tool-browser/index.js +66 -3593
- package/lib/tool-browser/page-probe.js +227 -28
- package/lib/tool-browser/panel-page.js +2 -1
- package/lib/tool-browser/probe-client.js +157 -0
- package/lib/tool-browser/screenshot-annotations.js +108 -0
- package/lib/tool-browser/state.js +337 -0
- package/lib/tool-browser/takeover.js +1 -1
- package/lib/tool-browser/tools-debug.js +862 -0
- package/lib/tool-browser/tools-interaction.js +993 -0
- package/lib/tool-browser/tools-navigation.js +807 -0
- package/lib/tool-browser/tools-observation.js +461 -0
- package/lib/tool-browser/tools-reference.js +293 -0
- package/lib/web-guest.js +1 -0
- package/package.json +16 -54
- package/README.en.md +0 -89
- package/browser-extension/constants.mjs +0 -20
- package/browser-extension/controller.mjs +0 -293
- package/browser-extension/locales.mjs +0 -15
- package/browser-extension/manifest.json +0 -12
- package/browser-extension/options.html +0 -14
- package/browser-extension/options.mjs +0 -9
- package/browser-extension/permission-guard.mjs +0 -13
- package/browser-extension/worker.mjs +0 -74
- package/dist/client.cjs +0 -43167
- package/lib/browser-electron/package-removal.js +0 -5
- package/lib/browser-reference/submission-receipts.js +0 -139
- package/scripts/build.mjs +0 -66
- package/scripts/bundle-host.mjs +0 -28
- package/scripts/fix-exports.mjs +0 -50
- package/scripts/install-electron.mjs +0 -51
- package/scripts/verify-exports.mjs +0 -47
- package/scripts/verify-preview-sdk.mjs +0 -93
- package/skills/dsh-builtin-browser/SKILL.md +0 -73
- package/skills/dsh-builtin-browser/references/batch.md +0 -53
- package/skills/dsh-builtin-browser/references/deliver.md +0 -31
- package/skills/dsh-builtin-browser/references/locate.md +0 -11
- package/skills/dsh-builtin-browser/references/recover.md +0 -11
- package/skills/dsh-builtin-browser/references/verify.md +0 -13
- package/skills/dsh-debug-host/SKILL.md +0 -56
- package/skills/dsh-debug-self/SKILL.md +0 -50
- package/src/bridge-compatibility.ts +0 -39
- package/src/browser/handles.ts +0 -89
- package/src/browser/runtime.ts +0 -560
- package/src/browser/takeover-target.ts +0 -36
- package/src/browser/types.ts +0 -817
- package/src/browser-electron/authenticated-route.ts +0 -84
- package/src/browser-electron/automatic-maintenance.ts +0 -726
- package/src/browser-electron/bridge-auto.ts +0 -159
- package/src/browser-electron/bridge-connection.ts +0 -385
- package/src/browser-electron/bridge-endpoint.ts +0 -129
- package/src/browser-electron/bridge-install.ts +0 -289
- package/src/browser-electron/bridge-maintenance.ts +0 -189
- package/src/browser-electron/bridge-status.ts +0 -347
- package/src/browser-electron/desktop-bridge-host.ts +0 -251
- package/src/browser-electron/desktop-identity.ts +0 -320
- package/src/browser-electron/document-readiness.ts +0 -45
- package/src/browser-electron/electron-provision.ts +0 -261
- package/src/browser-electron/entry.ts +0 -1301
- package/src/browser-electron/ephemeral-profile.ts +0 -189
- package/src/browser-electron/extension-browser.ts +0 -223
- package/src/browser-electron/extension-setup.ts +0 -67
- package/src/browser-electron/file-write.ts +0 -31
- package/src/browser-electron/guest-cookie-jar.ts +0 -176
- package/src/browser-electron/guest-cookie-store.ts +0 -59
- package/src/browser-electron/guest-css-runtime.ts +0 -76
- package/src/browser-electron/guest-css.ts +0 -68
- package/src/browser-electron/guest-route.ts +0 -568
- package/src/browser-electron/guest-runtime.ts +0 -357
- package/src/browser-electron/guest-storage-runtime.ts +0 -54
- package/src/browser-electron/guest-storage.ts +0 -117
- package/src/browser-electron/history-store.ts +0 -227
- package/src/browser-electron/host-main.ts +0 -1381
- package/src/browser-electron/host-patch-maintenance.ts +0 -112
- package/src/browser-electron/http-body.ts +0 -65
- package/src/browser-electron/json-reply.ts +0 -47
- package/src/browser-electron/maintenance-broker.ts +0 -166
- package/src/browser-electron/maintenance-lifecycle.ts +0 -91
- package/src/browser-electron/maintenance-route.ts +0 -67
- package/src/browser-electron/missing-system-browser.ts +0 -113
- package/src/browser-electron/open-slot.ts +0 -49
- package/src/browser-electron/package-removal.ts +0 -4
- package/src/browser-electron/paths.ts +0 -25
- package/src/browser-electron/preferred-browser.ts +0 -120
- package/src/browser-electron/preview-route.ts +0 -218
- package/src/browser-electron/process-ownership.ts +0 -168
- package/src/browser-electron/process.ts +0 -23
- package/src/browser-electron/profile-checkpoint.ts +0 -187
- package/src/browser-electron/profile-command.ts +0 -46
- package/src/browser-electron/profile-extension.ts +0 -124
- package/src/browser-electron/profile-lease.ts +0 -115
- package/src/browser-electron/profile-residue.ts +0 -49
- package/src/browser-electron/provider.ts +0 -4571
- package/src/browser-electron/reference-route.ts +0 -608
- package/src/browser-electron/remote-host.ts +0 -1462
- package/src/browser-electron/rpc-input.ts +0 -13
- package/src/browser-electron/rpc-ops.ts +0 -41
- package/src/browser-electron/runtime-diagnostics.ts +0 -38
- package/src/browser-electron/runtime-route.ts +0 -105
- package/src/browser-electron/runtime-status.ts +0 -242
- package/src/browser-electron/settings-route.ts +0 -64
- package/src/browser-electron/settings-store.ts +0 -589
- package/src/browser-electron/shortcuts-route.ts +0 -112
- package/src/browser-electron/sidebar-only-host.ts +0 -298
- package/src/browser-electron/startpage-shortcuts.ts +0 -213
- package/src/browser-electron/system-browser.ts +0 -1497
- package/src/browser-electron/timing.ts +0 -16
- package/src/browser-electron/virtual-cursor.ts +0 -152
- package/src/browser-electron/windows-system.ts +0 -24
- package/src/browser-reference/delivery.ts +0 -384
- package/src/browser-reference/entry.ts +0 -631
- package/src/browser-reference/export.ts +0 -339
- package/src/browser-reference/import.ts +0 -303
- package/src/browser-reference/page-script.ts +0 -1537
- package/src/browser-reference/service.ts +0 -1315
- package/src/browser-reference/store.ts +0 -172
- package/src/browser-reference/submission-receipts.ts +0 -122
- package/src/browser-reference/text-quote.ts +0 -219
- package/src/browser-reference/types.ts +0 -195
- package/src/browser-reference/visible.ts +0 -367
- package/src/browser-reference/web-sources.ts +0 -103
- package/src/client/browser/BrowserController.ts +0 -693
- package/src/client/browser/BrowserFrame.ts +0 -78
- package/src/client/browser/BrowserNavigation.ts +0 -169
- package/src/client/browser/BrowserPage.ts +0 -23
- package/src/client/browser/BrowserPersistence.ts +0 -44
- package/src/client/browser/IframeImpl.ts +0 -176
- package/src/client/browser/child-tabs.ts +0 -14
- package/src/client/browser/iframe-reference.ts +0 -67
- package/src/client/browser/initialization.ts +0 -262
- package/src/client/browser/omnibox.ts +0 -243
- package/src/client/browser/store.ts +0 -38
- package/src/client/browser/takeover-channel.ts +0 -72
- package/src/client/browser/url.ts +0 -46
- package/src/client/browser/web-reference-source.ts +0 -52
- package/src/client/css-modules.d.ts +0 -4
- package/src/client/definition.tsx +0 -30
- package/src/client/electron/ElectronWebViewImpl.ts +0 -364
- package/src/client/electron/ElectronWebviewPresentation.ts +0 -138
- package/src/client/electron/NativeChildPresentation.ts +0 -45
- package/src/client/electron/NativeViewPage.ts +0 -251
- package/src/client/electron/pages.ts +0 -23
- package/src/client/electron/reference-overlay.ts +0 -53
- package/src/client/electron/workspace.ts +0 -33
- package/src/client/index.ts +0 -293
- package/src/client/locales.ts +0 -857
- package/src/client/pages.ts +0 -28
- package/src/client/reference/client/BrowserRefLink.tsx +0 -142
- package/src/client/reference/client/draft-reference.ts +0 -167
- package/src/client/reference/client/index.ts +0 -7
- package/src/client/reference/client/ordered-submission.ts +0 -108
- package/src/client/reference/client/pending-delivery.ts +0 -216
- package/src/client/reference/client/plugin.ts +0 -189
- package/src/client/reference/client/production/ReferenceCapsules.tsx +0 -345
- package/src/client/reference/client/production/ReferenceDock.module.css +0 -193
- package/src/client/reference/client/production/ReferenceDock.tsx +0 -6
- package/src/client/reference/client/production/ReferenceFeedback.tsx +0 -15
- package/src/client/reference/client/production/ReferenceMath.tsx +0 -44
- package/src/client/reference/client/production/ReferenceText.tsx +0 -36
- package/src/client/reference/client/production/assembly.ts +0 -471
- package/src/client/reference/client/production/asset-store.ts +0 -144
- package/src/client/reference/client/production/availability.ts +0 -74
- package/src/client/reference/client/production/bytes.ts +0 -36
- package/src/client/reference/client/production/delivery-client.ts +0 -211
- package/src/client/reference/client/production/draft-adapter.ts +0 -508
- package/src/client/reference/client/production/http-transport.ts +0 -217
- package/src/client/reference/client/production/production-submission.ts +0 -310
- package/src/client/reference/client/production/protocol.ts +0 -231
- package/src/client/reference/client/production/reference-card.ts +0 -240
- package/src/client/reference/client/production/reference-labels.ts +0 -29
- package/src/client/reference/client/production/reply-link-bridge.ts +0 -222
- package/src/client/reference/client/production/reveal.ts +0 -215
- package/src/client/reference/client/production/runtime.ts +0 -1101
- package/src/client/reference/client/production/snapshot-adapter.ts +0 -154
- package/src/client/reference/client/production/source-marker.ts +0 -63
- package/src/client/reference/client/production/source-opener.ts +0 -55
- package/src/client/reference/client/production/styles.ts +0 -104
- package/src/client/reference/client/production/user-text-rule.ts +0 -58
- package/src/client/reference/client/reveal.ts +0 -107
- package/src/client/reference/client/scheme.ts +0 -114
- package/src/client/reference/client/types.ts +0 -168
- package/src/client/reference/css-modules.d.ts +0 -4
- package/src/client/reference/index.ts +0 -11
- package/src/client/reference-capture-owner.ts +0 -162
- package/src/client/reference-intents.ts +0 -36
- package/src/client/settings/index.ts +0 -34
- package/src/client/settings/panel.ts +0 -2657
- package/src/client/shortcut-open.ts +0 -30
- package/src/client/startpage/binding.ts +0 -99
- package/src/client/startpage/controller.ts +0 -303
- package/src/client/startpage/model.ts +0 -279
- package/src/client/view/Browser.module.css +0 -751
- package/src/client/view/BrowserBody.tsx +0 -314
- package/src/client/view/BrowserPresentation.ts +0 -9
- package/src/client/view/BrowserTitle.tsx +0 -17
- package/src/client/view/IframePresentation.ts +0 -344
- package/src/client/view/StartPage.tsx +0 -597
- package/src/client/view/TakeoverBanner.tsx +0 -21
- package/src/index.ts +0 -110
- package/src/reference-owner.ts +0 -5
- package/src/reference-page.ts +0 -9
- package/src/reference-source.ts +0 -3
- package/src/reference-text.ts +0 -197
- package/src/startpage-settings.ts +0 -103
- package/src/startpage.ts +0 -71
- package/src/takeover-protocol.ts +0 -19
- package/src/tool-browser/code-tool.ts +0 -401
- package/src/tool-browser/code-worker.ts +0 -639
- package/src/tool-browser/element-fields.ts +0 -167
- package/src/tool-browser/index.ts +0 -3733
- package/src/tool-browser/page-probe.ts +0 -474
- package/src/tool-browser/panel-page.ts +0 -124
- package/src/tool-browser/screenshot-image.ts +0 -49
- package/src/tool-browser/takeover.ts +0 -198
- package/src/types/electron-shim.d.ts +0 -144
- package/src/types.ts +0 -85
- package/src/web-guest.ts +0 -34
- package/tools/accept-desktop.mjs +0 -148
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
/** Main-owned native presentation; a DOM viewport is an address, never a guest. */
|
|
2
|
-
import { createSnapshotStore } from '@deepseek-ai/dsh-client-store'
|
|
3
|
-
import type { TabId } from '@deepseek-ai/dsh-client-ui-dockkit'
|
|
4
|
-
import type { DesktopNativeViews, DesktopNativeLease, DesktopNativeState, SidebarNativeSlot } from '../../types.ts'
|
|
5
|
-
import { tabWireId } from '../../browser/handles.ts'
|
|
6
|
-
import type { BrowserPageOptions, BrowserPage } from '../browser/BrowserPage.ts'
|
|
7
|
-
import { emptyBrowserFrame, type BrowserFrame, type BrowserFrameState, type BrowserCarrierState } from '../browser/BrowserFrame.ts'
|
|
8
|
-
import type { BrowserPresentation } from '../view/BrowserPresentation.ts'
|
|
9
|
-
import type { BrowserTarget } from '../browser/url.ts'
|
|
10
|
-
import { parseBrowserAddress } from '../browser/url.ts'
|
|
11
|
-
import { browserAddressCheckpoint } from '../browser/BrowserPersistence.ts'
|
|
12
|
-
import { installReferenceOverlay } from './reference-overlay.ts'
|
|
13
|
-
import type { NativeChildPresentation } from './NativeChildPresentation.ts'
|
|
14
|
-
|
|
15
|
-
export type NativeSlotRegistrar = (tab: TabId, scope: string, viewportId: string, signal: AbortSignal) => Promise<SidebarNativeSlot>
|
|
16
|
-
|
|
17
|
-
function failure(code: string): Error { return Object.assign(new Error(code), { code }) }
|
|
18
|
-
|
|
19
|
-
/** Native leases share one attachment lifetime and never create a webview or another carrier. */
|
|
20
|
-
export class NativeViewPage implements BrowserFrame, BrowserPresentation {
|
|
21
|
-
private readonly state = createSnapshotStore<BrowserFrameState>(emptyBrowserFrame())
|
|
22
|
-
private readonly carrier = createSnapshotStore<BrowserCarrierState>({ stage: 'idle' })
|
|
23
|
-
private attachment: { viewport: string; lifetime: AbortController } | undefined
|
|
24
|
-
private mounted: { viewport: string } | undefined
|
|
25
|
-
private lease: DesktopNativeLease | undefined
|
|
26
|
-
private unsubscribe: (() => void) | undefined
|
|
27
|
-
private pending: BrowserTarget | undefined
|
|
28
|
-
private initialization: Promise<void> | undefined
|
|
29
|
-
private readonly releases = new Set<Promise<void>>()
|
|
30
|
-
private disposed = false
|
|
31
|
-
private revision = 0
|
|
32
|
-
private attached = false
|
|
33
|
-
private disposal: Promise<void> | undefined
|
|
34
|
-
private documentLifetime: AbortController | undefined
|
|
35
|
-
private releaseChildOwner: (() => void) | undefined
|
|
36
|
-
private unsubscribeChildren: (() => void) | undefined
|
|
37
|
-
|
|
38
|
-
constructor(private readonly options: BrowserPageOptions, private readonly native: DesktopNativeViews,
|
|
39
|
-
private readonly register: NativeSlotRegistrar, private readonly workspace: (signal: AbortSignal) => Promise<string>,
|
|
40
|
-
private readonly owner: string, private readonly capture?: (intent: object, owner?: string) => Promise<void>,
|
|
41
|
-
private readonly children?: NativeChildPresentation) {}
|
|
42
|
-
|
|
43
|
-
readonly lifecycle = { getSnapshot: (): BrowserCarrierState => this.carrier.getSnapshot(),
|
|
44
|
-
subscribe: (listener: () => void): (() => void) => this.carrier.subscribe(listener) }
|
|
45
|
-
getSnapshot = (): BrowserFrameState => this.state.getSnapshot()
|
|
46
|
-
subscribe = (listener: () => void): (() => void) => this.state.subscribe(listener)
|
|
47
|
-
|
|
48
|
-
acknowledge(requestId: string): void { this.state.set({ ...this.state.getSnapshot(), navigationId: requestId }) }
|
|
49
|
-
|
|
50
|
-
mount(viewport: string): () => void {
|
|
51
|
-
this.detach()
|
|
52
|
-
if (this.disposed) return () => {}
|
|
53
|
-
const mounted = { viewport }
|
|
54
|
-
this.mounted = mounted
|
|
55
|
-
const element = document.getElementById(viewport)
|
|
56
|
-
if (element !== null) element.dataset.sidebarBrowserFrame = 'native'
|
|
57
|
-
this.pending ??= this.state.getSnapshot().target
|
|
58
|
-
this.initialize()
|
|
59
|
-
return () => { if (this.mounted === mounted) this.detach() }
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
loadUrl(target: BrowserTarget, navigationId?: string): void {
|
|
63
|
-
if (this.disposed) return
|
|
64
|
-
this.documentLifetime?.abort()
|
|
65
|
-
this.revision++
|
|
66
|
-
this.pending = target
|
|
67
|
-
this.state.set({ ...this.state.getSnapshot(), target, navigationId, address: 'requested', loading: true, documentReady: false, error: undefined })
|
|
68
|
-
this.options.persist(browserAddressCheckpoint(target, this.revision))
|
|
69
|
-
if (this.lease !== undefined && this.attached) this.navigatePending()
|
|
70
|
-
else this.initialize()
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
goBack(): void { void this.history(-1) }
|
|
74
|
-
goForward(): void { void this.history(1) }
|
|
75
|
-
reload(): void {
|
|
76
|
-
if (this.disposed) return
|
|
77
|
-
if (this.lease === undefined) {
|
|
78
|
-
const current = this.state.getSnapshot()
|
|
79
|
-
if (current.target !== undefined) this.loadUrl(current.target, current.navigationId)
|
|
80
|
-
return
|
|
81
|
-
}
|
|
82
|
-
void this.command('Page.reload').catch(error => this.fail(error))
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
dispose(): Promise<void> {
|
|
86
|
-
if (this.disposal !== undefined) return this.disposal
|
|
87
|
-
this.disposed = true
|
|
88
|
-
this.detach()
|
|
89
|
-
this.disposal = (async () => { await this.initialization; await Promise.all(this.releases) })()
|
|
90
|
-
return this.disposal
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
private detach(): void {
|
|
94
|
-
this.mounted = undefined
|
|
95
|
-
this.releaseAttachment()
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
private releaseAttachment(): void {
|
|
99
|
-
this.releaseChildOwner?.(); this.releaseChildOwner = undefined
|
|
100
|
-
this.unsubscribeChildren?.(); this.unsubscribeChildren = undefined
|
|
101
|
-
this.documentLifetime?.abort()
|
|
102
|
-
this.documentLifetime = undefined
|
|
103
|
-
this.attachment?.lifetime.abort()
|
|
104
|
-
this.attachment = undefined
|
|
105
|
-
this.attached = false
|
|
106
|
-
this.unsubscribe?.(); this.unsubscribe = undefined
|
|
107
|
-
const lease = this.lease; this.lease = undefined
|
|
108
|
-
if (lease !== undefined) this.release(lease)
|
|
109
|
-
this.carrier.set({ stage: 'idle' })
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
private release(lease: DesktopNativeLease): void {
|
|
113
|
-
const pending = this.native.release(lease).finally(() => { this.releases.delete(pending) })
|
|
114
|
-
this.releases.add(pending)
|
|
115
|
-
void pending.catch(error => console.error('Native Sidebar release failed', error))
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
private initialize(): void {
|
|
119
|
-
const child = this.options.tabId === undefined ? undefined : this.children?.child(this.options.tabId)
|
|
120
|
-
if (this.mounted === undefined || (this.pending === undefined && child === undefined)) return
|
|
121
|
-
const mounted = this.mounted
|
|
122
|
-
this.attachment ??= { viewport: this.mounted.viewport, lifetime: new AbortController() }
|
|
123
|
-
const attachment = this.attachment
|
|
124
|
-
if (attachment === undefined || this.initialization !== undefined || this.lease !== undefined) return
|
|
125
|
-
this.initialization = (async () => {
|
|
126
|
-
await Promise.all(this.releases)
|
|
127
|
-
const signal = attachment.lifetime.signal
|
|
128
|
-
signal.throwIfAborted()
|
|
129
|
-
const tab = this.options.tabId
|
|
130
|
-
if (tab === undefined) throw failure('BROWSER_OWNER_UNKNOWN')
|
|
131
|
-
const scope = tabWireId({ owner: this.owner, session: 'sidebar', tab })
|
|
132
|
-
const slot = await this.register(tab, scope, attachment.viewport, signal)
|
|
133
|
-
const reservation = child === undefined
|
|
134
|
-
? await (async () => {
|
|
135
|
-
const workspace = await this.workspace(signal)
|
|
136
|
-
return this.native.persistentSession === true ? this.native.acquire(scope, workspace, true) : this.native.acquire(scope, workspace)
|
|
137
|
-
})() : { lease: child.lease }
|
|
138
|
-
const { lease } = reservation
|
|
139
|
-
if (signal.aborted) { this.release(lease); return }
|
|
140
|
-
this.lease = lease
|
|
141
|
-
this.unsubscribe = this.native.onState(lease, event => { this.observe(lease, event) })
|
|
142
|
-
if (child === undefined) await this.native.attach(lease, slot)
|
|
143
|
-
else {
|
|
144
|
-
const children = this.children
|
|
145
|
-
if (children === undefined) throw failure('BROWSER_NATIVE_CHILD_UNAVAILABLE')
|
|
146
|
-
const adopted = await children.api.adopt(child.request, slot)
|
|
147
|
-
if (adopted.child !== scope || adopted.lease !== lease) throw failure('BROWSER_HANDLE_STALE')
|
|
148
|
-
this.pending = undefined
|
|
149
|
-
}
|
|
150
|
-
signal.throwIfAborted()
|
|
151
|
-
this.attached = true
|
|
152
|
-
if (this.children !== undefined) {
|
|
153
|
-
this.unsubscribeChildren = this.children.listen(scope)
|
|
154
|
-
const release = await this.children.api.registerOwner(scope, slot)
|
|
155
|
-
if (signal.aborted) { release(); return }
|
|
156
|
-
this.releaseChildOwner = release
|
|
157
|
-
}
|
|
158
|
-
this.navigatePending()
|
|
159
|
-
})().catch(error => {
|
|
160
|
-
if (!attachment.lifetime.signal.aborted) this.fail(error)
|
|
161
|
-
}).finally(() => {
|
|
162
|
-
this.initialization = undefined
|
|
163
|
-
if (this.mounted !== undefined && this.mounted !== mounted && (this.pending !== undefined || (this.options.tabId !== undefined && this.children?.child(this.options.tabId) !== undefined))) this.initialize()
|
|
164
|
-
})
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
private navigatePending(): void {
|
|
168
|
-
const target = this.pending
|
|
169
|
-
if (target === undefined) return
|
|
170
|
-
this.pending = undefined
|
|
171
|
-
void this.command('Page.navigate', { url: target.url }).catch(error => this.fail(error))
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
private observe(lease: DesktopNativeLease, event: DesktopNativeState): void {
|
|
175
|
-
if (this.lease !== lease || this.disposed) return
|
|
176
|
-
this.documentLifetime?.abort()
|
|
177
|
-
if (event.stage === 'failed' || event.stage === 'closed') { this.fail(failure(event.code ?? 'BROWSER_GUEST_CLOSED')); return }
|
|
178
|
-
this.carrier.set({ stage: 'guest', guestId: lease, generation: event.generation })
|
|
179
|
-
this.state.set({ ...this.state.getSnapshot(), loading: true, documentReady: false })
|
|
180
|
-
if (event.stage !== 'document' || !event.frameId || !event.loaderId) return
|
|
181
|
-
const revision = this.revision
|
|
182
|
-
void (async () => {
|
|
183
|
-
const answer = await this.command('Runtime.evaluate', { expression: '({url:location.href,title:document.title})', returnByValue: true }) as { result?: { value?: { url?: string; title?: string } } }
|
|
184
|
-
const history = await this.command('Page.getNavigationHistory') as { currentIndex: number; entries: readonly object[] }
|
|
185
|
-
if (this.lease !== lease || revision !== this.revision || this.carrier.getSnapshot().generation !== event.generation) return
|
|
186
|
-
if (answer.result?.value?.url === 'about:blank' && this.options.tabId !== undefined && this.children?.child(this.options.tabId) !== undefined) {
|
|
187
|
-
this.carrier.set({ stage: 'ready', guestId: lease, generation: event.generation, frameId: event.frameId, loaderId: event.loaderId })
|
|
188
|
-
this.state.set({ ...this.state.getSnapshot(), target: { kind: 'blank', url: 'about:blank', title: answer.result.value.title ?? '' },
|
|
189
|
-
address: 'observed', loading: false, documentReady: true,
|
|
190
|
-
canGoBack: history.currentIndex > 0, canGoForward: history.currentIndex < history.entries.length - 1, error: undefined })
|
|
191
|
-
return
|
|
192
|
-
}
|
|
193
|
-
const observed = parseBrowserAddress(answer.result?.value?.url ?? '', undefined)
|
|
194
|
-
if (!observed.ok) throw failure('BROWSER_DOCUMENT_UNACKNOWLEDGED')
|
|
195
|
-
const target = { ...observed.target, ...typeof answer.result?.value?.title === 'string' ? { title: answer.result.value.title } : {} }
|
|
196
|
-
this.carrier.set({ stage: 'ready', guestId: lease, generation: event.generation, frameId: event.frameId, loaderId: event.loaderId })
|
|
197
|
-
this.state.set({ ...this.state.getSnapshot(), target, address: 'observed', loading: false, documentReady: true,
|
|
198
|
-
canGoBack: history.currentIndex > 0, canGoForward: history.currentIndex < history.entries.length - 1, error: undefined })
|
|
199
|
-
this.options.persist(browserAddressCheckpoint(target, this.revision))
|
|
200
|
-
const capture = this.capture
|
|
201
|
-
const attachment = this.attachment
|
|
202
|
-
if (capture !== undefined && attachment !== undefined) {
|
|
203
|
-
this.documentLifetime = new AbortController()
|
|
204
|
-
const signal = AbortSignal.any([attachment.lifetime.signal, this.documentLifetime.signal])
|
|
205
|
-
installReferenceOverlay(async expression => {
|
|
206
|
-
signal.throwIfAborted()
|
|
207
|
-
const answer = await this.command('Runtime.evaluate', { expression, returnByValue: true, awaitPromise: true }) as {
|
|
208
|
-
result?: { value?: unknown }; exceptionDetails?: object
|
|
209
|
-
}
|
|
210
|
-
if (answer.exceptionDetails !== undefined) throw failure('BROWSER_DOCUMENT_UNACKNOWLEDGED')
|
|
211
|
-
return answer.result?.value
|
|
212
|
-
}, intent => capture(intent, this.owner), signal)
|
|
213
|
-
}
|
|
214
|
-
})().catch(error => {
|
|
215
|
-
if (this.lease === lease && revision === this.revision && this.carrier.getSnapshot().generation === event.generation) this.fail(error)
|
|
216
|
-
})
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
private command(method: string, params?: object): Promise<object> {
|
|
220
|
-
if (this.lease === undefined) return Promise.reject(failure('BROWSER_GUEST_CLOSED'))
|
|
221
|
-
return this.native.command(this.lease, method, params)
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
private async history(delta: number): Promise<void> {
|
|
225
|
-
try {
|
|
226
|
-
const history = await this.command('Page.getNavigationHistory') as { currentIndex: number; entries: readonly { id: number }[] }
|
|
227
|
-
const entry = history.entries[history.currentIndex + delta]
|
|
228
|
-
if (entry !== undefined) await this.command('Page.navigateToHistoryEntry', { entryId: entry.id })
|
|
229
|
-
} catch (error) { this.fail(error) }
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
private fail(error: unknown): void {
|
|
233
|
-
const detail = error instanceof Error ? error.message : String(error)
|
|
234
|
-
this.releaseAttachment()
|
|
235
|
-
this.pending = undefined
|
|
236
|
-
if (this.disposed) return
|
|
237
|
-
this.carrier.set({ stage: 'failed', reason: 'guest-bootstrap-failed', detail })
|
|
238
|
-
const code = error instanceof Error && 'code' in error && typeof error.code === 'string' ? error.code : 'BROWSER_NATIVE_SURFACE_UNAVAILABLE'
|
|
239
|
-
this.state.set({ ...this.state.getSnapshot(), loading: false, documentReady: false, error: { code, description: detail } })
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
export function createNativePage(options: BrowserPageOptions, native: DesktopNativeViews, register: NativeSlotRegistrar,
|
|
244
|
-
workspace: (signal: AbortSignal) => Promise<string>, owner: string,
|
|
245
|
-
capture?: (intent: object, owner?: string) => Promise<void>, children?: NativeChildPresentation): BrowserPage {
|
|
246
|
-
const page = new NativeViewPage(options, native, register, workspace, owner, capture, children)
|
|
247
|
-
const child = options.tabId === undefined ? undefined : children?.child(options.tabId)
|
|
248
|
-
return { frame: page, presentation: page, ...child === undefined ? {} : {
|
|
249
|
-
adoption: { url: child.url, acknowledge: (requestId: string) => { page.acknowledge(requestId) } },
|
|
250
|
-
} }
|
|
251
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** Assemble Electron navigation and presentation behind the shared BrowserPage interface. */
|
|
2
|
-
import type { DesktopBrowserBridge } from '../../types.ts'
|
|
3
|
-
import type { BrowserPage, BrowserPageOptions } from '../browser/BrowserPage.ts'
|
|
4
|
-
import { ElectronWebViewImpl } from './ElectronWebViewImpl.ts'
|
|
5
|
-
import { ElectronWebviewPresentation } from './ElectronWebviewPresentation.ts'
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Assemble an idle Electron provider; guest creation waits for mounting and navigation.
|
|
9
|
-
* @param options - checkpoint and source-tab callbacks.
|
|
10
|
-
* @param bridge - desktop-only transport.
|
|
11
|
-
* @param workspace - storage account resolver.
|
|
12
|
-
* @returns separate navigation and presentation faces.
|
|
13
|
-
*/
|
|
14
|
-
export function createElectronPage(options: BrowserPageOptions, bridge: DesktopBrowserBridge,
|
|
15
|
-
workspace: (signal: AbortSignal) => Promise<string>, sessionId: string,
|
|
16
|
-
capture?: (intent: object, owner?: string) => Promise<void>): BrowserPage {
|
|
17
|
-
const presentation = new ElectronWebviewPresentation({
|
|
18
|
-
mounted: () => { frame.attach() },
|
|
19
|
-
unmounted: () => { frame.detach() },
|
|
20
|
-
})
|
|
21
|
-
const frame = new ElectronWebViewImpl(options, bridge, workspace, presentation, sessionId, capture)
|
|
22
|
-
return { frame, presentation }
|
|
23
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { hostMessages } from '../../../assets/browser-messages.mjs'
|
|
2
|
-
import { overlayScript, standaloneScript } from '../../browser-reference/entry.ts'
|
|
3
|
-
import { noticeScript } from '../../browser-reference/page-script.ts'
|
|
4
|
-
import { reportReferenceCaptureFailure } from '../reference-intents.ts'
|
|
5
|
-
|
|
6
|
-
const takeIntents = `JSON.stringify((function () {
|
|
7
|
-
var intents = []
|
|
8
|
-
if (typeof window.__dshRefTake !== 'function') return intents
|
|
9
|
-
for (var i = 0; i < 100; i++) {
|
|
10
|
-
var intent = window.__dshRefTake()
|
|
11
|
-
if (intent == null) break
|
|
12
|
-
intents.push(intent)
|
|
13
|
-
}
|
|
14
|
-
return intents
|
|
15
|
-
})())`
|
|
16
|
-
|
|
17
|
-
/** One document's overlay and serialized polling loop; navigation errors are expected. */
|
|
18
|
-
export function installReferenceOverlay(execute: (source: string) => Promise<unknown>,
|
|
19
|
-
consume: (intent: object) => void | Promise<void>, signal: AbortSignal): void {
|
|
20
|
-
let timer: ReturnType<typeof setTimeout> | undefined
|
|
21
|
-
signal.addEventListener('abort', () => { clearTimeout(timer) }, { once: true })
|
|
22
|
-
const poll = async (): Promise<void> => {
|
|
23
|
-
if (signal.aborted) return
|
|
24
|
-
try {
|
|
25
|
-
const result = await execute(takeIntents)
|
|
26
|
-
let intents: unknown[] = []
|
|
27
|
-
try {
|
|
28
|
-
const decoded: unknown = typeof result === 'string' ? JSON.parse(result) : undefined
|
|
29
|
-
if (!Array.isArray(decoded)) throw new Error('reference intent drain was not acknowledged')
|
|
30
|
-
intents = decoded
|
|
31
|
-
} catch (error) { reportReferenceCaptureFailure(error) }
|
|
32
|
-
for (const intent of intents) {
|
|
33
|
-
try {
|
|
34
|
-
if (intent === null || typeof intent !== 'object') throw new Error('reference intent is invalid')
|
|
35
|
-
await consume(intent)
|
|
36
|
-
} catch (error) {
|
|
37
|
-
reportReferenceCaptureFailure(error)
|
|
38
|
-
if (!signal.aborted) {
|
|
39
|
-
try { await execute(standaloneScript(noticeScript(hostMessages.zh.referenceFailed))) }
|
|
40
|
-
catch { /* The app notice survives navigation of the guest. */ }
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
} catch { /* A document may disappear during executeJavaScript. */ }
|
|
45
|
-
if (!signal.aborted) timer = setTimeout(() => { void poll() }, 300)
|
|
46
|
-
}
|
|
47
|
-
void (async () => {
|
|
48
|
-
if (signal.aborted) return
|
|
49
|
-
try { await execute(standaloneScript(overlayScript(), { label: hostMessages.zh.referenceLabel })) }
|
|
50
|
-
catch { /* Navigation can invalidate the installer. */ }
|
|
51
|
-
await poll()
|
|
52
|
-
})()
|
|
53
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/** Resolve CWD-keyed Electron storage after the authoritative Workspace list has arrived. */
|
|
2
|
-
import type { WorkspaceSource } from '@deepseek-ai/dsh-api-workspace-controller/client'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Use the Workspace's canonical CWD, not its record id; ungrouped Sessions remain isolated.
|
|
6
|
-
* @param source - authoritative Workspace membership.
|
|
7
|
-
* @param sessionId - owning DSH Session.
|
|
8
|
-
* @param signal - guest initialization lifetime.
|
|
9
|
-
* @returns the storage account for this occurrence.
|
|
10
|
-
*/
|
|
11
|
-
export async function browserWorkspace(source: WorkspaceSource, sessionId: string, signal: AbortSignal): Promise<string> {
|
|
12
|
-
signal.throwIfAborted()
|
|
13
|
-
if (source.getSnapshot().phase !== 'ready') {
|
|
14
|
-
await new Promise<void>((resolve, reject) => {
|
|
15
|
-
const abort = (): void => {
|
|
16
|
-
stop()
|
|
17
|
-
const reason: unknown = signal.reason
|
|
18
|
-
// oxlint-disable-next-line typescript/prefer-promise-reject-errors -- Preserve the caller-owned AbortSignal reason.
|
|
19
|
-
reject(reason)
|
|
20
|
-
}
|
|
21
|
-
const stop = source.subscribe(() => {
|
|
22
|
-
if (source.getSnapshot().phase !== 'ready') return
|
|
23
|
-
stop()
|
|
24
|
-
signal.removeEventListener('abort', abort)
|
|
25
|
-
resolve()
|
|
26
|
-
})
|
|
27
|
-
signal.addEventListener('abort', abort, { once: true })
|
|
28
|
-
})
|
|
29
|
-
}
|
|
30
|
-
signal.throwIfAborted()
|
|
31
|
-
const workspace = source.getSnapshot().items.find(item => item.sessionIds.some(id => id === sessionId))
|
|
32
|
-
return workspace === undefined ? `session:${sessionId}` : `cwd:${workspace.path}`
|
|
33
|
-
}
|
package/src/client/index.ts
DELETED
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
import { CLIENT_VERSION_ROUTE } from '../../assets/browser-policy.mjs'
|
|
2
|
-
/** Register the HTTP(S) Browser tab type in the right Sidebar. */
|
|
3
|
-
import type { ShortcutCommandId } from '@deepseek-ai/dsh-client-shortcuts/client'
|
|
4
|
-
import type { Context } from '@deepseek-ai/cordis'
|
|
5
|
-
import type {} from '@deepseek-ai/dsh-client-locale/client'
|
|
6
|
-
import type {} from '@deepseek-ai/dsh-client-ui-renderer/client'
|
|
7
|
-
import type {} from '@deepseek-ai/dsh-client-ui-session/client'
|
|
8
|
-
import type {} from '@deepseek-ai/dsh-client-ui-sidebar-right/client'
|
|
9
|
-
import type {} from '@deepseek-ai/dsh-client-ui-context-menu/client'
|
|
10
|
-
import type {} from '@deepseek-ai/dsh-api-workspace-controller/client'
|
|
11
|
-
import type {} from '@deepseek-ai/dsh-client-ui-settings/client'
|
|
12
|
-
import type { TabId } from '@deepseek-ai/dsh-client-ui-dockkit'
|
|
13
|
-
import { apply as applyReference } from './reference/client/plugin.ts'
|
|
14
|
-
import { applySettingsSection } from './settings/index.ts'
|
|
15
|
-
import { BrowserBody, type BrowserBodyProps } from './view/BrowserBody.tsx'
|
|
16
|
-
import { BrowserTitle } from './view/BrowserTitle.tsx'
|
|
17
|
-
import { createBrowserControllers } from './browser/BrowserController.ts'
|
|
18
|
-
import type { BrowserInjected } from './browser/BrowserController.ts'
|
|
19
|
-
import { createBrowserInitializationReader } from './browser/initialization.ts'
|
|
20
|
-
import type { BrowserInitializationReader } from './browser/initialization.ts'
|
|
21
|
-
import { createIframePage } from './pages.ts'
|
|
22
|
-
import { createReferenceCapture, type ReferenceCaptureContext } from './reference-capture-owner.ts'
|
|
23
|
-
import { createElectronPage } from './electron/pages.ts'
|
|
24
|
-
import { createNativePage } from './electron/NativeViewPage.ts'
|
|
25
|
-
import { NativeChildPresentation } from './electron/NativeChildPresentation.ts'
|
|
26
|
-
import type { DesktopBrowserBridge, SidebarNativeSlot } from '../types.ts'
|
|
27
|
-
import { browserWorkspace } from './electron/workspace.ts'
|
|
28
|
-
import type { BrowserPageFactory } from './browser/BrowserPage.ts'
|
|
29
|
-
import { BROWSER_ID, BROWSER_KIND, browserDefinition } from './definition.tsx'
|
|
30
|
-
import { en, ja, es, fr, de, ru, pt, zh } from './locales.ts'
|
|
31
|
-
import { createBrowserStore } from './browser/store.ts'
|
|
32
|
-
import { StartPageBinding } from './startpage/binding.ts'
|
|
33
|
-
import { openShortcutTarget } from './shortcut-open.ts'
|
|
34
|
-
import { StartPageController } from './startpage/controller.ts'
|
|
35
|
-
import { BROWSER_STARTPAGE_NAMESPACE } from '../startpage-settings.ts'
|
|
36
|
-
import type { BrowserStartPagePreferences } from '../startpage-settings.ts'
|
|
37
|
-
|
|
38
|
-
export type { BrowserBodyProps } from './view/BrowserBody.tsx'
|
|
39
|
-
export type { BrowserControllerState, BrowserInjected, BrowserMountRequest } from './browser/BrowserController.ts'
|
|
40
|
-
export type { BrowserFrame, BrowserFrameState, BrowserLoadError, BrowserSandboxControl } from './browser/BrowserFrame.ts'
|
|
41
|
-
export type { BrowserPage, BrowserPageFactory, BrowserPageOptions } from './browser/BrowserPage.ts'
|
|
42
|
-
export type { BrowserPresentation } from './view/BrowserPresentation.ts'
|
|
43
|
-
export type { BrowserFailure, BrowserHistoryEntry, BrowserNavigationStatus, BrowserTabState } from './browser/BrowserPersistence.ts'
|
|
44
|
-
export type { SidebarBrowserKey } from './locales.ts'
|
|
45
|
-
export type { BrowserState } from './browser/store.ts'
|
|
46
|
-
export type { BrowserAddressFailure, BrowserAddressResult, BrowserTarget } from './browser/url.ts'
|
|
47
|
-
|
|
48
|
-
declare module '@deepseek-ai/cordis' {
|
|
49
|
-
interface Context {
|
|
50
|
-
/** Read initialization receipts for one exact Session/tab/document request. */
|
|
51
|
-
sidebarBrowserInitialization: BrowserInitializationReader
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
declare module '@deepseek-ai/dsh-client-ui-sidebar-right/client' {
|
|
56
|
-
interface SidebarRightTabParamsMap {
|
|
57
|
-
/** Optional initial Browser URL. */
|
|
58
|
-
browser: { readonly url?: string }
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
declare module '@deepseek-ai/dsh-client-ui-context-menu/client' {
|
|
63
|
-
interface ContextMenuTargetMap {
|
|
64
|
-
/** One start-page shortcut card; the originating tab owns the menu. */
|
|
65
|
-
shortcut: {
|
|
66
|
-
readonly sessionId: BrowserBodyProps['sessionId']
|
|
67
|
-
readonly tabId: TabId
|
|
68
|
-
readonly title: string
|
|
69
|
-
readonly url: string
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/** Required Browser services. */
|
|
75
|
-
// 引用坞(划选→浮条→输入栏胶囊)与侧栏标签同属这一个包,客户端入口把两者一起注册。
|
|
76
|
-
// uiConversation 是引用坞需要的会话面服务。
|
|
77
|
-
export const inject = ['slots', 'locale', 'sidebarRight', 'sidebarRightTabs', 'uiConversation']
|
|
78
|
-
|
|
79
|
-
/** Register the Browser type, localized guide entry, body, and title. */
|
|
80
|
-
/** sessionStorage 键:本页加载时看到的客户端产物版本。 */
|
|
81
|
-
const CLIENT_VERSION_WATCH = 'dsh-builtin-browser:client-version'
|
|
82
|
-
|
|
83
|
-
type SidebarHostExtensions = {
|
|
84
|
-
navigateTabIn?: (session: BrowserBodyProps['sessionId'], tab: TabId, options: { params: { url: string } }) => boolean
|
|
85
|
-
openReservedTab?: (session: BrowserBodyProps['sessionId'], kind: string, tab: TabId) => boolean
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* 客户端产物是宿主启动时合成的整包脚本,URL 里的 rev 在启动那一刻固定:产物更新后浏览器仍按旧
|
|
90
|
-
* URL 命中缓存,于是「改了代码界面不变」。这里轮询宿主暴露的产物指纹,一旦变化就带新参数重载本页
|
|
91
|
-
* ——客户端改动不再需要重启宿主或手动破缓存。
|
|
92
|
-
* @param ctx - 插件容器(用于随插件卸载停下轮询)。
|
|
93
|
-
*/
|
|
94
|
-
function watchClientVersion(ctx: Context): void {
|
|
95
|
-
const check = async (): Promise<void> => {
|
|
96
|
-
try {
|
|
97
|
-
const response = await fetch(CLIENT_VERSION_ROUTE, { credentials: 'same-origin', cache: 'no-store' })
|
|
98
|
-
if (!response.ok) return
|
|
99
|
-
const body = await response.json() as { readonly version?: string }
|
|
100
|
-
const version = body.version
|
|
101
|
-
if (typeof version !== 'string' || version === '' || version === 'unknown') return
|
|
102
|
-
const seen = sessionStorage.getItem(CLIENT_VERSION_WATCH)
|
|
103
|
-
if (seen === null) { sessionStorage.setItem(CLIENT_VERSION_WATCH, version); return }
|
|
104
|
-
if (seen === version) return
|
|
105
|
-
sessionStorage.setItem(CLIENT_VERSION_WATCH, version)
|
|
106
|
-
const url = new URL(location.href)
|
|
107
|
-
url.searchParams.set('v', version)
|
|
108
|
-
location.replace(url.toString())
|
|
109
|
-
} catch {
|
|
110
|
-
// 下一次轮询再试:这条通道失败不该影响界面。
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
void check()
|
|
114
|
-
const timer = setInterval(() => { void check() }, 60_000)
|
|
115
|
-
ctx.effect(() => () => { clearInterval(timer) }, 'dsh-builtin-browser: client version watch')
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export function apply(ctx: Context): void {
|
|
119
|
-
// 先挂客户端自更新:产物一变,本页自己换到新 bundle(否则会一直用缓存里的旧脚本)。
|
|
120
|
-
watchClientVersion(ctx)
|
|
121
|
-
// 先装引用坞:它是输入栏那一侧的注册,与侧栏标签互不依赖。
|
|
122
|
-
// 每个注册各自隔离:一个失败只丢一块能力,不能把同一 apply 里的其余注册一起掐断。
|
|
123
|
-
try { applyReference(ctx as never) } catch (error) { console.warn('[dsh-builtin-browser] reference dock failed to mount', error) }
|
|
124
|
-
// 再装设置页分节:旧插件的设置面板(宿主 /dsh-builtin-browser/settings 的 UI)。
|
|
125
|
-
applySettingsSection(ctx)
|
|
126
|
-
|
|
127
|
-
const namespace = 'sidebarBrowser'
|
|
128
|
-
const t = ctx.locale.bind(namespace)
|
|
129
|
-
ctx.inject(['shortcuts'], (ctx) => {
|
|
130
|
-
ctx.effect(() => ctx.shortcuts.register({
|
|
131
|
-
id: 'browser.new' as ShortcutCommandId, label: () => t('guide.title'), aliases: ['browser', 'new browser tab'],
|
|
132
|
-
defaults: {
|
|
133
|
-
'desktop:macos': { code: 'KeyT', modifiers: ['primary'] },
|
|
134
|
-
'desktop:windows': { code: 'KeyT', modifiers: ['primary'] },
|
|
135
|
-
'desktop:linux': { code: 'KeyT', modifiers: ['primary'] },
|
|
136
|
-
'web:macos': { code: 'KeyT', modifiers: ['primary', 'alt'] },
|
|
137
|
-
'web:windows': { code: 'KeyT', modifiers: ['primary', 'alt'] },
|
|
138
|
-
},
|
|
139
|
-
// Each tab plugin owns its command's availability, localized refusal, and tab kind.
|
|
140
|
-
/* jscpd:ignore-start */
|
|
141
|
-
regions: ['page', 'editable', 'terminal'], modals: [],
|
|
142
|
-
resolve: ({ target: element }) => {
|
|
143
|
-
const target = ctx.sidebarRight.commandTarget(element)
|
|
144
|
-
if (target === undefined) return { status: 'blocked', reason: t('shortcut.noSession') }
|
|
145
|
-
return { status: 'handled', run: () => { ctx.sidebarRight.openTabFromTarget('browser', target) } }
|
|
146
|
-
},
|
|
147
|
-
/* jscpd:ignore-end */
|
|
148
|
-
}), 'ui-sidebar-browser: shortcut')
|
|
149
|
-
})
|
|
150
|
-
const store = createBrowserStore()
|
|
151
|
-
const startPage = new StartPageBinding()
|
|
152
|
-
const controllers = new Map<BrowserBodyProps['sessionId'], BrowserInjected>()
|
|
153
|
-
const initializationListeners = new Set<() => void>()
|
|
154
|
-
ctx.provide('sidebarBrowserInitialization')
|
|
155
|
-
ctx.set('sidebarBrowserInitialization', createBrowserInitializationReader((sessionId, tabId) => {
|
|
156
|
-
return controllers.get(sessionId as BrowserBodyProps['sessionId'])?.initialization(tabId)
|
|
157
|
-
}, listener => {
|
|
158
|
-
initializationListeners.add(listener)
|
|
159
|
-
return () => { initializationListeners.delete(listener) }
|
|
160
|
-
}, (sessionId, tabId) => controllers.get(sessionId as BrowserBodyProps['sessionId'])?.currentPage(tabId),
|
|
161
|
-
(sessionId, tabId, url) => controllers.get(sessionId as BrowserBodyProps['sessionId'])?.loadUrl(tabId, url).ok === true))
|
|
162
|
-
ctx.inject(['shortcuts'], (scope) => {
|
|
163
|
-
scope.effect(() => scope.shortcuts.register({
|
|
164
|
-
id: 'browser.address' as ShortcutCommandId, label: () => t('address.focus'), aliases: ['address bar', 'focus address'],
|
|
165
|
-
defaults: {
|
|
166
|
-
'desktop:macos': { code: 'KeyL', modifiers: ['primary'] },
|
|
167
|
-
'desktop:windows': { code: 'KeyL', modifiers: ['primary'] },
|
|
168
|
-
'desktop:linux': { code: 'KeyL', modifiers: ['primary'] },
|
|
169
|
-
'web:macos': { code: 'KeyL', modifiers: ['primary', 'alt'] },
|
|
170
|
-
'web:windows': { code: 'KeyL', modifiers: ['primary', 'alt'] },
|
|
171
|
-
},
|
|
172
|
-
regions: ['page', 'editable', 'terminal'], modals: [],
|
|
173
|
-
resolve: ({ target: element }) => {
|
|
174
|
-
const target = ctx.sidebarRight.commandTarget(element)
|
|
175
|
-
const face = target === undefined || target.tabId === undefined ? undefined : controllers.get(target.sessionId)
|
|
176
|
-
if (target === undefined || target.tabId === undefined || face === undefined || !face.canFocusAddress(target.tabId)) {
|
|
177
|
-
return { status: 'blocked', reason: t('address.focus.blocked') }
|
|
178
|
-
}
|
|
179
|
-
return { status: 'handled', run: () => { face.focusAddress(target.tabId!) } }
|
|
180
|
-
},
|
|
181
|
-
}), 'ui-sidebar-browser: address shortcut')
|
|
182
|
-
})
|
|
183
|
-
ctx.inject(['contextMenus'], (scope) => {
|
|
184
|
-
scope.effect(() => scope.contextMenus.register({
|
|
185
|
-
id: 'sidebar-browser.shortcut', target: 'shortcut', order: 20,
|
|
186
|
-
resolve: ({ sessionId, tabId, url }) => [
|
|
187
|
-
{
|
|
188
|
-
id: 'open', label: t('startpage.open'),
|
|
189
|
-
run: () => {
|
|
190
|
-
openShortcutTarget(
|
|
191
|
-
u => (scope.sidebarRight as typeof scope.sidebarRight & SidebarHostExtensions).navigateTabIn?.(sessionId, tabId, { params: { url: u } }) === true,
|
|
192
|
-
u => { scope.sidebarRight.openTabIn<'browser'>(sessionId, BROWSER_KIND, { params: { url: u }, revealIfOpened: false }) },
|
|
193
|
-
url,
|
|
194
|
-
)
|
|
195
|
-
},
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
id: 'open-new-tab', label: t('startpage.openNewTab'),
|
|
199
|
-
run: () => { scope.sidebarRight.openTabIn<'browser'>(sessionId, BROWSER_KIND, { params: { url }, revealIfOpened: false }) },
|
|
200
|
-
},
|
|
201
|
-
],
|
|
202
|
-
}), 'ui-sidebar-browser: shortcut menu')
|
|
203
|
-
scope.effect(() => scope.contextMenus.register({
|
|
204
|
-
id: 'sidebar-browser.tab.shortcut', target: 'tab', order: 90,
|
|
205
|
-
resolve: (target) => {
|
|
206
|
-
if (target.tab.kind !== BROWSER_KIND) return []
|
|
207
|
-
const face = controllers.get(target.sessionId)
|
|
208
|
-
const info = face?.pageInfo(target.tab.id)
|
|
209
|
-
if (face === undefined || info === undefined) return []
|
|
210
|
-
const title = target.tab.title.trim()
|
|
211
|
-
return [{
|
|
212
|
-
id: 'add-shortcut', label: t('startpage.addFromPage'), separatorBefore: true,
|
|
213
|
-
run: () => {
|
|
214
|
-
face.requestShortcut(target.tab.id, { url: info.url, title: title === '' ? info.title : title })
|
|
215
|
-
// The form lives in the tab's body; reveal it before asking for input.
|
|
216
|
-
scope.sidebarRight.focus(target.tab.id)
|
|
217
|
-
},
|
|
218
|
-
}]
|
|
219
|
-
},
|
|
220
|
-
}), 'ui-sidebar-browser: tab shortcut menu')
|
|
221
|
-
})
|
|
222
|
-
ctx.inject(['configForms'], (scope) => {
|
|
223
|
-
scope.effect(() => {
|
|
224
|
-
const controller = new StartPageController(
|
|
225
|
-
scope.configForms.get<BrowserStartPagePreferences>(BROWSER_STARTPAGE_NAMESPACE),
|
|
226
|
-
{ applicationOrigin: window.location.origin },
|
|
227
|
-
)
|
|
228
|
-
const detach = startPage.attach(controller)
|
|
229
|
-
return () => { detach(); controller.dispose() }
|
|
230
|
-
}, 'ui-sidebar-browser: start-page preferences')
|
|
231
|
-
})
|
|
232
|
-
const openTabs = ctx.sidebarRight.openTabs
|
|
233
|
-
const carrier = (globalThis as typeof globalThis & {
|
|
234
|
-
dshDesktop?: { readonly protocolVersion: number; readonly browser?: DesktopBrowserBridge }
|
|
235
|
-
}).dshDesktop
|
|
236
|
-
const desktop = carrier?.protocolVersion === 1 ? carrier.browser : undefined
|
|
237
|
-
ctx.effect(() => ctx.locale.register(namespace, { zh, en, ja, es, fr, de, ru, pt }), 'ui-sidebar-browser.copy')
|
|
238
|
-
ctx.effect(() => ctx.sidebarRightTabs.register({ ...browserDefinition(t), keepMounted: desktop !== undefined }), 'ui-sidebar-browser.type')
|
|
239
|
-
const installFrames = (scope: Context, factory: (sessionId: BrowserBodyProps['sessionId']) => BrowserPageFactory): void => {
|
|
240
|
-
scope.effect(() => async () => {
|
|
241
|
-
const pending = [...controllers.values()].map(controller => controller.dispose())
|
|
242
|
-
controllers.clear()
|
|
243
|
-
await Promise.all(pending)
|
|
244
|
-
}, 'ui-sidebar-browser.frames')
|
|
245
|
-
scope.effect(() => scope.slots.inject('sidebar.right.pane.tab', () => scope.slots.register({
|
|
246
|
-
name: 'sidebar.right.pane.tab', key: BROWSER_ID, locale: namespace, store,
|
|
247
|
-
inject: (sessionId, actions) => {
|
|
248
|
-
const existing = controllers.get(sessionId)
|
|
249
|
-
if (existing !== undefined) {
|
|
250
|
-
existing.rebind(actions)
|
|
251
|
-
return existing
|
|
252
|
-
}
|
|
253
|
-
const controller = createBrowserControllers(actions, factory(sessionId), tabId =>
|
|
254
|
-
openTabs.getSnapshot().some(tab => tab.sessionId === sessionId && tab.tabId === tabId), startPage,
|
|
255
|
-
{ sessionId, onInitializationChange: () => { for (const listener of initializationListeners) listener() } })
|
|
256
|
-
controllers.set(sessionId, controller)
|
|
257
|
-
return controller
|
|
258
|
-
},
|
|
259
|
-
}, BrowserBody)), 'ui-sidebar-browser.body')
|
|
260
|
-
}
|
|
261
|
-
const lifetime = new AbortController()
|
|
262
|
-
ctx.effect(() => () => { lifetime.abort() }, 'dsh-builtin-browser: reference capture')
|
|
263
|
-
const capture = createReferenceCapture(ctx as unknown as ReferenceCaptureContext, lifetime.signal)
|
|
264
|
-
if (desktop === undefined) {
|
|
265
|
-
installFrames(ctx, sessionId => options => createIframePage(options, sessionId, capture))
|
|
266
|
-
}
|
|
267
|
-
else ctx.inject(['workspaces'], (scope) => {
|
|
268
|
-
installFrames(scope, sessionId => {
|
|
269
|
-
const childApi = desktop.childTabs
|
|
270
|
-
const sidebar = scope.sidebarRight as typeof scope.sidebarRight & SidebarHostExtensions
|
|
271
|
-
const children = childApi?.protocolVersion === 2 && sidebar.openReservedTab !== undefined ? new NativeChildPresentation(childApi, sessionId,
|
|
272
|
-
tab => sidebar.openReservedTab?.(sessionId, BROWSER_KIND, tab) === true,
|
|
273
|
-
tab => { sidebar.closeIn(sessionId, tab) }) : undefined
|
|
274
|
-
return options => {
|
|
275
|
-
const native = desktop.nativeViews
|
|
276
|
-
const workspace = (signal: AbortSignal): Promise<string> => browserWorkspace(scope.workspaces.list, sessionId, signal)
|
|
277
|
-
if (native?.protocolVersion === 1) {
|
|
278
|
-
const sidebar = scope.sidebarRight as typeof scope.sidebarRight & {
|
|
279
|
-
nativeSlot?: (session: typeof sessionId, tab: TabId, address: string, viewport: string, signal: AbortSignal) => Promise<SidebarNativeSlot>
|
|
280
|
-
}
|
|
281
|
-
return createNativePage(options, native, async (tab, address, viewport, signal) => {
|
|
282
|
-
if (sidebar.nativeSlot === undefined) throw Object.assign(new Error('BROWSER_NATIVE_SURFACE_UNAVAILABLE'), { code: 'BROWSER_NATIVE_SURFACE_UNAVAILABLE' })
|
|
283
|
-
return sidebar.nativeSlot(sessionId, tab, address, viewport, signal)
|
|
284
|
-
}, workspace, sessionId, capture, children)
|
|
285
|
-
}
|
|
286
|
-
return createElectronPage(options, desktop, workspace, sessionId, capture)
|
|
287
|
-
}
|
|
288
|
-
})
|
|
289
|
-
})
|
|
290
|
-
ctx.effect(() => ctx.slots.inject('sidebar.right.pane.tab.title', () => ctx.slots.register({
|
|
291
|
-
name: 'sidebar.right.pane.tab.title', key: BROWSER_ID, store,
|
|
292
|
-
}, BrowserTitle)), 'ui-sidebar-browser.title')
|
|
293
|
-
}
|