feat(client): inject slot declaration lifetimes
This commit is contained in:
@@ -36,7 +36,7 @@ export type {
|
||||
} from './SubagentReadOnlyComposer.tsx'
|
||||
|
||||
/** Required services for references, conversation slots, and session navigation. */
|
||||
export const inject = ['slash', 'sessions', 'conversation', 'slots', 'locale']
|
||||
export const inject = ['slash', 'sessions', 'slots', 'locale']
|
||||
|
||||
/** Claim the composer for one-shot history or an unavailable continuation owner. */
|
||||
function selectReadOnlySubagent(owner: ComposerChainProps): SubagentReadOnlyMatch | null {
|
||||
@@ -103,7 +103,8 @@ export function apply(ctx: ClientContext): void {
|
||||
sessions.setSubagentCatalogOpen(parentSessionId, open)
|
||||
},
|
||||
})
|
||||
ctx.effect(
|
||||
ctx.slots.inject(
|
||||
'conversation.session.header.actions',
|
||||
() => ctx.slots.register({
|
||||
name: 'conversation.session.header.actions',
|
||||
id: 'subagent-catalog',
|
||||
@@ -111,15 +112,14 @@ export function apply(ctx: ClientContext): void {
|
||||
locale: NS,
|
||||
inject: catalogActions,
|
||||
}, SubagentCatalogAction),
|
||||
'ui-subagent: lazy descendant catalog action',
|
||||
)
|
||||
ctx.effect(
|
||||
ctx.slots.inject(
|
||||
'conversation.composer',
|
||||
() => ctx.slots.register({
|
||||
name: 'conversation.composer',
|
||||
priority: -10,
|
||||
locale: NS,
|
||||
select: selectReadOnlySubagent,
|
||||
}, SubagentReadOnlyComposer),
|
||||
'ui-subagent: read-only addressed composer',
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user