mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-04-12 00:32:04 -07:00
Ensure reverse mappings for worker conversations are removed during cleanup and dispose. - In cleanupWorkerConversation, retrieve the conversation ID for the agent and delete the reverse mapping (workerAgentIdByConversationId) when cleaning up a worker. - When disposing the meme loop worker, clear the reverse mapping map (workerAgentIdByConversationId) along with workerConversationByAgentId. - Add unit tests (src/services/agentInstance/__tests__/workerCleanup.test.ts) to verify: cleanupWorkerConversation removes the reverse mapping for a single agent, and disposeMemeLoopWorker clears all worker conversation maps and worker references. |
||
|---|---|---|
| .. | ||
| agentBrowser | ||
| agentDefinition | ||
| agentInstance | ||
| auth | ||
| context | ||
| database | ||
| deepLink | ||
| git | ||
| gitServer | ||
| libs | ||
| menu | ||
| native | ||
| notifications | ||
| preferences | ||
| providerRegistry | ||
| sync | ||
| systemPreferences | ||
| theme | ||
| updater | ||
| view | ||
| wiki | ||
| wikiEmbedding | ||
| wikiGitWorkspace | ||
| windows | ||
| workspaces | ||
| workspacesView | ||
| container.ts | ||
| Readme.md | ||
| ServiceDependencies.md | ||
| serviceIdentifier.ts | ||
| types.ts | ||
services
Service Architecture
See ServiceDependencies.md for detailed documentation on:
- Service dependency layers and relationships
- Circular dependency chains
- When to use constructor injection vs lazy injection vs container.get()
- Current injection status for all services
Adding new Service
See docs/internal/ServiceIPC.md.
Injection Guidelines
- Use constructor injection for services in Layer 0-2 (foundation/basic/middle services)
- Use lazy injection for services in Layer 3-4 with circular dependencies
- Use container.get() only inside methods when absolutely necessary for circular dependencies
- Always document the reason when using lazy injection or container.get()
Before adding dependencies, check ServiceDependencies.md to understand the service layers and avoid creating new circular dependencies.