eigent
eigent copied to clipboard
[ENHANCE] simplify (refactor) chatStore design
Motivation
Abstract
- In our efforts to organize projects based on chatStore #473 , we introduced a decoupled interface.
- Previously it was chatStore -> tasks[], but now with projectStore it became projectStore -> chatStore[] -> tasks[]
Due to progressive shipping and backwards compatibility, I intentionally didn't touch the chatStore structure. But now perhaps its time to simplify bcz a single chatStore would contain a single task. The old design is absolute.
The bump in the road 🚧
- Before starting modifying the structure take note of the ghost chatStore👻. It is being created somewhere (try to Replay then log the chatStore) due to the old code structure.
Solution
⚠️ First Solve:
- Ghost chatStore must be exterminated ❗
Migrate:
- remove: chatStore.activeTaskId
- tasks[] -> task
- update all chatStore usage of
chatStore.tasks[chatStore.activeTaskId]TOchatStore.task - update some functions in projectStore to use singular task
- simplify all chatStore functions to use a singlar task design
The frontend result
Alternatives
No response
Additional context
No response