@digipair/skill-web-chatbot 0.91.0-0 → 0.91.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/SAP-icons.cjs.js +2489 -0
  2. package/SAP-icons.cjs2.js +2489 -0
  3. package/SAP-icons.esm.js +2482 -0
  4. package/SAP-icons.esm2.js +2482 -0
  5. package/Tableau10-558cc280.cjs.js +9 -0
  6. package/Tableau10-558cc280.esm.js +7 -0
  7. package/arc-d1f6357e.cjs.js +88 -0
  8. package/arc-d1f6357e.esm.js +86 -0
  9. package/array-2ff2c7a6.cjs.js +7 -0
  10. package/array-2ff2c7a6.esm.js +5 -0
  11. package/blockDiagram-5dc23a45.cjs.js +2921 -0
  12. package/blockDiagram-5dc23a45.esm.js +2919 -0
  13. package/c4Diagram-1e775db3.cjs.js +4387 -0
  14. package/c4Diagram-1e775db3.esm.js +4385 -0
  15. package/channel-ebbc4130.cjs.js +9 -0
  16. package/channel-ebbc4130.esm.js +7 -0
  17. package/classDiagram-f52caa06.cjs.js +209 -0
  18. package/classDiagram-f52caa06.esm.js +207 -0
  19. package/classDiagram-v2-640c694e.cjs.js +401 -0
  20. package/classDiagram-v2-640c694e.esm.js +399 -0
  21. package/clone-afc2f047.cjs.js +10 -0
  22. package/clone-afc2f047.esm.js +8 -0
  23. package/createText-03b82060.cjs.js +2936 -0
  24. package/createText-03b82060.esm.js +2933 -0
  25. package/edges-16357fde.cjs.js +1998 -0
  26. package/edges-16357fde.esm.js +1981 -0
  27. package/erDiagram-c7ff1bec.cjs.js +1807 -0
  28. package/erDiagram-c7ff1bec.esm.js +1805 -0
  29. package/flowDb-9a89ea33.cjs.js +5542 -0
  30. package/flowDb-9a89ea33.esm.js +5538 -0
  31. package/flowDiagram-aadb13b0.cjs.js +1351 -0
  32. package/flowDiagram-aadb13b0.esm.js +1349 -0
  33. package/flowDiagram-v2-f2119625.cjs.js +31 -0
  34. package/flowDiagram-v2-f2119625.esm.js +29 -0
  35. package/flowchart-elk-definition-cf813a97.cjs.js +50257 -0
  36. package/flowchart-elk-definition-cf813a97.esm.js +50255 -0
  37. package/ganttDiagram-3c2fde2b.cjs.js +3710 -0
  38. package/ganttDiagram-3c2fde2b.esm.js +3708 -0
  39. package/gitGraphDiagram-c3a0619c.cjs.js +3820 -0
  40. package/gitGraphDiagram-c3a0619c.esm.js +3818 -0
  41. package/graph-0ee63739.cjs.js +961 -0
  42. package/graph-0ee63739.esm.js +938 -0
  43. package/index-bb6d8841.cjs.js +648 -0
  44. package/index-bb6d8841.esm.js +646 -0
  45. package/index.cjs.d.ts +1 -0
  46. package/index.cjs.js +17 -0
  47. package/index.cjs2.js +60723 -0
  48. package/index.esm.js +1 -0
  49. package/index.esm2.js +60574 -0
  50. package/infoDiagram-2f5c50c0.cjs.js +460 -0
  51. package/infoDiagram-2f5c50c0.esm.js +458 -0
  52. package/init-f9637058.cjs.js +17 -0
  53. package/init-f9637058.esm.js +15 -0
  54. package/journeyDiagram-14fe341a.cjs.js +1061 -0
  55. package/journeyDiagram-14fe341a.esm.js +1059 -0
  56. package/katex-d90b6d29.cjs.js +25690 -0
  57. package/katex-d90b6d29.esm.js +25688 -0
  58. package/layout-fd473db2.cjs.js +1626 -0
  59. package/layout-fd473db2.esm.js +1619 -0
  60. package/libs/engine/src/index.d.ts +2 -0
  61. package/libs/engine/src/lib/alias.interface.d.ts +9 -0
  62. package/libs/engine/src/lib/engine.d.ts +13 -0
  63. package/libs/engine/src/lib/pins-settings.interface.d.ts +15 -0
  64. package/libs/skill-web-chatbot/src/lib/chat.element.d.ts +28 -0
  65. package/libs/skill-web-chatbot/src/lib/common.data.d.ts +1 -0
  66. package/libs/skill-web-chatbot/src/lib/config.d.ts +9 -0
  67. package/libs/skill-web-chatbot/src/lib/digipair-full.data.d.ts +1 -0
  68. package/libs/skill-web-chatbot/src/lib/digipair-full.element.d.ts +36 -0
  69. package/libs/skill-web-chatbot/src/lib/digipair.data.d.ts +1 -0
  70. package/libs/skill-web-chatbot/src/lib/digipair.element.d.ts +44 -0
  71. package/libs/skill-web-chatbot/src/lib/inputs.element.d.ts +10 -0
  72. package/libs/skill-web-chatbot/src/lib/message.interface.d.ts +10 -0
  73. package/libs/skill-web-chatbot/src/lib/pins/chatbot.actions.d.ts +1 -0
  74. package/libs/skill-web-chatbot/src/lib/tools/css-selector.d.ts +1 -0
  75. package/line-24d93f1b.cjs.js +34 -0
  76. package/line-24d93f1b.esm.js +32 -0
  77. package/linear-9bcf74c4.cjs.js +537 -0
  78. package/linear-9bcf74c4.esm.js +531 -0
  79. package/mindmap-definition-9399c7e6.cjs.js +20489 -0
  80. package/mindmap-definition-9399c7e6.esm.js +20487 -0
  81. package/ordinal-5695958c.cjs.js +331 -0
  82. package/ordinal-5695958c.esm.js +329 -0
  83. package/package.json +7 -22
  84. package/path-428ebac9.cjs.js +317 -0
  85. package/path-428ebac9.esm.js +314 -0
  86. package/pieDiagram-828dae43.cjs.js +951 -0
  87. package/pieDiagram-828dae43.esm.js +949 -0
  88. package/quadrantDiagram-5fa00455.cjs.js +2410 -0
  89. package/quadrantDiagram-5fa00455.esm.js +2408 -0
  90. package/requirementDiagram-03163dc4.cjs.js +2267 -0
  91. package/requirementDiagram-03163dc4.esm.js +2265 -0
  92. package/sankeyDiagram-52ec8976.cjs.js +1848 -0
  93. package/sankeyDiagram-52ec8976.esm.js +1846 -0
  94. package/sequenceDiagram-b517d154.cjs.js +5949 -0
  95. package/sequenceDiagram-b517d154.esm.js +5947 -0
  96. package/stateDiagram-fca82b5b.cjs.js +283 -0
  97. package/stateDiagram-fca82b5b.esm.js +281 -0
  98. package/stateDiagram-v2-ed04200a.cjs.js +373 -0
  99. package/stateDiagram-v2-ed04200a.esm.js +371 -0
  100. package/styles-11e81fdd.cjs.js +3944 -0
  101. package/styles-11e81fdd.esm.js +3940 -0
  102. package/styles-cacbff60.cjs.js +2120 -0
  103. package/styles-cacbff60.esm.js +2111 -0
  104. package/styles-e75131e4.cjs.js +671 -0
  105. package/styles-e75131e4.esm.js +661 -0
  106. package/svgDrawCommon-ecc5f780.cjs.js +68 -0
  107. package/svgDrawCommon-ecc5f780.esm.js +60 -0
  108. package/timeline-definition-4ee9bff4.cjs.js +1161 -0
  109. package/timeline-definition-4ee9bff4.esm.js +1159 -0
  110. package/xychartDiagram-e5e6b652.cjs.js +3150 -0
  111. package/xychartDiagram-e5e6b652.esm.js +3148 -0
  112. package/.swcrc +0 -28
  113. package/README.md +0 -7
  114. package/eslint.config.mjs +0 -22
  115. package/rollup.config.cjs +0 -28
  116. package/src/digipair__engine.d.ts +0 -2
  117. package/src/handlebars.d.ts +0 -1
  118. package/src/index.html +0 -18
  119. package/src/lib/chat.element.ts +0 -603
  120. package/src/lib/common.data.ts +0 -1
  121. package/src/lib/config.ts +0 -30
  122. package/src/lib/digipair-full.data.ts +0 -101
  123. package/src/lib/digipair-full.element.ts +0 -358
  124. package/src/lib/digipair.data.ts +0 -103
  125. package/src/lib/digipair.element.ts +0 -446
  126. package/src/lib/inputs.element.ts +0 -46
  127. package/src/lib/mermaid.d.ts +0 -1
  128. package/src/lib/message.interface.ts +0 -10
  129. package/src/lib/pins/chatbot.actions.ts +0 -32
  130. package/src/lib/tools/css-selector.ts +0 -12
  131. package/tsconfig.json +0 -13
  132. package/tsconfig.lib.json +0 -19
  133. /package/{src/index.d.ts → index.d.ts} +0 -0
  134. /package/{src/index.ts → libs/skill-web-chatbot/src/index.d.ts} +0 -0
  135. /package/{src/schema.fr.json → schema.fr.json} +0 -0
  136. /package/{src/schema.json → schema.json} +0 -0
