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,4 +1,3 @@
import { app } from 'electron';
import * as fs from 'fs';
import * as path from 'path';
import logManager from '@electron/service/logger';
@@ -8,6 +7,7 @@ import type {
ProviderVendorInfo,
ProviderWithKeyInfo,
} from '@runtime/lib/providers';
import { getUserDataDir } from '@electron/utils/paths';
interface ProviderStore {
accounts: ProviderAccount[];
@@ -19,8 +19,8 @@ const defaultStore: ProviderStore = {
defaultAccountId: null,
};
const storePath = path.join(app.getPath('userData'), 'provider-accounts.json');
const keysPath = path.join(app.getPath('userData'), 'provider-keys.json');
const storePath = path.join(getUserDataDir(), 'provider-accounts.json');
const keysPath = path.join(getUserDataDir(), 'provider-keys.json');
function readJson<T>(filePath: string, defaultValue: T): T {
try {