@uipath/apollo-react 4.13.1 → 4.14.0-pr593.59e5bb0
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/canvas/components/Edges/SequenceEdge.cjs +10 -8
- package/dist/canvas/components/Edges/SequenceEdge.d.ts.map +1 -1
- package/dist/canvas/components/Edges/SequenceEdge.js +10 -8
- package/dist/material/components/ap-chat/components/common/action-button.cjs +7 -33
- package/dist/material/components/ap-chat/components/common/action-button.d.ts +3 -9
- package/dist/material/components/ap-chat/components/common/action-button.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/common/action-button.js +7 -33
- package/dist/material/components/ap-chat/components/input/always-on-voice-button.cjs +183 -0
- package/dist/material/components/ap-chat/components/input/always-on-voice-button.d.ts +10 -0
- package/dist/material/components/ap-chat/components/input/always-on-voice-button.d.ts.map +1 -0
- package/dist/material/components/ap-chat/components/input/always-on-voice-button.js +136 -0
- package/dist/material/components/ap-chat/components/input/chat-input-actions.cjs +46 -4
- package/dist/material/components/ap-chat/components/input/chat-input-actions.d.ts +4 -1
- package/dist/material/components/ap-chat/components/input/chat-input-actions.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/input/chat-input-actions.js +46 -4
- package/dist/material/components/ap-chat/components/input/chat-input.cjs +19 -5
- package/dist/material/components/ap-chat/components/input/chat-input.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/input/chat-input.js +19 -5
- package/dist/material/components/ap-chat/locales/en.cjs +1 -1
- package/dist/material/components/ap-chat/locales/en.d.ts.map +1 -1
- package/dist/material/components/ap-chat/locales/en.js +1 -1
- package/dist/material/components/ap-chat/service/ChatModel.cjs +2 -0
- package/dist/material/components/ap-chat/service/ChatModel.d.ts +4 -1
- package/dist/material/components/ap-chat/service/ChatModel.d.ts.map +1 -1
- package/dist/material/components/ap-chat/service/ChatModel.js +2 -0
- package/dist/material/components/ap-chat/service/ChatService.cjs +14 -0
- package/dist/material/components/ap-chat/service/ChatService.d.ts +4 -0
- package/dist/material/components/ap-chat/service/ChatService.d.ts.map +1 -1
- package/dist/material/components/ap-chat/service/ChatService.js +14 -0
- package/package.json +1 -1
- package/dist/material/components/ap-chat/components/audio/chat-audio.cjs +0 -334
- package/dist/material/components/ap-chat/components/audio/chat-audio.d.ts +0 -10
- package/dist/material/components/ap-chat/components/audio/chat-audio.d.ts.map +0 -1
- package/dist/material/components/ap-chat/components/audio/chat-audio.js +0 -290
|
@@ -44,13 +44,15 @@ const external_react_namespaceObject = require("react");
|
|
|
44
44
|
var external_react_default = /*#__PURE__*/ __webpack_require__.n(external_react_namespaceObject);
|
|
45
45
|
const index_cjs_namespaceObject = require("../../../ap-typography/index.cjs");
|
|
46
46
|
const attachements_provider_cjs_namespaceObject = require("../../providers/attachements-provider.cjs");
|
|
47
|
+
const chat_service_provider_cjs_namespaceObject = require("../../providers/chat-service.provider.cjs");
|
|
47
48
|
const chat_state_provider_cjs_namespaceObject = require("../../providers/chat-state-provider.cjs");
|
|
48
49
|
const error_provider_cjs_namespaceObject = require("../../providers/error-provider.cjs");
|
|
49
50
|
const picker_provider_cjs_namespaceObject = require("../../providers/picker-provider.cjs");
|
|
51
|
+
const external_service_index_cjs_namespaceObject = require("../../service/index.cjs");
|
|
50
52
|
const file_reader_cjs_namespaceObject = require("../../utils/file-reader.cjs");
|
|
51
|
-
const chat_audio_cjs_namespaceObject = require("../audio/chat-audio.cjs");
|
|
52
53
|
const action_button_cjs_namespaceObject = require("../common/action-button.cjs");
|
|
53
54
|
const shared_controls_cjs_namespaceObject = require("../common/shared-controls.cjs");
|
|
55
|
+
const external_always_on_voice_button_cjs_namespaceObject = require("./always-on-voice-button.cjs");
|
|
54
56
|
const external_chat_input_agent_mode_selector_cjs_namespaceObject = require("./chat-input-agent-mode-selector.cjs");
|
|
55
57
|
const external_chat_input_model_picker_cjs_namespaceObject = require("./chat-input-model-picker.cjs");
|
|
56
58
|
const external_chat_input_resource_trigger_cjs_namespaceObject = require("./chat-input-resource-trigger.cjs");
|
|
@@ -75,12 +77,28 @@ const SubmitButtonContainer = (0, material_namespaceObject.styled)('div')(()=>({
|
|
|
75
77
|
}
|
|
76
78
|
}
|
|
77
79
|
}));
|
|
78
|
-
function AutopilotChatInputActionsComponent({ handleSubmit, disableSubmit, waitingResponse, onResourceTriggerClick }) {
|
|
80
|
+
function AutopilotChatInputActionsComponent({ handleSubmit, disableSubmit, isInputEmpty, waitingResponse, onResourceTriggerClick, onVoiceInteractionChange, isVoiceInteractionActive }) {
|
|
79
81
|
const { _ } = (0, react_namespaceObject.useLingui)();
|
|
82
|
+
const chatService = (0, chat_service_provider_cjs_namespaceObject.useChatService)();
|
|
80
83
|
const { addAttachments } = (0, attachements_provider_cjs_namespaceObject.useAttachments)();
|
|
81
84
|
const { setError } = (0, error_provider_cjs_namespaceObject.useError)();
|
|
82
85
|
const { disabledFeatures, allowedAttachments } = (0, chat_state_provider_cjs_namespaceObject.useChatState)();
|
|
83
86
|
const { models, agentModes } = (0, picker_provider_cjs_namespaceObject.usePicker)();
|
|
87
|
+
const [isSpeechToTextActive, setIsSpeechToTextActive] = external_react_default().useState(()=>chatService?.isSpeechToTextActive ?? false);
|
|
88
|
+
external_react_default().useEffect(()=>{
|
|
89
|
+
if (!chatService) return;
|
|
90
|
+
setIsSpeechToTextActive(chatService.isSpeechToTextActive);
|
|
91
|
+
return chatService.on(external_service_index_cjs_namespaceObject.AutopilotChatEvent.SetSpeechToTextState, (isActive)=>{
|
|
92
|
+
setIsSpeechToTextActive(isActive);
|
|
93
|
+
});
|
|
94
|
+
}, [
|
|
95
|
+
chatService
|
|
96
|
+
]);
|
|
97
|
+
const handleSpeechToTextClick = external_react_default().useCallback(()=>{
|
|
98
|
+
chatService?.publishSpeechToTextToggle();
|
|
99
|
+
}, [
|
|
100
|
+
chatService
|
|
101
|
+
]);
|
|
84
102
|
const fileInputRef = external_react_default().useRef(null);
|
|
85
103
|
const handleFileButtonClick = ()=>{
|
|
86
104
|
if (fileInputRef.current) {
|
|
@@ -150,6 +168,7 @@ function AutopilotChatInputActionsComponent({ handleSubmit, disableSubmit, waiti
|
|
|
150
168
|
acceptedExtensions,
|
|
151
169
|
_
|
|
152
170
|
]);
|
|
171
|
+
const showVoice = false === disabledFeatures.audioStreaming && (isVoiceInteractionActive || !!isInputEmpty && !waitingResponse);
|
|
153
172
|
const hasMultipleFeatures = [
|
|
154
173
|
!disabledFeatures.attachments,
|
|
155
174
|
models.length > 0,
|
|
@@ -158,6 +177,9 @@ function AutopilotChatInputActionsComponent({ handleSubmit, disableSubmit, waiti
|
|
|
158
177
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(InputActionsContainer, {
|
|
159
178
|
children: [
|
|
160
179
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(InputActionsGroup, {
|
|
180
|
+
style: isVoiceInteractionActive ? {
|
|
181
|
+
visibility: 'hidden'
|
|
182
|
+
} : void 0,
|
|
161
183
|
children: [
|
|
162
184
|
!disabledFeatures.attachments && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
163
185
|
children: [
|
|
@@ -250,8 +272,28 @@ function AutopilotChatInputActionsComponent({ handleSubmit, disableSubmit, waiti
|
|
|
250
272
|
}),
|
|
251
273
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(InputActionsGroup, {
|
|
252
274
|
children: [
|
|
253
|
-
!disabledFeatures.audio && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
254
|
-
|
|
275
|
+
!isVoiceInteractionActive && !disabledFeatures.audio && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_always_on_voice_button_cjs_namespaceObject.VoiceButtonContainer, {
|
|
276
|
+
active: isSpeechToTextActive,
|
|
277
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(action_button_cjs_namespaceObject.AutopilotChatActionButton, {
|
|
278
|
+
iconName: "mic",
|
|
279
|
+
onClick: handleSpeechToTextClick,
|
|
280
|
+
tooltipPlacement: "top",
|
|
281
|
+
tooltip: _({
|
|
282
|
+
id: 'autopilot-chat.input.actions.dictate'
|
|
283
|
+
}),
|
|
284
|
+
overrideColor: isSpeechToTextActive ? 'var(--color-background)' : void 0,
|
|
285
|
+
"data-testid": "autopilot-chat-stt-button",
|
|
286
|
+
ariaLabel: _({
|
|
287
|
+
id: 'autopilot-chat.input.actions.dictate'
|
|
288
|
+
}),
|
|
289
|
+
ariaPressed: isSpeechToTextActive
|
|
290
|
+
})
|
|
291
|
+
}),
|
|
292
|
+
showVoice && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_always_on_voice_button_cjs_namespaceObject.AlwaysOnVoiceButton, {
|
|
293
|
+
disabled: isSpeechToTextActive,
|
|
294
|
+
onActiveChange: onVoiceInteractionChange
|
|
295
|
+
}),
|
|
296
|
+
!showVoice && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SubmitButtonContainer, {
|
|
255
297
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(action_button_cjs_namespaceObject.AutopilotChatActionButton, {
|
|
256
298
|
iconName: waitingResponse ? 'stop' : 'arrow_upward',
|
|
257
299
|
tooltip: waitingResponse ? _({
|
|
@@ -2,10 +2,13 @@ import React from 'react';
|
|
|
2
2
|
interface AutopilotChatInputActionsProps {
|
|
3
3
|
handleSubmit: (event: React.MouseEvent) => void;
|
|
4
4
|
disableSubmit: boolean;
|
|
5
|
+
isInputEmpty?: boolean;
|
|
5
6
|
waitingResponse: boolean;
|
|
6
7
|
onResourceTriggerClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
8
|
+
onVoiceInteractionChange?: (isActive: boolean) => void;
|
|
9
|
+
isVoiceInteractionActive?: boolean;
|
|
7
10
|
}
|
|
8
|
-
declare function AutopilotChatInputActionsComponent({ handleSubmit, disableSubmit, waitingResponse, onResourceTriggerClick, }: AutopilotChatInputActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function AutopilotChatInputActionsComponent({ handleSubmit, disableSubmit, isInputEmpty, waitingResponse, onResourceTriggerClick, onVoiceInteractionChange, isVoiceInteractionActive, }: AutopilotChatInputActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
9
12
|
export declare const AutopilotChatInputActions: React.MemoExoticComponent<typeof AutopilotChatInputActionsComponent>;
|
|
10
13
|
export {};
|
|
11
14
|
//# sourceMappingURL=chat-input-actions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-input-actions.d.ts","sourceRoot":"","sources":["../../../../../../src/material/components/ap-chat/components/input/chat-input-actions.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"chat-input-actions.d.ts","sourceRoot":"","sources":["../../../../../../src/material/components/ap-chat/components/input/chat-input-actions.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AA2C1B,UAAU,8BAA8B;IACtC,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAChD,aAAa,EAAE,OAAO,CAAC;IAMvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC9E,wBAAwB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvD,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,iBAAS,kCAAkC,CAAC,EAC1C,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,GACzB,EAAE,8BAA8B,2CA8RhC;AAED,eAAO,MAAM,yBAAyB,sEAAiD,CAAC"}
|
|
@@ -5,13 +5,15 @@ import apollo_core, { FontVariantToken } from "@uipath/apollo-core";
|
|
|
5
5
|
import react from "react";
|
|
6
6
|
import { ApTypography } from "../../../ap-typography/index.js";
|
|
7
7
|
import { useAttachments } from "../../providers/attachements-provider.js";
|
|
8
|
+
import { useChatService } from "../../providers/chat-service.provider.js";
|
|
8
9
|
import { useChatState } from "../../providers/chat-state-provider.js";
|
|
9
10
|
import { useError } from "../../providers/error-provider.js";
|
|
10
11
|
import { usePicker } from "../../providers/picker-provider.js";
|
|
12
|
+
import { AutopilotChatEvent } from "../../service/index.js";
|
|
11
13
|
import { parseFiles } from "../../utils/file-reader.js";
|
|
12
|
-
import { AutopilotChatAudio } from "../audio/chat-audio.js";
|
|
13
14
|
import { AutopilotChatActionButton } from "../common/action-button.js";
|
|
14
15
|
import { VisuallyHidden } from "../common/shared-controls.js";
|
|
16
|
+
import { AlwaysOnVoiceButton, VoiceButtonContainer } from "./always-on-voice-button.js";
|
|
15
17
|
import { AutopilotChatAgentModeSelector } from "./chat-input-agent-mode-selector.js";
|
|
16
18
|
import { AutopilotChatInputModelPicker } from "./chat-input-model-picker.js";
|
|
17
19
|
import { ResourceTriggerButton } from "./chat-input-resource-trigger.js";
|
|
@@ -36,12 +38,28 @@ const SubmitButtonContainer = styled('div')(()=>({
|
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
}));
|
|
39
|
-
function AutopilotChatInputActionsComponent({ handleSubmit, disableSubmit, waitingResponse, onResourceTriggerClick }) {
|
|
41
|
+
function AutopilotChatInputActionsComponent({ handleSubmit, disableSubmit, isInputEmpty, waitingResponse, onResourceTriggerClick, onVoiceInteractionChange, isVoiceInteractionActive }) {
|
|
40
42
|
const { _ } = useLingui();
|
|
43
|
+
const chatService = useChatService();
|
|
41
44
|
const { addAttachments } = useAttachments();
|
|
42
45
|
const { setError } = useError();
|
|
43
46
|
const { disabledFeatures, allowedAttachments } = useChatState();
|
|
44
47
|
const { models, agentModes } = usePicker();
|
|
48
|
+
const [isSpeechToTextActive, setIsSpeechToTextActive] = react.useState(()=>chatService?.isSpeechToTextActive ?? false);
|
|
49
|
+
react.useEffect(()=>{
|
|
50
|
+
if (!chatService) return;
|
|
51
|
+
setIsSpeechToTextActive(chatService.isSpeechToTextActive);
|
|
52
|
+
return chatService.on(AutopilotChatEvent.SetSpeechToTextState, (isActive)=>{
|
|
53
|
+
setIsSpeechToTextActive(isActive);
|
|
54
|
+
});
|
|
55
|
+
}, [
|
|
56
|
+
chatService
|
|
57
|
+
]);
|
|
58
|
+
const handleSpeechToTextClick = react.useCallback(()=>{
|
|
59
|
+
chatService?.publishSpeechToTextToggle();
|
|
60
|
+
}, [
|
|
61
|
+
chatService
|
|
62
|
+
]);
|
|
45
63
|
const fileInputRef = react.useRef(null);
|
|
46
64
|
const handleFileButtonClick = ()=>{
|
|
47
65
|
if (fileInputRef.current) {
|
|
@@ -111,6 +129,7 @@ function AutopilotChatInputActionsComponent({ handleSubmit, disableSubmit, waiti
|
|
|
111
129
|
acceptedExtensions,
|
|
112
130
|
_
|
|
113
131
|
]);
|
|
132
|
+
const showVoice = false === disabledFeatures.audioStreaming && (isVoiceInteractionActive || !!isInputEmpty && !waitingResponse);
|
|
114
133
|
const hasMultipleFeatures = [
|
|
115
134
|
!disabledFeatures.attachments,
|
|
116
135
|
models.length > 0,
|
|
@@ -119,6 +138,9 @@ function AutopilotChatInputActionsComponent({ handleSubmit, disableSubmit, waiti
|
|
|
119
138
|
return /*#__PURE__*/ jsxs(InputActionsContainer, {
|
|
120
139
|
children: [
|
|
121
140
|
/*#__PURE__*/ jsxs(InputActionsGroup, {
|
|
141
|
+
style: isVoiceInteractionActive ? {
|
|
142
|
+
visibility: 'hidden'
|
|
143
|
+
} : void 0,
|
|
122
144
|
children: [
|
|
123
145
|
!disabledFeatures.attachments && /*#__PURE__*/ jsxs(Fragment, {
|
|
124
146
|
children: [
|
|
@@ -211,8 +233,28 @@ function AutopilotChatInputActionsComponent({ handleSubmit, disableSubmit, waiti
|
|
|
211
233
|
}),
|
|
212
234
|
/*#__PURE__*/ jsxs(InputActionsGroup, {
|
|
213
235
|
children: [
|
|
214
|
-
!disabledFeatures.audio && /*#__PURE__*/ jsx(
|
|
215
|
-
|
|
236
|
+
!isVoiceInteractionActive && !disabledFeatures.audio && /*#__PURE__*/ jsx(VoiceButtonContainer, {
|
|
237
|
+
active: isSpeechToTextActive,
|
|
238
|
+
children: /*#__PURE__*/ jsx(AutopilotChatActionButton, {
|
|
239
|
+
iconName: "mic",
|
|
240
|
+
onClick: handleSpeechToTextClick,
|
|
241
|
+
tooltipPlacement: "top",
|
|
242
|
+
tooltip: _({
|
|
243
|
+
id: 'autopilot-chat.input.actions.dictate'
|
|
244
|
+
}),
|
|
245
|
+
overrideColor: isSpeechToTextActive ? 'var(--color-background)' : void 0,
|
|
246
|
+
"data-testid": "autopilot-chat-stt-button",
|
|
247
|
+
ariaLabel: _({
|
|
248
|
+
id: 'autopilot-chat.input.actions.dictate'
|
|
249
|
+
}),
|
|
250
|
+
ariaPressed: isSpeechToTextActive
|
|
251
|
+
})
|
|
252
|
+
}),
|
|
253
|
+
showVoice && /*#__PURE__*/ jsx(AlwaysOnVoiceButton, {
|
|
254
|
+
disabled: isSpeechToTextActive,
|
|
255
|
+
onActiveChange: onVoiceInteractionChange
|
|
256
|
+
}),
|
|
257
|
+
!showVoice && /*#__PURE__*/ jsx(SubmitButtonContainer, {
|
|
216
258
|
children: /*#__PURE__*/ jsx(AutopilotChatActionButton, {
|
|
217
259
|
iconName: waitingResponse ? 'stop' : 'arrow_upward',
|
|
218
260
|
tooltip: waitingResponse ? _({
|
|
@@ -146,6 +146,7 @@ function AutopilotChatInputComponent() {
|
|
|
146
146
|
]);
|
|
147
147
|
const handleSubmit = external_react_default().useCallback(()=>{
|
|
148
148
|
if (waitingResponse || streaming) return void chatService.stopResponse();
|
|
149
|
+
if (chatService.isSpeechToTextActive) chatService.publishSpeechToTextToggle();
|
|
149
150
|
const serializedContent = editorRef.current?.getSerializedContent() ?? message;
|
|
150
151
|
chatService.sendRequest({
|
|
151
152
|
content: serializedContent,
|
|
@@ -215,22 +216,32 @@ function AutopilotChatInputComponent() {
|
|
|
215
216
|
handlePaste
|
|
216
217
|
]);
|
|
217
218
|
const hasLoadingAttachments = attachmentsLoading.filter((attachment)=>attachment.loading).length > 0;
|
|
219
|
+
const isInputEmpty = 0 === message.trim().length && 0 === attachments.length;
|
|
218
220
|
const handleResourceTriggerClick = external_react_default().useCallback(()=>{
|
|
219
221
|
editorRef.current?.openResourcePicker();
|
|
220
222
|
}, []);
|
|
223
|
+
const [isVoiceInteractionActive, setIsVoiceInteractionActive] = external_react_default().useState(false);
|
|
221
224
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
222
225
|
children: [
|
|
223
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_chat_input_error_cjs_namespaceObject.AutopilotChatInputError, {}),
|
|
226
|
+
!isVoiceInteractionActive && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_chat_input_error_cjs_namespaceObject.AutopilotChatInputError, {}),
|
|
224
227
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(InputContainer, {
|
|
225
228
|
primaryFontToken: spacing.primaryFontToken,
|
|
226
|
-
onClick: ()=>editorRef?.current?.focus(),
|
|
229
|
+
onClick: isVoiceInteractionActive ? void 0 : ()=>editorRef?.current?.focus(),
|
|
227
230
|
ref: inputContainerRef,
|
|
231
|
+
sx: isVoiceInteractionActive ? {
|
|
232
|
+
borderColor: 'transparent',
|
|
233
|
+
boxShadow: 'none',
|
|
234
|
+
background: 'transparent'
|
|
235
|
+
} : void 0,
|
|
228
236
|
children: [
|
|
229
237
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_chat_input_attachments_cjs_namespaceObject.AutopilotChatInputAttachments, {}),
|
|
230
238
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(material_namespaceObject.Box, {
|
|
231
239
|
className: "autopilot-chat-input",
|
|
232
240
|
sx: {
|
|
233
|
-
padding: `${apollo_core_default().Spacing.SpacingS} 0 0 !important
|
|
241
|
+
padding: `${apollo_core_default().Spacing.SpacingS} 0 0 !important`,
|
|
242
|
+
...isVoiceInteractionActive && {
|
|
243
|
+
visibility: 'hidden'
|
|
244
|
+
}
|
|
234
245
|
},
|
|
235
246
|
children: [
|
|
236
247
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
@@ -252,10 +263,13 @@ function AutopilotChatInputComponent() {
|
|
|
252
263
|
]
|
|
253
264
|
}),
|
|
254
265
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_chat_input_actions_cjs_namespaceObject.AutopilotChatInputActions, {
|
|
255
|
-
disableSubmit:
|
|
266
|
+
disableSubmit: isInputEmpty && !waitingResponse && !streaming || skeletonLoader && !waitingResponse && !streaming || hasLoadingAttachments,
|
|
267
|
+
isInputEmpty: isInputEmpty,
|
|
256
268
|
waitingResponse: waitingResponse || streaming,
|
|
257
269
|
handleSubmit: handleSubmit,
|
|
258
|
-
onResourceTriggerClick: hasResources ? handleResourceTriggerClick : void 0
|
|
270
|
+
onResourceTriggerClick: hasResources ? handleResourceTriggerClick : void 0,
|
|
271
|
+
onVoiceInteractionChange: setIsVoiceInteractionActive,
|
|
272
|
+
isVoiceInteractionActive: isVoiceInteractionActive
|
|
259
273
|
})
|
|
260
274
|
]
|
|
261
275
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-input.d.ts","sourceRoot":"","sources":["../../../../../../src/material/components/ap-chat/components/input/chat-input.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgF1B,iBAAS,2BAA2B,
|
|
1
|
+
{"version":3,"file":"chat-input.d.ts","sourceRoot":"","sources":["../../../../../../src/material/components/ap-chat/components/input/chat-input.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgF1B,iBAAS,2BAA2B,4CAqPnC;AAED,eAAO,MAAM,kBAAkB,+DAA0C,CAAC"}
|
|
@@ -107,6 +107,7 @@ function AutopilotChatInputComponent() {
|
|
|
107
107
|
]);
|
|
108
108
|
const handleSubmit = react.useCallback(()=>{
|
|
109
109
|
if (waitingResponse || streaming) return void chatService.stopResponse();
|
|
110
|
+
if (chatService.isSpeechToTextActive) chatService.publishSpeechToTextToggle();
|
|
110
111
|
const serializedContent = editorRef.current?.getSerializedContent() ?? message;
|
|
111
112
|
chatService.sendRequest({
|
|
112
113
|
content: serializedContent,
|
|
@@ -176,22 +177,32 @@ function AutopilotChatInputComponent() {
|
|
|
176
177
|
handlePaste
|
|
177
178
|
]);
|
|
178
179
|
const hasLoadingAttachments = attachmentsLoading.filter((attachment)=>attachment.loading).length > 0;
|
|
180
|
+
const isInputEmpty = 0 === message.trim().length && 0 === attachments.length;
|
|
179
181
|
const handleResourceTriggerClick = react.useCallback(()=>{
|
|
180
182
|
editorRef.current?.openResourcePicker();
|
|
181
183
|
}, []);
|
|
184
|
+
const [isVoiceInteractionActive, setIsVoiceInteractionActive] = react.useState(false);
|
|
182
185
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
183
186
|
children: [
|
|
184
|
-
/*#__PURE__*/ jsx(AutopilotChatInputError, {}),
|
|
187
|
+
!isVoiceInteractionActive && /*#__PURE__*/ jsx(AutopilotChatInputError, {}),
|
|
185
188
|
/*#__PURE__*/ jsxs(InputContainer, {
|
|
186
189
|
primaryFontToken: spacing.primaryFontToken,
|
|
187
|
-
onClick: ()=>editorRef?.current?.focus(),
|
|
190
|
+
onClick: isVoiceInteractionActive ? void 0 : ()=>editorRef?.current?.focus(),
|
|
188
191
|
ref: inputContainerRef,
|
|
192
|
+
sx: isVoiceInteractionActive ? {
|
|
193
|
+
borderColor: 'transparent',
|
|
194
|
+
boxShadow: 'none',
|
|
195
|
+
background: 'transparent'
|
|
196
|
+
} : void 0,
|
|
189
197
|
children: [
|
|
190
198
|
/*#__PURE__*/ jsx(AutopilotChatInputAttachments, {}),
|
|
191
199
|
/*#__PURE__*/ jsxs(Box, {
|
|
192
200
|
className: "autopilot-chat-input",
|
|
193
201
|
sx: {
|
|
194
|
-
padding: `${apollo_core.Spacing.SpacingS} 0 0 !important
|
|
202
|
+
padding: `${apollo_core.Spacing.SpacingS} 0 0 !important`,
|
|
203
|
+
...isVoiceInteractionActive && {
|
|
204
|
+
visibility: 'hidden'
|
|
205
|
+
}
|
|
195
206
|
},
|
|
196
207
|
children: [
|
|
197
208
|
/*#__PURE__*/ jsx("div", {
|
|
@@ -213,10 +224,13 @@ function AutopilotChatInputComponent() {
|
|
|
213
224
|
]
|
|
214
225
|
}),
|
|
215
226
|
/*#__PURE__*/ jsx(AutopilotChatInputActions, {
|
|
216
|
-
disableSubmit:
|
|
227
|
+
disableSubmit: isInputEmpty && !waitingResponse && !streaming || skeletonLoader && !waitingResponse && !streaming || hasLoadingAttachments,
|
|
228
|
+
isInputEmpty: isInputEmpty,
|
|
217
229
|
waitingResponse: waitingResponse || streaming,
|
|
218
230
|
handleSubmit: handleSubmit,
|
|
219
|
-
onResourceTriggerClick: hasResources ? handleResourceTriggerClick : void 0
|
|
231
|
+
onResourceTriggerClick: hasResources ? handleResourceTriggerClick : void 0,
|
|
232
|
+
onVoiceInteractionChange: setIsVoiceInteractionActive,
|
|
233
|
+
isVoiceInteractionActive: isVoiceInteractionActive
|
|
220
234
|
})
|
|
221
235
|
]
|
|
222
236
|
}),
|
|
@@ -26,7 +26,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
27
|
messages: ()=>messages
|
|
28
28
|
});
|
|
29
|
-
const messages = JSON.parse('{"autopilot-chat.common.attachments.remove-file":["Remove"],"autopilot-chat.common.attachments.remove-file-name":["Remove ",["name"]],"autopilot-chat.common.mode-selector":["Mode selector"],"autopilot-chat.common.model-selector":["Model selector"],"autopilot-chat.dropzone.allowed-file-types":["Allowed file types: ",["fileTypes"]],"autopilot-chat.dropzone.overlay-max-count":["Maximum files allowed: ",["maxCount"]],"autopilot-chat.dropzone.overlay-max-size":["Maximum file size: ",["maxSize"],"MB"],"autopilot-chat.dropzone.overlay-title":["Drop your files here to add them to your prompt"],"autopilot-chat.error.file-invalid-type":["Unsupported file: ",["fileName"]],"autopilot-chat.error.file-too-large":["File too large: ",["fileName"]," ",["fileSize"],"MB/",["maxSize"],"MB"],"autopilot-chat.error.multiple-files":["Only one file can be attached per message"],"autopilot-chat.error.too-many-files":["Too many files. ",["maxCount"]," files are allowed per message"],"autopilot-chat.header.actions.close":["Close chat"],"autopilot-chat.header.actions.collapse":["Collapse"],"autopilot-chat.header.actions.custom-actions":["More actions"],"autopilot-chat.header.actions.expand":["Expand"],"autopilot-chat.header.actions.history":["Chat history"],"autopilot-chat.header.actions.new-chat":["New chat"],"autopilot-chat.header.actions.settings":["Settings"],"autopilot-chat.header.preview":["Preview"],"autopilot-chat.header.title":["Autopilot"],"autopilot-chat.history.delete":["Delete"],"autopilot-chat.history.empty":["There are no conversations yet."],"autopilot-chat.history.group.last-30-days":["Previous 30 days"],"autopilot-chat.history.group.last-week":["Last week"],"autopilot-chat.history.group.months-ago":[["count"]," months ago"],"autopilot-chat.history.group.today":["Today"],"autopilot-chat.history.group.yesterday":["Yesterday"],"autopilot-chat.history.no-results":["No results found."],"autopilot-chat.history.search-placeholder":["Search"],"autopilot-chat.input.actions.attach-file":["Attach file(s)"],"autopilot-chat.input.actions.attachments.allowed-types":["Allowed file types: ",["fileTypes"]],"autopilot-chat.input.actions.attachments.max-count":["Maximum files allowed: ",["maxCount"]],"autopilot-chat.input.actions.attachments.max-size":["Maximum file size: ",["maxSize"],"MB"],"autopilot-chat.input.actions.error.file-too-large":["File too large: ",["fileName"]," ",["fileSize"],"MB/",["maxSize"],"MB"],"autopilot-chat.input.actions.send":["Send"],"autopilot-chat.input.actions.stop":["Stop"],"autopilot-chat.input.agent-mode-selection-label":["Agent mode selection"],"autopilot-chat.input.footer":["Autopilot can make mistakes. Please double check the responses."],"autopilot-chat.input.model-selection-label":["Model selection"],"autopilot-chat.input.placeholder":["What would you like me to do?"],"autopilot-chat.input.resource-chip.remove":["Remove"],"autopilot-chat.input.resource-chip.remove-name":["Remove ",["label"]],"autopilot-chat.message.actions.bad":["Needs improvement"],"autopilot-chat.message.actions.copy":["Copy"],"autopilot-chat.message.actions.good":["Love this"],"autopilot-chat.message.actions.label":["Message actions"],"autopilot-chat.message.actions.more":["More actions"],"autopilot-chat.message.citation-aria-label":["Citation ",["id"],": ",["title"]],"autopilot-chat.message.close":["Close chat"],"autopilot-chat.message.code-block-code":["Code"],"autopilot-chat.message.code-block-copy":["Copy"],"autopilot-chat.message.code-block-language":["Text"],"autopilot-chat.message.code-block-preview":["Preview"],"autopilot-chat.message.expand":["Expand"],"autopilot-chat.message.footnote-label":["Sources"],"autopilot-chat.message.generating-response":["Generating..."],"autopilot-chat.message.page-number":["Page ",["page_number"]],"autopilot-chat.message.scroll-to-bottom":["Scroll to bottom"],"autopilot-chat.message.show-less":["Show less"],"autopilot-chat.message.show-more":["Show more"],"autopilot-chat.message.sources":["Sources"],"autopilot-chat.message.suggestions-title":["Suggestions"],"autopilot-chat.resource-picker.back":["Go back"],"autopilot-chat.resource-picker.empty":["No resources available"],"autopilot-chat.resource-picker.error":["Failed to load resources"],"autopilot-chat.resource-picker.label":["Resource picker"],"autopilot-chat.resource-picker.load-more-error":["Failed to load more"],"autopilot-chat.resource-picker.no-results":["No matching resources"],"autopilot-chat.resource-picker.retry":["Retry"],"autopilot-chat.resource-picker.search-error":["Search failed"],"autopilot-chat.resource-trigger.label":["Add resource reference"],"autopilot-chat.resource-trigger.tooltip":["Add resource"],"autopilot-chat.settings.heading-description":["heading level 2"],"autopilot-chat.settings.hide":["Hide settings"],"autopilot-chat.settings.title":["Chat settings"],"autopilot-chat.tree.no-description":["No description"],"autopilot-chat.tree.no-items":["No items"],"autopilot-chat.tree.unknown":["Unknown"]}');
|
|
29
|
+
const messages = JSON.parse('{"autopilot-chat.common.attachments.remove-file":["Remove"],"autopilot-chat.common.attachments.remove-file-name":["Remove ",["name"]],"autopilot-chat.common.mode-selector":["Mode selector"],"autopilot-chat.common.model-selector":["Model selector"],"autopilot-chat.dropzone.allowed-file-types":["Allowed file types: ",["fileTypes"]],"autopilot-chat.dropzone.overlay-max-count":["Maximum files allowed: ",["maxCount"]],"autopilot-chat.dropzone.overlay-max-size":["Maximum file size: ",["maxSize"],"MB"],"autopilot-chat.dropzone.overlay-title":["Drop your files here to add them to your prompt"],"autopilot-chat.error.file-invalid-type":["Unsupported file: ",["fileName"]],"autopilot-chat.error.file-too-large":["File too large: ",["fileName"]," ",["fileSize"],"MB/",["maxSize"],"MB"],"autopilot-chat.error.multiple-files":["Only one file can be attached per message"],"autopilot-chat.error.too-many-files":["Too many files. ",["maxCount"]," files are allowed per message"],"autopilot-chat.header.actions.close":["Close chat"],"autopilot-chat.header.actions.collapse":["Collapse"],"autopilot-chat.header.actions.custom-actions":["More actions"],"autopilot-chat.header.actions.expand":["Expand"],"autopilot-chat.header.actions.history":["Chat history"],"autopilot-chat.header.actions.new-chat":["New chat"],"autopilot-chat.header.actions.settings":["Settings"],"autopilot-chat.header.preview":["Preview"],"autopilot-chat.header.title":["Autopilot"],"autopilot-chat.history.delete":["Delete"],"autopilot-chat.history.empty":["There are no conversations yet."],"autopilot-chat.history.group.last-30-days":["Previous 30 days"],"autopilot-chat.history.group.last-week":["Last week"],"autopilot-chat.history.group.months-ago":[["count"]," months ago"],"autopilot-chat.history.group.today":["Today"],"autopilot-chat.history.group.yesterday":["Yesterday"],"autopilot-chat.history.no-results":["No results found."],"autopilot-chat.history.search-placeholder":["Search"],"autopilot-chat.input.actions.attach-file":["Attach file(s)"],"autopilot-chat.input.actions.attachments.allowed-types":["Allowed file types: ",["fileTypes"]],"autopilot-chat.input.actions.attachments.max-count":["Maximum files allowed: ",["maxCount"]],"autopilot-chat.input.actions.attachments.max-size":["Maximum file size: ",["maxSize"],"MB"],"autopilot-chat.input.actions.dictate":["Dictate"],"autopilot-chat.input.actions.error.file-too-large":["File too large: ",["fileName"]," ",["fileSize"],"MB/",["maxSize"],"MB"],"autopilot-chat.input.actions.send":["Send"],"autopilot-chat.input.actions.stop":["Stop"],"autopilot-chat.input.actions.voice-interaction":["Voice interaction"],"autopilot-chat.input.agent-mode-selection-label":["Agent mode selection"],"autopilot-chat.input.footer":["Autopilot can make mistakes. Please double check the responses."],"autopilot-chat.input.model-selection-label":["Model selection"],"autopilot-chat.input.placeholder":["What would you like me to do?"],"autopilot-chat.input.resource-chip.remove":["Remove"],"autopilot-chat.input.resource-chip.remove-name":["Remove ",["label"]],"autopilot-chat.message.actions.bad":["Needs improvement"],"autopilot-chat.message.actions.copy":["Copy"],"autopilot-chat.message.actions.good":["Love this"],"autopilot-chat.message.actions.label":["Message actions"],"autopilot-chat.message.actions.more":["More actions"],"autopilot-chat.message.citation-aria-label":["Citation ",["id"],": ",["title"]],"autopilot-chat.message.close":["Close chat"],"autopilot-chat.message.code-block-code":["Code"],"autopilot-chat.message.code-block-copy":["Copy"],"autopilot-chat.message.code-block-language":["Text"],"autopilot-chat.message.code-block-preview":["Preview"],"autopilot-chat.message.expand":["Expand"],"autopilot-chat.message.footnote-label":["Sources"],"autopilot-chat.message.generating-response":["Generating..."],"autopilot-chat.message.page-number":["Page ",["page_number"]],"autopilot-chat.message.scroll-to-bottom":["Scroll to bottom"],"autopilot-chat.message.show-less":["Show less"],"autopilot-chat.message.show-more":["Show more"],"autopilot-chat.message.sources":["Sources"],"autopilot-chat.message.suggestions-title":["Suggestions"],"autopilot-chat.resource-picker.back":["Go back"],"autopilot-chat.resource-picker.empty":["No resources available"],"autopilot-chat.resource-picker.error":["Failed to load resources"],"autopilot-chat.resource-picker.label":["Resource picker"],"autopilot-chat.resource-picker.load-more-error":["Failed to load more"],"autopilot-chat.resource-picker.no-results":["No matching resources"],"autopilot-chat.resource-picker.retry":["Retry"],"autopilot-chat.resource-picker.search-error":["Search failed"],"autopilot-chat.resource-trigger.label":["Add resource reference"],"autopilot-chat.resource-trigger.tooltip":["Add resource"],"autopilot-chat.settings.heading-description":["heading level 2"],"autopilot-chat.settings.hide":["Hide settings"],"autopilot-chat.settings.title":["Chat settings"],"autopilot-chat.tree.no-description":["No description"],"autopilot-chat.tree.no-items":["No items"],"autopilot-chat.tree.unknown":["Unknown"]}');
|
|
30
30
|
exports.messages = __webpack_exports__.messages;
|
|
31
31
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
32
32
|
"messages"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../../src/material/components/ap-chat/locales/en.ts"],"names":[],"mappings":"AAAkB,OAAO,KAAI,EAAC,QAAQ,EAAC,MAAI,cAAc,CAAC;AAAA,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../../src/material/components/ap-chat/locales/en.ts"],"names":[],"mappings":"AAAkB,OAAO,KAAI,EAAC,QAAQ,EAAC,MAAI,cAAc,CAAC;AAAA,eAAO,MAAM,QAAQ,EAA+3K,QAAQ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const messages = JSON.parse('{"autopilot-chat.common.attachments.remove-file":["Remove"],"autopilot-chat.common.attachments.remove-file-name":["Remove ",["name"]],"autopilot-chat.common.mode-selector":["Mode selector"],"autopilot-chat.common.model-selector":["Model selector"],"autopilot-chat.dropzone.allowed-file-types":["Allowed file types: ",["fileTypes"]],"autopilot-chat.dropzone.overlay-max-count":["Maximum files allowed: ",["maxCount"]],"autopilot-chat.dropzone.overlay-max-size":["Maximum file size: ",["maxSize"],"MB"],"autopilot-chat.dropzone.overlay-title":["Drop your files here to add them to your prompt"],"autopilot-chat.error.file-invalid-type":["Unsupported file: ",["fileName"]],"autopilot-chat.error.file-too-large":["File too large: ",["fileName"]," ",["fileSize"],"MB/",["maxSize"],"MB"],"autopilot-chat.error.multiple-files":["Only one file can be attached per message"],"autopilot-chat.error.too-many-files":["Too many files. ",["maxCount"]," files are allowed per message"],"autopilot-chat.header.actions.close":["Close chat"],"autopilot-chat.header.actions.collapse":["Collapse"],"autopilot-chat.header.actions.custom-actions":["More actions"],"autopilot-chat.header.actions.expand":["Expand"],"autopilot-chat.header.actions.history":["Chat history"],"autopilot-chat.header.actions.new-chat":["New chat"],"autopilot-chat.header.actions.settings":["Settings"],"autopilot-chat.header.preview":["Preview"],"autopilot-chat.header.title":["Autopilot"],"autopilot-chat.history.delete":["Delete"],"autopilot-chat.history.empty":["There are no conversations yet."],"autopilot-chat.history.group.last-30-days":["Previous 30 days"],"autopilot-chat.history.group.last-week":["Last week"],"autopilot-chat.history.group.months-ago":[["count"]," months ago"],"autopilot-chat.history.group.today":["Today"],"autopilot-chat.history.group.yesterday":["Yesterday"],"autopilot-chat.history.no-results":["No results found."],"autopilot-chat.history.search-placeholder":["Search"],"autopilot-chat.input.actions.attach-file":["Attach file(s)"],"autopilot-chat.input.actions.attachments.allowed-types":["Allowed file types: ",["fileTypes"]],"autopilot-chat.input.actions.attachments.max-count":["Maximum files allowed: ",["maxCount"]],"autopilot-chat.input.actions.attachments.max-size":["Maximum file size: ",["maxSize"],"MB"],"autopilot-chat.input.actions.error.file-too-large":["File too large: ",["fileName"]," ",["fileSize"],"MB/",["maxSize"],"MB"],"autopilot-chat.input.actions.send":["Send"],"autopilot-chat.input.actions.stop":["Stop"],"autopilot-chat.input.agent-mode-selection-label":["Agent mode selection"],"autopilot-chat.input.footer":["Autopilot can make mistakes. Please double check the responses."],"autopilot-chat.input.model-selection-label":["Model selection"],"autopilot-chat.input.placeholder":["What would you like me to do?"],"autopilot-chat.input.resource-chip.remove":["Remove"],"autopilot-chat.input.resource-chip.remove-name":["Remove ",["label"]],"autopilot-chat.message.actions.bad":["Needs improvement"],"autopilot-chat.message.actions.copy":["Copy"],"autopilot-chat.message.actions.good":["Love this"],"autopilot-chat.message.actions.label":["Message actions"],"autopilot-chat.message.actions.more":["More actions"],"autopilot-chat.message.citation-aria-label":["Citation ",["id"],": ",["title"]],"autopilot-chat.message.close":["Close chat"],"autopilot-chat.message.code-block-code":["Code"],"autopilot-chat.message.code-block-copy":["Copy"],"autopilot-chat.message.code-block-language":["Text"],"autopilot-chat.message.code-block-preview":["Preview"],"autopilot-chat.message.expand":["Expand"],"autopilot-chat.message.footnote-label":["Sources"],"autopilot-chat.message.generating-response":["Generating..."],"autopilot-chat.message.page-number":["Page ",["page_number"]],"autopilot-chat.message.scroll-to-bottom":["Scroll to bottom"],"autopilot-chat.message.show-less":["Show less"],"autopilot-chat.message.show-more":["Show more"],"autopilot-chat.message.sources":["Sources"],"autopilot-chat.message.suggestions-title":["Suggestions"],"autopilot-chat.resource-picker.back":["Go back"],"autopilot-chat.resource-picker.empty":["No resources available"],"autopilot-chat.resource-picker.error":["Failed to load resources"],"autopilot-chat.resource-picker.label":["Resource picker"],"autopilot-chat.resource-picker.load-more-error":["Failed to load more"],"autopilot-chat.resource-picker.no-results":["No matching resources"],"autopilot-chat.resource-picker.retry":["Retry"],"autopilot-chat.resource-picker.search-error":["Search failed"],"autopilot-chat.resource-trigger.label":["Add resource reference"],"autopilot-chat.resource-trigger.tooltip":["Add resource"],"autopilot-chat.settings.heading-description":["heading level 2"],"autopilot-chat.settings.hide":["Hide settings"],"autopilot-chat.settings.title":["Chat settings"],"autopilot-chat.tree.no-description":["No description"],"autopilot-chat.tree.no-items":["No items"],"autopilot-chat.tree.unknown":["Unknown"]}');
|
|
1
|
+
const messages = JSON.parse('{"autopilot-chat.common.attachments.remove-file":["Remove"],"autopilot-chat.common.attachments.remove-file-name":["Remove ",["name"]],"autopilot-chat.common.mode-selector":["Mode selector"],"autopilot-chat.common.model-selector":["Model selector"],"autopilot-chat.dropzone.allowed-file-types":["Allowed file types: ",["fileTypes"]],"autopilot-chat.dropzone.overlay-max-count":["Maximum files allowed: ",["maxCount"]],"autopilot-chat.dropzone.overlay-max-size":["Maximum file size: ",["maxSize"],"MB"],"autopilot-chat.dropzone.overlay-title":["Drop your files here to add them to your prompt"],"autopilot-chat.error.file-invalid-type":["Unsupported file: ",["fileName"]],"autopilot-chat.error.file-too-large":["File too large: ",["fileName"]," ",["fileSize"],"MB/",["maxSize"],"MB"],"autopilot-chat.error.multiple-files":["Only one file can be attached per message"],"autopilot-chat.error.too-many-files":["Too many files. ",["maxCount"]," files are allowed per message"],"autopilot-chat.header.actions.close":["Close chat"],"autopilot-chat.header.actions.collapse":["Collapse"],"autopilot-chat.header.actions.custom-actions":["More actions"],"autopilot-chat.header.actions.expand":["Expand"],"autopilot-chat.header.actions.history":["Chat history"],"autopilot-chat.header.actions.new-chat":["New chat"],"autopilot-chat.header.actions.settings":["Settings"],"autopilot-chat.header.preview":["Preview"],"autopilot-chat.header.title":["Autopilot"],"autopilot-chat.history.delete":["Delete"],"autopilot-chat.history.empty":["There are no conversations yet."],"autopilot-chat.history.group.last-30-days":["Previous 30 days"],"autopilot-chat.history.group.last-week":["Last week"],"autopilot-chat.history.group.months-ago":[["count"]," months ago"],"autopilot-chat.history.group.today":["Today"],"autopilot-chat.history.group.yesterday":["Yesterday"],"autopilot-chat.history.no-results":["No results found."],"autopilot-chat.history.search-placeholder":["Search"],"autopilot-chat.input.actions.attach-file":["Attach file(s)"],"autopilot-chat.input.actions.attachments.allowed-types":["Allowed file types: ",["fileTypes"]],"autopilot-chat.input.actions.attachments.max-count":["Maximum files allowed: ",["maxCount"]],"autopilot-chat.input.actions.attachments.max-size":["Maximum file size: ",["maxSize"],"MB"],"autopilot-chat.input.actions.dictate":["Dictate"],"autopilot-chat.input.actions.error.file-too-large":["File too large: ",["fileName"]," ",["fileSize"],"MB/",["maxSize"],"MB"],"autopilot-chat.input.actions.send":["Send"],"autopilot-chat.input.actions.stop":["Stop"],"autopilot-chat.input.actions.voice-interaction":["Voice interaction"],"autopilot-chat.input.agent-mode-selection-label":["Agent mode selection"],"autopilot-chat.input.footer":["Autopilot can make mistakes. Please double check the responses."],"autopilot-chat.input.model-selection-label":["Model selection"],"autopilot-chat.input.placeholder":["What would you like me to do?"],"autopilot-chat.input.resource-chip.remove":["Remove"],"autopilot-chat.input.resource-chip.remove-name":["Remove ",["label"]],"autopilot-chat.message.actions.bad":["Needs improvement"],"autopilot-chat.message.actions.copy":["Copy"],"autopilot-chat.message.actions.good":["Love this"],"autopilot-chat.message.actions.label":["Message actions"],"autopilot-chat.message.actions.more":["More actions"],"autopilot-chat.message.citation-aria-label":["Citation ",["id"],": ",["title"]],"autopilot-chat.message.close":["Close chat"],"autopilot-chat.message.code-block-code":["Code"],"autopilot-chat.message.code-block-copy":["Copy"],"autopilot-chat.message.code-block-language":["Text"],"autopilot-chat.message.code-block-preview":["Preview"],"autopilot-chat.message.expand":["Expand"],"autopilot-chat.message.footnote-label":["Sources"],"autopilot-chat.message.generating-response":["Generating..."],"autopilot-chat.message.page-number":["Page ",["page_number"]],"autopilot-chat.message.scroll-to-bottom":["Scroll to bottom"],"autopilot-chat.message.show-less":["Show less"],"autopilot-chat.message.show-more":["Show more"],"autopilot-chat.message.sources":["Sources"],"autopilot-chat.message.suggestions-title":["Suggestions"],"autopilot-chat.resource-picker.back":["Go back"],"autopilot-chat.resource-picker.empty":["No resources available"],"autopilot-chat.resource-picker.error":["Failed to load resources"],"autopilot-chat.resource-picker.label":["Resource picker"],"autopilot-chat.resource-picker.load-more-error":["Failed to load more"],"autopilot-chat.resource-picker.no-results":["No matching resources"],"autopilot-chat.resource-picker.retry":["Retry"],"autopilot-chat.resource-picker.search-error":["Search failed"],"autopilot-chat.resource-trigger.label":["Add resource reference"],"autopilot-chat.resource-trigger.tooltip":["Add resource"],"autopilot-chat.settings.heading-description":["heading level 2"],"autopilot-chat.settings.hide":["Hide settings"],"autopilot-chat.settings.title":["Chat settings"],"autopilot-chat.tree.no-description":["No description"],"autopilot-chat.tree.no-items":["No items"],"autopilot-chat.tree.unknown":["Unknown"]}');
|
|
2
2
|
export { messages };
|
|
@@ -88,6 +88,8 @@ let AutopilotChatEvent = /*#__PURE__*/ function(AutopilotChatEvent) {
|
|
|
88
88
|
AutopilotChatEvent["SetReadOnly"] = "setReadOnly";
|
|
89
89
|
AutopilotChatEvent["SetResourceManager"] = "setResourceManager";
|
|
90
90
|
AutopilotChatEvent["ResourceItemSelected"] = "resourceItemSelected";
|
|
91
|
+
AutopilotChatEvent["SpeechToTextToggle"] = "speechToTextToggle";
|
|
92
|
+
AutopilotChatEvent["SetSpeechToTextState"] = "setSpeechToTextState";
|
|
91
93
|
return AutopilotChatEvent;
|
|
92
94
|
}({});
|
|
93
95
|
let AutopilotChatInterceptableEvent = /*#__PURE__*/ function(AutopilotChatInterceptableEvent) {
|
|
@@ -118,7 +118,9 @@ export declare enum AutopilotChatEvent {
|
|
|
118
118
|
CustomHeaderActionClicked = "customHeaderActionClicked",
|
|
119
119
|
SetReadOnly = "setReadOnly",
|
|
120
120
|
SetResourceManager = "setResourceManager",
|
|
121
|
-
ResourceItemSelected = "resourceItemSelected"
|
|
121
|
+
ResourceItemSelected = "resourceItemSelected",
|
|
122
|
+
SpeechToTextToggle = "speechToTextToggle",
|
|
123
|
+
SetSpeechToTextState = "setSpeechToTextState"
|
|
122
124
|
}
|
|
123
125
|
export declare enum AutopilotChatInterceptableEvent {
|
|
124
126
|
Request = "request"
|
|
@@ -191,6 +193,7 @@ export interface AutopilotChatDisabledFeatures {
|
|
|
191
193
|
fullHeight?: boolean;
|
|
192
194
|
copy?: boolean;
|
|
193
195
|
htmlPreview?: boolean;
|
|
196
|
+
audioStreaming?: boolean;
|
|
194
197
|
}
|
|
195
198
|
export interface AutopilotChatOverrideLabels {
|
|
196
199
|
inputPlaceholder?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatModel.d.ts","sourceRoot":"","sources":["../../../../../src/material/components/ap-chat/service/ChatModel.ts"],"names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W,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,uBAAuB,CAAC;CAChC;
|
|
1
|
+
{"version":3,"file":"ChatModel.d.ts","sourceRoot":"","sources":["../../../../../src/material/components/ap-chat/service/ChatModel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;AAEpE,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,UAAU,iBAAiB;IAC3B,UAAU,gBAAgB;IAC1B,QAAQ,aAAa;CACtB;AAED,oBAAY,qBAAqB;IAC/B,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,IAAI,SAAS;CACd;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QACpB,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;QAC1B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;KACvB,CAAC;IACF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAUD,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAUD,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CAC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*/ function(AutopilotChatEvent) {
|
|
|
54
54
|
AutopilotChatEvent["SetReadOnly"] = "setReadOnly";
|
|
55
55
|
AutopilotChatEvent["SetResourceManager"] = "setResourceManager";
|
|
56
56
|
AutopilotChatEvent["ResourceItemSelected"] = "resourceItemSelected";
|
|
57
|
+
AutopilotChatEvent["SpeechToTextToggle"] = "speechToTextToggle";
|
|
58
|
+
AutopilotChatEvent["SetSpeechToTextState"] = "setSpeechToTextState";
|
|
57
59
|
return AutopilotChatEvent;
|
|
58
60
|
}({});
|
|
59
61
|
let ChatModel_AutopilotChatInterceptableEvent = /*#__PURE__*/ function(AutopilotChatInterceptableEvent) {
|
|
@@ -49,6 +49,7 @@ class AutopilotChatService {
|
|
|
49
49
|
settings: true,
|
|
50
50
|
headerSeparator: true,
|
|
51
51
|
audio: true,
|
|
52
|
+
audioStreaming: true,
|
|
52
53
|
fullHeight: true,
|
|
53
54
|
htmlPreview: true
|
|
54
55
|
},
|
|
@@ -84,6 +85,7 @@ class AutopilotChatService {
|
|
|
84
85
|
_locale = 'en';
|
|
85
86
|
_theme = 'light';
|
|
86
87
|
_resourceManager;
|
|
88
|
+
_isSpeechToTextActive = false;
|
|
87
89
|
constructor(instanceName){
|
|
88
90
|
this._instanceName = instanceName;
|
|
89
91
|
this._eventBus = new external_EventBus_cjs_namespaceObject.EventBus();
|
|
@@ -555,6 +557,18 @@ class AutopilotChatService {
|
|
|
555
557
|
sendOutputStreamEvent(event) {
|
|
556
558
|
this._eventBus.publish(external_ChatModel_cjs_namespaceObject.AutopilotChatEvent.OutputStream, event);
|
|
557
559
|
}
|
|
560
|
+
publishSpeechToTextToggle() {
|
|
561
|
+
this._isSpeechToTextActive = !this._isSpeechToTextActive;
|
|
562
|
+
this._eventBus.publish(external_ChatModel_cjs_namespaceObject.AutopilotChatEvent.SetSpeechToTextState, this._isSpeechToTextActive);
|
|
563
|
+
this._eventBus.publish(external_ChatModel_cjs_namespaceObject.AutopilotChatEvent.SpeechToTextToggle, this._isSpeechToTextActive);
|
|
564
|
+
}
|
|
565
|
+
setSpeechToTextState(isActive) {
|
|
566
|
+
this._isSpeechToTextActive = isActive;
|
|
567
|
+
this._eventBus.publish(external_ChatModel_cjs_namespaceObject.AutopilotChatEvent.SetSpeechToTextState, isActive);
|
|
568
|
+
}
|
|
569
|
+
get isSpeechToTextActive() {
|
|
570
|
+
return this._isSpeechToTextActive;
|
|
571
|
+
}
|
|
558
572
|
setAttachmentsLoading(attachments) {
|
|
559
573
|
this._internalService.publish(external_ChatModel_cjs_namespaceObject.AutopilotChatInternalEvent.SetAttachmentsLoading, attachments);
|
|
560
574
|
}
|
|
@@ -27,6 +27,7 @@ export declare class AutopilotChatService {
|
|
|
27
27
|
private _locale;
|
|
28
28
|
private _theme;
|
|
29
29
|
private _resourceManager;
|
|
30
|
+
private _isSpeechToTextActive;
|
|
30
31
|
private constructor();
|
|
31
32
|
static Instantiate({ instanceName, config, messageRenderers, }: {
|
|
32
33
|
instanceName?: string;
|
|
@@ -112,6 +113,9 @@ export declare class AutopilotChatService {
|
|
|
112
113
|
getPreHook(action: AutopilotChatPreHookAction): (data?: any) => Promise<boolean>;
|
|
113
114
|
sendInputStreamEvent(event: AutopilotChatInputStreamEvent): void;
|
|
114
115
|
sendOutputStreamEvent(event: AutopilotChatOutputStreamEvent): void;
|
|
116
|
+
publishSpeechToTextToggle(): void;
|
|
117
|
+
setSpeechToTextState(isActive: boolean): void;
|
|
118
|
+
get isSpeechToTextActive(): boolean;
|
|
115
119
|
setAttachmentsLoading(attachments: AutopilotChatFileInfo[]): void;
|
|
116
120
|
private _accumulateContentPart;
|
|
117
121
|
private _getAccumulatedContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatService.d.ts","sourceRoot":"","sources":["../../../../../src/material/components/ap-chat/service/ChatService.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EACV,0BAA0B,EAC1B,+BAA+B,EAC/B,0BAA0B,EAC1B,+BAA+B,EAC/B,6BAA6B,EAC7B,kBAAkB,EAClB,uBAAuB,EACvB,yBAAyB,EACzB,6BAA6B,EAC7B,qBAAqB,EACrB,oBAAoB,EACpB,6BAA6B,EAC7B,oBAAoB,EACpB,4BAA4B,EAC5B,sBAAsB,EACtB,8BAA8B,EAC9B,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACnB,4BAA4B,EAC5B,uBAAuB,EAEvB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAClB,+BAA+B,EAE/B,iBAAiB,EAElB,MAAM,aAAa,CAAC;AAMrB,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAC,UAAU,CAA4C;IACrE,OAAO,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"ChatService.d.ts","sourceRoot":"","sources":["../../../../../src/material/components/ap-chat/service/ChatService.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EACV,0BAA0B,EAC1B,+BAA+B,EAC/B,0BAA0B,EAC1B,+BAA+B,EAC/B,6BAA6B,EAC7B,kBAAkB,EAClB,uBAAuB,EACvB,yBAAyB,EACzB,6BAA6B,EAC7B,qBAAqB,EACrB,oBAAoB,EACpB,6BAA6B,EAC7B,oBAAoB,EACpB,4BAA4B,EAC5B,sBAAsB,EACtB,8BAA8B,EAC9B,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACnB,4BAA4B,EAC5B,uBAAuB,EAEvB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAClB,+BAA+B,EAE/B,iBAAiB,EAElB,MAAM,aAAa,CAAC;AAMrB,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAC,UAAU,CAA4C;IACrE,OAAO,CAAC,cAAc,CA+BpB;IACF,OAAO,CAAC,O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aAAa;IASb,YAAY,CAAC,MAAM,EAAE,MAAM;IAqB3B,YAAY;IASZ,sBAAsB,CAAC,OAAO,EAAE,+BAA+B,EAAE;IAUjE,sBAAsB;IAStB,SAAS,CAAC,MAAM,EAAE,MAAM;IAUxB,SAAS;IAST,QAAQ,CAAC,KAAK,EAAE,MAAM;IAUtB,QAAQ;IAUR,kBAAkB,CAAC,eAAe,EAAE,4BAA4B;IAUhE,kBAAkB;IAUlB,WAAW,CAAC,QAAQ,EAAE,OAAO;IAW7B,WAAW;IASX,IAAI,mBAAmB,iCAEtB;IAQD,kBAAkB,CAAC,OAAO,EAAE,MAAM;IAUlC,UAAU,CAAC,MAAM,EAAE,0BAA0B,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC,OAAO,CAAC;IAcrF,UAAU,CAAC,MAAM,EAAE,0BAA0B;IAQ7C,oBAAoB,CAAC,KAAK,EAAE,6BAA6B;IAQzD,qBAAqB,CAAC,KAAK,EAAE,8BAA8B;IAS3D,yBAAyB;IAWzB,oBAAoB,CAAC,QAAQ,EAAE,OAAO;IAStC,IAAI,oBAAoB,IAAI,OAAO,CAElC;IAOD,qBAAqB,CAAC,WAAW,EAAE,qBAAqB,EAAE;IAQ1D,OAAO,CAAC,sBAAsB;IAa9B,OAAO,CAAC,sBAAsB;IAc9B,OAAO,CAAC,wBAAwB;IAQhC,OAAO,CAAC,wBAAwB;CA0CjC"}
|
|
@@ -21,6 +21,7 @@ class AutopilotChatService {
|
|
|
21
21
|
settings: true,
|
|
22
22
|
headerSeparator: true,
|
|
23
23
|
audio: true,
|
|
24
|
+
audioStreaming: true,
|
|
24
25
|
fullHeight: true,
|
|
25
26
|
htmlPreview: true
|
|
26
27
|
},
|
|
@@ -56,6 +57,7 @@ class AutopilotChatService {
|
|
|
56
57
|
_locale = 'en';
|
|
57
58
|
_theme = 'light';
|
|
58
59
|
_resourceManager;
|
|
60
|
+
_isSpeechToTextActive = false;
|
|
59
61
|
constructor(instanceName){
|
|
60
62
|
this._instanceName = instanceName;
|
|
61
63
|
this._eventBus = new EventBus();
|
|
@@ -527,6 +529,18 @@ class AutopilotChatService {
|
|
|
527
529
|
sendOutputStreamEvent(event) {
|
|
528
530
|
this._eventBus.publish(AutopilotChatEvent.OutputStream, event);
|
|
529
531
|
}
|
|
532
|
+
publishSpeechToTextToggle() {
|
|
533
|
+
this._isSpeechToTextActive = !this._isSpeechToTextActive;
|
|
534
|
+
this._eventBus.publish(AutopilotChatEvent.SetSpeechToTextState, this._isSpeechToTextActive);
|
|
535
|
+
this._eventBus.publish(AutopilotChatEvent.SpeechToTextToggle, this._isSpeechToTextActive);
|
|
536
|
+
}
|
|
537
|
+
setSpeechToTextState(isActive) {
|
|
538
|
+
this._isSpeechToTextActive = isActive;
|
|
539
|
+
this._eventBus.publish(AutopilotChatEvent.SetSpeechToTextState, isActive);
|
|
540
|
+
}
|
|
541
|
+
get isSpeechToTextActive() {
|
|
542
|
+
return this._isSpeechToTextActive;
|
|
543
|
+
}
|
|
530
544
|
setAttachmentsLoading(attachments) {
|
|
531
545
|
this._internalService.publish(AutopilotChatInternalEvent.SetAttachmentsLoading, attachments);
|
|
532
546
|
}
|