Commit Graph

910 Commits

Author SHA1 Message Date
Nirmal Arya
0cbff1e657 Revert to stable MCP implementation
- Remove problematic stdio import to fix build issues
- Focus on SSE-based MCP servers for now
- Builds should work properly now

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-25 11:27:48 -04:00
Nirmal Arya
70f5bc3488 Fix missing mcp-stdio export issue
Use dynamic import to avoid build-time import errors
Add fallback error handling for unsupported environments
This should fix both dev server and Docker build issues

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-25 11:27:48 -04:00
Nirmal Arya
4ba8d5dd11 Enable full Node.js compatibility for stdio MCP servers
- Add nodejs_als compatibility flag and node_compat preset to wrangler.toml
- Remove artificial stdio limitation from MCP service
- Restore original example config with npx/uvx servers
- Update UI messaging to reflect both stdio and SSE support
- This should enable Jimmy's original stdio MCP functionality

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-25 11:27:48 -04:00
Nirmal Arya
be422f18e0 Improve MCP integration for Cloudflare Workers environment
- Move MCP button to better position (after file upload, before enhance)
- Add runtime environment detection for stdio servers
- Update example config to focus on SSE-based servers
- Add warning about stdio server limitations in Cloudflare Workers
- Provide clearer error messages for unsupported server types

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-25 11:27:48 -04:00
Nirmal Arya
9264a5cf31 Fix MCP button positioning for better visibility
- Move MCP connection button from BaseChat to ChatBox component
- Position MCP button in the bottom toolbar near other action buttons
- Improve discoverability of MCP functionality in the UI
- Remove unused import from BaseChat component

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-25 11:27:48 -04:00
Jimmyyy
f73d1392e7 Add MCP integration and update AI SDK for MCP compatibility 2025-06-25 11:27:47 -04:00
Nirmal Arya
6156b84019 Fix starter template import failure by adding required User-Agent headers
- Add User-Agent header to GitHub API requests (required by GitHub)
- Fix Cloudflare Workers environment context handling
- Add comprehensive logging for template import debugging
- Improve error handling with detailed error messages
- Verify fix works for all 13 starter templates

