mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-11 19:53:50 +08:00
feat: new UI for chat file manager is ready
This commit is contained in:
@@ -223,23 +223,9 @@ export function processContent(content) {
|
||||
}
|
||||
|
||||
export function processPrompt(prompt) {
|
||||
prompt = prompt.replace(/&/g, "&")
|
||||
return prompt.replace(/&/g, "&")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">");
|
||||
|
||||
const linkRegex = /(https?:\/\/\S+)/g;
|
||||
const links = prompt.match(linkRegex);
|
||||
if (links) {
|
||||
for (let link of links) {
|
||||
if (isImage(link)) {
|
||||
const index = prompt.indexOf(link)
|
||||
if (prompt.substring(index - 1, 2) !== "]") {
|
||||
prompt = prompt.replace(link, "\n\n")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return prompt
|
||||
}
|
||||
|
||||
// 判断是否为微信浏览器
|
||||
@@ -258,3 +244,4 @@ export function showLoginDialog(router) {
|
||||
// on cancel
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user