oc_chat
Loading...
Searching...
No Matches
diffview.py File Reference

Go to the source code of this file.

Classes

class  oc_ui.terminal.diffview.DiffLine
class  oc_ui.terminal.diffview.DiffRender
class  oc_ui.terminal.diffview.MutationArgsLedger

Namespaces

namespace  oc_ui
namespace  oc_ui.terminal
namespace  oc_ui.terminal.diffview

Functions

str oc_ui.terminal.diffview._redact (str text)
dict|None oc_ui.terminal.diffview._parse_args (str|None arguments)
str oc_ui.terminal.diffview._norm_path (object value)
bool oc_ui.terminal.diffview._paths_agree (object arg_path, Iterable[object] result_paths)
str oc_ui.terminal.diffview._fmt_bytes (int n)
str oc_ui.terminal.diffview._classify (str line)
str oc_ui.terminal.diffview._reanchor_hunk (str line, int offset)
tuple[tuple[DiffLine,...], bool, int] oc_ui.terminal.diffview._truncate (list[DiffLine] body, int max_lines)
DiffRender|None oc_ui.terminal.diffview._build_edit_diff (dict args, dict result, int max_lines)
DiffRender|None oc_ui.terminal.diffview._build_write_diff (dict args, dict result, int max_lines)
DiffRender|None oc_ui.terminal.diffview.build_mutation_diff (str tool, str|None arguments, Any result, *, int max_lines=DEFAULT_MAX_DIFF_LINES)
str oc_ui.terminal.diffview._elide (str value)
str|None oc_ui.terminal.diffview.summarize_mutation_call (str tool, str|None arguments)
str oc_ui.terminal.diffview.diff_header_line (DiffRender diff)
str|None oc_ui.terminal.diffview.diff_footer_line (DiffRender diff)
list[str] oc_ui.terminal.diffview.render_diff_plain (DiffRender|None diff, *, bool color=True)

Variables

tuple oc_ui.terminal.diffview.MUTATION_TOOLS = ("write_file", "edit_file")
int oc_ui.terminal.diffview.DEFAULT_MAX_DIFF_LINES = 60
int oc_ui.terminal.diffview._CONTEXT_LINES = 3
 oc_ui.terminal.diffview._HUNK_RE = re.compile(r"^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(.*)$")
tuple oc_ui.terminal.diffview._ELIDED_ARG_FIELDS = ("content", "old_string", "new_string")
dict oc_ui.terminal.diffview._ANSI