Commit Graph

64 Commits

Author SHA1 Message Date
dal f9eece00d6
merge staging in 2025-08-18 14:39:59 -06:00
dal e0d03c6aab
Refactor data metadata handling and improve report creation logic. Updated SimpleType enum for better serialization, removed unused createDataMetadata function, and integrated createMetadataFromResults for data processing. Enhanced report creation with version history management and improved error handling in report updates. 2025-08-18 11:59:56 -06:00
dal c8d2c0ff0f
Refactor metric data handler and snowflake query to improve limit handling. Adjusted query limit logic to use display limit and added optional limit parameter to snowflake query function for better flexibility. 2025-08-13 11:38:44 -06:00
dal b96cb39b78
turbo fast web build 2025-08-11 11:33:18 -06:00
dal 9be23fac0e
Enhance SQL query safety checks with dialect-aware filtering and improve data source type retrieval in query engine 2025-08-05 11:00:34 -06:00
Nate Kelley ffeee17365
move enum types 2025-08-04 18:04:32 -06:00
dal 2cd36e47e1
feat: add Google Vertex AI and improve model handling
- 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.
2025-07-23 07:22:52 -06:00
Nate Kelley 3199b38413
Merge branch 'staging' into devin/BUS-1477-1753139868 2025-07-22 09:02:36 -06:00
dal 43f88dd3a4
Merge pull request #580 from buster-so/devin/BUS-1468-1753084167
feat: implement idle tool for agent system (BUS-1468)
2025-07-22 08:44:59 -06:00
dal 6e626c2d2b
added in the itertools 2025-07-22 08:20:45 -06:00
Devin AI 64af03809c Remove custom connect_timeout parameter from Redshift connection
- Remove custom .options([("connect_timeout", "120")]) parameter
- Keep existing .acquire_timeout(Duration::from_secs(120)) which uses proper SDK methods
- This allows the SDK to handle connection timeouts using its default mechanisms

Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
2025-07-22 13:34:33 +00:00
Devin AI 1820dd6842 Implement consistent email sorting for individual_permissions arrays
- 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>
2025-07-22 12:41:40 +00:00
Devin AI 5082831630 Add consistent ordering to individual_permissions queries
- 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>
2025-07-21 23:17:59 +00:00
dal d1ab09999f
update so rust build works 2025-07-21 15:46:43 -06:00
dal 64992930a4
increase timeouts and a few lint fixes 2025-07-21 15:39:27 -06:00
Devin AI 5ca93b6de5 revert: remove Rust implementation, keep TypeScript-only idle tool
- Remove idle.rs file completely
- Revert all agent mode files to remove Idle tool integration
- Revert mod.rs to remove idle module
- Keep TypeScript implementation in packages/ai:
  - idle-tool.ts
  - index.ts export
  - analyst-agent.ts integration

Addresses user feedback to implement idle tool only in TypeScript packages/ai

Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
2025-07-21 18:09:19 +00:00
Devin AI 6f6e3ffbc9 feat: implement idle tool for agent system
- 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>
2025-07-21 07:54:43 +00:00
Devin AI 9896b5cc90 Replace 'Unknown' user name fallback with email address
- 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>
2025-07-19 04:12:13 +00:00
dal 8ba6ee20a4
Merge branch 'devin/BUS-1453-1752871654' of https://github.com/buster-so/buster into devin/BUS-1453-1752871654 2025-07-18 15:11:27 -06:00
dal 227168bb62
BUS-1454: Add multiple color themes and refactor organization color palette retrieval logic 2025-07-18 15:10:38 -06:00
Devin AI c4da72173c BUS-1453: Address PR comments - fix duplicate color and improve org palette query
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
2025-07-18 21:00:36 +00:00
Devin AI d5beb5edeb BUS-1453: Implement color fallback logic for metric handlers
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
2025-07-18 20:50:33 +00:00
dal d7d4ab6401
ok filtering the chats and hiding shareWithChannel for now 2025-07-18 11:32:33 -06:00
Nate Kelley 9f86f337ff
Merge branch 'staging' into dallin/bus-1419-enable-sharing-of-dashboards-or-collections-with-workspace 2025-07-17 22:13:53 -06:00
Nate Kelley 0a34db8989
revise front end to use shared components 2025-07-17 22:12:12 -06:00
Nate Kelley 10e37f07de
update all types to work better together 2025-07-17 18:51:45 -06:00
dal cd8a50403f
Merge branch 'staging' into dallin/bus-1419-enable-sharing-of-dashboards-or-collections-with-workspace 2025-07-17 17:16:07 -06:00
dal 525a2c5e23
fix list logic 2025-07-17 17:04:30 -06:00
dal cc2dd7fa61
Enhance workspace member count integration across various handlers and components
- 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.
2025-07-17 16:21:14 -06:00
dal 4e2b6c235e
Refactor workspace sharing permissions across assets
- 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.
2025-07-17 15:26:26 -06:00
dal d9f9182ab2
ui components and return the values 2025-07-17 14:51:53 -06:00
dal 1e705c9828
Implement collection access checks for chats and dashboards
- 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.
2025-07-17 14:01:45 -06:00
dal 955aab3232
get max permissions between direct and workspace 2025-07-17 13:14:57 -06:00
dal a0a1e11493
update workspace sharing on all assets 2025-07-17 12:54:02 -06:00
Nate Kelley f725ef9386
add avatar urls to the share 2025-07-17 10:50:49 -06:00
dal 3d6c7549bd
Merge pull request #529 from buster-so/devin/BUS-1415-1752766195
Filter out stale asset import chats from GET /chats and /logs endpoints
2025-07-17 09:24:33 -07:00
Devin AI ea083784bc Fix Diesel subquery compilation errors - use exists() and raw SQL for message filtering
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
2025-07-17 16:21:13 +00:00
dal 308c87b202
Implement chat access checks for metrics and dashboards
- 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.
2025-07-17 10:07:58 -06:00
Devin AI 152825758b Filter out stale asset import chats from GET /chats and /logs endpoints
- 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>
2025-07-17 15:31:36 +00:00
Devin AI 22415d36c0 Fix error handling for workspace access issues in GET /chats/:id
- 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>
2025-07-17 14:54:57 +00:00
dal 7cee45916d
cascading permissions from dash to metrics 2025-07-16 12:22:04 -06:00
Nate Kelley fdf70abfb8
update database dev 2025-07-15 22:26:13 -06:00
dal 776019239b
Update apps/api/libs/handlers/src/chats/list_chats_handler.rs
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-07-14 12:10:53 -07:00
Cursor Agent 48027dccb9 Filter out chats with empty or whitespace-only titles
Co-authored-by: dallin <dallin@buster.so>
2025-07-14 19:08:04 +00:00
Cursor Agent 2cd3f0696f Rename chat name to title and filter out empty titles
Co-authored-by: dallin <dallin@buster.so>
2025-07-14 19:04:32 +00:00
Nate Kelley 139a0f52c9
organization camelcase update 2025-07-12 16:31:35 -06:00
dal e0aa426341
get_metric_data hotfix 2025-07-11 15:24:14 -06:00
dal 63866e813e
Merge pull request #484 from buster-so/cursor/update-api-routes-to-metric-files-e8c7
Update API routes to metric_files
2025-07-11 14:01:12 -07:00
Cursor Agent 99b27bc87a Checkpoint before follow-up message 2025-07-11 20:50:04 +00:00
dal f5b911cd12
Update apps/api/libs/handlers/src/metrics/get_metric_data_handler.rs
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-07-11 13:47:31 -07:00