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:
@@ -22,12 +22,12 @@ from langchain_core.messages import AIMessage, HumanMessage, SystemMessage, Tool
|
||||
from sqlalchemy import select
|
||||
|
||||
from app.agents.filesystem_agent import FILESYSTEM_TOOLS
|
||||
from app.agents.note_agent import NOTE_TOOLS
|
||||
from app.agents.project_agent import PROJECT_TOOLS
|
||||
from app.agents.task_agent import TASK_TOOLS
|
||||
from app.agents.timeline_agent import TIMELINE_TOOLS
|
||||
from app.llm import get_llm
|
||||
from app.ws_context import execute_on_client, set_current_user, clear_current_user
|
||||
from shared.agents.note_agent import NOTE_TOOLS
|
||||
from shared.agents.project_agent import PROJECT_TOOLS
|
||||
from shared.agents.task_agent import TASK_TOOLS
|
||||
from shared.agents.timeline_agent import TIMELINE_TOOLS
|
||||
from shared.llm import get_llm
|
||||
from shared.ws_context import execute_on_client, set_current_user, clear_current_user
|
||||
import app.tracing as tracing
|
||||
from shared.db import async_session
|
||||
from shared.models import AgentRunLog, CloudAgentConfig, LocalAgentConfig
|
||||
|
||||
Reference in New Issue
Block a user