4.8.10 test (#2401)

* perf: i18n

* perf: i18n and img tip

* perf: readme

* perf: hide tool ai response

* fix: copy app

* fix: parse image url regx

* perf: folder collection forbid update
This commit is contained in:
Archer
2024-08-16 13:09:17 +08:00
committed by GitHub
parent 5bf0dd0ef1
commit 61347d9aaa
29 changed files with 358 additions and 296 deletions

View File

@@ -118,7 +118,8 @@ export const loadRequestMessages = async ({
}
// 正则表达式匹配图片URL
const imageRegex = /(https?:\/\/.*\.(?:png|jpe?g|gif|webp|bmp|tiff?|svg|ico|heic|avif))/i;
const imageRegex =
/(https?:\/\/[^\s/$.?#].[^\s]*\.(?:png|jpe?g|gif|webp|bmp|tiff?|svg|ico|heic|avif))/i;
const result: { type: 'text' | 'image'; value: string }[] = [];
let lastIndex = 0;

View File

@@ -110,10 +110,15 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
const requestBody = await (() => {
if (!httpJsonBody) return {};
try {
// Replace all variables in the string body
httpJsonBody = replaceVariable(httpJsonBody, allVariables);
// Text body, return directly
if (headers['Content-Type']?.includes('text/plain')) {
return httpJsonBody?.replaceAll(UNDEFINED_SIGN, 'null');
}
// Json body, parse and return
const jsonParse = JSON.parse(httpJsonBody);
const removeSignJson = removeUndefinedSign(jsonParse);
return removeSignJson;