pi-free 2.1.0 → 2.1.1

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.
@@ -163,29 +163,6 @@ export default async function clineProvider(pi: ExtensionAPI) {
163
163
  },
164
164
  });
165
165
 
166
- // ── Status bar for provider selection ─────────────────────────
167
-
168
- pi.on("model_select", (_event, ctx) => {
169
- if (_event.model?.provider !== PROVIDER_CLINE) {
170
- ctx.ui.setStatus(`${PROVIDER_CLINE}-status`, undefined);
171
- return;
172
- }
173
-
174
- const free = stored.free.length;
175
- const total = stored.all.length;
176
- const paid = total - free;
177
- const mode = toggleState.getCurrentMode();
178
- let status: string;
179
- if (paid === 0) {
180
- status = `cline: ${free} free models`;
181
- } else if (mode === "all") {
182
- status = `cline: ${total} models (free + paid)`;
183
- } else {
184
- status = `cline: ${free} free \u00b7 ${paid} paid`;
185
- }
186
- ctx.ui.setStatus(`${PROVIDER_CLINE}-status`, status);
187
- });
188
-
189
166
  pi.on("before_agent_start", (_event, ctx) => {
190
167
  if (ctx.model?.provider !== PROVIDER_CLINE) return;
191
168
  _currentTaskId = generateUlid();
@@ -125,15 +125,4 @@ export default async function codestralProvider(pi: ExtensionAPI) {
125
125
 
126
126
  _logger.info(`[codestral] Registered codestral-latest via ${keySource}`);
127
127
 
128
- // Status bar
129
- pi.on("model_select", (_event, ctx) => {
130
- if (_event.model?.provider !== PROVIDER_CODESTRAL) {
131
- ctx.ui.setStatus(`${PROVIDER_CODESTRAL}-status`, undefined);
132
- return;
133
- }
134
- ctx.ui.setStatus(
135
- `${PROVIDER_CODESTRAL}-status`,
136
- `codestral: 1 model (free tier) 🔑`,
137
- );
138
- });
139
128
  }
@@ -563,26 +563,6 @@ async function registerProvider(
563
563
  true,
564
564
  );
565
565
 
566
- // Status bar
567
- const pid = config.providerId;
568
- pi.on("model_select", (_event, ctx) => {
569
- if (_event.model?.provider !== pid) {
570
- ctx.ui.setStatus(`${pid}-status`, undefined);
571
- return;
572
- }
573
- const f = freeModels.length;
574
- const t = allModels.length;
575
- const p = t - f;
576
- const mode = toggleState.getCurrentMode();
577
- const status =
578
- p === 0
579
- ? `${pid}: ${f} free models`
580
- : mode === "all"
581
- ? `${pid}: ${t} models (free + paid)`
582
- : `${pid}: ${f} free \u00b7 ${p} paid`;
583
- ctx.ui.setStatus(`${pid}-status`, `${status} 🔑`);
584
- });
585
-
586
566
  // Register models (this swaps in our discovered models over Pi's defaults)
587
567
  toggleState.applyCurrent(reRegister);
588
568
 
@@ -326,27 +326,10 @@ export default async function kiloProvider(pi: ExtensionAPI) {
326
326
  },
327
327
  });
328
328
 
329
- // Status bar + ToS notice on provider selection
329
+ // ToS notice on provider selection
330
330
  let tosShown = false;
331
331
  pi.on("model_select", async (_event, ctx) => {
332
- if (ctx.model?.provider !== PROVIDER_KILO) {
333
- ctx.ui.setStatus(`${PROVIDER_KILO}-status`, undefined);
334
- return;
335
- }
336
-
337
- // Build status line
338
- const free = freeModels.length;
339
- const total = allModels.length;
340
- const paid = total - free;
341
- let status: string;
342
- if (paid === 0) {
343
- status = `kilo: ${free} free models`;
344
- } else if (showPaidModels) {
345
- status = `kilo: ${total} models (free + paid)`;
346
- } else {
347
- status = `kilo: ${free} free \u00b7 ${paid} paid`;
348
- }
349
- ctx.ui.setStatus(`${PROVIDER_KILO}-status`, status);
332
+ if (ctx.model?.provider !== PROVIDER_KILO) return;
350
333
 
351
334
  // ToS notice (once)
352
335
  if (tosShown) return;
@@ -591,19 +591,6 @@ export default async function ollamaProvider(pi: ExtensionAPI) {
591
591
  },
592
592
  });
593
593
 
594
- // ── Status bar for provider selection ───────────────────────────
595
-
596
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
597
- pi.on("model_select" as any, (_event: any, ctx: any) => {
598
- if (_event.model?.provider !== PROVIDER_OLLAMA) {
599
- ctx.ui.setStatus(`${PROVIDER_OLLAMA}-status`, undefined);
600
- return;
601
- }
602
-
603
- const count = allModels.length;
604
- ctx.ui.setStatus(`${PROVIDER_OLLAMA}-status`, `ollama: ${count} models`);
605
- });
606
-
607
594
  const runProbeInBackground = (models: ProviderModelConfig[]) => {
608
595
  runOllamaProbe(apiKey, models, applyModelList, { useCache: true }).catch(
609
596
  (error) => {