MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / _print_header

Function _print_header

openkb/agent/chat.py:131–155  ·  view source on GitHub ↗
(session: ChatSession, kb_dir: Path, style: Style)

Source from the content-addressed store, hash-verified

129
130
131def _print_header(session: ChatSession, kb_dir: Path, style: Style) -> None:
132 disp_dir = _display_kb_dir(kb_dir)
133 version = _openkb_version()
134 version_suffix = f" v{version}\n" if version else "\n"
135 print()
136 _fmt(
137 style,
138 ("class:header.title", "OpenKB Chat"),
139 ("class:header", version_suffix),
140 )
141 _fmt(
142 style,
143 (
144 "class:header",
145 f"{disp_dir} \u00b7 {session.model} \u00b7 session {session.id}\n",
146 ),
147 )
148 _fmt(
149 style,
150 (
151 "class:header",
152 "Type /help for commands, Ctrl-D to exit, Ctrl-C to abort current response.\n",
153 ),
154 )
155 print()
156
157
158def _print_resume_view(session: ChatSession, style: Style) -> None:

Callers 1

run_chatFunction · 0.85

Calls 3

_display_kb_dirFunction · 0.85
_fmtFunction · 0.85
_openkb_versionFunction · 0.70

Tested by

no test coverage detected