@64mb/freelens-power 2.21.8 → 2.22.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.
package/dist/renderer.js CHANGED
@@ -6291,7 +6291,19 @@ var CODEX_API_MODELS = [{
6291
6291
  "max"
6292
6292
  ],
6293
6293
  defaultReasoningEffort: "medium"
6294
- }];
6294
+ }, ...["Sol", "Astra"].map((name) => ({
6295
+ id: `gpt-6.2-${name.toLowerCase()}`,
6296
+ label: `GPT-6.2 ${name}`,
6297
+ reasoningEfforts: [
6298
+ "low",
6299
+ "medium",
6300
+ "high",
6301
+ "xhigh",
6302
+ "max",
6303
+ "ultra"
6304
+ ],
6305
+ defaultReasoningEffort: "low"
6306
+ }))];
6295
6307
  // src/common/ai-prompts.ts
6296
6308
  var LEGACY_AI_SYSTEM_PROMPT = `You are an experienced Kubernetes SRE and DevOps engineer assisting in Freelens Power.
6297
6309
  Investigate the current cluster and screen with the available read-only tools. Start with inventory and discover resource types when necessary, then request focused resource specifications and health evidence.
@@ -6413,7 +6425,7 @@ var AiPreferencesStore = class extends Common.Store.ExtensionStore {
6413
6425
  this.model = typeof data?.model === "string" ? data.model : "";
6414
6426
  const reasoningEffort = data?.reasoningEffort ?? "";
6415
6427
  this.reasoningEffort = CODEX_REASONING_EFFORTS.includes(reasoningEffort) ? reasoningEffort : "";
6416
- this.speed = data?.speed === "fast" ? "fast" : "default";
6428
+ this.speed = data?.speed === "fast" || data?.speed === "ultrafast" ? data.speed : "default";
6417
6429
  this.chatFontSize = typeof data?.chatFontSize === "number" && Number.isInteger(data.chatFontSize) && data.chatFontSize >= 10 && data.chatFontSize <= 24 ? data.chatFontSize : 14;
6418
6430
  this.chatPanelWidth = typeof data?.chatPanelWidth === "number" && Number.isFinite(data.chatPanelWidth) ? Math.min(1e4, Math.max(360, Math.round(data.chatPanelWidth))) : 560;
6419
6431
  this.conversations = {};
@@ -21246,7 +21258,7 @@ function startExtensionUpdateNotifications() {
21246
21258
  };
21247
21259
  const started = () => {
21248
21260
  attempt = {
21249
- version: current?.installedVersion ?? "2.21.8",
21261
+ version: current?.installedVersion ?? "2.22.0",
21250
21262
  startedAt: Date.now()
21251
21263
  };
21252
21264
  try {
@@ -26983,7 +26995,7 @@ var KubeconfigEditor = observer(function KubeconfigEditor({ clusterId, onClose }
26983
26995
  const [discardReload, setDiscardReload] = useState(false);
26984
26996
  const sequence = useRef(0);
26985
26997
  const dirty = snapshot !== void 0 && text !== snapshot.text;
26986
- const readOnly = snapshot?.readOnly || ReadOnlyPreferencesStore.getInstanceOrCreate().enabled;
26998
+ const readOnly = snapshot?.readOnly;
26987
26999
  const load = useCallback(async () => {
26988
27000
  const request = ++sequence.current;
26989
27001
  setBusy(true);
@@ -40062,7 +40074,7 @@ var AiPreferences = observer(() => {
40062
40074
  label: effortLabel(effort)
40063
40075
  }))], currentEffort, effortLabel(currentEffort));
40064
40076
  const modelHint = isApi ? "Codex model catalog. API access may differ." : isPi ? currentModel ? "Local Pi model catalog." : "Configure a Pi model in the CLI, then select it here." : isClaude ? "Claude model aliases." : "Local Codex model catalog.";
40065
- const speedHint = isApi ? "Fast and Ultrafast use higher-priced API service tiers; model and account access required." : isClaude ? "Fast mode for Opus; account access required." : "Fast mode depends on model and account.";
40077
+ const speedHint = isApi ? "Fast and Ultrafast use higher-priced API service tiers; model and account access required." : isClaude ? "Fast mode for Opus; account access required." : "Fast and Ultrafast depend on model and account access.";
40066
40078
  const controlStyle = {
40067
40079
  width: 220,
40068
40080
  maxWidth: "100%",
@@ -40242,7 +40254,7 @@ var AiPreferences = observer(() => {
40242
40254
  value: "fast",
40243
40255
  label: "Fast"
40244
40256
  },
40245
- ...isApi ? [{
40257
+ ...!isClaude ? [{
40246
40258
  value: "ultrafast",
40247
40259
  label: "Ultrafast"
40248
40260
  }] : []
@@ -41513,7 +41525,7 @@ var ReadOnlyPreferences = observer(() => {
41513
41525
  children: "Read-only mode"
41514
41526
  }), /* @__PURE__ */ jsx$1("div", {
41515
41527
  className: "power-settings-hint",
41516
- children: "Hide common create, edit and delete actions for resources, nodes and clusters without changing permissions."
41528
+ children: "Hide common resource and node changes and cluster removal without changing permissions or local kubeconfig editing."
41517
41529
  })] });
41518
41530
  });
41519
41531
  // src/renderer/preferences/section-navigation.ts
@@ -41918,7 +41930,6 @@ var PowerPreferences = () => /* @__PURE__ */ jsxs("div", {
41918
41930
  var marker = "data-freelens-power-read-only";
41919
41931
  var excluded = ".freelens-power-preferences, #freelens-power-settings, .freelens-power-dashboard, .power-ai-panel";
41920
41932
  var directActions = [
41921
- ".CatalogAddButton",
41922
41933
  ".KubeObjectListLayout .AddRemoveButtons .add-button",
41923
41934
  ".AddRemoveButtons .remove-button",
41924
41935
  ".create-resource-tab",
@@ -41958,9 +41969,16 @@ function startReadOnlyMode() {
41958
41969
  }
41959
41970
  function isMutation(element) {
41960
41971
  if (element.closest(excluded)) return false;
41972
+ const catalogMenu = element.closest("[data-testid^=\"menu-actions-for-catalog-for-\"], [id^=\"menu-actions-for-catalog-entity-drawer-menu-\"]");
41973
+ const catalogId = catalogMenu?.dataset.testid?.slice(29) ?? catalogMenu?.id.slice(44);
41974
+ const entity = catalogId ? Renderer$1.Catalog.catalogEntities.getById(catalogId) : void 0;
41975
+ if (entity?.apiVersion === Common.Catalog.WebLink.apiVersion && entity.kind === Common.Catalog.WebLink.kind && entity.metadata.source === "local") return false;
41961
41976
  if (element.matches(directActions)) return true;
41962
41977
  if (!element.matches(".MenuActions .MenuItem, [data-testid^=\"menu-actions-for-kube-object-menu-\"] .MenuItem")) return false;
41963
- const title = (element.querySelector(".title")?.textContent ?? element.textContent)?.trim().toLowerCase();
41978
+ const label = (element.querySelector(".title") ?? element).cloneNode(true);
41979
+ for (const icon of label.querySelectorAll(".Icon, [data-power-catalog-menu-icon]")) icon.remove();
41980
+ const title = label.textContent?.trim().toLowerCase();
41981
+ if (title === "open kubeconfig" || title === "edit icon") return false;
41964
41982
  if (title && menuActions.has(title)) return true;
41965
41983
  return !!element.querySelector("[data-icon-name=\"edit\"], [data-icon-name=\"delete\"], [data-icon-name=\"delete_forever\"], [data-icon-name=\"delete_sweep\"], [data-icon-name=\"pause_circle_filled\"], [data-icon-name=\"play_circle_filled\"]");
41966
41984
  }