@tylertech/forge-ai-react 0.7.0 → 0.7.2
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/ForgeAiActionsToolbar.d.ts +3 -0
- package/dist/ForgeAiActionsToolbar.js +2 -1
- package/dist/ForgeAiAssistantResponse.d.ts +2 -2
- package/dist/ForgeAiChatbot.d.ts +7 -1
- package/dist/ForgeAiChatbot.js +5 -0
- package/dist/ForgeAiPrompt.d.ts +5 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.js +10 -10
- package/package.json +3 -3
|
@@ -21,6 +21,9 @@ export interface ForgeAiActionsToolbarProps extends Pick<
|
|
|
21
21
|
/** undefined */
|
|
22
22
|
enableReactions?: boolean;
|
|
23
23
|
|
|
24
|
+
/** undefined */
|
|
25
|
+
feedbackType?: ForgeAiActionsToolbarElement["feedbackType"];
|
|
26
|
+
|
|
24
27
|
/** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
|
|
25
28
|
className?: string;
|
|
26
29
|
|
|
@@ -4,7 +4,7 @@ import { useEventListener } from "./react-utils.js";
|
|
|
4
4
|
|
|
5
5
|
export const ForgeAiActionsToolbar = forwardRef((props, forwardedRef) => {
|
|
6
6
|
const ref = useRef(null);
|
|
7
|
-
const { enableReactions, ...filteredProps } = props;
|
|
7
|
+
const { enableReactions, feedbackType, ...filteredProps } = props;
|
|
8
8
|
|
|
9
9
|
/** Event listeners - run once */
|
|
10
10
|
useEventListener(
|
|
@@ -30,6 +30,7 @@ export const ForgeAiActionsToolbar = forwardRef((props, forwardedRef) => {
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
...filteredProps,
|
|
33
|
+
"feedback-type": props.feedbackType || props["feedback-type"],
|
|
33
34
|
class: props.className,
|
|
34
35
|
exportparts: props.exportparts,
|
|
35
36
|
for: props.htmlFor,
|
|
@@ -57,12 +57,12 @@ export interface ForgeAiAssistantResponseProps extends Pick<
|
|
|
57
57
|
|
|
58
58
|
/** Fired when thumbs up is clicked */
|
|
59
59
|
onForgeAiAssistantResponseThumbsUp?: (
|
|
60
|
-
event: CustomEvent<CustomEvent<
|
|
60
|
+
event: CustomEvent<CustomEvent<ForgeAiAssistantResponseFeedbackEventData>>,
|
|
61
61
|
) => void;
|
|
62
62
|
|
|
63
63
|
/** Fired when thumbs down is clicked */
|
|
64
64
|
onForgeAiAssistantResponseThumbsDown?: (
|
|
65
|
-
event: CustomEvent<CustomEvent<
|
|
65
|
+
event: CustomEvent<CustomEvent<ForgeAiAssistantResponseFeedbackEventData>>,
|
|
66
66
|
) => void;
|
|
67
67
|
}
|
|
68
68
|
|
package/dist/ForgeAiChatbot.d.ts
CHANGED
|
@@ -117,6 +117,11 @@ export interface ForgeAiChatbotProps extends Pick<
|
|
|
117
117
|
|
|
118
118
|
/** Fired when header info option is selected */
|
|
119
119
|
onForgeAiChatbotInfo?: (event: CustomEvent<CustomEvent<void>>) => void;
|
|
120
|
+
|
|
121
|
+
/** Fired when user provides feedback on a response (thumbs up/down) */
|
|
122
|
+
onForgeAiChatbotResponseFeedback?: (
|
|
123
|
+
event: CustomEvent<CustomEvent<ForgeAiChatbotResponseFeedbackEventData>>,
|
|
124
|
+
) => void;
|
|
120
125
|
}
|
|
121
126
|
|
|
122
127
|
/**
|
|
@@ -135,6 +140,7 @@ export interface ForgeAiChatbotProps extends Pick<
|
|
|
135
140
|
* - **forge-ai-chatbot-minimize** - Fired when header minimize button is clicked
|
|
136
141
|
* - **forge-ai-chatbot-clear** - Fired when header clear option is selected (cancelable, prevents clearMessages() if default prevented)
|
|
137
142
|
* - **forge-ai-chatbot-info** - Fired when header info option is selected
|
|
143
|
+
* - **forge-ai-chatbot-response-feedback** - Fired when user provides feedback on a response (thumbs up/down)
|
|
138
144
|
*
|
|
139
145
|
* ### **Methods:**
|
|
140
146
|
* - **clearMessages(): _void_** - Clears all messages from the chat history.
|
|
@@ -144,7 +150,7 @@ export interface ForgeAiChatbotProps extends Pick<
|
|
|
144
150
|
* - **abort(): _void_** - Aborts the current streaming response.
|
|
145
151
|
* - **scrollToBottom({ behavior }: _{ behavior?: ScrollBehavior }_): _Promise<void>_** - Scrolls the chat interface to the bottom.
|
|
146
152
|
* - **getThreadState(): __** - Gets the complete serializable thread state including threadId and messages.
|
|
147
|
-
* - **setThreadState(state: _ThreadState_):
|
|
153
|
+
* - **setThreadState(state: _ThreadState_): _Promise<void>_** - Restores thread state from a serialized ThreadState object.
|
|
148
154
|
*
|
|
149
155
|
* ### **Slots:**
|
|
150
156
|
* - **header** - Slot for custom header content
|
package/dist/ForgeAiChatbot.js
CHANGED
|
@@ -60,6 +60,11 @@ export const ForgeAiChatbot = forwardRef((props, forwardedRef) => {
|
|
|
60
60
|
);
|
|
61
61
|
useEventListener(ref, "forge-ai-chatbot-clear", props.onForgeAiChatbotClear);
|
|
62
62
|
useEventListener(ref, "forge-ai-chatbot-info", props.onForgeAiChatbotInfo);
|
|
63
|
+
useEventListener(
|
|
64
|
+
ref,
|
|
65
|
+
"forge-ai-chatbot-response-feedback",
|
|
66
|
+
props.onForgeAiChatbotResponseFeedback,
|
|
67
|
+
);
|
|
63
68
|
|
|
64
69
|
return React.createElement(
|
|
65
70
|
"forge-ai-chatbot",
|
package/dist/ForgeAiPrompt.d.ts
CHANGED
|
@@ -114,7 +114,11 @@ export interface ForgeAiPromptProps extends Pick<
|
|
|
114
114
|
* - **forge-ai-prompt-debug-toggle** - Fired when the debug icon button is clicked.
|
|
115
115
|
*
|
|
116
116
|
* ### **Methods:**
|
|
117
|
-
* - **
|
|
117
|
+
* - **addToHistory(message: _string_): _void_** - Adds a message to the input history for up/down arrow navigation.
|
|
118
|
+
* Use this when sending messages externally (e.g., from suggestions).
|
|
119
|
+
* - **setHistory(messages: _string[]_): _void_** - Replaces the entire message history with the provided messages.
|
|
120
|
+
* Use this when restoring thread state from persistence.
|
|
121
|
+
* - **closeSlashMenu(): _void_** - Closes the slash command menu
|
|
118
122
|
* - **focus(): _void_** - Focuses the textarea element
|
|
119
123
|
*
|
|
120
124
|
* ### **Slots:**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export * from "./ForgeAiActionsToolbar.js";
|
|
2
|
-
export * from "./ForgeAiArtifact.js";
|
|
3
2
|
export * from "./ForgeAiAgentInfo.js";
|
|
4
|
-
export * from "./
|
|
3
|
+
export * from "./ForgeAiArtifact.js";
|
|
4
|
+
export * from "./ForgeAiAssistantResponse.js";
|
|
5
5
|
export * from "./ForgeAiAttachment.js";
|
|
6
|
+
export * from "./ForgeAiButton.js";
|
|
6
7
|
export * from "./ForgeAiChatHeader.js";
|
|
7
|
-
export * from "./ForgeAiAssistantResponse.js";
|
|
8
8
|
export * from "./ForgeAiChainOfThought.js";
|
|
9
9
|
export * from "./ForgeAiChatInterface.js";
|
|
10
|
+
export * from "./ForgeAiConfirmationPrompt.js";
|
|
10
11
|
export * from "./ForgeAiChatbotToolCall.js";
|
|
11
12
|
export * from "./ForgeAiChatbot.js";
|
|
12
|
-
export * from "./ForgeAiConfirmationPrompt.js";
|
|
13
13
|
export * from "./ForgeAiDialog.js";
|
|
14
14
|
export * from "./ForgeAiDropdownMenuItemGroup.js";
|
|
15
15
|
export * from "./ForgeAiDropdownMenuItem.js";
|
|
@@ -24,22 +24,22 @@ export * from "./ForgeAiFilePicker.js";
|
|
|
24
24
|
export * from "./ForgeAiFloatingChat.js";
|
|
25
25
|
export * from "./ForgeAiGradientContainer.js";
|
|
26
26
|
export * from "./ForgeAiIcon.js";
|
|
27
|
-
export * from "./ForgeAiIconButton.js";
|
|
28
27
|
export * from "./ForgeAiMessageThread.js";
|
|
28
|
+
export * from "./ForgeAiIconButton.js";
|
|
29
29
|
export * from "./ForgeAiModal.js";
|
|
30
30
|
export * from "./ForgeAiPrompt.js";
|
|
31
|
-
export * from "./ForgeAiReasoning.js";
|
|
32
31
|
export * from "./ForgeAiReasoningHeader.js";
|
|
32
|
+
export * from "./ForgeAiReasoning.js";
|
|
33
33
|
export * from "./ForgeAiResponseMessage.js";
|
|
34
34
|
export * from "./ForgeAiSidebar.js";
|
|
35
35
|
export * from "./ForgeAiSidebarChat.js";
|
|
36
|
-
export * from "./ForgeAiSpinner.js";
|
|
37
36
|
export * from "./ForgeAiSlashCommandMenu.js";
|
|
37
|
+
export * from "./ForgeAiSpinner.js";
|
|
38
38
|
export * from "./ForgeAiSuggestions.js";
|
|
39
|
-
export * from "./ForgeAiThreads.js";
|
|
40
39
|
export * from "./ForgeAiThinkingIndicator.js";
|
|
41
|
-
export * from "./
|
|
40
|
+
export * from "./ForgeAiThreads.js";
|
|
42
41
|
export * from "./ForgeAiVoiceInput.js";
|
|
42
|
+
export * from "./ForgeAiUserMessage.js";
|
|
43
43
|
export * from "./ForgeAiThoughtBase.js";
|
|
44
44
|
export * from "./ForgeAiThoughtDetail.js";
|
|
45
45
|
export * from "./ForgeAiThoughtImage.js";
|
|
@@ -48,6 +48,6 @@ export * from "./ForgePromptButton.js";
|
|
|
48
48
|
export * from "./ForgeAiReasoningContent.js";
|
|
49
49
|
export * from "./ForgeAiOverlay.js";
|
|
50
50
|
export * from "./ForgeAiPopover.js";
|
|
51
|
-
export * from "./ForgeAiToolDataTable.js";
|
|
52
51
|
export * from "./ForgeAiTooltip.js";
|
|
52
|
+
export * from "./ForgeAiToolDataTable.js";
|
|
53
53
|
export * from "./ForgeAiPaginator.js";
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export * from "./ForgeAiActionsToolbar.js";
|
|
2
|
-
export * from "./ForgeAiArtifact.js";
|
|
3
2
|
export * from "./ForgeAiAgentInfo.js";
|
|
4
|
-
export * from "./
|
|
3
|
+
export * from "./ForgeAiArtifact.js";
|
|
4
|
+
export * from "./ForgeAiAssistantResponse.js";
|
|
5
5
|
export * from "./ForgeAiAttachment.js";
|
|
6
|
+
export * from "./ForgeAiButton.js";
|
|
6
7
|
export * from "./ForgeAiChatHeader.js";
|
|
7
|
-
export * from "./ForgeAiAssistantResponse.js";
|
|
8
8
|
export * from "./ForgeAiChainOfThought.js";
|
|
9
9
|
export * from "./ForgeAiChatInterface.js";
|
|
10
|
+
export * from "./ForgeAiConfirmationPrompt.js";
|
|
10
11
|
export * from "./ForgeAiChatbotToolCall.js";
|
|
11
12
|
export * from "./ForgeAiChatbot.js";
|
|
12
|
-
export * from "./ForgeAiConfirmationPrompt.js";
|
|
13
13
|
export * from "./ForgeAiDialog.js";
|
|
14
14
|
export * from "./ForgeAiDropdownMenuItemGroup.js";
|
|
15
15
|
export * from "./ForgeAiDropdownMenuItem.js";
|
|
@@ -24,22 +24,22 @@ export * from "./ForgeAiFilePicker.js";
|
|
|
24
24
|
export * from "./ForgeAiFloatingChat.js";
|
|
25
25
|
export * from "./ForgeAiGradientContainer.js";
|
|
26
26
|
export * from "./ForgeAiIcon.js";
|
|
27
|
-
export * from "./ForgeAiIconButton.js";
|
|
28
27
|
export * from "./ForgeAiMessageThread.js";
|
|
28
|
+
export * from "./ForgeAiIconButton.js";
|
|
29
29
|
export * from "./ForgeAiModal.js";
|
|
30
30
|
export * from "./ForgeAiPrompt.js";
|
|
31
|
-
export * from "./ForgeAiReasoning.js";
|
|
32
31
|
export * from "./ForgeAiReasoningHeader.js";
|
|
32
|
+
export * from "./ForgeAiReasoning.js";
|
|
33
33
|
export * from "./ForgeAiResponseMessage.js";
|
|
34
34
|
export * from "./ForgeAiSidebar.js";
|
|
35
35
|
export * from "./ForgeAiSidebarChat.js";
|
|
36
|
-
export * from "./ForgeAiSpinner.js";
|
|
37
36
|
export * from "./ForgeAiSlashCommandMenu.js";
|
|
37
|
+
export * from "./ForgeAiSpinner.js";
|
|
38
38
|
export * from "./ForgeAiSuggestions.js";
|
|
39
|
-
export * from "./ForgeAiThreads.js";
|
|
40
39
|
export * from "./ForgeAiThinkingIndicator.js";
|
|
41
|
-
export * from "./
|
|
40
|
+
export * from "./ForgeAiThreads.js";
|
|
42
41
|
export * from "./ForgeAiVoiceInput.js";
|
|
42
|
+
export * from "./ForgeAiUserMessage.js";
|
|
43
43
|
export * from "./ForgeAiThoughtBase.js";
|
|
44
44
|
export * from "./ForgeAiThoughtDetail.js";
|
|
45
45
|
export * from "./ForgeAiThoughtImage.js";
|
|
@@ -48,6 +48,6 @@ export * from "./ForgePromptButton.js";
|
|
|
48
48
|
export * from "./ForgeAiReasoningContent.js";
|
|
49
49
|
export * from "./ForgeAiOverlay.js";
|
|
50
50
|
export * from "./ForgeAiPopover.js";
|
|
51
|
-
export * from "./ForgeAiToolDataTable.js";
|
|
52
51
|
export * from "./ForgeAiTooltip.js";
|
|
52
|
+
export * from "./ForgeAiToolDataTable.js";
|
|
53
53
|
export * from "./ForgeAiPaginator.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tylertech/forge-ai-react",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "A React adapter for Tyler Forge™ AI Web Components.",
|
|
5
5
|
"repository": "tyler-technologies-oss/forge-ai",
|
|
6
6
|
"author": "Tyler Technologies, Inc.",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"react": ">=17.0.0",
|
|
19
|
-
"@tylertech/forge-ai": "^0.7.
|
|
19
|
+
"@tylertech/forge-ai": "^0.7.3"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@repo/prettier-config": "",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"typescript": "~5.8.3",
|
|
45
45
|
"vite": "7.3.0",
|
|
46
46
|
"vite-tsconfig-paths": "6.0.3",
|
|
47
|
-
"@tylertech/forge-ai": "^0.7.
|
|
47
|
+
"@tylertech/forge-ai": "^0.7.3"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"predev": "pnpm run build",
|