fix(pi-fff): preserve FFF tool renderers for historical calls after `/reload`
Summary
pi-fff registers its tools in session_start, but Pi restores historical tool rows before it emits that event. After /reload, existing ffgrep and fffind rows therefore cannot resolve their custom renderCall / renderResult functions and fall back to the generic tool display. Calls made after the reload render normally.
This predates #851. #851 makes the problem more visible because its compact renderer is lost after reload, but does not introduce the lifecycle mismatch.
Reproduction
- Start Pi with
pi-fffin its default FFF-named mode. - Call
ffgreporfffind. - Run
/reload. - Inspect the pre-reload tool row.
Actual
The historical row displays the tool name, JSON arguments, and raw output through Pi's generic fallback.
Expected
The historical row uses the same pi-fff renderer as a newly created row in the same session.
Screenshot
Scope
A fix can register the non-builtin FFF-named definitions during extension loading so historical rows can resolve their renderers. It must leave final tool activation, mode restoration, search execution, arguments, and model-visible results in session_start.
Historical override-mode grep / find rows are outside this narrow fix: registering those names before mode restoration would override Pi's built-in names too early.
Source: dmtrKovalenko/fff