( m: WorktreeIndexMismatch, audience: 'user' | 'agent' = 'user', )
| 224 | * prints it for the user, and `codegraph_status` shows the agent's wording. |
| 225 | */ |
| 226 | export function worktreeMismatchWarning( |
| 227 | m: WorktreeIndexMismatch, |
| 228 | audience: 'user' | 'agent' = 'user', |
| 229 | ): string { |
| 230 | return ( |
| 231 | `This CodeGraph index belongs to a different git working tree.\n` + |
| 232 | ` Running in: ${m.worktreeRoot}\n` + |
| 233 | ` Index from: ${m.indexRoot}\n` + |
| 234 | `Results reflect that tree's code (often a different branch), not this worktree — ` + |
| 235 | `symbols changed only here are missing. ${worktreeIndexAdvice(audience)}` |
| 236 | ); |
| 237 | } |
| 238 | |
| 239 | /** |
| 240 | * Compact, single-line variant for prefixing a tool's result. Read tools |
no test coverage detected