@tylertech/forge-ai 0.13.7 → 0.13.9
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/custom-elements.json +23 -3
- package/dist/ai-chatbot/message-state-controller.d.ts +1 -2
- package/dist/ai-thinking-indicator/ai-thinking-indicator.mjs +38 -8
- package/dist/ai-threads/ai-threads.d.ts +1 -1
- package/dist/ai-threads/ai-threads.mjs +5 -5
- package/dist/core/chatbot-core-controller.mjs +1 -9
- package/package.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -11801,6 +11801,17 @@
|
|
|
11801
11801
|
"privacy": "public",
|
|
11802
11802
|
"default": "false",
|
|
11803
11803
|
"attribute": "show-thread-delete"
|
|
11804
|
+
},
|
|
11805
|
+
{
|
|
11806
|
+
"kind": "field",
|
|
11807
|
+
"name": "selectedThreadId",
|
|
11808
|
+
"type": {
|
|
11809
|
+
"text": "string | null"
|
|
11810
|
+
},
|
|
11811
|
+
"privacy": "public",
|
|
11812
|
+
"default": "null",
|
|
11813
|
+
"description": "Currently selected thread ID",
|
|
11814
|
+
"attribute": "selected-thread-id"
|
|
11804
11815
|
}
|
|
11805
11816
|
],
|
|
11806
11817
|
"events": [
|
|
@@ -11881,6 +11892,15 @@
|
|
|
11881
11892
|
},
|
|
11882
11893
|
"default": "false",
|
|
11883
11894
|
"fieldName": "showThreadDelete"
|
|
11895
|
+
},
|
|
11896
|
+
{
|
|
11897
|
+
"name": "selected-thread-id",
|
|
11898
|
+
"type": {
|
|
11899
|
+
"text": "string | null"
|
|
11900
|
+
},
|
|
11901
|
+
"default": "null",
|
|
11902
|
+
"description": "Currently selected thread ID",
|
|
11903
|
+
"fieldName": "selectedThreadId"
|
|
11884
11904
|
}
|
|
11885
11905
|
],
|
|
11886
11906
|
"superclass": {
|
|
@@ -14631,11 +14651,11 @@
|
|
|
14631
14651
|
},
|
|
14632
14652
|
"MessageStateControllerConfig": {
|
|
14633
14653
|
"path": "src/lib/ai-chatbot/message-state-controller.ts",
|
|
14634
|
-
"lineNumber":
|
|
14654
|
+
"lineNumber": 22
|
|
14635
14655
|
},
|
|
14636
14656
|
"MessageStateController": {
|
|
14637
14657
|
"path": "src/lib/ai-chatbot/message-state-controller.ts",
|
|
14638
|
-
"lineNumber":
|
|
14658
|
+
"lineNumber": 35
|
|
14639
14659
|
},
|
|
14640
14660
|
"HeadingLevel": {
|
|
14641
14661
|
"path": "src/lib/ai-chatbot/types.ts",
|
|
@@ -15087,7 +15107,7 @@
|
|
|
15087
15107
|
},
|
|
15088
15108
|
"AiThinkingIndicatorComponent": {
|
|
15089
15109
|
"path": "src/lib/ai-thinking-indicator/ai-thinking-indicator.ts",
|
|
15090
|
-
"lineNumber":
|
|
15110
|
+
"lineNumber": 68
|
|
15091
15111
|
},
|
|
15092
15112
|
"ForgeAiThreadActionsMenuRenameEventData": {
|
|
15093
15113
|
"path": "src/lib/ai-thread-actions-menu/ai-thread-actions-menu.ts",
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
-
import { ChatMessage, MessageItem, ToolCall,
|
|
2
|
+
import { ChatMessage, MessageItem, ToolCall, AssistantResponse, ResponseFeedback } from './types.js';
|
|
3
3
|
import { MessageStartEvent, MessageDeltaEvent, MessageEndEvent, ToolCallStartEvent, ToolCallArgsEvent, ToolCallEndEvent, ToolResultEvent } from './agent-adapter.js';
|
|
4
4
|
export interface MessageStateControllerConfig {
|
|
5
|
-
tools: Map<string, ToolDefinition>;
|
|
6
5
|
onThreadSettled?: () => void;
|
|
7
6
|
}
|
|
8
7
|
/**
|
|
@@ -24,15 +24,45 @@ const AiThinkingIndicatorComponentTagName = "forge-ai-thinking-indicator";
|
|
|
24
24
|
const STATUS_MESSAGES = [
|
|
25
25
|
"Thinking...",
|
|
26
26
|
"Processing...",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
27
|
+
"Reviewing...",
|
|
28
|
+
"Considering...",
|
|
29
|
+
"Evaluating...",
|
|
29
30
|
"Analyzing...",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
31
|
+
"Assessing...",
|
|
32
|
+
"Auditing...",
|
|
33
|
+
"Deliberating...",
|
|
34
|
+
"Adjudicating...",
|
|
35
|
+
"Cogitating...",
|
|
36
|
+
"Ruminating...",
|
|
37
|
+
"Percolating...",
|
|
38
|
+
"Marshaling...",
|
|
39
|
+
"Collating...",
|
|
40
|
+
"Parsing...",
|
|
41
|
+
"Distilling...",
|
|
42
|
+
"Forging...",
|
|
43
|
+
"Refining...",
|
|
44
|
+
"Reconciling...",
|
|
45
|
+
"Finalizing...",
|
|
46
|
+
"Validating...",
|
|
47
|
+
"Verifying...",
|
|
48
|
+
"Contemplating...",
|
|
49
|
+
"Pondering...",
|
|
50
|
+
"Weighing...",
|
|
51
|
+
"Scrutinizing...",
|
|
52
|
+
"Examining...",
|
|
53
|
+
"Investigating...",
|
|
54
|
+
"Deducing...",
|
|
55
|
+
"Inferring...",
|
|
56
|
+
"Reasoning...",
|
|
57
|
+
"Synthesizing...",
|
|
58
|
+
"Formulating...",
|
|
59
|
+
"Compiling...",
|
|
60
|
+
"Consulting...",
|
|
61
|
+
"Cross-referencing...",
|
|
62
|
+
"Interpreting...",
|
|
63
|
+
"Untangling...",
|
|
64
|
+
"Sifting...",
|
|
65
|
+
"Triangulating..."
|
|
36
66
|
];
|
|
37
67
|
let AiThinkingIndicatorComponent = class extends LitElement {
|
|
38
68
|
constructor() {
|
|
@@ -71,7 +71,7 @@ export declare class AiThreadsComponent extends LitElement {
|
|
|
71
71
|
showThreadDelete: boolean;
|
|
72
72
|
private _threadListContainer;
|
|
73
73
|
/** Currently selected thread ID */
|
|
74
|
-
|
|
74
|
+
selectedThreadId: string | null;
|
|
75
75
|
private _editingThreadId;
|
|
76
76
|
private _hiddenThreadIds;
|
|
77
77
|
private _openMenuThreadId;
|
|
@@ -36,7 +36,7 @@ let AiThreadsComponent = class extends LitElement {
|
|
|
36
36
|
this.totalChats = 0;
|
|
37
37
|
this.showThreadRename = false;
|
|
38
38
|
this.showThreadDelete = false;
|
|
39
|
-
this.
|
|
39
|
+
this.selectedThreadId = null;
|
|
40
40
|
this._editingThreadId = null;
|
|
41
41
|
this._hiddenThreadIds = /* @__PURE__ */ new Set();
|
|
42
42
|
this._openMenuThreadId = null;
|
|
@@ -112,7 +112,7 @@ let AiThreadsComponent = class extends LitElement {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
_handleThreadSelect(thread) {
|
|
115
|
-
this.
|
|
115
|
+
this.selectedThreadId = thread.id;
|
|
116
116
|
const event = new CustomEvent("forge-ai-threads-select", {
|
|
117
117
|
detail: { id: thread.id, title: thread.title },
|
|
118
118
|
bubbles: true,
|
|
@@ -231,7 +231,7 @@ threadList_get = function() {
|
|
|
231
231
|
return html`
|
|
232
232
|
<ul class="forge-list forge-list--dense forge-list--navlist" role="list">
|
|
233
233
|
${displayedThreads.map((thread) => {
|
|
234
|
-
const isSelected = this.
|
|
234
|
+
const isSelected = this.selectedThreadId === thread.id;
|
|
235
235
|
const isEditing = this._editingThreadId === thread.id;
|
|
236
236
|
const hasOpenMenu = this._openMenuThreadId === thread.id;
|
|
237
237
|
return html`
|
|
@@ -321,8 +321,8 @@ __decorateClass([
|
|
|
321
321
|
query(".thread-list-container")
|
|
322
322
|
], AiThreadsComponent.prototype, "_threadListContainer", 2);
|
|
323
323
|
__decorateClass([
|
|
324
|
-
|
|
325
|
-
], AiThreadsComponent.prototype, "
|
|
324
|
+
property({ type: String, attribute: "selected-thread-id" })
|
|
325
|
+
], AiThreadsComponent.prototype, "selectedThreadId", 2);
|
|
326
326
|
__decorateClass([
|
|
327
327
|
state()
|
|
328
328
|
], AiThreadsComponent.prototype, "_editingThreadId", 2);
|
|
@@ -9,7 +9,6 @@ class ChatbotCoreController {
|
|
|
9
9
|
#fileUploadManager;
|
|
10
10
|
#adapterSubscriptions;
|
|
11
11
|
#adapter;
|
|
12
|
-
#toolsMap;
|
|
13
12
|
#executingToolHandlers = 0;
|
|
14
13
|
constructor(host, config) {
|
|
15
14
|
this.#host = host;
|
|
@@ -18,7 +17,6 @@ class ChatbotCoreController {
|
|
|
18
17
|
}
|
|
19
18
|
hostConnected() {
|
|
20
19
|
this.#messageStateController = new MessageStateController(this.#host, {
|
|
21
|
-
tools: this.tools,
|
|
22
20
|
onThreadSettled: () => this.#emitThreadStateChange()
|
|
23
21
|
});
|
|
24
22
|
this.#fileUploadManager = new FileUploadManager({
|
|
@@ -43,7 +41,6 @@ class ChatbotCoreController {
|
|
|
43
41
|
}
|
|
44
42
|
set adapter(value) {
|
|
45
43
|
this.#adapter = value;
|
|
46
|
-
this.#toolsMap = void 0;
|
|
47
44
|
if (value) {
|
|
48
45
|
this.#setupAdapter();
|
|
49
46
|
}
|
|
@@ -61,10 +58,7 @@ class ChatbotCoreController {
|
|
|
61
58
|
return this.messageItems.length > 0;
|
|
62
59
|
}
|
|
63
60
|
get tools() {
|
|
64
|
-
|
|
65
|
-
this.#toolsMap = new Map(this.#adapter?.getTools().map((t) => [t.name, t]) ?? []);
|
|
66
|
-
}
|
|
67
|
-
return this.#toolsMap;
|
|
61
|
+
return new Map(this.#adapter?.getTools().map((t) => [t.name, t]) ?? []);
|
|
68
62
|
}
|
|
69
63
|
get pendingAttachments() {
|
|
70
64
|
return this.#fileUploadManager?.pendingAttachments ?? [];
|
|
@@ -94,8 +88,6 @@ class ChatbotCoreController {
|
|
|
94
88
|
this.#adapter.onError(this.#handleError.bind(this)),
|
|
95
89
|
this.#adapter.onStateChange(this.#handleStateChange.bind(this))
|
|
96
90
|
);
|
|
97
|
-
this.#toolsMap = void 0;
|
|
98
|
-
this.#messageStateController?.updateConfig({ tools: this.tools });
|
|
99
91
|
this.#callbacks.onDispatchEvent("forge-ai-chatbot-connected");
|
|
100
92
|
}
|
|
101
93
|
#handleRunStarted() {
|