Conversation
- Added support for @-mentions in agent tasks, allowing users to reference documents, folders, and connectors directly in their queries. - Updated `run_agent_task` to resolve mentions and include them in the context passed to the agent. - Introduced new parameters in `AgentTaskActionParams` for handling mentioned document and connector IDs. - Refactored the automation edit and new components to utilize the new `AutomationBuilderForm` for a more streamlined user experience. - Removed deprecated JSON forms to simplify the automation creation process.
…and header components - Replaced the FileJson icon with SquarePen in both AutomationsEmptyState and AutomationsHeader components. - Updated button label from "Create via JSON" to "Create manually" for clarity in the automation creation process.
- Updated the `mentionParams` function to separate document and connector mentions, improving clarity and organization of the output. - Modified the `mentionsFromParams` function to correctly handle and categorize mentions from parameters, ensuring connectors are processed separately. - Adjusted documentation comments for better understanding of the changes in mention handling.
- Deleted the `search_surfsense_docs` tool and its associated files, streamlining the agent's toolset. - Updated various components and prompts to remove references to the now-removed tool, ensuring consistency across the codebase. - Adjusted documentation to direct users to the SurfSense documentation link for product-related queries instead.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
Motivation and Context
FIX #
Screenshots
API Changes
Change Type
Testing Performed
Checklist
High-level PR Summary
This PR removes the internal SurfSense product documentation feature and replaces the raw-JSON automation creation form with a user-friendly visual builder. The backend removes
search_surfsense_docstool, drops the associated database tables (migration 146), and updates all agent prompts to direct users to the public docs site instead. The frontend introduces a comprehensive automation builder with task management, @-mention support for files/folders/connectors, schedule configuration (both preset and cron), and runtime settings. The builder supports bidirectional conversion between form and JSON, with automatic fallback to JSON mode for complex definitions that can't be represented in the UI. Agent task steps now accept the same mention parameters as chat messages, allowing automations to scope retrieval to specific resources.⏱️ Estimated Review Time: 1-3 hours
💡 Review Order Suggestion
surfsense_backend/alembic/versions/146_drop_surfsense_docs_tables.pysurfsense_backend/app/tasks/surfsense_docs_indexer.pysurfsense_backend/app/db.pysurfsense_backend/app/routes/surfsense_docs_routes.pysurfsense_backend/app/utils/surfsense_docs.pysurfsense_backend/scripts/seed_surfsense_docs.pysurfsense_backend/app/schemas/surfsense_docs.pysurfsense_backend/app/app.pysurfsense_backend/app/agents/new_chat/tools/search_surfsense_docs.pysurfsense_backend/app/agents/multi_agent_chat/subagents/builtins/research/tools/search_surfsense_docs.pysurfsense_backend/app/agents/new_chat/prompts/tools/search_surfsense_docs.mdsurfsense_backend/app/agents/new_chat/prompts/examples/search_surfsense_docs.mdsurfsense_backend/app/agents/new_chat/mention_resolver.pysurfsense_backend/app/agents/new_chat/tools/__init__.pysurfsense_backend/app/agents/new_chat/tools/registry.pysurfsense_backend/app/agents/new_chat/prompts/composer.pysurfsense_backend/app/agents/new_chat/prompts/base/kb_only_policy_private.mdsurfsense_backend/app/agents/new_chat/prompts/base/kb_only_policy_team.mdsurfsense_backend/app/agents/new_chat/prompts/base/tool_routing_private.mdsurfsense_backend/app/agents/new_chat/prompts/base/tool_routing_team.mdsurfsense_backend/app/agents/new_chat/prompts/base/citations_on.mdsurfsense_backend/app/agents/multi_agent_chat/main_agent/system_prompt/prompts/citations/on.mdsurfsense_backend/app/agents/multi_agent_chat/main_agent/system_prompt/prompts/dynamic_context/private.mdsurfsense_backend/app/agents/multi_agent_chat/main_agent/system_prompt/prompts/dynamic_context/team.mdsurfsense_backend/app/agents/multi_agent_chat/main_agent/system_prompt/prompts/kb_first.mdsurfsense_backend/app/agents/multi_agent_chat/main_agent/system_prompt/prompts/routing.mdsurfsense_backend/app/agents/multi_agent_chat/main_agent/system_prompt/prompts/providers/anthropic.mdsurfsense_backend/app/agents/multi_agent_chat/main_agent/system_prompt/prompts/providers/deepseek.mdsurfsense_backend/app/agents/multi_agent_chat/main_agent/system_prompt/prompts/providers/google.mdsurfsense_backend/app/agents/multi_agent_chat/main_agent/system_prompt/prompts/providers/openai_classic.mdsurfsense_backend/app/tasks/chat/streaming/context/mentioned_docs.pysurfsense_backend/app/tasks/chat/stream_new_chat.pysurfsense_backend/app/schemas/new_chat.pysurfsense_backend/app/routes/new_chat_routes.pysurfsense_web/lib/apis/documents-api.service.tssurfsense_web/contracts/types/document.types.tssurfsense_web/contracts/enums/connectorIcons.tsxsurfsense_web/contracts/enums/toolIcons.tsxsurfsense_web/components/assistant-ui/inline-citation.tsxsurfsense_web/atoms/chat/mentioned-documents.atom.tssurfsense_web/components/new-chat/document-mention-picker.tsxsurfsense_web/lib/chat/mention-doc-key.tssurfsense_web/lib/documents/document-type-labels.tssurfsense_web/app/dashboard/[search_space_id]/new-chat/[[...chat_id]]/page.tsxsurfsense_web/lib/automations/builder-schema.tssurfsense_web/lib/automations/schedule-builder.tssurfsense_web/lib/automations/describe-cron.tssurfsense_web/app/dashboard/[search_space_id]/automations/components/builder/automation-builder-form.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/components/builder/task-list.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/components/builder/task-item.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/components/builder/mention-task-input.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/components/builder/schedule-section.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/components/builder/timezone-combobox.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/components/builder/basics-section.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/components/builder/advanced-section.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/components/builder/builder-summary.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/components/builder/form-field.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/components/builder/json-mode-panel.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/components/builder/unattended-toggle.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/new/automation-new-content.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/new/components/automation-new-header.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/[automation_id]/edit/automation-edit-content.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/[automation_id]/edit/components/automation-edit-header.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/components/automations-header.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/components/automations-empty-state.tsxsurfsense_backend/app/automations/actions/agent_task/params.pysurfsense_backend/app/automations/actions/agent_task/invoke.pysurfsense_backend/app/automations/actions/agent_task/factory.py