@c8y/tutorial 1024.15.16 → 1024.16.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c8y/tutorial",
|
|
3
|
-
"version": "1024.
|
|
3
|
+
"version": "1024.16.5",
|
|
4
4
|
"description": "This package is used to scaffold a tutorial for Cumulocity IoT Web SDK which explains a lot of concepts.",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@angular/animations": "^21.2.0",
|
|
7
7
|
"@angular/cdk": "^21.2.0",
|
|
8
|
-
"@c8y/bootstrap": "1024.
|
|
9
|
-
"@c8y/client": "1024.
|
|
10
|
-
"@c8y/ngx-components": "1024.
|
|
11
|
-
"@c8y/style": "1024.
|
|
8
|
+
"@c8y/bootstrap": "1024.16.5",
|
|
9
|
+
"@c8y/client": "1024.16.5",
|
|
10
|
+
"@c8y/ngx-components": "1024.16.5",
|
|
11
|
+
"@c8y/style": "1024.16.5",
|
|
12
12
|
"gridstack": "^12.4.2",
|
|
13
13
|
"leaflet": "1.9.4",
|
|
14
14
|
"monaco-editor": "~0.53.0",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"zone.js": "~0.15.1"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@c8y/devkit": "1024.
|
|
21
|
-
"@c8y/options": "1024.
|
|
20
|
+
"@c8y/devkit": "1024.16.5",
|
|
21
|
+
"@c8y/options": "1024.16.5"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@angular/common": ">=21 <22"
|
|
@@ -320,6 +320,38 @@
|
|
|
320
320
|
<div>This is content that is projected by default and always shown.</div>
|
|
321
321
|
}
|
|
322
322
|
|
|
323
|
+
<!-- Action bar below the input box. Project any control and place it left, right or in the
|
|
324
|
+
overflow (more) dropdown. -->
|
|
325
|
+
<c8y-ai-chat-action placement="left">
|
|
326
|
+
<button
|
|
327
|
+
class="btn btn-link btn-sm"
|
|
328
|
+
type="button"
|
|
329
|
+
(click)="clearMessages()"
|
|
330
|
+
>
|
|
331
|
+
<i c8yIcon="delete-bin"></i> {{ 'Clear chat' | translate }}
|
|
332
|
+
</button>
|
|
333
|
+
</c8y-ai-chat-action>
|
|
334
|
+
|
|
335
|
+
<c8y-ai-chat-action placement="right">
|
|
336
|
+
<button
|
|
337
|
+
class="btn btn-link btn-sm"
|
|
338
|
+
type="button"
|
|
339
|
+
(click)="reloadComponent()"
|
|
340
|
+
>
|
|
341
|
+
{{ 'Reset example' | translate }}
|
|
342
|
+
</button>
|
|
343
|
+
</c8y-ai-chat-action>
|
|
344
|
+
|
|
345
|
+
<c8y-ai-chat-action placement="more">
|
|
346
|
+
<button
|
|
347
|
+
class="dropdown-item"
|
|
348
|
+
type="button"
|
|
349
|
+
(click)="clearMessages()"
|
|
350
|
+
>
|
|
351
|
+
<i c8yIcon="delete-bin"></i> {{ 'Clear chat' | translate }}
|
|
352
|
+
</button>
|
|
353
|
+
</c8y-ai-chat-action>
|
|
354
|
+
|
|
323
355
|
<c8y-ai-chat-suggestion
|
|
324
356
|
[label]="'Create device '"
|
|
325
357
|
[prompt]="'AHOI, create a new device'"
|
|
@@ -4,6 +4,7 @@ import { FormsModule } from '@angular/forms';
|
|
|
4
4
|
import { CoreModule, LoadingComponent } from '@c8y/ngx-components';
|
|
5
5
|
import { AIMessage, AssistantMessageDisplayConfig, ChatConfig } from '@c8y/ngx-components/ai';
|
|
6
6
|
import {
|
|
7
|
+
AiChatActionComponent,
|
|
7
8
|
AiChatAssistantMessageComponent,
|
|
8
9
|
AiChatComponent,
|
|
9
10
|
AiChatMessageActionComponent,
|
|
@@ -21,6 +22,7 @@ import { gettext } from '@c8y/ngx-components/gettext';
|
|
|
21
22
|
AiChatMessageComponent,
|
|
22
23
|
AiChatMessageActionComponent,
|
|
23
24
|
AiChatSuggestionComponent,
|
|
25
|
+
AiChatActionComponent,
|
|
24
26
|
LoadingComponent,
|
|
25
27
|
NgComponentOutlet,
|
|
26
28
|
CoreModule,
|
|
@@ -127,6 +129,11 @@ export class ChatExampleComponent {
|
|
|
127
129
|
this.updateDisplayMessages();
|
|
128
130
|
}
|
|
129
131
|
|
|
132
|
+
clearMessages() {
|
|
133
|
+
this.messages = [];
|
|
134
|
+
this.updateDisplayMessages();
|
|
135
|
+
}
|
|
136
|
+
|
|
130
137
|
reloadComponent() {
|
|
131
138
|
// Reload the component by toggling the flag
|
|
132
139
|
this.showComponent = false;
|