diff --git a/packages/extensions/cordis-client-runner/src/client/api-catalog.ts b/packages/extensions/cordis-client-runner/src/client/api-catalog.ts index 00c7b4a4b2..0fc5aded9a 100644 --- a/packages/extensions/cordis-client-runner/src/client/api-catalog.ts +++ b/packages/extensions/cordis-client-runner/src/client/api-catalog.ts @@ -551,7 +551,7 @@ export const TYPE_API: readonly TypeApiEntry[] = [ }, { name: 'InjectFace', - declaration: 'export type InjectFace = I extends {\n hooks: infer HS extends HooksSources;\n} ? Omit & PropsHooks : I;', + declaration: 'export type InjectFace = I extends {\n hooks: infer HS extends HooksSources;\n} ? I extends {\n keyedHooks: infer KS extends KeyedHooksSources;\n} ? Omit & PropsHooks & PropsKeyedHooks : Omit & PropsHooks : I extends {\n keyedHooks: infer KS extends KeyedHooksSources;\n} ? Omit & PropsKeyedHooks : I;', }, { name: 'InjectParams', @@ -561,6 +561,18 @@ export const TYPE_API: readonly TypeApiEntry[] = [ name: 'ISession', declaration: 'export interface ISession {\n readonly sessionId: SessionId;\n readonly projections: ProjectionsFace;\n beginSubmission(input: BeginSubmissionInput): SubmissionHandle;\n prompt(content: PromptContentPart[], mode: \'queue\' | \'steer\', signal?: AbortSignal, requestId?: SessionRequestId): Promise>;\n readAttachment(attachmentId: AttachmentIdType): Promise>;\n updateQueue(itemId: MessageId, action: QueueAction): Promise>;\n cancel(): Promise>;\n rename(title: string): Promise>;\n loadOlder(): Promise;\n loadThrough(seq: SessionSeq): Promise;\n command(line: string): Promise>;\n}', }, + { + name: 'KeyedHooksSources', + declaration: 'export type KeyedHooksSources = Record;', + }, + { + name: 'KeyedSnapshotSelectorHook', + declaration: 'export type KeyedSnapshotSelectorHook = {\n (key: string): Snapshot | undefined;\n (key: string, selector: (value: Snapshot | undefined) => Selected, equal?: (left: Selected, right: Selected) => boolean): Selected;\n};', + }, + { + name: 'KeyedStandardSource', + declaration: 'export type KeyedStandardSource = (key: string) => HostObservable | undefined;', + }, { name: 'KeyPropsOf', declaration: 'export type KeyPropsOf> = SlotMap[K] extends {\n kind: \'keyed\';\n keyProps: infer P extends object;\n} ? EntryKey extends keyof P ? P[EntryKey] extends object ? P[EntryKey] : never : never : object;', @@ -645,6 +657,10 @@ export const TYPE_API: readonly TypeApiEntry[] = [ name: 'PropsHooks', declaration: 'export type PropsHooks = {\n [N in keyof HS & string as `use${Capitalize}`]: SnapshotSelectorHook ? T : never>;\n};', }, + { + name: 'PropsKeyedHooks', + declaration: 'export type PropsKeyedHooks = {\n [N in keyof HS & string as `use${Capitalize}`]: KeyedSnapshotSelectorHook HostObservable | undefined ? T : never>;\n};', + }, { name: 'PropsLocale', declaration: 'export type PropsLocale = N extends keyof LocaleNamespaceMap & string ? {\n t: TranslateNS;\n} : object;', diff --git a/packages/extensions/cordis-client-runner/src/client/slot-catalog.ts b/packages/extensions/cordis-client-runner/src/client/slot-catalog.ts index 2d341e1897..b339379ec0 100644 --- a/packages/extensions/cordis-client-runner/src/client/slot-catalog.ts +++ b/packages/extensions/cordis-client-runner/src/client/slot-catalog.ts @@ -204,7 +204,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], replaceRisk: 'none', example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'conversation.chat.assistant-actions\', () => ctx.slots.register(\n { name: \'conversation.chat.assistant-actions\', id: \'my-entry\', order: 100, label: \'My entry\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}', - source: 'packages/client/ui-chat/src/client/contract/slots.ts:206', + source: 'packages/client/ui-chat/src/client/contract/slots.ts:221', }, { key: 'conversation.chat.commandview', @@ -249,7 +249,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ occupants: [], replaceRisk: 'none', example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'conversation.chat.commandview\', () => ctx.slots.register(\n { name: \'conversation.chat.commandview\', key: \'\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}', - source: 'packages/client/ui-chat/src/client/contract/slots.ts:194', + source: 'packages/client/ui-chat/src/client/contract/slots.ts:209', }, { key: 'conversation.chat.node', @@ -313,7 +313,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], replaceRisk: 'shadows-shipped-ui', example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'conversation.chat.node\', () => ctx.slots.register(\n { name: \'conversation.chat.node\', key: \'\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}', - source: 'packages/client/ui-chat/src/client/contract/slots.ts:175', + source: 'packages/client/ui-chat/src/client/contract/slots.ts:190', }, { key: 'conversation.chat.turnTail', @@ -358,7 +358,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], replaceRisk: 'none', example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'conversation.chat.turnTail\', () => ctx.slots.register(\n { name: \'conversation.chat.turnTail\', select: owner => null },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}', - source: 'packages/client/ui-chat/src/client/contract/slots.ts:200', + source: 'packages/client/ui-chat/src/client/contract/slots.ts:215', }, { key: 'conversation.composer', @@ -532,7 +532,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], replaceRisk: 'shadows-shipped-ui', example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'conversation.details.tool\', () => ctx.slots.register(\n { name: \'conversation.details.tool\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}', - source: 'packages/client/ui-chat/src/client/contract/slots.ts:212', + source: 'packages/client/ui-chat/src/client/contract/slots.ts:227', }, { key: 'conversation.hero.agentPreset', @@ -1010,7 +1010,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [ ], replaceRisk: 'shadows-shipped-ui', example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'conversation.message.images\', () => ctx.slots.register(\n { name: \'conversation.message.images\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}', - source: 'packages/client/ui-chat/src/client/contract/slots.ts:188', + source: 'packages/client/ui-chat/src/client/contract/slots.ts:203', }, { key: 'conversation.session',