MCPcopy Create free account
hub / github.com/FSoft-AI4Code/CodeWiki / view_docs

Method view_docs

codewiki/src/fe/routes.py:163–177  ·  view source on GitHub ↗

View generated documentation.

(self, job_id: str)

Source from the content-addressed store, hash-verified

161 return JobStatusResponse(**asdict(job))
162
163 async def view_docs(self, job_id: str) -> RedirectResponse:
164 """View generated documentation."""
165 job = self.background_worker.get_job_status(job_id)
166 if not job:
167 raise HTTPException(status_code=404, detail="Job not found")
168
169 if job.status != 'completed' or not job.docs_path:
170 raise HTTPException(status_code=404, detail="Documentation not available")
171
172 docs_path = Path(job.docs_path)
173 if not docs_path.exists():
174 raise HTTPException(status_code=404, detail="Documentation files not found")
175
176 # Redirect to the documentation viewer
177 return RedirectResponse(url=f"/static-docs/{job_id}/", status_code=status.HTTP_302_FOUND)
178
179 async def serve_generated_docs(self, job_id: str, filename: str = "overview.md") -> HTMLResponse:
180 """Serve generated documentation files."""

Callers 1

view_docsFunction · 0.80

Calls 1

get_job_statusMethod · 0.45

Tested by

no test coverage detected