@progress/kendo-vue-conversational-ui 4.3.0-dev.202401291303

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.
Files changed (75) hide show
  1. package/LICENSE.md +11 -0
  2. package/NOTICE.txt +86 -0
  3. package/README.md +53 -0
  4. package/dist/cdn/js/kendo-vue-conversational-ui.js +1 -0
  5. package/dist/es/additionalTypes.ts +21 -0
  6. package/dist/es/ai-prompt/AIPrompt.d.ts +117 -0
  7. package/dist/es/ai-prompt/AIPrompt.js +117 -0
  8. package/dist/es/ai-prompt/AIPromptContent.d.ts +47 -0
  9. package/dist/es/ai-prompt/AIPromptContent.js +33 -0
  10. package/dist/es/ai-prompt/AIPromptExpander.d.ts +45 -0
  11. package/dist/es/ai-prompt/AIPromptExpander.js +66 -0
  12. package/dist/es/ai-prompt/AIPromptFooter.d.ts +44 -0
  13. package/dist/es/ai-prompt/AIPromptFooter.js +33 -0
  14. package/dist/es/ai-prompt/AIPromptHeader.d.ts +71 -0
  15. package/dist/es/ai-prompt/AIPromptHeader.js +141 -0
  16. package/dist/es/ai-prompt/views/AIPromptCommandsView.d.ts +87 -0
  17. package/dist/es/ai-prompt/views/AIPromptCommandsView.js +116 -0
  18. package/dist/es/ai-prompt/views/AIPromptOutputView.d.ts +77 -0
  19. package/dist/es/ai-prompt/views/AIPromptOutputView.js +2048 -0
  20. package/dist/es/ai-prompt/views/AIPromptView.d.ts +56 -0
  21. package/dist/es/ai-prompt/views/AIPromptView.js +297 -0
  22. package/dist/es/ai-prompt/views/AIPromptViewRender.d.ts +51 -0
  23. package/dist/es/ai-prompt/views/AIPromptViewRender.js +39 -0
  24. package/dist/es/main.d.ts +8 -0
  25. package/dist/es/main.js +8 -0
  26. package/dist/es/messages/main.d.ts +20 -0
  27. package/dist/es/messages/main.js +21 -0
  28. package/dist/esm/additionalTypes.ts +21 -0
  29. package/dist/esm/ai-prompt/AIPrompt.d.ts +117 -0
  30. package/dist/esm/ai-prompt/AIPrompt.js +117 -0
  31. package/dist/esm/ai-prompt/AIPromptContent.d.ts +47 -0
  32. package/dist/esm/ai-prompt/AIPromptContent.js +33 -0
  33. package/dist/esm/ai-prompt/AIPromptExpander.d.ts +45 -0
  34. package/dist/esm/ai-prompt/AIPromptExpander.js +66 -0
  35. package/dist/esm/ai-prompt/AIPromptFooter.d.ts +44 -0
  36. package/dist/esm/ai-prompt/AIPromptFooter.js +33 -0
  37. package/dist/esm/ai-prompt/AIPromptHeader.d.ts +71 -0
  38. package/dist/esm/ai-prompt/AIPromptHeader.js +141 -0
  39. package/dist/esm/ai-prompt/views/AIPromptCommandsView.d.ts +87 -0
  40. package/dist/esm/ai-prompt/views/AIPromptCommandsView.js +116 -0
  41. package/dist/esm/ai-prompt/views/AIPromptOutputView.d.ts +77 -0
  42. package/dist/esm/ai-prompt/views/AIPromptOutputView.js +2048 -0
  43. package/dist/esm/ai-prompt/views/AIPromptView.d.ts +56 -0
  44. package/dist/esm/ai-prompt/views/AIPromptView.js +297 -0
  45. package/dist/esm/ai-prompt/views/AIPromptViewRender.d.ts +51 -0
  46. package/dist/esm/ai-prompt/views/AIPromptViewRender.js +39 -0
  47. package/dist/esm/main.d.ts +8 -0
  48. package/dist/esm/main.js +8 -0
  49. package/dist/esm/messages/main.d.ts +20 -0
  50. package/dist/esm/messages/main.js +21 -0
  51. package/dist/esm/package.json +3 -0
  52. package/dist/npm/additionalTypes.ts +21 -0
  53. package/dist/npm/ai-prompt/AIPrompt.d.ts +117 -0
  54. package/dist/npm/ai-prompt/AIPrompt.js +124 -0
  55. package/dist/npm/ai-prompt/AIPromptContent.d.ts +47 -0
  56. package/dist/npm/ai-prompt/AIPromptContent.js +40 -0
  57. package/dist/npm/ai-prompt/AIPromptExpander.d.ts +45 -0
  58. package/dist/npm/ai-prompt/AIPromptExpander.js +73 -0
  59. package/dist/npm/ai-prompt/AIPromptFooter.d.ts +44 -0
  60. package/dist/npm/ai-prompt/AIPromptFooter.js +40 -0
  61. package/dist/npm/ai-prompt/AIPromptHeader.d.ts +71 -0
  62. package/dist/npm/ai-prompt/AIPromptHeader.js +148 -0
  63. package/dist/npm/ai-prompt/views/AIPromptCommandsView.d.ts +87 -0
  64. package/dist/npm/ai-prompt/views/AIPromptCommandsView.js +123 -0
  65. package/dist/npm/ai-prompt/views/AIPromptOutputView.d.ts +77 -0
  66. package/dist/npm/ai-prompt/views/AIPromptOutputView.js +2055 -0
  67. package/dist/npm/ai-prompt/views/AIPromptView.d.ts +56 -0
  68. package/dist/npm/ai-prompt/views/AIPromptView.js +304 -0
  69. package/dist/npm/ai-prompt/views/AIPromptViewRender.d.ts +51 -0
  70. package/dist/npm/ai-prompt/views/AIPromptViewRender.js +46 -0
  71. package/dist/npm/main.d.ts +8 -0
  72. package/dist/npm/main.js +24 -0
  73. package/dist/npm/messages/main.d.ts +20 -0
  74. package/dist/npm/messages/main.js +24 -0
  75. package/package.json +70 -0
