Skip to content

Stable#2170

Open
knobweezy wants to merge 151 commits into
stackblitz-labs:stablefrom
knobweezy:stable
Open

Stable#2170
knobweezy wants to merge 151 commits into
stackblitz-labs:stablefrom
knobweezy:stable

Conversation

@knobweezy

Copy link
Copy Markdown

No description provided.

dhensen and others added 30 commits May 13, 2025 07:20
…50219

- Added logging for dynamic max tokens based on model details.
- Increased max token limit for Claude model from 8000 to 128000.
- Included beta header for Anthropik API call.
…e prompt instructions

- Remove redundant `_chatId` parameter in `takeSnapshot` function
- Update prompt instructions for shell commands and artifact handling
…ment-128k-max-token-output

feat: increase max token limit for Claude model claude-3-7-sonnet-202…
Remove redundant checks for deleted paths and streamline binary file handling. This fixes the browser using excessive memory and freezing.

Improve DiffView to use a singleton instance of Shiki
The Docker build process was failing with an out-of-memory error during the `pnpm run build` step in the `bolt-ai-production` stage.

This commit increases the memory available to Node.js by modifying the build command to include the `--max-old-space-size=4096` flag. This provides 4GB of memory to the Node.js process, which should be sufficient to complete the build.
- Implement discuss mode toggle and UI in chat box
- Add quick action buttons for file, message, implement and link actions
- Extend markdown parser to handle quick action elements
- Update message components to support discuss mode and quick actions
- Add discuss prompt for technical consulting responses
- Refactor chat components to support new functionality

The changes introduce a new discuss mode that allows users to switch between code implementation and technical discussion modes. Quick action buttons provide immediate interaction options like opening files, sending messages, or switching modes.
fix: increase Node.js memory limit in Docker build
…725-fix/docker-oom

revert: "fix: increase Node.js memory limit in Docker build"
- Pass isStreaming prop through message components to disable actions during streaming
- Improve action button styling with icons and better spacing
- Disable buttons while streaming to prevent concurrent actions
The isStreaming prop was passed through multiple chat components but wasn't being strict enough in the Markdown component where it was ultimately passed causing the quick actions to be disabled.
Pass model and provider information through chat components to include in quick action messages. This fixes the issue of defaulting to anthropic model.
- Implement design scheme system with palette, typography, and feature customization
- Add color scheme dialog for user customization
- Update chat UI components to use design scheme values
- Improve header actions with consolidated deploy and export buttons
- Adjust layout spacing and styling across multiple components (chat, workbench etc...)
- Add model and provider info to chat messages
- Refactor workbench and sidebar components for better responsiveness
Change primary and neutral colors to better suit bolts design
The 'shadow' feature was removed from the default design scheme as it's not commonly used and simplifies the default configuration
- Implement element inspector tool for preview iframe with hover/click detection
- Add inspector panel UI to display element details and styles
- Integrate selected elements into chat messages for reference
- Style improvements for chat messages and scroll behavior
- Add inspector script injection to preview iframe
- Support element selection and context in chat prompts
-Redesign Messgaes, Workbench and Header for a more refined look allowing more workspace in view
- Move user provided design scheme section to be grouped with other design instructions
- update user message icon color to use accent-500
- Enhance wording for better professionalism and clarity in design scheme usage
…ay format

Change the message content from a plain string to an array of objects with type and text fields to support future extensibility of message formats
feat: add discuss mode and quick actions
- Add 'Frosted Glass' to design features list in design-scheme.ts
- Implement visual styling for frosted glass feature in ColorSchemeDialog
- Adjust sidebar button margin in Workbench for better spacing
Implement two different methods for fetching repository contents:
1. A new Cloudflare-compatible method using GitHub Contents API with batch processing
2. The existing zip-based method for non-Cloudflare environments

