Summary
When a new session starts, it would be great if the chat buffer could show the same kind of startup information the pi TUI shows: the pi version, the Emacs package version, and the resources loaded for the session — context files, skills, and prompt templates. For example:
pi v0.80.10
pi-coding-agent (emacs) v2.6.0
[Context] ~/.pi/agent/AGENTS.md
[Skills] brave-search, browser-tools, gh-cli
[Prompts] /git-commit
Current behavior
pi-coding-agent--display-startup-header inserts a fixed string (via --format-startup-header): a "Pi Coding Agent for Emacs" separator plus four keybinding hints. There is no configuration to change its content.
Data availability (from a quick investigation)
- pi version — already probed at startup (
pi-coding-agent--finish-pi-version-process / --extract-pi-version, used by the minimum-version check); reusable
- Package version —
pi-coding-agent-version defconst already exists
- Prompt templates — available from the existing
get_commands RPC (already fetched at startup for the menu), or by scanning ~/.pi/agent/prompts/
- Context files & skills — not exposed via pi's RPC (checked
rpc-types.ts in pi-mono: no resources/skills endpoint; get_state returns model/thinking/session only). Two options:
- Scan
~/.pi/agent/ and the project's .pi/ directly from Emacs — simple, approximate fidelity with pi's resource loader
- Add a resources/startup-info RPC upstream in pi-mono and consume it — right long-term, but cross-repo
Proposed shape
A user option, e.g. pi-coding-agent-startup-banner, with values like:
'minimal — current keybinding header (default; no behavior change)
'verbose — versions + loaded resources as above
'none — no startup header
feeding --format-startup-header.
Happy to implement this as a PR — probably starting with the pragmatic variant (versions + prompts from existing in-process data; context/skills via filesystem scan), since the only missing piece is an RPC for resources.
Summary
When a new session starts, it would be great if the chat buffer could show the same kind of startup information the pi TUI shows: the pi version, the Emacs package version, and the resources loaded for the session — context files, skills, and prompt templates. For example:
Current behavior
pi-coding-agent--display-startup-headerinserts a fixed string (via--format-startup-header): a "Pi Coding Agent for Emacs" separator plus four keybinding hints. There is no configuration to change its content.Data availability (from a quick investigation)
pi-coding-agent--finish-pi-version-process/--extract-pi-version, used by the minimum-version check); reusablepi-coding-agent-versiondefconst already existsget_commandsRPC (already fetched at startup for the menu), or by scanning~/.pi/agent/prompts/rpc-types.tsin pi-mono: no resources/skills endpoint;get_statereturns model/thinking/session only). Two options:~/.pi/agent/and the project's.pi/directly from Emacs — simple, approximate fidelity with pi's resource loaderProposed shape
A user option, e.g.
pi-coding-agent-startup-banner, with values like:'minimal— current keybinding header (default; no behavior change)'verbose— versions + loaded resources as above'none— no startup headerfeeding
--format-startup-header.Happy to implement this as a PR — probably starting with the pragmatic variant (versions + prompts from existing in-process data; context/skills via filesystem scan), since the only missing piece is an RPC for resources.