2.6 KiB
2.6 KiB
id, title, status, assignee, created_date, updated_date, labels, dependencies, priority, ordinal
| id | title | status | assignee | created_date | updated_date | labels | dependencies | priority | ordinal |
|---|---|---|---|---|---|---|---|---|---|
| TASK-3 | Build read-only savings agent with tool calls | Done | 2026-06-15 19:02 | 2026-06-15 19:54 | high | 3000 |
Description
Convert Talk to Savings from a prompt-packed chat into a read-only AI SDK tool-calling agent with deterministic transaction retrieval, spending summaries, forecasts, and compact frontend tool traces.
Acceptance Criteria
- #1 Savings chat action uses AI SDK tool calls with a bounded multi-step loop and returns a compact tool trace
- #2 Read-only transaction retrieval tool supports selected scope, bounded custom ranges, account/category/search filters, exact totals, sanitized rows, and hasMore
- #3 Spending summary and cashflow forecast tools compute deterministic aggregates without model-invented math
- #4 Frontend remains localStorage-backed, loads legacy chats, and renders compact tool traces under assistant answers
- #5 Focused Convex tests, build, and targeted lint verification pass or known blockers are documented
Implementation Plan
- Write failing Convex tests for read-only tool queries and traces
- Implement internal read-only savings agent tool queries
- Switch savingsChat.ask to AI SDK tool calling with bounded multi-step loop
- Update frontend chat messages and compact tool trace rendering
- Run focused tests, build, targeted lint, and record verification notes
Implementation Notes
Implementation complete pending user confirmation.
Subagents:
- Frontend UX worker updated src/pages/SavingsChatPage.tsx for legacy-safe localStorage message normalization and compact assistant tool traces.
- QA explorer reviewed Convex test strategy and confirmed mock AI SDK approach for ask() coverage.
Verification:
- PASS npx vitest convex/savingsChat.test.ts --run (8 tests)
- PASS npx eslint convex/savingsChat.ts convex/savingsChat.test.ts src/pages/SavingsChatPage.tsx
- PASS npm run build
- BLOCKED npm run lint on pre-existing unrelated files: convex/bank/comdirectProvider.ts, convex/bank/config.ts, src/components/import/TanAwaitDialog.tsx, layout/ui fast-refresh exports, SettingsPage.tsx, generated eslint-disable warnings, and existing React compiler warnings. No TASK-3 touched file appears in the full-lint error list.
Final Summary
Closed as Done after explicit user confirmation to mark all tasks done.