@genesislcap/ai-assistant 15.35.4 → 15.36.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.
- package/dist/ai-assistant.api.json +23 -0
- package/dist/ai-assistant.d.ts +46 -0
- package/dist/custom-elements.json +930 -826
- package/dist/dts/components/chat-bubble/chat-bubble.d.ts +18 -0
- package/dist/dts/components/chat-bubble/chat-bubble.d.ts.map +1 -1
- package/dist/dts/components/chat-bubble/chat-bubble.template.d.ts.map +1 -1
- package/dist/dts/components/chat-markdown/chat-markdown.d.ts +29 -0
- package/dist/dts/components/chat-markdown/chat-markdown.d.ts.map +1 -1
- package/dist/dts/components/halo-overlay.d.ts +30 -0
- package/dist/dts/components/halo-overlay.d.ts.map +1 -1
- package/dist/dts/index.d.ts +1 -1
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/main/main.template.d.ts +15 -0
- package/dist/dts/main/main.template.d.ts.map +1 -1
- package/dist/dts/suggestions/chat-suggestions.d.ts +7 -0
- package/dist/dts/suggestions/chat-suggestions.d.ts.map +1 -1
- package/dist/esm/components/chat-bubble/chat-bubble.js +27 -0
- package/dist/esm/components/chat-bubble/chat-bubble.template.js +5 -3
- package/dist/esm/components/chat-markdown/chat-markdown.js +132 -1
- package/dist/esm/components/halo-overlay.js +96 -8
- package/dist/esm/index.js +3 -1
- package/dist/esm/main/main.template.js +110 -45
- package/dist/esm/suggestions/chat-suggestions.js +11 -3
- package/docs/styling.md +153 -0
- package/package.json +18 -18
|
@@ -17523,6 +17523,29 @@
|
|
|
17523
17523
|
],
|
|
17524
17524
|
"extendsTokenRanges": []
|
|
17525
17525
|
},
|
|
17526
|
+
{
|
|
17527
|
+
"kind": "Variable",
|
|
17528
|
+
"canonicalReference": "@genesislcap/ai-assistant!MARKDOWN_EXPORTPARTS:var",
|
|
17529
|
+
"docComment": "/**\n * Every part this component exposes, as an `exportparts` value.\n *\n * `::part()` crosses exactly one shadow boundary, so a host that renders `<ai-chat-markdown>` in its own shadow root has to forward these for an app to reach them at all. Built from the map above rather than written out, so the forwarded list cannot drift from what is emitted.\n */\n",
|
|
17530
|
+
"excerptTokens": [
|
|
17531
|
+
{
|
|
17532
|
+
"kind": "Content",
|
|
17533
|
+
"text": "MARKDOWN_EXPORTPARTS: "
|
|
17534
|
+
},
|
|
17535
|
+
{
|
|
17536
|
+
"kind": "Content",
|
|
17537
|
+
"text": "string"
|
|
17538
|
+
}
|
|
17539
|
+
],
|
|
17540
|
+
"fileUrlPath": "src/components/chat-markdown/chat-markdown.ts",
|
|
17541
|
+
"isReadonly": true,
|
|
17542
|
+
"releaseTag": "Public",
|
|
17543
|
+
"name": "MARKDOWN_EXPORTPARTS",
|
|
17544
|
+
"variableTypeTokenRange": {
|
|
17545
|
+
"startIndex": 1,
|
|
17546
|
+
"endIndex": 2
|
|
17547
|
+
}
|
|
17548
|
+
},
|
|
17526
17549
|
{
|
|
17527
17550
|
"kind": "Variable",
|
|
17528
17551
|
"canonicalReference": "@genesislcap/ai-assistant!messageTimestampTemplate:var",
|
package/dist/ai-assistant.d.ts
CHANGED
|
@@ -651,6 +651,27 @@ export declare class AiChatMarkdown extends GenesisElement {
|
|
|
651
651
|
content: string;
|
|
652
652
|
/** @internal */
|
|
653
653
|
renderMarkdown(): string;
|
|
654
|
+
/**
|
|
655
|
+
* Tag the generated elements with shadow parts so an embedding app can style them.
|
|
656
|
+
*
|
|
657
|
+
* Takes the tree DOMPurify built rather than re-parsing its serialised output: `content` changes
|
|
658
|
+
* on every streamed chunk, so a second parse/serialise round trip would run per chunk over the
|
|
659
|
+
* whole message, and the string the browser finally parses is then serialised straight from the
|
|
660
|
+
* tree DOMPurify checked. Parse/serialise mismatches are where mXSS bypasses have historically
|
|
661
|
+
* lived, and this walk has no need to introduce one.
|
|
662
|
+
*
|
|
663
|
+
* Only ever *adds* attributes, to DOM that has already been cleared - so it is not itself
|
|
664
|
+
* sanitiser surface.
|
|
665
|
+
*
|
|
666
|
+
* Lists additionally carry a level: a top-level list is `md-ul md-ul-level-1`, a list nested
|
|
667
|
+
* inside it is `md-ul-level-2`, and an `li` takes the level of the list holding it. Levels are
|
|
668
|
+
* clamped at `MAX_LIST_LEVEL`, so a list deeper than that answers to the deepest level
|
|
669
|
+
* rather than to a name no host forwards. Chat markdown rarely nests, so this is a safety valve
|
|
670
|
+
* rather than a feature - without it, every list at every depth would answer to one selector and
|
|
671
|
+
* there would be no way to tell them apart afterwards. Depth comes from walking the tree rather
|
|
672
|
+
* than from marked's renderers, which are invoked innermost-first and so cannot count downwards.
|
|
673
|
+
*/
|
|
674
|
+
private annotateParts;
|
|
654
675
|
}
|
|
655
676
|
|
|
656
677
|
/**
|
|
@@ -1157,6 +1178,22 @@ export declare interface AssistantAppSettingsToggle {
|
|
|
1157
1178
|
*/
|
|
1158
1179
|
export declare const assistantSettingsSectionTitleStyles: ElementStyles;
|
|
1159
1180
|
|
|
1181
|
+
/**
|
|
1182
|
+
* Part names for one avatar element: the bare name, a role-level name, and — on the assistant
|
|
1183
|
+
* side, whose rows vary — the message type.
|
|
1184
|
+
*
|
|
1185
|
+
* The role-level name is the one an app usually wants. `messageType` splits the assistant across
|
|
1186
|
+
* `ai`, `ai-thinking`, `ai-function` and `interaction`, so without it "style the assistant's
|
|
1187
|
+
* avatar, not the user's" takes four selectors and silently misses any type added later.
|
|
1188
|
+
* `::part()` names cannot be chained, so each has to be a name of its own rather than a
|
|
1189
|
+
* combination. The user side needs no extra name — its role and its type are both `user`.
|
|
1190
|
+
*
|
|
1191
|
+
* Exported for the unit test that pins the vocabulary; not part of the element API.
|
|
1192
|
+
*
|
|
1193
|
+
* @internal
|
|
1194
|
+
*/
|
|
1195
|
+
export declare const avatarPartsFor: (base: string, type: string) => string;
|
|
1196
|
+
|
|
1160
1197
|
declare interface BaseAgentConfig {
|
|
1161
1198
|
/**
|
|
1162
1199
|
* Stable identity for this agent. Used for classifier routing, manual
|
|
@@ -5055,6 +5092,15 @@ export declare interface ManualSelectionConfig {
|
|
|
5055
5092
|
hint?: string;
|
|
5056
5093
|
}
|
|
5057
5094
|
|
|
5095
|
+
/**
|
|
5096
|
+
* Every part this component exposes, as an `exportparts` value.
|
|
5097
|
+
*
|
|
5098
|
+
* `::part()` crosses exactly one shadow boundary, so a host that renders `<ai-chat-markdown>` in
|
|
5099
|
+
* its own shadow root has to forward these for an app to reach them at all. Built from the map
|
|
5100
|
+
* above rather than written out, so the forwarded list cannot drift from what is emitted.
|
|
5101
|
+
*/
|
|
5102
|
+
export declare const MARKDOWN_EXPORTPARTS: string;
|
|
5103
|
+
|
|
5058
5104
|
/**
|
|
5059
5105
|
* The timestamp shown beside the sender name (GENC-1257).
|
|
5060
5106
|
*
|