@tylertech/forge-ai 0.13.6 → 0.13.8
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 +42 -2
- package/dist/ai-chat-header/ai-chat-header.mjs +1 -1
- package/dist/ai-chatbot/ai-chatbot.d.ts +2 -1
- package/dist/ai-chatbot/ai-chatbot.mjs +7 -7
- package/dist/ai-chatbot/index.d.ts +1 -1
- 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/package.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -3548,6 +3548,17 @@
|
|
|
3548
3548
|
"default": "false",
|
|
3549
3549
|
"attribute": "show-conversation-delete"
|
|
3550
3550
|
},
|
|
3551
|
+
{
|
|
3552
|
+
"kind": "field",
|
|
3553
|
+
"name": "selectedThreadId",
|
|
3554
|
+
"type": {
|
|
3555
|
+
"text": "string | null"
|
|
3556
|
+
},
|
|
3557
|
+
"privacy": "public",
|
|
3558
|
+
"default": "null",
|
|
3559
|
+
"description": "The id of the currently selected conversation thread. Set this to highlight a thread in the conversations panel (e.g. when restoring a conversation loaded from the backend). Updated internally when a thread is selected or a new chat starts.",
|
|
3560
|
+
"attribute": "selected-thread-id"
|
|
3561
|
+
},
|
|
3551
3562
|
{
|
|
3552
3563
|
"kind": "method",
|
|
3553
3564
|
"name": "sendMessage",
|
|
@@ -4262,6 +4273,15 @@
|
|
|
4262
4273
|
"default": "false",
|
|
4263
4274
|
"fieldName": "showConversationDelete"
|
|
4264
4275
|
},
|
|
4276
|
+
{
|
|
4277
|
+
"name": "selected-thread-id",
|
|
4278
|
+
"type": {
|
|
4279
|
+
"text": "string | null"
|
|
4280
|
+
},
|
|
4281
|
+
"default": "null",
|
|
4282
|
+
"description": "The id of the currently selected conversation thread. Set this to highlight a thread in the conversations panel (e.g. when restoring a conversation loaded from the backend). Updated internally when a thread is selected or a new chat starts.",
|
|
4283
|
+
"fieldName": "selectedThreadId"
|
|
4284
|
+
},
|
|
4265
4285
|
{
|
|
4266
4286
|
"name": "file-upload",
|
|
4267
4287
|
"type": {
|
|
@@ -11781,6 +11801,17 @@
|
|
|
11781
11801
|
"privacy": "public",
|
|
11782
11802
|
"default": "false",
|
|
11783
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"
|
|
11784
11815
|
}
|
|
11785
11816
|
],
|
|
11786
11817
|
"events": [
|
|
@@ -11861,6 +11892,15 @@
|
|
|
11861
11892
|
},
|
|
11862
11893
|
"default": "false",
|
|
11863
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"
|
|
11864
11904
|
}
|
|
11865
11905
|
],
|
|
11866
11906
|
"superclass": {
|
|
@@ -14563,7 +14603,7 @@
|
|
|
14563
14603
|
},
|
|
14564
14604
|
"AiChatbotComponent": {
|
|
14565
14605
|
"path": "src/lib/ai-chatbot/ai-chatbot.ts",
|
|
14566
|
-
"lineNumber":
|
|
14606
|
+
"lineNumber": 175
|
|
14567
14607
|
},
|
|
14568
14608
|
"CreateToolRendererElementConfig": {
|
|
14569
14609
|
"path": "src/lib/ai-chatbot/create-tool-renderer.ts",
|
|
@@ -15067,7 +15107,7 @@
|
|
|
15067
15107
|
},
|
|
15068
15108
|
"AiThinkingIndicatorComponent": {
|
|
15069
15109
|
"path": "src/lib/ai-thinking-indicator/ai-thinking-indicator.ts",
|
|
15070
|
-
"lineNumber":
|
|
15110
|
+
"lineNumber": 68
|
|
15071
15111
|
},
|
|
15072
15112
|
"ForgeAiThreadActionsMenuRenameEventData": {
|
|
15073
15113
|
"path": "src/lib/ai-thread-actions-menu/ai-thread-actions-menu.ts",
|
|
@@ -193,7 +193,7 @@ let AiChatHeaderComponent = class extends LitElement {
|
|
|
193
193
|
`
|
|
194
194
|
)}
|
|
195
195
|
${when(
|
|
196
|
-
this.
|
|
196
|
+
this.clearOption === "enabled" && (this.agentInfo || this.exportOption === "enabled"),
|
|
197
197
|
() => html`<forge-ai-dropdown-menu-separator></forge-ai-dropdown-menu-separator>`
|
|
198
198
|
)}
|
|
199
199
|
${when(
|
|
@@ -99,6 +99,7 @@ export declare const AiChatbotComponentTagName: keyof HTMLElementTagNameMap;
|
|
|
99
99
|
* @property {Suggestion[]} suggestions - Suggestions to display in the empty state
|
|
100
100
|
* @property {FeatureToggle} clearOption - Controls the clear-conversation header action. `'on'` (default) shows it when messages exist; `'off'` hides it entirely.
|
|
101
101
|
* @property {FeatureToggle} exportOption - Controls the export-conversation header action. `'on'` (default) shows it when messages exist; `'off'` hides it entirely.
|
|
102
|
+
* @property {string | null} selectedThreadId - The id of the currently selected conversation thread. Set this to highlight a thread in the conversations panel (e.g. when restoring a conversation loaded from the backend). Updated internally when a thread is selected or a new chat starts.
|
|
102
103
|
*
|
|
103
104
|
* @cssproperty --forge-ai-chatbot-icon-color - The fill color for the AI icon. Defaults to `tertiary`.
|
|
104
105
|
* @cssproperty --forge-ai-chatbot-suggestion-background - The background color for suggestion buttons. Defaults to `tertiary-container`.
|
|
@@ -140,7 +141,7 @@ export declare class AiChatbotComponent extends AiChatbotBase {
|
|
|
140
141
|
conversationsOpen: boolean;
|
|
141
142
|
showConversationRename: boolean;
|
|
142
143
|
showConversationDelete: boolean;
|
|
143
|
-
|
|
144
|
+
selectedThreadId: string | null;
|
|
144
145
|
protected _messageThreadRef: Ref<AiMessageThreadComponent>;
|
|
145
146
|
protected _promptRef: Ref<AiPromptComponent>;
|
|
146
147
|
protected _handleInfo(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unsafeCSS, html } from "lit";
|
|
2
|
-
import { property,
|
|
2
|
+
import { property, customElement } from "lit/decorators.js";
|
|
3
3
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
4
4
|
import { when } from "lit/directives/when.js";
|
|
5
5
|
import { AiChatbotBase } from "./ai-chatbot-base.mjs";
|
|
@@ -47,7 +47,7 @@ let AiChatbotComponent = class extends AiChatbotBase {
|
|
|
47
47
|
this.conversationsOpen = false;
|
|
48
48
|
this.showConversationRename = false;
|
|
49
49
|
this.showConversationDelete = false;
|
|
50
|
-
this.
|
|
50
|
+
this.selectedThreadId = null;
|
|
51
51
|
__privateAdd(this, _chatInterfaceRef, createRef());
|
|
52
52
|
this._messageThreadRef = createRef();
|
|
53
53
|
this._promptRef = createRef();
|
|
@@ -147,7 +147,7 @@ let AiChatbotComponent = class extends AiChatbotBase {
|
|
|
147
147
|
*/
|
|
148
148
|
startNewChat() {
|
|
149
149
|
super.startNewChat();
|
|
150
|
-
this.
|
|
150
|
+
this.selectedThreadId = null;
|
|
151
151
|
}
|
|
152
152
|
toggleConversations() {
|
|
153
153
|
if (this.conversationsOpen) {
|
|
@@ -213,7 +213,7 @@ let AiChatbotComponent = class extends AiChatbotBase {
|
|
|
213
213
|
<forge-ai-conversations-panel
|
|
214
214
|
${ref(__privateGet(this, _conversationsPanelRef))}
|
|
215
215
|
.recentThreads=${this.recentThreads}
|
|
216
|
-
.selectedThreadId=${this.
|
|
216
|
+
.selectedThreadId=${this.selectedThreadId}
|
|
217
217
|
?show-back-button=${true}
|
|
218
218
|
?show-conversation-rename=${this.showConversationRename}
|
|
219
219
|
?show-conversation-delete=${this.showConversationDelete}
|
|
@@ -275,7 +275,7 @@ handleConversationsToggle_fn = function() {
|
|
|
275
275
|
};
|
|
276
276
|
handleThreadSelect_fn = function(evt) {
|
|
277
277
|
const { id, title } = evt.detail;
|
|
278
|
-
this.
|
|
278
|
+
this.selectedThreadId = id;
|
|
279
279
|
this._dispatchHostEvent({
|
|
280
280
|
type: "forge-ai-chatbot-conversation-select",
|
|
281
281
|
detail: { id, title }
|
|
@@ -401,8 +401,8 @@ __decorateClass([
|
|
|
401
401
|
property({ type: Boolean, attribute: "show-conversation-delete" })
|
|
402
402
|
], AiChatbotComponent.prototype, "showConversationDelete", 2);
|
|
403
403
|
__decorateClass([
|
|
404
|
-
|
|
405
|
-
], AiChatbotComponent.prototype, "
|
|
404
|
+
property({ type: String, attribute: "selected-thread-id" })
|
|
405
|
+
], AiChatbotComponent.prototype, "selectedThreadId", 2);
|
|
406
406
|
AiChatbotComponent = __decorateClass([
|
|
407
407
|
customElement(AiChatbotComponentTagName)
|
|
408
408
|
], AiChatbotComponent);
|
|
@@ -4,7 +4,7 @@ export type { ForgeAiChatbotMessageEventData, ForgeAiChatbotToolCallEventData, F
|
|
|
4
4
|
export { AiChatbotToolCallComponent, AiChatbotToolCallComponentTagName } from './ai-chatbot-tool-call.js';
|
|
5
5
|
export type { Suggestion } from '../ai-suggestions/index.js';
|
|
6
6
|
export { AgentAdapter, type MessageStartEvent, type MessageDeltaEvent, type MessageEndEvent, type ToolCallEvent, type ToolCallStartEvent, type ToolCallArgsEvent, type ToolCallEndEvent, type FileUploadEvent, type FileRemoveEvent, type AdapterState, type ErrorEvent, type CustomAgentEvent, type RawAgentEvent, type RunStartedAgentEvent, type StepStartedAgentEvent, type StepFinishedAgentEvent, type StateSnapshotAgentEvent, type StateDeltaAgentEvent, type ActivitySnapshotAgentEvent, type ActivityDeltaAgentEvent } from './agent-adapter.js';
|
|
7
|
-
export type { Agent, ChatMessage, ContextItem, ToolDefinition, ToolCall, ToolRenderer, IToolRenderer, HandlerContext, ToolStartContext, ToolDeltaContext, ToolEndContext, FileAttachment, UploadedFileMetadata, FileUploadCallbacks, FileUploadHandler, FileRemoveCallbacks, ThreadState, FeedbackType, ResponseFeedback, MessageItem, ForgeAiChatbotContextRemoveEventData } from './types.js';
|
|
7
|
+
export type { Agent, ChatMessage, ContextItem, ToolDefinition, ToolCall, ToolRenderer, IToolRenderer, HandlerContext, ToolStartContext, ToolDeltaContext, ToolEndContext, FileAttachment, UploadedFileMetadata, FileUploadCallbacks, FileUploadHandler, FileRemoveCallbacks, ThreadState, FeedbackType, ResponseFeedback, MessageItem, ForgeAiChatbotContextRemoveEventData, ForgeAiChatbotConversationSelectEventData, ForgeAiChatbotConversationSearchEventData, ForgeAiChatbotConversationLoadMoreEventData, ForgeAiChatbotConversationRenameEventData, ForgeAiChatbotConversationDeleteEventData } from './types.js';
|
|
8
8
|
export * from './ag-ui-adapter.js';
|
|
9
9
|
export * from './http-agent-with-credentials.js';
|
|
10
10
|
export * from './event-emitter.js';
|
|
@@ -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);
|