@@ -1,446 +0,0 @@
1
- import { fetchEventSource } from '@microsoft/fetch-event-source';
2
- import '@ui5/webcomponents-icons/dist/AllIcons';
3
- import '@ui5/webcomponents/dist/BusyIndicator';
4
- import '@ui5/webcomponents/dist/Icon';
5
- import { html, LitElement, TemplateResult } from 'lit';
6
- import { customElement, property, query, state } from 'lit/decorators.js';
7
- import { executePinsList } from '@digipair/engine';
8
- import './chat.element';
9
- import { ChatElement } from './chat.element';
10
- import { styles } from './digipair.data';
11
- import getCssSelector from './tools/css-selector';
12
- import { _config } from './config';
13
- import { Message } from './message.interface';
14
-
15
- @customElement('digipair-chatbot')
16
- export class ChatbotElement extends LitElement {
17
- @property()
18
- code = 'common';
19
-
20
- @property()
21
- firstOpenDelay = 60000;
22
-
23
- @property()
24
- apiUrl = _config.API_URL;
25
-
26
- @property()
27
- userId: string | null = null;
28
-
29
- @state()
30
- private boosters: any[] = [];
31
-
32
- @state()
33
- private loading = false;
34
-
35
- @state()
36
- private resultState = 'open';
37
-
38
- @state()
39
- private currentBoost: any = null;
40
-
41
- @state()
42
- private messages: Message[] = [];
43
-
44
- @state()
45
- private loadingStep = '';
46
-
47
- @query('digipair-chatbot-chat')
48
- private chatbot!: ChatElement;
49
- private alreadyOpened = false;
50
- private isDigipairLoading = false;
51
- private newUser!: boolean;
52
- private metadata!: {
53
- id: string;
54
- config: { VERSIONS: { [key: string]: string } };
55
- variables: { [key: string]: any };
56
- avatar: string;
57
- primary: string;
58
- secondary: string;
59
- textPrimary: string;
60
- textSecondary: string;
61
- };
62
-
63
- private CHAT_COMMAND(digipair: string, reasoning: string) {
64
- return {
65
- library: '@digipair/actions-chatbot',
66
- element: 'executeRemoteReasoning',
67
- properties: {
68
- digipair,
69
- reasoning: reasoning ?? 'conversation',
70
- apiUrl: this.apiUrl,
71
- },
72
- };
73
- }
74
-
75
- private blurEvent = (event: Event) => {
76
- const path = event.composedPath();
77
- if (!path.includes(this)) {
78
- // L'événement a été déclenché en dehors du composant
79
- this.closeResult();
80
- }
81
- };
82
-
83
- override connectedCallback(): void {
84
- super.connectedCallback();
85
-
86
- this.loadUser();
87
- this.boostListener();
88
- this.externalBoostListener();
89
- this.initializeSSE();
90
- document.addEventListener('click', this.blurEvent);
91
- }
92
-
93
- override disconnectedCallback(): void {
94
- document.removeEventListener('click', this.blurEvent);
95
- }
96
-
97
- private externalBoostListener() {
98
- this.addEventListener('executeBoost', ({ detail }: any) => {
99
- setTimeout(() => this.executeBoost({ context: {}, ...detail }), 1);
100
- });
101
- }
102
-
103
- private initializeSSE() {
104
- const digipair = this.code;
105
- const reasoning = 'notification';
106
-
107
- fetchEventSource(`${this.apiUrl}/${digipair}/${reasoning}`, {
108
- method: 'POST',
109
- headers: {
110
- 'Content-Type': 'application/json',
111
- },
112
- onmessage: (message: any) => {
113
- if (message.event !== 'message') {
114
- return;
115
- }
116
-
117
- const data = JSON.parse(message.data);
118
-
119
- if (data.type === 'step') {
120
- this.loadingStep = data.content;
121
- }
122
-
123
- if (data.type === 'message') {
124
- this.pushMessage(data.content);
125
- }
126
- },
127
- body: JSON.stringify({
128
- userId: this.userId,
129
- }),
130
- onerror(err) {
131
- console.error('[Digipair] SSE Error:', err);
132
- },
133
- });
134
- }
135
-
136
- private loadUser(): void {
137
- this.newUser = false;
138
-
139
- if (this.userId) {
140
- return;
141
- }
142
-
143
- this.userId = localStorage.getItem('digipair-user');
144
- if (!this.userId) {
145
- // set uuid
146
- this.userId = Math.random().toString(36).substring(2, 15);
147
- localStorage.setItem('digipair-user', this.userId);
148
-
149
- this.newUser = true;
150
- }
151
- }
152
-
153
- private async boostListener() {
154
- const boosts = (await this.executeScene('boosts'))
155
- .map((boost: any) => ({
156
- ...boost,
157
- checkUrl: new RegExp(boost.url),
158
- }))
159
- .filter((boost: any) => boost.selector);
160
- let lastSelectedBoosts: any[] | null = [];
161
-
162
- document.addEventListener(
163
- 'mouseover',
164
- (event: any) => {
165
- lastSelectedBoosts = event.target.closest('digipair-chatbot')
166
- ? null
167
- : this.getBoostsFromTarget(event.target, boosts);
168
-
169
- setTimeout(async () => {
170
- // si on est sur le chatbot, on ne fait rien
171
- if (!lastSelectedBoosts) {
172
- return;
173
- }
174
-
175
- const selectedBoosts = this.getBoostsFromTarget(event.target, boosts);
176
-
177
- // garder les boosts communs entre les deux listes
178
- this.boosters = selectedBoosts
179
- .filter(boost => lastSelectedBoosts?.includes(boost))
180
- .map(boost => ({
181
- ...boost,
182
- context: {
183
- ...(boost.context || {}),
184
- element: getCssSelector(event.target.closest(boost.selector)),
185
- },
186
- }));
187
- }, 1000);
188
- },
189
- true,
190
- );
191
- }
192
-
193
- private getBoostsFromTarget(target: any, boosts: any[]): any[] {
194
- return boosts.filter(
195
- boost => boost.checkUrl.test(window.location.href) && !!target.closest(boost.selector),
196
- );
197
- }
198
-
199
- private async loadDigipair(): Promise<void> {
200
- this.isDigipairLoading = true;
201
-
202
- const digipair = this.code;
203
- const reasoning = 'metadata';
204
- const metadata = await this.executeScene(reasoning);
205
-
206
- this.metadata = { ...metadata, id: digipair, config: { VERSIONS: metadata.config.VERSIONS } };
207
- await this.loadHistory();
208
-
209
- setTimeout(() => {
210
- this.scrollDown();
211
- setTimeout(() => {
212
- this.closeResult();
213
- }, 1);
214
- }, 1);
215
-
216
- this.isDigipairLoading = false;
217
-
218
- if (this.newUser) {
219
- this.manageNewUser();
220
- }
221
- }
222
-
223
- private manageNewUser(): void {
224
- if (!this.firstOpenDelay) {
225
- return;
226
- }
227
-
228
- setTimeout(() => {
229
- if (this.alreadyOpened) {
230
- return;
231
- }
232
-
233
- this.openResult();
234
- }, this.firstOpenDelay);
235
- }
236
-
237
- private async loadHistory(): Promise<void> {
238
- const userId = this.userId;
239
- const reasoning = 'history';
240
- const messages = (
241
- await this.executeScene(reasoning, {
242
- userId,
243
- })
244
- ).map((message: any) => ({
245
- ...message,
246
- boost: message.boost
247
- ? {
248
- ...message.boost,
249
- checkUrl: message.boost.url ? new RegExp(message.boost.url) : null,
250
- }
251
- : null,
252
- }));
253
-
254
- if (messages.length > 0) {
255
- this.messages = messages;
256
- }
257
- }
258
-
259
- private scrollDown(): void {
260
- const container = (this.shadowRoot as unknown as HTMLElement).querySelector(
261
- '.container',
262
- ) as HTMLElement;
263
- container.scrollTop = container.scrollHeight;
264
- }
265
-
266
- async execute(boost: any, message?: string): Promise<void> {
267
- this.loadingStep = '';
268
- this.loading = true;
269
-
270
- if (message || boost?.command?.properties?.input?.prompt) {
271
- this.messages.push({
272
- role: 'user',
273
- content: message || boost.command.properties.input.prompt,
274
- });
275
- }
276
- this.chatbot.requestUpdate();
277
-
278
- const command = boost?.command ? boost.command : this.CHAT_COMMAND(this.code, boost?.reasoning);
279
- try {
280
- const pins = JSON.parse(JSON.stringify(command));
281
- pins.properties = pins.properties || {};
282
- pins.properties.input = {
283
- ...(pins.properties.input || {}),
284
- prompt: message || pins.properties.input?.prompt,
285
- inputs: this.chatbot.inputs,
286
- userId: this.userId,
287
- step: boost?.step,
288
- parent_history: boost?.parent_history,
289
- parent_conversation: boost?.parent_conversation,
290
- context: boost?.context || {},
291
- };
292
-
293
- const detail = await executePinsList(
294
- [pins],
295
- {
296
- config: {
297
- VERSIONS: this.metadata.config.VERSIONS,
298
- },
299
- },
300
- 'boost',
301
- );
302
- this.currentBoost = detail.boost
303
- ? {
304
- parent_history: detail.uuid,
305
- parent_conversation: detail.parent_conversation || detail.uuid,
306
- ...detail.boost,
307
- }
308
- : null;
309
- this.pushMessage({
310
- role: 'assistant',
311
- content: detail.assistant,
312
- uuid: detail.uuid,
313
- boost: detail.boost,
314
- boosts: detail.boosts,
315
- sources: detail.sources,
316
- parent_conversation: detail.parent_conversation,
317
- parent_history: detail.parent_history,
318
- });
319
-
320
- if (detail.command && detail.command.length > 0) {
321
- await executePinsList(
322
- detail.command,
323
- { config: { VERSIONS: this.metadata.config.VERSIONS } },
324
- 'boost.command',
325
- );
326
- }
327
- } catch (error) {
328
- this.pushMessage({
329
- role: 'assistant',
330
- content: 'Oops...',
331
- });
332
- }
333
-
334
- this.loadingStep = '';
335
- this.loading = false;
336
- }
337
-
338
- private executeBoost(boost: any): void {
339
- this.execute(boost);
340
- this.openResult();
341
-
342
- setTimeout(() => {
343
- (this.chatbot?.shadowRoot?.querySelector('#messageInput') as any).focus();
344
- }, 1);
345
- }
346
-
347
- private pushMessage(message: Message): void {
348
- this.openResult();
349
- this.messages.push(message);
350
- this.chatbot.requestUpdate();
351
- }
352
-
353
- private openResult(): void {
354
- this.resultState = 'open';
355
- setTimeout(() => {
356
- (this.chatbot?.shadowRoot?.querySelector('#messageInput') as any).focus();
357
- this.chatbot.requestUpdate();
358
- }, 1);
359
-
360
- this.alreadyOpened = true;
361
- }
362
-
363
- private closeResult(): void {
364
- this.resultState = 'closed';
365
- }
366
-
367
- private setBoost(boost: any): void {
368
- this.currentBoost = boost;
369
- this.boosters = [];
370
- }
371
-
372
- private executeScene = async (reasoning: string, input: any = {}): Promise<any> => {
373
- const digipair = this.code;
374
- const response = await fetch(`${this.apiUrl}/${digipair}/${reasoning}`, {
375
- method: 'POST',
376
- headers: {
377
- 'Content-Type': 'application/json',
378
- },
379
- body: JSON.stringify(input),
380
- });
381
-
382
- return await response.json();
383
- };
384
-
385
- static override styles = styles;
386
- override render(): TemplateResult {
387
- if (this.metadata?.id !== this.code) {
388
- if (!this.isDigipairLoading) {
389
- this.loadDigipair();
390
- }
391
- return html``;
392
- }
393
-
394
- return html`
395
- <style>
396
- @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
397
- font-family: 'Poppins', sans-serif;
398
- font-weight: 300;
399
- font-style: normal;
400
-
401
- --digipair-color-primary: ${this.metadata.primary};
402
- --digipair-color-text-primary: ${this.metadata.textPrimary};
403
- --digipair-color-secondary: ${this.metadata.secondary};
404
- --digipair-color-text-secondary: ${this.metadata.textSecondary};
405
- </style>
406
-
407
- <section class="container result-${this.resultState}">
408
- <section class="result" style="border: 1px solid var(--digipair-color-primary, #52DFDB)">
409
- <digipair-chatbot-chat
410
- ?loading=${this.loading}
411
- .messages=${this.messages}
412
- .currentBoost=${this.currentBoost}
413
- .context=${{ config: this.metadata.config, variables: this.metadata.variables }}
414
- loadingStep=${this.loadingStep}
415
- @prompt=${(event: any) => this.execute(this.currentBoost, event.detail.prompt)}
416
- @executeboost=${(event: any) => this.executeBoost(event.detail)}
417
- @boost=${(event: any) => this.setBoost(event.detail)}
418
- ></digipair-chatbot-chat>
419
- </section>
420
-
421
- <section class="actions ${this.loading ? 'loading' : ''}">
422
- ${this.boosters.map(
423
- boost => html`
424
- <span
425
- class="action"
426
- style="border: 1px solid var(--digipair-color-primary, #52DFDB)"
427
- @click=${() => this.executeBoost(boost)}
428
- >${boost.summary}</span
429
- >
430
- `,
431
- )}
432
- </section>
433
-
434
- <section
435
- class="panel"
436
- style="border: 1px solid var(--digipair-color-primary, #52DFDB)"
437
- ></section>
438
- <img
439
- @click=${() => (this.resultState !== 'closed' ? this.closeResult() : this.openResult())}
440
- class="logo ${this.loading ? 'loading' : ''}"
441
- src=${this.metadata.avatar}
442
- />
443
- </section>
444
- `;
445
- }
446
- }
@@ -1,46 +0,0 @@
1
- import { LitElement, html, noChange, nothing } from 'lit';
2
- import { customElement, property } from 'lit/decorators.js';
3
- import { until } from 'lit/directives/until.js';
4
- import { generateElementFromPins } from '@digipair/engine';
5
-
6
- @customElement('digipair-chatbot-inputs')
7
- export class InputsElement extends LitElement {
8
- @property({ type: Array })
9
- inputs: any[] = [];
10
-
11
- @property({ type: Object })
12
- context: any = {};
13
-
14
- private cache = '';
15
-
16
- get values(): { [key: string]: any }[] {
17
- return Array.from((this.shadowRoot as unknown as HTMLElement).children).map((el: any) => ({
18
- value: el.value,
19
- content: el.content,
20
- required: el.required,
21
- }));
22
- }
23
-
24
- override render() {
25
- const cache = JSON.stringify(this.inputs);
26
-
27
- if (this.cache === cache) {
28
- return noChange;
29
- }
30
- this.cache = cache;
31
-
32
- return html`
33
- ${(this.inputs || []).map(
34
- (pins: PinsSettings) =>
35
- html`${until(
36
- generateElementFromPins(pins, null, this.context).then((el: Element) => {
37
- setTimeout(() => this.dispatchEvent(new CustomEvent('change')), 1);
38
- el.addEventListener('change', () => this.dispatchEvent(new CustomEvent('change')));
39
- return el;
40
- }),
41
- nothing,
42
- )}`,
43
- )}
44
- `;
45
- }
46
- }
@@ -1 +0,0 @@
1
- declare module 'mermaid/dist/mermaid.esm.min.mjs';
@@ -1,10 +0,0 @@
1
- export interface Message {
2
- role: 'assistant' | 'user';
3
- content: string;
4
- uuid?: string;
5
- boost?: any;
6
- boosts?: any[];
7
- sources?: any[];
8
- parent_conversation?: string;
9
- parent_history?: string;
10
- }
@@ -1,32 +0,0 @@
1
- class DomService {
2
- async executeRemoteReasoning(
3
- { digipair, reasoning, input, apiUrl }: any,
4
- _pinsSettingsList: PinsSettings[],
5
- context: any,
6
- ): Promise<any> {
7
- const response = await fetch(`${apiUrl}/${digipair}/${reasoning}`, {
8
- method: 'POST',
9
- headers: {
10
- 'Content-Type': 'application/json',
11
- },
12
- body: JSON.stringify({
13
- ...context.input,
14
- ...input,
15
- }),
16
- });
17
-
18
- const result = await response.json();
19
-
20
- if (response.status >= 400) {
21
- throw new Error(result.message);
22
- }
23
-
24
- return result;
25
- }
26
- }
27
-
28
- export const executeRemoteReasoning = (
29
- params: any,
30
- pinsSettingsList: PinsSettings[],
31
- context: any,
32
- ) => new DomService().executeRemoteReasoning(params, pinsSettingsList, context);
@@ -1,12 +0,0 @@
1
- import getCssSelectorOrigin from 'css-selector-generator';
2
-
3
- function unescapeCSS(cssEscapedString: string) {
4
- return cssEscapedString.replace(/\\([0-9A-Fa-f]{1,6})\s?/g, (_match: any, charCode: any) =>
5
- String.fromCharCode(parseInt(charCode, 16))
6
- ).replace(/\\/g, '');
7
- }
8
-
9
- export default function getCssSelector(element: any, options: any = {}) {
10
- const selector = getCssSelectorOrigin(element, options);
11
- return unescapeCSS(selector);
12
- }
package/tsconfig.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "files": [],
4
- "include": [],
5
- "references": [
6
- {
7
- "path": "../engine"
8
- },
9
- {
10
- "path": "./tsconfig.lib.json"
11
- }
12
- ]
13
- }
package/tsconfig.lib.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "rootDir": "src",
5
- "outDir": "dist",
6
- "tsBuildInfoFile": "dist/tsconfig.lib.tsbuildinfo",
7
- "emitDeclarationOnly": true,
8
- "module": "esnext",
9
- "moduleResolution": "node",
10
- "forceConsistentCasingInFileNames": true,
11
- "types": ["node"]
12
- },
13
- "include": ["src/**/*.ts"],
14
- "references": [
15
- {
16
- "path": "../engine/tsconfig.lib.json"
17
- }
18
- ]
19
- }
File without changes
File without changes
File without changes