app/core/chunk_payload.py aktualisiert
Some checks failed
Deploy mindnet to llm-node / deploy (push) Failing after 2s

This commit is contained in:
Lars 2025-09-09 11:17:06 +02:00
parent c34df96839
commit 35338dea64

View File

@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
Modul: app/core/chunk_payload.py Modul: app/core/chunk_payload.py
Version: 1.1.1 Version: 1.1.2
Datum: 2025-09-09 Datum: 2025-09-09
Kurzbeschreibung Kurzbeschreibung
@ -22,9 +22,8 @@ Wesentliche Features
Abhängigkeiten Abhängigkeiten
-------------- --------------
- ``app.core.chunker.Chunk`` (Felder: id, index, char_start, char_end, - ``app.core.chunker.Chunk`` und ``assemble_chunks``
token_count, section_title, section_path, neighbors_prev, neighbors_next, text) - ``app.core.parser.extract_wikilinks`` und ``read_markdown`` (nur CLI)
- ``app.core.parser.extract_wikilinks``
Beispiele (CLI Sichtprüfung) Beispiele (CLI Sichtprüfung)
------------------------------ ------------------------------
@ -39,10 +38,10 @@ import os
try: try:
# Projektinterne Imports # 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 from app.core.parser import extract_wikilinks, read_markdown
except Exception: # pragma: no cover - Fallback für relative Ausführung 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 from .parser import extract_wikilinks, read_markdown # type: ignore
@ -127,7 +126,7 @@ def _cli() -> None:
"lang": note.frontmatter.get("lang"), "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 heuristisch relativieren (nur für Demo)
vault_root = os.path.dirname(os.path.dirname(args.src)) # heuristisch vault_root = os.path.dirname(os.path.dirname(args.src)) # heuristisch