* The way out of a borrowed index: one built in the worktree itself. A person * at the CLI is told to build it. An agent is told the user can: indexing is * the user's decision, and the server instructions tell the agent not to run * `codegraph init` itself, so a tool result must not tell it to.
(audience: 'user' | 'agent')
| 214 | * `codegraph init` itself, so a tool result must not tell it to. |
| 215 | */ |
| 216 | function worktreeIndexAdvice(audience: 'user' | 'agent'): string { |
| 217 | return audience === 'agent' |
| 218 | ? 'The user can run "codegraph init" in this worktree for a worktree-local index.' |
| 219 | : 'Run "codegraph init" in this worktree for a worktree-local index.'; |
| 220 | } |
| 221 | |
| 222 | /** |
| 223 | * One-line-per-fact warning describing a detected mismatch: `codegraph status` |
no outgoing calls
no test coverage detected