hkuds--deeptutor
e4dcfc49aa
Tests / Import Check (Python 3.13) (push) Has been cancelled
Tests / Import Check (Python 3.14) (push) Has been cancelled
Tests / Python Tests (Python 3.11) (push) Has been cancelled
Tests / Python Tests (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.14) (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
Tests / Lint and Format (push) Has been cancelled
Tests / Web Node Tests (push) Has been cancelled
Tests / Import Check (Python 3.11) (push) Has been cancelled
Tests / Import Check (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.13) (push) Has been cancelled
27 行
685 B
Python
27 行
685 B
Python
"""User note block – passthrough; user-authored content has no LLM step."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
from ..models import BlockType, SourceAnchor
|
|
from .base import BlockContext, BlockGenerator
|
|
|
|
|
|
class UserNoteGenerator(BlockGenerator):
|
|
block_type = BlockType.USER_NOTE
|
|
|
|
async def _generate(
|
|
self, ctx: BlockContext
|
|
) -> tuple[dict[str, Any], list[SourceAnchor], dict[str, Any]]:
|
|
params = ctx.block.params
|
|
body = str(params.get("body") or "").strip()
|
|
return (
|
|
{"format": "markdown", "body": body, "author": "user"},
|
|
[],
|
|
{},
|
|
)
|
|
|
|
|
|
__all__ = ["UserNoteGenerator"]
|