@tanstack/ai-angular 0.7.4 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,408 @@
1
+ import * as i0 from '@angular/core';
2
+ import { signal, InjectionToken, inject, ChangeDetectionStrategy, Component, computed, Injector, input, effect, untracked, assertInInjectionContext } from '@angular/core';
3
+ import { NgComponentOutlet } from '@angular/common';
4
+ import { collectInlineToolNames, automaticPartsForMessage, selectMessageUI, selectChatUI, resolveInterruptComponent } from '@tanstack/ai-client/ui';
5
+ import { injectChat } from '@tanstack/ai-angular';
6
+
7
+ /**
8
+ * Holder for the active chat instance. Factory components inject this
9
+ * and read `host()`.
10
+ */
11
+ class ChatHostRef {
12
+ host = signal(null, ...(ngDevMode ? [{ debugName: "host" }] : /* istanbul ignore next */ []));
13
+ }
14
+ /**
15
+ * Create isolated tokens for nested chat trees, or for widgets in other
16
+ * files that cannot import the `createChatHook` result.
17
+ */
18
+ function createChatHookContexts() {
19
+ const chatRef = new InjectionToken('ChatUIHostRef');
20
+ const part = new InjectionToken('ChatUIPart');
21
+ const interrupt = new InjectionToken('ChatUIInterrupt');
22
+ function injectChatContext() {
23
+ const ref = inject(chatRef);
24
+ const chat = ref.host();
25
+ if (!chat) {
26
+ throw new Error('`injectChatContext` must be used within `Chat` or `ChatProvider`.');
27
+ }
28
+ return chat;
29
+ }
30
+ return { chatRef, part, interrupt, injectChatContext };
31
+ }
32
+ const defaultChatUITokens = createChatHookContexts();
33
+
34
+ function createWarnOnce() {
35
+ const seen = new Set();
36
+ return (key, message) => {
37
+ if (process.env.NODE_ENV === 'production')
38
+ return;
39
+ if (seen.has(key))
40
+ return;
41
+ seen.add(key);
42
+ console.warn(message);
43
+ };
44
+ }
45
+ /**
46
+ * Bind chat options and Angular widgets once at module scope.
47
+ *
48
+ * Layout, message, input, queue, parts, tools, and interrupts are
49
+ * standalone component classes. The factory builds `Chat`, `Messages`,
50
+ * `Interrupts`, and `Queue` as Angular components that inject the active
51
+ * chat through DI.
52
+ */
53
+ function createChatUI(options, config) {
54
+ void options;
55
+ const { context: contextOption, components, partsComponents: parts, toolsComponents: tools, interruptsComponents: interrupts, } = config;
56
+ const { layout: Layout, message: MessageComponent, input: InputComponent, queue: QueueItemComponent, } = components;
57
+ const warn = createWarnOnce();
58
+ const tokens = {
59
+ chatRef: contextOption?.chatRef ?? defaultChatUITokens.chatRef,
60
+ part: contextOption?.part ?? defaultChatUITokens.part,
61
+ interrupt: contextOption?.interrupt ?? defaultChatUITokens.interrupt,
62
+ };
63
+ const inlineToolNames = collectInlineToolNames(interrupts?.tools, Object.keys(tools ?? {}));
64
+ function injectChatContext() {
65
+ const ref = inject(tokens.chatRef);
66
+ const chat = ref.host();
67
+ if (!chat) {
68
+ throw new Error('`injectChatContext` must be used within `Chat` or `ChatProvider`.');
69
+ }
70
+ return chat;
71
+ }
72
+ class MissingInput {
73
+ constructor() {
74
+ warn('input', '[tanstack-ai-ui] Rendered Input but no `input` component is registered.');
75
+ }
76
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: MissingInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
77
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.20", type: MissingInput, isStandalone: true, selector: "ai-chat-missing-input", ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
78
+ }
79
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: MissingInput, decorators: [{
80
+ type: Component,
81
+ args: [{
82
+ selector: 'ai-chat-missing-input',
83
+ changeDetection: ChangeDetectionStrategy.OnPush,
84
+ template: '',
85
+ }]
86
+ }], ctorParameters: () => [] });
87
+ class Queue {
88
+ ref = inject(tokens.chatRef);
89
+ itemComponent = QueueItemComponent;
90
+ rows = computed(() => {
91
+ const chat = this.ref.host();
92
+ if (!chat || !QueueItemComponent)
93
+ return [];
94
+ const items = chat.queue();
95
+ return items.map((item) => ({
96
+ item: {
97
+ ...item,
98
+ cancelQueued: () => {
99
+ chat.cancelQueued(item.id);
100
+ },
101
+ },
102
+ }));
103
+ }, ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
104
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: Queue, deps: [], target: i0.ɵɵFactoryTarget.Component });
105
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: Queue, isStandalone: true, selector: "ai-chat-queue", ngImport: i0, template: `
106
+ @if (itemComponent) {
107
+ @for (row of rows(); track row.item.id) {
108
+ <ng-container
109
+ [ngComponentOutlet]="itemComponent"
110
+ [ngComponentOutletInputs]="{ item: row.item }"
111
+ />
112
+ }
113
+ }
114
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
115
+ }
116
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: Queue, decorators: [{
117
+ type: Component,
118
+ args: [{
119
+ selector: 'ai-chat-queue',
120
+ changeDetection: ChangeDetectionStrategy.OnPush,
121
+ imports: [NgComponentOutlet],
122
+ template: `
123
+ @if (itemComponent) {
124
+ @for (row of rows(); track row.item.id) {
125
+ <ng-container
126
+ [ngComponentOutlet]="itemComponent"
127
+ [ngComponentOutletInputs]="{ item: row.item }"
128
+ />
129
+ }
130
+ }
131
+ `,
132
+ }]
133
+ }] });
134
+ class Parts {
135
+ injector = inject(Injector);
136
+ ref = inject(tokens.chatRef);
137
+ message = input.required(...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
138
+ selectedParts = computed(() => {
139
+ const chat = this.ref.host();
140
+ return automaticPartsForMessage(selectMessageUI(this.message(), {
141
+ interrupts: (chat?.interrupts() ??
142
+ []),
143
+ inlineToolNames,
144
+ }));
145
+ }, ...(ngDevMode ? [{ debugName: "selectedParts" }] : /* istanbul ignore next */ []));
146
+ outletFor(selected) {
147
+ if (selected.key === 'toolCall') {
148
+ const name = selected.part.name;
149
+ const Tool = tools?.[name];
150
+ if (!Tool) {
151
+ warn(`tool:${name}`, `[tanstack-ai-ui] Missing tools.${name} component`);
152
+ return null;
153
+ }
154
+ return Tool;
155
+ }
156
+ const PartComponent = (parts[selected.key] ?? parts.fallback);
157
+ if (!PartComponent) {
158
+ warn(`part:${selected.key}`, `[tanstack-ai-ui] Missing parts.${selected.key} component`);
159
+ return null;
160
+ }
161
+ return PartComponent;
162
+ }
163
+ inputsFor(selected) {
164
+ if (selected.key === 'toolCall') {
165
+ return {
166
+ part: selected.part,
167
+ result: selected.result,
168
+ interrupt: selected.interrupt,
169
+ };
170
+ }
171
+ return { part: selected.part };
172
+ }
173
+ injectorFor(selected) {
174
+ return Injector.create({
175
+ parent: this.injector,
176
+ providers: [{ provide: tokens.part, useValue: selected }],
177
+ });
178
+ }
179
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: Parts, deps: [], target: i0.ɵɵFactoryTarget.Component });
180
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: Parts, isStandalone: true, selector: "ai-chat-parts", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
181
+ @for (selected of selectedParts(); track $index) {
182
+ <ng-container
183
+ [ngComponentOutlet]="outletFor(selected)"
184
+ [ngComponentOutletInputs]="inputsFor(selected)"
185
+ [ngComponentOutletInjector]="injectorFor(selected)"
186
+ />
187
+ }
188
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
189
+ }
190
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: Parts, decorators: [{
191
+ type: Component,
192
+ args: [{
193
+ selector: 'ai-chat-parts',
194
+ changeDetection: ChangeDetectionStrategy.OnPush,
195
+ imports: [NgComponentOutlet],
196
+ template: `
197
+ @for (selected of selectedParts(); track $index) {
198
+ <ng-container
199
+ [ngComponentOutlet]="outletFor(selected)"
200
+ [ngComponentOutletInputs]="inputsFor(selected)"
201
+ [ngComponentOutletInjector]="injectorFor(selected)"
202
+ />
203
+ }
204
+ `,
205
+ }]
206
+ }], propDecorators: { message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }] } });
207
+ class Messages {
208
+ ref = inject(tokens.chatRef);
209
+ messageComponent = MessageComponent;
210
+ Parts = Parts;
211
+ messages = computed(() => {
212
+ const chat = this.ref.host();
213
+ return (chat?.messages() ?? []);
214
+ }, ...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
215
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: Messages, deps: [], target: i0.ɵɵFactoryTarget.Component });
216
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: Messages, isStandalone: true, selector: "ai-chat-messages", ngImport: i0, template: `
217
+ @for (message of messages(); track message.id) {
218
+ <ng-container
219
+ [ngComponentOutlet]="messageComponent"
220
+ [ngComponentOutletInputs]="{
221
+ message,
222
+ Parts,
223
+ }"
224
+ />
225
+ }
226
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
227
+ }
228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: Messages, decorators: [{
229
+ type: Component,
230
+ args: [{
231
+ selector: 'ai-chat-messages',
232
+ changeDetection: ChangeDetectionStrategy.OnPush,
233
+ imports: [NgComponentOutlet],
234
+ template: `
235
+ @for (message of messages(); track message.id) {
236
+ <ng-container
237
+ [ngComponentOutlet]="messageComponent"
238
+ [ngComponentOutletInputs]="{
239
+ message,
240
+ Parts,
241
+ }"
242
+ />
243
+ }
244
+ `,
245
+ }]
246
+ }] });
247
+ class Interrupts {
248
+ injector = inject(Injector);
249
+ ref = inject(tokens.chatRef);
250
+ interrupts = computed(() => {
251
+ const chat = this.ref.host();
252
+ const selected = selectChatUI({
253
+ messages: (chat?.messages() ?? []),
254
+ interrupts: (chat?.interrupts() ??
255
+ []),
256
+ inlineToolNames,
257
+ });
258
+ return selected.interrupts;
259
+ }, ...(ngDevMode ? [{ debugName: "interrupts" }] : /* istanbul ignore next */ []));
260
+ outletFor(interrupt) {
261
+ const InterruptComponent = resolveInterruptComponent(interrupt, interrupts);
262
+ if (!InterruptComponent) {
263
+ warn(`interrupt:${interrupt.id}`, `[tanstack-ai-ui] Missing interrupt component for ${interrupt.kind}`);
264
+ return null;
265
+ }
266
+ return InterruptComponent;
267
+ }
268
+ injectorFor(interrupt) {
269
+ return Injector.create({
270
+ parent: this.injector,
271
+ providers: [{ provide: tokens.interrupt, useValue: interrupt }],
272
+ });
273
+ }
274
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: Interrupts, deps: [], target: i0.ɵɵFactoryTarget.Component });
275
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: Interrupts, isStandalone: true, selector: "ai-chat-interrupts", ngImport: i0, template: `
276
+ @for (interrupt of interrupts(); track interrupt.id) {
277
+ <ng-container
278
+ [ngComponentOutlet]="outletFor(interrupt)"
279
+ [ngComponentOutletInputs]="{ interrupt }"
280
+ [ngComponentOutletInjector]="injectorFor(interrupt)"
281
+ />
282
+ }
283
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
284
+ }
285
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: Interrupts, decorators: [{
286
+ type: Component,
287
+ args: [{
288
+ selector: 'ai-chat-interrupts',
289
+ changeDetection: ChangeDetectionStrategy.OnPush,
290
+ imports: [NgComponentOutlet],
291
+ template: `
292
+ @for (interrupt of interrupts(); track interrupt.id) {
293
+ <ng-container
294
+ [ngComponentOutlet]="outletFor(interrupt)"
295
+ [ngComponentOutletInputs]="{ interrupt }"
296
+ [ngComponentOutletInjector]="injectorFor(interrupt)"
297
+ />
298
+ }
299
+ `,
300
+ }]
301
+ }] });
302
+ const layoutInputs = {
303
+ Messages,
304
+ Interrupts,
305
+ Queue,
306
+ Input: (InputComponent ?? MissingInput),
307
+ };
308
+ class Chat {
309
+ chat = input.required(...(ngDevMode ? [{ debugName: "chat" }] : /* istanbul ignore next */ []));
310
+ layout = Layout;
311
+ layoutInputs = layoutInputs;
312
+ ref = inject(tokens.chatRef);
313
+ constructor() {
314
+ effect(() => {
315
+ const next = this.chat();
316
+ untracked(() => this.ref.host.set(next));
317
+ });
318
+ }
319
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: Chat, deps: [], target: i0.ɵɵFactoryTarget.Component });
320
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.20", type: Chat, isStandalone: true, selector: "ai-chat", inputs: { chat: { classPropertyName: "chat", publicName: "chat", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{ provide: tokens.chatRef, useClass: ChatHostRef }], ngImport: i0, template: `
321
+ <ng-container
322
+ [ngComponentOutlet]="layout"
323
+ [ngComponentOutletInputs]="layoutInputs"
324
+ />
325
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
326
+ }
327
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: Chat, decorators: [{
328
+ type: Component,
329
+ args: [{
330
+ selector: 'ai-chat',
331
+ changeDetection: ChangeDetectionStrategy.OnPush,
332
+ imports: [NgComponentOutlet],
333
+ providers: [{ provide: tokens.chatRef, useClass: ChatHostRef }],
334
+ template: `
335
+ <ng-container
336
+ [ngComponentOutlet]="layout"
337
+ [ngComponentOutletInputs]="layoutInputs"
338
+ />
339
+ `,
340
+ }]
341
+ }], ctorParameters: () => [], propDecorators: { chat: [{ type: i0.Input, args: [{ isSignal: true, alias: "chat", required: true }] }] } });
342
+ class ChatProvider {
343
+ chat = input.required(...(ngDevMode ? [{ debugName: "chat" }] : /* istanbul ignore next */ []));
344
+ ref = inject(tokens.chatRef);
345
+ constructor() {
346
+ effect(() => {
347
+ const next = this.chat();
348
+ untracked(() => this.ref.host.set(next));
349
+ });
350
+ }
351
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: ChatProvider, deps: [], target: i0.ɵɵFactoryTarget.Component });
352
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.20", type: ChatProvider, isStandalone: true, selector: "ai-chat-provider", inputs: { chat: { classPropertyName: "chat", publicName: "chat", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{ provide: tokens.chatRef, useClass: ChatHostRef }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
353
+ }
354
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: ChatProvider, decorators: [{
355
+ type: Component,
356
+ args: [{
357
+ selector: 'ai-chat-provider',
358
+ changeDetection: ChangeDetectionStrategy.OnPush,
359
+ providers: [{ provide: tokens.chatRef, useClass: ChatHostRef }],
360
+ template: `<ng-content />`,
361
+ }]
362
+ }], ctorParameters: () => [], propDecorators: { chat: [{ type: i0.Input, args: [{ isSignal: true, alias: "chat", required: true }] }] } });
363
+ return {
364
+ Chat,
365
+ ChatProvider,
366
+ Messages,
367
+ Interrupts,
368
+ Queue,
369
+ Parts,
370
+ injectChatContext,
371
+ Input: InputComponent,
372
+ };
373
+ }
374
+
375
+ /**
376
+ * Bind chat options and Angular widgets once at module scope.
377
+ *
378
+ * This matches Form `injectForm` and the React `createChatHook` factory:
379
+ * widgets register here. The returned `injectAppChat` creates a chat
380
+ * instance in an injection context. Render `<ai-chat [chat]="chat" />`
381
+ * with the factory `Chat` component.
382
+ */
383
+ function createChatHook({ options, ...chatComponents }) {
384
+ const ui = createChatUI(options, chatComponents);
385
+ function injectAppChat(overrides) {
386
+ assertInInjectionContext(injectAppChat);
387
+ const chat = (overrides
388
+ ? injectChat({
389
+ ...options,
390
+ ...overrides,
391
+ })
392
+ : injectChat(options));
393
+ return chat;
394
+ }
395
+ return {
396
+ injectAppChat,
397
+ injectChatContext: ui.injectChatContext,
398
+ Chat: ui.Chat,
399
+ ChatProvider: ui.ChatProvider,
400
+ };
401
+ }
402
+
403
+ /**
404
+ * Generated bundle index. Do not edit.
405
+ */
406
+
407
+ export { ChatHostRef, createChatHook, createChatHookContexts, createChatUI };
408
+ //# sourceMappingURL=tanstack-ai-angular-ui.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tanstack-ai-angular-ui.mjs","sources":["../../ui/src/tokens.ts","../../ui/src/create-ui.ts","../../ui/src/create-chat-hook.ts","../../ui/src/tanstack-ai-angular-ui.ts"],"sourcesContent":["import { InjectionToken, inject, signal } from '@angular/core'\nimport type { WritableSignal } from '@angular/core'\nimport type {\n ChatUIInterrupt,\n ChatUISelectedPart,\n} from '@tanstack/ai-client/ui'\nimport type { InjectChatResult } from '@tanstack/ai-angular'\n\n/**\n * Holder for the active chat instance. Factory components inject this\n * and read `host()`.\n */\nexport class ChatHostRef {\n readonly host: WritableSignal<InjectChatResult | null> = signal(null)\n}\n\nexport interface ChatUITokens {\n chatRef: InjectionToken<ChatHostRef>\n part: InjectionToken<ChatUISelectedPart>\n interrupt: InjectionToken<ChatUIInterrupt>\n injectChatContext: () => InjectChatResult\n}\n\n/**\n * Create isolated tokens for nested chat trees, or for widgets in other\n * files that cannot import the `createChatHook` result.\n */\nexport function createChatHookContexts(): ChatUITokens {\n const chatRef = new InjectionToken<ChatHostRef>('ChatUIHostRef')\n const part = new InjectionToken<ChatUISelectedPart>('ChatUIPart')\n const interrupt = new InjectionToken<ChatUIInterrupt>('ChatUIInterrupt')\n\n function injectChatContext() {\n const ref = inject(chatRef)\n const chat = ref.host()\n if (!chat) {\n throw new Error(\n '`injectChatContext` must be used within `Chat` or `ChatProvider`.',\n )\n }\n return chat\n }\n\n return { chatRef, part, interrupt, injectChatContext }\n}\n\nexport const defaultChatUITokens = createChatHookContexts()\n","import {\n ChangeDetectionStrategy,\n Component,\n Injector,\n computed,\n effect,\n inject,\n input,\n untracked,\n} from '@angular/core'\nimport { NgComponentOutlet } from '@angular/common'\nimport type { Type } from '@angular/core'\nimport {\n automaticPartsForMessage,\n collectInlineToolNames,\n resolveInterruptComponent,\n selectChatUI,\n selectMessageUI,\n} from '@tanstack/ai-client/ui'\nimport type {\n ChatUIHasNamedInterrupts,\n ChatUIHasNamedTools,\n ChatUIInterrupt,\n ChatUIInterruptName,\n ChatUIInterruptOf,\n ChatUIInterruptsOf,\n ChatUIMessages,\n ChatUINamedInterruptId,\n ChatUIPartKey,\n ChatUIPartOf,\n ChatUISchemaOf,\n ChatUISelectedPart,\n ChatUIToolApproval,\n ChatUIToolName,\n ChatUIToolsOf,\n} from '@tanstack/ai-client/ui'\nimport type {\n QueuedMessage,\n ToolCallPart,\n ToolResultPart,\n} from '@tanstack/ai-client'\nimport type { InjectChatResult } from '@tanstack/ai-angular'\nimport { ChatHostRef, defaultChatUITokens } from './tokens'\nimport type { ChatUITokens } from './tokens'\n\nexport type ChatUIHost<TOptions = unknown> = InjectChatResult<\n ChatUIToolsOf<TOptions>,\n ChatUISchemaOf<TOptions>,\n ChatUIInterruptsOf<TOptions>\n>\n\nexport type ChatUIQueueItem = QueuedMessage & {\n cancelQueued: () => void\n}\n\nexport type LayoutProps<\n TOptions,\n TInput extends Type<unknown> | undefined = Type<unknown>,\n> = {\n Messages: Type<unknown>\n Interrupts: Type<unknown>\n Queue: Type<unknown>\n readonly __ui?: TOptions\n} & (TInput extends Type<unknown> ? { Input: Type<unknown> } : {})\n\nexport type MessageProps<TOptions> = {\n message: ChatUIMessages<TOptions>[number]\n Parts: Type<unknown>\n}\n\nexport type InputProps<TOptions> = {\n readonly __ui?: TOptions\n}\n\nexport type QueueProps<TOptions> = {\n item: ChatUIQueueItem\n readonly __ui?: TOptions\n}\n\nexport type PartProps<TOptions, TKey extends ChatUIPartKey = ChatUIPartKey> = {\n part: ChatUIPartOf<TOptions, TKey>\n}\n\nexport type ToolProps<\n TOptions,\n TName extends ChatUIToolName<TOptions> = ChatUIToolName<TOptions>,\n> = {\n part: Extract<ToolCallPart<ChatUIToolsOf<TOptions>>, { name: TName }>\n result?: ToolResultPart\n interrupt?: ChatUIToolApproval<TOptions, TName>\n}\n\nexport type InterruptProps<\n TOptions,\n TName extends ChatUIInterruptName<TOptions> = never,\n> = {\n interrupt: ChatUIInterruptOf<TOptions, TName>\n readonly __ui?: TOptions\n}\n\ntype GenericInterruptComponents<TOptions> =\n ChatUIHasNamedInterrupts<TOptions> extends true\n ? {\n [K in ChatUINamedInterruptId<TOptions>]: Type<unknown>\n } & {\n fallback?: Type<unknown>\n }\n : {\n fallback?: Type<unknown>\n }\n\ntype ToolApprovalMap<TOptions> = {\n [K in ChatUIToolName<TOptions>]?: Type<unknown>\n}\n\nexport type ChatUIChromeComponents<\n TOptions,\n TInput extends Type<unknown> | undefined = Type<unknown>,\n> = {\n layout: Type<unknown>\n message: Type<unknown>\n input?: TInput\n queue?: Type<unknown>\n readonly __ui?: TOptions\n}\n\nexport type ChatUIPartsComponents<TOptions> = {\n [K in ChatUIPartKey]?: Type<unknown>\n} & {\n fallback?: Type<unknown>\n readonly __ui?: TOptions\n}\n\nexport type ChatUIInterruptsComponents<TOptions> = {\n tools?: ToolApprovalMap<TOptions>\n generic: GenericInterruptComponents<TOptions>\n}\n\nexport type ChatUIComponents<\n TOptions,\n TInput extends Type<unknown> | undefined = Type<unknown>,\n> = {\n components: ChatUIChromeComponents<TOptions, TInput>\n partsComponents: ChatUIPartsComponents<TOptions>\n} & (ChatUIHasNamedTools<TOptions> extends true\n ? {\n toolsComponents: {\n [K in ChatUIToolName<TOptions>]: Type<unknown>\n }\n }\n : {\n toolsComponents?: {\n [K in ChatUIToolName<TOptions>]?: Type<unknown>\n }\n }) &\n (ChatUIHasNamedInterrupts<TOptions> extends true\n ? { interruptsComponents: ChatUIInterruptsComponents<TOptions> }\n : {\n interruptsComponents?: {\n tools?: ToolApprovalMap<TOptions>\n generic?: GenericInterruptComponents<TOptions>\n }\n })\n\nexport type ChatUIContextConfig = {\n chatRef?: ChatUITokens['chatRef']\n part?: ChatUITokens['part']\n interrupt?: ChatUITokens['interrupt']\n}\n\nexport type ChatUIFactoryConfig<\n TOptions,\n TInput extends Type<unknown> | undefined = Type<unknown>,\n> = ChatUIComponents<TOptions, TInput> & {\n context?: ChatUIContextConfig\n}\n\nfunction createWarnOnce() {\n const seen = new Set<string>()\n return (key: string, message: string) => {\n if (process.env.NODE_ENV === 'production') return\n if (seen.has(key)) return\n seen.add(key)\n console.warn(message)\n }\n}\n\n/**\n * Bind chat options and Angular widgets once at module scope.\n *\n * Layout, message, input, queue, parts, tools, and interrupts are\n * standalone component classes. The factory builds `Chat`, `Messages`,\n * `Interrupts`, and `Queue` as Angular components that inject the active\n * chat through DI.\n */\nexport function createChatUI<\n const TOptions,\n TInput extends Type<unknown> | undefined = Type<unknown> | undefined,\n>(options: TOptions, config: ChatUIFactoryConfig<NoInfer<TOptions>, TInput>) {\n void options\n const {\n context: contextOption,\n components,\n partsComponents: parts,\n toolsComponents: tools,\n interruptsComponents: interrupts,\n } = config as ChatUIFactoryConfig<TOptions, TInput> & {\n toolsComponents?: Record<string, Type<unknown> | undefined>\n interruptsComponents?: {\n tools?: Record<string, Type<unknown> | undefined>\n generic?: Record<string, Type<unknown> | undefined>\n }\n }\n const {\n layout: Layout,\n message: MessageComponent,\n input: InputComponent,\n queue: QueueItemComponent,\n } = components\n const warn = createWarnOnce()\n const tokens = {\n chatRef: contextOption?.chatRef ?? defaultChatUITokens.chatRef,\n part: contextOption?.part ?? defaultChatUITokens.part,\n interrupt: contextOption?.interrupt ?? defaultChatUITokens.interrupt,\n }\n const inlineToolNames = collectInlineToolNames(\n interrupts?.tools as Record<string, unknown> | undefined,\n Object.keys(tools ?? {}),\n )\n\n function injectChatContext() {\n const ref = inject(tokens.chatRef)\n const chat = ref.host()\n if (!chat) {\n throw new Error(\n '`injectChatContext` must be used within `Chat` or `ChatProvider`.',\n )\n }\n return chat as ChatUIHost<TOptions>\n }\n\n @Component({\n selector: 'ai-chat-missing-input',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: '',\n })\n class MissingInput {\n constructor() {\n warn(\n 'input',\n '[tanstack-ai-ui] Rendered Input but no `input` component is registered.',\n )\n }\n }\n\n @Component({\n selector: 'ai-chat-queue',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgComponentOutlet],\n template: `\n @if (itemComponent) {\n @for (row of rows(); track row.item.id) {\n <ng-container\n [ngComponentOutlet]=\"itemComponent\"\n [ngComponentOutletInputs]=\"{ item: row.item }\"\n />\n }\n }\n `,\n })\n class Queue {\n readonly ref = inject(tokens.chatRef)\n readonly itemComponent = QueueItemComponent\n readonly rows = computed(() => {\n const chat = this.ref.host()\n if (!chat || !QueueItemComponent) return []\n const items = chat.queue()\n return items.map((item) => ({\n item: {\n ...item,\n cancelQueued: () => {\n chat.cancelQueued(item.id)\n },\n },\n }))\n })\n }\n\n @Component({\n selector: 'ai-chat-parts',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgComponentOutlet],\n template: `\n @for (selected of selectedParts(); track $index) {\n <ng-container\n [ngComponentOutlet]=\"outletFor(selected)\"\n [ngComponentOutletInputs]=\"inputsFor(selected)\"\n [ngComponentOutletInjector]=\"injectorFor(selected)\"\n />\n }\n `,\n })\n class Parts {\n readonly injector = inject(Injector)\n readonly ref = inject(tokens.chatRef)\n message = input.required<ChatUIMessages<TOptions>[number]>()\n\n readonly selectedParts = computed(() => {\n const chat = this.ref.host()\n return automaticPartsForMessage(\n selectMessageUI(this.message(), {\n interrupts: (chat?.interrupts() ??\n []) as ReadonlyArray<ChatUIInterrupt>,\n inlineToolNames,\n }),\n )\n })\n\n outletFor(selected: ChatUISelectedPart) {\n if (selected.key === 'toolCall') {\n const name = selected.part.name\n const Tool = tools?.[name as ChatUIToolName<TOptions>]\n if (!Tool) {\n warn(\n `tool:${name}`,\n `[tanstack-ai-ui] Missing tools.${name} component`,\n )\n return null\n }\n return Tool\n }\n const PartComponent = (parts[selected.key] ?? parts.fallback) as\n | Type<unknown>\n | undefined\n if (!PartComponent) {\n warn(\n `part:${selected.key}`,\n `[tanstack-ai-ui] Missing parts.${selected.key} component`,\n )\n return null\n }\n return PartComponent\n }\n\n inputsFor(selected: ChatUISelectedPart) {\n if (selected.key === 'toolCall') {\n return {\n part: selected.part,\n result: selected.result,\n interrupt: selected.interrupt,\n }\n }\n return { part: selected.part }\n }\n\n injectorFor(selected: ChatUISelectedPart) {\n return Injector.create({\n parent: this.injector,\n providers: [{ provide: tokens.part, useValue: selected }],\n })\n }\n }\n\n @Component({\n selector: 'ai-chat-messages',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgComponentOutlet],\n template: `\n @for (message of messages(); track message.id) {\n <ng-container\n [ngComponentOutlet]=\"messageComponent\"\n [ngComponentOutletInputs]=\"{\n message,\n Parts,\n }\"\n />\n }\n `,\n })\n class Messages {\n readonly ref = inject(tokens.chatRef)\n readonly messageComponent = MessageComponent\n readonly Parts = Parts\n readonly messages = computed(() => {\n const chat = this.ref.host()\n return (chat?.messages() ?? []) as ChatUIMessages<TOptions>\n })\n }\n\n @Component({\n selector: 'ai-chat-interrupts',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgComponentOutlet],\n template: `\n @for (interrupt of interrupts(); track interrupt.id) {\n <ng-container\n [ngComponentOutlet]=\"outletFor(interrupt)\"\n [ngComponentOutletInputs]=\"{ interrupt }\"\n [ngComponentOutletInjector]=\"injectorFor(interrupt)\"\n />\n }\n `,\n })\n class Interrupts {\n readonly injector = inject(Injector)\n readonly ref = inject(tokens.chatRef)\n readonly interrupts = computed(() => {\n const chat = this.ref.host()\n const selected = selectChatUI({\n messages: (chat?.messages() ?? []) as ChatUIMessages<TOptions>,\n interrupts: (chat?.interrupts() ??\n []) as ReadonlyArray<ChatUIInterrupt>,\n inlineToolNames,\n })\n return selected.interrupts\n })\n\n outletFor(interrupt: ChatUIInterrupt) {\n const InterruptComponent = resolveInterruptComponent(\n interrupt,\n interrupts,\n ) as Type<unknown> | undefined\n if (!InterruptComponent) {\n warn(\n `interrupt:${interrupt.id}`,\n `[tanstack-ai-ui] Missing interrupt component for ${interrupt.kind}`,\n )\n return null\n }\n return InterruptComponent\n }\n\n injectorFor(interrupt: ChatUIInterrupt) {\n return Injector.create({\n parent: this.injector,\n providers: [{ provide: tokens.interrupt, useValue: interrupt }],\n })\n }\n }\n\n const layoutInputs = {\n Messages,\n Interrupts,\n Queue,\n Input: (InputComponent ?? MissingInput) as Type<unknown>,\n }\n\n @Component({\n selector: 'ai-chat',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgComponentOutlet],\n providers: [{ provide: tokens.chatRef, useClass: ChatHostRef }],\n template: `\n <ng-container\n [ngComponentOutlet]=\"layout\"\n [ngComponentOutletInputs]=\"layoutInputs\"\n />\n `,\n })\n class Chat {\n chat = input.required<ChatUIHost<TOptions>>()\n readonly layout = Layout\n readonly layoutInputs = layoutInputs\n readonly ref = inject(tokens.chatRef)\n\n constructor() {\n effect(() => {\n const next = this.chat()\n untracked(() => this.ref.host.set(next as InjectChatResult))\n })\n }\n }\n\n @Component({\n selector: 'ai-chat-provider',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: tokens.chatRef, useClass: ChatHostRef }],\n template: `<ng-content />`,\n })\n class ChatProvider {\n chat = input.required<ChatUIHost<TOptions>>()\n readonly ref = inject(tokens.chatRef)\n\n constructor() {\n effect(() => {\n const next = this.chat()\n untracked(() => this.ref.host.set(next as InjectChatResult))\n })\n }\n }\n\n return {\n Chat,\n ChatProvider,\n Messages,\n Interrupts,\n Queue,\n Parts,\n injectChatContext,\n Input: InputComponent,\n } as ChatUIKit<TOptions, TInput>\n}\n\nexport type ChatUIKit<\n TOptions,\n TInput extends Type<unknown> | undefined = Type<unknown>,\n> = {\n Chat: Type<unknown>\n ChatProvider: Type<unknown>\n Messages: Type<unknown>\n Interrupts: Type<unknown>\n Queue: Type<unknown>\n Parts: Type<unknown>\n injectChatContext: () => ChatUIHost<TOptions>\n Input: TInput\n}\n","import { assertInInjectionContext } from '@angular/core'\nimport type { Type } from '@angular/core'\nimport { injectChat } from '@tanstack/ai-angular'\nimport type { InjectChatOptions } from '@tanstack/ai-angular'\nimport { createChatUI } from './create-ui'\nimport type { ChatUIFactoryConfig, ChatUIHost, InputProps } from './create-ui'\nimport type {\n ChatUIInterruptsOf,\n ChatUISchemaOf,\n ChatUIToolsOf,\n} from '@tanstack/ai-client/ui'\nimport type { InferredClientContext } from '@tanstack/ai-client'\n\ntype HeadlessOptions<TOptions> = InjectChatOptions<\n ChatUIToolsOf<TOptions>,\n ChatUISchemaOf<TOptions>,\n InferredClientContext<ChatUIToolsOf<TOptions>>,\n ChatUIInterruptsOf<TOptions>\n>\n\ntype ChatInstanceOverrides<TOptions> = {\n threadId?: string\n live?: HeadlessOptions<TOptions>['live']\n forwardedProps?: HeadlessOptions<TOptions>['forwardedProps']\n body?: HeadlessOptions<TOptions>['body']\n initialMessages?: HeadlessOptions<TOptions>['initialMessages']\n}\n\n/**\n * Bind chat options and Angular widgets once at module scope.\n *\n * This matches Form `injectForm` and the React `createChatHook` factory:\n * widgets register here. The returned `injectAppChat` creates a chat\n * instance in an injection context. Render `<ai-chat [chat]=\"chat\" />`\n * with the factory `Chat` component.\n */\nexport function createChatHook<\n const TOptions,\n TInput extends Type<unknown> | undefined = Type<unknown> | undefined,\n>({\n options,\n ...chatComponents\n}: {\n options: TOptions\n} & ChatUIFactoryConfig<NoInfer<TOptions>, TInput>) {\n const ui = createChatUI(\n options,\n chatComponents as ChatUIFactoryConfig<NoInfer<TOptions>, TInput>,\n )\n\n function injectAppChat(overrides?: ChatInstanceOverrides<TOptions>) {\n assertInInjectionContext(injectAppChat)\n const chat = (\n overrides\n ? injectChat({\n ...(options as HeadlessOptions<TOptions>),\n ...overrides,\n })\n : injectChat(options as HeadlessOptions<TOptions>)\n ) as ChatUIHost<TOptions>\n return chat\n }\n\n return {\n injectAppChat,\n injectChatContext: ui.injectChatContext,\n Chat: ui.Chat,\n ChatProvider: ui.ChatProvider,\n } as {\n injectAppChat: (\n overrides?: ChatInstanceOverrides<TOptions>,\n ) => ChatUIHost<TOptions>\n injectChatContext: () => ChatUIHost<TOptions>\n Chat: Type<unknown>\n ChatProvider: Type<unknown>\n }\n}\n\nexport type { InputProps }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAQA;;;AAGG;MACU,WAAW,CAAA;AACb,IAAA,IAAI,GAA4C,MAAM,CAAC,IAAI,2EAAC;AACtE;AASD;;;AAGG;SACa,sBAAsB,GAAA;AACpC,IAAA,MAAM,OAAO,GAAG,IAAI,cAAc,CAAc,eAAe,CAAC;AAChE,IAAA,MAAM,IAAI,GAAG,IAAI,cAAc,CAAqB,YAAY,CAAC;AACjE,IAAA,MAAM,SAAS,GAAG,IAAI,cAAc,CAAkB,iBAAiB,CAAC;AAExE,IAAA,SAAS,iBAAiB,GAAA;AACxB,QAAA,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC;AAC3B,QAAA,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE;QACvB,IAAI,CAAC,IAAI,EAAE;AACT,YAAA,MAAM,IAAI,KAAK,CACb,mEAAmE,CACpE;QACH;AACA,QAAA,OAAO,IAAI;IACb;IAEA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,EAAE;AACxD;AAEO,MAAM,mBAAmB,GAAG,sBAAsB,EAAE;;ACmI3D,SAAS,cAAc,GAAA;AACrB,IAAA,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU;AAC9B,IAAA,OAAO,CAAC,GAAW,EAAE,OAAe,KAAI;AACtC,QAAA,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY;YAAE;AAC3C,QAAA,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE;AACnB,QAAA,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AACb,QAAA,OAAO,CAA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AA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;gGAEtB,YAAY,EAAA,UAAA,EAAA,CAAA;sBANjB,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA;AACT,wBAAA,QAAQ,EAAE,kBAAkB;wBAC5B,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,wBAAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;AAC/D,wBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC3B,qBAAA;;IAaD,OAAO;QACL,IAAI;QACJ,YAAY;QACZ,QAAQ;QACR,UAAU;QACV,KAAK;QACL,KAAK;QACL,iBAAiB;AACjB,QAAA,KAAK,EAAE,cAAc;KACS;AACjC;;ACzdD;;;;;;;AAOG;AACG,SAAU,cAAc,CAG5B,EACA,OAAO,EACP,GAAG,cAAc,EAG+B,EAAA;IAChD,MAAM,EAAE,GAAG,YAAY,CACrB,OAAO,EACP,cAAgE,CACjE;IAED,SAAS,aAAa,CAAC,SAA2C,EAAA;QAChE,wBAAwB,CAAC,aAAa,CAAC;QACvC,MAAM,IAAI,IACR;cACI,UAAU,CAAC;AACT,gBAAA,GAAI,OAAqC;AACzC,gBAAA,GAAG,SAAS;aACb;AACH,cAAE,UAAU,CAAC,OAAoC,CAAC,CAC7B;AACzB,QAAA,OAAO,IAAI;IACb;IAEA,OAAO;QACL,aAAa;QACb,iBAAiB,EAAE,EAAE,CAAC,iBAAiB;QACvC,IAAI,EAAE,EAAE,CAAC,IAAI;QACb,YAAY,EAAE,EAAE,CAAC,YAAY;KAQ9B;AACH;;AC5EA;;AAEG;;;;"}
@@ -1,4 +1,4 @@
1
- import { ChatClient, GenerationClient, reconstructImageResult, reconstructAudioResult, reconstructSpeechResult, reconstructTranscriptionResult, AudioRecorder, reconstructSummarizeResult, VideoGenerationClient } from '@tanstack/ai-client';
1
+ import { ChatClient, registerWebMCPTools, GenerationClient, reconstructImageResult, reconstructAudioResult, reconstructSpeechResult, reconstructTranscriptionResult, AudioRecorder, reconstructSummarizeResult, VideoGenerationClient } from '@tanstack/ai-client';
2
2
  export { StorageUnavailableError, createChatClientOptions, fetchHttpStream, fetchServerSentEvents, indexedDBPersistence, localStoragePersistence, rpcStream, sessionStoragePersistence, stream, webSocket, xhrHttpStream, xhrServerSentEvents } from '@tanstack/ai-client';
3
3
  import { createChatDevtoolsBridge, createGenerationDevtoolsBridge, createVideoDevtoolsBridge } from '@tanstack/ai-client/devtools';
4
4
  import { isSignal, computed, assertInInjectionContext, inject, DestroyRef, Injector, signal, effect, afterNextRender } from '@angular/core';
@@ -278,6 +278,38 @@ function injectByok(client) {
278
278
  return snapshot.asReadonly();
279
279
  }
280
280
 
281
+ /**
282
+ * Registers executable client tools with WebMCP for the current Angular owner.
283
+ *
284
+ * Angular removes the registrations when it destroys the injection owner. Call
285
+ * this function in an injection context, such as a component field initializer.
286
+ *
287
+ * @param tools - The executable client tools to expose through WebMCP.
288
+ * @param options - Runtime context, per-tool options, and error handling.
289
+ *
290
+ * @example
291
+ * ```ts
292
+ * registration = injectWebMCPTools([statusTool], {
293
+ * onError: (error) => console.error(error),
294
+ * })
295
+ * ```
296
+ */
297
+ function injectWebMCPTools(tools, ...[options]) {
298
+ assertInInjectionContext(injectWebMCPTools);
299
+ const destroyRef = inject(DestroyRef);
300
+ const registrationController = new AbortController();
301
+ const { onError, ...registrationOptions } = options ?? {};
302
+ destroyRef.onDestroy(() => registrationController.abort());
303
+ void registerWebMCPTools(tools, {
304
+ ...registrationOptions,
305
+ signal: registrationController.signal,
306
+ }).catch((error) => {
307
+ if (!registrationController.signal.aborted) {
308
+ onError?.(error);
309
+ }
310
+ });
311
+ }
312
+
281
313
  // `TTransformed` infers from the `onResult` return position (a covariant
282
314
  // inference site that works even for an optional nested property), which types
283
315
  // the callback parameter as `TResult` and narrows `result`. Inferring the
@@ -693,5 +725,5 @@ function injectGenerateVideo(options) {
693
725
  * Generated bundle index. Do not edit.
694
726
  */
695
727
 
696
- export { injectAudioRecorder, injectByok, injectChat, injectGenerateAudio, injectGenerateImage, injectGenerateSpeech, injectGenerateVideo, injectGeneration, injectSummarize, injectTranscription };
728
+ export { injectAudioRecorder, injectByok, injectChat, injectGenerateAudio, injectGenerateImage, injectGenerateSpeech, injectGenerateVideo, injectGeneration, injectSummarize, injectTranscription, injectWebMCPTools };
697
729
  //# sourceMappingURL=tanstack-ai-angular.mjs.map