SurfSense/surfsense_backend/app/agents/new_chat
CREDO23 4fa85a9a94 perf(kb-search): offload sync embed_texts to thread
embed_texts holds a threading.Lock and runs a sync embedding call inside
search_knowledge_base, an async coroutine on the KB priority middleware
critical path. Blocking the event loop here stalls every other coroutine
on the worker (SSE keepalives, concurrent chat requests, background
tasks). Wrap in asyncio.to_thread so the embed runs on the default
executor pool while the loop keeps serving.
2026-05-20 10:02:38 +02:00
..
middleware perf(kb-search): offload sync embed_texts to thread 2026-05-20 10:02:38 +02:00
plugins chore: cleaned comments slop 2026-04-28 23:52:37 -07:00
prompts Wire Linear and Slack specialists and prompt routing. 2026-04-29 20:51:06 +02:00
skills feat: updated agent harness 2026-04-28 09:22:19 -07:00
subagents Merge upstream/dev into feature/multi-agent 2026-05-05 01:44:46 +02:00
tools perf(mcp): add per-call, discovery, and oauth-refresh timing logs 2026-05-19 21:29:56 +02:00
__init__.py cloud: added openrouter integration with global configs 2026-04-15 23:46:29 -07:00
agent_cache.py feat: implement agent caches and fix invalid prompt cache configs 2026-05-03 06:03:40 -07:00
chat_deepagent.py feat(middleware): scope model fallback to provider/network errors only 2026-05-05 18:04:47 +02:00
checkpointer.py feat: implement connection pooling for AsyncPostgresSaver in checkpointer 2026-02-05 17:32:43 -08:00
context.py feat: improved document, folder mentions rendering 2026-05-09 22:15:51 -07:00
document_xml.py feat: updated file management for main agent 2026-04-28 04:32:52 -07:00
errors.py chore: cleaned comments slop 2026-04-28 23:52:37 -07:00
feature_flags.py refactor(chat): stream agent events via stream_output and remove parity v2 flag 2026-05-07 19:40:10 +02:00
filesystem_backends.py feat: updated file management for main agent 2026-04-28 04:32:52 -07:00
filesystem_selection.py feat(filesystem): refactor local filesystem handling to use mounts instead of root paths, enhancing mount management and path normalization 2026-04-24 05:59:21 +05:30
filesystem_state.py subagents/knowledge_base: wire KB specialist into orchestrator (renderer/projector split, FS middleware stack, cloud-mode gating) 2026-05-11 20:43:44 +02:00
llm_config.py feat: fixed vision/image provider specific errors and fixed podcast/video streaming 2026-05-02 19:18:53 -07:00
memory_extraction.py refactor(memory): streamline memory extraction by utilizing extract_text_content utility 2026-05-02 16:10:30 +05:30
mention_resolver.py feat: improved document, folder mentions rendering 2026-05-09 22:15:51 -07:00
path_resolver.py feat: updated file management for main agent 2026-04-28 04:32:52 -07:00
permissions.py chore: cleaned comments slop 2026-04-28 23:52:37 -07:00
plugin_loader.py chore: cleaned comments slop 2026-04-28 23:52:37 -07:00
prompt_caching.py feat: implement agent caches and fix invalid prompt cache configs 2026-05-03 06:03:40 -07:00
sandbox.py feat: added ai file sorting 2026-04-14 01:43:30 -07:00
state_reducers.py feat: improved agent streaming 2026-04-29 07:20:31 -07:00
system_prompt.py Wire Linear and Slack specialists and prompt routing. 2026-04-29 20:51:06 +02:00
utils.py inject tools at runtime 2025-12-20 18:35:39 +02:00