feat(coding-agent): add model_select extension hook

Fires when the model changes via /model command, model cycling (Ctrl+P),
or session restore. Includes source field and previousModel.

Add model-status.ts example extension demonstrating status bar updates.

closes #628
This commit is contained in:
Mario Zechner 2026-01-11 18:12:46 +01:00
parent a1696e338b
commit a20c6efe17
2 changed files with 33 additions and 0 deletions

View file

@ -507,6 +507,8 @@ pi.on("model_select", async (event, ctx) => {
Use this to update UI elements (status bars, footers) or perform model-specific initialization when the active model changes.
**Examples:** [model-status.ts](../examples/extensions/model-status.ts)
### Tool Events
#### tool_call