Resolves template import 500 errors where users saw "Failed to import starter template"

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 23:55:29 -04:00
Nirmal Arya
72ae0bf3b7 fix multi-model compatibility. 2025-06-22 19:49:26 -04:00
Nirmal Arya
b9415e1d81 Feature/bayer mga provider (#33)
* fix: enhance Bayer MGA provider reliability and Docker integration

* Merge latest dev branch changes into Bayer MGA feature branch
* Improve Bayer MGA provider model filtering and error handling
* Add robust model validation with fallback mechanisms
* Enhance logging and debugging capabilities for model selection
* Add Bayer MGA environment variables to Docker configurations
* Update worker configuration with Bayer MGA API keys
* Add comprehensive Bayer MGA setup to .env.example
* Create standalone test script for Bayer MGA provider debugging
* Fix intermittent model selection issues beyond Claude 3.7 Sonnet
* Ensure provider switching works without breaking other providers

* Bayer MGA provider multimodel support and test coverage.

* Add Claude.md.
2025-06-22 02:21:14 -04:00
Nirmal Arya
0ecb5af30e Fix Bayer MGA provider model selection and improve error handling
- Enhanced BayerMGAProvider getModelInstance method with model validation
- Added fallback mechanism when requested model is not available
- Improved dynamic model filtering with better validation
- Added UI model selection handling for unavailable models
- Added README.md to ECR deploy workflow paths-ignore

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-17 05:22:17 -04:00
Nirmal Arya
96a9a05c79 fix:https routing and pr creation. 2025-06-16 22:07:14 -04:00
Nirmal Arya
2340edec94 github oauth fixes and deployment enhancements 2025-06-16 21:20:30 -04:00
Nirmal Arya
6b9c270a69 Merge branch 'feature/bayer-mga-provider' into dev 2025-06-16 15:56:49 -04:00
Nirmal Arya
ffd15746c5 fix Removed circular dependency by removing the import of LLMManager from BaseProvider 2025-06-16 15:55:59 -04:00
Nirmal Arya
45cec6cdc7 Fix GitHub OAuth authentication flow with proper callback handler 2025-06-11 08:42:58 -04:00
Nirmal Arya
d59a113188 feature:landing page for github login. 2025-06-10 16:50:30 -04:00
Nirmal Arya
c255d00973 fix: replace @remix-run/node imports with @remix-run/cloudflare for compatibility
- Update all auth-related routes to use @remix-run/cloudflare imports
- Fix GitHub OAuth server utilities to use Cloudflare-compatible session storage
- Resolve build failures caused by Node.js-specific modules in browser bundle
- Enable successful production builds for EKS deployment

This resolves the 'Cannot access xs before initialization' error by ensuring all imports are compatible with the Cloudflare Workers runtime environment.
2025-05-31 16:07:44 -04:00
Nirmal Arya
b983302406 fix: resolve Bayer MGA provider bundling issues
- Fix TypeScript compilation errors in debug API route that were causing JavaScript bundling failures
- Add proper type definitions for API responses and test results
- Fix type conversions and parameter typing throughout debug route
- Update auth controls with proper error state typing
- Resolve 'Cannot access xs before initialization' runtime error in production

This fixes the EKS deployment crash by eliminating TypeScript compilation issues that were causing JavaScript module loading problems.
2025-05-31 15:59:21 -04:00
Nirmal Arya
6a357e91a6 fix: resolve 'Cannot access xs before initialization' runtime error
- Separate auth controls into lazy-loaded component to prevent module loading issues
- Add comprehensive error handling and fallbacks throughout auth system
- Make profile store resilient to initialization errors with safe localStorage access
- Add try-catch blocks around critical functions to prevent runtime crashes
- Provide fallback navigation methods when auth hooks fail
- Fix EKS deployment crash caused by JavaScript bundling/hoisting issues

This fixes the Header-DpwHgB0l.js runtime error that was preventing the app from loading in production.
2025-05-31 15:47:45 -04:00
Nirmal Arya
1687d812bf feat: implement GitHub OIDC authentication
- Add GitHub OAuth 2.0 authentication flow
- Create authentication routes: /auth/login, /auth/callback, /auth/logout
- Implement OAuth server utilities with proper session management
- Add authentication hooks and client-side state management
- Update header with login/logout controls and user menu
- Create user profile page with GitHub integration
- Add environment variables for GitHub OAuth configuration
- Include comprehensive documentation for setup and usage
- Enhance profile store with authentication state
- Add authentication status API endpoint

Closes: GitHub authentication implementation
2025-05-31 15:40:32 -04:00
Nirmal Arya
9b46d0b892 fix: Add static models to resolve model lookup issue
- Added claude-3-7-sonnet and gpt-4o-mini as static models
- Fixes 500 'Model not found' error during inference
- Now properly returns 401 for invalid API key (expected behavior)
- Models now appear in /api/models response
- Inference pipeline working correctly

This resolves the core 500 error. Next step is configuring valid API key.
2025-05-31 14:25:15 -04:00
Nirmal Arya
d3ac437fb9 fix: Simplify BayerMGA provider to match OpenAI pattern
- Remove overly complex validateApiConfig method
- Follow exact same pattern as working OpenAI provider
- Simplify getModelInstance method to be more robust
- Fix 500 error in inference by removing strict validation
- Maintains dynamic model fetching functionality

This should resolve the inference execution issues while keeping model listing working.
2025-05-31 14:08:51 -04:00
Nirmal Arya
e5e24450c9 fix: Robust BayerMGA provider implementation with better error handling
Key improvements:
- Switch from getOpenAILikeModel to createOpenAI for better control
- Comprehensive error handling and validation
- Better base URL normalization and configuration
- Enhanced logging for debugging inference issues
- Proper header configuration for API requests
- Detailed error messages for troubleshooting

This should resolve the inference execution issues while maintaining model listing functionality.
2025-05-31 13:58:55 -04:00
Nirmal Arya
671fc51fa5 feat: Add comprehensive debugging tools for Bayer MGA integration
- Added debug guide with manual testing procedures
- Created debug API route for testing endpoints
- Includes models endpoint, chat completions, and AI SDK testing
- Provides detailed error logging and response analysis
- CORS support for browser testing
2025-05-31 13:53:09 -04:00
Nirmal Arya
2c9926fc9d fix: Add better error handling and logging to BayerMGA provider
- Added comprehensive logging for model fetching and instance creation
- Improved error handling with detailed error messages
- Added input validation for API responses
- Better debugging for inference endpoint issues
2025-05-31 13:50:44 -04:00
Nirmal Arya
14172c4de6 feat: Add Bayer MGA provider with dynamic model fetching
- Implemented BayerMGAProvider extending BaseProvider
- Configured base URL: https://chat.int.bayer.com/api/v2
- Added dynamic model fetching from /models endpoint with filters
- Integrated provider into UI (CloudProvidersTab, ServiceStatusTab)
- Added provider registration in LLM registry
- Supports user-configurable API token input
- Filters models by availability status
- Maps API response to ModelInfo format with proper token limits
2025-05-31 13:34:28 -04:00
KevIsDev
f79bf06e38 refactor: modify markdown append message content structure to use array 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
2025-05-30 14:45:05 +01:00
KevIsDev
0017d29154 fix: add model and provider info to quick action messages
Pass model and provider information through chat components to include in quick action messages. This fixes the issue of defaulting to anthropic model.
2025-05-28 12:32:00 +01:00
KevIsDev
12f9f4dcdc fix: remove unused isStreaming prop from quickActions
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.
2025-05-27 12:14:50 +01:00
KevIsDev
de0a41b5f1 feat: add streaming state to markdown quick actions
- 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
2025-05-26 17:57:10 +01:00
KevIsDev
2e7b626b00 feat: add discuss mode and quick actions
- 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.
2025-05-26 16:05:51 +01:00
KevIsDev
cfc2fc75d8 refactor(files): simplify file event processing logic
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
2025-05-20 00:57:52 +01:00
KevIsDev
0ec30e2358 Merge branch 'stackblitz-labs:main' into main 2025-05-19 17:35:04 +01:00
KevIsDev
62769b2fef fix: chat history snapshot logic to use the same ID as chat and update prompt instructions
- Remove redundant `_chatId` parameter in `takeSnapshot` function
- Update prompt instructions for shell commands and artifact handling
2025-05-14 11:54:51 +01:00
Dino Hensen
208ba2a54b feat: increase max token limit for Claude model claude-3-7-sonnet-20250219
- 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.
2025-05-13 07:20:38 +02:00
KevIsDev
ebd840263c fix: replace non existent icons with existing icons #release:major 2025-05-12 02:51:05 +01:00
KevIsDev
553fa5d138 fix: revert back to previous commit 2025-05-12 02:43:08 +01:00
KevIsDev
e9df523a79 fix: icon classes to existing icons #release:major
- Replace specific file type icons that are non existent with generic 'file-code' icon.
2025-05-12 01:50:28 +01:00
KevIsDev
5630be7f54 Revert "fix: fix icon classes for consistency and clarity #release:major"
This reverts commit 6e9a1b6874.
2025-05-12 01:44:51 +01:00
KevIsDev
6e9a1b6874 fix: fix icon classes for consistency and clarity #release:major
- Replace specific file type icons that are non existent with generic 'file-code' icon.
2025-05-12 01:37:03 +01:00
KevIsDev
4354ad45b9 git push origin mainRevert "fix: fix icon classes for consistency and clarity #release:major"
Some checks are pending
Docker Publish / docker-build-publish (push) Waiting to run
Update Stable Branch / prepare-release (push) Waiting to run
This reverts commit 870828d551.
2025-05-12 00:15:16 +01:00
KevIsDev
870828d551 fix: fix icon classes for consistency and clarity #release:major
- Replace specific file type icons that are non existent with generic 'file-code' icon.

- We now Include the electron builds with each release only
2025-05-12 00:02:28 +01:00
KevIsDev
b089a4b7f1 Merge pull request #1688 from xKevIsDev/main
Some checks failed
Docker Publish / docker-build-publish (push) Has been cancelled
Update Stable Branch / prepare-release (push) Has been cancelled
refactor: optimize error handling and npm install performance
2025-05-10 13:29:28 +01:00
KevIsDev
9a748177ef refactor: optimize error handling and npm install performance
Remove redundant error type handling in webcontainer to simplify logic and improve maintainability. Additionally, comment out lock file patterns to speed up npm install process.
2025-05-10 13:24:08 +01:00
Stijnus
870bfc58ee feat: github fix and ui improvements (#1685)
Some checks are pending
Docker Publish / docker-build-publish (push) Waiting to run
Update Stable Branch / prepare-release (push) Waiting to run
* feat: Add reusable UI components and fix GitHub repository display

* style: Fix linting issues in UI components

* fix: Add close icon to GitHub Connection Required dialog

* fix: Add CloseButton component to fix white background issue in dialog close icons

* Fix close button styling in dialog components to address ghost white issue in dark mode

* fix: update icon color to tertiary for consistency

The icon color was changed from `text-bolt-elements-icon-info` to `text-bolt-elements-icon-tertiary`

* fix: improve repository selection dialog tab styling for dark mode

- Update tab menu styling to prevent white background in dark mode
- Use explicit color values for better dark/light mode compatibility
- Improve hover and active states for better visual hierarchy
- Remove unused Tabs imports

---------

Co-authored-by: KevIsDev <zennerd404@gmail.com>
2025-05-09 15:23:20 +02:00
Stijnus
9a5076d8c6 feat: lock files (#1681)
Some checks failed
Docker Publish / docker-build-publish (push) Has been cancelled
Update Stable Branch / prepare-release (push) Has been cancelled
* Add persistent file locking feature with enhanced UI

* Fix file locking to be scoped by chat ID

* Add folder locking functionality

* Update CHANGES.md to include folder locking functionality

* Add early detection of locked files/folders in user prompts

* Improve locked files detection with smarter pattern matching and prevent AI from attempting to modify locked files

* Add detection for unlocked files to allow AI to continue with modifications in the same chat session

* Implement dialog-based Lock Manager with improved styling for dark/light modes

* Add remaining files for file locking implementation

* refactor(lock-manager): simplify lock management UI and remove scoped lock options

Consolidate lock management UI by removing scoped lock options and integrating LockManager directly into the EditorPanel. Simplify the lock management interface by removing the dialog and replacing it with a tab-based view. This improves maintainability and user experience by reducing complexity and streamlining the lock management process.

Change Lock & Unlock action to use toast instead of alert.

Remove LockManagerDialog as it is now tab based.

* Optimize file locking mechanism for better performance

- Add in-memory caching to reduce localStorage reads
- Implement debounced localStorage writes
- Use Map data structures for faster lookups
- Add batch operations for locking/unlocking multiple items
- Reduce polling frequency and add event-based updates
- Add performance monitoring and cross-tab synchronization

* refactor(file-locking): simplify file locking mechanism and remove scoped locks

This commit removes the scoped locking feature and simplifies the file locking mechanism. The `LockMode` type and related logic have been removed, and all locks are now treated as full locks. The `isLocked` property has been standardized across the codebase, replacing the previous `locked` and `lockMode` properties. Additionally, the `useLockedFilesChecker` hook and `LockAlert` component have been removed as they are no longer needed with the simplified locking system.

This gives the LLM a clear understanding of locked files and strict instructions not to make any changes to these files

* refactor: remove debug console.log statements

---------

Co-authored-by: KevIsDev <zennerd404@gmail.com>
2025-05-08 00:07:32 +02:00
Stijnus
15a84f2e24 Fix invalid line number error in search functionality 2025-05-03 23:54:21 +02:00
KevIsDev
b3e1048fa4 refactor(Search): improve search UX with loader timing and state management
Enhance the search experience by ensuring the loader is displayed for a minimum duration to avoid flickering. Additionally, introduce a `hasSearched` state to accurately display "No results found" only after a search has been performed.
2025-05-01 17:19:29 +01:00
KevIsDev
fcaf8f66f0 feat: enhance error handling and add new search feature
- Add support for `PREVIEW_CONSOLE_ERROR` in WebContainer error handling

- Introduce new Search component for text search functionality

- Extend `ScrollPosition` interface to include `line` and `column`
- Implement scroll-to-line functionality in CodeMirrorEditor
- Add tab-based navigation for files and search in EditorPanel

This commit introduces several enhancements to the editor, including improved error handling, better scrolling capabilities, and a new search feature. The changes are focused on improving the user experience and adding new functionality to the editor components.
2025-05-01 15:56:08 +01:00
KevIsDev
3b2e869651 chore: update @webcontainer/api to version 1.6.1-internal.1
update to latest version of webcontainer

fix: make diff button consistent with other toolbar buttons
2025-05-01 11:51:19 +01:00