From 7f61feb1ea4756ecac99d3cb604aadb2bf8d55f0 Mon Sep 17 00:00:00 2001 From: seven Date: Wed, 8 Jan 2025 00:34:42 +0800 Subject: [PATCH 1/2] feat: re-set the position after format (#152) feat: set the position to the start of action line after user trigger indent action obsolete now. Refs: #150 Signed-off-by: seven --- src/views/editor/index.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/editor/index.vue b/src/views/editor/index.vue index c792fcae..9617bf06 100644 --- a/src/views/editor/index.vue +++ b/src/views/editor/index.vue @@ -204,6 +204,7 @@ const autoIndentAction = (editor: monaco.editor.IStandaloneCodeEditor, position: // @ts-ignore inverseEditOperations => [], ); + editor.setPosition({ lineNumber: startLineNumber + 1, column: 1 }); } catch (err) { message.error(lang.t('editor.invalidJson'), { closable: true, From 0b24df2b7fc7e2d386dd45ddec4280b4eaaab046 Mon Sep 17 00:00:00 2001 From: seven Date: Wed, 8 Jan 2025 00:42:28 +0800 Subject: [PATCH 2/2] feat: restore display before show the new response (#153) feat: restore display before show the new response when trigger a new action, restore the display editor before sending the request, then displays the response, improves the action reactions that user can notice the displays content has updated Refs: #150 --------- Signed-off-by: seven --- src/views/editor/index.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/editor/index.vue b/src/views/editor/index.vue index 9617bf06..0b86ef30 100644 --- a/src/views/editor/index.vue +++ b/src/views/editor/index.vue @@ -152,6 +152,7 @@ const executeQueryAction = async (position: { column: number; lineNumber: number } try { + displayJsonEditor(''); if (!established.value) { message.error(lang.t('editor.establishedRequired'), { closable: true,