Expand description
Configuration, split by ownership (ADR 0012, amended by ADR 0018-era split):
- Repo-level
.differential.tomlat the target repo’s root — classification hints only. Shared by everyone reviewing the repo. - User-level
~/.config/differential/config.toml(XDG) —[grouping]: which agent CLI to run and its timeout, and[review]: which palette the reviewer wears, how much context it shows around a hunk, and which diff layout it opens in, and[keys]: which keys the reviewer’s actions answer to. All per-user choices, not properties of the repo, so none of them lives in it.
HARD RULE (ADR 0012): config tunes classification hints and tool behaviour. It can never remove a file or hunk from enumeration — enumeration runs before and independently of anything in this module, and nothing here is consulted by the parser or the invariants.
Structs§
- Config
- Editor
Command - A parsed
[review].editor— the command that opens a file at a line. - Grouping
Config [grouping]— pure data; the application layer turns it into an LLM backend (ADR 0018, 0020).- Keys
Config [keys]— which keys an action answers to, as the reader wrote them.- Review
Config [review]— how the terminal reviewer looks, and how much of a file it shows around a hunk.- User
Config - Everything
parse_userreads, soloadassigns one value rather than growing a second assignment every time the user file gains a table.
Enums§
- Action
- Something the terminal reviewer does on a key, by name (ADR 0036).
- Agent
- Which agent to run, by name.
- Diff
Layout - How the reviewer lays a hunk out.
- Read
Only - What keeps an agent from writing.
- Theme
Name - Which palette the terminal reviewer wears, by name.
Constants§
- CONFIG_
FILE_ NAME - DEFAULT_
ATTRIBUTES - gitattributes names honoured as a “generated” declaration when
[classify].attributesis absent. - DEFAULT_
TIMEOUT_ SECS - How long a grouping call may run when
[grouping].timeout_secsis unset. Every agent’s backend starts from it. - EDITOR_
FILE - The placeholder standing for the path to open.
- EDITOR_
LINE - The placeholder standing for the line to open it at.
- USER_
CONFIG_ DIR - USER_
CONFIG_ FILE_ NAME
Functions§
- user_
config_ path <user config dir>/differential/config.toml.