the chat panel has to be ours, even though the chat is not
naming officerdev/chat in layout.ts rendered a second Hosts panel. the shared
registry is not the thing that decides: PluginScreen renders the workspace with
appTypes={{ allowed, fallback: allowed[0] }} where allowed is THIS plugin's own
panel keys, so an unrecognised appType silently becomes the first panel. that
boundary is deliberate — its comment says a persisted layout must not be able
to render another plugin's panel inside this screen — and it is a different
mechanism from seedAppRegistry merging the panels, which is what the last
commit's reasoning confused it with.
so the panel is ours and EmbeddableChat inside it is the platform's. it is
exported from officerdev for exactly this: the whole composer, transcript,
queue and model picker, with no second implementation to fall behind the
first.
it carries a two-sentence promptPrefix, which is per-panel and costs nobody
else's conversation anything. deliberately short: the skill holds the
knowledge and reaches every session for two lines, so anything longer here
would be the skill written twice and this would be the stale copy. all it says
is where the agent is standing, which is the one thing the skill cannot know.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Officer-Session: 656f5c85-e49a-4f1f-b9f3-042a04b4d043
This commit is contained in:
+9
-5
@@ -2,11 +2,15 @@ import type { LayoutNode } from 'officerdev';
|
||||
|
||||
// Hosts wide, certificates beside it, a chat across the bottom.
|
||||
//
|
||||
// ── Why the chat panel is the platform's and not one of ours ──
|
||||
// ── The chat panel is ours; the chat inside it is the platform's ──
|
||||
//
|
||||
// `officerdev/chat` is a panel app in the shared registry — `seedAppRegistry` merges the platform's panels
|
||||
// and every plugin's into ONE registry, so naming it here is all it takes. Shipping a second, simpler chat
|
||||
// from this plugin would mean maintaining a second chat, and the first one to fall behind would be ours.
|
||||
// Naming `officerdev/chat` here does NOT work, and the way it fails is quiet: `PluginScreen` renders the
|
||||
// workspace with `appTypes={{ allowed, fallback: allowed[0] }}` where `allowed` is this plugin's own panel
|
||||
// keys, so an unrecognised appType becomes the FIRST panel — which is how this layout briefly rendered two
|
||||
// Hosts panels. The shared registry and the layout allow-list are different things.
|
||||
//
|
||||
// So `proxy-manager-chat` is our panel and `EmbeddableChat` inside it is the platform's component. No
|
||||
// second chat to maintain, and nothing for the allow-list to reject.
|
||||
//
|
||||
// It gets a third of the height rather than a column, because a conversation reads badly in a narrow
|
||||
// column and the two lists do not: they are scannable at any width, and a chat is not.
|
||||
@@ -34,6 +38,6 @@ export const defaultLayout: LayoutNode = {
|
||||
},
|
||||
size: 66,
|
||||
},
|
||||
{ node: { type: 'panel', id: 'proxy-manager-chat', appType: 'officerdev/chat' }, size: 34 },
|
||||
{ node: { type: 'panel', id: 'proxy-manager-chat', appType: 'proxy-manager-chat' }, size: 34 },
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user