feat: refactor HomePage to integrate agents store and update related components

feat: add runtime event handling for providers in ProvidersSection

feat: update routing to include Channels and Agents pages

feat: extend route types and navigation items for Channels and Agents

feat: implement agents store for managing agent data and interactions

fix: update chat store to utilize agents store for agent-related functionality

chore: export agents store from index

fix: enhance runtime types for better event handling

fix: update Vite config to handle dev server URL correctly
This commit is contained in:
duanshuwen
2026-04-18 14:56:32 +08:00
parent dfa4388087
commit ee72cf7261
52 changed files with 6626 additions and 189 deletions

View File

@@ -1,9 +1,10 @@
import { IPC_EVENTS } from '@runtime/lib/constants';
import { promisify } from 'util';
import { app, ipcMain } from 'electron';
import { ipcMain } from 'electron';
import log from 'electron-log';
import * as path from 'path';
import * as fs from 'fs';
import { getUserDataDir } from '@electron/utils/paths';
// 转换为Promise形式的fs方法
const readdirAsync = promisify(fs.readdir);
@@ -20,7 +21,7 @@ class LogService {
private readonly CLEANUP_INTERVAL_MS = 24 * 60 * 60 * 1000;
private constructor() {
const logPath = path.join(app.getPath('userData'), 'logs');
const logPath = path.join(getUserDataDir(), 'logs');
// c:users/{username}/AppData/Roaming/{appName}/logs
// 创建日志目录
@@ -81,7 +82,7 @@ class LogService {
private async _cleanupOldLogs() {
try {
const logPath = path.join(app.getPath('userData'), 'logs');
const logPath = path.join(getUserDataDir(), 'logs');
if (!fs.existsSync(logPath)) return;