refactor: deduplicate shared code into shared/ module

Move duplicated files from chat + batch-agent into shared/:
- shared/ws_context.py — Redis-based tool call round-trip
- shared/llm.py — LiteLLM factory (get_llm, embed)
- shared/agents/ — 4 domain agents (task, note, project, timeline)

Update all service imports to use shared.* instead of app.*.
Delete 12 duplicated files across both services.
This commit is contained in:
Roberto Musso
2026-03-23 23:01:45 +01:00
parent ccba54ac24
commit d856dfd28c
22 changed files with 48 additions and 743 deletions

View File

@@ -25,7 +25,7 @@ from typing import Any
from langchain_core.messages import AIMessage, HumanMessage, SystemMessage, ToolMessage
from app.agents.filesystem_agent import FILESYSTEM_TOOLS
from app.llm import get_llm
from shared.llm import get_llm
import app.tracing as tracing
logger = logging.getLogger(__name__)