@uipath/ui-widgets-conversational-agent-chat 1.0.0-beta.1
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/README.md +165 -0
- package/dist/ConversationalAgentChat.css +22 -0
- package/dist/ConversationalAgentChat.d.ts +4 -0
- package/dist/ConversationalAgentChat.d.ts.map +1 -0
- package/dist/ConversationalAgentChat.js +426 -0
- package/dist/ConversationalAgentChat.js.map +1 -0
- package/dist/ConversationalAgentChat.stories.d.ts +80 -0
- package/dist/ConversationalAgentChat.stories.d.ts.map +1 -0
- package/dist/ConversationalAgentChat.stories.js +172 -0
- package/dist/ConversationalAgentChat.stories.js.map +1 -0
- package/dist/components/FeedbackDialog.d.ts +9 -0
- package/dist/components/FeedbackDialog.d.ts.map +1 -0
- package/dist/components/FeedbackDialog.js +16 -0
- package/dist/components/FeedbackDialog.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +29 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +21 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/telemetryUtils.d.ts +3 -0
- package/dist/utils/telemetryUtils.d.ts.map +1 -0
- package/dist/utils/telemetryUtils.js +10 -0
- package/dist/utils/telemetryUtils.js.map +1 -0
- package/dist/utils.d.ts +12 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +167 -0
- package/dist/utils.js.map +1 -0
- package/package.json +71 -0
package/README.md
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# Conversational Agent Chat Widget
|
|
2
|
+
|
|
3
|
+
A React component that provides a conversational AI chat interface powered by UiPath Conversational Agents. Built on top of UiPath Apollo React components, this widget enables seamless integration of AI-powered chat functionality into your applications.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Real-time streaming responses from conversational agents
|
|
8
|
+
- Tool call visualization and tracking
|
|
9
|
+
- Support for side-by-side and embedded chat modes
|
|
10
|
+
- Customizable welcome experience with suggestions
|
|
11
|
+
- Automatic conversation and session management
|
|
12
|
+
- Multi-conversation support with "New Chat" functionality
|
|
13
|
+
- Built with TypeScript for type safety
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @uipath/ui-widgets-conversational-agent-chat
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Peer Dependencies
|
|
22
|
+
|
|
23
|
+
This package requires the following peer dependencies:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install react@^19.2.0 react-dom@^19.2.0 @uipath/uipath-typescript
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
### Basic Example
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import { ConversationalAgentChat } from "@uipath/ui-widgets-conversational-agent-chat";
|
|
35
|
+
import "@uipath/ui-widgets-conversational-agent-chat/ConversationalAgentChat.css";
|
|
36
|
+
import { UiPath } from "@uipath/uipath-typescript/core";
|
|
37
|
+
|
|
38
|
+
function App() {
|
|
39
|
+
const sdk = new UiPath({
|
|
40
|
+
// Your UiPath SDK configuration
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
return <ConversationalAgentChat sdk={sdk} agentId={123} folderId={456} />;
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Customized Example
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
import { ConversationalAgentChat } from "@uipath/ui-widgets-conversational-agent-chat";
|
|
51
|
+
import "@uipath/ui-widgets-conversational-agent-chat/ConversationalAgentChat.css";
|
|
52
|
+
import { AutopilotChatMode } from "@uipath/apollo-react/material/components";
|
|
53
|
+
|
|
54
|
+
function App() {
|
|
55
|
+
const sdk = new UiPath({
|
|
56
|
+
// Your UiPath SDK configuration
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<ConversationalAgentChat
|
|
61
|
+
sdk={sdk}
|
|
62
|
+
agentId={123}
|
|
63
|
+
folderId={456}
|
|
64
|
+
mode={AutopilotChatMode.SideBySide}
|
|
65
|
+
title="Custom Chat Title"
|
|
66
|
+
description="Ask me anything about your business data."
|
|
67
|
+
/>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## API Reference
|
|
73
|
+
|
|
74
|
+
### Props
|
|
75
|
+
|
|
76
|
+
| Prop | Type | Required | Default | Description |
|
|
77
|
+
| ------------- | ------------------- | -------- | ------------------------------------------------------------------- | ------------------------------------------------- |
|
|
78
|
+
| `sdk` | `UiPath` | Yes | - | UiPath SDK instance for API communication |
|
|
79
|
+
| `agentId` | `number` | Yes | - | The ID of the conversational agent release to use |
|
|
80
|
+
| `folderId` | `number` | Yes | - | The folder ID where conversations will be stored |
|
|
81
|
+
| `mode` | `AutopilotChatMode` | No | `AutopilotChatMode.SideBySide` | Chat display mode (SideBySide or Embedded) |
|
|
82
|
+
| `title` | `string` | No | `'Welcome to UiPath Autopilot Chat!'` | Title displayed in the first-run experience |
|
|
83
|
+
| `description` | `string` | No | `'Ask me anything about your data or how to use this application.'` | Description shown in the first-run experience |
|
|
84
|
+
|
|
85
|
+
### Chat Modes
|
|
86
|
+
|
|
87
|
+
The component supports different display modes via the `mode` prop:
|
|
88
|
+
|
|
89
|
+
- `AutopilotChatMode.SideBySide` - Displays the chat in a side panel
|
|
90
|
+
- `AutopilotChatMode.Embedded` - Embeds the chat inline within your layout
|
|
91
|
+
|
|
92
|
+
## Features in Detail
|
|
93
|
+
|
|
94
|
+
### Streaming Responses
|
|
95
|
+
|
|
96
|
+
The component supports real-time streaming of AI responses, providing a smooth conversational experience as the agent generates its reply.
|
|
97
|
+
|
|
98
|
+
### Tool Call Tracking
|
|
99
|
+
|
|
100
|
+
When the conversational agent uses tools, the component automatically displays:
|
|
101
|
+
|
|
102
|
+
- Tool name and input parameters
|
|
103
|
+
- Execution status
|
|
104
|
+
- Output results
|
|
105
|
+
- Error handling
|
|
106
|
+
|
|
107
|
+
### Session Management
|
|
108
|
+
|
|
109
|
+
The widget automatically handles:
|
|
110
|
+
|
|
111
|
+
- Conversation creation and persistence
|
|
112
|
+
- Session initialization and maintenance
|
|
113
|
+
- Multiple conversation support via "New Chat"
|
|
114
|
+
|
|
115
|
+
## Styling
|
|
116
|
+
|
|
117
|
+
The component comes with default styles. Import the CSS file in your application:
|
|
118
|
+
|
|
119
|
+
```tsx
|
|
120
|
+
import "@uipath/ui-widgets-conversational-agent-chat/ConversationalAgentChat.css";
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The chat interface supports both light and dark themes through the UiPath Apollo design system.
|
|
124
|
+
|
|
125
|
+
## Development
|
|
126
|
+
|
|
127
|
+
### Install Dependencies
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
npm install
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Build the Package
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
npm run build
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Run Tests
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Run tests once
|
|
143
|
+
npm test
|
|
144
|
+
|
|
145
|
+
# Run tests in watch mode
|
|
146
|
+
npm run test:watch
|
|
147
|
+
|
|
148
|
+
# Run tests with UI
|
|
149
|
+
npm run test:ui
|
|
150
|
+
|
|
151
|
+
# Run tests with coverage
|
|
152
|
+
npm run test:coverage
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## TypeScript Support
|
|
156
|
+
|
|
157
|
+
This package is written in TypeScript and includes type definitions. Import types as needed:
|
|
158
|
+
|
|
159
|
+
```tsx
|
|
160
|
+
import type { ConversationalAgentChatProps } from "@uipath/ui-widgets-conversational-agent-chat";
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## License
|
|
164
|
+
|
|
165
|
+
MIT
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@import "@uipath/apollo-react/core/fonts/font.css";
|
|
2
|
+
@import "@uipath/apollo-wind/tailwind.css";
|
|
3
|
+
@source "../node_modules/@uipath/apollo-wind/dist/**/*.js";
|
|
4
|
+
@source "../../../node_modules/@uipath/apollo-wind/dist/**/*.js";
|
|
5
|
+
.uipath-conversational-agent-chat {
|
|
6
|
+
width: 440px;
|
|
7
|
+
height: 100%;
|
|
8
|
+
min-height: 600px;
|
|
9
|
+
border: 1px solid var(--color-border-de-emp);
|
|
10
|
+
text-align: left;
|
|
11
|
+
}
|
|
12
|
+
.uipath-conversational-agent-chat .info-container {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
gap: 16px;
|
|
18
|
+
height: 100%;
|
|
19
|
+
padding: 24px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvbnZlcnNhdGlvbmFsQWdlbnRDaGF0LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsImZpbGUiOiJDb252ZXJzYXRpb25hbEFnZW50Q2hhdC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyJAaW1wb3J0IFwiQHVpcGF0aC9hcG9sbG8tcmVhY3QvY29yZS9mb250cy9mb250LmNzc1wiO1xuQGltcG9ydCBcIkB1aXBhdGgvYXBvbGxvLXdpbmQvdGFpbHdpbmQuY3NzXCI7XG5Ac291cmNlIFwiLi4vbm9kZV9tb2R1bGVzL0B1aXBhdGgvYXBvbGxvLXdpbmQvZGlzdC8qKi8qLmpzXCI7XG5Ac291cmNlIFwiLi4vLi4vLi4vbm9kZV9tb2R1bGVzL0B1aXBhdGgvYXBvbGxvLXdpbmQvZGlzdC8qKi8qLmpzXCI7XG4udWlwYXRoLWNvbnZlcnNhdGlvbmFsLWFnZW50LWNoYXQge1xuICB3aWR0aDogNDQwcHg7XG4gIGhlaWdodDogMTAwJTtcbiAgbWluLWhlaWdodDogNjAwcHg7XG4gIGJvcmRlcjogMXB4IHNvbGlkIHZhcigtLWNvbG9yLWJvcmRlci1kZS1lbXApO1xuICB0ZXh0LWFsaWduOiBsZWZ0O1xufVxuLnVpcGF0aC1jb252ZXJzYXRpb25hbC1hZ2VudC1jaGF0IC5pbmZvLWNvbnRhaW5lciB7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG4gIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gIGp1c3RpZnktY29udGVudDogY2VudGVyO1xuICBnYXA6IDE2cHg7XG4gIGhlaWdodDogMTAwJTtcbiAgcGFkZGluZzogMjRweDtcbn1cbiJdfQ== */
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "./ConversationalAgentChat.css";
|
|
2
|
+
import { ConversationalAgentChatProps } from "./types";
|
|
3
|
+
export declare const ConversationalAgentChat: ({ sdk, agentId, folderId, }: ConversationalAgentChatProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=ConversationalAgentChat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConversationalAgentChat.d.ts","sourceRoot":"","sources":["../src/ConversationalAgentChat.tsx"],"names":[],"mappings":"AA2BA,OAAO,+BAA+B,CAAC;AACvC,OAAO,EAEL,4BAA4B,EAI7B,MAAM,SAAS,CAAC;AAUjB,eAAO,MAAM,uBAAuB,GAAI,6BAIrC,4BAA4B,4CA0iB9B,CAAC"}
|
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ApChat, AutopilotChatEvent, AutopilotChatMode, AutopilotChatService, } from "@uipath/apollo-react/material/components";
|
|
3
|
+
import { Alert, AlertDescription, Button } from "@uipath/apollo-wind";
|
|
4
|
+
import { ConversationalAgent, FeedbackRating, SortOrder, } from "@uipath/uipath-typescript/conversational-agent";
|
|
5
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
6
|
+
import { FeedbackDialog } from "./components/FeedbackDialog";
|
|
7
|
+
import "./ConversationalAgentChat.css";
|
|
8
|
+
import { TelemetryEvent, MessageWidget, TelemetryStatus, } from "./types";
|
|
9
|
+
import { convertAttachmentToFile, createFileKey, getConversationHistoryDisplayItems, mapExchangesToChatMessages, normalizeInput, } from "./utils";
|
|
10
|
+
import { trackTelemetry } from "./utils/telemetryUtils";
|
|
11
|
+
export const ConversationalAgentChat = ({ sdk, agentId, folderId, }) => {
|
|
12
|
+
const agentService = useRef(new ConversationalAgent(sdk));
|
|
13
|
+
const currentConversation = useRef(null);
|
|
14
|
+
const initializedFor = useRef(null);
|
|
15
|
+
const session = useRef(null);
|
|
16
|
+
const pastConversations = useRef([]);
|
|
17
|
+
const uploadedAttachments = useRef(new Map());
|
|
18
|
+
const conversationsCursor = useRef(undefined);
|
|
19
|
+
const [chatService, setChatService] = useState();
|
|
20
|
+
const [error, setError] = useState(null);
|
|
21
|
+
const activeExchange = useRef(null);
|
|
22
|
+
const [feedbackDialogOpen, setFeedbackDialogOpen] = useState(false);
|
|
23
|
+
const pendingFeedback = useRef(null);
|
|
24
|
+
const setupExchangeHandlers = useCallback((exchange) => {
|
|
25
|
+
if (!chatService)
|
|
26
|
+
return;
|
|
27
|
+
exchange.onErrorStart((error) => {
|
|
28
|
+
trackTelemetry(TelemetryEvent.SendMessage, TelemetryStatus.Error, {
|
|
29
|
+
error: error.message,
|
|
30
|
+
});
|
|
31
|
+
chatService.setError(error.message || "Something went wrong. Please try again.");
|
|
32
|
+
});
|
|
33
|
+
exchange.onMessageStart((message) => {
|
|
34
|
+
if (message.startEvent.role === "assistant") {
|
|
35
|
+
const messageId = message.messageId;
|
|
36
|
+
const messageTimestamp = message.startEvent.timestamp;
|
|
37
|
+
message.onContentPartStart((contentPart) => {
|
|
38
|
+
if (contentPart.startEvent.mimeType.startsWith("text/")) {
|
|
39
|
+
let fullResponse = "";
|
|
40
|
+
contentPart.onChunk((chunk) => {
|
|
41
|
+
fullResponse += chunk.data;
|
|
42
|
+
chatService.sendResponse({
|
|
43
|
+
id: messageId,
|
|
44
|
+
content: chunk.data,
|
|
45
|
+
created_at: messageTimestamp,
|
|
46
|
+
widget: MessageWidget.AI,
|
|
47
|
+
stream: true,
|
|
48
|
+
done: false,
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
contentPart.onContentPartEnd(() => {
|
|
52
|
+
chatService.sendResponse({
|
|
53
|
+
id: messageId,
|
|
54
|
+
content: fullResponse,
|
|
55
|
+
created_at: messageTimestamp,
|
|
56
|
+
widget: MessageWidget.AI,
|
|
57
|
+
stream: false,
|
|
58
|
+
done: true,
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
message.onToolCallStart((toolCall) => {
|
|
64
|
+
const startEvent = toolCall.startEvent;
|
|
65
|
+
const startTimeIso = new Date().toISOString();
|
|
66
|
+
const toolInput = startEvent.input
|
|
67
|
+
? normalizeInput(startEvent.input)
|
|
68
|
+
: {};
|
|
69
|
+
chatService.sendResponse({
|
|
70
|
+
id: toolCall.toolCallId,
|
|
71
|
+
content: `Performing ${startEvent.toolName}`,
|
|
72
|
+
created_at: startTimeIso,
|
|
73
|
+
widget: MessageWidget.ApolloAgentsToolCall,
|
|
74
|
+
meta: {
|
|
75
|
+
toolName: startEvent.toolName,
|
|
76
|
+
input: toolInput,
|
|
77
|
+
startTime: startTimeIso,
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
toolCall.onToolCallEnd((endEvent) => {
|
|
81
|
+
const endTimeIso = new Date().toISOString();
|
|
82
|
+
chatService.sendResponse({
|
|
83
|
+
id: toolCall.toolCallId,
|
|
84
|
+
content: `Performing ${startEvent.toolName}`,
|
|
85
|
+
created_at: endTimeIso,
|
|
86
|
+
widget: MessageWidget.ApolloAgentsToolCall,
|
|
87
|
+
meta: {
|
|
88
|
+
toolName: startEvent.toolName,
|
|
89
|
+
input: toolInput,
|
|
90
|
+
startTime: startTimeIso,
|
|
91
|
+
output: endEvent.output,
|
|
92
|
+
endTime: endTimeIso,
|
|
93
|
+
isError: endEvent.isError,
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
exchange.onExchangeEnd(() => {
|
|
101
|
+
activeExchange.current = null;
|
|
102
|
+
chatService.sendOutputStreamEvent({ turnComplete: true });
|
|
103
|
+
chatService.stopResponse();
|
|
104
|
+
chatService.setShowLoading(false);
|
|
105
|
+
chatService.setWaiting(false);
|
|
106
|
+
});
|
|
107
|
+
}, [chatService]);
|
|
108
|
+
const getConversation = useCallback(async () => {
|
|
109
|
+
if (currentConversation.current) {
|
|
110
|
+
return currentConversation.current;
|
|
111
|
+
}
|
|
112
|
+
const newConversation = await agentService.current.conversations.create(agentId, folderId);
|
|
113
|
+
currentConversation.current = newConversation;
|
|
114
|
+
return newConversation;
|
|
115
|
+
}, [agentId, folderId]);
|
|
116
|
+
const getSessionHelper = useCallback(async () => {
|
|
117
|
+
if (session.current) {
|
|
118
|
+
return session.current;
|
|
119
|
+
}
|
|
120
|
+
const conversation = await getConversation();
|
|
121
|
+
const sessionHelper = agentService.current.conversations.startSession(conversation.id, { echo: false });
|
|
122
|
+
return new Promise((resolve) => {
|
|
123
|
+
sessionHelper.onSessionStarted(() => {
|
|
124
|
+
session.current = sessionHelper;
|
|
125
|
+
resolve(sessionHelper);
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
}, [getConversation]);
|
|
129
|
+
const onNewChat = useCallback(() => {
|
|
130
|
+
currentConversation.current = null;
|
|
131
|
+
session.current = null;
|
|
132
|
+
activeExchange.current = null;
|
|
133
|
+
trackTelemetry(TelemetryEvent.NewChat, TelemetryStatus.Success);
|
|
134
|
+
}, []);
|
|
135
|
+
const onHistoryLoadMore = useCallback(async () => {
|
|
136
|
+
if (!chatService)
|
|
137
|
+
return;
|
|
138
|
+
if (!conversationsCursor.current) {
|
|
139
|
+
chatService.appendOlderHistoryItems([], true);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
const result = await agentService.current.conversations.getAll({
|
|
143
|
+
sort: SortOrder.Descending,
|
|
144
|
+
pageSize: 20,
|
|
145
|
+
cursor: conversationsCursor.current,
|
|
146
|
+
});
|
|
147
|
+
conversationsCursor.current = result.nextCursor;
|
|
148
|
+
pastConversations.current = [...pastConversations.current, ...result.items];
|
|
149
|
+
chatService.appendOlderHistoryItems(getConversationHistoryDisplayItems(result.items), !result.hasNextPage);
|
|
150
|
+
}, [chatService]);
|
|
151
|
+
const onClickDeleteConversation = useCallback(async (id) => {
|
|
152
|
+
if (!chatService)
|
|
153
|
+
return;
|
|
154
|
+
await agentService.current.conversations.deleteById(id);
|
|
155
|
+
pastConversations.current = pastConversations.current.filter((c) => c.id !== id);
|
|
156
|
+
chatService.setHistory(getConversationHistoryDisplayItems(pastConversations.current));
|
|
157
|
+
if (currentConversation.current?.id === id) {
|
|
158
|
+
onNewChat();
|
|
159
|
+
}
|
|
160
|
+
}, [chatService, onNewChat]);
|
|
161
|
+
const onSendMessage = useCallback(async (data) => {
|
|
162
|
+
try {
|
|
163
|
+
const sessionHelper = await getSessionHelper();
|
|
164
|
+
const exchange = sessionHelper.startExchange();
|
|
165
|
+
activeExchange.current = exchange;
|
|
166
|
+
setupExchangeHandlers(exchange);
|
|
167
|
+
const message = exchange.startMessage({});
|
|
168
|
+
await message.sendContentPart({
|
|
169
|
+
mimeType: "text/plain",
|
|
170
|
+
data: data.content,
|
|
171
|
+
});
|
|
172
|
+
for (const attachment of data.attachments || []) {
|
|
173
|
+
const key = createFileKey(attachment);
|
|
174
|
+
const attachmentOutput = uploadedAttachments.current.get(key);
|
|
175
|
+
if (attachmentOutput) {
|
|
176
|
+
const part = message.startContentPart({
|
|
177
|
+
name: attachmentOutput.name,
|
|
178
|
+
mimeType: attachmentOutput.mimeType,
|
|
179
|
+
externalValue: {
|
|
180
|
+
uri: attachmentOutput.uri,
|
|
181
|
+
},
|
|
182
|
+
});
|
|
183
|
+
part.sendContentPartEnd();
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
message.sendMessageEnd();
|
|
187
|
+
trackTelemetry(TelemetryEvent.SendMessage, TelemetryStatus.Success);
|
|
188
|
+
}
|
|
189
|
+
catch (err) {
|
|
190
|
+
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
191
|
+
trackTelemetry(TelemetryEvent.SendMessage, TelemetryStatus.Error, {
|
|
192
|
+
error: errorMessage,
|
|
193
|
+
});
|
|
194
|
+
chatService?.setError(`Failed to send message: ${errorMessage}`);
|
|
195
|
+
}
|
|
196
|
+
}, [chatService, getSessionHelper, setupExchangeHandlers]);
|
|
197
|
+
const processAttachmentsInBatch = useCallback(async (attachmentBatch) => {
|
|
198
|
+
if (!chatService)
|
|
199
|
+
return;
|
|
200
|
+
const batchPromises = attachmentBatch.map(async (attachment) => {
|
|
201
|
+
try {
|
|
202
|
+
const file = convertAttachmentToFile(attachment);
|
|
203
|
+
const conversation = await getConversation();
|
|
204
|
+
const attachmentOutput = await agentService.current.conversations.uploadAttachment(conversation.id, file);
|
|
205
|
+
const key = createFileKey(attachment);
|
|
206
|
+
uploadedAttachments.current.set(key, attachmentOutput);
|
|
207
|
+
return { attachment, success: true, error: null };
|
|
208
|
+
}
|
|
209
|
+
catch (error) {
|
|
210
|
+
// Clear loading state on error
|
|
211
|
+
chatService.setAttachmentsLoading([
|
|
212
|
+
{ ...attachment, loading: false },
|
|
213
|
+
]);
|
|
214
|
+
return { attachment, success: false, error };
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
return await Promise.all(batchPromises);
|
|
218
|
+
}, [chatService, getConversation]);
|
|
219
|
+
const onSetAttachments = useCallback(async ({ added }) => {
|
|
220
|
+
if (!chatService)
|
|
221
|
+
return;
|
|
222
|
+
if (added.length > 0) {
|
|
223
|
+
// Filter out already uploaded files
|
|
224
|
+
const newAttachments = added.filter((attachment) => {
|
|
225
|
+
const key = createFileKey(attachment);
|
|
226
|
+
return !uploadedAttachments.current.has(key);
|
|
227
|
+
});
|
|
228
|
+
if (newAttachments.length > 0) {
|
|
229
|
+
chatService.setAttachmentsLoading(newAttachments.map((attachment) => ({
|
|
230
|
+
...attachment,
|
|
231
|
+
loading: true,
|
|
232
|
+
})));
|
|
233
|
+
const BATCH_SIZE = 3;
|
|
234
|
+
const results = [];
|
|
235
|
+
for (let i = 0; i < newAttachments.length; i += BATCH_SIZE) {
|
|
236
|
+
const batch = newAttachments.slice(i, i + BATCH_SIZE);
|
|
237
|
+
const batchResults = await processAttachmentsInBatch(batch);
|
|
238
|
+
results.push(...(batchResults || []));
|
|
239
|
+
chatService.setAttachmentsLoading(batch.map((attachment) => ({
|
|
240
|
+
...attachment,
|
|
241
|
+
loading: false,
|
|
242
|
+
})));
|
|
243
|
+
}
|
|
244
|
+
// Handle any failed uploads
|
|
245
|
+
const failedUploads = results.filter((result) => !result.success);
|
|
246
|
+
if (failedUploads.length > 0) {
|
|
247
|
+
chatService.setError("Failed to upload attachments. Please try again.");
|
|
248
|
+
for (const failedUpload of failedUploads) {
|
|
249
|
+
const key = createFileKey(failedUpload.attachment);
|
|
250
|
+
uploadedAttachments.current.delete(key);
|
|
251
|
+
}
|
|
252
|
+
trackTelemetry(TelemetryEvent.FileAttached, TelemetryStatus.Error, {
|
|
253
|
+
failedCount: failedUploads.length,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
trackTelemetry(TelemetryEvent.FileAttached, TelemetryStatus.Success, {
|
|
258
|
+
fileCount: newAttachments.length,
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}, [chatService, processAttachmentsInBatch]);
|
|
264
|
+
const fetchExchanges = useCallback(async (conversationId) => {
|
|
265
|
+
const conversation = await agentService.current.conversations.getById(conversationId);
|
|
266
|
+
const allExchanges = (await conversation.exchanges.getAll()).items;
|
|
267
|
+
allExchanges.sort((a, b) => new Date(a.createdTime).getTime() - new Date(b.createdTime).getTime());
|
|
268
|
+
return allExchanges;
|
|
269
|
+
}, []);
|
|
270
|
+
const onClickOpenConversation = useCallback(async (id) => {
|
|
271
|
+
if (!chatService)
|
|
272
|
+
return;
|
|
273
|
+
try {
|
|
274
|
+
chatService.stopResponse();
|
|
275
|
+
chatService.clearError();
|
|
276
|
+
const selectedConversation = pastConversations.current.find((c) => c.id === id);
|
|
277
|
+
if (!selectedConversation)
|
|
278
|
+
return;
|
|
279
|
+
currentConversation.current = selectedConversation;
|
|
280
|
+
session.current = null;
|
|
281
|
+
const allExchanges = await fetchExchanges(selectedConversation.id);
|
|
282
|
+
chatService.setConversation(mapExchangesToChatMessages(allExchanges));
|
|
283
|
+
trackTelemetry(TelemetryEvent.OpenConversation, TelemetryStatus.Success, {
|
|
284
|
+
conversationId: id,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
catch (err) {
|
|
288
|
+
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
289
|
+
trackTelemetry(TelemetryEvent.OpenConversation, TelemetryStatus.Error, {
|
|
290
|
+
conversationId: id,
|
|
291
|
+
error: errorMessage,
|
|
292
|
+
});
|
|
293
|
+
chatService.setError(`Failed to open conversation: ${errorMessage}`);
|
|
294
|
+
}
|
|
295
|
+
}, [chatService, fetchExchanges]);
|
|
296
|
+
const initChat = useCallback(async () => {
|
|
297
|
+
const initKey = `${agentId}-${folderId}`;
|
|
298
|
+
try {
|
|
299
|
+
initializedFor.current = initKey;
|
|
300
|
+
const agentRelease = await agentService.current.getById(agentId, folderId);
|
|
301
|
+
const chatServiceInstance = AutopilotChatService.Instantiate({
|
|
302
|
+
config: {
|
|
303
|
+
mode: AutopilotChatMode.Embedded,
|
|
304
|
+
firstRunExperience: {
|
|
305
|
+
title: agentRelease.appearance?.welcomeTitle ||
|
|
306
|
+
`Welcome to ${agentRelease.name}!`,
|
|
307
|
+
description: agentRelease.appearance?.welcomeDescription || "",
|
|
308
|
+
suggestions: (agentRelease.appearance?.startingPrompts || []).map((prompt) => ({
|
|
309
|
+
label: prompt.displayPrompt,
|
|
310
|
+
prompt: prompt.actualPrompt,
|
|
311
|
+
})),
|
|
312
|
+
},
|
|
313
|
+
overrideLabels: {
|
|
314
|
+
title: agentRelease.name,
|
|
315
|
+
footerDisclaimer: "Agent can make mistakes. Please double check the responses.",
|
|
316
|
+
},
|
|
317
|
+
paginatedHistory: true,
|
|
318
|
+
disabledFeatures: {
|
|
319
|
+
fullScreen: true,
|
|
320
|
+
preview: true,
|
|
321
|
+
close: true,
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
});
|
|
325
|
+
setChatService(chatServiceInstance);
|
|
326
|
+
}
|
|
327
|
+
catch (err) {
|
|
328
|
+
const message = err instanceof Error ? err.message : "Failed to initialize chat";
|
|
329
|
+
setError(message);
|
|
330
|
+
initializedFor.current = null;
|
|
331
|
+
}
|
|
332
|
+
}, [agentId, folderId]);
|
|
333
|
+
const handleReload = useCallback(() => {
|
|
334
|
+
initializedFor.current = null;
|
|
335
|
+
setError(null);
|
|
336
|
+
setChatService(undefined);
|
|
337
|
+
initChat();
|
|
338
|
+
}, [initChat]);
|
|
339
|
+
const onStopResponse = useCallback(() => {
|
|
340
|
+
if (!chatService)
|
|
341
|
+
return;
|
|
342
|
+
if (activeExchange.current) {
|
|
343
|
+
activeExchange.current.sendExchangeEnd();
|
|
344
|
+
activeExchange.current = null;
|
|
345
|
+
}
|
|
346
|
+
chatService.sendOutputStreamEvent({ turnComplete: true });
|
|
347
|
+
chatService.stopResponse();
|
|
348
|
+
chatService.setShowLoading(false);
|
|
349
|
+
chatService.setWaiting(false);
|
|
350
|
+
}, [chatService]);
|
|
351
|
+
const onFeedback = useCallback((data) => {
|
|
352
|
+
pendingFeedback.current = data;
|
|
353
|
+
setFeedbackDialogOpen(true);
|
|
354
|
+
}, []);
|
|
355
|
+
const onFeedbackSubmit = useCallback((comment) => {
|
|
356
|
+
const data = pendingFeedback.current;
|
|
357
|
+
if (data) {
|
|
358
|
+
const rating = data.action.details?.isPositive
|
|
359
|
+
? FeedbackRating.Positive
|
|
360
|
+
: FeedbackRating.Negative;
|
|
361
|
+
currentConversation.current?.exchanges?.createFeedback(data.message.meta.exchangeId, {
|
|
362
|
+
rating,
|
|
363
|
+
comment,
|
|
364
|
+
});
|
|
365
|
+
trackTelemetry(TelemetryEvent.Feedback, TelemetryStatus.Success, {
|
|
366
|
+
rating,
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
pendingFeedback.current = null;
|
|
370
|
+
setFeedbackDialogOpen(false);
|
|
371
|
+
}, []);
|
|
372
|
+
const onFeedbackCancel = useCallback(() => {
|
|
373
|
+
pendingFeedback.current = null;
|
|
374
|
+
setFeedbackDialogOpen(false);
|
|
375
|
+
}, []);
|
|
376
|
+
// Initialize chat service on mount and when agentId/folderId changes
|
|
377
|
+
useEffect(() => {
|
|
378
|
+
const initKey = `${agentId}-${folderId}`;
|
|
379
|
+
if (initializedFor.current !== initKey) {
|
|
380
|
+
initChat();
|
|
381
|
+
}
|
|
382
|
+
}, [agentId, folderId, initChat]);
|
|
383
|
+
// Register event handlers after chatService is available
|
|
384
|
+
useEffect(() => {
|
|
385
|
+
if (!chatService)
|
|
386
|
+
return;
|
|
387
|
+
const registerEvents = async () => {
|
|
388
|
+
try {
|
|
389
|
+
const result = await agentService.current.conversations.getAll({
|
|
390
|
+
sort: SortOrder.Descending,
|
|
391
|
+
pageSize: 20,
|
|
392
|
+
});
|
|
393
|
+
conversationsCursor.current = result.nextCursor;
|
|
394
|
+
pastConversations.current = result.items;
|
|
395
|
+
chatService.setHistory(getConversationHistoryDisplayItems(pastConversations.current), !result.hasNextPage);
|
|
396
|
+
chatService.on(AutopilotChatEvent.NewChat, onNewChat);
|
|
397
|
+
chatService.on(AutopilotChatEvent.Request, onSendMessage);
|
|
398
|
+
chatService.on(AutopilotChatEvent.SetAttachments, onSetAttachments);
|
|
399
|
+
chatService.on(AutopilotChatEvent.OpenConversation, onClickOpenConversation);
|
|
400
|
+
chatService.on(AutopilotChatEvent.DeleteConversation, onClickDeleteConversation);
|
|
401
|
+
chatService.on(AutopilotChatEvent.HistoryLoadMore, onHistoryLoadMore);
|
|
402
|
+
chatService.on(AutopilotChatEvent.Feedback, onFeedback);
|
|
403
|
+
chatService.on(AutopilotChatEvent.StopResponse, onStopResponse);
|
|
404
|
+
}
|
|
405
|
+
catch (err) {
|
|
406
|
+
const message = err instanceof Error
|
|
407
|
+
? err.message
|
|
408
|
+
: "Failed to load conversation history";
|
|
409
|
+
setError(message);
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
registerEvents();
|
|
413
|
+
}, [
|
|
414
|
+
chatService,
|
|
415
|
+
onClickDeleteConversation,
|
|
416
|
+
onClickOpenConversation,
|
|
417
|
+
onFeedback,
|
|
418
|
+
onHistoryLoadMore,
|
|
419
|
+
onNewChat,
|
|
420
|
+
onSendMessage,
|
|
421
|
+
onSetAttachments,
|
|
422
|
+
onStopResponse,
|
|
423
|
+
]);
|
|
424
|
+
return (_jsxs("div", { className: "uipath-conversational-agent-chat", children: [error && (_jsxs("div", { className: "info-container", children: [_jsx(Alert, { variant: "destructive", children: _jsx(AlertDescription, { children: error }) }), _jsx(Button, { variant: "outline", onClick: handleReload, children: "Reload" })] })), !error && !chatService && (_jsx("div", { className: "info-container", children: _jsx(Alert, { children: _jsx(AlertDescription, { children: "Loading..." }) }) })), !error && chatService && (_jsx(ApChat, { chatServiceInstance: chatService, locale: "en", theme: "light" })), _jsx(FeedbackDialog, { open: feedbackDialogOpen, onOpenChange: setFeedbackDialogOpen, onSubmit: onFeedbackSubmit, onCancel: onFeedbackCancel })] }));
|
|
425
|
+
};
|
|
426
|
+
//# sourceMappingURL=ConversationalAgentChat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConversationalAgentChat.js","sourceRoot":"","sources":["../src/ConversationalAgentChat.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,MAAM,EAEN,kBAAkB,EAGlB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAGL,mBAAmB,EAKnB,cAAc,EAGd,SAAS,GAGV,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,+BAA+B,CAAC;AACvC,OAAO,EAGL,cAAc,EACd,aAAa,EACb,eAAe,GAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,kCAAkC,EAClC,0BAA0B,EAC1B,cAAc,GACf,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACtC,GAAG,EACH,OAAO,EACP,QAAQ,GACqB,EAAE,EAAE;IACjC,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,mBAAmB,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1D,MAAM,mBAAmB,GAAG,MAAM,CAAoC,IAAI,CAAC,CAAC;IAC5E,MAAM,cAAc,GAAG,MAAM,CAAgB,IAAI,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,MAAM,CAAuB,IAAI,CAAC,CAAC;IACnD,MAAM,iBAAiB,GAAG,MAAM,CAA+B,EAAE,CAAC,CAAC;IACnE,MAAM,mBAAmB,GAAG,MAAM,CA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