unsloth/studio/frontend/src/features/chat
Roland Tannous 08cee7cc0a Studio: bounded parallel RAG indexing + folder upload
Uploading many docs (or a folder) previously spawned an ingestion
subprocess per file all at once, thrashing the GPU/CPU. Add a
configurable concurrency limit and a folder picker.

- ragIndexConcurrency setting (default 1) in the chat runtime store,
  persisted like the other RAG scalar settings; exposed as a 'Parallel
  indexing' slider (1-8) at the bottom of the sidebar Retrieval section.
- New rag-index-queue.ts semaphore: each document upload acquires a slot
  before it starts and releases it once its ingestion job finishes
  (complete / error / already-indexed), so bulk uploads drain at the
  configured rate. Wired into both composer upload paths
  (use-thread-doc-uploads + shared-composer).
- Folder upload: a second 'Attach a folder' button on the RAG attach
  control uses a webkitdirectory input; every compatible file is routed
  through the same queue. Multi-file select already worked (the input has
  'multiple' and loops addDoc).
- Content-hash dedup (shipped earlier) means re-scanning a folder skips
  already-indexed files.

Not build/UI verified here (no bun); needs bun typecheck + a browser
check of bulk/folder upload draining at the set concurrency.
2026-05-28 19:52:49 +04:00
..
api Studio: bounded parallel RAG indexing + folder upload 2026-05-28 19:52:49 +04:00
components Merge remote-tracking branch 'origin/main' into feature/rag 2026-05-28 00:38:58 +03:00
hooks Studio: bounded parallel RAG indexing + folder upload 2026-05-28 19:52:49 +04:00
lib studio/chat: built-in code execution for OpenAI + Anthropic (#5461) 2026-05-15 23:39:06 +04:00
presets Recipe Studio local model selector (#5769) 2026-05-26 02:37:24 -07:00
stores Studio: bounded parallel RAG indexing + folder upload 2026-05-28 19:52:49 +04:00
tour [Studio] Show non exported models in chat UI (#4892) 2026-04-14 15:03:58 +04:00
types Studio: add Gemini provider with web_search, code_execution, prompt caching, and Nano Banana image generation (#5720) 2026-05-27 06:01:24 -07:00
utils Studio: bounded parallel RAG indexing + folder upload 2026-05-28 19:52:49 +04:00
api-provider-logo.tsx Polish/cloud to providers (#5450) 2026-05-15 19:29:21 +04:00
chat-mcp-servers-dialog.tsx Studio: add remote MCP server support (#5750) 2026-05-27 07:01:11 -07:00
chat-page.tsx Studio: add Gemini provider with web_search, code_execution, prompt caching, and Nano Banana image generation (#5720) 2026-05-27 06:01:24 -07:00
chat-providers-dialog.tsx Studio: reconcile external providers across browsers after delete (#5698) 2026-05-22 06:42:39 -07:00
chat-settings-sheet.tsx Studio: bounded parallel RAG indexing + folder upload 2026-05-28 19:52:49 +04:00
db.ts Studio: persist chat history in backend storage (#5272) 2026-05-22 06:18:05 -07:00
external-providers.ts Studio: add Gemini provider with web_search, code_execution, prompt caching, and Nano Banana image generation (#5720) 2026-05-27 06:01:24 -07:00
index.ts Recipe Studio local model selector (#5769) 2026-05-26 02:37:24 -07:00
open-document.ts Add OpenDocument chat attachments (#5510) 2026-05-18 03:41:24 -07:00
provider-capabilities.ts Studio: add Gemini provider with web_search, code_execution, prompt caching, and Nano Banana image generation (#5720) 2026-05-27 06:01:24 -07:00
runtime-provider.tsx Studio: revert activeThreadId persistence (caused fresh-chat doc loss) 2026-05-27 22:31:05 +04:00
shared-composer.tsx Studio: bounded parallel RAG indexing + folder upload 2026-05-28 19:52:49 +04:00
thread-sidebar.tsx feat(studio): replace navbar with collapsible sidebar (#4936) 2026-04-16 08:46:16 -07:00
types.ts studio/chat: reuse Anthropic code_execution container across turns (#5519) 2026-05-17 17:49:38 +04:00