mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-16 23:01:06 +02:00
refactor: streamline auth context usage across chat and automation routes
This commit is contained in:
parent
8af4a3f9d5
commit
6fd3f8570e
7 changed files with 53 additions and 28 deletions
|
|
@ -13,6 +13,7 @@ from app.agents.chat.multi_agent_chat.shared.filesystem_selection import (
|
|||
FilesystemSelection,
|
||||
)
|
||||
from app.agents.chat.runtime.llm_config import AgentConfig
|
||||
from app.auth.context import AuthContext
|
||||
from app.db import ChatVisibility
|
||||
from app.services.connector_service import ConnectorService
|
||||
|
||||
|
|
@ -33,6 +34,7 @@ async def build_main_agent_for_thread(
|
|||
filesystem_selection: FilesystemSelection | None,
|
||||
disabled_tools: list[str] | None = None,
|
||||
mentioned_document_ids: list[int] | None = None,
|
||||
auth_context: AuthContext | None = None,
|
||||
) -> Any:
|
||||
return await agent_factory(
|
||||
llm=llm,
|
||||
|
|
@ -48,4 +50,5 @@ async def build_main_agent_for_thread(
|
|||
filesystem_selection=filesystem_selection,
|
||||
disabled_tools=disabled_tools,
|
||||
mentioned_document_ids=mentioned_document_ids,
|
||||
auth_context=auth_context,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue