feat(coding-agent): implemented git worktree detection and rendering

- Added `git.repo.linkedWorktreeSync` to identify and resolve git worktree metadata without spawning subprocesses.
- Updated `StatusLineComponent` to detect linked worktrees and resolve project/worktree context names.
- Modified path segment rendering to collapse nested git worktree paths and display the worktree name when it diverges from the active branch.
- Introduced `icon.worktree` symbol across themes to visually distinguish git worktree paths.
This commit is contained in:
can1357
2026-06-28 22:50:30 +02:00
parent b46b62b6ef
commit 4db3d68bdb
5 changed files with 77 additions and 10 deletions
@@ -96,6 +96,7 @@ export type SymbolKey =
| "icon.pause"
| "icon.loop"
| "icon.folder"
| "icon.worktree"
| "icon.search"
| "icon.scratchFolder"
| "icon.file"
@@ -299,6 +300,7 @@ const UNICODE_SYMBOLS: SymbolMap = {
"icon.pause": "⏸",
"icon.loop": "↻",
"icon.folder": "📁",
"icon.worktree": "🌳",
"icon.search": "🔍",
"icon.scratchFolder": "🗑",
"icon.file": "📄",
@@ -561,6 +563,8 @@ const NERD_SYMBOLS: SymbolMap = {
"icon.search": "\uf002",
// pick: | alt:
"icon.scratchFolder": "\uf014",
// pick: nf-fa-sitemap | alt: nf-cod-list_tree
"icon.worktree": "\uf0e8",
// pick:  | alt:  
"icon.file": "\uf15b",
// pick:  | alt:  ⎇
@@ -808,6 +812,7 @@ const ASCII_SYMBOLS: SymbolMap = {
"icon.pause": "||",
"icon.loop": "loop",
"icon.folder": "[D]",
"icon.worktree": "[wt]",
"icon.search": "[/]",
"icon.scratchFolder": "[T]",
"icon.file": "[F]",
@@ -1797,6 +1802,7 @@ export class Theme {
pause: this.#symbols["icon.pause"],
loop: this.#symbols["icon.loop"],
folder: this.#symbols["icon.folder"],
worktree: this.#symbols["icon.worktree"],
scratchFolder: this.#symbols["icon.scratchFolder"],
file: this.#symbols["icon.file"],
git: this.#symbols["icon.git"],