fix(selection): improve prompt of refine action (#9900)

fix(selection): 优化refine操作的提示词格式

将refine操作的提示词格式改为使用XML标签<INPUT>包裹用户输入内容,并明确要求输出语言与输入一致且不包含解释和XML标签
This commit is contained in:
Phantom 2025-09-07 21:05:56 +08:00 committed by GitHub
parent 778b8718c9
commit 95f6e4dd3b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -76,9 +76,7 @@ const ActionGeneral: FC<Props> = React.memo(({ action, scrollToBottom }) => {
action.selectedText
break
case 'refine':
userContent =
`请根据下面的内容进行优化或润色,并保持原内容的含义和完整性。要求:使用原语言进行回复;请不要包含对本提示词的任何解释,直接给出回复: \n\n` +
action.selectedText
userContent = `请对用XML标签<INPUT>包裹的用户输入内容进行优化或润色并保持原内容的含义和完整性。要求你的输出应当与用户输入内容的语言相同。请不要包含对本提示词的任何解释直接给出回复请不要输出XML标签直接输出优化后的内容: \n\n<INPUT>${action.selectedText ?? ''}</INPUT>`
break
default:
if (!action.prompt) {