@copilotkit/react-ui 1.50.0-beta.1 → 1.50.0-beta.3
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/CHANGELOG.md +9 -0
- package/dist/{chunk-HBZW7E5Z.mjs → chunk-3W6J75HS.mjs} +3 -3
- package/dist/chunk-3W6J75HS.mjs.map +1 -0
- package/dist/{chunk-SOB5EIL7.mjs → chunk-6PL5IKAT.mjs} +2 -2
- package/dist/{chunk-ODEHR7KI.mjs → chunk-GASWCRI7.mjs} +2 -2
- package/dist/{chunk-3JYVJHL5.mjs → chunk-IOZL5AMG.mjs} +5 -5
- package/dist/{chunk-3YWFGNSM.mjs → chunk-RYUCX3ZK.mjs} +1 -1
- package/dist/chunk-RYUCX3ZK.mjs.map +1 -0
- package/dist/{chunk-G35HUUDA.mjs → chunk-SF5OH7KP.mjs} +5 -5
- package/dist/{chunk-CQ2WALZ7.mjs → chunk-U2EHC4KT.mjs} +2 -2
- package/dist/{chunk-MPF6BJUF.mjs → chunk-VBYQQ5JS.mjs} +2 -2
- package/dist/{chunk-E6WVAOQA.mjs → chunk-YJ45UASA.mjs} +2 -2
- package/dist/components/chat/Chat.js +2 -2
- package/dist/components/chat/Chat.js.map +1 -1
- package/dist/components/chat/Chat.mjs +7 -7
- package/dist/components/chat/Input.js +2 -2
- package/dist/components/chat/Input.js.map +1 -1
- package/dist/components/chat/Input.mjs +1 -1
- package/dist/components/chat/Messages.js.map +1 -1
- package/dist/components/chat/Messages.mjs +5 -5
- package/dist/components/chat/Modal.js +2 -2
- package/dist/components/chat/Modal.js.map +1 -1
- package/dist/components/chat/Modal.mjs +8 -8
- package/dist/components/chat/Popup.js +2 -2
- package/dist/components/chat/Popup.js.map +1 -1
- package/dist/components/chat/Popup.mjs +9 -9
- package/dist/components/chat/Sidebar.js +2 -2
- package/dist/components/chat/Sidebar.js.map +1 -1
- package/dist/components/chat/Sidebar.mjs +9 -9
- package/dist/components/chat/index.js +2 -2
- package/dist/components/chat/index.js.map +1 -1
- package/dist/components/chat/index.mjs +12 -12
- package/dist/components/chat/messages/AssistantMessage.mjs +1 -1
- package/dist/components/chat/messages/ErrorMessage.mjs +1 -1
- package/dist/components/chat/messages/LegacyRenderMessage.js.map +1 -1
- package/dist/components/chat/messages/LegacyRenderMessage.mjs +4 -4
- package/dist/components/chat/messages/RenderMessage.js.map +1 -1
- package/dist/components/chat/messages/RenderMessage.mjs +3 -3
- package/dist/components/chat/messages/UserMessage.js.map +1 -1
- package/dist/components/chat/messages/UserMessage.mjs +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +12 -12
- package/dist/index.css +1 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -12
- package/dist/v2/index.css +4 -0
- package/dist/v2/index.css.map +1 -0
- package/dist/v2/index.d.ts +2 -0
- package/dist/v2/index.js +2 -0
- package/dist/v2/index.js.map +1 -0
- package/dist/v2/index.mjs +2 -0
- package/dist/v2/index.mjs.map +1 -0
- package/package.json +8 -8
- package/src/components/chat/Input.tsx +2 -2
- package/src/components/chat/messages/UserMessage.tsx +12 -10
- package/src/css/messages.css +1 -0
- package/src/v2/index.ts +1 -0
- package/src/v2/styles.css +1 -0
- package/tsup.config.ts +1 -1
- package/dist/chunk-3YWFGNSM.mjs.map +0 -1
- package/dist/chunk-HBZW7E5Z.mjs.map +0 -1
- /package/dist/{chunk-SOB5EIL7.mjs.map → chunk-6PL5IKAT.mjs.map} +0 -0
- /package/dist/{chunk-ODEHR7KI.mjs.map → chunk-GASWCRI7.mjs.map} +0 -0
- /package/dist/{chunk-3JYVJHL5.mjs.map → chunk-IOZL5AMG.mjs.map} +0 -0
- /package/dist/{chunk-G35HUUDA.mjs.map → chunk-SF5OH7KP.mjs.map} +0 -0
- /package/dist/{chunk-CQ2WALZ7.mjs.map → chunk-U2EHC4KT.mjs.map} +0 -0
- /package/dist/{chunk-MPF6BJUF.mjs.map → chunk-VBYQQ5JS.mjs.map} +0 -0
- /package/dist/{chunk-E6WVAOQA.mjs.map → chunk-YJ45UASA.mjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# ui
|
|
2
2
|
|
|
3
|
+
## 1.10.7-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fcc52cb: - fix: use `--copilot-kit-primary-color` as default `Messages` font color
|
|
8
|
+
- @copilotkit/react-core@1.10.7-next.0
|
|
9
|
+
- @copilotkit/runtime-client-gql@1.10.7-next.0
|
|
10
|
+
- @copilotkit/shared@1.10.7-next.0
|
|
11
|
+
|
|
3
12
|
## 1.10.6
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -19,7 +19,7 @@ var MAX_NEWLINES = 6;
|
|
|
19
19
|
var Input = ({
|
|
20
20
|
inProgress,
|
|
21
21
|
onSend,
|
|
22
|
-
chatReady =
|
|
22
|
+
chatReady = false,
|
|
23
23
|
onStop,
|
|
24
24
|
onUpload,
|
|
25
25
|
hideStopButton = false
|
|
@@ -57,7 +57,7 @@ var Input = ({
|
|
|
57
57
|
const { buttonIcon, buttonAlt } = useMemo(() => {
|
|
58
58
|
if (!chatReady)
|
|
59
59
|
return { buttonIcon: context.icons.spinnerIcon, buttonAlt: "Loading" };
|
|
60
|
-
return isInProgress && !hideStopButton ? { buttonIcon: context.icons.stopIcon, buttonAlt: "Stop" } : { buttonIcon: context.icons.sendIcon, buttonAlt: "Send" };
|
|
60
|
+
return isInProgress && !hideStopButton && chatReady ? { buttonIcon: context.icons.stopIcon, buttonAlt: "Stop" } : { buttonIcon: context.icons.sendIcon, buttonAlt: "Send" };
|
|
61
61
|
}, [isInProgress, chatReady, hideStopButton, context.icons.stopIcon, context.icons.sendIcon]);
|
|
62
62
|
const showPushToTalk = pushToTalkConfigured && (pushToTalkState === "idle" || pushToTalkState === "recording") && !inProgress;
|
|
63
63
|
const { interrupt } = useCopilotChatInternal();
|
|
@@ -123,4 +123,4 @@ var Input = ({
|
|
|
123
123
|
export {
|
|
124
124
|
Input
|
|
125
125
|
};
|
|
126
|
-
//# sourceMappingURL=chunk-
|
|
126
|
+
//# sourceMappingURL=chunk-3W6J75HS.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/chat/Input.tsx"],"sourcesContent":["import React, { useMemo, useRef, useState } from \"react\";\nimport { InputProps } from \"./props\";\nimport { useChatContext } from \"./ChatContext\";\nimport AutoResizingTextarea from \"./Textarea\";\nimport { usePushToTalk } from \"../../hooks/use-push-to-talk\";\nimport { useCopilotContext, useCopilotChatInternal } from \"@copilotkit/react-core\";\nimport { PoweredByTag } from \"./PoweredByTag\";\n\nconst MAX_NEWLINES = 6;\n\nexport const Input = ({\n inProgress,\n onSend,\n chatReady = false,\n onStop,\n onUpload,\n hideStopButton = false,\n}: InputProps) => {\n const context = useChatContext();\n const copilotContext = useCopilotContext();\n\n const showPoweredBy = !copilotContext.copilotApiConfig?.publicApiKey;\n\n const pushToTalkConfigured =\n copilotContext.copilotApiConfig.textToSpeechUrl !== undefined &&\n copilotContext.copilotApiConfig.transcribeAudioUrl !== undefined;\n\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n const [isComposing, setIsComposing] = useState(false);\n\n const handleDivClick = (event: React.MouseEvent<HTMLDivElement>) => {\n const target = event.target as HTMLElement;\n\n // If the user clicked a button or inside a button, don't focus the textarea\n if (target.closest(\"button\")) return;\n\n // If the user clicked the textarea, do nothing (it's already focused)\n if (target.tagName === \"TEXTAREA\") return;\n\n // Otherwise, focus the textarea\n textareaRef.current?.focus();\n };\n\n const [text, setText] = useState(\"\");\n const send = () => {\n if (inProgress) return;\n onSend(text);\n setText(\"\");\n\n textareaRef.current?.focus();\n };\n\n // tylerslaton:\n //\n // This scrolls CopilotKit into view always. Reading the commit history, it was likely\n // added to fix a bug but it is causing issues now.\n //\n // For the future, if we want this behavior again, we will need to find a way to do it without\n // forcing CopilotKit to always be in view. This code causes this because focusing an element\n // in most browsers will scroll that element into view.\n //\n // useEffect(() => {\n // if (isVisible) {\n // textareaRef.current?.focus();\n // }\n // }, [isVisible]);\n\n const { pushToTalkState, setPushToTalkState } = usePushToTalk({\n sendFunction: onSend,\n inProgress,\n });\n\n const isInProgress = inProgress || pushToTalkState === \"transcribing\";\n const { buttonIcon, buttonAlt } = useMemo(() => {\n if (!chatReady) return { buttonIcon: context.icons.spinnerIcon, buttonAlt: \"Loading\" };\n return isInProgress && !hideStopButton && chatReady\n ? { buttonIcon: context.icons.stopIcon, buttonAlt: \"Stop\" }\n : { buttonIcon: context.icons.sendIcon, buttonAlt: \"Send\" };\n }, [isInProgress, chatReady, hideStopButton, context.icons.stopIcon, context.icons.sendIcon]);\n const showPushToTalk =\n pushToTalkConfigured &&\n (pushToTalkState === \"idle\" || pushToTalkState === \"recording\") &&\n !inProgress;\n\n const { interrupt } = useCopilotChatInternal();\n\n const canSend = useMemo(() => {\n return !isInProgress && text.trim().length > 0 && pushToTalkState === \"idle\" && !interrupt;\n }, [interrupt, isInProgress, text, pushToTalkState]);\n\n const canStop = useMemo(() => {\n return isInProgress && !hideStopButton;\n }, [isInProgress, hideStopButton]);\n\n const sendDisabled = !canSend && !canStop;\n\n return (\n <div className={`copilotKitInputContainer ${showPoweredBy ? \"poweredByContainer\" : \"\"}`}>\n <div className=\"copilotKitInput\" onClick={handleDivClick}>\n <AutoResizingTextarea\n ref={textareaRef}\n placeholder={context.labels.placeholder}\n autoFocus={false}\n maxRows={MAX_NEWLINES}\n value={text}\n onChange={(event) => setText(event.target.value)}\n onCompositionStart={() => setIsComposing(true)}\n onCompositionEnd={() => setIsComposing(false)}\n onKeyDown={(event) => {\n if (event.key === \"Enter\" && !event.shiftKey && !isComposing) {\n event.preventDefault();\n if (canSend) {\n send();\n }\n }\n }}\n />\n <div className=\"copilotKitInputControls\">\n {onUpload && (\n <button onClick={onUpload} className=\"copilotKitInputControlButton\">\n {context.icons.uploadIcon}\n </button>\n )}\n\n <div style={{ flexGrow: 1 }} />\n\n {showPushToTalk && (\n <button\n onClick={() =>\n setPushToTalkState(pushToTalkState === \"idle\" ? \"recording\" : \"transcribing\")\n }\n className={\n pushToTalkState === \"recording\"\n ? \"copilotKitInputControlButton copilotKitPushToTalkRecording\"\n : \"copilotKitInputControlButton\"\n }\n >\n {context.icons.pushToTalkIcon}\n </button>\n )}\n <button\n disabled={sendDisabled}\n onClick={isInProgress && !hideStopButton ? onStop : send}\n data-copilotkit-in-progress={inProgress}\n data-test-id={inProgress ? \"copilot-chat-request-in-progress\" : \"copilot-chat-ready\"}\n className=\"copilotKitInputControlButton\"\n aria-label={buttonAlt}\n >\n {buttonIcon}\n </button>\n </div>\n </div>\n <PoweredByTag showPoweredBy={showPoweredBy} />\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAgB,SAAS,QAAQ,gBAAgB;AAKjD,SAAS,mBAAmB,8BAA8B;AA8FlD,cAkBA,YAlBA;AA3FR,IAAM,eAAe;AAEd,IAAM,QAAQ,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA,iBAAiB;AACnB,MAAkB;AAjBlB;AAkBE,QAAM,UAAU,eAAe;AAC/B,QAAM,iBAAiB,kBAAkB;AAEzC,QAAM,gBAAgB,GAAC,oBAAe,qBAAf,mBAAiC;AAExD,QAAM,uBACJ,eAAe,iBAAiB,oBAAoB,UACpD,eAAe,iBAAiB,uBAAuB;AAEzD,QAAM,cAAc,OAA4B,IAAI;AACpD,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,KAAK;AAEpD,QAAM,iBAAiB,CAAC,UAA4C;AA9BtE,QAAAA;AA+BI,UAAM,SAAS,MAAM;AAGrB,QAAI,OAAO,QAAQ,QAAQ;AAAG;AAG9B,QAAI,OAAO,YAAY;AAAY;AAGnC,KAAAA,MA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
import {
|
|
5
5
|
__spreadProps,
|
|
6
6
|
__spreadValues
|
|
@@ -27,4 +27,4 @@ function CopilotSidebar(props) {
|
|
|
27
27
|
export {
|
|
28
28
|
CopilotSidebar
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-6PL5IKAT.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RenderMessage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VBYQQ5JS.mjs";
|
|
4
4
|
|
|
5
5
|
// src/components/chat/messages/LegacyRenderMessage.tsx
|
|
6
6
|
import { aguiToGQL } from "@copilotkit/runtime-client-gql";
|
|
@@ -130,4 +130,4 @@ var LegacyRenderMessage = ({
|
|
|
130
130
|
export {
|
|
131
131
|
LegacyRenderMessage
|
|
132
132
|
};
|
|
133
|
-
//# sourceMappingURL=chunk-
|
|
133
|
+
//# sourceMappingURL=chunk-GASWCRI7.mjs.map
|
|
@@ -9,19 +9,19 @@ import {
|
|
|
9
9
|
} from "./chunk-UFN2VWSR.mjs";
|
|
10
10
|
import {
|
|
11
11
|
CopilotChat
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SF5OH7KP.mjs";
|
|
13
13
|
import {
|
|
14
14
|
Input
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3W6J75HS.mjs";
|
|
16
16
|
import {
|
|
17
17
|
Messages
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-YJ45UASA.mjs";
|
|
19
19
|
import {
|
|
20
20
|
AssistantMessage
|
|
21
21
|
} from "./chunk-IHFR6PYG.mjs";
|
|
22
22
|
import {
|
|
23
23
|
UserMessage
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-RYUCX3ZK.mjs";
|
|
25
25
|
import {
|
|
26
26
|
ChatContextProvider,
|
|
27
27
|
useChatContext
|
|
@@ -219,4 +219,4 @@ var CopilotModal = (_a) => {
|
|
|
219
219
|
export {
|
|
220
220
|
CopilotModal
|
|
221
221
|
};
|
|
222
|
-
//# sourceMappingURL=chunk-
|
|
222
|
+
//# sourceMappingURL=chunk-IOZL5AMG.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/chat/messages/UserMessage.tsx"],"sourcesContent":["import { UserMessageProps } from \"../props\";\n\ntype UserMessageContent = NonNullable<UserMessageProps[\"message\"]>[\"content\"];\n\nconst getTextContent = (content: UserMessageContent | undefined): string | undefined => {\n if (typeof content === \"undefined\") {\n return undefined;\n }\n\n if (typeof content === \"string\") {\n return content;\n }\n\n return (\n content\n .map((part) => {\n if (part.type === \"text\") {\n return part.text;\n }\n return undefined;\n })\n .filter((value): value is string => typeof value === \"string\" && value.length > 0)\n .join(\" \")\n .trim() || undefined\n );\n};\n\nexport const UserMessage = (props: UserMessageProps) => {\n const { message, ImageRenderer } = props;\n const isImageMessage = message && \"image\" in message && Boolean(message.image);\n\n if (isImageMessage) {\n const imageMessage = message!;\n const content = getTextContent(imageMessage?.content);\n\n return (\n <div className=\"copilotKitMessage copilotKitUserMessage\">\n <ImageRenderer image={imageMessage.image!} content={content} />\n </div>\n );\n }\n\n const content = getTextContent(message?.content);\n\n return <div className=\"copilotKitMessage copilotKitUserMessage\">{content}</div>;\n};\n"],"mappings":";AAqCQ;AAjCR,IAAM,iBAAiB,CAAC,YAAgE;AACtF,MAAI,OAAO,YAAY,aAAa;AAClC,WAAO;AAAA,EACT;AAEA,MAAI,OAAO,YAAY,UAAU;AAC/B,WAAO;AAAA,EACT;AAEA,SACE,QACG,IAAI,CAAC,SAAS;AACb,QAAI,KAAK,SAAS,QAAQ;AACxB,aAAO,KAAK;AAAA,IACd;AACA,WAAO;AAAA,EACT,CAAC,EACA,OAAO,CAAC,UAA2B,OAAO,UAAU,YAAY,MAAM,SAAS,CAAC,EAChF,KAAK,GAAG,EACR,KAAK,KAAK;AAEjB;AAEO,IAAM,cAAc,CAAC,UAA4B;AACtD,QAAM,EAAE,SAAS,cAAc,IAAI;AACnC,QAAM,iBAAiB,WAAW,WAAW,WAAW,QAAQ,QAAQ,KAAK;AAE7E,MAAI,gBAAgB;AAClB,UAAM,eAAe;AACrB,UAAMA,WAAU,eAAe,6CAAc,OAAO;AAEpD,WACE,oBAAC,SAAI,WAAU,2CACb,8BAAC,iBAAc,OAAO,aAAa,OAAQ,SAASA,UAAS,GAC/D;AAAA,EAEJ;AAEA,QAAM,UAAU,eAAe,mCAAS,OAAO;AAE/C,SAAO,oBAAC,SAAI,WAAU,2CAA2C,mBAAQ;AAC3E;","names":["content"]}
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
} from "./chunk-PLHTVHUW.mjs";
|
|
7
7
|
import {
|
|
8
8
|
Input
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3W6J75HS.mjs";
|
|
10
10
|
import {
|
|
11
11
|
Messages
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YJ45UASA.mjs";
|
|
13
13
|
import {
|
|
14
14
|
RenderMessage
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-VBYQQ5JS.mjs";
|
|
16
16
|
import {
|
|
17
17
|
AssistantMessage
|
|
18
18
|
} from "./chunk-IHFR6PYG.mjs";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-DBKRAOH7.mjs";
|
|
22
22
|
import {
|
|
23
23
|
UserMessage
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-RYUCX3ZK.mjs";
|
|
25
25
|
import {
|
|
26
26
|
ChatContext,
|
|
27
27
|
ChatContextProvider
|
|
@@ -428,4 +428,4 @@ export {
|
|
|
428
428
|
CopilotChat,
|
|
429
429
|
WrappedCopilotChat
|
|
430
430
|
};
|
|
431
|
-
//# sourceMappingURL=chunk-
|
|
431
|
+
//# sourceMappingURL=chunk-SF5OH7KP.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotModal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IOZL5AMG.mjs";
|
|
4
4
|
import {
|
|
5
5
|
__spreadProps,
|
|
6
6
|
__spreadValues
|
|
@@ -18,4 +18,4 @@ function CopilotPopup(props) {
|
|
|
18
18
|
export {
|
|
19
19
|
CopilotPopup
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
//# sourceMappingURL=chunk-U2EHC4KT.mjs.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-DBKRAOH7.mjs";
|
|
7
7
|
import {
|
|
8
8
|
UserMessage
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RYUCX3ZK.mjs";
|
|
10
10
|
import {
|
|
11
11
|
__objRest
|
|
12
12
|
} from "./chunk-MRXNTQOX.mjs";
|
|
@@ -77,4 +77,4 @@ function RenderMessage(_a) {
|
|
|
77
77
|
export {
|
|
78
78
|
RenderMessage
|
|
79
79
|
};
|
|
80
|
-
//# sourceMappingURL=chunk-
|
|
80
|
+
//# sourceMappingURL=chunk-VBYQQ5JS.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LegacyRenderMessage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GASWCRI7.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useChatContext
|
|
6
6
|
} from "./chunk-IEMQ2SQW.mjs";
|
|
@@ -181,4 +181,4 @@ export {
|
|
|
181
181
|
Messages,
|
|
182
182
|
useScrollToBottom
|
|
183
183
|
};
|
|
184
|
-
//# sourceMappingURL=chunk-
|
|
184
|
+
//# sourceMappingURL=chunk-YJ45UASA.mjs.map
|
|
@@ -1649,7 +1649,7 @@ var MAX_NEWLINES = 6;
|
|
|
1649
1649
|
var Input = ({
|
|
1650
1650
|
inProgress,
|
|
1651
1651
|
onSend,
|
|
1652
|
-
chatReady =
|
|
1652
|
+
chatReady = false,
|
|
1653
1653
|
onStop,
|
|
1654
1654
|
onUpload,
|
|
1655
1655
|
hideStopButton = false
|
|
@@ -1687,7 +1687,7 @@ var Input = ({
|
|
|
1687
1687
|
const { buttonIcon, buttonAlt } = (0, import_react10.useMemo)(() => {
|
|
1688
1688
|
if (!chatReady)
|
|
1689
1689
|
return { buttonIcon: context.icons.spinnerIcon, buttonAlt: "Loading" };
|
|
1690
|
-
return isInProgress && !hideStopButton ? { buttonIcon: context.icons.stopIcon, buttonAlt: "Stop" } : { buttonIcon: context.icons.sendIcon, buttonAlt: "Send" };
|
|
1690
|
+
return isInProgress && !hideStopButton && chatReady ? { buttonIcon: context.icons.stopIcon, buttonAlt: "Stop" } : { buttonIcon: context.icons.sendIcon, buttonAlt: "Send" };
|
|
1691
1691
|
}, [isInProgress, chatReady, hideStopButton, context.icons.stopIcon, context.icons.sendIcon]);
|
|
1692
1692
|
const showPushToTalk = pushToTalkConfigured && (pushToTalkState === "idle" || pushToTalkState === "recording") && !inProgress;
|
|
1693
1693
|
const { interrupt } = (0, import_react_core3.useCopilotChatInternal)();
|