unsloth/studio/backend/core
Neodon c027ec192e
fix(studio): ensure first chat tool call starts in session sandbox (#4810)
Fixes #4809

On a new Studio chat, the first tool call could start before the frontend
initializes the thread ID. That meant the first request could go out without
a session_id, so the backend started the tool in the shared sandbox root
instead of the chat's session sandbox.

Frontend:
- Eagerly initialize the thread when switching to a new chat
- Resolve the thread ID once at request time and keep it stable through
  async model-load waits
- Disable ActiveThreadSync during new-chat initialization to prevent
  stale thread IDs from being written back
- Add error handling for thread initialization failures
- Clear activeThreadId on all compare-mode entry paths to prevent
  cross-session leakage
- Fix exitCompare to restore context usage from the saved view
- Coerce falsy thread IDs to undefined for consistent backend/frontend
  fallback behavior
- Use _default as the image sessionId fallback to match the backend

Backend:
- Use ~/studio_sandbox/_default when a request arrives without a session_id
2026-04-03 11:44:22 -07:00
..
data_recipe Allow non-LLM recipes to run and move Data tab first in executions (#4805) 2026-04-03 05:37:26 -07:00
export studio: add HF/local model selection UI for GGUF export (#4365) 2026-03-28 22:18:25 +04:00
inference fix(studio): ensure first chat tool call starts in session sandbox (#4810) 2026-04-03 11:44:22 -07:00
training fix(studio): don't set trust_remote_code for Gemma 4 training (#4795) 2026-04-02 11:44:26 -07:00
__init__.py Combine studio setup fixes: frontend caching, venv isolation, Windows CPU support (#4413) 2026-03-18 03:52:25 -07:00