coleam00 / bolt.new-any-llm

Prompt, run, edit, and deploy full-stack web applications using any LLM you want!
https://bolt.new
MIT License
3.85k stars 1.58k forks source link

Sessions in Multiple Tabs cause errors #360

Open sidbetatester opened 20 hours ago

sidbetatester commented 20 hours ago

Describe the bug

I tried to work on multiple tabs simultaneously, while the chat contexts are stored with separate chat ids, i found the following issues:

  1. The LLM context is not explicitly isolated per tab
  2. File modification tracking might overlap
  3. Terminal outputs could mix in the context
  4. Here's how terminal commands are handled across multiple tabs: Each tab operates in the same terminal environment - they share the same system terminal session. This means:
    • Commands from different tabs are executed in the same terminal context
    • They share the same working directory
    • They can potentially interfere with each other Important implications:
    • If two LLMs try to run commands simultaneously from different tabs:
    • The commands will be queued and executed sequentially
    • There's no isolation between commands from different tabs
    • Output from one command might mix with another
    • Long-running commands in one tab could block commands from other tabs

Link to the Bolt URL that caused the error

https://github.com/coleam00/bolt.new-any-llm

Steps to reproduce

  1. Open Multiple tabs and start working with either same llm or different llms. you will notice issues with incorrect file diff being shared with the llms and also terminal commands do not complete or conflict between tabs.

Expected behavior

This is likely a missing feature, the app in its current implementation is not fully capable of handling isolated or shared sessions in multiple tabs.

Screen Recording / Screenshot

No response

Platform

Additional context

No response

sidbetatester commented 20 hours ago

Multi-Tab Support Enhancement Requirements

Current State

Key Issues Identified

1. Terminal Command Execution

2. LLM Message Context

Required Changes

1. Terminal Isolation

2. Message Context Isolation

3. Resource Management

Technical Implementation Needs

  1. New session management architecture
  2. Tab-specific state stores
  3. Process isolation system
  4. Resource cleanup mechanisms

Benefits After Implementation

  1. True tab independence
  2. No command interference
  3. Clean context separation
  4. Better resource management
  5. Improved stability

Considerations