Repository navigation
[Feature] Give non-Conversation panels a session-scoped entry so plugins can host complete sessions #12503
weiaisuyan
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
A plugin panel registered in the
mainslot is root-scoped, so it can render the session content(
renderFactorySlot('conversation.content', …)works and provides the 20 session props), but it cannot render the shipped session chrome —
conversation.header/conversation.session.header(title, view tabs, per-session actions). Any plugin that wants to showa complete session somewhere other than the single shipped Conversation panel (multi-pane / split
view, floating window, side-by-side compare, presentation mode…) hits the same wall.
Request: expose a session-scoped panel entry (or relax
renderSlotauthorization) so such a plugincan render the shipped header per session without re-implementing it and without wiring each
contributing plugin by hand.
What I tried (dsh 0.2.2-rc.1, Electron 44.7 / Chrome 152)
All four attempts are reproducible from a plugin that registers the
mainslot withkey: 'split-view'andchildren: { 'split-view.pane': { kind: 'list', scope: 'session-maybe' } }:renderSlot('conversation.header', {})from our panel entryslot 'conversation.header' is not declared by this entry's childrenchildren: { …, 'conversation.header': { kind: 'single', scope: 'session-maybe' } }web boot: 14 entries did not activate,@deepseek-ai/dsh-client-ui-conversation: failed,@deepseek-ai/dsh-message-quotes: pending (waiting for service: uiConversation)entriesOfSlot('conversation.header')[0].component/entriesOfSlot('conversation.session.header')[0].componentwith our propsTypeError: useSession is not a function/TypeError: useConversationViews is not a function— the owner props (useConversationViews,useStore,selectView,setPinned,useEntryPins,useEntryActions,open,t,renderSlot) are injected per entry by the owning plugin and are not part ofstandardPropsmain/conversationoccupant (ConversationPanel) inside our ownSessionProviderso the host does the injectionslot 'main.conversation' is not declared by this entry's children—renderSlotauthorization is bound to the registering entry, so a plugin can never hold another entry's authorizationUseful (and currently the only working part): the session prop bag itself can be obtained
legally. Registering a throw-away entry into the documented
conversation.composer.dockslotyields all 20 session props, including
useSession,sessionId,useProjection,useAccess,useConversation,useInput,inputActions,useTrajectory,useChat. So the missing piece isauthorization + owner props, not data.
Concrete gaps this creates for third-party session chrome today — every action registered in
conversation.session.header.utilitiesdisappears when the session is hosted by a plugin panel:open-in-appuseOpenInAppApps is not a functionschedule-cataloguseCatalog is not a functionsession-log-downloadCannot destructure property 'sessionId' of 'props' as it is undefinedWhy it matters
dsh-split-view(a multi-pane workspace plugin, pure client plugin) must render N complete sessionsside by side. Content, composer, cost meter, context usage, agent-preset chips and the model picker
already work per pane because they are inside
conversation.content. The only missing part is thesession header — and hand-reimplementing it would mean hand-wiring every current and future
plugin's contribution, which is exactly what the slot system exists to avoid. Users reasonably
expect "every pane is a full session".
Proposal (either option unblocks it)
Option A — a session-scoped panel slot (preferred). Next to the keyed
mainslot(
packages/client/ui-layout/src/client/index.ts:75), add a sibling panel slot withscope: 'session', e.g.main.session-panel/session.panel:A plugin entry mounted there would be rendered by the host inside a
SessionProvider, soconversation.header/conversation.session.headerare declared by its own children and theshipped header, view tabs and utilities all work with zero per-plugin wiring.
dsh-split-viewwould render this entry once per pane.Option B — relax
renderSlotauthorization for session subtrees. Allow an entry that ismounted inside a
SessionProvidersubtree whosesessionIdmatches to render the session-scopedslots it does not own (
conversation.session.*,conversation.header*). Smaller surface than A,but it weakens the "one declarer per slot" invariant, so A is cleaner.
Non-goal: we are explicitly not asking to fork/relax the
replaceRisk: shadows-shipped-uicontract — we only want a supported way to mount the shipped session chrome in plugin-hosted
containers.
Acceptance
A plugin can render, per hosted session, the shipped title, view tabs and utilities actions,
including entries contributed later by other plugins, with no per-plugin wiring and without
declaring shipped slot names.
Environment
dsh0.2.2-rc.1 (desktop app), Electron 44.7.0 / Chrome 152, Windows 11plugin installed via
dsh plugin --profile <p> add "file:<path>"note: in 0.2.2-rc.1 all client plugins ship as one concatenated bundle, so attempt #2 above
(declaring a shipped slot name) takes 14 entries down with it — worth knowing before trying that
workaround.
All reactions