- Added support for Google Vertex AI model version 2.2.27 in pnpm-lock.yaml and package.json.
- Introduced new model wrappers for Sonnet4 and Haiku35 with fallback logic.
- Updated various agents to utilize the new Sonnet4 model instead of the previous anthropicCachedModel.
- Enhanced error handling and retry logic in the fallback model implementation.
- Increased processing row limit in Snowflake query to 5000 for better performance.
- Added tests for new AI fallback models and their streaming capabilities.
- Backend: Add itertools imports and case-insensitive email sorting to collections, dashboards, and metrics handlers
- Frontend: Add email sorting to React Query mutation onMutate callbacks for share/unshare operations
- Ensures consistent alphabetical ordering by email across API responses and UI state
- Addresses BUS-1477 requirements for predictable individual_permissions ordering
Co-Authored-By: nate@buster.so <nate@buster.so>
- Add .order_by(users::email) to individual_permissions_query in dashboard handler
- Add .order_by(users::email) to individual_permissions_query in metrics handler
- Add .order_by(users::email) to individual_permissions_query in collections handler
- Ensures consistent alphabetical ordering by email across all endpoints
Fixes BUS-1477
Co-Authored-By: nate@buster.so <nate@buster.so>
- Add Rust implementation in idle.rs by copying from done.rs
- Add TypeScript implementation in idle-tool.ts by copying from done-tool.ts
- Update all agent modes (review, analysis, follow_up_initialization, planning) to include idle tool
- Update analyst-agent.ts to include idleTool
- Add idle tool to terminating_tools lists
- Export idle module and tool from respective index files
Addresses BUS-1468: idle tool indicates agent finished current work but available for future tasks
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
- Update Rust handlers to use user_email instead of 'Unknown' fallback
- Add user_email field to MessageWithUser and ChatWithUser structs
- Update database queries to select user email field
- Update TypeScript chat-helpers to use email fallback
- Maintain final fallback to 'Unknown'/'Unknown User' if email is null
Fixes BUS-1457
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
- Introduced `count_workspace_members` utility function to retrieve the number of active users in a workspace.
- Updated chat, collection, dashboard, and metric handlers to include `workspace_member_count` in their responses.
- Modified relevant types to accommodate the new `workspace_member_count` field.
- Adjusted frontend components to display the number of workspace members in the ShareMenu and related UI elements.
These changes improve the visibility of workspace member information and enhance the overall user experience.
- Updated the `WorkspaceSharing` enum to use camelCase for serialization.
- Introduced `workspace_permissions` field in update requests for chats, collections, dashboards, and metrics.
- Implemented handling of workspace sharing permissions in respective update handlers, allowing for setting and removing permissions.
- Adjusted frontend components and API interfaces to align with the new `workspace_sharing` naming convention.
This change enhances the consistency and usability of workspace sharing across different asset types.
- Updated `get_chat_handler` to check for collection access when a user lacks direct permission.
- Modified `get_dashboard_handler` to first verify collection access before checking chat access.
- Added `check_chat_collection_access` function to validate user access to chats via collections.
- Enhanced `check_metric_dashboard_access` to include collection access checks concurrently with other permission checks.
This change improves the permission model by allowing access to chats and dashboards through associated collections, enhancing user experience and security.
- Added functions to check if a user has access to metrics and dashboards through associated chats.
- Updated permission handling in `get_metric_data_handler`, `get_metric_for_dashboard_handler`, and `get_metric_handler` to include chat access checks.
- Enhanced error handling for cases where users lack access to both dashboards and chats.
- Updated `asset_access_checks` to include new chat access functions and modified the public interface in `lib.rs` accordingly.
- Add subqueries to count user messages (non-null request_message) and total messages per chat
- Filter out chats with zero user messages AND only one total message
- This excludes auto-generated asset import chats that users never interacted with
- Applied same filtering logic to both list_chats_handler.rs and list_logs_handler.rs
Fixes BUS-1415
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
- Return 412 PRECONDITION_FAILED for permission/workspace access errors
- Return 404 NOT_FOUND for chat not found errors
- Keep 500 INTERNAL_SERVER_ERROR as fallback for other errors
- Addresses BUS-1423
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>