Skip to content

zettelkasten.dashboard.backend.routes.agent

zettelkasten.dashboard.backend.routes.agent

In-process chat agent surface (zettelkasten MCP) for the dashboard.

Split out of the former flat routes.py; behaviour is unchanged.

ViewContext

Bases: BaseModel

What the user is currently looking at in the dashboard.

Sent with each chat turn so the agent can resolve deictic references ("here", "this", "these") to the selection or the notes in view.

Source code in zettelkasten/dashboard/backend/routes/agent.py
class ViewContext(BaseModel):
    """What the user is currently looking at in the dashboard.

    Sent with each chat turn so the agent can resolve deictic references
    ("here", "this", "these") to the selection or the notes in view.
    """

    view: str | None = None
    project: str | None = None
    selected: ViewContextEntry | None = None
    inView: list[ViewContextEntry] = []
    inViewTotal: int | None = None
    searchQuery: str | None = None