Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
9e4eac1255
1 changed files with 17 additions and 9 deletions
|
@ -28,7 +28,7 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => {
|
|||
submenu: [{
|
||||
label: window.siyuan.languages.aiTranslate_zh_CN,
|
||||
click() {
|
||||
fetchPost("/api/ai/chatGPTWithAction", {ids, action: "Translate"}, (response) => {
|
||||
fetchPost("/api/ai/chatGPTWithAction", {ids, action: "Translate as follows to [zh_CN]"}, (response) => {
|
||||
focusByRange(protyle.toolbar.range);
|
||||
insertHTML(response.data, protyle, true);
|
||||
});
|
||||
|
@ -36,7 +36,7 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => {
|
|||
}, {
|
||||
label: window.siyuan.languages.aiTranslate_ja_JP,
|
||||
click() {
|
||||
fetchPost("/api/ai/chatGPTWithAction", {ids, action: "Translate"}, (response) => {
|
||||
fetchPost("/api/ai/chatGPTWithAction", {ids, action: "Translate as follows to [ja_JP]"}, (response) => {
|
||||
focusByRange(protyle.toolbar.range);
|
||||
insertHTML(response.data, protyle, true);
|
||||
});
|
||||
|
@ -44,7 +44,7 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => {
|
|||
}, {
|
||||
label: window.siyuan.languages.aiTranslate_ko_KR,
|
||||
click() {
|
||||
fetchPost("/api/ai/chatGPTWithAction", {ids, action: "Translate"}, (response) => {
|
||||
fetchPost("/api/ai/chatGPTWithAction", {ids, action: "Translate as follows to [ko_KR]"}, (response) => {
|
||||
focusByRange(protyle.toolbar.range);
|
||||
insertHTML(response.data, protyle, true);
|
||||
});
|
||||
|
@ -52,7 +52,7 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => {
|
|||
}, {
|
||||
label: window.siyuan.languages.aiTranslate_en_US,
|
||||
click() {
|
||||
fetchPost("/api/ai/chatGPTWithAction", {ids, action: "Translate"}, (response) => {
|
||||
fetchPost("/api/ai/chatGPTWithAction", {ids, action: "Translate as follows to [en_US]"}, (response) => {
|
||||
focusByRange(protyle.toolbar.range);
|
||||
insertHTML(response.data, protyle, true);
|
||||
});
|
||||
|
@ -60,7 +60,7 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => {
|
|||
}, {
|
||||
label: window.siyuan.languages.aiTranslate_es_ES,
|
||||
click() {
|
||||
fetchPost("/api/ai/chatGPTWithAction", {ids, action: "Translate"}, (response) => {
|
||||
fetchPost("/api/ai/chatGPTWithAction", {ids, action: "Translate as follows to [es_ES]"}, (response) => {
|
||||
focusByRange(protyle.toolbar.range);
|
||||
insertHTML(response.data, protyle, true);
|
||||
});
|
||||
|
@ -68,7 +68,7 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => {
|
|||
}, {
|
||||
label: window.siyuan.languages.aiTranslate_fr_FR,
|
||||
click() {
|
||||
fetchPost("/api/ai/chatGPTWithAction", {ids, action: "Translate"}, (response) => {
|
||||
fetchPost("/api/ai/chatGPTWithAction", {ids, action: "Translate as follows to [fr_FR]"}, (response) => {
|
||||
focusByRange(protyle.toolbar.range);
|
||||
insertHTML(response.data, protyle, true);
|
||||
});
|
||||
|
@ -76,7 +76,7 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => {
|
|||
}, {
|
||||
label: window.siyuan.languages.aiTranslate_de_DE,
|
||||
click() {
|
||||
fetchPost("/api/ai/chatGPTWithAction", {ids, action: "Translate"}, (response) => {
|
||||
fetchPost("/api/ai/chatGPTWithAction", {ids, action: "Translate as follows to [de_DE]"}, (response) => {
|
||||
focusByRange(protyle.toolbar.range);
|
||||
insertHTML(response.data, protyle, true);
|
||||
});
|
||||
|
@ -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,12 +93,20 @@ 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);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
label: window.siyuan.languages.aiFixGrammarSpell,
|
||||
click() {
|
||||
fetchPost("/api/ai/chatGPTWithAction", {ids, action: window.siyuan.languages.aiFixGrammarSpell}, (response) => {
|
||||
focusByRange(protyle.toolbar.range);
|
||||
insertHTML(response.data, protyle, true);
|
||||
});
|
||||
}
|
||||
},{
|
||||
label: window.siyuan.languages.aiCustomAction,
|
||||
click() {
|
||||
const dialog = new Dialog({
|
||||
|
|
Loading…
Add table
Reference in a new issue