cherry-studio/src/main/services
Phantom 1a972ac0e0
fix: api server status (#10734)
* refactor(apiServer): move api server types to dedicated module

Restructure api server type definitions by moving them from index.ts to a dedicated apiServer.ts file. This improves code organization and maintainability by grouping related types together.

* feat(api-server): add api server management hooks and integration

Extract api server management logic into reusable hook and integrate with settings page

* feat(api-server): improve api server status handling and error messages

- add new error messages for api server status
- optimize initial state and loading in useApiServer hook
- centralize api server enabled check via useApiServer hook
- update components to use new api server status handling

* fix(agents): update error message key for agent server not running

* fix(i18n): update api server status messages across locales

Remove redundant 'notRunning' message in en-us locale
Add consistent 'not_running' error message in all locales
Add missing 'notEnabled' message in several locales

* refactor: update api server type imports to use @types

Move api server related type imports from renderer/src/types to @types package for better code organization and maintainability

* docs(IpcChannel): add comment about unused api-server:get-config

Add TODO comment about data inconsistency in useApiServer hook

* refactor(assistants): pass apiServerEnabled as prop instead of using hook

Move apiServerEnabled from being fetched via useApiServer hook to being passed as a prop through component hierarchy. This improves maintainability by making dependencies more explicit and reducing hook usage in child components.

* style(AssistantsTab): add consistent margin-bottom to alert components

* feat(useAgent): add api server status checks before fetching agent

Ensure api server is enabled and running before attempting to fetch agent data
2025-10-16 12:49:31 +08:00
..
__tests__ feat: add updating dialog in render (#10569) 2025-10-09 15:58:24 +08:00
agents fix: make anthropic model provided by cherryin visible to agent (#10695) 2025-10-14 20:59:07 +08:00
mcp/oauth fix: update ESLint configuration and dependencies, replace zod import… (#10645) 2025-10-12 17:15:52 +08:00
memory feat: refactor Knowledge Base (#8384) 2025-09-04 17:23:31 +08:00
ocr fix: update ESLint configuration and dependencies, replace zod import… (#10645) 2025-10-12 17:15:52 +08:00
remotefile feat: use oxlint to speed up lint (#10168) 2025-09-15 19:42:13 +08:00
urlschema refactor[Logger]: strict type check for Logger (#8363) 2025-07-23 13:24:03 +08:00
AnthropicService.ts feat: add Anthropic OAuth settings UI and logic (#8905) 2025-09-05 17:43:20 +08:00
ApiServerService.ts fix: api server status (#10734) 2025-10-16 12:49:31 +08:00
AppService.ts refactor[Logger]: strict type check for Logger (#8363) 2025-07-23 13:24:03 +08:00
AppUpdater.ts feat: add updating dialog in render (#10569) 2025-10-09 15:58:24 +08:00
BackupManager.ts refactor(bakcup): 单例化S3/WebDAV (#9181) 2025-08-15 01:55:19 +08:00
CacheService.ts feat: add gemini files support 2025-01-07 16:49:11 +08:00
CodeToolsService.ts feat: add GitHub Copilot CLI integration to coding tools (#10403) 2025-09-30 23:43:19 +08:00
ConfigManager.ts feat: add client ID generation and update user agent headers in AppUpdater 2025-09-22 09:55:43 +08:00
ContextMenu.ts fix: support spell check for mini app (#7602) 2025-06-28 08:36:32 +08:00
CopilotService.ts refactor(CopilotService): streamline token file handling and improve error management (#9552) 2025-08-26 14:33:47 +08:00
DxtService.ts refactor[Logger]: strict type check for Logger (#8363) 2025-07-23 13:24:03 +08:00
ExportService.ts feat: use oxlint to speed up lint (#10168) 2025-09-15 19:42:13 +08:00
FileStorage.ts feat(file): improve error handling for openPath operation 2025-09-29 19:53:32 +08:00
FileSystemService.ts feat: ocr image to translate (#9423) 2025-08-26 00:21:26 +08:00
KnowledgeService.ts fix: knowledge base not delete and websearch rag error (#10595) 2025-10-09 22:29:52 +08:00
LoggerService.ts refactor[Logger]: strict type check for Logger (#8363) 2025-07-23 13:24:03 +08:00
MCPService.ts feat: refactor shell environment handling and move to utils 2025-09-23 22:36:14 +08:00
MistralClientManager.ts feat: use oxlint to speed up lint (#10168) 2025-09-15 19:42:13 +08:00
NodeTraceService.ts fix: change jschardet to chardet (#8577) 2025-07-29 17:27:36 +08:00
NotificationService.ts Perf/tsgo (#10188) 2025-09-16 10:16:42 +08:00
NutstoreService.ts refactor: replace axios and node fetch with electron's net module (#9212) 2025-08-15 22:48:22 +08:00
ObsidianVaultService.ts fix: enhance Obsidian vault detection for multiple installation methods (#9821) 2025-09-03 15:08:59 +08:00
OvmsManager.ts feat: add new provider intel OVMS(openvino model server) (#9853) 2025-09-29 18:36:54 +08:00
ProtocolClient.ts refactor[Logger]: strict type check for Logger (#8363) 2025-07-23 13:24:03 +08:00
ProxyManager.ts feat: use oxlint to speed up lint (#10168) 2025-09-15 19:42:13 +08:00
PythonService.ts feat: implement Python MCP server using existing Pyodide infrastructure (#7506) 2025-06-25 18:21:10 +08:00
ReduxService.ts feat: Support Cherry Studio as a Service (CSaaS) (#8098) 2025-07-30 12:38:07 +08:00
S3Storage.ts fix(s3): add volces.com to virtual host suffix whitelist (#8824) 2025-08-04 18:20:08 +08:00
SearchService.ts fix: decode Bing redirect URLs in LocalBingProvider (#9593) 2025-08-27 21:34:01 +08:00
SelectionService.ts chore: update electron to 37.4.0 (#9692) 2025-08-30 20:09:02 +08:00
ShortcutService.ts chore: fix typos (#9477) 2025-08-24 17:15:35 +08:00
SpanCacheService.ts refactor[Logger]: strict type check for Logger (#8363) 2025-07-23 13:24:03 +08:00
StoreSyncService.ts feat(SelectionAssistant): shortcut key to toggle on/off (#6983) 2025-06-11 13:32:49 +08:00
ThemeService.ts style: set eol to lf, code formatting (#7923) 2025-07-08 09:50:33 +08:00
TrayService.ts feat: SelectionAssistant macOS version / 划词助手macOS版 (#7561) 2025-07-03 14:31:31 +08:00
VertexAIService.ts Feat/vertex-claude-support (#7564) 2025-07-24 23:46:32 +08:00
WebDav.ts refactor[Logger]: strict type check for Logger (#8363) 2025-07-23 13:24:03 +08:00
WebviewService.ts fix: intercept webview keyboard shortcuts for search functionality (#10641) 2025-10-12 18:45:37 +08:00
WindowService.ts feat(ipc): add App_Quit channel and update related handlers 2025-09-23 19:49:41 +08:00