ITADN

Reactions, imports, registry... honestly way to much for a single pr

#72Pull Requestadamwdraper 创建于 2025-05-01已合并
A
adamwdrapercommented
This pull request introduces significant updates to the Tyler documentation and code examples, consolidating imports for simplicity and adding extensive support for emoji reactions in threads and messages. The most important changes include transitioning to a simplified import structure, documenting database migration processes, and enhancing the `Message` and `Thread` classes with reaction-related functionality. ### Simplified Import Structure * Consolidated imports across examples to use `from tyler import ...` instead of importing from submodules like `tyler.models` or `tyler.storage`. This change simplifies the API for end users. (`README.md`, `docs/api-reference/agent.md`, `docs/api-reference/attachment.md`, `docs/api-reference/file-store.md`, `docs/api-reference/thread.md`, `docs/api-reference/thread-store.md`, `docs/api-reference/message.md`) [[1]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L257-R257) [[2]](diffhunk://#diff-70dc8f1689ab2e1cd6ca15e77b1cd91529a77a49407ad339749b98f521f660c7L12-R12) [[3]](diffhunk://#diff-e34ec8a0cadc6f801499d0fd65b7dffb2122e425f61acce2e850ff416e9e660aL12-R12) [[4]](diffhunk://#diff-2e69e34b15288ae98d6e4aeb4ec7daebd1c4668d0f849253d2ed4e39e005d29dL14-R14) [[5]](diffhunk://#diff-2f5738754c3bb2708b3ecb60a125b506dd85c5f79d43412fa0f1dd86c9194e3bL12-R12) [[6]](diffhunk://#diff-63901e1f9829992bc1c38d3b6f37df94a8deb57a469deb0a7ad40cb408da086eL12-R12) [[7]](diffhunk://#diff-58fa9cb5ba355910d465b3cadcbd33a6cbd13c8287995581422ac34dc9788fceL12-R12) ### Database Migrations Documentation * Added a new `docs/database-migrations.md` file detailing how to manage database migrations in Tyler, including CLI commands, programmatic API usage, and troubleshooting tips. ### Reaction Support in Messages * Enhanced the `Message` class to support Slack-like emoji reactions, including methods to add, remove, and retrieve reactions (`add_reaction`, `remove_reaction`, `get_reactions`, `get_reaction_counts`). Reactions are serialized as part of the message metadata. (`docs/api-reference/message.md`) [[1]](diffhunk://#diff-58fa9cb5ba355910d465b3cadcbd33a6cbd13c8287995581422ac34dc9788fceR91) [[2]](diffhunk://#diff-58fa9cb5ba355910d465b3cadcbd33a6cbd13c8287995581422ac34dc9788fceR150-R159) [[3]](diffhunk://#diff-58fa9cb5ba355910d465b3cadcbd33a6cbd13c8287995581422ac34dc9788fceL178-R190) [[4]](diffhunk://#diff-58fa9cb5ba355910d465b3cadcbd33a6cbd13c8287995581422ac34dc9788fceR266-R363) [[5]](diffhunk://#diff-58fa9cb5ba355910d465b3cadcbd33a6cbd13c8287995581422ac34dc9788fceR446-R489) [[6]](diffhunk://#diff-58fa9cb5ba355910d465b3cadcbd33a6cbd13c8287995581422ac34dc9788fceR649-R724) ### Reaction Management in Threads * Introduced methods in the `Thread` class to manage reactions at the thread level, including `add_reaction`, `remove_reaction`, and `get_reactions`. These methods enable centralized reaction handling for messages within a thread. (`docs/api-reference/thread.md`) ### Reaction Persistence in ThreadStore * Updated `ThreadStore` documentation to describe how reactions are stored and retrieved as part of thread metadata. This ensures reactions are preserved across save and load operations. (`docs/api-reference/thread-store.md`)
合并状态:已合并 合并于 2025-05-22 关闭于 2025-05-22 0 条评论