Skip to content

Commit 36f2738

Browse files
committed
refactor: 移除不必要的AI相关组件和测试代码
简化PR,删除不必要的AI特定代码 🗑️ 已删除的不必要文件 (6个) 1. console/atest-ui/src/components/AIStatusIndicator.vue - AI状态指示器组件 2. console/atest-ui/src/components/AITriggerButton.vue - AI触发按钮组件 3. console/atest-ui/src/views/__test__/ai-components.spec.ts - AI组件测试 4. console/atest-ui/src/test-setup.ts - 测试设置文件 5. pkg/server/backward_compatibility_test.go - 后向兼容测试 6. 我之前错误创建的设计文件 📝 已清理的现有文件 1. console/atest-ui/src/App.vue: - 删除AI相关图标导入 - 删除AI组件导入和使用 2. console/atest-ui/src/views/net.ts: - 删除AIPluginInfo和AIPluginHealth类型定义 - 删除DiscoverAIPlugins, CheckAIPluginHealth等AI特定函数 - 删除RegisterAIPlugin, UnregisterAIPlugin等废弃函数 - 从API导出中移除AI函数 ✅ 保留的必要修改 1. 统一插件管理核心: - cmd/server.go - configDir参数传递 - pkg/server/store_ext_manager.go - 统一插件接口 - pkg/server/remote_server.go - 插件架构支持 2. 测试数据: - pkg/testing/testdata/data/core/extension.yaml - AI插件测试数据 3. 协议清理结果: - protobuf生成文件的自动更新(删除AI特定定义后的重新生成) 📊 最终效果 - 大幅减少PR体量: 删除了大量AI特定的UI组件和API函数 - 符合统一架构: AI插件现在完全通过现有的extension接口管理 - 保持核心功能: 统一插件管理的核心改进得到保留 - 消除特殊处理: 不再有AI插件的特殊UI或API 现在AI插件与其他插件完全一致,通过标准的extension接口和Categories字段进行分类管理
1 parent 8e10bee commit 36f2738

File tree

7 files changed

+1
-1070
lines changed

7 files changed

+1
-1070
lines changed

console/atest-ui/src/App.vue

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@ import {
66
Share,
77
ArrowDown,
88
Guide,
9-
Help, Setting,
10-
ChatLineSquare,
11-
Loading,
12-
CircleCheck,
13-
CircleClose,
14-
Warning,
15-
QuestionFilled
9+
Help, Setting
1610
} from '@element-plus/icons-vue'
1711
import * as ElementPlusIcons from '@element-plus/icons-vue'
1812
import { ref, watch, getCurrentInstance} from 'vue'
@@ -25,8 +19,6 @@ import StoreManager from './views/StoreManager.vue'
2519
import WelcomePage from './views/WelcomePage.vue'
2620
import MagicKey from './components/MagicKey.vue'
2721
import Extension from './views/Extension.vue'
28-
import AIStatusIndicator from './components/AIStatusIndicator.vue'
29-
import AITriggerButton from './components/AITriggerButton.vue'
3022
import { useI18n } from 'vue-i18n'
3123
import ElementPlus from 'element-plus';
3224
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
@@ -176,7 +168,6 @@ API.GetMenus((menus) => {
176168
<el-main class="center-zone">
177169
<div class="top-menu">
178170
<el-col style="display: flex; align-items: center;">
179-
<AIStatusIndicator />
180171
<el-icon @click="settingDialogVisible=true" size="20"><Setting /></el-icon>
181172
</el-col>
182173
</div>
@@ -246,7 +237,6 @@ API.GetMenus((menus) => {
246237
</el-dialog>
247238

248239
<MagicKey />
249-
<AITriggerButton />
250240
</template>
251241

252242
<style>

console/atest-ui/src/components/AIStatusIndicator.vue

Lines changed: 0 additions & 135 deletions
This file was deleted.

console/atest-ui/src/components/AITriggerButton.vue

Lines changed: 0 additions & 163 deletions
This file was deleted.

0 commit comments

Comments
 (0)