Repository navigation
Replies: 2 comments
|
You misread the contract — the seat you are asking for already exists, and it was already in the version you tested ( The seat:
|
Follow-up: the seat is not just declared — here is an out-of-tree plugin using itRather than argue from the catalog, I built the badge you asked for as a third-party plugin and published it. If you want the feature today, it exists; if you want to write your own, this is the smallest complete example I could reduce it to.
What it contributes. One cell in
The whole contribution: ctx.slots.inject('conversation.session.header.utilities', () => ctx.slots.register({
name: 'conversation.session.header.utilities',
id: 'session-usage-badge',
order: 20,
locale: NS,
}, UsageBadge))plus one row to mount it: - insert:
- id: session-usage-badge
name: '@argszero/cordis-plugin-session-usage-badge'Why the package looks lopsided. Its node half is empty on purpose: the browser half reaches the page because the manifest declares Two things worth knowing before writing your own, both of which cost me time:
What I verified, and what I did not. 32 tests: the readings module is pure and total (it returns This is also the copyable skeleton #5899 was asking for, so if it helps as a starting point for further browser-half plugins, take it apart. |
Uh oh!
There was an error while loading. Please reload this page.
We shipped a server-side cost service as a plugin (
ctx.tokenCost, configurable pricing, 1/10000 ¥ integer units) and wanted to render it next to the conversation stats line. There is no contribution point for that surface today.What we checked (0.1.5-rc.2) — the client slot registry is a declaration-merged, closed set. Keys we found: the frame seats (
root,sidebar,main(keyed,conversationreserved),rightbar,details,shell.overlay) plus package-owned seats (settings.models.provider-card,settings.plugin.item,conversation.trajectory.images). The stats line is rendered byui-conversationitself, and the frame seats aresingleand already occupied — an add-on cannot contribute there without replacing a whole column.Ask: one additive seat on the conversation surface — e.g.
conversation.stats.extrasorconversation.header.extras— session-bound, so a client plugin can render cost/token/context badges without forkingui-conversation.If an existing seat is already meant for this and we misread the contract, we would be glad to be corrected.
All reactions