From 35338dea642a00c5c6aa7db6ecd948137cbd591f Mon Sep 17 00:00:00 2001 From: Lars Date: Tue, 9 Sep 2025 11:17:06 +0200 Subject: [PATCH] app/core/chunk_payload.py aktualisiert --- app/core/chunk_payload.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/app/core/chunk_payload.py b/app/core/chunk_payload.py index 3ef8377..af2c506 100644 --- a/app/core/chunk_payload.py +++ b/app/core/chunk_payload.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- """ Modul: app/core/chunk_payload.py -Version: 1.1.1 +Version: 1.1.2 Datum: 2025-09-09 Kurzbeschreibung @@ -22,9 +22,8 @@ Wesentliche Features Abhängigkeiten -------------- -- ``app.core.chunker.Chunk`` (Felder: id, index, char_start, char_end, - token_count, section_title, section_path, neighbors_prev, neighbors_next, text) -- ``app.core.parser.extract_wikilinks`` +- ``app.core.chunker.Chunk`` und ``assemble_chunks`` +- ``app.core.parser.extract_wikilinks`` und ``read_markdown`` (nur CLI) Beispiele (CLI – Sichtprüfung) ------------------------------ @@ -39,10 +38,10 @@ import os try: # Projektinterne Imports - from app.core.chunker import Chunk, chunk_markdown + from app.core.chunker import Chunk, assemble_chunks from app.core.parser import extract_wikilinks, read_markdown except Exception: # pragma: no cover - Fallback für relative Ausführung - from .chunker import Chunk, chunk_markdown # type: ignore + from .chunker import Chunk, assemble_chunks # type: ignore from .parser import extract_wikilinks, read_markdown # type: ignore @@ -127,7 +126,7 @@ def _cli() -> None: "lang": note.frontmatter.get("lang"), } - chunks = chunk_markdown(note.body or "") + chunks = assemble_chunks(note.frontmatter.get("id"), note.body or "", note.frontmatter.get("type", "concept")) # Vault-Root heuristisch relativieren (nur für Demo) vault_root = os.path.dirname(os.path.dirname(args.src)) # heuristisch