From 95f6e4dd3b93082e29b7aa9b2669cecf35211595 Mon Sep 17 00:00:00 2001 From: Phantom <59059173+EurFelux@users.noreply.github.com> Date: Sun, 7 Sep 2025 21:05:56 +0800 Subject: [PATCH] fix(selection): improve prompt of refine action (#9900) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(selection): 优化refine操作的提示词格式 将refine操作的提示词格式改为使用XML标签包裹用户输入内容,并明确要求输出语言与输入一致且不包含解释和XML标签 --- .../src/windows/selection/action/components/ActionGeneral.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/renderer/src/windows/selection/action/components/ActionGeneral.tsx b/src/renderer/src/windows/selection/action/components/ActionGeneral.tsx index b1d3c18853..6046da9ae1 100644 --- a/src/renderer/src/windows/selection/action/components/ActionGeneral.tsx +++ b/src/renderer/src/windows/selection/action/components/ActionGeneral.tsx @@ -76,9 +76,7 @@ const ActionGeneral: FC = React.memo(({ action, scrollToBottom }) => { action.selectedText break case 'refine': - userContent = - `请根据下面的内容进行优化或润色,并保持原内容的含义和完整性。要求:使用原语言进行回复;请不要包含对本提示词的任何解释,直接给出回复: \n\n` + - action.selectedText + userContent = `请对用XML标签包裹的用户输入内容进行优化或润色,并保持原内容的含义和完整性。要求:你的输出应当与用户输入内容的语言相同。;请不要包含对本提示词的任何解释,直接给出回复;请不要输出XML标签,直接输出优化后的内容: \n\n${action.selectedText ?? ''}` break default: if (!action.prompt) {