pages.shell_context

Page actions AI-ready formats and sharing
Open LLM text
Share with AI
Ask Claude Ask ChatGPT Ask Gemini Ask Copilot

Shell context assembly from RouteMeta and section.

Builds page_title, breadcrumb_items, tab_items, current_path for layout templates. Only includes keys where source is non-None.

Shell context assembly from RouteMeta and section.

Builds page_title, breadcrumb_items, tab_items, current_path for layout templates. Only includes keys where source is non-None.

pages.shell_context

Name Type Default Description
type
qualified_name
element_type
description
source_file
line_number
is_autodoc
autodoc_element
_autodoc_template
_autodoc_url_path
_autodoc_page_type
title
doc_content_hash

Symbols on this page

resolve_meta
function async
async def resolve_meta(meta: RouteMeta | None, meta_provider: Any, path_params: dict[str, str], service_providers: dict[type, Any]) -> RouteMeta | None

Resolve RouteMeta from static meta or meta_provider callable.

Supports both sync and async meta() providers. Uses same arg resolution as _call_provider: path params, empty accumulated context, and service providers.

Parameters

Name Type Default Description
meta RouteMeta | None
meta_provider Any
path_params dict[str, str]
service_providers dict[type, Any]
_call_meta_provider
function
def _call_meta_provider(func: Any, path_params: dict[str, str], accumulated_ctx: dict[str, Any], service_providers: dict[type, Any]) -> Any

Call meta provider with path params, context, and services.

Parameters

Name Type Default Description
func Any
path_params dict[str, str]
accumulated_ctx dict[str, Any]
service_providers dict[type, Any]
build_shell_context
function
def build_shell_context(request: Request, meta: RouteMeta | None, section_ctx: dict[str, Any], cascade_ctx: dict[str, Any]) -> dict[str, Any]

Build shell context from request, meta, and section.

Produces:

  • current_path from request.path
  • page_title from meta.title
  • breadcrumb_items from section prefix + meta.breadcrumb_label
  • tab_items from section tab items

Only includes keys where source is non-None.

Parameters

Name Type Default Description
request Request
meta RouteMeta | None
section_ctx dict[str, Any]
cascade_ctx dict[str, Any]

View source · /home/runner/work/chirp/chirp/site/../src/chirp/pages/shell_context.py:1