chore: type fixed
This commit is contained in:
parent
310ca7cb23
commit
7d615b4163
@ -179,7 +179,7 @@ const ChatInput = ({
|
|||||||
const mcpExtension = extensionManager.get<MCPExtension>(ExtensionTypeEnum.MCP)
|
const mcpExtension = extensionManager.get<MCPExtension>(ExtensionTypeEnum.MCP)
|
||||||
const MCPToolComponent = mcpExtension?.getToolComponent?.()
|
const MCPToolComponent = mcpExtension?.getToolComponent?.()
|
||||||
|
|
||||||
const handleSendMesage = async (prompt: string) => {
|
const handleSendMessage = async (prompt: string) => {
|
||||||
if (!selectedModel) {
|
if (!selectedModel) {
|
||||||
setMessage('Please select a model to start chatting.')
|
setMessage('Please select a model to start chatting.')
|
||||||
return
|
return
|
||||||
@ -630,7 +630,7 @@ const ChatInput = ({
|
|||||||
) {
|
) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
// Submit the message when Enter is pressed without Shift
|
// Submit the message when Enter is pressed without Shift
|
||||||
handleSendMesage(prompt)
|
handleSendMessage(prompt)
|
||||||
// When Shift+Enter is pressed, a new line is added (default behavior)
|
// When Shift+Enter is pressed, a new line is added (default behavior)
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@ -859,7 +859,7 @@ const ChatInput = ({
|
|||||||
size="icon"
|
size="icon"
|
||||||
disabled={!prompt.trim() && uploadedFiles.length === 0}
|
disabled={!prompt.trim() && uploadedFiles.length === 0}
|
||||||
data-test-id="send-message-button"
|
data-test-id="send-message-button"
|
||||||
onClick={() => handleSendMesage(prompt)}
|
onClick={() => handleSendMessage(prompt)}
|
||||||
>
|
>
|
||||||
{streamingContent ? (
|
{streamingContent ? (
|
||||||
<span className="animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full" />
|
<span className="animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user