Commit graph

1273 commits

Author SHA1 Message Date
DESKTOP-RTLN3BA\$punk
476c764611 feat: fix Circleback connector and update related enums 2025-12-30 12:13:18 -08:00
DESKTOP-RTLN3BA\$punk
c19d300c9d feat: added circleback connector 2025-12-30 09:00:59 -08:00
Anish Sarkar
2898192ac4 feat: Update redirect URLs in connector routes to include success parameters and improve indexing configuration handling in the connector popup. 2025-12-30 19:49:28 +05:30
Rohan Verma
23870042f3
Merge pull request #640 from CREDO23/google-drive-connector
[Feat] Add Google drive connector
2025-12-29 20:51:34 -08:00
CREDO23
c3054809ee chore: update env example 2025-12-29 20:39:36 +02:00
CREDO23
7618662e70 refactor: rename GOOGLE_DRIVE_CONNECTOR to GOOGLE_DRIVE_FILE document type 2025-12-29 20:38:26 +02:00
CREDO23
16bc991b13 feat: add Google Drive connector to knowledge base search 2025-12-29 18:13:27 +02:00
DESKTOP-RTLN3BA\$punk
35904ba0c8 Merge branch 'dev' of https://github.com/MODSetter/SurfSense into dev 2025-12-28 15:54:10 -08:00
DESKTOP-RTLN3BA\$punk
46eb63fa11 hotpatch: remove consitent 2 sec interval api call to logs summary endpoint 2025-12-28 15:52:58 -08:00
Anish Sarkar
7a852f0ea5 feat: Enhance todo status normalization and update schema for improved task management 2025-12-29 01:08:18 +05:30
CREDO23
27beac4f62 fix: Google Drive folder handling and connector page updates 2025-12-28 19:57:10 +02:00
CREDO23
c5c61a2c6b Merge branch 'dev' into google-drive-connector
Merge in dev
2025-12-28 19:00:09 +02:00
CREDO23
acf47e3b0c refactor(connectors): remove verbose docstrings and obvious comments
- Simplify module docstrings (remove meta-commentary about 'small focused modules')
- Remove redundant inline comments (e.g., 'Log task start', 'Get connector from database')
- Trim verbose function docstrings to essential information only
- Remove over-explanatory comments that restate what code does
- Keep necessary documentation, remove noise for better readability
2025-12-28 18:53:13 +02:00
CREDO23
506a9297a9 fix(connectors): track delta sync tokens per folder for Google Drive
- Store tokens in folder_tokens dict instead of single global token
- Each folder now tracks its own sync state independently
- Fixes issue where indexing folder 2 incorrectly used delta sync after folder 1 was indexed
- First-time indexing now correctly uses full scan for each new folder
2025-12-28 18:32:59 +02:00
CREDO23
a5935bc677 feat(connectors): add connector parameter to file processor for source tracking
- Add optional 'connector' parameter with 'type' and 'metadata' fields
- Create helper function _update_document_from_connector
- Use document_metadata column (not metadata) for JSON field
- Merge metadata with existing using dict spread operator
- Google Drive documents now marked as GOOGLE_DRIVE_CONNECTOR
- Backward compatible - no changes to existing logic
- Simple and clean implementation
2025-12-28 18:01:39 +02:00
CREDO23
8da58be9e0 fix(connectors): refresh document from DB before updating type
- Query document from database to ensure it's attached to session
- Prevents detached instance errors after process_file_in_background commits
- Properly updates document_type and metadata with session management
2025-12-28 17:21:44 +02:00
CREDO23
b2b891e4d7 fix(connectors): properly commit Google Drive document type changes
- Return file metadata from content_extractor for indexer to use
- Update document type and metadata in indexer after processing
- Explicitly commit changes to database
- Ensures documents are properly marked as GOOGLE_DRIVE_CONNECTOR type
2025-12-28 17:15:29 +02:00
CREDO23
9f1fd20944 feat(connectors): mark Google Drive documents with GOOGLE_DRIVE_CONNECTOR type
- Change document_type from file type (PDF, DOCX) to GOOGLE_DRIVE_CONNECTOR
- Store original file type in metadata for reference
- Add Google Drive specific metadata (file_id, mime_type, source)
- Include export format info for Google Workspace files
- Enables proper source tracking and bulk management
2025-12-28 16:55:14 +02:00
CREDO23
c9815fd6fb feat(celery): update Google Drive task for multiple folders
- Accept comma-separated folder_ids and folder_names parameters
- Pass through to indexing function for batch processing
2025-12-28 16:49:47 +02:00
CREDO23
634eeb887e feat(routes): support multiple Google Drive folder indexing
- Accept comma-separated folder_ids and folder_names
- Loop through each folder and index sequentially
- Collect total indexed count and errors
- Update timestamp only on full success
2025-12-28 16:49:20 +02:00
CREDO23
1c83327fc7 feat(celery): add Google Drive indexing Celery task
- Create async task for Google Drive folder indexing
- Accept folder_id and folder_name parameters
- Call indexing wrapper to avoid circular imports
2025-12-28 15:56:11 +02:00
CREDO23
358abdf02f feat(routes): add Google Drive indexing support with folder selection
- Accept folder_id and folder_name as indexing parameters
- Hide date range for Google Drive connectors
- Create wrapper function to avoid circular imports
- Trigger Google Drive indexing Celery task
2025-12-28 15:55:57 +02:00
CREDO23
7b8900d51f feat(indexer): export Google Drive indexer function 2025-12-28 15:55:46 +02:00
CREDO23
501d08f2f4 feat(routes): register Google Drive OAuth router 2025-12-28 15:55:38 +02:00
CREDO23
1696c7056a feat(indexer): add Google Drive folder indexing with delta sync
- Full folder scan on first index
- Delta sync using change tracking for subsequent indexes
- Process files in parallel batches
- Handle file additions, modifications, and deletions
- Store change tracking token for efficient re-indexing
2025-12-28 15:55:25 +02:00
CREDO23
bf02005d82 feat(routes): add Google Drive OAuth and folder listing endpoints
- OAuth initialization and callback handling
- Folder and file browsing with parent_id support
- Validate credentials and handle token refresh
- Return folder contents with metadata for UI tree view
2025-12-28 15:55:13 +02:00
CREDO23
3e67d5f31e feat(connectors): add Google Drive delta sync with change tracking
- Get start page token for change tracking baseline
- Fetch incremental changes using Google Drive Changes API
- Categorize changes into added, modified, and removed files
- Enable efficient re-indexing of only changed content
2025-12-28 15:55:06 +02:00
CREDO23
84bde67979 feat(connectors): add Google Drive folder browsing and file listing
- List folder contents with full pagination support
- Query root folder or specific parent folder
- Return both folders and files with metadata (size, icons, links)
- Filter out shortcuts and trashed items
2025-12-28 15:54:58 +02:00
CREDO23
40304c6795 feat(connectors): add Google Drive content extraction using existing ETL
- Download files from Google Drive to temporary location
- Export Google Workspace files as PDF
- Delegate content extraction to existing process_file_in_background
- Reuse Surfsense's ETL services (Unstructured, LlamaCloud, Docling)
2025-12-28 15:54:50 +02:00
CREDO23
701c3409b3 feat(connectors): add Google Drive file type detection and mapping
- Detect Google Workspace files (Docs, Sheets, Slides)
- Map to PDF export format to preserve rich content (images, formatting)
- Identify files to skip (shortcuts, unsupported types)
2025-12-28 15:54:42 +02:00
CREDO23
74386affdc feat(connectors): add Google Drive API client wrapper
- Build and manage Google Drive service with credentials
- List files with query support and pagination
- Download binary files and export Google Workspace files as PDF
- Handle HTTP errors gracefully
2025-12-28 15:54:32 +02:00
CREDO23
2c8717b14b feat(connectors): add Google Drive credentials module for OAuth management
- Handle Google OAuth credential initialization and validation
- Automatic token refresh with database persistence
- Reuse existing tokens when valid
2025-12-28 15:54:26 +02:00
CREDO23
2897985127 feat(config): add GOOGLE_DRIVE_REDIRECT_URI environment variable 2025-12-28 15:53:51 +02:00
CREDO23
5dd8838638 feat(db): add idempotent Alembic migration for GOOGLE_DRIVE_CONNECTOR enums 2025-12-28 15:53:44 +02:00
CREDO23
f54079643f feat(db): add GOOGLE_DRIVE_CONNECTOR to DocumentType and SearchSourceConnectorType enums 2025-12-28 15:53:35 +02:00
DESKTOP-RTLN3BA\$punk
dbd9c837e6 fix: docker version mismatch 2025-12-27 15:13:52 -08:00
DESKTOP-RTLN3BA\$punk
9d0721de43 feat: Replace AsyncChromiumLoader with Playwright for web crawling and content extraction in link preview and web crawler connector modules. 2025-12-27 13:58:00 -08:00
Anish Sarkar
74f17f61ec feat: Enhance agent system prompt with write_todos examples, and apply minor code formatting across connector pages and hooks. 2025-12-28 01:41:27 +05:30
Anish Sarkar
0164659f7a refactor: comment out ls tool handling, update assistant UI colors and spacing. 2025-12-28 01:30:53 +05:30
Anish Sarkar
8b10b0cd24 feat: Display document reindexing status in the sidebar by adding document ID to logs 2025-12-28 01:07:42 +05:30
Anish Sarkar
ae4ee9ab70 Merge remote-tracking branch 'upstream/dev' into fix/chatpage-ux 2025-12-27 19:48:13 +05:30
Anish Sarkar
ad47d94b40 refactor: use ChainOfThoughtItem for thinking step display and update dependency lock file. 2025-12-27 16:40:53 +05:30
Anish Sarkar
70383931bb feat: Apply minor UI styling adjustments to sidebar and progress components. Fixed linting for both frontend and backend 2025-12-27 15:27:29 +05:30
Anish Sarkar
c28a90fc29 refactor: integrate TodoListMiddleware and update related components
- Removed the write_todos tool as it is now included by default through TodoListMiddleware in the deep agent.
- Updated the system prompt and documentation to reflect the integration of TodoListMiddleware, clarifying its capabilities for managing planning and todo lists.
- Enhanced the chat handling logic to extract todos directly from the deep agent's command output, ensuring seamless user experience.
- Refactored UI components to align with the new data structure and improve rendering of todo items, including updates to the Plan and TodoItem components.
- Cleaned up code for better maintainability and readability, following recent refactoring efforts.
2025-12-27 15:18:34 +05:30
CREDO23
3104a56c72 migrate connectors to jotai & tanstack 2025-12-26 16:20:36 +02:00
Anish Sarkar
8a3ab3dfac refactor: enhance write_todos tool and system prompt
- Updated the write_todos tool to include an optional description field for todo items, improving task detail management.
- Enhanced the system prompt with clearer guidelines on using the write_todos tool, including refined usage patterns and examples for various user scenarios.
- Improved UI components to support the new description feature, ensuring better visibility of task details during planning and execution.
- Streamlined the code for better readability and maintainability, aligning with recent refactoring efforts.
2025-12-26 19:24:32 +05:30
Anish Sarkar
ebc04f590e refactor: improve write_todos tool and UI components
- Refactored the write_todos tool to enhance argument and result schemas using Zod for better validation and type safety.
- Updated the WriteTodosToolUI to streamline the rendering logic and improve loading states, ensuring a smoother user experience.
- Enhanced the Plan and TodoItem components to better handle streaming states and display progress, providing clearer feedback during task management.
- Cleaned up code formatting and structure for improved readability and maintainability.
2025-12-26 17:49:56 +05:30
Anish Sarkar
2c86287264 refactor: update system prompt for write_todos tool usage
- Enhanced the system prompt with detailed criteria and examples for using the write_todos tool, including valid trigger words and usage patterns.
- Clarified restrictions on when to use the tool, emphasizing the need for multi-phase tasks and explicit user requests.
- Provided specific use cases for different user types to guide appropriate usage of the tool, ensuring better task management and user experience.
2025-12-26 17:27:30 +05:30
Anish Sarkar
eb70c055a4 refactor: introduce write_todos tool for enhanced task management
- Added a new write_todos tool to facilitate the creation and management of planning lists within the chat interface.
- Updated system prompt with detailed instructions on using the write_todos tool, including usage patterns and restrictions.
- Enhanced the chat message handling to support the new tool, ensuring proper integration and user experience.
- Implemented UI components for displaying and interacting with the planning lists, including progress tracking and status indicators.
2025-12-26 14:37:23 +05:30
Anish Sarkar
1dd740bb23 refactor: enhance chat functionality with new tools and attachment handling
- Updated system prompt to clarify usage of the display_image tool, emphasizing valid URL requirements and prohibiting user-uploaded image displays.
- Introduced write_todos tool for creating and updating planning lists, with detailed usage instructions and examples.
- Enhanced message handling to persist attachments and mentioned documents, ensuring they survive page reloads.
- Improved UI components to integrate the new write_todos tool and ensure consistent user experience across chat interactions.
2025-12-26 11:38:32 +05:30