(kb_dir: Path)
| 119 | |
| 120 | |
| 121 | def _display_kb_dir(kb_dir: Path) -> str: |
| 122 | home = str(Path.home()) |
| 123 | s = str(kb_dir) |
| 124 | if s == home: |
| 125 | return "~" |
| 126 | if s.startswith(home + "/"): |
| 127 | return "~" + s[len(home) :] |
| 128 | return s |
| 129 | |
| 130 | |
| 131 | def _print_header(session: ChatSession, kb_dir: Path, style: Style) -> None: |