The changes include better error handling, environment detection, and support for GitHub tokens from both Cloudflare context and process.env. Also added size limits and filtering for large files while allowing lock files.
feat: add inspector, design palette and redesign
- Refactored the new fine-tuned system prompt to heavily reduce token usage by removing redundent snippets and duplicate instructions while keeping the same strict rules in place.
- Default prompt now uses this system prompt to reduce token usage by default
Stijnus and others added 29 commits September 7, 2025 01:07
- Add OPENAI_LIKE_API_MODELS environment variable support
- Enable fallback model parsing when /models endpoint fails
- Support providers like Fireworks AI that don't allow /models requests
- Format: path/to/model1:limit;path/to/model2:limit;path/to/model3:limit
- Update IProviderSetting interface to include OPENAI_LIKE_API_MODELS property
- Fix all linting errors and code formatting issues
Add a robust debug logging system that captures application state, user interactions, and system diagnostics for enhanced troubleshooting and development experience.

## ✨ Features Added

### 🔍 **Multi-Source Data Capture**
- **Console Logging**: Captures all console.log, console.warn, console.error
- **Error Handling**: Intercepts JavaScript errors and unhandled promise rejections
- **Network Monitoring**: Tracks all fetch requests with timing and status
- **User Actions**: Records user interactions and UI events
- **Terminal Activity**: Captures shell input/output with ANSI cleaning
- **Performance Metrics**: Memory usage, page load times, paint timing

### 📊 **System Information Collection**
- Platform detection (macOS, Windows, Linux)
- Browser and viewport information
- Git repository status (branch, commit, dirty state)
- Application state (model, provider, workbench view)
- Performance and memory statistics

### 🎯 **User Interface Integration**
- **Avatar Dropdown**: "Download Debug Log" option with download icon
- **Header Actions**: "Debug Log" button alongside existing "Report Bug"
- **One-Click Download**: Generates comprehensive debug reports
- **Error Handling**: Graceful degradation with user feedback

### 🔧 **Technical Implementation**
- **Circular Buffers**: Memory-efficient storage with fixed capacity (1K entries)
- **Lazy Loading**: Zero performance impact when disabled (default state)
- **Debouncing**: Terminal logs debounced at 100ms to prevent spam
- **JSON Safe**: Circular reference protection and depth limiting
- **Async Operations**: Non-blocking debug operations

### 📁 **Files Modified**
- `app/utils/debugLogger.ts` (1,284 lines) - Core debug logging utility
- `app/utils/logger.ts` - Integration with existing logging system
- `app/utils/shell.ts` - Terminal activity capture
- `app/components/@settings/core/AvatarDropdown.tsx` - UI integration
- `app/components/header/HeaderActionButtons.client.tsx` - Header button
- `app/root.tsx` - Initialization and setup
- `app/routes/api.git-info.ts` - Git information endpoint

## 🚀 **Benefits**

- **Enhanced Debugging**: Comprehensive data collection for issue reproduction
- **Performance Monitoring**: Built-in performance tracking and memory analysis
- **User Support**: Easy debug log generation for support tickets
- **Developer Experience**: Rich debugging data without performance penalty
- **Production Ready**: Opt-in system with zero impact on regular users

## 🔒 **Security & Privacy**

- Client-side only operation (no server transmission)
- User-controlled data collection and export
- No sensitive information captured automatically
- Manual opt-in required for debug mode activation

## 📈 **Performance Impact**

- **Disabled by Default**: No performance impact for regular users
- **Lazy Initialization**: Components loaded only when needed
- **Memory Bounded**: Fixed-size buffers prevent memory leaks
- **Non-Blocking**: All operations are asynchronous
- **Efficient Storage**: Circular buffers with automatic cleanup

## 🔄 **Integration Points**

- Seamlessly integrates with existing `logger` utility
- Compatible with current shell/terminal implementation
- Works with existing error handling patterns
- Maintains backward compatibility

This implementation provides developers and users with powerful debugging capabilities while maintaining excellent performance and user experience.
…-api-models

feat: add support for OPENAI_LIKE_API_MODELS
…DEBUGGING_FEAT

