@vtstech/pi-api 1.0.9 → 1.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.
Files changed (2) hide show
  1. package/api.js +3 -6
  2. package/package.json +2 -2
package/api.js CHANGED
@@ -3,7 +3,7 @@ import * as fs from "node:fs";
3
3
  import * as path from "node:path";
4
4
  import os from "node:os";
5
5
  import { section, ok, info, warn } from "@vtstech/pi-shared/format";
6
- import { readModelsJson, writeModelsJson, getOllamaBaseUrl, BUILTIN_PROVIDERS } from "@vtstech/pi-shared/ollama";
6
+ import { readModelsJson, writeModelsJson, getOllamaBaseUrl, BUILTIN_PROVIDERS, EXTENSION_VERSION } from "@vtstech/pi-shared/ollama";
7
7
  var API_MODES = {
8
8
  "anthropic-messages": "Anthropic Claude API and compatibles",
9
9
  "openai-completions": "OpenAI Chat Completions API and compatibles",
@@ -71,7 +71,7 @@ function resolveProvider(config, explicit) {
71
71
  }
72
72
  function api_temp_default(pi) {
73
73
  const branding = [
74
- ` \u26A1 Pi API Mode Switcher v1.0.9`,
74
+ ` \u26A1 Pi API Mode Switcher v${EXTENSION_VERSION}`,
75
75
  ` Written by VTSTech`,
76
76
  ` GitHub: https://github.com/VTSTech`,
77
77
  ` Website: www.vts-tech.org`
@@ -517,10 +517,7 @@ function api_temp_default(pi) {
517
517
  { value: "modes", label: "modes", description: "List all supported API modes" },
518
518
  { value: "provider", label: "provider", description: "Show, set, or list all providers" }
519
519
  ];
520
- }
521
- });
522
- pi.registerCompletion?.("api", {
523
- getCompletions: () => [],
520
+ },
524
521
  getArgumentCompletions: (args) => {
525
522
  const sub = args[0]?.toLowerCase() || "";
526
523
  if (sub === "provider" && args.length >= 2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtstech/pi-api",
3
- "version": "1.0.9",
3
+ "version": "1.1.1",
4
4
  "description": "API Mode Switcher extension for Pi Coding Agent",
5
5
  "main": "api.js",
6
6
  "keywords": ["pi-extensions"],
@@ -14,7 +14,7 @@
14
14
  "url": "https://github.com/VTSTech/pi-coding-agent"
15
15
  },
16
16
  "dependencies": {
17
- "@vtstech/pi-shared": "1.0.9"
17
+ "@vtstech/pi-shared": "1.1.1"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "@mariozechner/pi-coding-agent": ">=0.66"