|
1925 | 1925 | }, |
1926 | 1926 | { |
1927 | 1927 | "name": "messageContent", |
1928 | | - "type": "(message: BaseMessage<>) => string", |
| 1928 | + "type": "(message: object) => string", |
1929 | 1929 | "description": "", |
1930 | 1930 | "optional": false |
1931 | 1931 | }, |
|
2072 | 2072 | }, |
2073 | 2073 | { |
2074 | 2074 | "name": "humanContent", |
2075 | | - "signature": "humanContent(message: unknown): string", |
| 2075 | + "signature": "humanContent(message: object): string", |
2076 | 2076 | "description": "Renderable content for a human-role message bubble. Most human\nmessages are typed prompts and pass through `messageContent`\nunchanged. A2UI action messages (e.g. form submits, button clicks\non a rendered surface) flow through the same submit channel and\nland in the message stream as a HumanMessage whose content is a\nJSON-serialized `A2uiActionMessage`. Showing the raw JSON as if\nthe user typed it leaks the protocol; per the A2UI spec\nthose events resemble tool calls more than user utterances.\n\n`a2uiActionLabel` returns a short human-readable label for\nrecognized action shapes (\"Search flights\", \"Selected flight UA123\",\netc.) — or null for any non-action content, in which case we fall\nback to the original text.", |
2077 | 2077 | "params": [ |
2078 | 2078 | { |
2079 | 2079 | "name": "message", |
2080 | | - "type": "unknown", |
| 2080 | + "type": "object", |
2081 | 2081 | "description": "", |
2082 | 2082 | "optional": false |
2083 | 2083 | } |
|
4002 | 4002 | { |
4003 | 4003 | "name": "resolvedRegistry", |
4004 | 4004 | "type": "Signal<Readonly<Record<string, Type<unknown> | RenderViewEntry>>>", |
4005 | | - "description": "", |
| 4005 | + "description": "Most specific wins: the `[viewRegistry]` input, then a registry provided by\nan ancestor injector, then the built-in markdown views.", |
4006 | 4006 | "optional": false |
4007 | 4007 | }, |
4008 | 4008 | { |
|
6467 | 6467 | ], |
6468 | 6468 | "examples": [] |
6469 | 6469 | }, |
6470 | | - { |
6471 | | - "name": "ChatConfig", |
6472 | | - "kind": "interface", |
6473 | | - "description": "Application-wide options for provideChat. Every field is optional;\nthe values are exposed to all chat components in the tree via the\n`CHAT_CONFIG` injection token, so you set them once at bootstrap instead of\nthreading props through every component.", |
6474 | | - "properties": [ |
6475 | | - { |
6476 | | - "name": "assistantName", |
6477 | | - "type": "string", |
6478 | | - "description": "Shared assistant display name for consumers that read CHAT_CONFIG (default: \"Assistant\").", |
6479 | | - "optional": true |
6480 | | - }, |
6481 | | - { |
6482 | | - "name": "avatarLabel", |
6483 | | - "type": "string", |
6484 | | - "description": "Shared AI avatar label for consumers that read CHAT_CONFIG (default: \"A\").", |
6485 | | - "optional": true |
6486 | | - }, |
6487 | | - { |
6488 | | - "name": "renderRegistry", |
6489 | | - "type": "AngularRegistry", |
6490 | | - "description": "Shared render registry for consumers that read CHAT_CONFIG.", |
6491 | | - "optional": true |
6492 | | - } |
6493 | | - ], |
6494 | | - "examples": [] |
6495 | | - }, |
6496 | 6470 | { |
6497 | 6471 | "name": "ChatLifecycle", |
6498 | 6472 | "kind": "interface", |
|
8468 | 8442 | "name": "ContentType", |
8469 | 8443 | "kind": "type", |
8470 | 8444 | "description": "", |
8471 | | - "signature": "\"pending\" | \"markdown\" | \"json-render\" | \"a2ui\" | \"mixed\"", |
| 8445 | + "signature": "\"pending\" | \"markdown\" | \"json-render\" | \"a2ui\"", |
8472 | 8446 | "examples": [] |
8473 | 8447 | }, |
8474 | 8448 | { |
|
8590 | 8564 | "signature": "ViewRegistry", |
8591 | 8565 | "examples": [] |
8592 | 8566 | }, |
8593 | | - { |
8594 | | - "name": "CHAT_CONFIG", |
8595 | | - "kind": "const", |
8596 | | - "description": "", |
8597 | | - "signature": "InjectionToken<ChatConfig>", |
8598 | | - "examples": [] |
8599 | | - }, |
8600 | 8567 | { |
8601 | 8568 | "name": "CHAT_LIFECYCLE", |
8602 | 8569 | "kind": "const", |
|
8614 | 8581 | { |
8615 | 8582 | "name": "MARKDOWN_VIEW_REGISTRY", |
8616 | 8583 | "kind": "const", |
8617 | | - "description": "DI token for the markdown view registry consumed by <chat-streaming-md>\nand <md-children>. Maps MarkdownNode.type strings (e.g. \"paragraph\",\n\"heading\") to Angular components that render that node type.\n\n`<chat-streaming-md>` provides the runtime registry on its component-level\ninjector — either the consumer-supplied [viewRegistry] input, or\n`cacheplaneMarkdownViews` (the default) — so descendant <md-children>\ncomponents resolve the right components for each node.", |
| 8584 | + "description": "DI token for the markdown view registry consumed by <chat-streaming-md>\nand <md-children>. Maps MarkdownNode.type strings (e.g. \"paragraph\",\n\"heading\") to Angular components that render that node type.\n\n`<chat-streaming-md>` provides the resolved registry on its component-level\ninjector so descendant <md-children> components resolve the right component\nfor each node. It resolves most-specific-first: the `[viewRegistry]` input,\nthen a registry provided by an ancestor injector (application root or route),\nthen `cacheplaneMarkdownViews` (the default). Providing this token at the\napplication root is therefore a supported app-wide override.", |
8618 | 8585 | "signature": "InjectionToken<Readonly<Record<string, Type<unknown> | RenderViewEntry>>>", |
8619 | 8586 | "examples": [] |
8620 | 8587 | }, |
|
9418 | 9385 | { |
9419 | 9386 | "name": "messageContent", |
9420 | 9387 | "kind": "function", |
9421 | | - "description": "Extracts a human-readable string from a message's content.\n\n`BaseMessage.content` is `string | MessageContentComplex[]`. Reasoning-\ncapable models (OpenAI gpt-5/o-series, Anthropic) emit complex arrays of\ntyped blocks: `{type:'text',text}`, `{type:'reasoning',...}`, tool-use\nblocks, etc. We render only the visible text portions and skip anything\nelse. Stringifying the whole array would dump raw JSON like\n`[{\"type\":\"text\",...}]` into the chat bubble.", |
9422 | | - "signature": "messageContent(message: BaseMessage<>): string", |
| 9388 | + "description": "Extracts a human-readable string from a message's content.\n\nMessage content is either a plain string or an array of typed blocks.\nReasoning-capable models (OpenAI gpt-5/o-series, Anthropic) emit complex\narrays: `{type:'text',text}`, `{type:'reasoning',...}`, tool-use blocks, etc.\nOnly the visible text portions are rendered and anything else is skipped.\nStringifying the whole array would dump raw JSON like `[{\"type\":\"text\",...}]`\ninto the chat bubble.\n\nThe parameter is structural on purpose. This function reads nothing but\n`.content`, and callers hold either the runtime-neutral `Message` from\n`agent.messages()` or a LangChain `BaseMessage` depending on where the\nmessage came from. Both satisfy `{ content: unknown }`, so neither has to\ncast.", |
| 9389 | + "signature": "messageContent(message: object): string", |
9423 | 9390 | "params": [ |
9424 | 9391 | { |
9425 | 9392 | "name": "message", |
9426 | | - "type": "BaseMessage<>", |
9427 | | - "description": "", |
| 9393 | + "type": "object", |
| 9394 | + "description": "Any object carrying a `content` field.", |
9428 | 9395 | "optional": false |
9429 | 9396 | } |
9430 | 9397 | ], |
|
9531 | 9498 | }, |
9532 | 9499 | "examples": [] |
9533 | 9500 | }, |
9534 | | - { |
9535 | | - "name": "provideChat", |
9536 | | - "kind": "function", |
9537 | | - "description": "Bootstrap `@threadplane/chat` in an Angular application or standalone\ncomponent tree.\n\nCall this once inside `bootstrapApplication` (or the `providers` array of a\nroot `ApplicationConfig`). It registers the shared ChatConfig token\nso every chat component in the tree can read the render registry, avatar\nlabel, and assistant display name without explicit prop threading.", |
9538 | | - "signature": "provideChat(config: ChatConfig): EnvironmentProviders", |
9539 | | - "params": [ |
9540 | | - { |
9541 | | - "name": "config", |
9542 | | - "type": "ChatConfig", |
9543 | | - "description": "Options bag that controls the chat feature set:\n - `renderRegistry` — shared AngularRegistry wiring tool-view\n components to their names; pass the value returned by\n `defineAngularRegistry` from `\\@threadplane/render`.\n - `avatarLabel` — short label shown in the AI avatar bubble (default `\"A\"`).\n - `assistantName` — display name shown above assistant messages\n (default `\"Assistant\"`).", |
9544 | | - "optional": false |
9545 | | - } |
9546 | | - ], |
9547 | | - "returns": { |
9548 | | - "type": "EnvironmentProviders", |
9549 | | - "description": "" |
9550 | | - }, |
9551 | | - "examples": [ |
9552 | | - "```ts\n// main.ts\nimport { bootstrapApplication } from '@angular/platform-browser';\nimport { provideChat } from '@threadplane/chat';\nimport { defineAngularRegistry, provideRender } from '@threadplane/render';\nimport { DayCardComponent } from './day-card.component';\n\nconst registry = defineAngularRegistry({ day_card: DayCardComponent });\n\nbootstrapApplication(AppComponent, {\n providers: [\n provideChat({ renderRegistry: registry, avatarLabel: 'AI' }),\n provideRender({ registry }),\n ],\n});\n```" |
9553 | | - ] |
9554 | | - }, |
9555 | 9501 | { |
9556 | 9502 | "name": "renderMarkdown", |
9557 | 9503 | "kind": "function", |
|
9771 | 9717 | { |
9772 | 9718 | "name": "tools", |
9773 | 9719 | "kind": "function", |
9774 | | - "description": "Collect named client tools into a frozen, name-keyed registry.\n\nThe overload is generic over the entire map (`const M`) so that each tool's\nprecise type (FunctionToolDef`<S,R>`, ViewToolDef`<S,C>`, or\nAskToolDef`<S,C>`) and every literal key are preserved in the\nClientToolRegistry passed to `provideChat`. This lets downstream\nconsumers look up individual tools without losing generic information.", |
| 9720 | + "description": "Collect named client tools into a frozen, name-keyed registry.\n\nThe overload is generic over the entire map (`const M`) so that each tool's\nprecise type (FunctionToolDef`<S,R>`, ViewToolDef`<S,C>`, or\nAskToolDef`<S,C>`) and every literal key are preserved in the\nClientToolRegistry passed to the `clientTools` input. This lets downstream\nconsumers look up individual tools without losing generic information.", |
9775 | 9721 | "signature": "tools(map: M): Readonly<M>", |
9776 | 9722 | "params": [ |
9777 | 9723 | { |
|
0 commit comments