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,7 +1,7 @@
import { readdir, readFile, stat } from 'fs/promises';
import { join } from 'path';
import { app } from 'electron';
import logManager from '@electron/service/logger';
import { getUserDataDir } from './paths';
import {
extractSessionIdFromTranscriptFileName,
parseUsageEntriesFromJsonl,
@@ -17,7 +17,7 @@ export {
const TRANSCRIPT_ROOT_DIR_NAMES = ['models', 'agents'] as const;
async function listAgentIdsWithSessionDirs(rootDirName: string): Promise<string[]> {
const rootDir = join(app.getPath('userData'), rootDirName);
const rootDir = join(getUserDataDir(), rootDirName);
const agentIds = new Set<string>();
try {
@@ -45,7 +45,7 @@ async function listRecentSessionFiles(): Promise<Array<{ filePath: string; sessi
const agentEntries = await listAgentIdsWithSessionDirs(rootDirName);
for (const agentId of agentEntries) {
const sessionsDir = join(app.getPath('userData'), rootDirName, agentId, 'sessions');
const sessionsDir = join(getUserDataDir(), rootDirName, agentId, 'sessions');
try {
const sessionEntries = await readdir(sessionsDir);