(path: string, pathDisplay: BuiltInStatusLinePathDisplay)
| 43 | } |
| 44 | |
| 45 | function formatBuiltInStatusLinePath(path: string, pathDisplay: BuiltInStatusLinePathDisplay): string | null { |
| 46 | if (pathDisplay === 'hidden') { |
| 47 | return null; |
| 48 | } |
| 49 | if (pathDisplay === 'full') { |
| 50 | return path; |
| 51 | } |
| 52 | const home = homedir(); |
| 53 | const tildePath = path === home ? '~' : path.startsWith(`${home}/`) ? `~${path.slice(home.length)}` : path; |
| 54 | return truncatePathMiddle(tildePath, 48); |
| 55 | } |
| 56 | export function statusLineShouldDisplay(settings: ReadonlySettings): boolean { |
| 57 | // Assistant mode: statusline fields (model, permission mode, cwd) reflect the |
| 58 | // REPL/daemon process, not what the agent child is actually running. Hide it. |
no test coverage detected