Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions code_puppy/api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ async def root():
<a href="/terminal" class="px-6 py-3 bg-blue-600 hover:bg-blue-700 rounded-lg text-lg font-semibold">
Open Terminal
</a>
<a href="/mobile" class="px-6 py-3 bg-green-700 hover:bg-green-600 rounded-lg text-lg font-semibold">
Mobile UI
</a>
<a href="/docs" class="px-6 py-3 bg-gray-700 hover:bg-gray-600 rounded-lg text-lg">
API Docs
</a>
Expand All @@ -162,6 +165,17 @@ async def terminal_page():
status_code=404,
)

@app.get("/mobile")
async def mobile_page():
"""Serve the mobile-optimised web UI (chat-style, touch-friendly)."""
html_file = templates_dir / "mobile.html"
if html_file.exists():
return FileResponse(html_file, media_type="text/html")
return HTMLResponse(
content="<h1>Mobile template not found</h1>",
status_code=404,
)

@app.get("/health")
async def health():
return {"status": "healthy"}
Expand Down
Loading