diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/index.jsx index 34df4c1b2ee..0284e211d7d 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/index.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/index.jsx @@ -82,7 +82,7 @@ export default function ChatHistory({ }; const handleSendSuggestedMessage = (heading, message) => { - sendCommand(`${heading} ${message}`, true); + sendCommand({ text: `${heading} ${message}`, autoSubmit: true }); }; const saveEditedMessage = async ({ @@ -107,7 +107,12 @@ export default function ChatHistory({ updatedHistory[updatedHistory.length - 1].content = editedMessage; // remove all edited messages after the edited message in backend await Workspace.deleteEditedChats(workspace.slug, threadSlug, chatId); - sendCommand(editedMessage, true, updatedHistory, attachments); + sendCommand({ + text: editedMessage, + autoSubmit: true, + history: updatedHistory, + attachments, + }); return; } diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AgentMenu/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AgentMenu/index.jsx index 4e3822bcbee..59662bf01f0 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AgentMenu/index.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AgentMenu/index.jsx @@ -80,7 +80,7 @@ export function AvailableAgents({ const handleAgentClick = () => { setShowing(false); - sendCommand("@agent ", false); + sendCommand({ text: "@agent " }); promptRef?.current?.focus(); }; diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/SlashPresets/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/SlashPresets/index.jsx index 1bec5230479..d38378536ab 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/SlashPresets/index.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/SlashPresets/index.jsx @@ -119,7 +119,7 @@ export default function SlashPresets({ setShowing, sendCommand, promptRef }) { preset={preset} onUse={() => { setShowing(false); - sendCommand(`${preset.command} `, false); + sendCommand({ text: `${preset.command} ` }); promptRef?.current?.focus(); }} onEdit={handleEditPreset} diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/endAgentSession.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/endAgentSession.jsx index 6a8d70f6eb1..bc07c864ba7 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/endAgentSession.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/endAgentSession.jsx @@ -8,7 +8,7 @@ export default function EndAgentSession({ setShowing, sendCommand }) {