@andares/pi-toolkits 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,11 +4,11 @@
4
4
  * pi's extension API has no hook to render inside the built-in model
5
5
  * selector, so we patch the component prototype at runtime. Three hooks:
6
6
  *
7
- * 1. handleInput — intercept ctrl+f (toggle favorite for the selected
8
- * model) and ctrl+j (toggle "only favorites" filter)
9
- * BEFORE the original forwards them to the search box.
10
- * Scoped to the selector: outside it, ctrl+f/ctrl+j keep
11
- * pi's default editor bindings untouched.
7
+ * 1. handleInput — intercept the favorites keys (see constants.ts for why
8
+ * they are ctrl+alt+f / ctrl+j) BEFORE the original
9
+ * forwards them to the search box. Scoped to the
10
+ * selector: outside it, ctrl+j keeps pi's default editor
11
+ * binding untouched.
12
12
  * 2. updateList — inject a hint row at the top of the selector and render
13
13
  * favorited model ids in bold bright yellow.
14
14
  * 3. filterModels — when "only favorites" is on, temporarily swap
@@ -22,7 +22,7 @@
22
22
  * keeps loading and ctrl+p falls back to stock behavior. The prototype
23
23
  * shape touched here (handleInput/updateList/filterModels and the instance
24
24
  * fields below) is byte-identical across every published version in
25
- * pi 0.86.0 → 1.0.2.
25
+ * pi 0.86.0 → 1.0.4.
26
26
  */
27
27
  import {
28
28
  ModelSelectorComponent,
@@ -138,7 +138,7 @@ export function applyModelSelectorPatches(): boolean {
138
138
  const originalUpdateList = proto.updateList;
139
139
  const originalFilterModels = proto.filterModels;
140
140
 
141
- // ── 1. Key interception (ctrl+f / ctrl+j) ─────────────────────────────
141
+ // ── 1. Key interception (favorites keys) ────────────────────────────
142
142
  proto.handleInput = function (
143
143
  this: SelectorPatchTarget,
144
144
  keyData: string,
package/src/index.ts CHANGED
@@ -6,13 +6,15 @@
6
6
  *
7
7
  * Current features:
8
8
  * - ask — read-only Q&A mode (/ask)
9
- * - favorites — model favorites (ctrl+F/ctrl+J in /model, favorites-only cycling)
9
+ * - favorites — model favorites (ctrl+alt+F/ctrl+J in /model, favorites-only cycling)
10
10
  * - stash — prompt stash (ctrl+alt+y swap / double-press stash-and-clear)
11
11
  * - review — third-party code review with a configured review model (third-review)
12
12
  * - compact — dedicated compact model for /compact + auto-compact summaries
13
+ * - autostart — replay project-declared slash commands at session start (/add-dir persistence)
13
14
  */
14
15
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
15
16
  import { registerAsk } from "./features/ask/index.js";
17
+ import { registerAutostart } from "./features/autostart/index.js";
16
18
  import { registerCompact } from "./features/compact/index.js";
17
19
  import { registerFavorites } from "./features/favorites/index.js";
18
20
  import { registerReview } from "./features/review/index.js";
@@ -20,6 +22,7 @@ import { registerStash } from "./features/stash/index.js";
20
22
 
21
23
  export default function piToolkits(pi: ExtensionAPI): void {
22
24
  registerAsk(pi);
25
+ registerAutostart(pi);
23
26
  registerCompact(pi);
24
27
  registerFavorites(pi);
25
28
  registerReview(pi);