Skip to content

Commit 206fd7e

Browse files
authored
fix: question guide prompt save & sub route image (#5672)
* fix: question guide prompt save & sub route image * fix markdown
1 parent 3099b33 commit 206fd7e

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

document/content/docs/upgrading/4-12/4125.mdx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ description: 'FastGPT V4.12.5 更新说明'
1313
## 🐛 修复
1414

1515
1. debug 模式下,全局变量未传递。
16-
2. debug 模式下,前方节点参数无法传递至后方节点
16+
2. debug 模式下,前方节点参数无法传递至后方节点
1717
3. 调试模式下,开启“自动执行”,会跳过外部变量的填写。
18-
4. 自动语音回复未生效
19-
5. 节点复制,报错捕获配置丢失
18+
4. 自动语音回复未生效。
19+
5. 节点复制,报错捕获配置丢失。
20+
6. “猜你想问”的自定义提示词,保存时,上一次的值会被置空。
21+
7. 配置了二级路由的情况下,知识库检索出来的图片地址拼接异常。
22+
8. Prompt 编辑器,键盘输入时会清除掉 Markdown 标记。
2023

2124
## 🔨 插件更新
2225

document/data/doc-last-modified.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"document/content/docs/introduction/development/proxy/http_proxy.mdx": "2025-07-23T21:35:03+08:00",
4040
"document/content/docs/introduction/development/proxy/nginx.mdx": "2025-07-23T21:35:03+08:00",
4141
"document/content/docs/introduction/development/sealos.mdx": "2025-08-05T23:20:39+08:00",
42+
"document/content/docs/introduction/development/signoz.mdx": "2025-09-17T22:29:56+08:00",
4243
"document/content/docs/introduction/guide/DialogBoxes/htmlRendering.mdx": "2025-07-23T21:35:03+08:00",
4344
"document/content/docs/introduction/guide/DialogBoxes/quoteList.mdx": "2025-07-23T21:35:03+08:00",
4445
"document/content/docs/introduction/guide/admin/sso.mdx": "2025-09-08T20:07:04+08:00",
@@ -63,7 +64,7 @@
6364
"document/content/docs/introduction/guide/dashboard/workflow/http.mdx": "2025-07-23T21:35:03+08:00",
6465
"document/content/docs/introduction/guide/dashboard/workflow/knowledge_base_search_merge.mdx": "2025-07-23T21:35:03+08:00",
6566
"document/content/docs/introduction/guide/dashboard/workflow/laf.mdx": "2025-07-23T21:35:03+08:00",
66-
"document/content/docs/introduction/guide/dashboard/workflow/loop.mdx": "2025-07-23T21:35:03+08:00",
67+
"document/content/docs/introduction/guide/dashboard/workflow/loop.mdx": "2025-09-17T22:29:56+08:00",
6768
"document/content/docs/introduction/guide/dashboard/workflow/question_classify.mdx": "2025-07-23T21:35:03+08:00",
6869
"document/content/docs/introduction/guide/dashboard/workflow/reply.mdx": "2025-07-23T21:35:03+08:00",
6970
"document/content/docs/introduction/guide/dashboard/workflow/sandbox.mdx": "2025-07-23T21:35:03+08:00",
@@ -80,7 +81,7 @@
8081
"document/content/docs/introduction/guide/knowledge_base/template.mdx": "2025-07-23T21:35:03+08:00",
8182
"document/content/docs/introduction/guide/knowledge_base/third_dataset.mdx": "2025-07-24T13:00:27+08:00",
8283
"document/content/docs/introduction/guide/knowledge_base/websync.mdx": "2025-08-05T23:20:39+08:00",
83-
"document/content/docs/introduction/guide/knowledge_base/yuque_dataset.mdx": "2025-09-17T19:04:12+08:00",
84+
"document/content/docs/introduction/guide/knowledge_base/yuque_dataset.mdx": "2025-09-17T22:29:56+08:00",
8485
"document/content/docs/introduction/guide/plugins/bing_search_plugin.mdx": "2025-07-23T21:35:03+08:00",
8586
"document/content/docs/introduction/guide/plugins/dev_system_tool.mdx": "2025-08-20T19:00:48+08:00",
8687
"document/content/docs/introduction/guide/plugins/doc2x_plugin_guide.mdx": "2025-07-23T21:35:03+08:00",
@@ -98,7 +99,7 @@
9899
"document/content/docs/protocol/terms.en.mdx": "2025-08-03T22:37:45+08:00",
99100
"document/content/docs/protocol/terms.mdx": "2025-08-03T22:37:45+08:00",
100101
"document/content/docs/toc.en.mdx": "2025-08-04T13:42:36+08:00",
101-
"document/content/docs/toc.mdx": "2025-09-17T18:33:31+08:00",
102+
"document/content/docs/toc.mdx": "2025-09-17T22:29:56+08:00",
102103
"document/content/docs/upgrading/4-10/4100.mdx": "2025-08-02T19:38:37+08:00",
103104
"document/content/docs/upgrading/4-10/4101.mdx": "2025-09-08T20:07:20+08:00",
104105
"document/content/docs/upgrading/4-11/4110.mdx": "2025-08-05T23:20:39+08:00",
@@ -107,8 +108,8 @@
107108
"document/content/docs/upgrading/4-12/4121.mdx": "2025-09-07T14:41:48+08:00",
108109
"document/content/docs/upgrading/4-12/4122.mdx": "2025-09-07T14:41:48+08:00",
109110
"document/content/docs/upgrading/4-12/4123.mdx": "2025-09-07T20:55:14+08:00",
110-
"document/content/docs/upgrading/4-12/4124.mdx": "2025-09-17T18:36:54+08:00",
111-
"document/content/docs/upgrading/4-12/4125.mdx": "2025-09-17T21:22:47+08:00",
111+
"document/content/docs/upgrading/4-12/4124.mdx": "2025-09-17T22:29:56+08:00",
112+
"document/content/docs/upgrading/4-12/4125.mdx": "2025-09-18T16:15:12+08:00",
112113
"document/content/docs/upgrading/4-8/40.mdx": "2025-08-02T19:38:37+08:00",
113114
"document/content/docs/upgrading/4-8/41.mdx": "2025-08-02T19:38:37+08:00",
114115
"document/content/docs/upgrading/4-8/42.mdx": "2025-08-02T19:38:37+08:00",

packages/service/common/file/image/utils.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@ export const getImageBase64 = async (url: string) => {
3535

3636
export const addEndpointToImageUrl = (text: string) => {
3737
const baseURL = process.env.FE_DOMAIN;
38+
const subRoute = process.env.NEXT_PUBLIC_BASE_URL || '';
3839
if (!baseURL) return text;
39-
// 匹配 /api/system/img/xxx.xx 的图片链接,并追加 baseURL
40-
return text.replace(
41-
/(?<!https?:\/\/[^\s]*)(?:\/api\/system\/img\/[^\s.]*\.[^\s]*)/g,
42-
(match) => `${baseURL}${match}`
40+
const regex = new RegExp(
41+
`(?<!https?:\\/\\/[^\\s]*)(?:${subRoute}\\/api\\/system\\/img\\/[^\\s.]*\\.[^\\s]*)`,
42+
'g'
4343
);
44+
// 匹配 ${subRoute}/api/system/img/xxx.xx 的图片链接,并追加 baseURL
45+
return text.replace(regex, (match) => {
46+
return `${baseURL}${match}`;
47+
});
4448
};

packages/web/components/common/Textarea/CustomPromptEditor/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ const CustomPromptEditor = ({
126126
border="none"
127127
p={0}
128128
mb={2}
129+
rounded={'none'}
129130
_focus={{
130131
border: 'none',
131132
boxShadow: 'none'
@@ -142,7 +143,7 @@ const CustomPromptEditor = ({
142143
<Button
143144
fontWeight={'medium'}
144145
onClick={() => {
145-
onChange(value.replace(defaultValue, ''));
146+
onChange(value.replace(defaultPrompt, ''));
146147
onClose();
147148
}}
148149
w={20}
Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
import {
2-
CHECK_LIST,
3-
ELEMENT_TRANSFORMERS,
4-
TEXT_FORMAT_TRANSFORMERS,
5-
type Transformer
6-
} from '@lexical/markdown';
1+
import { ORDERED_LIST, UNORDERED_LIST, type Transformer } from '@lexical/markdown';
72

8-
export const RICH_PROMPT_TRANSFORMERS: Array<Transformer> = [
9-
CHECK_LIST,
10-
...ELEMENT_TRANSFORMERS,
11-
...TEXT_FORMAT_TRANSFORMERS
12-
];
3+
export const RICH_PROMPT_TRANSFORMERS: Array<Transformer> = [ORDERED_LIST, UNORDERED_LIST];

0 commit comments

Comments
 (0)