@genesislcap/ai-assistant 14.409.0-FUI-2495.4 → 14.409.0-FUI-2495.6
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 +70 -3
- package/dist/ai-assistant.d.ts +10 -2
- package/dist/dts/components/chat-interaction-wrapper/chat-interaction-wrapper.d.ts +3 -3
- package/dist/dts/components/chat-interaction-wrapper/chat-interaction-wrapper.d.ts.map +1 -1
- package/dist/dts/components/chat-markdown/chat-markdown.d.ts +1 -1
- package/dist/dts/components/chat-markdown/chat-markdown.d.ts.map +1 -1
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/main/main.styles.d.ts.map +1 -1
- package/dist/dts/types/ai-chat-widget.d.ts +3 -2
- package/dist/dts/types/ai-chat-widget.d.ts.map +1 -1
- package/dist/esm/components/chat-driver/chat-driver.js +1 -1
- package/dist/esm/components/chat-interaction-wrapper/chat-interaction-wrapper.js +2 -2
- package/dist/esm/components/chat-markdown/chat-markdown.js +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/main/main.styles.js +0 -3
- package/dist/esm/main/main.template.js +1 -1
- package/package.json +15 -15
- package/src/components/chat-driver/chat-driver.ts +1 -1
- package/src/components/chat-interaction-wrapper/chat-interaction-wrapper.ts +3 -3
- package/src/components/chat-markdown/chat-markdown.ts +1 -1
- package/src/index.ts +1 -0
- package/src/main/main.styles.ts +0 -3
- package/src/main/main.template.ts +1 -1
- package/src/types/ai-chat-widget.ts +4 -2
|
@@ -1106,6 +1106,68 @@
|
|
|
1106
1106
|
"endIndex": 2
|
|
1107
1107
|
}
|
|
1108
1108
|
},
|
|
1109
|
+
{
|
|
1110
|
+
"kind": "Class",
|
|
1111
|
+
"canonicalReference": "@genesislcap/ai-assistant!AiChatMarkdown:class",
|
|
1112
|
+
"docComment": "",
|
|
1113
|
+
"excerptTokens": [
|
|
1114
|
+
{
|
|
1115
|
+
"kind": "Content",
|
|
1116
|
+
"text": "export declare class AiChatMarkdown extends "
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
"kind": "Reference",
|
|
1120
|
+
"text": "GenesisElement",
|
|
1121
|
+
"canonicalReference": "@microsoft/fast-element!FASTElement:interface"
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
"kind": "Content",
|
|
1125
|
+
"text": " "
|
|
1126
|
+
}
|
|
1127
|
+
],
|
|
1128
|
+
"fileUrlPath": "src/components/chat-markdown/chat-markdown.ts",
|
|
1129
|
+
"releaseTag": "Public",
|
|
1130
|
+
"isAbstract": false,
|
|
1131
|
+
"name": "AiChatMarkdown",
|
|
1132
|
+
"preserveMemberOrder": false,
|
|
1133
|
+
"members": [
|
|
1134
|
+
{
|
|
1135
|
+
"kind": "Property",
|
|
1136
|
+
"canonicalReference": "@genesislcap/ai-assistant!AiChatMarkdown#content:member",
|
|
1137
|
+
"docComment": "/**\n * The markdown string to render.\n */\n",
|
|
1138
|
+
"excerptTokens": [
|
|
1139
|
+
{
|
|
1140
|
+
"kind": "Content",
|
|
1141
|
+
"text": "content: "
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
"kind": "Content",
|
|
1145
|
+
"text": "string"
|
|
1146
|
+
},
|
|
1147
|
+
{
|
|
1148
|
+
"kind": "Content",
|
|
1149
|
+
"text": ";"
|
|
1150
|
+
}
|
|
1151
|
+
],
|
|
1152
|
+
"isReadonly": false,
|
|
1153
|
+
"isOptional": false,
|
|
1154
|
+
"releaseTag": "Public",
|
|
1155
|
+
"name": "content",
|
|
1156
|
+
"propertyTypeTokenRange": {
|
|
1157
|
+
"startIndex": 1,
|
|
1158
|
+
"endIndex": 2
|
|
1159
|
+
},
|
|
1160
|
+
"isStatic": false,
|
|
1161
|
+
"isProtected": false,
|
|
1162
|
+
"isAbstract": false
|
|
1163
|
+
}
|
|
1164
|
+
],
|
|
1165
|
+
"extendsTokenRange": {
|
|
1166
|
+
"startIndex": 1,
|
|
1167
|
+
"endIndex": 2
|
|
1168
|
+
},
|
|
1169
|
+
"implementsTokenRanges": []
|
|
1170
|
+
},
|
|
1109
1171
|
{
|
|
1110
1172
|
"kind": "Interface",
|
|
1111
1173
|
"canonicalReference": "@genesislcap/ai-assistant!AiChatWidget:interface",
|
|
@@ -1151,15 +1213,20 @@
|
|
|
1151
1213
|
{
|
|
1152
1214
|
"kind": "PropertySignature",
|
|
1153
1215
|
"canonicalReference": "@genesislcap/ai-assistant!AiChatWidget#resolved:member",
|
|
1154
|
-
"docComment": "/**\n *
|
|
1216
|
+
"docComment": "/**\n * The result when the interaction has been resolved. Truthy = resolved; value contains status/payload for display.\n */\n",
|
|
1155
1217
|
"excerptTokens": [
|
|
1156
1218
|
{
|
|
1157
1219
|
"kind": "Content",
|
|
1158
1220
|
"text": "resolved?: "
|
|
1159
1221
|
},
|
|
1222
|
+
{
|
|
1223
|
+
"kind": "Reference",
|
|
1224
|
+
"text": "InteractionResult",
|
|
1225
|
+
"canonicalReference": "@genesislcap/foundation-ai!InteractionResult:type"
|
|
1226
|
+
},
|
|
1160
1227
|
{
|
|
1161
1228
|
"kind": "Content",
|
|
1162
|
-
"text": "
|
|
1229
|
+
"text": "<unknown>"
|
|
1163
1230
|
},
|
|
1164
1231
|
{
|
|
1165
1232
|
"kind": "Content",
|
|
@@ -1172,7 +1239,7 @@
|
|
|
1172
1239
|
"name": "resolved",
|
|
1173
1240
|
"propertyTypeTokenRange": {
|
|
1174
1241
|
"startIndex": 1,
|
|
1175
|
-
"endIndex":
|
|
1242
|
+
"endIndex": 3
|
|
1176
1243
|
}
|
|
1177
1244
|
}
|
|
1178
1245
|
],
|
package/dist/ai-assistant.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { ChatMessage } from '@genesislcap/foundation-ai';
|
|
|
6
6
|
import type { ChatToolDefinition } from '@genesislcap/foundation-ai';
|
|
7
7
|
import type { ChatToolHandlers } from '@genesislcap/foundation-ai';
|
|
8
8
|
import { GenesisElement } from '@genesislcap/web-core';
|
|
9
|
+
import type { InteractionResult } from '@genesislcap/foundation-ai';
|
|
9
10
|
import { ViewTemplate } from '@genesislcap/web-core';
|
|
10
11
|
|
|
11
12
|
/**
|
|
@@ -168,6 +169,13 @@ export declare interface AiAssistantSerializedState {
|
|
|
168
169
|
*/
|
|
169
170
|
export declare type AiAssistantState = 'idle' | 'loading' | 'error';
|
|
170
171
|
|
|
172
|
+
export declare class AiChatMarkdown extends GenesisElement {
|
|
173
|
+
/** The markdown string to render. */
|
|
174
|
+
content: string;
|
|
175
|
+
/** @internal */
|
|
176
|
+
renderMarkdown(): string;
|
|
177
|
+
}
|
|
178
|
+
|
|
171
179
|
/**
|
|
172
180
|
* Interface that AI inline interaction components can implement.
|
|
173
181
|
* The `AiChatInteractionWrapper` always sets `data` and `resolved` on the rendered element.
|
|
@@ -176,8 +184,8 @@ export declare type AiAssistantState = 'idle' | 'loading' | 'error';
|
|
|
176
184
|
*/
|
|
177
185
|
export declare interface AiChatWidget {
|
|
178
186
|
data: unknown;
|
|
179
|
-
/**
|
|
180
|
-
resolved?:
|
|
187
|
+
/** The result when the interaction has been resolved. Truthy = resolved; value contains status/payload for display. */
|
|
188
|
+
resolved?: InteractionResult<unknown>;
|
|
181
189
|
}
|
|
182
190
|
|
|
183
191
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InteractionResult } from '@genesislcap/foundation-ai';
|
|
1
|
+
import type { InteractionResult } from '@genesislcap/foundation-ai';
|
|
2
2
|
import { GenesisElement } from '@genesislcap/web-core';
|
|
3
3
|
export type ChatInteractionEventsMap = {
|
|
4
4
|
'interaction-completed': InteractionResult<unknown> & {
|
|
@@ -12,8 +12,8 @@ export declare class AiChatInteractionWrapper extends GenesisElement {
|
|
|
12
12
|
data: any;
|
|
13
13
|
/** @internal */
|
|
14
14
|
interactionId: string;
|
|
15
|
-
/**
|
|
16
|
-
resolved:
|
|
15
|
+
/** The resolved result once the interaction has completed. Forwarded to the rendered component. @internal */
|
|
16
|
+
resolved: InteractionResult<unknown> | undefined;
|
|
17
17
|
/** @internal */
|
|
18
18
|
container: HTMLElement;
|
|
19
19
|
connectedCallback(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-interaction-wrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-interaction-wrapper/chat-interaction-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"chat-interaction-wrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-interaction-wrapper/chat-interaction-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAiB,cAAc,EAAc,MAAM,uBAAuB,CAAC;AAKlF,MAAM,MAAM,wBAAwB,GAAG;IACrC,uBAAuB,EAAE,iBAAiB,CAAC,OAAO,CAAC,GAAG;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC;CACjF,CAAC;AAEF,qBAKa,wBAAyB,SAAQ,cAAc;IAC1D,gBAAgB;IACJ,aAAa,EAAE,MAAM,CAAM;IACvC,gBAAgB;IACJ,IAAI,EAAE,GAAG,CAAC;IACtB,gBAAgB;IACJ,aAAa,EAAE,MAAM,CAAM;IACvC,6GAA6G;IACjG,QAAQ,EAAE,iBAAiB,CAAC,OAAO,CAAC,GAAG,SAAS,CAAa;IAEzE,gBAAgB;IAChB,SAAS,EAAG,WAAW,CAAC;IAExB,iBAAiB;IAKjB,oBAAoB;IAIpB,eAAe;IAOf,OAAO,CAAC,eAAe;CA8CxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-markdown.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-markdown/chat-markdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,cAAc,EAAoB,MAAM,uBAAuB,CAAC;AAuE7F,qBAOa,cAAe,SAAQ,cAAc;IAChD,
|
|
1
|
+
{"version":3,"file":"chat-markdown.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-markdown/chat-markdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,cAAc,EAAoB,MAAM,uBAAuB,CAAC;AAuE7F,qBAOa,cAAe,SAAQ,cAAc;IAChD,qCAAqC;IACzB,OAAO,EAAE,MAAM,CAAM;IAEjC,gBAAgB;IAChB,cAAc;CAKf"}
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -10,4 +10,5 @@ export * from './channel/ai-activity-bus';
|
|
|
10
10
|
export * from './config/config';
|
|
11
11
|
export * from './config/fallback-agents';
|
|
12
12
|
export type { AiChatWidget } from './types/ai-chat-widget';
|
|
13
|
+
export { AiChatMarkdown } from './components/chat-markdown/chat-markdown';
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/dts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.styles.d.ts","sourceRoot":"","sources":["../../../src/main/main.styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"main.styles.d.ts","sourceRoot":"","sources":["../../../src/main/main.styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,iDAkgBlB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { InteractionResult } from '@genesislcap/foundation-ai';
|
|
1
2
|
/**
|
|
2
3
|
* Interface that AI inline interaction components can implement.
|
|
3
4
|
* The `AiChatInteractionWrapper` always sets `data` and `resolved` on the rendered element.
|
|
@@ -6,7 +7,7 @@
|
|
|
6
7
|
*/
|
|
7
8
|
export interface AiChatWidget {
|
|
8
9
|
data: unknown;
|
|
9
|
-
/**
|
|
10
|
-
resolved?:
|
|
10
|
+
/** The result when the interaction has been resolved. Truthy = resolved; value contains status/payload for display. */
|
|
11
|
+
resolved?: InteractionResult<unknown>;
|
|
11
12
|
}
|
|
12
13
|
//# sourceMappingURL=ai-chat-widget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-chat-widget.d.ts","sourceRoot":"","sources":["../../../src/types/ai-chat-widget.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,
|
|
1
|
+
{"version":3,"file":"ai-chat-widget.d.ts","sourceRoot":"","sources":["../../../src/types/ai-chat-widget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,uHAAuH;IACvH,QAAQ,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;CACvC"}
|
|
@@ -169,7 +169,7 @@ export class ChatDriver extends EventTarget {
|
|
|
169
169
|
// history-updated event carries the updated flag.
|
|
170
170
|
const msg = this.history.find((m) => { var _a; return ((_a = m.interaction) === null || _a === void 0 ? void 0 : _a.interactionId) === interactionId; });
|
|
171
171
|
if (msg === null || msg === void 0 ? void 0 : msg.interaction) {
|
|
172
|
-
msg.interaction.resolved =
|
|
172
|
+
msg.interaction.resolved = result;
|
|
173
173
|
this.dispatchEvent(new CustomEvent('history-updated', {
|
|
174
174
|
detail: this.history,
|
|
175
175
|
}));
|
|
@@ -10,8 +10,8 @@ let AiChatInteractionWrapper = class AiChatInteractionWrapper extends GenesisEle
|
|
|
10
10
|
this.componentName = '';
|
|
11
11
|
/** @internal */
|
|
12
12
|
this.interactionId = '';
|
|
13
|
-
/**
|
|
14
|
-
this.resolved =
|
|
13
|
+
/** The resolved result once the interaction has completed. Forwarded to the rendered component. @internal */
|
|
14
|
+
this.resolved = undefined;
|
|
15
15
|
}
|
|
16
16
|
connectedCallback() {
|
|
17
17
|
super.connectedCallback();
|
package/dist/esm/index.js
CHANGED
|
@@ -213,7 +213,7 @@ export const FoundationAiAssistantTemplate = (designSystemPrefix) => {
|
|
|
213
213
|
:componentName=${(m) => m.interaction.componentName}
|
|
214
214
|
:data=${(m) => m.interaction.data}
|
|
215
215
|
:interactionId=${(m) => m.interaction.interactionId}
|
|
216
|
-
:resolved=${(m) =>
|
|
216
|
+
:resolved=${(m) => m.interaction.resolved}
|
|
217
217
|
@interaction-completed=${(m, c) => c.parent.handleInteractionCompleted(c.event)}
|
|
218
218
|
></ai-chat-interaction-wrapper>
|
|
219
219
|
`)}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/ai-assistant",
|
|
3
3
|
"description": "Genesis AI Assistant micro-frontend",
|
|
4
|
-
"version": "14.409.0-FUI-2495.
|
|
4
|
+
"version": "14.409.0-FUI-2495.6",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/ai-assistant.d.ts",
|
|
@@ -59,23 +59,23 @@
|
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@genesislcap/foundation-testing": "14.409.0-FUI-2495.
|
|
63
|
-
"@genesislcap/genx": "14.409.0-FUI-2495.
|
|
64
|
-
"@genesislcap/rollup-builder": "14.409.0-FUI-2495.
|
|
65
|
-
"@genesislcap/ts-builder": "14.409.0-FUI-2495.
|
|
66
|
-
"@genesislcap/uvu-playwright-builder": "14.409.0-FUI-2495.
|
|
67
|
-
"@genesislcap/vite-builder": "14.409.0-FUI-2495.
|
|
68
|
-
"@genesislcap/webpack-builder": "14.409.0-FUI-2495.
|
|
62
|
+
"@genesislcap/foundation-testing": "14.409.0-FUI-2495.6",
|
|
63
|
+
"@genesislcap/genx": "14.409.0-FUI-2495.6",
|
|
64
|
+
"@genesislcap/rollup-builder": "14.409.0-FUI-2495.6",
|
|
65
|
+
"@genesislcap/ts-builder": "14.409.0-FUI-2495.6",
|
|
66
|
+
"@genesislcap/uvu-playwright-builder": "14.409.0-FUI-2495.6",
|
|
67
|
+
"@genesislcap/vite-builder": "14.409.0-FUI-2495.6",
|
|
68
|
+
"@genesislcap/webpack-builder": "14.409.0-FUI-2495.6",
|
|
69
69
|
"@types/dompurify": "^3.0.5",
|
|
70
70
|
"@types/marked": "^5.0.2"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@genesislcap/foundation-ai": "14.409.0-FUI-2495.
|
|
74
|
-
"@genesislcap/foundation-logger": "14.409.0-FUI-2495.
|
|
75
|
-
"@genesislcap/foundation-ui": "14.409.0-FUI-2495.
|
|
76
|
-
"@genesislcap/foundation-utils": "14.409.0-FUI-2495.
|
|
77
|
-
"@genesislcap/rapid-design-system": "14.409.0-FUI-2495.
|
|
78
|
-
"@genesislcap/web-core": "14.409.0-FUI-2495.
|
|
73
|
+
"@genesislcap/foundation-ai": "14.409.0-FUI-2495.6",
|
|
74
|
+
"@genesislcap/foundation-logger": "14.409.0-FUI-2495.6",
|
|
75
|
+
"@genesislcap/foundation-ui": "14.409.0-FUI-2495.6",
|
|
76
|
+
"@genesislcap/foundation-utils": "14.409.0-FUI-2495.6",
|
|
77
|
+
"@genesislcap/rapid-design-system": "14.409.0-FUI-2495.6",
|
|
78
|
+
"@genesislcap/web-core": "14.409.0-FUI-2495.6",
|
|
79
79
|
"dompurify": "^3.3.1",
|
|
80
80
|
"marked": "^17.0.3"
|
|
81
81
|
},
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"publishConfig": {
|
|
88
88
|
"access": "public"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "0618cadf29baa3a17f115b140524cdcae0664af0"
|
|
91
91
|
}
|
|
@@ -221,7 +221,7 @@ export class ChatDriver extends EventTarget implements AiDriver {
|
|
|
221
221
|
// history-updated event carries the updated flag.
|
|
222
222
|
const msg = this.history.find((m) => m.interaction?.interactionId === interactionId);
|
|
223
223
|
if (msg?.interaction) {
|
|
224
|
-
msg.interaction.resolved =
|
|
224
|
+
msg.interaction.resolved = result;
|
|
225
225
|
this.dispatchEvent(
|
|
226
226
|
new CustomEvent<ReadonlyArray<ChatMessage>>('history-updated', {
|
|
227
227
|
detail: this.history,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InteractionResult } from '@genesislcap/foundation-ai';
|
|
1
|
+
import type { InteractionResult } from '@genesislcap/foundation-ai';
|
|
2
2
|
import { customElement, GenesisElement, observable } from '@genesislcap/web-core';
|
|
3
3
|
import { logger } from '../../utils/logger';
|
|
4
4
|
import { AiChatInteractionWrapperStyles } from './chat-interaction-wrapper.styles';
|
|
@@ -20,8 +20,8 @@ export class AiChatInteractionWrapper extends GenesisElement {
|
|
|
20
20
|
@observable data: any;
|
|
21
21
|
/** @internal */
|
|
22
22
|
@observable interactionId: string = '';
|
|
23
|
-
/**
|
|
24
|
-
@observable resolved:
|
|
23
|
+
/** The resolved result once the interaction has completed. Forwarded to the rendered component. @internal */
|
|
24
|
+
@observable resolved: InteractionResult<unknown> | undefined = undefined;
|
|
25
25
|
|
|
26
26
|
/** @internal */
|
|
27
27
|
container!: HTMLElement;
|
package/src/index.ts
CHANGED
package/src/main/main.styles.ts
CHANGED
|
@@ -284,7 +284,7 @@ export const FoundationAiAssistantTemplate = (
|
|
|
284
284
|
:componentName=${(m) => m.interaction!.componentName}
|
|
285
285
|
:data=${(m) => m.interaction!.data}
|
|
286
286
|
:interactionId=${(m) => m.interaction!.interactionId}
|
|
287
|
-
:resolved=${(m) =>
|
|
287
|
+
:resolved=${(m) => m.interaction!.resolved}
|
|
288
288
|
@interaction-completed=${(m, c) =>
|
|
289
289
|
c.parent.handleInteractionCompleted(c.event)}
|
|
290
290
|
></ai-chat-interaction-wrapper>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { InteractionResult } from '@genesislcap/foundation-ai';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Interface that AI inline interaction components can implement.
|
|
3
5
|
* The `AiChatInteractionWrapper` always sets `data` and `resolved` on the rendered element.
|
|
@@ -6,6 +8,6 @@
|
|
|
6
8
|
*/
|
|
7
9
|
export interface AiChatWidget {
|
|
8
10
|
data: unknown;
|
|
9
|
-
/**
|
|
10
|
-
resolved?:
|
|
11
|
+
/** The result when the interaction has been resolved. Truthy = resolved; value contains status/payload for display. */
|
|
12
|
+
resolved?: InteractionResult<unknown>;
|
|
11
13
|
}
|