Skip to content

Commit 6dc842e

Browse files
author
Test User
committed
fix: wire up cf serve, discovery session resume, and PRD markdown rendering
- Connect `cf serve` to the v2 FastAPI server (was a stub printing "not implemented") - Fix DiscoveryPanel to check for existing sessions before starting, showing a resume/start-fresh prompt instead of a 400 error - Install @tailwindcss/typography so prose classes render markdown properly in the PRD preview tab
1 parent 30f44c6 commit 6dc842e

6 files changed

Lines changed: 179 additions & 92 deletions

File tree

codeframe/cli/app.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -565,14 +565,30 @@ def review(
565565
def serve(
566566
port: int = typer.Option(8080, "--port", "-p", help="Port to run server on"),
567567
host: str = typer.Option("0.0.0.0", "--host", help="Host to bind to"),
568+
reload: bool = typer.Option(False, "--reload", help="Enable auto-reload (development)"),
568569
) -> None:
569570
"""Start the optional FastAPI server (wraps core).
570571
571572
The server is NOT required for Golden Path commands.
572-
It provides an HTTP API that wraps the same core functions.
573+
It provides the v2 REST API that wraps the same core functions.
574+
575+
Examples:
576+
cf serve
577+
cf serve --port 3000
578+
cf serve --reload
573579
"""
574-
console.print("[yellow]Server adapter not yet implemented.[/yellow]")
575-
console.print("Golden Path commands work without a server.")
580+
import uvicorn
581+
582+
console.print(f"Starting CodeFRAME API server on {host}:{port}")
583+
console.print(f" Swagger UI: http://localhost:{port}/docs")
584+
console.print(f" ReDoc: http://localhost:{port}/redoc")
585+
console.print(" Press Ctrl+C to stop\n")
586+
uvicorn.run(
587+
"codeframe.ui.server:app",
588+
host=host,
589+
port=port,
590+
reload=reload,
591+
)
576592

577593

578594
# =============================================================================

web-ui/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
import "./.next/dev/types/routes.d.ts";
3+
import "./.next/types/routes.d.ts";
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

0 commit comments

Comments
 (0)