fix: plugin select files and ai response check (#3104)

* fix: plugin select files and ai response check

* perf: text editor selector;tool call tip;remove invalid image url;

* perf: select file

* perf: drop files
This commit is contained in:
Archer
2024-11-09 14:43:15 +08:00
committed by archer
parent 8bd0749afe
commit 72836402be
27 changed files with 162 additions and 80 deletions

View File

@@ -19,6 +19,7 @@ export const detectFileEncoding = (buffer: Buffer) => {
// Url => user upload file type
export const parseUrlToFileType = (url: string): UserChatItemValueItemType['file'] | undefined => {
if (typeof url !== 'string') return;
const parseUrl = new URL(url, 'https://locaohost:3000');
const filename = (() => {