@progress/kendo-vue-conversational-ui 5.3.0-dev.202410141143 → 5.3.0-develop.2

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