-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Add AI Budget Tools, Enhanced Natural Language Queries, and Bug FixesF/raynab ai #18611
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
- Updated "Unreviewed" title for consistency. - Added "Add Transaction" tool to facilitate new YNAB transactions using AI. - Implemented popToRoot functionality in BudgetList for better navigation. - Enhanced TransactionCreateForm to accept launch context properties for category and account IDs. - Improved OpenInYnabAction to simplify the action button. - Refactored transaction creation logic to include transaction details and loading states. - Removed unused groupBy utility file. These changes aim to improve user experience and streamline transaction management in the Raynab extension.
- Introduced a new utility hook to check for an active budget. - Displays a toast notification if no active budget is found, prompting the user to select one. - Utilizes local storage for managing the active budget ID. This addition enhances user experience by providing immediate feedback regarding budget selection.
- Updated multiple components to incorporate the new checkForActiveBudget hook for managing active budget states. - Enhanced user experience by conditionally rendering components based on the active budget status. - Updated package dependency for @raycast/api to version 1.95.0. These changes improve the functionality and responsiveness of the Raynab extension.
…upgrades - Added new AI tools for managing YNAB transactions: "Add Transaction", "Get Transactions", and "Get Transaction Details". - Updated the description and input/output structure for the "Add Transaction" tool. - Upgraded package dependencies, including @raycast/api to version 1.95.0 and @types/react to version 19.1.0. These enhancements improve the functionality and user experience of the Raynab extension.
- Added new AI tools: "Get Accounts" and "Get Account Details" for retrieving YNAB account information and balances. - Updated instructions to include guidance on using the new account balance queries. - Improved example inputs and expected outputs for better clarity in usage. These changes enhance the functionality of the Raynab extension, allowing users to manage their YNAB accounts more effectively.
…rieval - Updated descriptions for "Get Accounts" and "Get Account Details" tools to provide clearer usage guidance. - Enhanced input handling in the "Get Account Details" tool to search by account name instead of ID. - Improved error messaging for account retrieval failures and added logging for better debugging. These changes enhance the user experience by providing clearer instructions and more robust account querying capabilities in the Raynab extension.
- Added a validation reset trigger in the TransactionCreateForm to ensure category list updates are properly handled. - Improved error messaging in the add-transaction tool to provide clearer guidance when no account is specified. - Filtered available accounts to exclude closed accounts and those not on budget, enhancing the accuracy of account retrieval. These changes improve the user experience by ensuring better validation and clearer error messages in the Raynab extension.
- Removed outdated tools from the AI instructions in ai.json to streamline the transaction management process. - Introduced new input parameters for the "Get Transactions" tool, allowing for optional filters and improved output structure with success and error handling. - Added a new "Get Big Numbers" tool to retrieve spending statistics for today, this week, and this month, enhancing user insights into their budgeting. - Updated the transaction fetching logic to utilize the new input structure and improve data formatting. These changes enhance the Raynab extension's transaction management capabilities, providing users with more flexible querying options and clearer output.
- Updated AI instructions in ai.json to replace the "Get Transaction Details" tool with a more versatile "Get Transactions" tool, allowing for improved transaction querying and output structure. - Enhanced the TransactionCreateForm component to include subtransaction handling and automatic closure of the Raycast window upon successful transaction creation. - Removed the obsolete get-transaction-details tool to streamline the codebase. These changes improve the functionality and user experience of the Raynab extension by providing more flexible transaction management options.
- Removed outdated example input from ai.json to streamline transaction querying. - Simplified imports in transactionEditForm.tsx for better readability. - Enhanced state management for payees and categories, ensuring proper validation and handling of transaction data. - Improved loading state handling and validation messages in the transaction edit form. These changes enhance the user experience by providing clearer transaction management and improved code maintainability in the Raynab extension.
- Simplified import statements in transactionEditForm.tsx for better readability. - Removed the unused 'forApproval' prop from the TransactionEditForm component. - Updated state management for 'isTransfer' to eliminate unnecessary state updates. - Enhanced type definitions in get-big-numbers.ts for improved error handling. These changes enhance code maintainability and readability in the Raynab extension.
- Added an optional callback prop `onTransactionDeleted` to the `DeleteTransactionAction` component to allow parent components to respond to transaction deletions. - Updated the `TransactionItem` component to pass the `onTransactionDeleted` callback to the `DeleteTransactionAction`. - Implemented a `handleTransactionDeleted` function in the `TransactionView` component to refresh the transaction list and reset the view state upon deletion. These changes improve the user experience by ensuring the UI reflects the latest transaction state after deletions.
- Updated date initialization to ensure it reflects the current date correctly. - Enhanced date formatting to return only the date portion in ISO format. - Added comprehensive validation for the amount field to ensure it is not empty, a valid number, and not zero. These changes enhance the user experience by providing accurate date handling and clearer validation messages in the transaction creation process.
- Introduced the "get-budget" tool in package.json to fetch current budget information, including age of money and monthly budget details. - Updated ai.json with example inputs and outputs for the new budget retrieval functionality, enhancing user interaction with the extension. These changes improve the Raynab extension's capabilities by providing users with detailed insights into their budgeting status.
…prefix - Replaced all instances of "@ynab" with "@raynab" in the ai.json file to standardize the command prefix for user interactions. - Enhanced the README.md to include a comprehensive list of sample questions for the new AI tools, improving user guidance on querying budget information. These changes improve the clarity and usability of the Raynab extension's AI features, ensuring users can effectively interact with the system.
- Renamed AI tools section to AI Extensions in both CHANGELOG.md and README.md for consistency. - Updated descriptions to clarify the functionality of new AI Extensions for natural language budget queries. These changes enhance documentation clarity and ensure users are informed about the latest features in the Raynab extension.
Thank you for your contribution! 🎉 🔔 @gogocharli you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. You can expect an initial review within five business days. |
…encies - Upgraded "react-devtools" from version 5.2.0 to 6.1.1 for improved debugging capabilities.
…utes & TransactionEditFormProps'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR adds comprehensive AI-powered tools and natural language capabilities to the Raynab extension for managing YNAB budgets and transactions.
- Added 6 new AI tools in
package.json
for natural language budget management, including transaction creation, budget queries, and spending analytics - Implemented consistent budget validation across commands using new
checkForActiveBudget
utility - Added proper error handling and logging in AI tools with detailed debug information
- Added
metadata
folder for screenshots since there areview
commands inpackage.json
- Improved transaction form validation and state management in both create and edit forms
Note: The PR should include a metadata
folder with screenshots since there are view
commands in package.json
. Please refer to the Raycast Documentation for guidance.
26 file(s) reviewed, 31 comment(s)
Edit PR Review Bot Settings | Greptile
…tension - Changed the "query" key to "period" in the get-transactions arguments for consistency in ai.json. - Enhanced balance formatting in mock data to include dollar signs and commas for better readability. - Updated sample questions in README.md to reflect the latest changes in AI queries. - Removed unused properties from package.json to streamline the codebase. These updates improve the clarity and usability of the Raynab extension's AI features, ensuring users have a better experience when interacting with their budget information.
- Removed loading state checks from the Command function in multiple components (accounts.tsx, scheduleTransaction.tsx, transaction.tsx, transactions.tsx, unreviewed.tsx) to streamline the budget validation process. - Simplified the logic by directly using the activeBudgetId from the checkForActiveBudget utility. These changes enhance code clarity and maintainability across the Raynab extension's components.
- Added the Icon import to OpenInYnabAction for improved UI representation. - Moved the onSubcategoryAmountChange handler definition in TransactionCreateForm to ensure it is defined before its first usage, enhancing code clarity and organization. These changes improve the structure and maintainability of the Raynab extension's components.
… on lines 103-113.
… tools - Removed unnecessary console log statements from various tools (add-transaction, get-account-details, get-accounts, get-big-numbers, get-budget, get-transactions) to clean up the code and reduce clutter in the console output. - Enhanced the account search logic in get-account-details to prioritize exact name matches before partial matches, improving accuracy in account retrieval. These changes streamline the codebase and enhance the performance of the Raynab extension's tools.
- Replaced the showToast function with showFailureToast in checkForActiveBudget for improved error messaging. - Added regex validation for date format in add-transaction to ensure correct input format (YYYY-MM-DD). - Streamlined account search logic in get-account-details for better readability. These updates improve user feedback and data integrity within the Raynab extension's tools.
- Updated the handleTransactionDeleted function to await the completion of the mutate call, ensuring the transactions list is refreshed with the latest data before resetting the view state. - This change improves the accuracy of the displayed transactions after a deletion, enhancing user experience within the Raynab extension.
Thanks for the superb PR @omarshahine! Reviewing this today 👍🏿 |
Description
This PR introduces several new AI-powered tools and improvements for the Raynab extension.
It's a rather big PR since I had to modify some of the existing Forms and fix some bugs in them to support the add-transaction tool. I also took the liberty to add a budget check form to each command and send users to select the active budget. There were some places where the commands checked for an active budget but not all so I cleaned this up.
✨ New Features
AI Budget Tools:
💡 Example Queries
Transaction Management
Account Queries
Big Numbers
Budget Information
💎 Improvements
Enhanced budget data retrieval and date formatting.
Improved error handling and user feedback for AI tools.
Support for natural language queries across all tools.
🐞 Bug Fixes
Fixed date format mismatch in budget month queries.
Fixed Validation issues on Create and Edit forms
Improved error handling in AI tool operations.
Checklist
npm run build
and tested this distribution build in Raycastassets
folder are used by the extension itselfREADME
are located outside the metadata folder if they were not generated with our metadata tool