@memberjunction/ng-conversations 2.117.0 → 2.119.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.
- package/dist/lib/components/collection/collection-artifact-card.component.d.ts +7 -1
- package/dist/lib/components/collection/collection-artifact-card.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-artifact-card.component.js +14 -18
- package/dist/lib/components/collection/collection-artifact-card.component.js.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.d.ts +86 -1
- package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.js +1042 -255
- package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +9 -2
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +242 -163
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.js +11 -11
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
- package/dist/lib/components/mention/mention-dropdown.component.js +2 -2
- package/dist/lib/components/mention/mention-editor.component.d.ts +21 -0
- package/dist/lib/components/mention/mention-editor.component.d.ts.map +1 -1
- package/dist/lib/components/mention/mention-editor.component.js +299 -2
- package/dist/lib/components/mention/mention-editor.component.js.map +1 -1
- package/dist/lib/components/message/actionable-commands.component.d.ts +33 -0
- package/dist/lib/components/message/actionable-commands.component.d.ts.map +1 -0
- package/dist/lib/components/message/actionable-commands.component.js +107 -0
- package/dist/lib/components/message/actionable-commands.component.js.map +1 -0
- package/dist/lib/components/message/agent-response-form.component.d.ts +72 -0
- package/dist/lib/components/message/agent-response-form.component.d.ts.map +1 -0
- package/dist/lib/components/message/agent-response-form.component.js +310 -0
- package/dist/lib/components/message/agent-response-form.component.js.map +1 -0
- package/dist/lib/components/message/form-question.component.d.ts +105 -0
- package/dist/lib/components/message/form-question.component.d.ts.map +1 -0
- package/dist/lib/components/message/form-question.component.js +621 -0
- package/dist/lib/components/message/form-question.component.js.map +1 -0
- package/dist/lib/components/message/message-input-box.component.d.ts +12 -0
- package/dist/lib/components/message/message-input-box.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input-box.component.js +14 -1
- package/dist/lib/components/message/message-input-box.component.js.map +1 -1
- package/dist/lib/components/message/message-input.component.d.ts +3 -3
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +87 -102
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +39 -6
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +492 -197
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +2 -1
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +5 -1
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/tasks/tasks-dropdown.component.d.ts +10 -0
- package/dist/lib/components/tasks/tasks-dropdown.component.d.ts.map +1 -1
- package/dist/lib/components/tasks/tasks-dropdown.component.js +108 -32
- package/dist/lib/components/tasks/tasks-dropdown.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts +23 -6
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +128 -52
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/conversations.module.d.ts +60 -56
- package/dist/lib/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.js +17 -1
- package/dist/lib/conversations.module.js.map +1 -1
- package/dist/lib/models/collection-view.model.d.ts +30 -0
- package/dist/lib/models/collection-view.model.d.ts.map +1 -0
- package/dist/lib/models/collection-view.model.js +2 -0
- package/dist/lib/models/collection-view.model.js.map +1 -0
- package/dist/lib/models/conversation-state.model.d.ts +1 -0
- package/dist/lib/models/conversation-state.model.d.ts.map +1 -1
- package/dist/lib/services/active-tasks.service.d.ts +1 -0
- package/dist/lib/services/active-tasks.service.d.ts.map +1 -1
- package/dist/lib/services/active-tasks.service.js.map +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts +4 -1
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +22 -2
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/conversation-streaming.service.d.ts +1 -0
- package/dist/lib/services/conversation-streaming.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-streaming.service.js +11 -26
- package/dist/lib/services/conversation-streaming.service.js.map +1 -1
- package/dist/lib/services/data-cache.service.d.ts +12 -0
- package/dist/lib/services/data-cache.service.d.ts.map +1 -1
- package/dist/lib/services/data-cache.service.js +41 -0
- package/dist/lib/services/data-cache.service.js.map +1 -1
- package/dist/lib/services/mention-parser.service.d.ts +6 -1
- package/dist/lib/services/mention-parser.service.d.ts.map +1 -1
- package/dist/lib/services/mention-parser.service.js +114 -34
- package/dist/lib/services/mention-parser.service.js.map +1 -1
- package/dist/lib/services/ui-command-handler.service.d.ts +45 -0
- package/dist/lib/services/ui-command-handler.service.d.ts.map +1 -0
- package/dist/lib/services/ui-command-handler.service.js +95 -0
- package/dist/lib/services/ui-command-handler.service.js.map +1 -0
- package/package.json +15 -14
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Injectable, EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "./data-cache.service";
|
|
4
|
+
/**
|
|
5
|
+
* Service for handling UI commands from agents
|
|
6
|
+
* Emits events for commands to be handled by the host application
|
|
7
|
+
* This allows the generic conversations package to remain app-agnostic
|
|
8
|
+
*/
|
|
9
|
+
export class UICommandHandlerService {
|
|
10
|
+
dataCacheService;
|
|
11
|
+
/**
|
|
12
|
+
* Event emitted when an actionable command should be executed
|
|
13
|
+
* Host application should subscribe to this and handle the command appropriately
|
|
14
|
+
*/
|
|
15
|
+
actionableCommandRequested = new EventEmitter();
|
|
16
|
+
/**
|
|
17
|
+
* Event emitted when an automatic command should be executed
|
|
18
|
+
* Host application should subscribe to this and handle the command appropriately
|
|
19
|
+
*/
|
|
20
|
+
automaticCommandRequested = new EventEmitter();
|
|
21
|
+
constructor(dataCacheService) {
|
|
22
|
+
this.dataCacheService = dataCacheService;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Execute an actionable command (triggered by user clicking a button)
|
|
26
|
+
* Emits the command for the host application to handle
|
|
27
|
+
*/
|
|
28
|
+
async executeActionableCommand(command) {
|
|
29
|
+
console.log('📤 Emitting actionable command for host app:', command);
|
|
30
|
+
this.actionableCommandRequested.emit(command);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Execute an automatic command (runs immediately without user interaction)
|
|
34
|
+
* Special handling: refresh:data commands execute locally, others emit to host
|
|
35
|
+
*/
|
|
36
|
+
async executeAutomaticCommand(command) {
|
|
37
|
+
console.log('Executing automatic command:', command);
|
|
38
|
+
if (command.type === 'refresh:data') {
|
|
39
|
+
// Handle data refresh locally as it's a generic operation
|
|
40
|
+
await this.handleRefreshData(command);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
// Emit other automatic commands (like notifications) for host to handle
|
|
44
|
+
console.log('📤 Emitting automatic command for host app:', command);
|
|
45
|
+
this.automaticCommandRequested.emit(command);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Execute all automatic commands from an agent result
|
|
50
|
+
*/
|
|
51
|
+
async executeAutomaticCommands(commands) {
|
|
52
|
+
if (!commands || commands.length === 0) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
for (const command of commands) {
|
|
56
|
+
try {
|
|
57
|
+
await this.executeAutomaticCommand(command);
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
console.error('Error executing automatic command:', command, error);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Handle refreshing data (entity data or caches)
|
|
66
|
+
* This is handled locally as it's a generic operation that doesn't require host app knowledge
|
|
67
|
+
*/
|
|
68
|
+
async handleRefreshData(command) {
|
|
69
|
+
const { scope, entityNames, cacheName } = command;
|
|
70
|
+
if (scope === 'entity' && entityNames && entityNames.length > 0) {
|
|
71
|
+
// Refresh specific entity data
|
|
72
|
+
for (const entityName of entityNames) {
|
|
73
|
+
await this.dataCacheService.refreshEntity(entityName);
|
|
74
|
+
}
|
|
75
|
+
console.log('Refreshed entity data:', entityNames);
|
|
76
|
+
}
|
|
77
|
+
else if (scope === 'cache' && cacheName) {
|
|
78
|
+
// Refresh a specific cache
|
|
79
|
+
await this.dataCacheService.refreshCache(cacheName);
|
|
80
|
+
console.log('Refreshed cache:', cacheName);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
console.warn('Invalid refresh:data command parameters:', command);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
static ɵfac = function UICommandHandlerService_Factory(t) { return new (t || UICommandHandlerService)(i0.ɵɵinject(i1.DataCacheService)); };
|
|
87
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: UICommandHandlerService, factory: UICommandHandlerService.ɵfac, providedIn: 'root' });
|
|
88
|
+
}
|
|
89
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UICommandHandlerService, [{
|
|
90
|
+
type: Injectable,
|
|
91
|
+
args: [{
|
|
92
|
+
providedIn: 'root'
|
|
93
|
+
}]
|
|
94
|
+
}], () => [{ type: i1.DataCacheService }], null); })();
|
|
95
|
+
//# sourceMappingURL=ui-command-handler.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-command-handler.service.js","sourceRoot":"","sources":["../../../src/lib/services/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AAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,oCAAoC,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;YACtE,CAAC;QACH,CAAC;IACH,CAAC;IAED;;;OAGG;IACK,KAAK,CAAC,iBAAiB,CAAC,OAA2B;QACzD,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;QAElD,IAAI,KAAK,KAAK,QAAQ,IAAI,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChE,+BAA+B;YAC/B,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;gBACrC,MAAM,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YACxD,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,WAAW,CAAC,CAAC;QACrD,CAAC;aAAM,IAAI,KAAK,KAAK,OAAO,IAAI,SAAS,EAAE,CAAC;YAC1C,2BAA2B;YAC3B,MAAM,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;YACpD,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;QAC7C,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,OAAO,CAAC,CAAC;QACpE,CAAC;IACH,CAAC;iFAhFU,uBAAuB;gEAAvB,uBAAuB,WAAvB,uBAAuB,mBAFtB,MAAM;;iFAEP,uBAAuB;cAHnC,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-conversations",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.119.0",
|
|
4
4
|
"description": "MemberJunction: Conversation, Collection, and Artifact management components for any Angular application",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -26,19 +26,20 @@
|
|
|
26
26
|
"@angular/router": "18.0.2"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@memberjunction/core": "2.
|
|
30
|
-
"@memberjunction/global": "2.
|
|
31
|
-
"@memberjunction/core-entities": "2.
|
|
32
|
-
"@memberjunction/graphql-dataprovider": "2.
|
|
33
|
-
"@memberjunction/ai-engine-base": "2.
|
|
34
|
-
"@memberjunction/ai": "2.
|
|
35
|
-
"@memberjunction/ai-core-plus": "2.
|
|
36
|
-
"@memberjunction/ng-base-types": "2.
|
|
37
|
-
"@memberjunction/ng-container-directives": "2.
|
|
38
|
-
"@memberjunction/ng-notifications": "2.
|
|
39
|
-
"@memberjunction/ng-code-editor": "2.
|
|
40
|
-
"@memberjunction/ng-tasks": "2.
|
|
41
|
-
"@memberjunction/ng-artifacts": "2.
|
|
29
|
+
"@memberjunction/core": "2.119.0",
|
|
30
|
+
"@memberjunction/global": "2.119.0",
|
|
31
|
+
"@memberjunction/core-entities": "2.119.0",
|
|
32
|
+
"@memberjunction/graphql-dataprovider": "2.119.0",
|
|
33
|
+
"@memberjunction/ai-engine-base": "2.119.0",
|
|
34
|
+
"@memberjunction/ai": "2.119.0",
|
|
35
|
+
"@memberjunction/ai-core-plus": "2.119.0",
|
|
36
|
+
"@memberjunction/ng-base-types": "2.119.0",
|
|
37
|
+
"@memberjunction/ng-container-directives": "2.119.0",
|
|
38
|
+
"@memberjunction/ng-notifications": "2.119.0",
|
|
39
|
+
"@memberjunction/ng-code-editor": "2.119.0",
|
|
40
|
+
"@memberjunction/ng-tasks": "2.119.0",
|
|
41
|
+
"@memberjunction/ng-artifacts": "2.119.0",
|
|
42
|
+
"@memberjunction/ng-testing": "2.119.0",
|
|
42
43
|
"@progress/kendo-angular-dialog": "16.2.0",
|
|
43
44
|
"@progress/kendo-angular-buttons": "16.2.0",
|
|
44
45
|
"@progress/kendo-angular-inputs": "16.2.0",
|