-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
todo tool feature added to tools #1977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@gayatrik-dev is attempting to deploy a commit to the Arc53 Team on Vercel. A member of the Team first needs to authorize it. |
Thank you for your PR, I have 2 comments:
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1977 +/- ##
==========================================
+ Coverage 34.67% 36.07% +1.40%
==========================================
Files 131 136 +5
Lines 8703 9352 +649
==========================================
+ Hits 3018 3374 +356
- Misses 5685 5978 +293 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@dartpain, addressed the comments as suggested. |
Hey @gayatrik-dev there seem to be some conflicts with the main branch. Check out https://github.com/arc53/DocsGPT/blob/main/application/agents/tools/memory.py |
83eb072
to
fe832e7
Compare
Todo_id should correspond to a tool _id in the user_tools collection. todo_id = str(uuid.uuid4()) Please check out https://github.com/arc53/DocsGPT/blob/main/application/agents/tools/memory.py They handle it well there. On tools init you should get tool_config param:
Then when you make db queries reference: |
hi, as i understand you want one todo per user_id and tool_id? |
Such that if one user creates multiple todo tools - they are isolated. |
@dartpain , please review the updated changes. |
8efb557
to
021b81b
Compare
Few issues The tool needs a real per-todo identifier (e.g., generate a todo_id super simple one can be interger, can store it in the same mongodb document) application/agents/tools/todo_list.py:130 documents “Get a single todo by id”, but _get_todo, _update_todo, and _delete_todo (lines 86-109) dont accept a todo id. Just make an action that fetches all todos. application/agents/tools/todo_list.py:88 returns the raw Mongo document, which still contains _id and datetime fields. These values are not JSON-serializable clean it up a bit. Thank you! |
Hi, I hope this addresses your concerns — the refactor supports either many todos within a single tool or multiple tools each with their own todos for a given user. |
Great, I noticed tool_id is from uuid, I think it makes LLM's life harder to type it all out. |
f5187f4
to
ec91b9b
Compare
How about we introduce a counters collection in MongoDB to track the current sequence number? |
result = self._db.counters.find_one_and_update(
{"_id": "todo_id"},
{"$inc": {"seq": 1}},
upsert=True,
return_document=True
)
return result["seq"] and then in create_todo -> todo_id = self._get_next_todo_id()
|
I would suggest against adding another collection / table. Todo lists are going to be relatively small (up to 5 items on average), thus I advise we take a simplest possible approach, just track index within the same mongodb document. |
hi, is everything okay from your end for the changes made? |
Hi, i did manual testing and it works fine for me. Please find logs $ docker exec -it e6e609767782 mongosh
Current Mongosh Log ID: 68e7f725d61484df45ce5f46
Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.5.8
Using MongoDB: 6.0.26
Using Mongosh: 2.5.8
For mongosh info see: https://www.mongodb.com/docs/mongodb-shell/
To help improve our products, anonymous usage data is collected and sent to MongoDB periodically (https://www.mongodb.com/legal/privacy-policy).
You can opt-out by running the disableTelemetry() command.
------
The server generated these startup warnings when booting
2025-10-09T15:15:30.915+00:00: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem
2025-10-09T15:15:31.237+00:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
2025-10-09T15:15:31.237+00:00: vm.max_map_count is too low
------
test> use docsgpt
switched to db docsgpt
docsgpt> db.todos.find().pretty()
[
{
_id: ObjectId('68e7f7882f6b7dda7f5a02e0'),
todo_id: 1,
user_id: 'user_1',
tool_id: 'tool_todo',
title: 'Test_Sample',
description: 'Testing real db',
status: 'done',
metadata: {},
due_date: null,
created_at: ISODate('2025-10-09T17:57:28.245Z'),
updated_at: ISODate('2025-10-09T17:57:28.253Z')
}
] |
fixed few issues with test-cases also after making "todo_id" changes. let me know if you have further comments. Thanks |
This PR addresses #1966.
Features Implemented
The tool provides complete CRUD support via the following actions:
Technical Highlights
Tests