Fix multiple model chat, the content overwrite the current chat session (#17566)

This commit is contained in:
Wang Qi
2026-07-30 16:50:13 +08:00
committed by GitHub
parent 4592d06a67
commit 5d76b0b96c
3 changed files with 8 additions and 4 deletions

View File

@@ -26,6 +26,7 @@ import { AudioButton } from '../ui/audio-button';
export type NextMessageInputOnPressEnterParameter = {
enableThinking?: string;
enableInternet?: boolean;
store_history_messages?: boolean;
};
interface NextMessageInputProps {

View File

@@ -139,7 +139,7 @@ const ChatCard = forwardRef(function ChatCard(
// resend with the card's model settings (llm_id, temperature, ...).
const sendCardMessage = useCallback(
({ message, messages }: { message: IMessage; messages?: IMessage[] }) =>
sendMessage({ message, messages, ...form.getValues() }),
sendMessage({ message, messages, ...form.getValues(), store_history_messages: false }),
[sendMessage, form],
);
@@ -182,7 +182,7 @@ const ChatCard = forwardRef(function ChatCard(
useImperativeHandle(
ref,
(): HandlePressEnterType => (params) =>
handlePressEnter({ ...params, ...form.getValues() }),
handlePressEnter({ ...params, ...form.getValues(), store_history_messages: false }),
);
useEffect(() => {