Code
How cherryhq/cherry-studio is laid out, and where to start for common changes.
There is no import map for this report yet.
Where to start reading
- Repository root
- Repository root
- Likely public API
- Likely public API
- Likely start-up file
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
Find files for a task
AIAdd a new built-in assistant
- Define assistant capabilities and tools in src/main/ai/agents/builtin/builtinAgentDefinition.ts
- Register provisioning logic in src/main/ai/agents/builtin/BuiltinAgentProvisioner.ts
- Add capability guards in src/main/ai/agents/builtin/builtinAgentGuardRules.ts if safety checks needed
Integrate a new LLM provider
- Implement provider API client and extend AiService routing in src/main/ai/AiService.ts
- Add provider-specific compatibility metadata in src/shared/ai/piModelCompatibility.ts
- Define error handling via src/shared/ai/providerError.ts for provider-specific exceptions
Add a new tool/capability to agents
- Define tool contract and runtime in src/shared/ai/builtinTools.ts
- Register tool execution handler in src/main/ai/AiService.ts or agent-specific tool registry
- Add safety rules in src/main/ai/agents/builtin/assistantCommandSafety.ts if sensitive operations
Handle persistent agent state
- Update session persistence schema in src/main/ai/agentSession/persistence/AgentSessionMessageBackend.ts
- Manage state compaction logic via src/shared/ai/agentSessionCompaction.ts for efficient storage
Change the public API
Trace runtime behavior
Add or update tests
Change build or automation
RepoPilot lists up to 500 files, so a file missing here may still exist.
- Files marked “likely” are guessed from their names.
- Some entry points named in the manifest are build output or are missing from the file list, so their source is not shown.
- The file list is newer than the written guide, so descriptions and suggested changes may describe older code.