Skip to content

Commit 1a4b561

Browse files
committed
增加部分提示
1 parent fc44840 commit 1a4b561

4 files changed

Lines changed: 17 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## 新增
44

55
1. 新增过渡性弹窗动画
6+
2. 增加vibe coding 支持open ai格式的API调用
67

78
## 优化
89

extension.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"uuid": "7ca98ae04b7142599ab107e34acc8e5e",
44
"displayName": "嘉立创EDA代码编辑器",
55
"description": "支持中文联想的EDA脚本代码编辑器,支持代码高亮、自动补全、函数提示,AI注释,AI报错分析等功能。",
6-
"version": "2.2.2",
6+
"version": "2.3.1",
77
"publisher": "嘉立创EDA",
88
"engines": {
99
"eda": "^2.2.60 || >=3.1.59"

iframe/main/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<li><button id="setting-btn">切换主题</button></li>
2323
<li><button id="SaveinLeft-btn">保存到列表</button></li>
2424
<li><button id="Ext-btn">插件管理</button></li>
25-
<li><button id="ai-btn">AI编程</button></li>
25+
<li><button id="ai-btn">AI编程:关</button></li>
2626
<!-- <li><button id="example-btn" style="display: none;">案例</button></li>
2727
<li><button id="about-btn" style="display: none;">关于</button></li> -->
2828
</ul>
@@ -143,7 +143,7 @@
143143
});
144144
// 开启AI辅助支持
145145
document.getElementById('ai-btn').addEventListener('click', () => {
146-
activateECTAI(editor);
146+
SetVibeCodingConfig();
147147
});
148148
// 保存代码
149149
document.getElementById('save-btn').addEventListener('click', async () => {

iframe/script/User_config/Ai_Chat.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
async function SetVibeCodingConfig() {
2+
const flag = await eda.sys_Storage.getExtensionUserConfig('Vibe_Coding_Config');
3+
if (flag == 'true') {
4+
document.getElementById('ai-chat').style.display = '';
5+
document.getElementById('ai-btn').innerText = 'AI编程:开';
6+
eda.sys_Storage.setExtensionUserConfig('Vibe_Coding_Config', 'false');
7+
} else {
8+
document.getElementById('ai-chat').style.display = 'none';
9+
document.getElementById('ai-btn').innerText = 'AI编程:关';
10+
eda.sys_Storage.setExtensionUserConfig('Vibe_Coding_Config', 'true');
11+
}
12+
}
13+
114
function initAiChat() {
215
const defaultConfig = {
316
apiKey: '',

0 commit comments

Comments
 (0)