mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-06 20:15:17 +02:00
refactor(agents): move connector_searchable_types, agent_cache, system_prompt + prompts to app/agents/shared (slice 7b)
Three live shared leaves discovered while taking stock after slice 7 (all are consumed by the multi-agent stack and/or live routes, not single-agent-only): - connector_searchable_types -> shared + shim (multi-agent factory uses it) - agent_cache -> shared + shim (multi-agent runtime/agent_cache uses it) - system_prompt + prompts/ (42 .md fragments) -> shared together + shim. Repointed composer's _PROMPTS_PACKAGE to app.agents.shared.prompts so importlib.resources fragment loading keeps working; system_prompt's relative ".prompts.composer" import is preserved by moving both as a unit. Each keeps a re-export shim for the frozen chat_deepagent. After this slice, new_chat/ holds only the frozen single-agent stack (chat_deepagent, subagents/, __init__) plus shims.
This commit is contained in:
parent
13a96851ef
commit
a019f18d1c
60 changed files with 627 additions and 564 deletions
|
|
@ -6,7 +6,7 @@ from datetime import UTC, datetime
|
|||
|
||||
import pytest
|
||||
|
||||
from app.agents.new_chat.prompts.composer import (
|
||||
from app.agents.shared.prompts.composer import (
|
||||
ALL_TOOL_NAMES_ORDERED,
|
||||
compose_system_prompt,
|
||||
detect_provider_variant,
|
||||
|
|
@ -64,7 +64,7 @@ class TestProviderVariantDetection:
|
|||
``gpt-5`` reasoning regex first. Codex is the more specialised
|
||||
prompt and mirrors OpenCode's dispatch order.
|
||||
"""
|
||||
from app.agents.new_chat.prompts.composer import detect_provider_variant
|
||||
from app.agents.shared.prompts.composer import detect_provider_variant
|
||||
|
||||
assert detect_provider_variant("openai:gpt-5-codex") == "openai_codex"
|
||||
assert detect_provider_variant("openai:gpt-5") == "openai_reasoning"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ from dataclasses import dataclass
|
|||
|
||||
import pytest
|
||||
|
||||
from app.agents.new_chat.agent_cache import (
|
||||
from app.agents.shared.agent_cache import (
|
||||
flags_signature,
|
||||
reload_for_tests,
|
||||
stable_hash,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue