Initial MVP

This commit is contained in:
2026-03-23 20:38:42 +00:00
commit f245c24928
57 changed files with 6812 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
"""Note ingestion — whole-document chunks."""
def chunk_note(text: str) -> list[dict]:
"""Return note text as a single chunk."""
return [{"text": text, "metadata": {}, "chunk_index": 0}]
def auto_title(text: str, max_len: int = 80) -> str:
"""Generate a title from the first line of text, truncated at word boundary."""
first_line = text.strip().split("\n")[0].strip()
if len(first_line) <= max_len:
return first_line
truncated = first_line[:max_len]
# Truncate at last space
last_space = truncated.rfind(" ")
if last_space > 0:
truncated = truncated[:last_space]
return truncated + "..."