From 1cc65f5f2acc1ea79e6eebbff89b206e061d8c56 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 8 Mar 2023 22:50:40 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E5=8A=A0=E5=85=A5=E9=92=88=E5=AF=B9?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E5=9D=97=E7=9A=84=E4=BA=BA=E5=B7=A5=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E8=BE=85=E5=8A=A9=E6=94=AF=E6=8C=81=20https://github.?= =?UTF-8?q?com/siyuan-note/siyuan/issues/7566?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/ai/actions.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/ai/actions.ts b/app/src/ai/actions.ts index d4e278111..8d2ced11d 100644 --- a/app/src/ai/actions.ts +++ b/app/src/ai/actions.ts @@ -85,7 +85,7 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => { }, { label: window.siyuan.languages.aiExtractSummary, click() { - fetchPost("/api/ai/chatGPTWithAction", {ids, action: "Summarize"}, (response) => { + fetchPost("/api/ai/chatGPTWithAction", {ids, action: window.siyuan.languages.aiExtractSummary}, (response) => { focusByRange(protyle.toolbar.range); insertHTML(response.data, protyle, true); }); @@ -93,7 +93,7 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => { }, { label: window.siyuan.languages.aiBrainStorm, click() { - fetchPost("/api/ai/chatGPTWithAction", {ids, action: "Brainstorm"}, (response) => { + fetchPost("/api/ai/chatGPTWithAction", {ids, action: window.siyuan.languages.aiBrainStorm}, (response) => { focusByRange(protyle.toolbar.range); insertHTML(response.data, protyle, true); }); @@ -101,7 +101,7 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => { }, { label: window.siyuan.languages.aiFixGrammarSpell, click() { - fetchPost("/api/ai/chatGPTWithAction", {ids, action: "Identify the language used in the following text and mark it as {x}, correct the grammar and spelling errors, return the result in language {x}"}, (response) => { + fetchPost("/api/ai/chatGPTWithAction", {ids, action: window.siyuan.languages.aiFixGrammarSpell}, (response) => { focusByRange(protyle.toolbar.range); insertHTML(response.data, protyle, true); });