unsloth/studio/backend/core/rag
Etherll 27b0a50a84 Studio: WIP — RAG preview UI, locator/auth refactor, tests, fixtures (pre-merge snapshot)
Snapshot taken before fast-forwarding feature/rag to origin and merging main.
Bundles in-flight work so the merge has a clean tree:

Frontend
- PDF preview panel (preview-panel, preview-pdf-view, preview-text-view,
  preview-unavailable) with lazy-rendered page thumbnail rail
- Resizable preview slot via useResizablePanelWidth hook (drag handle,
  localStorage persistence, viewport clamping)
- Neutral scrollbar + Source Excerpt card restyle (no brand-coloured rail)
- Preview-store + chat-adapter / rag-api / kb-detail wiring
- Frontend test harness (vitest.config, setupTests, biome update) and the
  paired __tests__ suites for preview, sources, document-row, chat-adapter,
  rag-api, knowledge-bases-tab, search-knowledge-base-tool-ui

Backend
- RAG locator + authorization modules with chunking / retrieval / tool /
  vector_store / studio_db updates
- Paired test_rag_* suites (authorization, locators, locator_backfill,
  locator_migration, preview_routes, preview_target_locators, source_identity)

Other
- tests/fixtures/rag-preview for preview route fixtures (sample.pdf,
  sample.txt, make_fixture_pdf.py)
- .gitignore + package(-lock).json adjustments for the new test runner

Will be squashed/reworked via interactive rebase after main is merged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 00:13:43 +03:00
..
parsers Studio: splice VLM figure captions next to their 'Figure N:' line 2026-05-27 17:02:36 +04:00
__init__.py Studio: add RAG with hybrid search, reranker, chat integration 2026-05-23 18:46:15 +04:00
authorization.py Studio: WIP — RAG preview UI, locator/auth refactor, tests, fixtures (pre-merge snapshot) 2026-05-28 00:13:43 +03:00
bm25.py Studio: trim verbose comments/docstrings across RAG code 2026-05-26 13:51:11 +04:00
captioner.py Studio: render figure regions (vector + raster) for RAG captioning 2026-05-27 16:36:54 +04:00
chunking.py Studio: WIP — RAG preview UI, locator/auth refactor, tests, fixtures (pre-merge snapshot) 2026-05-28 00:13:43 +03:00
db.py Studio: trim verbose comments/docstrings across RAG code 2026-05-26 13:51:11 +04:00
embeddings.py Studio: pass BytesIO (not PIL Image) to BGE-VL encode so model.data_process can re-open 2026-05-27 05:44:40 +04:00
ingestion.py Studio: WIP — RAG preview UI, locator/auth refactor, tests, fixtures (pre-merge snapshot) 2026-05-28 00:13:43 +03:00
locators.py Studio: WIP — RAG preview UI, locator/auth refactor, tests, fixtures (pre-merge snapshot) 2026-05-28 00:13:43 +03:00
reranker.py Studio: fix RAG reranker deadlock on first load (Lock -> RLock) 2026-05-27 21:10:38 +04:00
retrieval.py Studio: WIP — RAG preview UI, locator/auth refactor, tests, fixtures (pre-merge snapshot) 2026-05-28 00:13:43 +03:00
scope.py Studio: text-mode default with VLM-captioned figure splicing; helper VLM fallback 2026-05-27 11:16:56 +04:00
tool.py Studio: WIP — RAG preview UI, locator/auth refactor, tests, fixtures (pre-merge snapshot) 2026-05-28 00:13:43 +03:00
vector_store.py Studio: WIP — RAG preview UI, locator/auth refactor, tests, fixtures (pre-merge snapshot) 2026-05-28 00:13:43 +03:00