feat: add Azure Document Intelligence as accelerator for LlamaCloud & some UX fixes#1164
Conversation
…solidating document-related functionality
…elerator instead of a standalone ETL service
…ing and managing watched folders
…r and update button text in FolderWatchDialog
|
@AnishSarkar22 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Review by RecurseML
🔍 Review performed on 5260570..3832bdb
✨ No bugs found, your code is sparkling clean
✅ Files analyzed, no issues (24)
• docker/.env.example
• surfsense_backend/.env.example
• surfsense_backend/app/config/__init__.py
• surfsense_backend/app/etl_pipeline/etl_pipeline_service.py
• surfsense_backend/app/etl_pipeline/parsers/azure_doc_intelligence.py
• surfsense_backend/app/indexing_pipeline/indexing_pipeline_service.py
• surfsense_backend/app/utils/file_extensions.py
• surfsense_backend/pyproject.toml
• surfsense_backend/tests/unit/etl_pipeline/test_etl_pipeline_service.py
• surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsTableShell.tsx
• surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/PaginationControls.tsx
• surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/RowActions.tsx
• surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/types.ts
• surfsense_web/components/assistant-ui/connector-popup/tabs/active-connectors-tab.tsx
• surfsense_web/components/documents/DocumentNode.tsx
• surfsense_web/components/documents/FolderNode.tsx
• surfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsx
• surfsense_web/components/layout/ui/sidebar/InboxSidebar.tsx
• surfsense_web/components/sources/DocumentUploadTab.tsx
• surfsense_web/components/sources/FolderWatchDialog.tsx
• surfsense_web/components/ui/tooltip.tsx
• surfsense_web/lib/env-config.ts
• surfsense_web/lib/supported-extensions.ts
• surfsense_web/public/connectors/linear.svg
⏭️ Files skipped (3)
| Locations |
|---|
surfsense_backend/uv.lock |
surfsense_web/components/documents/DocumentTypeIcon.tsx |
surfsense_web/components/documents/DocumentsFilters.tsx |
…ection and updating state management in DocumentsSidebar and FolderWatchDialog
…ToolsBanner and enhance document type icon visibility in DocumentNode
There was a problem hiding this comment.
Review by RecurseML
🔍 Review performed on 3832bdb..8455451
✨ No bugs found, your code is sparkling clean
✅ Files analyzed, no issues (50)
• .github/workflows/desktop-release.yml
• package.json
• surfsense_backend/alembic/versions/120_add_vision_llm_configs_table.py
• surfsense_backend/app/agents/autocomplete/__init__.py
• surfsense_backend/app/agents/autocomplete/autocomplete_agent.py
• surfsense_backend/app/app.py
• surfsense_backend/app/celery_app.py
• surfsense_backend/app/config/__init__.py
• surfsense_backend/app/config/global_llm_config.example.yaml
• surfsense_backend/app/config/vision_model_list_fallback.json
• surfsense_backend/app/db.py
• surfsense_backend/app/etl_pipeline/etl_pipeline_service.py
• surfsense_backend/app/routes/__init__.py
• surfsense_backend/app/routes/search_spaces_routes.py
• surfsense_backend/app/routes/vision_llm_routes.py
• surfsense_backend/app/schemas/__init__.py
• surfsense_backend/app/schemas/new_llm_config.py
• surfsense_backend/app/schemas/vision_llm.py
• surfsense_backend/app/services/llm_service.py
• surfsense_backend/app/services/vision_autocomplete_service.py
• surfsense_backend/app/services/vision_llm_router_service.py
• surfsense_backend/app/services/vision_model_list_service.py
• surfsense_backend/pyproject.toml
• surfsense_backend/tests/unit/etl_pipeline/test_etl_pipeline_service.py
• surfsense_backend/tests/unit/utils/test_file_extensions.py
• surfsense_backend/uv.lock
• surfsense_desktop/.env
• surfsense_desktop/electron-builder.yml
• surfsense_desktop/package.json
• surfsense_desktop/pnpm-lock.yaml
• surfsense_desktop/scripts/build-electron.mjs
• surfsense_desktop/src/ipc/channels.ts
• surfsense_desktop/src/ipc/handlers.ts
• surfsense_desktop/src/main.ts
• surfsense_desktop/src/modules/active-search-space.ts
• surfsense_desktop/src/modules/analytics.ts
• surfsense_desktop/src/modules/autocomplete/index.ts
• surfsense_desktop/src/modules/platform.ts
• surfsense_desktop/src/modules/quick-ask.ts
• surfsense_desktop/src/modules/shortcuts.ts
• surfsense_desktop/src/modules/tray.ts
• surfsense_desktop/src/modules/window.ts
• surfsense_desktop/src/preload.ts
• surfsense_web/.env.example
• surfsense_web/app/dashboard/[search_space_id]/client-layout.tsx
• surfsense_web/app/dashboard/[search_space_id]/user-settings/components/DesktopContent.tsx
• surfsense_web/app/dashboard/layout.tsx
• surfsense_web/app/desktop/login/page.tsx
• surfsense_web/app/desktop/permissions/page.tsx
• surfsense_web/app/desktop/suggestion/page.tsx
⏭️ Files skipped (42)
| Locations |
|---|
surfsense_web/app/desktop/suggestion/suggestion.css |
surfsense_web/app/layout.tsx |
surfsense_web/atoms/vision-llm-config/vision-llm-config-mutation.atoms.ts |
surfsense_web/atoms/vision-llm-config/vision-llm-config-query.atoms.ts |
surfsense_web/components/TokenHandler.tsx |
surfsense_web/components/UserDropdown.tsx |
surfsense_web/components/assistant-ui/assistant-message.tsx |
surfsense_web/components/assistant-ui/connector-popup/tabs/all-connectors-tab.tsx |
surfsense_web/components/assistant-ui/inline-mention-editor.tsx |
surfsense_web/components/assistant-ui/thread.tsx |
surfsense_web/components/desktop/shortcut-recorder.tsx |
surfsense_web/components/documents/DocumentNode.tsx |
surfsense_web/components/documents/FolderNode.tsx |
surfsense_web/components/homepage/hero-section.tsx |
surfsense_web/components/layout/providers/LayoutDataProvider.tsx |
surfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsx |
surfsense_web/components/layout/ui/sidebar/InboxSidebar.tsx |
surfsense_web/components/new-chat/chat-header.tsx |
surfsense_web/components/new-chat/model-selector.tsx |
surfsense_web/components/platform-gate.tsx |
surfsense_web/components/settings/llm-role-manager.tsx |
surfsense_web/components/settings/search-space-settings-dialog.tsx |
surfsense_web/components/settings/user-settings-dialog.tsx |
surfsense_web/components/settings/vision-model-manager.tsx |
surfsense_web/components/shared/vision-config-dialog.tsx |
surfsense_web/components/sources/DocumentUploadTab.tsx |
surfsense_web/components/sources/FolderWatchDialog.tsx |
surfsense_web/contexts/platform-context.tsx |
surfsense_web/contracts/enums/vision-providers.ts |
surfsense_web/contracts/types/new-llm-config.types.ts |
surfsense_web/hooks/use-folder-sync.ts |
surfsense_web/hooks/use-platform.ts |
surfsense_web/lib/apis/vision-llm-config-api.service.ts |
surfsense_web/lib/auth-utils.ts |
surfsense_web/lib/query-client/cache-keys.ts |
surfsense_web/lib/supported-extensions.ts |
surfsense_web/messages/en.json |
surfsense_web/messages/es.json |
surfsense_web/messages/hi.json |
surfsense_web/messages/pt.json |
surfsense_web/messages/zh.json |
surfsense_web/types/window.d.ts |
Description
azure-ai-documentintelligenceas dependency.DocumentsTableShell.tsxand its related code.linear.svg.Motivation and Context
FIX #
Screenshots
API Changes
Change Type
Testing Performed
Checklist
High-level PR Summary
This PR integrates Azure Document Intelligence as an optional accelerator for the LlamaCloud ETL parser to provide faster and cheaper document processing for supported file types. When configured, Azure DI handles formats like PDF, DOCX, XLSX, PPTX, and image files, with automatic fallback to LlamaCloud on failures. The PR also improves UX by moving the folder watch feature into a dedicated dialog in the documents sidebar, refactoring file extension handling into a centralized module, adding re-scan loading indicators, improving duplicate document error messages, and fixing tooltip text wrapping.
⏱️ Estimated Review Time: 30-90 minutes
💡 Review Order Suggestion
docker/.env.examplesurfsense_backend/.env.examplesurfsense_backend/app/config/__init__.pysurfsense_backend/pyproject.tomlsurfsense_backend/app/utils/file_extensions.pysurfsense_backend/app/etl_pipeline/parsers/azure_doc_intelligence.pysurfsense_backend/app/etl_pipeline/etl_pipeline_service.pysurfsense_backend/tests/unit/etl_pipeline/test_etl_pipeline_service.pysurfsense_backend/app/indexing_pipeline/indexing_pipeline_service.pysurfsense_web/lib/supported-extensions.tssurfsense_web/components/sources/FolderWatchDialog.tsxsurfsense_web/components/sources/DocumentUploadTab.tsxsurfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsxsurfsense_web/components/documents/FolderNode.tsxsurfsense_web/components/documents/DocumentNode.tsxsurfsense_web/components/ui/tooltip.tsxsurfsense_web/lib/env-config.tssurfsense_web/public/connectors/linear.svgsurfsense_web/public/connectors/linear.svg