fix: the file ask box, follow-up suggestions and queued messages no longer send with no model selected (#33838)

This commit is contained in:
G30 authored and GitHub committed 2026-11-07 23:08:11 +09:00
1 parent e1aa2e30f7
commit b7abeb4e24
1 file changed
+6
+6
View File
@@ -517,6 +517,7 @@
let files: any[] = [];
let terminalContext: TerminalContext | null = null;
const askFile = async (instruction: string, file: FilesystemFile) => {
if (selectedModels.includes('')) throw new Error($i18n.t('Model not selected'));
const attachments = [structuredClone(file)];
if (fullWidthTabs) {
terminalTabs?.focusMainChat();
@@ -3750,6 +3751,7 @@
inputFiles: any[],
bridgeRequest: { userMessageId: string; modelId: string } | null = null
) => {
if (selectedModels.includes('')) throw new Error($i18n.t('Model not selected'));
const _files = structuredClone(inputFiles);
chatFiles.push(
@@ -4820,6 +4822,10 @@
};
const submitMessage = async (parentId, prompt) => {
if (selectedModels.includes('')) {
toast.error($i18n.t('Model not selected'));
return;
}
let userPrompt = prompt;
let userMessageId = uuidv4();