mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 03:10:08 +08:00
* fix(ToolPermissionRequestCard): simplify button rendering by removing suggestion handling * ✨ feat: add CachedPluginsDataSchema for plugin cache file - Add Zod schema for .claude/plugins.json cache file format - Schema includes version, lastUpdated timestamp, and plugins array - Reuses existing InstalledPluginSchema for type safety - Cache will store metadata for all installed plugins * ✨ feat: add cache management methods to PluginService - Add readCacheFile() to read .claude/plugins.json - Add writeCacheFile() for atomic cache writes (temp + rename) - Add rebuildCache() to scan filesystem and rebuild cache - Add listInstalledFromCache() to load plugins from cache with fallback - Add updateCache() helper for transactional cache updates - All methods handle missing/corrupt cache gracefully - Cache auto-regenerates from filesystem if needed * ✨ feat: integrate cache loading in AgentService.getAgent() - Add installed_plugins field to GetAgentResponseSchema - Load plugins from cache via PluginService.listInstalledFromCache() - Gracefully handle errors by returning empty array - Use loggerService for error logging * 🐛 fix: break circular dependency causing infinite loop in cache methods - Change cache method signatures from agentId to workdir parameter - Update listInstalledFromCache(workdir) to accept workdir directly - Update rebuildCache(workdir) to accept workdir directly - Update updateCache(workdir, updater) to accept workdir directly - AgentService.getAgent() now passes accessible_paths[0] to cache methods - Removes AgentService.getAgent() calls from PluginService methods - Fixes infinite recursion bug where methods called each other endlessly Breaking the circular dependency: BEFORE: AgentService.getAgent() → PluginService.listInstalledFromCache(id) → AgentService.getAgent(id) [INFINITE LOOP] AFTER: AgentService.getAgent() → PluginService.listInstalledFromCache(workdir) [NO MORE RECURSION] * 🐛 fix: update listInstalled() to use agent.installed_plugins - Change from agent.configuration.installed_plugins (old DB location) - To agent.installed_plugins (new top-level field from cache) - Simplify validation logic to use existing plugin structure - Fixes UI not showing installed plugins correctly This was causing the UI to show empty plugin lists even though plugins were correctly loaded in the cache by AgentService.getAgent(). * ♻️ refactor: remove unused updateCache helper * ♻️ refactor: centralize plugin directory helpers * feat: Implement Plugin Management System - Added PluginCacheStore for managing plugin metadata and caching. - Introduced PluginInstaller for handling installation and uninstallation of plugins. - Created PluginService to manage plugin lifecycle, including installation, uninstallation, and listing of available plugins. - Enhanced AgentService to integrate with PluginService for loading installed plugins. - Implemented validation and sanitization for plugin file names and paths to prevent security issues. - Added support for skills as a new plugin type, including installation and management. - Introduced caching mechanism for available plugins to improve performance. * ♻️ refactor: simplify PluginInstaller and PluginService by removing agent dependency and updating plugin handling |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| agents | ||
| mcp/oauth | ||
| memory | ||
| ocr | ||
| remotefile | ||
| urlschema | ||
| AnthropicService.ts | ||
| ApiServerService.ts | ||
| AppMenuService.ts | ||
| AppService.ts | ||
| AppUpdater.ts | ||
| BackupManager.ts | ||
| CacheService.ts | ||
| CodeToolsService.ts | ||
| ConfigManager.ts | ||
| ContextMenu.ts | ||
| CopilotService.ts | ||
| DxtService.ts | ||
| ExportService.ts | ||
| FileStorage.ts | ||
| FileSystemService.ts | ||
| KnowledgeService.ts | ||
| LoggerService.ts | ||
| MCPService.ts | ||
| MistralClientManager.ts | ||
| NodeTraceService.ts | ||
| NotificationService.ts | ||
| NutstoreService.ts | ||
| ObsidianVaultService.ts | ||
| OvmsManager.ts | ||
| ProtocolClient.ts | ||
| ProxyManager.ts | ||
| PythonService.ts | ||
| ReduxService.ts | ||
| S3Storage.ts | ||
| SearchService.ts | ||
| SelectionService.ts | ||
| ShortcutService.ts | ||
| SpanCacheService.ts | ||
| StoreSyncService.ts | ||
| ThemeService.ts | ||
| TrayService.ts | ||
| VertexAIService.ts | ||
| WebDav.ts | ||
| WebviewService.ts | ||
| WindowService.ts | ||