From 54a24f41e0236aee2713ae516a561868adc3d986 Mon Sep 17 00:00:00 2001 From: ShineKOT <1917095344@qq.com> Date: Thu, 10 Apr 2025 20:10:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=20=E6=9B=B4=E6=96=B0AI=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=BC=96=E8=BE=91=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ai-code/src/monaco-editor/monaco-editor.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/ai-code/src/monaco-editor/monaco-editor.tsx b/packages/ai-code/src/monaco-editor/monaco-editor.tsx index 1afea671..38bfed67 100644 --- a/packages/ai-code/src/monaco-editor/monaco-editor.tsx +++ b/packages/ai-code/src/monaco-editor/monaco-editor.tsx @@ -491,6 +491,9 @@ export const IBizAICode = defineComponent({ minimap: { enabled: true, }, + suggest: { + preview: true, + }, readOnly: hasEnableEdit.value ? readonlyState.value : props.readonly || props.disabled, // 只读 @@ -502,6 +505,12 @@ export const IBizAICode = defineComponent({ scrollBeyondLastLine: false, // 取消代码后面一大段空白 overviewRulerBorder: false, // 不要滚动条的边框 }); + // 设置默认展开建议详情面板 + ( + editor.getContribution( + 'editor.contrib.suggestController', + ) as any + )?.widget?.value?._setDetailsVisible(true); // 为当前编辑器实例添加自定义属性 (editor as any).__instanceId = UUID; codeModuleCenter.initModules(editor); -- Gitee