ai-agent-diff-patch-0.0.1.0: src/AIAgent/DiffPatch/Unified/CoreModel/Constant.hs
{-# LANGUAGE OverloadedStrings #-}
-- | CoreModel layer: constants shared across all layers.
-- Centralises literal values to avoid magic strings in the implementation.
module AIAgent.DiffPatch.Unified.CoreModel.Constant where
import Data.Text (Text)
-- | Line feed character (LF, U+000A). The canonical line ending used internally.
_LF :: Text
_LF = "\n"
-- | Carriage return character (CR, U+000D).
_CR :: Text
_CR = "\r"
-- | Carriage return followed by line feed (CRLF). Windows-style line ending.
_CRLF :: Text
_CRLF = "\r\n"
-- | Scan range (in lines) for Fuzzy Patching.
-- applyHunkFuzzy searches up and down this many lines from the hint position.
-- The maximum number of candidates is 2 * _FUZZY_RANGE + 1.
-- Increased from 3 to 5 to absorb larger line-number drift (CR-05).
_FUZZY_RANGE :: Int
_FUZZY_RANGE = 5