Fix: After deleting all conversation lists, the chat input box can still be used for input. #4907 (#4909)

### What problem does this PR solve?

Fix: After deleting all conversation lists, the chat input box can still
be used for input. #4907

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2025-02-12 16:54:14 +08:00
committed by GitHub
parent 7f06712a30
commit d599707154
6 changed files with 44 additions and 29 deletions

13
web/src/utils/llm-util.ts Normal file
View File

@ -0,0 +1,13 @@
export const getLLMIconName = (fid: string, llm_name: string) => {
if (fid === 'FastEmbed') {
return llm_name.split('/').at(0) ?? '';
}
return fid;
};
export const getLlmNameAndFIdByLlmId = (llmId?: string) => {
const [llmName, fId] = llmId?.split('@') || [];
return { fId, llmName };
};