MCPcopy Create free account
hub / github.com/AutoForgeAI/autoforge / get_project_conversation

Function get_project_conversation

server/routers/assistant_chat.py:94–114  ·  view source on GitHub ↗

Get a specific conversation with all messages.

(project_name: str, conversation_id: int)

Source from the content-addressed store, hash-verified

92
93@router.get("/conversations/{project_name}/{conversation_id}", response_model=ConversationDetail)
94async def get_project_conversation(project_name: str, conversation_id: int):
95 """Get a specific conversation with all messages."""
96 if not validate_project_name(project_name):
97 raise HTTPException(status_code=400, detail="Invalid project name")
98
99 project_dir = _get_project_path(project_name)
100 if not project_dir or not project_dir.exists():
101 raise HTTPException(status_code=404, detail="Project not found")
102
103 conversation = get_conversation(project_dir, conversation_id)
104 if not conversation:
105 raise HTTPException(status_code=404, detail="Conversation not found")
106
107 return ConversationDetail(
108 id=conversation["id"],
109 project_name=conversation["project_name"],
110 title=conversation["title"],
111 created_at=conversation["created_at"],
112 updated_at=conversation["updated_at"],
113 messages=[ConversationMessageModel(**m) for m in conversation["messages"]],
114 )
115
116
117@router.post("/conversations/{project_name}", response_model=ConversationSummary)

Callers

nothing calls this directly

Calls 4

get_conversationFunction · 0.85
ConversationDetailClass · 0.85
validate_project_nameFunction · 0.70

Tested by

no test coverage detected