fss-link 1.4.1 → 1.4.3

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/bundle/fss-link.js +49 -42
  2. package/package.json +2 -1
@@ -22379,7 +22379,7 @@ async function createContentGeneratorConfig(config, authType) {
22379
22379
  async function createContentGenerator(config, gcConfig, sessionId2) {
22380
22380
  if (DEBUG_CONTENT)
22381
22381
  console.log(`\u{1F41B} DEBUG createContentGenerator: authType=${config.authType}, apiKey=${config.apiKey}, baseUrl=${config.baseUrl}`);
22382
- const version = "1.4.1";
22382
+ const version = "1.4.3";
22383
22383
  const userAgent = `FSS-Link/${version} (${process.platform}; ${process.arch})`;
22384
22384
  const baseHeaders = {
22385
22385
  "User-Agent": userAgent
@@ -96074,7 +96074,7 @@ async function getPackageJson() {
96074
96074
  // packages/cli/src/utils/version.ts
96075
96075
  async function getCliVersion() {
96076
96076
  const pkgJson = await getPackageJson();
96077
- return "1.4.1";
96077
+ return "1.4.3";
96078
96078
  }
96079
96079
 
96080
96080
  // packages/cli/src/ui/commands/aboutCommand.ts
@@ -96126,7 +96126,7 @@ import open4 from "open";
96126
96126
  import process11 from "node:process";
96127
96127
 
96128
96128
  // packages/cli/src/generated/git-commit.ts
96129
- var GIT_COMMIT_INFO = "b055e021";
96129
+ var GIT_COMMIT_INFO = "7f17b88e";
96130
96130
 
96131
96131
  // packages/cli/src/ui/commands/bugCommand.ts
96132
96132
  init_dist2();
@@ -120421,6 +120421,7 @@ function LMStudioModelPrompt({
120421
120421
  init_dist2();
120422
120422
  import { useState as useState33, useEffect as useEffect32 } from "react";
120423
120423
  import { Box as Box19, Text as Text26, useInput as useInput4 } from "ink";
120424
+ import TextInput from "ink-text-input";
120424
120425
 
120425
120426
  // packages/cli/src/utils/modelFetcher.ts
120426
120427
  async function fetchModelsFromCustomEndpoint(baseUrl, providerType, apiKey) {
@@ -120484,7 +120485,6 @@ function AddCustomEndpointDialog({
120484
120485
  const [apiKey, setApiKey] = useState33("");
120485
120486
  const [providerType, setProviderType] = useState33(null);
120486
120487
  const [selectedProviderIndex, setSelectedProviderIndex] = useState33(0);
120487
- const [inputBuffer, setInputBuffer] = useState33("");
120488
120488
  const [availableModels, setAvailableModels] = useState33([]);
120489
120489
  const [selectedModelIndex, setSelectedModelIndex] = useState33(0);
120490
120490
  const [fetchError, setFetchError] = useState33(null);
@@ -120551,34 +120551,23 @@ function AddCustomEndpointDialog({
120551
120551
  }
120552
120552
  return;
120553
120553
  }
120554
- if (key.return) {
120555
- if (step === "name") {
120556
- if (inputBuffer.trim()) {
120557
- setName(inputBuffer.trim());
120558
- setInputBuffer("");
120559
- setStep("url");
120560
- }
120561
- } else if (step === "url") {
120562
- if (inputBuffer.trim()) {
120563
- setUrl(inputBuffer.trim());
120564
- setInputBuffer("");
120565
- setStep("provider");
120566
- }
120567
- } else if (step === "apikey") {
120568
- setApiKey(inputBuffer.trim());
120569
- setInputBuffer("");
120570
- setStep("model-fetch");
120571
- }
120572
- return;
120573
- }
120574
- if (key.backspace || key.delete) {
120575
- setInputBuffer(inputBuffer.slice(0, -1));
120576
- return;
120554
+ });
120555
+ const handleNameSubmit = (value) => {
120556
+ if (value.trim()) {
120557
+ setName(value.trim());
120558
+ setStep("url");
120577
120559
  }
120578
- if (input && !key.ctrl && !key.meta) {
120579
- setInputBuffer(inputBuffer + input);
120560
+ };
120561
+ const handleUrlSubmit = (value) => {
120562
+ if (value.trim()) {
120563
+ setUrl(value.trim());
120564
+ setStep("provider");
120580
120565
  }
120581
- });
120566
+ };
120567
+ const handleApiKeySubmit = (value) => {
120568
+ setApiKey(value.trim());
120569
+ setStep("model-fetch");
120570
+ };
120582
120571
  const renderStep = () => {
120583
120572
  switch (step) {
120584
120573
  case "name":
@@ -120586,11 +120575,17 @@ function AddCustomEndpointDialog({
120586
120575
  /* @__PURE__ */ jsx24(Text26, { bold: true, color: Colors.AccentBlue, children: "Step 1: Endpoint Name" }),
120587
120576
  /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text26, { children: "Enter a friendly name for this endpoint:" }) }),
120588
120577
  /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text26, { color: Colors.AccentGreen, children: 'Example: "RTX3090 Proxy" or "Inference Server"' }) }),
120589
- /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
120578
+ /* @__PURE__ */ jsxs22(Box19, { marginTop: 1, children: [
120590
120579
  /* @__PURE__ */ jsx24(Text26, { color: Colors.AccentPurple, children: "> " }),
120591
- inputBuffer,
120592
- /* @__PURE__ */ jsx24(Text26, { color: Colors.AccentCyan, children: "\u258B" })
120593
- ] }) }),
120580
+ /* @__PURE__ */ jsx24(
120581
+ TextInput,
120582
+ {
120583
+ value: name2,
120584
+ onChange: setName,
120585
+ onSubmit: handleNameSubmit
120586
+ }
120587
+ )
120588
+ ] }),
120594
120589
  /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text26, { color: Colors.Gray, children: "Press Enter to continue, Esc to cancel" }) })
