- Add curly braces around default case content to satisfy noSwitchDeclarations rule
- Prevents variable declarations from being accessible to other switch cases
- Apply Biome formatting fixes for import statement and spacing
Co-Authored-By: nate@buster.so <nate@buster.so>
- Import database queries from main @buster/database package
- Use getUserOrganizationId() instead of user.organizationId
- Add proper error handling for users without organizations
- Follow existing patterns from other API handlers
Co-Authored-By: nate@buster.so <nate@buster.so>
- 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.
- Add server-shared types for GetTitleRequest and GetTitleResponse with Zod validation
- Create database query functions for each asset type (chat, metric, collection, dashboard)
- Implement GET endpoint with zValidator middleware and exhaustive switch statement
- Add proper permission checks (publiclyAccessible OR organizationId match)
- Export new functions from database query index files
- Add title route to v2 API index
- Follow existing Hono API patterns with standardErrorHandler
Co-Authored-By: nate@buster.so <nate@buster.so>
- Add authentication state detection using useSupabaseContext
- Detect embed page context using window.location.pathname
- Show 'Login' button with redirect parameter for unauthenticated users or embed pages
- Keep 'Go home' button for authenticated users without asset access
- Include current URL as redirect parameter in login link
Co-Authored-By: nate@buster.so <nate@buster.so>
- Update login page to be server component that extracts searchParams
- Pass redirectTo as prop to LoginForm instead of using useSearchParams
- Add helper function to reduce code duplication in middleware
- Add URL validation in layout component as suggested in PR comments
- Follow Next.js App Router best practices for server/client components
Co-Authored-By: nate@buster.so <nate@buster.so>
- 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>