refactor: 移除多余依赖,统一 MUI 为唯一 UI 库
- 移除 radix-ui、clsx、tailwind-merge、class-variance-authority、react-router-dom - 前后端全面适配 MUI 组件,清理残留 Tailwind 工具类引用 - 优化 Agent Loop 引擎、IPC 处理器、Provider Adapter 等后端模块 - 新增 Agent 网络工具通用设计文档 v2
This commit is contained in:
+4
-2
@@ -1,7 +1,9 @@
|
||||
/**
|
||||
* className 合并工具
|
||||
*
|
||||
* @see standard/开发规范.md — 第一铁律
|
||||
* MUI 项目中主要通过 sx prop 设置样式,此工具仅用于极少数场景。
|
||||
*/
|
||||
|
||||
export { default as cn } from 'clsx';
|
||||
export function cn(...classes: (string | false | null | undefined)[]): string {
|
||||
return classes.filter(Boolean).join(' ');
|
||||
}
|
||||
|
||||
@@ -69,9 +69,10 @@ export const TOOL_CALL_STATUS_COLORS = {
|
||||
export const SHORTCUTS = {
|
||||
NEW_SESSION: { key: 'n', ctrl: true },
|
||||
QUICK_SEARCH: { key: 'k', ctrl: true },
|
||||
SEND_MESSAGE: { key: 'Enter', ctrl: true },
|
||||
NEW_LINE: { key: 'Enter', ctrl: true, shift: true },
|
||||
SEND_MESSAGE: { key: 'Enter', ctrl: false },
|
||||
NEW_LINE: { key: 'Enter', ctrl: true },
|
||||
ABORT: { key: '.', ctrl: true },
|
||||
// TODO: implement in future version
|
||||
FOCUS_MODE: { key: 'f', ctrl: true, shift: true },
|
||||
TOGGLE_SIDEBAR: { key: 'b', ctrl: true },
|
||||
TOGGLE_DETAIL: { key: 'j', ctrl: true },
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// DEPRECATED: Components use window.metona directly. This file is kept for future type-safe refactoring.
|
||||
|
||||
/**
|
||||
* IPC Client — 渲染进程 IPC 封装
|
||||
*
|
||||
@@ -8,7 +10,9 @@
|
||||
* @see src/types/global.d.ts — 类型声明
|
||||
*/
|
||||
|
||||
import type { MetonaBridge, MetonaSessionInfo, MetonaStreamEventData, MetonaMCPServerStatus, MetonaMemorySearchResult } from '@renderer/types/global';
|
||||
// DEPRECATED: Components use window.metona directly. This file is kept for future type-safe refactoring.
|
||||
// Types are now globally available via src/types/global.d.ts (script file, no import needed).
|
||||
|
||||
|
||||
// ===== 桥接层访问 =====
|
||||
|
||||
@@ -103,7 +107,7 @@ export const mcpAPI = {
|
||||
return getBridge().mcp.listServers();
|
||||
},
|
||||
|
||||
addServer(config: { name: string; transport: 'stdio' | 'sse'; command?: string; args?: string[]; url?: string }): Promise<{ success: boolean }> {
|
||||
addServer(config: { name: string; transport: 'stdio' | 'sse'; command?: string; args?: string[]; url?: string; enabled: boolean }): Promise<{ success: boolean }> {
|
||||
return getBridge().mcp.addServer(config);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user