[chat] ai_interaction.py at 1807 lines massively exceeds AGENTS.md ~400 line limit #722
Labels
No labels
area:chat
area:core
area:llm
area:routes
area:tools
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sleepy/odysseus#722
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
src/ai_interaction.pyis 1807 lines — 4.5× the AGENTS.md ~400 line limit.The file contains at least 8 distinct responsibilities:
set_session_manager,get_session_manager, etc.)_resolve_model)do_chat_with_model)do_ask_teacher)do_second_opinion)do_create_session,do_list_sessions,do_send_to_session,do_manage_session)do_manage_memory)do_generate_image)do_pipeline)AGENTS.md violations
Suggested fix
Split into domain-specific modules under
src/ai_interaction/orsrc/ai_tools/:model_resolver.py— model resolution logicchat_tools.py— do_chat_with_model, do_send_to_sessionsession_tools.py— create/list/manage sessionmemory_tools.py— manage_memorypipeline_tools.py— pipeline, second_opinionimage_tools.py— generate_image_globals.py— shared manager singletons