| 135 | * the agent is already reading — a multi-line block would bury the result. |
| 136 | */ |
| 137 | export function worktreeMismatchNotice(m: WorktreeIndexMismatch): string { |
| 138 | return ( |
| 139 | `⚠ CodeGraph results below come from a different git worktree (${m.indexRoot}), ` + |
| 140 | `not where you're working (${m.worktreeRoot}) — they may reflect another branch, ` + |
| 141 | `and symbols changed only here are missing. Run "codegraph init -i" here for a ` + |
| 142 | `worktree-local index.` |
| 143 | ); |
| 144 | } |
| 145 | |
| 146 | /** Resolve symlinks where possible so tmp/realpath quirks don't break equality. */ |
| 147 | function realpath(p: string): string { |