feat: comprehensive debug logging system with capture and download
…rmance optimizations (stackblitz-labs#1976)

* fix: support for multiple artifacts to support newer llm

* Improve shell command detection and error handling

Enhanced the message parser to better distinguish between shell commands and script files, preventing accidental file creation for shell command code blocks. Added pre-validation and error enhancement for shell commands in the action runner, including suggestions for common errors and auto-modification of commands (e.g., adding -f to rm). Updated comments and added context checks to improve action handling and user feedback.

* feat: enhance message parser with shell command detection and improved error handling

- Add shell command detection to distinguish executable commands from script files
- Implement smart command pre-validation with automatic fixes (e.g., rm -f for missing files)
- Enhance error messages with contextual suggestions for common issues
- Improve file creation detection from code blocks with better context analysis
- Add comprehensive test coverage for enhanced parser functionality
- Clean up debug code and improve logging consistency
- Fix issue stackblitz-labs#1797: prevent AI-generated code from appearing in chat instead of creating files

All tests pass and code follows project standards.

* fix: resolve merge conflicts and improve artifact handling

- Fix merge conflicts in Markdown component after PR stackblitz-labs#1426 merge
- Make artifactId optional in callback interfaces for standalone artifacts
- Update workbench store to handle optional artifactId safely
- Improve type safety for artifact management across components
- Clean up code formatting and remove duplicate validation logic

These changes ensure proper integration of the multiple artifacts feature
with existing codebase while maintaining backward compatibility.

* test: update snapshots for multiple artifacts support

- Update test snapshots to reflect new artifact ID system from PR stackblitz-labs#1426
- Fix test expectations to match new artifact ID format (messageId-counter)
- Ensure all tests pass with the merged functionality
- Verify enhanced parser works with multiple artifacts per message

* perf: optimize enhanced message parser for better performance

- Optimize regex patterns with structured objects for better maintainability
- Reorder patterns by likelihood to improve early termination
- Replace linear array search with O(1) Map lookup for command patterns
- Reduce memory allocations by optimizing pattern extraction logic
- Improve code organization with cleaner pattern type handling
- Maintain full backward compatibility while improving performance
- All tests pass with improved execution time

* test: add comprehensive integration tests for enhanced message parser

- Add integration tests for different AI model output patterns (GPT-4, Claude, Gemini)
- Test file path detection with various formats and contexts
- Add shell command detection and wrapping tests
- Include edge cases and false positive prevention tests
- Add performance benchmarking to validate sub-millisecond processing
- Update test snapshots for enhanced artifact handling
- Ensure backward compatibility with existing parser functionality

The enhanced message parser now has comprehensive test coverage validating:
- Smart detection of code blocks that should be files vs plain examples
- Support for multiple AI model output styles and patterns
- Robust shell command recognition across 9+ command categories
- Performance optimization with pre-compiled regex patterns
- False positive prevention for temp files and generic examples

All 44 tests pass, confirming the parser solves issue stackblitz-labs#1797 while maintaining
excellent performance and preventing regressions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: enhance message parser with advanced AI model support and performance optimizations

## Message Parser Enhancements

### Core Improvements
- **Enhanced AI Model Support**: Robust parsing for GPT-4, Claude, Gemini, and other LLM outputs
- **Smart Code Block Detection**: Intelligent differentiation between actual files and example code blocks
- **Advanced Shell Command Recognition**: Detection of 9+ command categories with proper wrapping
- **Performance Optimization**: Pre-compiled regex patterns for sub-millisecond processing

### Key Features Added
- **Multiple Artifact Support**: Handle complex outputs with multiple code artifacts
- **File Path Detection**: Smart recognition of file paths in various formats and contexts
- **Error Handling**: Improved error detection and graceful failure handling
- **Shell Command Wrapping**: Automatic detection and proper formatting of shell commands

### Technical Enhancements
- **Action Runner Integration**: Seamless integration with action runner for command execution
- **Snapshot Testing**: Comprehensive test coverage with updated snapshots
- **Backward Compatibility**: Maintained compatibility with existing parser functionality
- **False Positive Prevention**: Advanced filtering to prevent temp files and generic examples

### Files Modified
- Enhanced message parser core logic ()
- Updated action runner for better command handling ()
- Improved artifact and markdown components
- Comprehensive test suite with 44+ test cases
- Updated test snapshots and workbench store integration

### Performance & Quality
- Sub-millisecond processing performance
- 100% test coverage for new functionality
- Comprehensive integration tests for different AI model patterns
- Edge case handling and regression prevention

Addresses issue stackblitz-labs#1797: Enhanced message parsing for modern AI model outputs
Resolves merge conflicts and improves overall artifact handling reliability

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Anirban Kar <thecodacus@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
…bs#1977)

- Add StreamRecoveryManager for handling stream timeouts
- Monitor stream activity with 45-second timeout
- Automatic recovery with 2 retry attempts
- Proper cleanup on stream completion

Fixes stackblitz-labs#1964

Co-authored-by: Keoma Wright <founder@lovemedia.org.za>
…rchitecture (stackblitz-labs#1978)

* feat: add service tabs refactor with GitHub, GitLab, Supabase, Vercel, and Netlify integration

This commit introduces a comprehensive refactor of the connections system,
replacing the single connections tab with dedicated service integration tabs:

✨ New Service Tabs:
- GitHub Tab: Complete integration with repository management, stats, and API
- GitLab Tab: GitLab project integration and management
- Supabase Tab: Database project management with comprehensive analytics
- Vercel Tab: Project deployment management and monitoring
- Netlify Tab: Site deployment and build management

🔧 Supporting Infrastructure:
- Enhanced store management for each service with auto-connect via env vars
- API routes for secure server-side token handling and data fetching
- Updated TypeScript types with missing properties and interfaces
- Comprehensive hooks for service connections and state management
- Security utilities for API endpoint validation

🎨 UI/UX Improvements:
- Individual service tabs with tailored functionality
- Motion animations and improved loading states
- Connection testing and health monitoring
- Advanced analytics dashboards for each service
- Consistent design patterns across all service tabs

🛠️ Technical Changes:
- Removed legacy connection tab in favor of individual service tabs
- Updated tab configuration and routing system
- Added comprehensive error handling and loading states
- Enhanced type safety with extended interfaces
- Implemented environment variable auto-connection features

Note: Some TypeScript errors remain and will need to be resolved in follow-up commits.
The dev server runs successfully and the service tabs are functional.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: comprehensive service integration refactor with enhanced tabs architecture

Major architectural improvements to service integrations:

**Service Integration Refactor:**
- Complete restructure of service connection tabs (GitHub, GitLab, Vercel, Netlify, Supabase)
- Migrated from centralized ConnectionsTab to dedicated service-specific tabs
- Added shared service integration components for consistent UX
- Implemented auto-connection feature using environment variables

**New Components & Architecture:**
- ServiceIntegrationLayout for consistent service tab structure
- ConnectionStatus, ServiceCard components for reusable UI patterns
- BranchSelector component for repository branch management
- Enhanced authentication dialogs with improved error handling

**API & Backend Enhancements:**
- New API endpoints: github-branches, gitlab-branches, gitlab-projects, vercel-user
- Enhanced GitLab API service with comprehensive project management
- Improved connection testing hooks (useConnectionTest)
- Better error handling and rate limiting across all services

**Configuration & Environment:**
- Updated .env.example with comprehensive service integration guides
- Added auto-connection support for all major services
- Improved development and production environment configurations
- Enhanced tab management with proper service icons

**Code Quality & TypeScript:**
- Fixed all TypeScript errors across service integration components
- Enhanced type definitions for Vercel, Supabase, and other service integrations
- Improved type safety with proper optional chaining and type assertions
- Better separation of concerns between UI and business logic

**Removed Legacy Code:**
- Removed redundant connection components and consolidated into service tabs
- Cleaned up unused imports and deprecated connection patterns
- Streamlined authentication flows across all services

This refactor provides a more maintainable, scalable architecture for service integrations
while significantly improving the user experience for managing external connections.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: clean up dead code and consolidate utilities

- Remove legacy .eslintrc.json (replaced by flat config)
- Remove duplicate app/utils/types.ts (unused type definitions)
- Remove app/utils/cn.ts and consolidate with classNames utility
- Clean up unused ServiceErrorHandler class implementation
- Enhance classNames utility to support boolean values
- Update GlowingEffect.tsx to use consolidated classNames utility

Removes ~150+ lines of unused code while maintaining all functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Simplify terminal health checks and improve project setup

Removed aggressive health checking and reconnection logic from TerminalManager to prevent issues with terminal responsiveness. Updated TerminalTabs to remove onReconnect handlers. Enhanced projectCommands utility to generate non-interactive setup commands and detect shadcn projects, improving automation and reliability of project setup.

* fix: resolve GitLab deployment issues and enhance GitHub deployment reliability

GitLab Deployment Fixes:
- Fix COEP header issue for avatar images by adding crossOrigin and referrerPolicy attributes
- Implement repository name sanitization to handle special characters and ensure GitLab compliance
- Enhance error handling with detailed validation error parsing and user-friendly messages
- Add explicit path field and description to project creation requests
- Improve URL encoding and project path resolution for proper API calls
- Add graceful file commit handling with timeout and error recovery

GitHub Deployment Enhancements:
- Add comprehensive repository name validation and sanitization
- Implement real-time feedback for invalid characters in repository name input
- Enhance error handling with specific error types and retry suggestions
- Improve user experience with better error messages and validation feedback
- Add repository name length limits and character restrictions
- Show sanitized name preview to users before submission

General Improvements:
- Add GitLabAuthDialog component for improved authentication flow
- Enhance logging and debugging capabilities for deployment operations
- Improve accessibility with proper dialog titles and descriptions
- Add better user notifications for name sanitization and validation issues

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
- Add electron-dev.mjs script for hot-reload development
- Support automatic Electron dependency building
- Start Remix dev server and Electron app concurrently
- Add proper process management and cleanup
- Fix preload script path for development mode
- Add electron:dev and electron:dev:inspect npm scripts

This enables developers to run 'pnpm electron:dev' for a complete
hot-reload development experience with automatic rebuilding and
process management.
…ctron-dev

feat: add Electron hot-reload development mode
…blitz-labs#1999)

* fix: resolve Docker build syntax errors and merge conflicts

- Fix incomplete ARG HuggingFace declaration to ARG HuggingFace_API_KEY
- Fix invalid WORKDIR variable reference ${WORKDIR}/run to /app/run
- Resolve merge conflicts preserving both runtime and development stages
- Add proper development stage with corrected environment variables
- Ensure both dockerbuild and dockerbuild:prod targets work correctly

Resolves Docker build error: "target stage 'bolt-ai-development' could not be found"

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* ci: add comprehensive Docker build validation to main CI pipeline

- Add docker-validation job to ci.yaml workflow
- Test both runtime (production) and development Docker targets
- Validate docker-compose configuration syntax
- Run on all PRs and pushes to catch Docker build issues early
- Set 15-minute timeout to prevent hanging builds
- Use --no-cache and --progress=plain for reliable validation

This ensures Docker build syntax errors like stackblitz-labs#1996 are caught in CI
before they reach main branch, preventing deployment failures.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: use modern docker compose command syntax in CI

- Change docker-compose to docker compose (GitHub Actions uses Docker Compose v2)
- Fixes CI failure: docker-compose: command not found
- Ensures docker-compose validation works in GitHub Actions runners

---------

Co-authored-by: Claude <noreply@anthropic.com>
- Change target from bolt-ai-production to runtime
- Matches the actual stage name in the new Dockerfile structure
- Fixes CI failure: target stage 'bolt-ai-production' could not be found
…tackblitz-labs#2000)

- Change target from bolt-ai-production to runtime
- Matches the actual stage name in the current Dockerfile
- Prevents Docker build failures in production deployments
- Fixes target stage 'bolt-ai-production' could not be found error
…iables (stackblitz-labs#1881) (stackblitz-labs#2002)

* fix: update Docker workflow to use correct target stage name

- Change target from bolt-ai-production to runtime
- Matches the actual stage name in the new Dockerfile structure
- Fixes CI failure: target stage 'bolt-ai-production' could not be found

* feat: auto-enable local providers when configured via environment variables (stackblitz-labs#1881)

- Add server-side API endpoint `/api/configured-providers` to detect environment-configured providers
- Auto-enable Ollama, LMStudio, and OpenAILike providers when their environment variables are set
- Filter out placeholder values (like "your_*_here") to only detect real configuration
- Preserve user preferences: auto-enabling only applies on first load or previously auto-enabled providers
- Track auto-enabled vs manually-enabled providers in localStorage for proper user choice handling
- Solve issue where Ollama appears configured server-side but disabled in UI

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
…tions

## Issues Fixed
- Toast messages appearing in background/blurred due to z-index conflicts
- Missing success toast notifications for deployment completions
- Scoped ToastContainer limiting toast visibility to chat component only

## Changes Made

### Global Toast System
- Move ToastContainer from Chat.client.tsx to root.tsx for global availability
- Add highest z-index (1000) to ensure toasts appear above all UI elements
- Remove duplicate ToastContainer from chat component

### Z-Index System Updates
- Add .z-toast class with z-index: $zIndexMax + 1 (1000)
- Apply toast z-index to .Toastify__toast-container in toast.scss
- Ensure proper layering hierarchy for all toast messages

### Deployment Success Notifications
- Add missing toast.success() calls to all deployment services:
  - NetlifyDeploy: "🚀 Netlify deployment completed successfully!"
  - VercelDeploy: "🚀 Vercel deployment completed successfully!"
  - GitHubDeploy: "🚀 GitHub deployment preparation completed successfully!"
  - GitLabDeploy: "🚀 GitLab deployment preparation completed successfully!"

## Result
- All toast messages now appear in foreground with proper z-index
- Deployment success notifications are clearly visible to users
- Consistent toast behavior across the entire application
- No more blurred or background toast messages

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Replaces direct localStorage usage with a safe 'storage' variable that checks for globalThis and method existence. This improves compatibility with environments where localStorage may not be available, such as server-side rendering.
…_fix

fix: refactor localStorage access for Supabase state
* fix: update Docker workflow to use correct target stage name

- Change target from bolt-ai-production to runtime
- Matches the actual stage name in the new Dockerfile structure
- Fixes CI failure: target stage 'bolt-ai-production' could not be found

* fix: resolve critical Docker configuration issues

This commit fixes multiple critical Docker configuration issues that prevented successful builds:

**Dockerfile Issues Fixed:**
- Replace incomplete runtime stage with proper production stage using Wrangler
- Add missing environment variables for all API providers (DeepSeek, LMStudio, Mistral, Perplexity, OpenAI-like)
- Use correct port (5173) instead of 3000 to match Wrangler configuration
- Add proper bindings.sh script copying and execution permissions
- Configure Wrangler metrics and proper startup command

**Docker Compose Issues Fixed:**
- Add missing `context` and `dockerfile` fields to app-dev service
- Fix target name from `bolt-ai-development` to `development`

**Package.json Issues Fixed:**
- Update dockerbuild script to use correct target name `development`

**Testing:**
- ✅ Both `pnpm run dockerbuild` and `pnpm run dockerbuild:prod` now work
- ✅ All environment variables properly configured
- ✅ Docker images build successfully with proper Wrangler integration

Resolves Docker build failures and enables proper containerized deployment.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update Dockerfile

* fix: update GitHub workflow Docker targets to match Dockerfile stage names

Update ci.yaml and docker.yaml workflows to use correct Docker target stage name 'bolt-ai-production' instead of 'runtime'.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Refactor Dockerfile for optimized production build

Adds git installation for build/runtime scripts and introduces a separate prod-deps stage to prune dependencies before final production image. Updates file copy sources to use prod-deps stage, improving build efficiency and image size.

---------

Co-authored-by: Claude <noreply@anthropic.com>
…es-z-index-deployment

fix: toast message visibility and deployment success notifications
Expanded and clarified Docker usage instructions in README.md, including environment variable setup and workflow details. Updated @cloudflare/workers-types and wrangler dev dependencies in package.json to newer versions.
Co-authored-by: embire2 <ceo@openweb.co.za>
…z-labs#2033)

* Remove 'use client' directive from Collapsible.tsx

removed incompatible 'use client'

* Remove 'use client' directive from ScrollArea.tsx

incompatible 'use client'  removed

* Remove 'use client' directive from Badge.tsx

incompatible 'use client'  removed
* fix: improve local model provider robustness and UX

- Extract shared Docker URL rewriting and env conversion into BaseProvider
  to eliminate 4x duplicated code across Ollama and LMStudio
- Add error handling and 5s timeouts to all model-listing fetches so one
  unreachable provider doesn't block the entire model list
- Fix Ollama using createOllama() instead of mutating provider internals
- Fix LLMManager singleton ignoring env updates on subsequent requests
- Narrow cache key to only include provider-relevant env vars instead of
  the entire server environment
- Fix 'as any' casts in LMStudio and OpenAILike by using shared
  convertEnvToRecord helper
- Replace console.log/error with structured logger in OpenAILike
- Fix typo: filteredStaticModesl -> filteredStaticModels in manager
- Add connection status indicator (green/red dot) for local providers
  in the ModelSelector dropdown
- Show helpful "is X running?" message when local provider has no models

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add Cerebras LLM provider

- Add Cerebras provider with 8 models (Llama, GPT OSS, Qwen, ZAI GLM)
- Integrate @ai-sdk/cerebras@0.2.16 for compatibility
- Add CEREBRAS_API_KEY to environment configuration
- Register provider in LLMManager registry

Models included:
- llama3.1-8b, llama-3.3-70b
- gpt-oss-120b (reasoning)
- qwen-3-32b, qwen-3-235b variants
- zai-glm-4.6, zai-glm-4.7 (reasoning)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* feat: add Fireworks AI LLM provider

- Add Fireworks provider with 6 popular models
- Integrate @ai-sdk/fireworks@0.2.16 for compatibility
- Add FIREWORKS_API_KEY to environment configuration
- Register provider in LLMManager registry

Models included:
- Llama 3.1 variants (405B, 70B, 8B Instruct)
- DeepSeek R1 (reasoning model)
- Qwen 2.5 72B Instruct
- FireFunction V2

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* feat: add coding-specific models to existing providers

Enhanced providers with state-of-the-art coding models:

**DeepSeek Provider:**
+ DeepSeek V3.2 (integrates thinking + tool-use)
+ DeepSeek V3.2-Speciale (high-compute variant, beats GPT-5)

**Fireworks Provider:**
+ Qwen3-Coder 480B (262K context, best for coding)
+ Qwen3-Coder 30B (fast coding specialist)

**Cerebras Provider:**
+ Qwen3-Coder 480B (2000 tokens/sec!)
- Removed deprecated models (qwen-3-32b, llama-3.3-70b)

Total new models: 4
Total coding models across all providers: 12+

Performance highlights:
- Qwen3-Coder: State-of-the-art coding performance
- DeepSeek V3.2: Integrates thinking directly into tool-use
- ZAI GLM 4.6: 73.8% SWE-bench score
- Ultra-fast inference: 2000 tok/s on Cerebras

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* feat: add dynamic model discovery to providers

Implemented getDynamicModels() for automatic model discovery:

**DeepSeek Provider:**
- Fetches models from https://api.deepseek.com/models
- Automatically discovers new models as DeepSeek adds them
- Filters out static models to avoid duplicates

**Cerebras Provider:**
- Fetches models from https://api.cerebras.ai/v1/models
- Auto-discovers new Cerebras models
- Keeps UI up-to-date with latest offerings

**Fireworks Provider:**
- Fetches from https://api.fireworks.ai/v1/accounts/fireworks/models
- Includes context_length from API response
- Discovers new Qwen-Coder and other models automatically

**Moonshot Provider:**
- Fetches from https://api.moonshot.ai/v1/models
- OpenAI-compatible endpoint
- Auto-discovers new Kimi models

Benefits:
- ✅ No manual updates needed when providers add new models
- ✅ Users always have access to latest models
- ✅ Graceful fallback to static models if API fails
- ✅ 5-second timeout prevents hanging
- ✅ Caching system built into BaseProvider

Technical details:
- Uses BaseProvider's built-in caching system
- Cache invalidates when API keys change
- Failed API calls fallback to static models
- All endpoints have 5-second timeout protection

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* feat: add Z.AI provider with GLM models and JWT authentication

Merged changes from PR stackblitz-labs#2069 to add Z.AI provider:
- Added GLM-4.6 (200K), GLM-4.5 (128K), and GLM-4.5 Flash models
- Implemented secure JWT token generation with HMAC-SHA256 signing
- Added dynamic model discovery from Z.AI API
- Included proper error handling and token validation
- GLM-4.6 achieves 73.8% on SWE-bench coding benchmarks

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Add ability to fetch and inject web page content into chat as context.
Includes SSRF protection (blocks private IPs, localhost), content
extraction (strips scripts/styles/nav), and a clean popover UI.

Reimplements the concept from PR stackblitz-labs#1703 without the issues (duplicated
ChatBox, dual API routes, SSRF vulnerability, window.prompt UX).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@DevFlex-AI

Copy link
Copy Markdown

@Stijnus can you review this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.