unsloth/studio
Roland Tannous 41e43b6c7b Studio: persist activeThreadId across reloads so RAG docs survive
When the user uploads a doc to a brand-new chat (a draft thread with
an assistant-ui __LOCALID_* id), the backend stores rag_documents
rows scoped to that id. On page reload assistant-ui mints a fresh
__LOCALID_* for the new mainThreadId, so useThreadDocuments asks the
backend for docs under the NEW id and gets nothing, even though the
original rows are still on disk under the OLD id.

  - chat-runtime-store: persist activeThreadId in localStorage via
    a new CHAT_ACTIVE_THREAD_KEY, restore on init, save on every
    setActiveThreadId call (including clears, which write '').
  - ActiveThreadSync: when aui's freshly-minted mainThreadId is a
    __LOCALID_* and we already have a persisted __LOCALID_* draft,
    keep ours instead of overwriting. This only affects RAG/doc
    lookup; aui's chat history for the new draft starts empty
    either way, so there's no regression for users who don't have
    attached docs.

User-initiated thread switches (new chat, switching to a saved
thread, deleting the current thread) all go through setActiveThreadId
with the new id (or null), so they correctly replace/clear the
persisted value.
2026-05-27 21:33:51 +04:00
..
backend Studio: fix RAG reranker deadlock on first load (Lock -> RLock) 2026-05-27 21:10:38 +04:00
frontend Studio: persist activeThreadId across reloads so RAG docs survive 2026-05-27 21:33:51 +04:00
src-tauri Fix Windows workflow issues(#5694) 2026-05-22 05:32:30 -07:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
install_llama_prebuilt.py ci: unblock Studio Windows + Linux + Mac smoke (#5741) 2026-05-23 06:59:16 -07:00
install_python_stack.py Studio: trim verbose comments/docstrings across RAG code 2026-05-26 13:51:11 +04:00
LICENSE.AGPL-3.0 Add AGPL-3.0 license to studio folder 2026-03-09 19:36:25 +00:00
package-lock.json ci: advisory lockfile supply-chain audit (no install-script changes) (#5604) 2026-05-19 05:56:56 -07:00
package.json ci: advisory lockfile supply-chain audit (no install-script changes) (#5604) 2026-05-19 05:56:56 -07:00
setup.bat Final cleanup 2026-03-12 18:28:04 +00:00
setup.ps1 studio: regenerate desktop launcher on unsloth studio update (macOS + Linux + Windows) (#5577) 2026-05-19 05:49:10 -07:00
setup.sh Route CPU-only Linux x86_64 to ggml-org/llama.cpp prebuilts (#5302) 2026-05-05 23:22:22 -07:00
Unsloth_Studio_Colab.ipynb studio: add --local to setup.sh + overlay unsloth-zoo from git main (#5252) 2026-05-02 08:51:56 +04:00