feat(ai): add bulk record_activities tool for AI assistant#661
feat(ai): add bulk record_activities tool for AI assistant#661kwaich wants to merge 2 commits intoafadil:mainfrom
Conversation
Introduces a new `record_activities` AI tool that allows recording multiple investment activities at once, complementing the existing single-activity `record_activity` tool. - Add `record_activities` Rust tool with batch save logic - Add `RecordActivitiesToolUI` with per-row status tracking and confirm/cancel flow - Extract shared activity table formatters into `shared/activity-table-utils.ts` to eliminate duplication between search and record UIs - Add utils + unit tests in `record-activities-tool-utils.ts` - Register the new tool in chat shell, tool index, and system prompt
…eleton and RecordActivitiesToolUIContent functions
|
Hi, wondering if it's better re-use the exisiting csv import and adapt it for both bulk record and import. |
|
Hi @afadil, good question. I looked at both paths before deciding to keep them separate. Both tools share the same save path ( Input shape mismatch
Forcing one through the other's pipeline would either break Intermediate model mismatch
Unifying them would mean populating irrelevant fields with dummy values on both sides, which feels like the wrong tradeoff. The shared layer already exists That said, I'd love to hear your thoughts if you see it differently. There may be angles I haven't considered! |
Description
Adds a new
record_activitiesAI tool that allows the assistant to record multiple investment activities in a single interaction, complementing the existing single-activityrecord_activitytool.Changes:
record_activitiestool with batch save logic; registers in tool registry,chat.rs, and system promptRecordActivitiesToolUIwith per-row status tracking, confirm flow, and error displayshared/activity-table-utils.ts) to eliminate duplication between the search and record UIsrecord-activities-tool-utils.tsChecklist
By submitting this PR, I agree to the CLA.