Skip to content

Commit be08fa2

Browse files
authored
Merge pull request #124 from iceljc/features/refine-chat-window
relax load text editor condition
2 parents 444078b + 43c7eed commit be08fa2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/routes/chat/[agentId]/[conversationId]/chat-box.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,9 @@
123123
let loadFileEditor = false;
124124
125125
$: {
126-
loadTextEditor = TEXT_EDITORS.includes(lastBotMsg?.rich_content?.editor || '');
127-
loadFileEditor = FILE_EDITORS.includes(lastBotMsg?.rich_content?.editor || '');
126+
const editor = lastBotMsg?.rich_content?.editor || '';
127+
loadTextEditor = TEXT_EDITORS.includes(editor) || !Object.values(EditorType).includes(editor);
128+
loadFileEditor = FILE_EDITORS.includes(editor);
128129
loadEditor = !isSendingMsg && !isThinking && (loadTextEditor || loadFileEditor);
129130
}
130131

0 commit comments

Comments
 (0)