refactor: reorganize imports and update type references across services
- Updated import paths for types and utilities in config-service, menu-service, script-execution-service, script-store-service, and window-service to reflect new structure. - Moved utility functions like debounce and cloneDeep to shared utilities. - Created new runtime and script types files to centralize type definitions. - Removed deprecated task-types and locale messages files. - Updated constants to use shared definitions and added new placeholders for providers. - Enhanced provider type information with additional placeholders for different languages.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { app, BrowserWindow, ipcMain } from 'electron'
|
||||
import { CONFIG_KEYS } from '@runtime/lib/constants'
|
||||
import { CONFIG_KEYS, IPC_EVENTS } from '@runtime/lib/constants'
|
||||
import { setupMainWindow } from './wins';
|
||||
import started from 'electron-squirrel-startup'
|
||||
import configManager from '@electron/service/config-service'
|
||||
@@ -75,7 +75,7 @@ async function requestUpstreamHostApi(path: string, method: string, headers: Rec
|
||||
}
|
||||
}
|
||||
|
||||
ipcMain.handle('hostapi:fetch', async (_event, { path, method, headers, body }) => {
|
||||
ipcMain.handle(IPC_EVENTS.HOST_API_FETCH, async (_event, { path, method, headers, body }) => {
|
||||
const normalizedMethod = method || 'GET';
|
||||
|
||||
// 1. 优先本地处理 Host API 路由(逐步对齐 ClawX)
|
||||
@@ -92,7 +92,7 @@ ipcMain.handle('hostapi:fetch', async (_event, { path, method, headers, body })
|
||||
});
|
||||
|
||||
// Gateway RPC IPC handler
|
||||
ipcMain.handle('gateway:rpc', async (_event, method: string, params: any) => {
|
||||
ipcMain.handle(IPC_EVENTS.GATEWAY_RPC, async (_event, method: string, params: any) => {
|
||||
return gatewayManager.rpc(method, params);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user