TidGi-Desktop/src/services
linonetwo 5d3a2cef16 Fix worker conversation cleanup mappings
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.
2026-04-04 02:15:32 +08:00
..
agentBrowser Feat/discuss note with agent (#685) 2026-03-09 04:07:39 +08:00
agentDefinition Improve MemeLoop worker and default framework ID 2026-04-04 02:15:32 +08:00
agentInstance Fix worker conversation cleanup mappings 2026-04-04 02:15:32 +08:00
auth Feat/discuss note with agent (#685) 2026-03-09 04:07:39 +08:00
context Fix/misc bug (#677) 2026-01-20 11:11:28 +08:00
database feat: integrate memeloop runtime into TidGi-Desktop (#desktop-integrate-memeloop) 2026-04-04 02:15:31 +08:00
deepLink Fix/start error (#654) 2025-11-20 17:17:11 +08:00
git feat: integrate memeloop runtime into TidGi-Desktop (#desktop-integrate-memeloop) 2026-04-04 02:15:31 +08:00
gitServer Fix/misc bug (#691) 2026-04-01 15:45:26 +08:00
libs Improve MemeLoop worker and default framework ID 2026-04-04 02:15:32 +08:00
menu feat: integrate memeloop runtime into TidGi-Desktop (#desktop-integrate-memeloop) 2026-04-04 02:15:31 +08:00
native Fix/misc bug1 (#688) 2026-03-23 02:48:46 +08:00
notifications Feat/Native AI Agent (#640) 2025-10-10 17:16:56 +08:00
preferences Fix/misc bug (#691) 2026-04-01 15:45:26 +08:00
providerRegistry feat: integrate memeloop runtime into TidGi-Desktop (#desktop-integrate-memeloop) 2026-04-04 02:15:31 +08:00
sync Fix/misc bug (#691) 2026-04-01 15:45:26 +08:00
systemPreferences Feat/Native AI Agent (#640) 2025-10-10 17:16:56 +08:00
theme Feat/git chart (#651) 2025-11-08 15:04:34 +08:00
updater Feat/watch fs (#649) 2025-10-28 13:25:46 +08:00
view Fix/misc bug (#691) 2026-04-01 15:45:26 +08:00
wiki feat: integrate memeloop runtime into TidGi-Desktop (#desktop-integrate-memeloop) 2026-04-04 02:15:31 +08:00
wikiEmbedding feat: integrate memeloop runtime into TidGi-Desktop (#desktop-integrate-memeloop) 2026-04-04 02:15:31 +08:00
wikiGitWorkspace Fix/misc bug1 (#688) 2026-03-23 02:48:46 +08:00
windows chore: upgrade Electron 39->41 + forge 7.10->7.11 + fix native ABI (#692) 2026-04-02 21:45:47 +08:00
workspaces feat: integrate memeloop runtime into TidGi-Desktop (#desktop-integrate-memeloop) 2026-04-04 02:15:31 +08:00
workspacesView Fix/misc bug (#691) 2026-04-01 15:45:26 +08:00
container.ts Feat/Native AI Agent (#640) 2025-10-10 17:16:56 +08:00
Readme.md Feat/Native AI Agent (#640) 2025-10-10 17:16:56 +08:00
ServiceDependencies.md Feat/Native AI Agent (#640) 2025-10-10 17:16:56 +08:00
serviceIdentifier.ts feat: integrate memeloop runtime into TidGi-Desktop (#desktop-integrate-memeloop) 2026-04-04 02:15:31 +08:00
types.ts Chore/upgrade (#646) 2025-10-23 23:42:06 +08:00

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

  1. Use constructor injection for services in Layer 0-2 (foundation/basic/middle services)
  2. Use lazy injection for services in Layer 3-4 with circular dependencies
  3. Use container.get() only inside methods when absolutely necessary for circular dependencies
  4. 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.