@billjr99/pi-openai-compat 1.1.23 → 1.1.24

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/index.ts +8 -12
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -761,8 +761,7 @@ export default async function (pi: ExtensionAPI) {
761
761
  if (key === "cloudflare_workers") {
762
762
  const entered = await ctx.ui.input(
763
763
  "Account ID",
764
- "Your Cloudflare Account ID (find it on the Cloudflare dashboard overview page):",
765
- ""
764
+ "Your Cloudflare Account ID (find it on the Cloudflare dashboard overview page):"
766
765
  );
767
766
  if (entered == null) { ctx.ui.notify("Login cancelled.", "info"); return; }
768
767
  const accountId = entered.trim();
@@ -772,8 +771,7 @@ export default async function (pi: ExtensionAPI) {
772
771
  } else if (key === "cloudflare_ai_gateway") {
773
772
  const accountIdInput = await ctx.ui.input(
774
773
  "Account ID",
775
- "Your Cloudflare Account ID (find it on the Cloudflare dashboard overview page):",
776
- ""
774
+ "Your Cloudflare Account ID (find it on the Cloudflare dashboard overview page):"
777
775
  );
778
776
  if (accountIdInput == null) { ctx.ui.notify("Login cancelled.", "info"); return; }
779
777
  const accountId = accountIdInput.trim();
@@ -781,8 +779,7 @@ export default async function (pi: ExtensionAPI) {
781
779
 
782
780
  const gatewayInput = await ctx.ui.input(
783
781
  "Gateway Name",
784
- "Your AI Gateway name/slug (find it under AI → AI Gateway in the Cloudflare dashboard):",
785
- ""
782
+ "Your AI Gateway name/slug (find it under AI → AI Gateway in the Cloudflare dashboard):"
786
783
  );
787
784
  if (gatewayInput == null) { ctx.ui.notify("Login cancelled.", "info"); return; }
788
785
  const gatewaySlug = gatewayInput.trim();
@@ -790,8 +787,7 @@ export default async function (pi: ExtensionAPI) {
790
787
 
791
788
  const providerInput = await ctx.ui.input(
792
789
  "Provider",
793
- "Upstream provider slug (e.g. openai, workers-ai, anthropic — must match your gateway config):",
794
- "openai"
790
+ "Upstream provider slug (e.g. openai, workers-ai, anthropic — must match your gateway config):"
795
791
  );
796
792
  if (providerInput == null) { ctx.ui.notify("Login cancelled.", "info"); return; }
797
793
  const provider = providerInput.trim() || "openai";
@@ -811,7 +807,7 @@ export default async function (pi: ExtensionAPI) {
811
807
  const prompt = isLocalUrl(defaultUrl)
812
808
  ? `Base URL — press Enter for default (${defaultUrl}):`
813
809
  : "Base URL of your endpoint (e.g. https://api.example.com/v1):";
814
- const entered = await ctx.ui.input("Base URL", prompt, defaultUrl);
810
+ const entered = await ctx.ui.input("Base URL", prompt);
815
811
  if (entered == null) { ctx.ui.notify("Login cancelled.", "info"); return; }
816
812
  baseUrl = (entered.trim() || defaultUrl).replace(/\/+$/, "");
817
813
  if (!baseUrl) { ctx.ui.notify("Base URL cannot be empty.", "error"); return; }
@@ -823,7 +819,7 @@ export default async function (pi: ExtensionAPI) {
823
819
  const keyPrompt = tpl.keyHint
824
820
  ? `Your API key (required) — get it at ${tpl.keyHint}:`
825
821
  : "Your API key — leave blank if keyless:";
826
- const entered = await ctx.ui.input("API Key", keyPrompt, "");
822
+ const entered = await ctx.ui.input("API Key", keyPrompt);
827
823
  if (entered == null) { ctx.ui.notify("Login cancelled.", "info"); return; }
828
824
  apiKey = entered.trim() || null;
829
825
  }
@@ -886,7 +882,7 @@ export default async function (pi: ExtensionAPI) {
886
882
 
887
883
  ctx.ui.notify(
888
884
  `${tpl.displayName} registered — ${models.length} model(s) added to /model.`,
889
- "success"
885
+ "info"
890
886
  );
891
887
  },
892
888
  });
@@ -952,7 +948,7 @@ export default async function (pi: ExtensionAPI) {
952
948
  }
953
949
 
954
950
  if (refreshed.length > 0) {
955
- ctx.ui.notify(`Refreshed: ${refreshed.join(", ")}.`, "success");
951
+ ctx.ui.notify(`Refreshed: ${refreshed.join(", ")}.`, "info");
956
952
  }
957
953
  if (failed.length > 0) {
958
954
  ctx.ui.notify(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@billjr99/pi-openai-compat",
3
- "version": "1.1.23",
3
+ "version": "1.1.24",
4
4
  "description": "pi-coding-agent extension: OpenAI-compatible endpoint support (OpenRouter, NVIDIA NIM, Nous Portal, Ollama, custom)",
5
5
  "author": "Bill Mongan <https://github.com/BillJr99>",
6
6
  "license": "MIT",