Current section

Files

Jump to
xberg lib xberg table_chunking_mode.ex
Raw

lib/xberg/table_chunking_mode.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:ba94fe4cec719c31f8ac484fcc2aba1d30db0f87dea8b1b6d0257417a4a260e2
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule Xberg.TableChunkingMode do
@moduledoc """
Controls how markdown tables are handled when they exceed the chunk size limit.
Only applies when `chunker_type` is `Markdown`.
# Variants
* `Split` - Default behavior: tables are split at row boundaries like any
other block element. Continuation chunks contain only data rows without
the header, which can break downstream consumers that need column context.
* `RepeatHeader` - Prepend the table header (header row + separator row) to
every continuation chunk that contains data rows from the same table.
Adds a small amount of duplicate text but ensures each chunk is
self-contained for extraction, search, and LLM consumption.
"""
@typedoc "Controls how markdown tables are handled when they exceed the chunk size limit."
@type t :: :split | :repeat_header
@split :split
@repeat_header :repeat_header
@doc "Split tables at row boundaries (default). Continuation chunks have no header."
@spec split() :: t()
def split, do: @split
@doc "Prepend the table header to every chunk that continues a split table."
@spec repeat_header() :: t()
def repeat_header, do: @repeat_header
end