vibe.web_core.context_processors

Jinja Context Processors for Web UI.

Defines functions to inject web-specific variables or functions into the Jinja context automatically for rendering Flask templates. This is where functions relying on session or g (like defined, show) should be exposed.

version_url_for

version_url_for(endpoint: str, **kwargs: Any) -> str

Wrap url_for to omit the version kwarg when it equals WORKING_TREE.

This produces cleaner URLs for the common case (local filesystem templates) while preserving explicit version segments for Git-based templates.

register_web_context_processors

register_web_context_processors(app: Flask) -> None

Add web-specific functions to the app's Jinja environment.