|
|
@@ -115,11 +115,14 @@ import { getClientConfig } from "../config/client";
|
|
|
import { useAllModels } from "../utils/hooks";
|
|
|
import { MultimodalContent } from "../client/api";
|
|
|
|
|
|
-const localStorage = safeLocalStorage();
|
|
|
import { ClientApi } from "../client/api";
|
|
|
import { createTTSPlayer } from "../utils/audio";
|
|
|
import { MsEdgeTTS, OUTPUT_FORMAT } from "../utils/ms_edge_tts";
|
|
|
|
|
|
+import { isEmpty } from "lodash-es";
|
|
|
+
|
|
|
+const localStorage = safeLocalStorage();
|
|
|
+
|
|
|
const ttsPlayer = createTTSPlayer();
|
|
|
|
|
|
const Markdown = dynamic(async () => (await import("./markdown")).Markdown, {
|
|
|
@@ -1015,7 +1018,7 @@ function _Chat() {
|
|
|
};
|
|
|
|
|
|
const doSubmit = (userInput: string) => {
|
|
|
- if (userInput.trim() === "") return;
|
|
|
+ if (userInput.trim() === "" && isEmpty(attachImages)) return;
|
|
|
const matchCommand = chatCommands.match(userInput);
|
|
|
if (matchCommand.matched) {
|
|
|
setUserInput("");
|