Worktree text
worktree_text
Text renderers for GitWorktreeTool dual-format ToolResult.
Transform the structured data dict produced by
:class:axm_git.tools.worktree.GitWorktreeTool into a compact text
representation, covering all three sub-modes::
Text Only
git_worktree | ✓ | list · {n} worktrees
{path} {head7} {branch}
...
git_worktree | ✓ | add · {branch} @ {base}
{path}
git_worktree | ✓ | remove
{removed}
git_worktree | ✗ | {error}
render_add_text(data)
Render the add sub-mode ({"path", "branch", "base"}).
Source code in packages/axm-git/src/axm_git/tools/worktree_text.py
| Python | |
|---|---|
render_failure_text(*, error, data)
Render any failure (invalid action, not-a-repo, git error).
Appends a child-repo hint when data carries suggestions.
Source code in packages/axm-git/src/axm_git/tools/worktree_text.py
render_list_text(data)
Render the list sub-mode ({"worktrees": [...]}).
Source code in packages/axm-git/src/axm_git/tools/worktree_text.py
render_remove_text(data)
Render the remove sub-mode ({"removed": ...}).