@@ -0,0 +1,2048 @@
1
+ var __assign = this && this.__assign || function () {
2
+ __assign = Object.assign || function (t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) {
6
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
7
+ }
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ // @ts-ignore
14
+ import * as Vue from 'vue';
15
+ var allVue = Vue;
16
+ var gh = allVue.h;
17
+ var isV3 = allVue.version && allVue.version[0] === '3';
18
+ import { AIPromptContent } from '../AIPromptContent';
19
+ import { messages, aIPromptNoOutputs } from '../../messages/main';
20
+ import { AIPromptViewRender } from './AIPromptViewRender';
21
+ import { Card, CardActions, CardBody, CardHeader, CardSubtitle, CardTitle } from '@progress/kendo-vue-layout';
22
+ import { copyIcon, rotateIcon, thumbUpOutlineIcon, thumbDownOutlineIcon, commentIcon, checkIcon } from '@progress/kendo-svg-icons';
23
+ import { Button } from '@progress/kendo-vue-buttons';
24
+ import { provideLocalizationService } from '@progress/kendo-vue-intl';
25
+ import { getListeners, getTemplate, templateRendering } from '@progress/kendo-vue-common';
26
+ /**
27
+ * Specifies the default values for Output view Toolbar.
28
+ */
29
+ export var outputViewDefaults = {
30
+ name: 'output-view',
31
+ buttonText: 'Output',
32
+ buttonIcon: commentIcon
33
+ };
34
+ /**
35
+ * @hidden
36
+ */
37
+ var AIPromptOutputViewVue2 = {
38
+ name: 'KendoAIPromptOutputView',
39
+ props: {
40
+ outputs: Array,
41
+ outputCard: [String, Function, Object],
42
+ showOutputRating: Boolean
43
+ },
44
+ // @ts-ignore
45
+ setup: !isV3 ? undefined : function () {
46
+ var v3 = !!isV3;
47
+ return {
48
+ v3: v3
49
+ };
50
+ },
51
+ inject: {
52
+ kendoAIPrompt: {
53
+ default: null
54
+ },
55
+ kendoLocalizationService: {
56
+ default: null
57
+ }
58
+ },
59
+ data: function data() {
60
+ return {
61
+ copyButtonIcon: copyIcon
62
+ };
63
+ },
64
+ methods: {
65
+ retryPrompt: function retryPrompt(output) {
66
+ if (this.kendoAIPrompt.onPromptRequest) {
67
+ this.kendoAIPrompt.onPromptRequest.call(null, output.prompt, __assign(__assign({}, output), {
68
+ isRetry: true
69
+ }));
70
+ }
71
+ },
72
+ copyToClipboard: function copyToClipboard(output) {
73
+ var _this = this;
74
+ // Maybe we need to provide handler to the client for this
75
+ if (output === null || output === void 0 ? void 0 : output.responseContent) {
76
+ navigator.clipboard.writeText(output.responseContent);
77
+ }
78
+ this.copyButtonIcon = checkIcon;
79
+ setTimeout(function () {
80
+ _this.copyButtonIcon = copyIcon;
81
+ }, 1000);
82
+ },
83
+ outputRating: function outputRating(output, ratingType) {
84
+ if (this.kendoAIPrompt.onPromptRequest) {
85
+ this.kendoAIPrompt.onPromptRequest.call(null, output.prompt, __assign(__assign({}, output), {
86
+ ratingType: ratingType,
87
+ isRetry: false
88
+ }));
89
+ }
90
+ }
91
+ },
92
+ render: function render(createElement) {
93
+ var _this3 = this;
94
+ var h = gh || createElement;
95
+ var _a = this.$props,
96
+ outputs = _a.outputs,
97
+ showOutputRating = _a.showOutputRating,
98
+ outputCard = _a.outputCard;
99
+ var ls = provideLocalizationService(this);
100
+ var card = templateRendering.call(this, outputCard, getListeners.call(this));
101
+ return (
102
+ // @ts-ignore function children
103
+ h(AIPromptViewRender, {
104
+ name: outputViewDefaults.name,
105
+ attrs: this.v3 ? undefined : {
106
+ name: outputViewDefaults.name
107
+ }
108
+ }, this.v3 ? function () {
109
+ return [
110
+ // @ts-ignore function children
111
+ h(AIPromptContent, _this3.v3 ? function () {
112
+ return [h("div", {
113
+ "class": "k-card-list"
114
+ }, [outputs && outputs.length > 0 ? outputs.map(function (output) {
115
+ var _this2 = this;
116
+ var _this = this;
117
+ var outputCardRendering = getTemplate.call(this, {
118
+ h: h,
119
+ template: card,
120
+ defaultRendering: null,
121
+ additionalProps: {
122
+ output: output
123
+ }
124
+ });
125
+ return outputCard ? outputCardRendering :
126
+ // @ts-ignore function children
127
+ h(Card, {
128
+ key: output.id
129
+ }, this.v3 ? function () {
130
+ return [
131
+ // @ts-ignore function children
132
+ h(CardHeader, _this2.v3 ? function () {
133
+ return [output.title &&
134
+ // @ts-ignore function children
135
+ h(CardTitle, _this2.v3 ? function () {
136
+ return [output.title];
137
+ } : [output.title]), output.subTitle &&
138
+ // @ts-ignore function children
139
+ h(CardSubtitle, _this2.v3 ? function () {
140
+ return [output.subTitle];
141
+ } : [output.subTitle])];
142
+ } : [output.title && h(CardTitle, _this2.v3 ? function () {
143
+ return [output.title];
144
+ } : [output.title]), output.subTitle && h(CardSubtitle, _this2.v3 ? function () {
145
+ return [output.subTitle];
146
+ } : [output.subTitle])]),
147
+ // @ts-ignore function children
148
+ h(CardBody, _this2.v3 ? function () {
149
+ return [output.responseContent];
150
+ } : [output.responseContent]),
151
+ // @ts-ignore function children
152
+ h(CardActions, _this2.v3 ? function () {
153
+ return [
154
+ // @ts-ignore function children
155
+ h(Button, {
156
+ size: 'medium',
157
+ attrs: _this2.v3 ? undefined : {
158
+ size: 'medium',
159
+ themeColor: 'primary',
160
+ fillMode: 'flat',
161
+ rounded: 'medium',
162
+ title: 'Copy',
163
+ svgIcon: _this2.copyButtonIcon,
164
+ "aria-hidden": "true"
165
+ },
166
+ themeColor: 'primary',
167
+ fillMode: 'flat',
168
+ rounded: 'medium',
169
+ title: 'Copy',
170
+ svgIcon: _this2.copyButtonIcon,
171
+ "aria-hidden": "true",
172
+ onClick: function onClick() {
173
+ return _this.copyToClipboard(output);
174
+ },
175
+ on: _this2.v3 ? undefined : {
176
+ "click": function onClick() {
177
+ return _this.copyToClipboard(output);
178
+ }
179
+ }
180
+ }, _this2.v3 ? function () {
181
+ return ['Copy'];
182
+ } : ['Copy']),
183
+ // @ts-ignore function children
184
+ h(Button, {
185
+ size: 'medium',
186
+ attrs: _this2.v3 ? undefined : {
187
+ size: 'medium',
188
+ themeColor: 'base',
189
+ fillMode: 'flat',
190
+ rounded: 'medium',
191
+ title: 'Retry',
192
+ svgIcon: rotateIcon,
193
+ "aria-hidden": "true"
194
+ },
195
+ themeColor: 'base',
196
+ fillMode: 'flat',
197
+ rounded: 'medium',
198
+ title: 'Retry',
199
+ svgIcon: rotateIcon,
200
+ "aria-hidden": "true",
201
+ onClick: function onClick() {
202
+ return _this.retryPrompt(output);
203
+ },
204
+ on: _this2.v3 ? undefined : {
205
+ "click": function onClick() {
206
+ return _this.retryPrompt(output);
207
+ }
208
+ }
209
+ }, _this2.v3 ? function () {
210
+ return ['Retry'];
211
+ } : ['Retry']), showOutputRating && h("span", {
212
+ "class": "k-spacer"
213
+ }), showOutputRating && h(Button, {
214
+ size: 'medium',
215
+ attrs: _this2.v3 ? undefined : {
216
+ size: 'medium',
217
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
218
+ fillMode: 'flat',
219
+ rounded: 'medium',
220
+ title: 'Rate up',
221
+ svgIcon: thumbUpOutlineIcon,
222
+ "aria-hidden": "true"
223
+ },
224
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
225
+ fillMode: 'flat',
226
+ rounded: 'medium',
227
+ title: 'Rate up',
228
+ svgIcon: thumbUpOutlineIcon,
229
+ "aria-hidden": "true",
230
+ onClick: function onClick() {
231
+ return _this.outputRating(output, 'positive');
232
+ },
233
+ on: _this2.v3 ? undefined : {
234
+ "click": function onClick() {
235
+ return _this.outputRating(output, 'positive');
236
+ }
237
+ }
238
+ }), showOutputRating && h(Button, {
239
+ size: 'medium',
240
+ attrs: _this2.v3 ? undefined : {
241
+ size: 'medium',
242
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
243
+ fillMode: 'flat',
244
+ rounded: 'medium',
245
+ title: 'Rate down',
246
+ svgIcon: thumbDownOutlineIcon,
247
+ "aria-hidden": "true"
248
+ },
249
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
250
+ fillMode: 'flat',
251
+ rounded: 'medium',
252
+ title: 'Rate down',
253
+ svgIcon: thumbDownOutlineIcon,
254
+ "aria-hidden": "true",
255
+ onClick: function onClick() {
256
+ return _this.outputRating(output, 'negative');
257
+ },
258
+ on: _this2.v3 ? undefined : {
259
+ "click": function onClick() {
260
+ return _this.outputRating(output, 'negative');
261
+ }
262
+ }
263
+ })];
264
+ } : [h(Button, {
265
+ size: 'medium',
266
+ attrs: _this2.v3 ? undefined : {
267
+ size: 'medium',
268
+ themeColor: 'primary',
269
+ fillMode: 'flat',
270
+ rounded: 'medium',
271
+ title: 'Copy',
272
+ svgIcon: _this2.copyButtonIcon,
273
+ "aria-hidden": "true"
274
+ },
275
+ themeColor: 'primary',
276
+ fillMode: 'flat',
277
+ rounded: 'medium',
278
+ title: 'Copy',
279
+ svgIcon: _this2.copyButtonIcon,
280
+ "aria-hidden": "true",
281
+ onClick: function onClick() {
282
+ return _this.copyToClipboard(output);
283
+ },
284
+ on: _this2.v3 ? undefined : {
285
+ "click": function onClick() {
286
+ return _this.copyToClipboard(output);
287
+ }
288
+ }
289
+ }, _this2.v3 ? function () {
290
+ return ['Copy'];
291
+ } : ['Copy']), h(Button, {
292
+ size: 'medium',
293
+ attrs: _this2.v3 ? undefined : {
294
+ size: 'medium',
295
+ themeColor: 'base',
296
+ fillMode: 'flat',
297
+ rounded: 'medium',
298
+ title: 'Retry',
299
+ svgIcon: rotateIcon,
300
+ "aria-hidden": "true"
301
+ },
302
+ themeColor: 'base',
303
+ fillMode: 'flat',
304
+ rounded: 'medium',
305
+ title: 'Retry',
306
+ svgIcon: rotateIcon,
307
+ "aria-hidden": "true",
308
+ onClick: function onClick() {
309
+ return _this.retryPrompt(output);
310
+ },
311
+ on: _this2.v3 ? undefined : {
312
+ "click": function onClick() {
313
+ return _this.retryPrompt(output);
314
+ }
315
+ }
316
+ }, _this2.v3 ? function () {
317
+ return ['Retry'];
318
+ } : ['Retry']), showOutputRating && h("span", {
319
+ "class": "k-spacer"
320
+ }), showOutputRating && h(Button, {
321
+ size: 'medium',
322
+ attrs: _this2.v3 ? undefined : {
323
+ size: 'medium',
324
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
325
+ fillMode: 'flat',
326
+ rounded: 'medium',
327
+ title: 'Rate up',
328
+ svgIcon: thumbUpOutlineIcon,
329
+ "aria-hidden": "true"
330
+ },
331
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
332
+ fillMode: 'flat',
333
+ rounded: 'medium',
334
+ title: 'Rate up',
335
+ svgIcon: thumbUpOutlineIcon,
336
+ "aria-hidden": "true",
337
+ onClick: function onClick() {
338
+ return _this.outputRating(output, 'positive');
339
+ },
340
+ on: _this2.v3 ? undefined : {
341
+ "click": function onClick() {
342
+ return _this.outputRating(output, 'positive');
343
+ }
344
+ }
345
+ }), showOutputRating && h(Button, {
346
+ size: 'medium',
347
+ attrs: _this2.v3 ? undefined : {
348
+ size: 'medium',
349
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
350
+ fillMode: 'flat',
351
+ rounded: 'medium',
352
+ title: 'Rate down',
353
+ svgIcon: thumbDownOutlineIcon,
354
+ "aria-hidden": "true"
355
+ },
356
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
357
+ fillMode: 'flat',
358
+ rounded: 'medium',
359
+ title: 'Rate down',
360
+ svgIcon: thumbDownOutlineIcon,
361
+ "aria-hidden": "true",
362
+ onClick: function onClick() {
363
+ return _this.outputRating(output, 'negative');
364
+ },
365
+ on: _this2.v3 ? undefined : {
366
+ "click": function onClick() {
367
+ return _this.outputRating(output, 'negative');
368
+ }
369
+ }
370
+ })])];
371
+ } : [h(CardHeader, _this2.v3 ? function () {
372
+ return [output.title && h(CardTitle, _this2.v3 ? function () {
373
+ return [output.title];
374
+ } : [output.title]), output.subTitle && h(CardSubtitle, _this2.v3 ? function () {
375
+ return [output.subTitle];
376
+ } : [output.subTitle])];
377
+ } : [output.title && h(CardTitle, _this2.v3 ? function () {
378
+ return [output.title];
379
+ } : [output.title]), output.subTitle && h(CardSubtitle, _this2.v3 ? function () {
380
+ return [output.subTitle];
381
+ } : [output.subTitle])]), h(CardBody, _this2.v3 ? function () {
382
+ return [output.responseContent];
383
+ } : [output.responseContent]), h(CardActions, _this2.v3 ? function () {
384
+ return [h(Button, {
385
+ size: 'medium',
386
+ attrs: _this2.v3 ? undefined : {
387
+ size: 'medium',
388
+ themeColor: 'primary',
389
+ fillMode: 'flat',
390
+ rounded: 'medium',
391
+ title: 'Copy',
392
+ svgIcon: _this2.copyButtonIcon,
393
+ "aria-hidden": "true"
394
+ },
395
+ themeColor: 'primary',
396
+ fillMode: 'flat',
397
+ rounded: 'medium',
398
+ title: 'Copy',
399
+ svgIcon: _this2.copyButtonIcon,
400
+ "aria-hidden": "true",
401
+ onClick: function onClick() {
402
+ return _this.copyToClipboard(output);
403
+ },
404
+ on: _this2.v3 ? undefined : {
405
+ "click": function onClick() {
406
+ return _this.copyToClipboard(output);
407
+ }
408
+ }
409
+ }, _this2.v3 ? function () {
410
+ return ['Copy'];
411
+ } : ['Copy']), h(Button, {
412
+ size: 'medium',
413
+ attrs: _this2.v3 ? undefined : {
414
+ size: 'medium',
415
+ themeColor: 'base',
416
+ fillMode: 'flat',
417
+ rounded: 'medium',
418
+ title: 'Retry',
419
+ svgIcon: rotateIcon,
420
+ "aria-hidden": "true"
421
+ },
422
+ themeColor: 'base',
423
+ fillMode: 'flat',
424
+ rounded: 'medium',
425
+ title: 'Retry',
426
+ svgIcon: rotateIcon,
427
+ "aria-hidden": "true",
428
+ onClick: function onClick() {
429
+ return _this.retryPrompt(output);
430
+ },
431
+ on: _this2.v3 ? undefined : {
432
+ "click": function onClick() {
433
+ return _this.retryPrompt(output);
434
+ }
435
+ }
436
+ }, _this2.v3 ? function () {
437
+ return ['Retry'];
438
+ } : ['Retry']), showOutputRating && h("span", {
439
+ "class": "k-spacer"
440
+ }), showOutputRating && h(Button, {
441
+ size: 'medium',
442
+ attrs: _this2.v3 ? undefined : {
443
+ size: 'medium',
444
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
445
+ fillMode: 'flat',
446
+ rounded: 'medium',
447
+ title: 'Rate up',
448
+ svgIcon: thumbUpOutlineIcon,
449
+ "aria-hidden": "true"
450
+ },
451
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
452
+ fillMode: 'flat',
453
+ rounded: 'medium',
454
+ title: 'Rate up',
455
+ svgIcon: thumbUpOutlineIcon,
456
+ "aria-hidden": "true",
457
+ onClick: function onClick() {
458
+ return _this.outputRating(output, 'positive');
459
+ },
460
+ on: _this2.v3 ? undefined : {
461
+ "click": function onClick() {
462
+ return _this.outputRating(output, 'positive');
463
+ }
464
+ }
465
+ }), showOutputRating && h(Button, {
466
+ size: 'medium',
467
+ attrs: _this2.v3 ? undefined : {
468
+ size: 'medium',
469
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
470
+ fillMode: 'flat',
471
+ rounded: 'medium',
472
+ title: 'Rate down',
473
+ svgIcon: thumbDownOutlineIcon,
474
+ "aria-hidden": "true"
475
+ },
476
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
477
+ fillMode: 'flat',
478
+ rounded: 'medium',
479
+ title: 'Rate down',
480
+ svgIcon: thumbDownOutlineIcon,
481
+ "aria-hidden": "true",
482
+ onClick: function onClick() {
483
+ return _this.outputRating(output, 'negative');
484
+ },
485
+ on: _this2.v3 ? undefined : {
486
+ "click": function onClick() {
487
+ return _this.outputRating(output, 'negative');
488
+ }
489
+ }
490
+ })];
491
+ } : [h(Button, {
492
+ size: 'medium',
493
+ attrs: _this2.v3 ? undefined : {
494
+ size: 'medium',
495
+ themeColor: 'primary',
496
+ fillMode: 'flat',
497
+ rounded: 'medium',
498
+ title: 'Copy',
499
+ svgIcon: _this2.copyButtonIcon,
500
+ "aria-hidden": "true"
501
+ },
502
+ themeColor: 'primary',
503
+ fillMode: 'flat',
504
+ rounded: 'medium',
505
+ title: 'Copy',
506
+ svgIcon: _this2.copyButtonIcon,
507
+ "aria-hidden": "true",
508
+ onClick: function onClick() {
509
+ return _this.copyToClipboard(output);
510
+ },
511
+ on: _this2.v3 ? undefined : {
512
+ "click": function onClick() {
513
+ return _this.copyToClipboard(output);
514
+ }
515
+ }
516
+ }, _this2.v3 ? function () {
517
+ return ['Copy'];
518
+ } : ['Copy']), h(Button, {
519
+ size: 'medium',
520
+ attrs: _this2.v3 ? undefined : {
521
+ size: 'medium',
522
+ themeColor: 'base',
523
+ fillMode: 'flat',
524
+ rounded: 'medium',
525
+ title: 'Retry',
526
+ svgIcon: rotateIcon,
527
+ "aria-hidden": "true"
528
+ },
529
+ themeColor: 'base',
530
+ fillMode: 'flat',
531
+ rounded: 'medium',
532
+ title: 'Retry',
533
+ svgIcon: rotateIcon,
534
+ "aria-hidden": "true",
535
+ onClick: function onClick() {
536
+ return _this.retryPrompt(output);
537
+ },
538
+ on: _this2.v3 ? undefined : {
539
+ "click": function onClick() {
540
+ return _this.retryPrompt(output);
541
+ }
542
+ }
543
+ }, _this2.v3 ? function () {
544
+ return ['Retry'];
545
+ } : ['Retry']), showOutputRating && h("span", {
546
+ "class": "k-spacer"
547
+ }), showOutputRating && h(Button, {
548
+ size: 'medium',
549
+ attrs: _this2.v3 ? undefined : {
550
+ size: 'medium',
551
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
552
+ fillMode: 'flat',
553
+ rounded: 'medium',
554
+ title: 'Rate up',
555
+ svgIcon: thumbUpOutlineIcon,
556
+ "aria-hidden": "true"
557
+ },
558
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
559
+ fillMode: 'flat',
560
+ rounded: 'medium',
561
+ title: 'Rate up',
562
+ svgIcon: thumbUpOutlineIcon,
563
+ "aria-hidden": "true",
564
+ onClick: function onClick() {
565
+ return _this.outputRating(output, 'positive');
566
+ },
567
+ on: _this2.v3 ? undefined : {
568
+ "click": function onClick() {
569
+ return _this.outputRating(output, 'positive');
570
+ }
571
+ }
572
+ }), showOutputRating && h(Button, {
573
+ size: 'medium',
574
+ attrs: _this2.v3 ? undefined : {
575
+ size: 'medium',
576
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
577
+ fillMode: 'flat',
578
+ rounded: 'medium',
579
+ title: 'Rate down',
580
+ svgIcon: thumbDownOutlineIcon,
581
+ "aria-hidden": "true"
582
+ },
583
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
584
+ fillMode: 'flat',
585
+ rounded: 'medium',
586
+ title: 'Rate down',
587
+ svgIcon: thumbDownOutlineIcon,
588
+ "aria-hidden": "true",
589
+ onClick: function onClick() {
590
+ return _this.outputRating(output, 'negative');
591
+ },
592
+ on: _this2.v3 ? undefined : {
593
+ "click": function onClick() {
594
+ return _this.outputRating(output, 'negative');
595
+ }
596
+ }
597
+ })])]);
598
+ }, _this3) :
599
+ // @ts-ignore function children
600
+ h(Card, _this3.v3 ? function () {
601
+ return [
602
+ // @ts-ignore function children
603
+ h(CardBody, _this3.v3 ? function () {
604
+ return [ls.toLanguageString(aIPromptNoOutputs, messages[aIPromptNoOutputs])];
605
+ } : [ls.toLanguageString(aIPromptNoOutputs, messages[aIPromptNoOutputs])])];
606
+ } : [h(CardBody, _this3.v3 ? function () {
607
+ return [ls.toLanguageString(aIPromptNoOutputs, messages[aIPromptNoOutputs])];
608
+ } : [ls.toLanguageString(aIPromptNoOutputs, messages[aIPromptNoOutputs])])])])];
609
+ } : [h("div", {
610
+ "class": "k-card-list"
611
+ }, [outputs && outputs.length > 0 ? outputs.map(function (output) {
612
+ var _this2 = this;
613
+ var _this = this;
614
+ var outputCardRendering = getTemplate.call(this, {
615
+ h: h,
616
+ template: card,
617
+ defaultRendering: null,
618
+ additionalProps: {
619
+ output: output
620
+ }
621
+ });
622
+ return outputCard ? outputCardRendering : h(Card, {
623
+ key: output.id
624
+ }, this.v3 ? function () {
625
+ return [h(CardHeader, _this2.v3 ? function () {
626
+ return [output.title && h(CardTitle, _this2.v3 ? function () {
627
+ return [output.title];
628
+ } : [output.title]), output.subTitle && h(CardSubtitle, _this2.v3 ? function () {
629
+ return [output.subTitle];
630
+ } : [output.subTitle])];
631
+ } : [output.title && h(CardTitle, _this2.v3 ? function () {
632
+ return [output.title];
633
+ } : [output.title]), output.subTitle && h(CardSubtitle, _this2.v3 ? function () {
634
+ return [output.subTitle];
635
+ } : [output.subTitle])]), h(CardBody, _this2.v3 ? function () {
636
+ return [output.responseContent];
637
+ } : [output.responseContent]), h(CardActions, _this2.v3 ? function () {
638
+ return [h(Button, {
639
+ size: 'medium',
640
+ attrs: _this2.v3 ? undefined : {
641
+ size: 'medium',
642
+ themeColor: 'primary',
643
+ fillMode: 'flat',
644
+ rounded: 'medium',
645
+ title: 'Copy',
646
+ svgIcon: _this2.copyButtonIcon,
647
+ "aria-hidden": "true"
648
+ },
649
+ themeColor: 'primary',
650
+ fillMode: 'flat',
651
+ rounded: 'medium',
652
+ title: 'Copy',
653
+ svgIcon: _this2.copyButtonIcon,
654
+ "aria-hidden": "true",
655
+ onClick: function onClick() {
656
+ return _this.copyToClipboard(output);
657
+ },
658
+ on: _this2.v3 ? undefined : {
659
+ "click": function onClick() {
660
+ return _this.copyToClipboard(output);
661
+ }
662
+ }
663
+ }, _this2.v3 ? function () {
664
+ return ['Copy'];
665
+ } : ['Copy']), h(Button, {
666
+ size: 'medium',
667
+ attrs: _this2.v3 ? undefined : {
668
+ size: 'medium',
669
+ themeColor: 'base',
670
+ fillMode: 'flat',
671
+ rounded: 'medium',
672
+ title: 'Retry',
673
+ svgIcon: rotateIcon,
674
+ "aria-hidden": "true"
675
+ },
676
+ themeColor: 'base',
677
+ fillMode: 'flat',
678
+ rounded: 'medium',
679
+ title: 'Retry',
680
+ svgIcon: rotateIcon,
681
+ "aria-hidden": "true",
682
+ onClick: function onClick() {
683
+ return _this.retryPrompt(output);
684
+ },
685
+ on: _this2.v3 ? undefined : {
686
+ "click": function onClick() {
687
+ return _this.retryPrompt(output);
688
+ }
689
+ }
690
+ }, _this2.v3 ? function () {
691
+ return ['Retry'];
692
+ } : ['Retry']), showOutputRating && h("span", {
693
+ "class": "k-spacer"
694
+ }), showOutputRating && h(Button, {
695
+ size: 'medium',
696
+ attrs: _this2.v3 ? undefined : {
697
+ size: 'medium',
698
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
699
+ fillMode: 'flat',
700
+ rounded: 'medium',
701
+ title: 'Rate up',
702
+ svgIcon: thumbUpOutlineIcon,
703
+ "aria-hidden": "true"
704
+ },
705
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
706
+ fillMode: 'flat',
707
+ rounded: 'medium',
708
+ title: 'Rate up',
709
+ svgIcon: thumbUpOutlineIcon,
710
+ "aria-hidden": "true",
711
+ onClick: function onClick() {
712
+ return _this.outputRating(output, 'positive');
713
+ },
714
+ on: _this2.v3 ? undefined : {
715
+ "click": function onClick() {
716
+ return _this.outputRating(output, 'positive');
717
+ }
718
+ }
719
+ }), showOutputRating && h(Button, {
720
+ size: 'medium',
721
+ attrs: _this2.v3 ? undefined : {
722
+ size: 'medium',
723
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
724
+ fillMode: 'flat',
725
+ rounded: 'medium',
726
+ title: 'Rate down',
727
+ svgIcon: thumbDownOutlineIcon,
728
+ "aria-hidden": "true"
729
+ },
730
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
731
+ fillMode: 'flat',
732
+ rounded: 'medium',
733
+ title: 'Rate down',
734
+ svgIcon: thumbDownOutlineIcon,
735
+ "aria-hidden": "true",
736
+ onClick: function onClick() {
737
+ return _this.outputRating(output, 'negative');
738
+ },
739
+ on: _this2.v3 ? undefined : {
740
+ "click": function onClick() {
741
+ return _this.outputRating(output, 'negative');
742
+ }
743
+ }
744
+ })];
745
+ } : [h(Button, {
746
+ size: 'medium',
747
+ attrs: _this2.v3 ? undefined : {
748
+ size: 'medium',
749
+ themeColor: 'primary',
750
+ fillMode: 'flat',
751
+ rounded: 'medium',
752
+ title: 'Copy',
753
+ svgIcon: _this2.copyButtonIcon,
754
+ "aria-hidden": "true"
755
+ },
756
+ themeColor: 'primary',
757
+ fillMode: 'flat',
758
+ rounded: 'medium',
759
+ title: 'Copy',
760
+ svgIcon: _this2.copyButtonIcon,
761
+ "aria-hidden": "true",
762
+ onClick: function onClick() {
763
+ return _this.copyToClipboard(output);
764
+ },
765
+ on: _this2.v3 ? undefined : {
766
+ "click": function onClick() {
767
+ return _this.copyToClipboard(output);
768
+ }
769
+ }
770
+ }, _this2.v3 ? function () {
771
+ return ['Copy'];
772
+ } : ['Copy']), h(Button, {
773
+ size: 'medium',
774
+ attrs: _this2.v3 ? undefined : {
775
+ size: 'medium',
776
+ themeColor: 'base',
777
+ fillMode: 'flat',
778
+ rounded: 'medium',
779
+ title: 'Retry',
780
+ svgIcon: rotateIcon,
781
+ "aria-hidden": "true"
782
+ },
783
+ themeColor: 'base',
784
+ fillMode: 'flat',
785
+ rounded: 'medium',
786
+ title: 'Retry',
787
+ svgIcon: rotateIcon,
788
+ "aria-hidden": "true",
789
+ onClick: function onClick() {
790
+ return _this.retryPrompt(output);
791
+ },
792
+ on: _this2.v3 ? undefined : {
793
+ "click": function onClick() {
794
+ return _this.retryPrompt(output);
795
+ }
796
+ }
797
+ }, _this2.v3 ? function () {
798
+ return ['Retry'];
799
+ } : ['Retry']), showOutputRating && h("span", {
800
+ "class": "k-spacer"
801
+ }), showOutputRating && h(Button, {
802
+ size: 'medium',
803
+ attrs: _this2.v3 ? undefined : {
804
+ size: 'medium',
805
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
806
+ fillMode: 'flat',
807
+ rounded: 'medium',
808
+ title: 'Rate up',
809
+ svgIcon: thumbUpOutlineIcon,
810
+ "aria-hidden": "true"
811
+ },
812
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
813
+ fillMode: 'flat',
814
+ rounded: 'medium',
815
+ title: 'Rate up',
816
+ svgIcon: thumbUpOutlineIcon,
817
+ "aria-hidden": "true",
818
+ onClick: function onClick() {
819
+ return _this.outputRating(output, 'positive');
820
+ },
821
+ on: _this2.v3 ? undefined : {
822
+ "click": function onClick() {
823
+ return _this.outputRating(output, 'positive');
824
+ }
825
+ }
826
+ }), showOutputRating && h(Button, {
827
+ size: 'medium',
828
+ attrs: _this2.v3 ? undefined : {
829
+ size: 'medium',
830
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
831
+ fillMode: 'flat',
832
+ rounded: 'medium',
833
+ title: 'Rate down',
834
+ svgIcon: thumbDownOutlineIcon,
835
+ "aria-hidden": "true"
836
+ },
837
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
838
+ fillMode: 'flat',
839
+ rounded: 'medium',
840
+ title: 'Rate down',
841
+ svgIcon: thumbDownOutlineIcon,
842
+ "aria-hidden": "true",
843
+ onClick: function onClick() {
844
+ return _this.outputRating(output, 'negative');
845
+ },
846
+ on: _this2.v3 ? undefined : {
847
+ "click": function onClick() {
848
+ return _this.outputRating(output, 'negative');
849
+ }
850
+ }
851
+ })])];
852
+ } : [h(CardHeader, _this2.v3 ? function () {
853
+ return [output.title && h(CardTitle, _this2.v3 ? function () {
854
+ return [output.title];
855
+ } : [output.title]), output.subTitle && h(CardSubtitle, _this2.v3 ? function () {
856
+ return [output.subTitle];
857
+ } : [output.subTitle])];
858
+ } : [output.title && h(CardTitle, _this2.v3 ? function () {
859
+ return [output.title];
860
+ } : [output.title]), output.subTitle && h(CardSubtitle, _this2.v3 ? function () {
861
+ return [output.subTitle];
862
+ } : [output.subTitle])]), h(CardBody, _this2.v3 ? function () {
863
+ return [output.responseContent];
864
+ } : [output.responseContent]), h(CardActions, _this2.v3 ? function () {
865
+ return [h(Button, {
866
+ size: 'medium',
867
+ attrs: _this2.v3 ? undefined : {
868
+ size: 'medium',
869
+ themeColor: 'primary',
870
+ fillMode: 'flat',
871
+ rounded: 'medium',
872
+ title: 'Copy',
873
+ svgIcon: _this2.copyButtonIcon,
874
+ "aria-hidden": "true"
875
+ },
876
+ themeColor: 'primary',
877
+ fillMode: 'flat',
878
+ rounded: 'medium',
879
+ title: 'Copy',
880
+ svgIcon: _this2.copyButtonIcon,
881
+ "aria-hidden": "true",
882
+ onClick: function onClick() {
883
+ return _this.copyToClipboard(output);
884
+ },
885
+ on: _this2.v3 ? undefined : {
886
+ "click": function onClick() {
887
+ return _this.copyToClipboard(output);
888
+ }
889
+ }
890
+ }, _this2.v3 ? function () {
891
+ return ['Copy'];
892
+ } : ['Copy']), h(Button, {
893
+ size: 'medium',
894
+ attrs: _this2.v3 ? undefined : {
895
+ size: 'medium',
896
+ themeColor: 'base',
897
+ fillMode: 'flat',
898
+ rounded: 'medium',
899
+ title: 'Retry',
900
+ svgIcon: rotateIcon,
901
+ "aria-hidden": "true"
902
+ },
903
+ themeColor: 'base',
904
+ fillMode: 'flat',
905
+ rounded: 'medium',
906
+ title: 'Retry',
907
+ svgIcon: rotateIcon,
908
+ "aria-hidden": "true",
909
+ onClick: function onClick() {
910
+ return _this.retryPrompt(output);
911
+ },
912
+ on: _this2.v3 ? undefined : {
913
+ "click": function onClick() {
914
+ return _this.retryPrompt(output);
915
+ }
916
+ }
917
+ }, _this2.v3 ? function () {
918
+ return ['Retry'];
919
+ } : ['Retry']), showOutputRating && h("span", {
920
+ "class": "k-spacer"
921
+ }), showOutputRating && h(Button, {
922
+ size: 'medium',
923
+ attrs: _this2.v3 ? undefined : {
924
+ size: 'medium',
925
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
926
+ fillMode: 'flat',
927
+ rounded: 'medium',
928
+ title: 'Rate up',
929
+ svgIcon: thumbUpOutlineIcon,
930
+ "aria-hidden": "true"
931
+ },
932
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
933
+ fillMode: 'flat',
934
+ rounded: 'medium',
935
+ title: 'Rate up',
936
+ svgIcon: thumbUpOutlineIcon,
937
+ "aria-hidden": "true",
938
+ onClick: function onClick() {
939
+ return _this.outputRating(output, 'positive');
940
+ },
941
+ on: _this2.v3 ? undefined : {
942
+ "click": function onClick() {
943
+ return _this.outputRating(output, 'positive');
944
+ }
945
+ }
946
+ }), showOutputRating && h(Button, {
947
+ size: 'medium',
948
+ attrs: _this2.v3 ? undefined : {
949
+ size: 'medium',
950
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
951
+ fillMode: 'flat',
952
+ rounded: 'medium',
953
+ title: 'Rate down',
954
+ svgIcon: thumbDownOutlineIcon,
955
+ "aria-hidden": "true"
956
+ },
957
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
958
+ fillMode: 'flat',
959
+ rounded: 'medium',
960
+ title: 'Rate down',
961
+ svgIcon: thumbDownOutlineIcon,
962
+ "aria-hidden": "true",
963
+ onClick: function onClick() {
964
+ return _this.outputRating(output, 'negative');
965
+ },
966
+ on: _this2.v3 ? undefined : {
967
+ "click": function onClick() {
968
+ return _this.outputRating(output, 'negative');
969
+ }
970
+ }
971
+ })];
972
+ } : [h(Button, {
973
+ size: 'medium',
974
+ attrs: _this2.v3 ? undefined : {
975
+ size: 'medium',
976
+ themeColor: 'primary',
977
+ fillMode: 'flat',
978
+ rounded: 'medium',
979
+ title: 'Copy',
980
+ svgIcon: _this2.copyButtonIcon,
981
+ "aria-hidden": "true"
982
+ },
983
+ themeColor: 'primary',
984
+ fillMode: 'flat',
985
+ rounded: 'medium',
986
+ title: 'Copy',
987
+ svgIcon: _this2.copyButtonIcon,
988
+ "aria-hidden": "true",
989
+ onClick: function onClick() {
990
+ return _this.copyToClipboard(output);
991
+ },
992
+ on: _this2.v3 ? undefined : {
993
+ "click": function onClick() {
994
+ return _this.copyToClipboard(output);
995
+ }
996
+ }
997
+ }, _this2.v3 ? function () {
998
+ return ['Copy'];
999
+ } : ['Copy']), h(Button, {
1000
+ size: 'medium',
1001
+ attrs: _this2.v3 ? undefined : {
1002
+ size: 'medium',
1003
+ themeColor: 'base',
1004
+ fillMode: 'flat',
1005
+ rounded: 'medium',
1006
+ title: 'Retry',
1007
+ svgIcon: rotateIcon,
1008
+ "aria-hidden": "true"
1009
+ },
1010
+ themeColor: 'base',
1011
+ fillMode: 'flat',
1012
+ rounded: 'medium',
1013
+ title: 'Retry',
1014
+ svgIcon: rotateIcon,
1015
+ "aria-hidden": "true",
1016
+ onClick: function onClick() {
1017
+ return _this.retryPrompt(output);
1018
+ },
1019
+ on: _this2.v3 ? undefined : {
1020
+ "click": function onClick() {
1021
+ return _this.retryPrompt(output);
1022
+ }
1023
+ }
1024
+ }, _this2.v3 ? function () {
1025
+ return ['Retry'];
1026
+ } : ['Retry']), showOutputRating && h("span", {
1027
+ "class": "k-spacer"
1028
+ }), showOutputRating && h(Button, {
1029
+ size: 'medium',
1030
+ attrs: _this2.v3 ? undefined : {
1031
+ size: 'medium',
1032
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
1033
+ fillMode: 'flat',
1034
+ rounded: 'medium',
1035
+ title: 'Rate up',
1036
+ svgIcon: thumbUpOutlineIcon,
1037
+ "aria-hidden": "true"
1038
+ },
1039
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
1040
+ fillMode: 'flat',
1041
+ rounded: 'medium',
1042
+ title: 'Rate up',
1043
+ svgIcon: thumbUpOutlineIcon,
1044
+ "aria-hidden": "true",
1045
+ onClick: function onClick() {
1046
+ return _this.outputRating(output, 'positive');
1047
+ },
1048
+ on: _this2.v3 ? undefined : {
1049
+ "click": function onClick() {
1050
+ return _this.outputRating(output, 'positive');
1051
+ }
1052
+ }
1053
+ }), showOutputRating && h(Button, {
1054
+ size: 'medium',
1055
+ attrs: _this2.v3 ? undefined : {
1056
+ size: 'medium',
1057
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
1058
+ fillMode: 'flat',
1059
+ rounded: 'medium',
1060
+ title: 'Rate down',
1061
+ svgIcon: thumbDownOutlineIcon,
1062
+ "aria-hidden": "true"
1063
+ },
1064
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
1065
+ fillMode: 'flat',
1066
+ rounded: 'medium',
1067
+ title: 'Rate down',
1068
+ svgIcon: thumbDownOutlineIcon,
1069
+ "aria-hidden": "true",
1070
+ onClick: function onClick() {
1071
+ return _this.outputRating(output, 'negative');
1072
+ },
1073
+ on: _this2.v3 ? undefined : {
1074
+ "click": function onClick() {
1075
+ return _this.outputRating(output, 'negative');
1076
+ }
1077
+ }
1078
+ })])]);
1079
+ }, _this3) : h(Card, _this3.v3 ? function () {
1080
+ return [h(CardBody, _this3.v3 ? function () {
1081
+ return [ls.toLanguageString(aIPromptNoOutputs, messages[aIPromptNoOutputs])];
1082
+ } : [ls.toLanguageString(aIPromptNoOutputs, messages[aIPromptNoOutputs])])];
1083
+ } : [h(CardBody, _this3.v3 ? function () {
1084
+ return [ls.toLanguageString(aIPromptNoOutputs, messages[aIPromptNoOutputs])];
1085
+ } : [ls.toLanguageString(aIPromptNoOutputs, messages[aIPromptNoOutputs])])])])])];
1086
+ } : [h(AIPromptContent, _this3.v3 ? function () {
1087
+ return [h("div", {
1088
+ "class": "k-card-list"
1089
+ }, [outputs && outputs.length > 0 ? outputs.map(function (output) {
1090
+ var _this2 = this;
1091
+ var _this = this;
1092
+ var outputCardRendering = getTemplate.call(this, {
1093
+ h: h,
1094
+ template: card,
1095
+ defaultRendering: null,
1096
+ additionalProps: {
1097
+ output: output
1098
+ }
1099
+ });
1100
+ return outputCard ? outputCardRendering : h(Card, {
1101
+ key: output.id
1102
+ }, this.v3 ? function () {
1103
+ return [h(CardHeader, _this2.v3 ? function () {
1104
+ return [output.title && h(CardTitle, _this2.v3 ? function () {
1105
+ return [output.title];
1106
+ } : [output.title]), output.subTitle && h(CardSubtitle, _this2.v3 ? function () {
1107
+ return [output.subTitle];
1108
+ } : [output.subTitle])];
1109
+ } : [output.title && h(CardTitle, _this2.v3 ? function () {
1110
+ return [output.title];
1111
+ } : [output.title]), output.subTitle && h(CardSubtitle, _this2.v3 ? function () {
1112
+ return [output.subTitle];
1113
+ } : [output.subTitle])]), h(CardBody, _this2.v3 ? function () {
1114
+ return [output.responseContent];
1115
+ } : [output.responseContent]), h(CardActions, _this2.v3 ? function () {
1116
+ return [h(Button, {
1117
+ size: 'medium',
1118
+ attrs: _this2.v3 ? undefined : {
1119
+ size: 'medium',
1120
+ themeColor: 'primary',
1121
+ fillMode: 'flat',
1122
+ rounded: 'medium',
1123
+ title: 'Copy',
1124
+ svgIcon: _this2.copyButtonIcon,
1125
+ "aria-hidden": "true"
1126
+ },
1127
+ themeColor: 'primary',
1128
+ fillMode: 'flat',
1129
+ rounded: 'medium',
1130
+ title: 'Copy',
1131
+ svgIcon: _this2.copyButtonIcon,
1132
+ "aria-hidden": "true",
1133
+ onClick: function onClick() {
1134
+ return _this.copyToClipboard(output);
1135
+ },
1136
+ on: _this2.v3 ? undefined : {
1137
+ "click": function onClick() {
1138
+ return _this.copyToClipboard(output);
1139
+ }
1140
+ }
1141
+ }, _this2.v3 ? function () {
1142
+ return ['Copy'];
1143
+ } : ['Copy']), h(Button, {
1144
+ size: 'medium',
1145
+ attrs: _this2.v3 ? undefined : {
1146
+ size: 'medium',
1147
+ themeColor: 'base',
1148
+ fillMode: 'flat',
1149
+ rounded: 'medium',
1150
+ title: 'Retry',
1151
+ svgIcon: rotateIcon,
1152
+ "aria-hidden": "true"
1153
+ },
1154
+ themeColor: 'base',
1155
+ fillMode: 'flat',
1156
+ rounded: 'medium',
1157
+ title: 'Retry',
1158
+ svgIcon: rotateIcon,
1159
+ "aria-hidden": "true",
1160
+ onClick: function onClick() {
1161
+ return _this.retryPrompt(output);
1162
+ },
1163
+ on: _this2.v3 ? undefined : {
1164
+ "click": function onClick() {
1165
+ return _this.retryPrompt(output);
1166
+ }
1167
+ }
1168
+ }, _this2.v3 ? function () {
1169
+ return ['Retry'];
1170
+ } : ['Retry']), showOutputRating && h("span", {
1171
+ "class": "k-spacer"
1172
+ }), showOutputRating && h(Button, {
1173
+ size: 'medium',
1174
+ attrs: _this2.v3 ? undefined : {
1175
+ size: 'medium',
1176
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
1177
+ fillMode: 'flat',
1178
+ rounded: 'medium',
1179
+ title: 'Rate up',
1180
+ svgIcon: thumbUpOutlineIcon,
1181
+ "aria-hidden": "true"
1182
+ },
1183
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
1184
+ fillMode: 'flat',
1185
+ rounded: 'medium',
1186
+ title: 'Rate up',
1187
+ svgIcon: thumbUpOutlineIcon,
1188
+ "aria-hidden": "true",
1189
+ onClick: function onClick() {
1190
+ return _this.outputRating(output, 'positive');
1191
+ },
1192
+ on: _this2.v3 ? undefined : {
1193
+ "click": function onClick() {
1194
+ return _this.outputRating(output, 'positive');
1195
+ }
1196
+ }
1197
+ }), showOutputRating && h(Button, {
1198
+ size: 'medium',
1199
+ attrs: _this2.v3 ? undefined : {
1200
+ size: 'medium',
1201
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
1202
+ fillMode: 'flat',
1203
+ rounded: 'medium',
1204
+ title: 'Rate down',
1205
+ svgIcon: thumbDownOutlineIcon,
1206
+ "aria-hidden": "true"
1207
+ },
1208
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
1209
+ fillMode: 'flat',
1210
+ rounded: 'medium',
1211
+ title: 'Rate down',
1212
+ svgIcon: thumbDownOutlineIcon,
1213
+ "aria-hidden": "true",
1214
+ onClick: function onClick() {
1215
+ return _this.outputRating(output, 'negative');
1216
+ },
1217
+ on: _this2.v3 ? undefined : {
1218
+ "click": function onClick() {
1219
+ return _this.outputRating(output, 'negative');
1220
+ }
1221
+ }
1222
+ })];
1223
+ } : [h(Button, {
1224
+ size: 'medium',
1225
+ attrs: _this2.v3 ? undefined : {
1226
+ size: 'medium',
1227
+ themeColor: 'primary',
1228
+ fillMode: 'flat',
1229
+ rounded: 'medium',
1230
+ title: 'Copy',
1231
+ svgIcon: _this2.copyButtonIcon,
1232
+ "aria-hidden": "true"
1233
+ },
1234
+ themeColor: 'primary',
1235
+ fillMode: 'flat',
1236
+ rounded: 'medium',
1237
+ title: 'Copy',
1238
+ svgIcon: _this2.copyButtonIcon,
1239
+ "aria-hidden": "true",
1240
+ onClick: function onClick() {
1241
+ return _this.copyToClipboard(output);
1242
+ },
1243
+ on: _this2.v3 ? undefined : {
1244
+ "click": function onClick() {
1245
+ return _this.copyToClipboard(output);
1246
+ }
1247
+ }
1248
+ }, _this2.v3 ? function () {
1249
+ return ['Copy'];
1250
+ } : ['Copy']), h(Button, {
1251
+ size: 'medium',
1252
+ attrs: _this2.v3 ? undefined : {
1253
+ size: 'medium',
1254
+ themeColor: 'base',
1255
+ fillMode: 'flat',
1256
+ rounded: 'medium',
1257
+ title: 'Retry',
1258
+ svgIcon: rotateIcon,
1259
+ "aria-hidden": "true"
1260
+ },
1261
+ themeColor: 'base',
1262
+ fillMode: 'flat',
1263
+ rounded: 'medium',
1264
+ title: 'Retry',
1265
+ svgIcon: rotateIcon,
1266
+ "aria-hidden": "true",
1267
+ onClick: function onClick() {
1268
+ return _this.retryPrompt(output);
1269
+ },
1270
+ on: _this2.v3 ? undefined : {
1271
+ "click": function onClick() {
1272
+ return _this.retryPrompt(output);
1273
+ }
1274
+ }
1275
+ }, _this2.v3 ? function () {
1276
+ return ['Retry'];
1277
+ } : ['Retry']), showOutputRating && h("span", {
1278
+ "class": "k-spacer"
1279
+ }), showOutputRating && h(Button, {
1280
+ size: 'medium',
1281
+ attrs: _this2.v3 ? undefined : {
1282
+ size: 'medium',
1283
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
1284
+ fillMode: 'flat',
1285
+ rounded: 'medium',
1286
+ title: 'Rate up',
1287
+ svgIcon: thumbUpOutlineIcon,
1288
+ "aria-hidden": "true"
1289
+ },
1290
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
1291
+ fillMode: 'flat',
1292
+ rounded: 'medium',
1293
+ title: 'Rate up',
1294
+ svgIcon: thumbUpOutlineIcon,
1295
+ "aria-hidden": "true",
1296
+ onClick: function onClick() {
1297
+ return _this.outputRating(output, 'positive');
1298
+ },
1299
+ on: _this2.v3 ? undefined : {
1300
+ "click": function onClick() {
1301
+ return _this.outputRating(output, 'positive');
1302
+ }
1303
+ }
1304
+ }), showOutputRating && h(Button, {
1305
+ size: 'medium',
1306
+ attrs: _this2.v3 ? undefined : {
1307
+ size: 'medium',
1308
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
1309
+ fillMode: 'flat',
1310
+ rounded: 'medium',
1311
+ title: 'Rate down',
1312
+ svgIcon: thumbDownOutlineIcon,
1313
+ "aria-hidden": "true"
1314
+ },
1315
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
1316
+ fillMode: 'flat',
1317
+ rounded: 'medium',
1318
+ title: 'Rate down',
1319
+ svgIcon: thumbDownOutlineIcon,
1320
+ "aria-hidden": "true",
1321
+ onClick: function onClick() {
1322
+ return _this.outputRating(output, 'negative');
1323
+ },
1324
+ on: _this2.v3 ? undefined : {
1325
+ "click": function onClick() {
1326
+ return _this.outputRating(output, 'negative');
1327
+ }
1328
+ }
1329
+ })])];
1330
+ } : [h(CardHeader, _this2.v3 ? function () {
1331
+ return [output.title && h(CardTitle, _this2.v3 ? function () {
1332
+ return [output.title];
1333
+ } : [output.title]), output.subTitle && h(CardSubtitle, _this2.v3 ? function () {
1334
+ return [output.subTitle];
1335
+ } : [output.subTitle])];
1336
+ } : [output.title && h(CardTitle, _this2.v3 ? function () {
1337
+ return [output.title];
1338
+ } : [output.title]), output.subTitle && h(CardSubtitle, _this2.v3 ? function () {
1339
+ return [output.subTitle];
1340
+ } : [output.subTitle])]), h(CardBody, _this2.v3 ? function () {
1341
+ return [output.responseContent];
1342
+ } : [output.responseContent]), h(CardActions, _this2.v3 ? function () {
1343
+ return [h(Button, {
1344
+ size: 'medium',
1345
+ attrs: _this2.v3 ? undefined : {
1346
+ size: 'medium',
1347
+ themeColor: 'primary',
1348
+ fillMode: 'flat',
1349
+ rounded: 'medium',
1350
+ title: 'Copy',
1351
+ svgIcon: _this2.copyButtonIcon,
1352
+ "aria-hidden": "true"
1353
+ },
1354
+ themeColor: 'primary',
1355
+ fillMode: 'flat',
1356
+ rounded: 'medium',
1357
+ title: 'Copy',
1358
+ svgIcon: _this2.copyButtonIcon,
1359
+ "aria-hidden": "true",
1360
+ onClick: function onClick() {
1361
+ return _this.copyToClipboard(output);
1362
+ },
1363
+ on: _this2.v3 ? undefined : {
1364
+ "click": function onClick() {
1365
+ return _this.copyToClipboard(output);
1366
+ }
1367
+ }
1368
+ }, _this2.v3 ? function () {
1369
+ return ['Copy'];
1370
+ } : ['Copy']), h(Button, {
1371
+ size: 'medium',
1372
+ attrs: _this2.v3 ? undefined : {
1373
+ size: 'medium',
1374
+ themeColor: 'base',
1375
+ fillMode: 'flat',
1376
+ rounded: 'medium',
1377
+ title: 'Retry',
1378
+ svgIcon: rotateIcon,
1379
+ "aria-hidden": "true"
1380
+ },
1381
+ themeColor: 'base',
1382
+ fillMode: 'flat',
1383
+ rounded: 'medium',
1384
+ title: 'Retry',
1385
+ svgIcon: rotateIcon,
1386
+ "aria-hidden": "true",
1387
+ onClick: function onClick() {
1388
+ return _this.retryPrompt(output);
1389
+ },
1390
+ on: _this2.v3 ? undefined : {
1391
+ "click": function onClick() {
1392
+ return _this.retryPrompt(output);
1393
+ }
1394
+ }
1395
+ }, _this2.v3 ? function () {
1396
+ return ['Retry'];
1397
+ } : ['Retry']), showOutputRating && h("span", {
1398
+ "class": "k-spacer"
1399
+ }), showOutputRating && h(Button, {
1400
+ size: 'medium',
1401
+ attrs: _this2.v3 ? undefined : {
1402
+ size: 'medium',
1403
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
1404
+ fillMode: 'flat',
1405
+ rounded: 'medium',
1406
+ title: 'Rate up',
1407
+ svgIcon: thumbUpOutlineIcon,
1408
+ "aria-hidden": "true"
1409
+ },
1410
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
1411
+ fillMode: 'flat',
1412
+ rounded: 'medium',
1413
+ title: 'Rate up',
1414
+ svgIcon: thumbUpOutlineIcon,
1415
+ "aria-hidden": "true",
1416
+ onClick: function onClick() {
1417
+ return _this.outputRating(output, 'positive');
1418
+ },
1419
+ on: _this2.v3 ? undefined : {
1420
+ "click": function onClick() {
1421
+ return _this.outputRating(output, 'positive');
1422
+ }
1423
+ }
1424
+ }), showOutputRating && h(Button, {
1425
+ size: 'medium',
1426
+ attrs: _this2.v3 ? undefined : {
1427
+ size: 'medium',
1428
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
1429
+ fillMode: 'flat',
1430
+ rounded: 'medium',
1431
+ title: 'Rate down',
1432
+ svgIcon: thumbDownOutlineIcon,
1433
+ "aria-hidden": "true"
1434
+ },
1435
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
1436
+ fillMode: 'flat',
1437
+ rounded: 'medium',
1438
+ title: 'Rate down',
1439
+ svgIcon: thumbDownOutlineIcon,
1440
+ "aria-hidden": "true",
1441
+ onClick: function onClick() {
1442
+ return _this.outputRating(output, 'negative');
1443
+ },
1444
+ on: _this2.v3 ? undefined : {
1445
+ "click": function onClick() {
1446
+ return _this.outputRating(output, 'negative');
1447
+ }
1448
+ }
1449
+ })];
1450
+ } : [h(Button, {
1451
+ size: 'medium',
1452
+ attrs: _this2.v3 ? undefined : {
1453
+ size: 'medium',
1454
+ themeColor: 'primary',
1455
+ fillMode: 'flat',
1456
+ rounded: 'medium',
1457
+ title: 'Copy',
1458
+ svgIcon: _this2.copyButtonIcon,
1459
+ "aria-hidden": "true"
1460
+ },
1461
+ themeColor: 'primary',
1462
+ fillMode: 'flat',
1463
+ rounded: 'medium',
1464
+ title: 'Copy',
1465
+ svgIcon: _this2.copyButtonIcon,
1466
+ "aria-hidden": "true",
1467
+ onClick: function onClick() {
1468
+ return _this.copyToClipboard(output);
1469
+ },
1470
+ on: _this2.v3 ? undefined : {
1471
+ "click": function onClick() {
1472
+ return _this.copyToClipboard(output);
1473
+ }
1474
+ }
1475
+ }, _this2.v3 ? function () {
1476
+ return ['Copy'];
1477
+ } : ['Copy']), h(Button, {
1478
+ size: 'medium',
1479
+ attrs: _this2.v3 ? undefined : {
1480
+ size: 'medium',
1481
+ themeColor: 'base',
1482
+ fillMode: 'flat',
1483
+ rounded: 'medium',
1484
+ title: 'Retry',
1485
+ svgIcon: rotateIcon,
1486
+ "aria-hidden": "true"
1487
+ },
1488
+ themeColor: 'base',
1489
+ fillMode: 'flat',
1490
+ rounded: 'medium',
1491
+ title: 'Retry',
1492
+ svgIcon: rotateIcon,
1493
+ "aria-hidden": "true",
1494
+ onClick: function onClick() {
1495
+ return _this.retryPrompt(output);
1496
+ },
1497
+ on: _this2.v3 ? undefined : {
1498
+ "click": function onClick() {
1499
+ return _this.retryPrompt(output);
1500
+ }
1501
+ }
1502
+ }, _this2.v3 ? function () {
1503
+ return ['Retry'];
1504
+ } : ['Retry']), showOutputRating && h("span", {
1505
+ "class": "k-spacer"
1506
+ }), showOutputRating && h(Button, {
1507
+ size: 'medium',
1508
+ attrs: _this2.v3 ? undefined : {
1509
+ size: 'medium',
1510
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
1511
+ fillMode: 'flat',
1512
+ rounded: 'medium',
1513
+ title: 'Rate up',
1514
+ svgIcon: thumbUpOutlineIcon,
1515
+ "aria-hidden": "true"
1516
+ },
1517
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
1518
+ fillMode: 'flat',
1519
+ rounded: 'medium',
1520
+ title: 'Rate up',
1521
+ svgIcon: thumbUpOutlineIcon,
1522
+ "aria-hidden": "true",
1523
+ onClick: function onClick() {
1524
+ return _this.outputRating(output, 'positive');
1525
+ },
1526
+ on: _this2.v3 ? undefined : {
1527
+ "click": function onClick() {
1528
+ return _this.outputRating(output, 'positive');
1529
+ }
1530
+ }
1531
+ }), showOutputRating && h(Button, {
1532
+ size: 'medium',
1533
+ attrs: _this2.v3 ? undefined : {
1534
+ size: 'medium',
1535
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
1536
+ fillMode: 'flat',
1537
+ rounded: 'medium',
1538
+ title: 'Rate down',
1539
+ svgIcon: thumbDownOutlineIcon,
1540
+ "aria-hidden": "true"
1541
+ },
1542
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
1543
+ fillMode: 'flat',
1544
+ rounded: 'medium',
1545
+ title: 'Rate down',
1546
+ svgIcon: thumbDownOutlineIcon,
1547
+ "aria-hidden": "true",
1548
+ onClick: function onClick() {
1549
+ return _this.outputRating(output, 'negative');
1550
+ },
1551
+ on: _this2.v3 ? undefined : {
1552
+ "click": function onClick() {
1553
+ return _this.outputRating(output, 'negative');
1554
+ }
1555
+ }
1556
+ })])]);
1557
+ }, _this3) : h(Card, _this3.v3 ? function () {
1558
+ return [h(CardBody, _this3.v3 ? function () {
1559
+ return [ls.toLanguageString(aIPromptNoOutputs, messages[aIPromptNoOutputs])];
1560
+ } : [ls.toLanguageString(aIPromptNoOutputs, messages[aIPromptNoOutputs])])];
1561
+ } : [h(CardBody, _this3.v3 ? function () {
1562
+ return [ls.toLanguageString(aIPromptNoOutputs, messages[aIPromptNoOutputs])];
1563
+ } : [ls.toLanguageString(aIPromptNoOutputs, messages[aIPromptNoOutputs])])])])];
1564
+ } : [h("div", {
1565
+ "class": "k-card-list"
1566
+ }, [outputs && outputs.length > 0 ? outputs.map(function (output) {
1567
+ var _this2 = this;
1568
+ var _this = this;
1569
+ var outputCardRendering = getTemplate.call(this, {
1570
+ h: h,
1571
+ template: card,
1572
+ defaultRendering: null,
1573
+ additionalProps: {
1574
+ output: output
1575
+ }
1576
+ });
1577
+ return outputCard ? outputCardRendering : h(Card, {
1578
+ key: output.id
1579
+ }, this.v3 ? function () {
1580
+ return [h(CardHeader, _this2.v3 ? function () {
1581
+ return [output.title && h(CardTitle, _this2.v3 ? function () {
1582
+ return [output.title];
1583
+ } : [output.title]), output.subTitle && h(CardSubtitle, _this2.v3 ? function () {
1584
+ return [output.subTitle];
1585
+ } : [output.subTitle])];
1586
+ } : [output.title && h(CardTitle, _this2.v3 ? function () {
1587
+ return [output.title];
1588
+ } : [output.title]), output.subTitle && h(CardSubtitle, _this2.v3 ? function () {
1589
+ return [output.subTitle];
1590
+ } : [output.subTitle])]), h(CardBody, _this2.v3 ? function () {
1591
+ return [output.responseContent];
1592
+ } : [output.responseContent]), h(CardActions, _this2.v3 ? function () {
1593
+ return [h(Button, {
1594
+ size: 'medium',
1595
+ attrs: _this2.v3 ? undefined : {
1596
+ size: 'medium',
1597
+ themeColor: 'primary',
1598
+ fillMode: 'flat',
1599
+ rounded: 'medium',
1600
+ title: 'Copy',
1601
+ svgIcon: _this2.copyButtonIcon,
1602
+ "aria-hidden": "true"
1603
+ },
1604
+ themeColor: 'primary',
1605
+ fillMode: 'flat',
1606
+ rounded: 'medium',
1607
+ title: 'Copy',
1608
+ svgIcon: _this2.copyButtonIcon,
1609
+ "aria-hidden": "true",
1610
+ onClick: function onClick() {
1611
+ return _this.copyToClipboard(output);
1612
+ },
1613
+ on: _this2.v3 ? undefined : {
1614
+ "click": function onClick() {
1615
+ return _this.copyToClipboard(output);
1616
+ }
1617
+ }
1618
+ }, _this2.v3 ? function () {
1619
+ return ['Copy'];
1620
+ } : ['Copy']), h(Button, {
1621
+ size: 'medium',
1622
+ attrs: _this2.v3 ? undefined : {
1623
+ size: 'medium',
1624
+ themeColor: 'base',
1625
+ fillMode: 'flat',
1626
+ rounded: 'medium',
1627
+ title: 'Retry',
1628
+ svgIcon: rotateIcon,
1629
+ "aria-hidden": "true"
1630
+ },
1631
+ themeColor: 'base',
1632
+ fillMode: 'flat',
1633
+ rounded: 'medium',
1634
+ title: 'Retry',
1635
+ svgIcon: rotateIcon,
1636
+ "aria-hidden": "true",
1637
+ onClick: function onClick() {
1638
+ return _this.retryPrompt(output);
1639
+ },
1640
+ on: _this2.v3 ? undefined : {
1641
+ "click": function onClick() {
1642
+ return _this.retryPrompt(output);
1643
+ }
1644
+ }
1645
+ }, _this2.v3 ? function () {
1646
+ return ['Retry'];
1647
+ } : ['Retry']), showOutputRating && h("span", {
1648
+ "class": "k-spacer"
1649
+ }), showOutputRating && h(Button, {
1650
+ size: 'medium',
1651
+ attrs: _this2.v3 ? undefined : {
1652
+ size: 'medium',
1653
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
1654
+ fillMode: 'flat',
1655
+ rounded: 'medium',
1656
+ title: 'Rate up',
1657
+ svgIcon: thumbUpOutlineIcon,
1658
+ "aria-hidden": "true"
1659
+ },
1660
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
1661
+ fillMode: 'flat',
1662
+ rounded: 'medium',
1663
+ title: 'Rate up',
1664
+ svgIcon: thumbUpOutlineIcon,
1665
+ "aria-hidden": "true",
1666
+ onClick: function onClick() {
1667
+ return _this.outputRating(output, 'positive');
1668
+ },
1669
+ on: _this2.v3 ? undefined : {
1670
+ "click": function onClick() {
1671
+ return _this.outputRating(output, 'positive');
1672
+ }
1673
+ }
1674
+ }), showOutputRating && h(Button, {
1675
+ size: 'medium',
1676
+ attrs: _this2.v3 ? undefined : {
1677
+ size: 'medium',
1678
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
1679
+ fillMode: 'flat',
1680
+ rounded: 'medium',
1681
+ title: 'Rate down',
1682
+ svgIcon: thumbDownOutlineIcon,
1683
+ "aria-hidden": "true"
1684
+ },
1685
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
1686
+ fillMode: 'flat',
1687
+ rounded: 'medium',
1688
+ title: 'Rate down',
1689
+ svgIcon: thumbDownOutlineIcon,
1690
+ "aria-hidden": "true",
1691
+ onClick: function onClick() {
1692
+ return _this.outputRating(output, 'negative');
1693
+ },
1694
+ on: _this2.v3 ? undefined : {
1695
+ "click": function onClick() {
1696
+ return _this.outputRating(output, 'negative');
1697
+ }
1698
+ }
1699
+ })];
1700
+ } : [h(Button, {
1701
+ size: 'medium',
1702
+ attrs: _this2.v3 ? undefined : {
1703
+ size: 'medium',
1704
+ themeColor: 'primary',
1705
+ fillMode: 'flat',
1706
+ rounded: 'medium',
1707
+ title: 'Copy',
1708
+ svgIcon: _this2.copyButtonIcon,
1709
+ "aria-hidden": "true"
1710
+ },
1711
+ themeColor: 'primary',
1712
+ fillMode: 'flat',
1713
+ rounded: 'medium',
1714
+ title: 'Copy',
1715
+ svgIcon: _this2.copyButtonIcon,
1716
+ "aria-hidden": "true",
1717
+ onClick: function onClick() {
1718
+ return _this.copyToClipboard(output);
1719
+ },
1720
+ on: _this2.v3 ? undefined : {
1721
+ "click": function onClick() {
1722
+ return _this.copyToClipboard(output);
1723
+ }
1724
+ }
1725
+ }, _this2.v3 ? function () {
1726
+ return ['Copy'];
1727
+ } : ['Copy']), h(Button, {
1728
+ size: 'medium',
1729
+ attrs: _this2.v3 ? undefined : {
1730
+ size: 'medium',
1731
+ themeColor: 'base',
1732
+ fillMode: 'flat',
1733
+ rounded: 'medium',
1734
+ title: 'Retry',
1735
+ svgIcon: rotateIcon,
1736
+ "aria-hidden": "true"
1737
+ },
1738
+ themeColor: 'base',
1739
+ fillMode: 'flat',
1740
+ rounded: 'medium',
1741
+ title: 'Retry',
1742
+ svgIcon: rotateIcon,
1743
+ "aria-hidden": "true",
1744
+ onClick: function onClick() {
1745
+ return _this.retryPrompt(output);
1746
+ },
1747
+ on: _this2.v3 ? undefined : {
1748
+ "click": function onClick() {
1749
+ return _this.retryPrompt(output);
1750
+ }
1751
+ }
1752
+ }, _this2.v3 ? function () {
1753
+ return ['Retry'];
1754
+ } : ['Retry']), showOutputRating && h("span", {
1755
+ "class": "k-spacer"
1756
+ }), showOutputRating && h(Button, {
1757
+ size: 'medium',
1758
+ attrs: _this2.v3 ? undefined : {
1759
+ size: 'medium',
1760
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
1761
+ fillMode: 'flat',
1762
+ rounded: 'medium',
1763
+ title: 'Rate up',
1764
+ svgIcon: thumbUpOutlineIcon,
1765
+ "aria-hidden": "true"
1766
+ },
1767
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
1768
+ fillMode: 'flat',
1769
+ rounded: 'medium',
1770
+ title: 'Rate up',
1771
+ svgIcon: thumbUpOutlineIcon,
1772
+ "aria-hidden": "true",
1773
+ onClick: function onClick() {
1774
+ return _this.outputRating(output, 'positive');
1775
+ },
1776
+ on: _this2.v3 ? undefined : {
1777
+ "click": function onClick() {
1778
+ return _this.outputRating(output, 'positive');
1779
+ }
1780
+ }
1781
+ }), showOutputRating && h(Button, {
1782
+ size: 'medium',
1783
+ attrs: _this2.v3 ? undefined : {
1784
+ size: 'medium',
1785
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
1786
+ fillMode: 'flat',
1787
+ rounded: 'medium',
1788
+ title: 'Rate down',
1789
+ svgIcon: thumbDownOutlineIcon,
1790
+ "aria-hidden": "true"
1791
+ },
1792
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
1793
+ fillMode: 'flat',
1794
+ rounded: 'medium',
1795
+ title: 'Rate down',
1796
+ svgIcon: thumbDownOutlineIcon,
1797
+ "aria-hidden": "true",
1798
+ onClick: function onClick() {
1799
+ return _this.outputRating(output, 'negative');
1800
+ },
1801
+ on: _this2.v3 ? undefined : {
1802
+ "click": function onClick() {
1803
+ return _this.outputRating(output, 'negative');
1804
+ }
1805
+ }
1806
+ })])];
1807
+ } : [h(CardHeader, _this2.v3 ? function () {
1808
+ return [output.title && h(CardTitle, _this2.v3 ? function () {
1809
+ return [output.title];
1810
+ } : [output.title]), output.subTitle && h(CardSubtitle, _this2.v3 ? function () {
1811
+ return [output.subTitle];
1812
+ } : [output.subTitle])];
1813
+ } : [output.title && h(CardTitle, _this2.v3 ? function () {
1814
+ return [output.title];
1815
+ } : [output.title]), output.subTitle && h(CardSubtitle, _this2.v3 ? function () {
1816
+ return [output.subTitle];
1817
+ } : [output.subTitle])]), h(CardBody, _this2.v3 ? function () {
1818
+ return [output.responseContent];
1819
+ } : [output.responseContent]), h(CardActions, _this2.v3 ? function () {
1820
+ return [h(Button, {
1821
+ size: 'medium',
1822
+ attrs: _this2.v3 ? undefined : {
1823
+ size: 'medium',
1824
+ themeColor: 'primary',
1825
+ fillMode: 'flat',
1826
+ rounded: 'medium',
1827
+ title: 'Copy',
1828
+ svgIcon: _this2.copyButtonIcon,
1829
+ "aria-hidden": "true"
1830
+ },
1831
+ themeColor: 'primary',
1832
+ fillMode: 'flat',
1833
+ rounded: 'medium',
1834
+ title: 'Copy',
1835
+ svgIcon: _this2.copyButtonIcon,
1836
+ "aria-hidden": "true",
1837
+ onClick: function onClick() {
1838
+ return _this.copyToClipboard(output);
1839
+ },
1840
+ on: _this2.v3 ? undefined : {
1841
+ "click": function onClick() {
1842
+ return _this.copyToClipboard(output);
1843
+ }
1844
+ }
1845
+ }, _this2.v3 ? function () {
1846
+ return ['Copy'];
1847
+ } : ['Copy']), h(Button, {
1848
+ size: 'medium',
1849
+ attrs: _this2.v3 ? undefined : {
1850
+ size: 'medium',
1851
+ themeColor: 'base',
1852
+ fillMode: 'flat',
1853
+ rounded: 'medium',
1854
+ title: 'Retry',
1855
+ svgIcon: rotateIcon,
1856
+ "aria-hidden": "true"
1857
+ },
1858
+ themeColor: 'base',
1859
+ fillMode: 'flat',
1860
+ rounded: 'medium',
1861
+ title: 'Retry',
1862
+ svgIcon: rotateIcon,
1863
+ "aria-hidden": "true",
1864
+ onClick: function onClick() {
1865
+ return _this.retryPrompt(output);
1866
+ },
1867
+ on: _this2.v3 ? undefined : {
1868
+ "click": function onClick() {
1869
+ return _this.retryPrompt(output);
1870
+ }
1871
+ }
1872
+ }, _this2.v3 ? function () {
1873
+ return ['Retry'];
1874
+ } : ['Retry']), showOutputRating && h("span", {
1875
+ "class": "k-spacer"
1876
+ }), showOutputRating && h(Button, {
1877
+ size: 'medium',
1878
+ attrs: _this2.v3 ? undefined : {
1879
+ size: 'medium',
1880
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
1881
+ fillMode: 'flat',
1882
+ rounded: 'medium',
1883
+ title: 'Rate up',
1884
+ svgIcon: thumbUpOutlineIcon,
1885
+ "aria-hidden": "true"
1886
+ },
1887
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
1888
+ fillMode: 'flat',
1889
+ rounded: 'medium',
1890
+ title: 'Rate up',
1891
+ svgIcon: thumbUpOutlineIcon,
1892
+ "aria-hidden": "true",
1893
+ onClick: function onClick() {
1894
+ return _this.outputRating(output, 'positive');
1895
+ },
1896
+ on: _this2.v3 ? undefined : {
1897
+ "click": function onClick() {
1898
+ return _this.outputRating(output, 'positive');
1899
+ }
1900
+ }
1901
+ }), showOutputRating && h(Button, {
1902
+ size: 'medium',
1903
+ attrs: _this2.v3 ? undefined : {
1904
+ size: 'medium',
1905
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
1906
+ fillMode: 'flat',
1907
+ rounded: 'medium',
1908
+ title: 'Rate down',
1909
+ svgIcon: thumbDownOutlineIcon,
1910
+ "aria-hidden": "true"
1911
+ },
1912
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
1913
+ fillMode: 'flat',
1914
+ rounded: 'medium',
1915
+ title: 'Rate down',
1916
+ svgIcon: thumbDownOutlineIcon,
1917
+ "aria-hidden": "true",
1918
+ onClick: function onClick() {
1919
+ return _this.outputRating(output, 'negative');
1920
+ },
1921
+ on: _this2.v3 ? undefined : {
1922
+ "click": function onClick() {
1923
+ return _this.outputRating(output, 'negative');
1924
+ }
1925
+ }
1926
+ })];
1927
+ } : [h(Button, {
1928
+ size: 'medium',
1929
+ attrs: _this2.v3 ? undefined : {
1930
+ size: 'medium',
1931
+ themeColor: 'primary',
1932
+ fillMode: 'flat',
1933
+ rounded: 'medium',
1934
+ title: 'Copy',
1935
+ svgIcon: _this2.copyButtonIcon,
1936
+ "aria-hidden": "true"
1937
+ },
1938
+ themeColor: 'primary',
1939
+ fillMode: 'flat',
1940
+ rounded: 'medium',
1941
+ title: 'Copy',
1942
+ svgIcon: _this2.copyButtonIcon,
1943
+ "aria-hidden": "true",
1944
+ onClick: function onClick() {
1945
+ return _this.copyToClipboard(output);
1946
+ },
1947
+ on: _this2.v3 ? undefined : {
1948
+ "click": function onClick() {
1949
+ return _this.copyToClipboard(output);
1950
+ }
1951
+ }
1952
+ }, _this2.v3 ? function () {
1953
+ return ['Copy'];
1954
+ } : ['Copy']), h(Button, {
1955
+ size: 'medium',
1956
+ attrs: _this2.v3 ? undefined : {
1957
+ size: 'medium',
1958
+ themeColor: 'base',
1959
+ fillMode: 'flat',
1960
+ rounded: 'medium',
1961
+ title: 'Retry',
1962
+ svgIcon: rotateIcon,
1963
+ "aria-hidden": "true"
1964
+ },
1965
+ themeColor: 'base',
1966
+ fillMode: 'flat',
1967
+ rounded: 'medium',
1968
+ title: 'Retry',
1969
+ svgIcon: rotateIcon,
1970
+ "aria-hidden": "true",
1971
+ onClick: function onClick() {
1972
+ return _this.retryPrompt(output);
1973
+ },
1974
+ on: _this2.v3 ? undefined : {
1975
+ "click": function onClick() {
1976
+ return _this.retryPrompt(output);
1977
+ }
1978
+ }
1979
+ }, _this2.v3 ? function () {
1980
+ return ['Retry'];
1981
+ } : ['Retry']), showOutputRating && h("span", {
1982
+ "class": "k-spacer"
1983
+ }), showOutputRating && h(Button, {
1984
+ size: 'medium',
1985
+ attrs: _this2.v3 ? undefined : {
1986
+ size: 'medium',
1987
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
1988
+ fillMode: 'flat',
1989
+ rounded: 'medium',
1990
+ title: 'Rate up',
1991
+ svgIcon: thumbUpOutlineIcon,
1992
+ "aria-hidden": "true"
1993
+ },
1994
+ themeColor: output.ratingType === 'positive' ? 'primary' : 'base',
1995
+ fillMode: 'flat',
1996
+ rounded: 'medium',
1997
+ title: 'Rate up',
1998
+ svgIcon: thumbUpOutlineIcon,
1999
+ "aria-hidden": "true",
2000
+ onClick: function onClick() {
2001
+ return _this.outputRating(output, 'positive');
2002
+ },
2003
+ on: _this2.v3 ? undefined : {
2004
+ "click": function onClick() {
2005
+ return _this.outputRating(output, 'positive');
2006
+ }
2007
+ }
2008
+ }), showOutputRating && h(Button, {
2009
+ size: 'medium',
2010
+ attrs: _this2.v3 ? undefined : {
2011
+ size: 'medium',
2012
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
2013
+ fillMode: 'flat',
2014
+ rounded: 'medium',
2015
+ title: 'Rate down',
2016
+ svgIcon: thumbDownOutlineIcon,
2017
+ "aria-hidden": "true"
2018
+ },
2019
+ themeColor: output.ratingType === 'negative' ? 'primary' : 'base',
2020
+ fillMode: 'flat',
2021
+ rounded: 'medium',
2022
+ title: 'Rate down',
2023
+ svgIcon: thumbDownOutlineIcon,
2024
+ "aria-hidden": "true",
2025
+ onClick: function onClick() {
2026
+ return _this.outputRating(output, 'negative');
2027
+ },
2028
+ on: _this2.v3 ? undefined : {
2029
+ "click": function onClick() {
2030
+ return _this.outputRating(output, 'negative');
2031
+ }
2032
+ }
2033
+ })])]);
2034
+ }, _this3) : h(Card, _this3.v3 ? function () {
2035
+ return [h(CardBody, _this3.v3 ? function () {
2036
+ return [ls.toLanguageString(aIPromptNoOutputs, messages[aIPromptNoOutputs])];
2037
+ } : [ls.toLanguageString(aIPromptNoOutputs, messages[aIPromptNoOutputs])])];
2038
+ } : [h(CardBody, _this3.v3 ? function () {
2039
+ return [ls.toLanguageString(aIPromptNoOutputs, messages[aIPromptNoOutputs])];
2040
+ } : [ls.toLanguageString(aIPromptNoOutputs, messages[aIPromptNoOutputs])])])])])])
2041
+ );
2042
+ }
2043
+ };
2044
+ /**
2045
+ * @hidden
2046
+ */
2047
+ var AIPromptOutputView = AIPromptOutputViewVue2;
2048
+ export { AIPromptOutputView, AIPromptOutputViewVue2 };