120595
120590
  ] });
120596
120591
  case "url":
@@ -120602,11 +120597,17 @@ function AddCustomEndpointDialog({
120602
120597
  ] }) }),
120603
120598
  /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text26, { children: "Enter the base URL for this endpoint:" }) }),
120604
120599
  /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text26, { color: Colors.AccentGreen, children: 'Example: "https://rtx3090.bobai.com.au/v1"' }) }),
120605
- /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
120600
+ /* @__PURE__ */ jsxs22(Box19, { marginTop: 1, children: [
120606
120601
  /* @__PURE__ */ jsx24(Text26, { color: Colors.AccentPurple, children: "> " }),
120607
- inputBuffer,
120608
- /* @__PURE__ */ jsx24(Text26, { color: Colors.AccentCyan, children: "\u258B" })
120609
- ] }) }),
120602
+ /* @__PURE__ */ jsx24(
120603
+ TextInput,
120604
+ {
120605
+ value: url2,
120606
+ onChange: setUrl,
120607
+ onSubmit: handleUrlSubmit
120608
+ }
120609
+ )
120610
+ ] }),
120610
120611
  /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text26, { color: Colors.Gray, children: "Press Enter to continue, Esc to cancel" }) })
120611
120612
  ] });
120612
120613
  case "provider":
@@ -120651,11 +120652,17 @@ function AddCustomEndpointDialog({
120651
120652
  ] }) }),
120652
120653
  /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text26, { children: "Enter API key if required (leave empty if none):" }) }),
120653
120654
  /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text26, { color: Colors.AccentYellow, children: "\u2139 External endpoints usually require authentication" }) }),
120654
- /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
120655
+ /* @__PURE__ */ jsxs22(Box19, { marginTop: 1, children: [
120655
120656
  /* @__PURE__ */ jsx24(Text26, { color: Colors.AccentPurple, children: "> " }),
120656
- "*".repeat(inputBuffer.length),
120657
- /* @__PURE__ */ jsx24(Text26, { color: Colors.AccentCyan, children: "\u258B" })
120658
- ] }) }),
120657
+ /* @__PURE__ */ jsx24(
120658
+ TextInput,
120659
+ {
120660
+ value: apiKey,
120661
+ onChange: setApiKey,
120662
+ onSubmit: handleApiKeySubmit
120663
+ }
120664
+ )
120665
+ ] }),
120659
120666
  /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text26, { color: Colors.Gray, children: "Press Enter to fetch models, Esc to cancel" }) })
120660
120667
  ] });
120661
120668
  case "model-fetch":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fss-link",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "engines": {
5
5
  "node": ">=20.0.0"
6
6
  },
@@ -133,6 +133,7 @@
133
133
  "ink-link": "^4.1.0",
134
134
  "ink-select-input": "^6.2.0",
135
135
  "ink-spinner": "^5.0.0",
136
+ "ink-text-input": "^6.0.0",
136
137
  "jsdom": "^27.0.0",
137
138
  "lowlight": "^3.3.0",
138
139
  "mime-types": "^3.0.1",