orbit-code-ai 0.1.11 → 0.1.13

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/dist/cli.mjs +884 -1008
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -83661,9 +83661,56 @@ function boxRow(content, width, rawLen) {
83661
83661
  const pad = Math.max(0, width - 2 - rawLen);
83662
83662
  return `${rgb(...BORDER)}│${RESET}${content}${" ".repeat(pad)}${rgb(...BORDER)}│${RESET}`;
83663
83663
  }
83664
- function printStartupScreen() {
83664
+ function introEnabled() {
83665
+ if (process.env.ORBIT_NO_INTRO)
83666
+ return false;
83667
+ if (process.env.ORBIT_FORCE_INTRO)
83668
+ return true;
83665
83669
  if (process.env.CI || !process.stdout.isTTY)
83670
+ return false;
83671
+ return true;
83672
+ }
83673
+ async function playOrbitIntro() {
83674
+ const W2 = 37;
83675
+ const center = 18;
83676
+ const amp = 16;
83677
+ const FRAMES = 44;
83678
+ const REVS = 2;
83679
+ process.stdout.write("\x1B[?25l");
83680
+ try {
83681
+ for (let f = 0;f <= FRAMES; f++) {
83682
+ const phase = f / FRAMES * Math.PI * 2 * REVS;
83683
+ const cells = new Array(W2).fill(undefined);
83684
+ cells[center] = `${rgb(...ACCENT)}${f % 2 === 0 ? "✦" : "✧"}${RESET}`;
83685
+ const trail = [
83686
+ [0, "●", [170, 215, 255]],
83687
+ [0.16, "•", [90, 140, 220]],
83688
+ [0.32, "·", [55, 85, 150]]
83689
+ ];
83690
+ for (const [lag, ch, col] of trail) {
83691
+ const c5 = Math.round(center + amp * Math.sin(phase - lag));
83692
+ if (c5 >= 0 && c5 < W2 && cells[c5] === undefined)
83693
+ cells[c5] = `${rgb(...col)}${ch}${RESET}`;
83694
+ }
83695
+ let line = "";
83696
+ for (let c5 = 0;c5 < W2; c5++)
83697
+ line += cells[c5] ?? " ";
83698
+ process.stdout.write("\r " + line);
83699
+ await sleep3(45);
83700
+ }
83701
+ process.stdout.write("\r\x1B[2K");
83702
+ } finally {
83703
+ process.stdout.write("\x1B[?25h");
83704
+ }
83705
+ }
83706
+ async function printStartupScreen() {
83707
+ if ((process.env.CI || !process.stdout.isTTY) && !process.env.ORBIT_FORCE_INTRO)
83666
83708
  return;
83709
+ if (introEnabled()) {
83710
+ try {
83711
+ await playOrbitIntro();
83712
+ } catch {}
83713
+ }
83667
83714
  const p = detectProvider();
83668
83715
  const W2 = 62;
83669
83716
  const out = [];
@@ -83712,13 +83759,13 @@ function printStartupScreen() {
83712
83759
  const sLen = ` ● ${sL} Ready — type /help to begin`.length;
83713
83760
  out.push(boxRow(sRow, W2, sLen));
83714
83761
  out.push(`${rgb(...BORDER)}╚${"═".repeat(W2 - 2)}╝${RESET}`);
83715
- out.push(` ${DIM}${rgb(...DIMCOL)}orbit-code ${RESET}${rgb(...ACCENT)}v${"0.1.11"}${RESET}`);
83762
+ out.push(` ${DIM}${rgb(...DIMCOL)}orbit-code ${RESET}${rgb(...ACCENT)}v${"0.1.13"}${RESET}`);
83716
83763
  out.push("");
83717
83764
  process.stdout.write(out.join(`
83718
83765
  `) + `
83719
83766
  `);
83720
83767
  }
83721
- var ESC = "\x1B[", RESET, DIM, rgb = (r, g, b) => `${ESC}38;2;${r};${g};${b}m`, BLUE_GRAD, ACCENT, CREAM, DIMCOL, BORDER, LOGO_ORBIT, LOGO_CODE;
83768
+ var ESC = "\x1B[", RESET, DIM, rgb = (r, g, b) => `${ESC}38;2;${r};${g};${b}m`, BLUE_GRAD, ACCENT, CREAM, DIMCOL, BORDER, LOGO_ORBIT, LOGO_CODE, sleep3 = (ms) => new Promise((r) => setTimeout(r, ms));
83722
83769
  var init_StartupScreen = __esm(() => {
83723
83770
  RESET = `${ESC}0m`;
83724
83771
  DIM = `${ESC}2m`;
@@ -247237,7 +247284,7 @@ function printResumeHint() {
247237
247284
  }
247238
247285
  writeSync2(1, source_default.dim(`
247239
247286
  Resume this session with:
247240
- orbitcode --resume ${resumeArg}
247287
+ orbit --resume ${resumeArg}
247241
247288
  `));
247242
247289
  resumeHintPrinted = true;
247243
247290
  } catch {}
@@ -334183,7 +334230,7 @@ function getAnthropicEnvMetadata() {
334183
334230
  function getBuildAgeMinutes() {
334184
334231
  if (false)
334185
334232
  ;
334186
- const buildTime = new Date("2026-06-25T07:54:17.583Z").getTime();
334233
+ const buildTime = new Date("2026-06-25T08:54:00.773Z").getTime();
334187
334234
  if (isNaN(buildTime))
334188
334235
  return;
334189
334236
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -358600,7 +358647,7 @@ function buildPrimarySection() {
358600
358647
  }, undefined, false, undefined, this);
358601
358648
  return [{
358602
358649
  label: "Version",
358603
- value: "0.1.11"
358650
+ value: "0.1.13"
358604
358651
  }, {
358605
358652
  label: "Session name",
358606
358653
  value: nameValue
@@ -362551,16 +362598,6 @@ function isEligibleForOverageCreditGrant() {
362551
362598
  return false;
362552
362599
  return formatGrantAmount(info) !== null;
362553
362600
  }
362554
- function shouldShowOverageCreditUpsell() {
362555
- if (!isEligibleForOverageCreditGrant())
362556
- return false;
362557
- const config2 = getGlobalConfig();
362558
- if (config2.hasVisitedExtraUsage)
362559
- return false;
362560
- if ((config2.overageCreditUpsellSeenCount ?? 0) >= MAX_IMPRESSIONS)
362561
- return false;
362562
- return true;
362563
- }
362564
362601
  function getUsageText(amount) {
362565
362602
  return `${amount} in extra usage for third-party apps · /extra-usage`;
362566
362603
  }
@@ -362647,7 +362684,7 @@ function OverageCreditUpsell(t0) {
362647
362684
  }
362648
362685
  return t1;
362649
362686
  }
362650
- var import_react_compiler_runtime134, import_react106, jsx_dev_runtime172, MAX_IMPRESSIONS = 3, FEED_SUBTITLE = "On us. Works on third-party apps · /extra-usage";
362687
+ var import_react_compiler_runtime134, import_react106, jsx_dev_runtime172, FEED_SUBTITLE = "On us. Works on third-party apps · /extra-usage";
362651
362688
  var init_OverageCreditUpsell = __esm(() => {
362652
362689
  init_ink2();
362653
362690
  init_overageCreditGrant();
@@ -388328,7 +388365,7 @@ function SessionInfo(t0) {
388328
388365
  children: [
388329
388366
  /* @__PURE__ */ jsx_dev_runtime241.jsxDEV(ThemedText, {
388330
388367
  color: "warning",
388331
- children: "Not in remote mode. Start with `orbitcode --remote` to use this command."
388368
+ children: "Not in remote mode. Start with `orbit --remote` to use this command."
388332
388369
  }, undefined, false, undefined, this),
388333
388370
  /* @__PURE__ */ jsx_dev_runtime241.jsxDEV(ThemedText, {
388334
388371
  dimColor: true,
@@ -421888,9 +421925,9 @@ var init_pyright = __esm(() => {
421888
421925
  });
421889
421926
 
421890
421927
  // src/utils/bash/specs/sleep.ts
421891
- var sleep4, sleep_default;
421928
+ var sleep5, sleep_default;
421892
421929
  var init_sleep = __esm(() => {
421893
- sleep4 = {
421930
+ sleep5 = {
421894
421931
  name: "sleep",
421895
421932
  description: "Delay for a specified amount of time",
421896
421933
  args: {
@@ -421899,7 +421936,7 @@ var init_sleep = __esm(() => {
421899
421936
  isOptional: false
421900
421937
  }
421901
421938
  };
421902
- sleep_default = sleep4;
421939
+ sleep_default = sleep5;
421903
421940
  });
421904
421941
 
421905
421942
  // src/utils/bash/specs/srun.ts
@@ -459752,725 +459789,6 @@ var init_tipHistory = __esm(() => {
459752
459789
  init_config();
459753
459790
  });
459754
459791
 
459755
- // src/utils/desktopDeepLink.ts
459756
- import { readdir as readdir26 } from "fs/promises";
459757
- import { join as join122 } from "path";
459758
- function isDevMode() {
459759
- if (true) {
459760
- return true;
459761
- }
459762
- const pathsToCheck = [process.argv[1] || "", process.execPath || ""];
459763
- const buildDirs = [
459764
- "/build-ant/",
459765
- "/build-ant-native/",
459766
- "/build-external/",
459767
- "/build-external-native/"
459768
- ];
459769
- return pathsToCheck.some((p) => buildDirs.some((dir) => p.includes(dir)));
459770
- }
459771
- function buildDesktopDeepLink(sessionId) {
459772
- const protocol = isDevMode() ? "orbit-dev" : "orbit";
459773
- const url3 = new URL(`${protocol}://resume`);
459774
- url3.searchParams.set("session", sessionId);
459775
- url3.searchParams.set("cwd", getCwd());
459776
- return url3.toString();
459777
- }
459778
- async function isDesktopInstalled() {
459779
- if (isDevMode()) {
459780
- return true;
459781
- }
459782
- const platform6 = process.platform;
459783
- if (platform6 === "darwin") {
459784
- return pathExists("/Applications/Orbit.app");
459785
- } else if (platform6 === "linux") {
459786
- const { code, stdout } = await execFileNoThrow("xdg-mime", [
459787
- "query",
459788
- "default",
459789
- "x-scheme-handler/orbit"
459790
- ]);
459791
- return code === 0 && stdout.trim().length > 0;
459792
- } else if (platform6 === "win32") {
459793
- const { code } = await execFileNoThrow("reg", [
459794
- "query",
459795
- "HKEY_CLASSES_ROOT\\orbit",
459796
- "/ve"
459797
- ]);
459798
- return code === 0;
459799
- }
459800
- return false;
459801
- }
459802
- async function getDesktopVersion() {
459803
- const platform6 = process.platform;
459804
- if (platform6 === "darwin") {
459805
- const { code, stdout } = await execFileNoThrow("defaults", [
459806
- "read",
459807
- "/Applications/Orbit.app/Contents/Info.plist",
459808
- "CFBundleShortVersionString"
459809
- ]);
459810
- if (code !== 0) {
459811
- return null;
459812
- }
459813
- const version2 = stdout.trim();
459814
- return version2.length > 0 ? version2 : null;
459815
- } else if (platform6 === "win32") {
459816
- const localAppData = process.env.LOCALAPPDATA;
459817
- if (!localAppData) {
459818
- return null;
459819
- }
459820
- const installDir = join122(localAppData, "AnthropicOrbit");
459821
- try {
459822
- const entries = await readdir26(installDir);
459823
- const versions2 = entries.filter((e2) => e2.startsWith("app-")).map((e2) => e2.slice(4)).filter((v) => import_semver11.coerce(v) !== null).sort((a2, b) => {
459824
- const ca = import_semver11.coerce(a2);
459825
- const cb = import_semver11.coerce(b);
459826
- return ca.compare(cb);
459827
- });
459828
- return versions2.length > 0 ? versions2[versions2.length - 1] : null;
459829
- } catch {
459830
- return null;
459831
- }
459832
- }
459833
- return null;
459834
- }
459835
- async function getDesktopInstallStatus() {
459836
- const installed = await isDesktopInstalled();
459837
- if (!installed) {
459838
- return { status: "not-installed" };
459839
- }
459840
- let version2;
459841
- try {
459842
- version2 = await getDesktopVersion();
459843
- } catch {
459844
- return { status: "ready", version: "unknown" };
459845
- }
459846
- if (!version2) {
459847
- return { status: "ready", version: "unknown" };
459848
- }
459849
- const coerced = import_semver11.coerce(version2);
459850
- if (!coerced || !gte(coerced.version, MIN_DESKTOP_VERSION)) {
459851
- return { status: "version-too-old", version: version2 };
459852
- }
459853
- return { status: "ready", version: version2 };
459854
- }
459855
- async function openDeepLink(deepLinkUrl) {
459856
- const platform6 = process.platform;
459857
- logForDebugging2(`Opening deep link: ${deepLinkUrl}`);
459858
- if (platform6 === "darwin") {
459859
- if (isDevMode()) {
459860
- const { code: code2 } = await execFileNoThrow("osascript", [
459861
- "-e",
459862
- `tell application "Electron" to open location "${deepLinkUrl}"`
459863
- ]);
459864
- return code2 === 0;
459865
- }
459866
- const { code } = await execFileNoThrow("open", [deepLinkUrl]);
459867
- return code === 0;
459868
- } else if (platform6 === "linux") {
459869
- const { code } = await execFileNoThrow("xdg-open", [deepLinkUrl]);
459870
- return code === 0;
459871
- } else if (platform6 === "win32") {
459872
- const { code } = await execFileNoThrow("cmd", [
459873
- "/c",
459874
- "start",
459875
- "",
459876
- deepLinkUrl
459877
- ]);
459878
- return code === 0;
459879
- }
459880
- return false;
459881
- }
459882
- async function openCurrentSessionInDesktop() {
459883
- const sessionId = getSessionId();
459884
- const installed = await isDesktopInstalled();
459885
- if (!installed) {
459886
- return {
459887
- success: false,
459888
- error: "Orbit Desktop is not installed. Install it from https://orbit.ai/download"
459889
- };
459890
- }
459891
- const deepLinkUrl = buildDesktopDeepLink(sessionId);
459892
- const opened = await openDeepLink(deepLinkUrl);
459893
- if (!opened) {
459894
- return {
459895
- success: false,
459896
- error: "Failed to open Orbit Desktop. Please try opening it manually.",
459897
- deepLinkUrl
459898
- };
459899
- }
459900
- return { success: true, deepLinkUrl };
459901
- }
459902
- var import_semver11, MIN_DESKTOP_VERSION = "1.1.2396";
459903
- var init_desktopDeepLink = __esm(() => {
459904
- init_state();
459905
- init_cwd();
459906
- init_debug();
459907
- init_execFileNoThrow();
459908
- init_file();
459909
- import_semver11 = __toESM(require_semver2(), 1);
459910
- });
459911
-
459912
- // src/components/DesktopHandoff.tsx
459913
- function getDownloadUrl() {
459914
- switch (process.platform) {
459915
- case "win32":
459916
- return "https://orbit.ai/api/desktop/win32/x64/exe/latest/redirect";
459917
- default:
459918
- return "https://orbit.ai/api/desktop/darwin/universal/dmg/latest/redirect";
459919
- }
459920
- }
459921
- function DesktopHandoff(t0) {
459922
- const $2 = import_react_compiler_runtime308.c(20);
459923
- const {
459924
- onDone
459925
- } = t0;
459926
- const [state2, setState] = import_react274.useState("checking");
459927
- const [error41, setError] = import_react274.useState(null);
459928
- const [downloadMessage, setDownloadMessage] = import_react274.useState("");
459929
- let t1;
459930
- if ($2[0] !== error41 || $2[1] !== onDone || $2[2] !== state2) {
459931
- t1 = (input) => {
459932
- if (state2 === "error") {
459933
- onDone(error41 ?? "Unknown error", {
459934
- display: "system"
459935
- });
459936
- return;
459937
- }
459938
- if (state2 === "prompt-download") {
459939
- if (input === "y" || input === "Y") {
459940
- openBrowser(getDownloadUrl()).catch(_temp180);
459941
- onDone(`Starting download. Re-run /desktop once you’ve installed the app.
459942
- Learn more at ${DESKTOP_DOCS_URL}`, {
459943
- display: "system"
459944
- });
459945
- } else {
459946
- if (input === "n" || input === "N") {
459947
- onDone(`The desktop app is required for /desktop. Learn more at ${DESKTOP_DOCS_URL}`, {
459948
- display: "system"
459949
- });
459950
- }
459951
- }
459952
- }
459953
- };
459954
- $2[0] = error41;
459955
- $2[1] = onDone;
459956
- $2[2] = state2;
459957
- $2[3] = t1;
459958
- } else {
459959
- t1 = $2[3];
459960
- }
459961
- use_input_default(t1);
459962
- let t2;
459963
- let t3;
459964
- if ($2[4] !== onDone) {
459965
- t2 = () => {
459966
- const performHandoff = async function performHandoff2() {
459967
- setState("checking");
459968
- const installStatus = await getDesktopInstallStatus();
459969
- if (installStatus.status === "not-installed") {
459970
- setDownloadMessage("Orbit Desktop is not installed.");
459971
- setState("prompt-download");
459972
- return;
459973
- }
459974
- if (installStatus.status === "version-too-old") {
459975
- setDownloadMessage(`Orbit Desktop needs to be updated (found v${installStatus.version}, need v1.1.2396+).`);
459976
- setState("prompt-download");
459977
- return;
459978
- }
459979
- setState("flushing");
459980
- await flushSessionStorage();
459981
- setState("opening");
459982
- const result = await openCurrentSessionInDesktop();
459983
- if (!result.success) {
459984
- setError(result.error ?? "Failed to open Orbit Desktop");
459985
- setState("error");
459986
- return;
459987
- }
459988
- setState("success");
459989
- setTimeout(_temp276, 500, onDone);
459990
- };
459991
- performHandoff().catch((err2) => {
459992
- setError(errorMessage(err2));
459993
- setState("error");
459994
- });
459995
- };
459996
- t3 = [onDone];
459997
- $2[4] = onDone;
459998
- $2[5] = t2;
459999
- $2[6] = t3;
460000
- } else {
460001
- t2 = $2[5];
460002
- t3 = $2[6];
460003
- }
460004
- import_react274.useEffect(t2, t3);
460005
- if (state2 === "error") {
460006
- let t42;
460007
- if ($2[7] !== error41) {
460008
- t42 = /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedText, {
460009
- color: "error",
460010
- children: [
460011
- "Error: ",
460012
- error41
460013
- ]
460014
- }, undefined, true, undefined, this);
460015
- $2[7] = error41;
460016
- $2[8] = t42;
460017
- } else {
460018
- t42 = $2[8];
460019
- }
460020
- let t52;
460021
- if ($2[9] === Symbol.for("react.memo_cache_sentinel")) {
460022
- t52 = /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedText, {
460023
- dimColor: true,
460024
- children: "Press any key to continue…"
460025
- }, undefined, false, undefined, this);
460026
- $2[9] = t52;
460027
- } else {
460028
- t52 = $2[9];
460029
- }
460030
- let t62;
460031
- if ($2[10] !== t42) {
460032
- t62 = /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedBox_default, {
460033
- flexDirection: "column",
460034
- paddingX: 2,
460035
- children: [
460036
- t42,
460037
- t52
460038
- ]
460039
- }, undefined, true, undefined, this);
460040
- $2[10] = t42;
460041
- $2[11] = t62;
460042
- } else {
460043
- t62 = $2[11];
460044
- }
460045
- return t62;
460046
- }
460047
- if (state2 === "prompt-download") {
460048
- let t42;
460049
- if ($2[12] !== downloadMessage) {
460050
- t42 = /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedText, {
460051
- children: downloadMessage
460052
- }, undefined, false, undefined, this);
460053
- $2[12] = downloadMessage;
460054
- $2[13] = t42;
460055
- } else {
460056
- t42 = $2[13];
460057
- }
460058
- let t52;
460059
- if ($2[14] === Symbol.for("react.memo_cache_sentinel")) {
460060
- t52 = /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedText, {
460061
- children: "Download now? (y/n)"
460062
- }, undefined, false, undefined, this);
460063
- $2[14] = t52;
460064
- } else {
460065
- t52 = $2[14];
460066
- }
460067
- let t62;
460068
- if ($2[15] !== t42) {
460069
- t62 = /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedBox_default, {
460070
- flexDirection: "column",
460071
- paddingX: 2,
460072
- children: [
460073
- t42,
460074
- t52
460075
- ]
460076
- }, undefined, true, undefined, this);
460077
- $2[15] = t42;
460078
- $2[16] = t62;
460079
- } else {
460080
- t62 = $2[16];
460081
- }
460082
- return t62;
460083
- }
460084
- let t4;
460085
- if ($2[17] === Symbol.for("react.memo_cache_sentinel")) {
460086
- t4 = {
460087
- checking: "Checking for Orbit Desktop…",
460088
- flushing: "Saving session…",
460089
- opening: "Opening Orbit Desktop…",
460090
- success: "Opening in Orbit Desktop…"
460091
- };
460092
- $2[17] = t4;
460093
- } else {
460094
- t4 = $2[17];
460095
- }
460096
- const messages = t4;
460097
- const t5 = messages[state2];
460098
- let t6;
460099
- if ($2[18] !== t5) {
460100
- t6 = /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(LoadingState, {
460101
- message: t5
460102
- }, undefined, false, undefined, this);
460103
- $2[18] = t5;
460104
- $2[19] = t6;
460105
- } else {
460106
- t6 = $2[19];
460107
- }
460108
- return t6;
460109
- }
460110
- async function _temp276(onDone_0) {
460111
- onDone_0("Session transferred to Orbit Desktop", {
460112
- display: "system"
460113
- });
460114
- await gracefulShutdown(0, "other");
460115
- }
460116
- function _temp180() {}
460117
- var import_react_compiler_runtime308, import_react274, jsx_dev_runtime395, DESKTOP_DOCS_URL = "https://clau.de/desktop";
460118
- var init_DesktopHandoff = __esm(() => {
460119
- init_ink2();
460120
- init_browser();
460121
- init_desktopDeepLink();
460122
- init_errors();
460123
- init_gracefulShutdown();
460124
- init_sessionStorage();
460125
- init_LoadingState();
460126
- import_react_compiler_runtime308 = __toESM(require_dist3(), 1);
460127
- import_react274 = __toESM(require_react(), 1);
460128
- jsx_dev_runtime395 = __toESM(require_jsx_dev_runtime(), 1);
460129
- });
460130
-
460131
- // src/components/DesktopUpsell/DesktopUpsellStartup.tsx
460132
- function getDesktopUpsellConfig() {
460133
- return getDynamicConfig_CACHED_MAY_BE_STALE("tengu_desktop_upsell", DESKTOP_UPSELL_DEFAULT);
460134
- }
460135
- function isSupportedPlatform2() {
460136
- return process.platform === "darwin" || process.platform === "win32" && process.arch === "x64";
460137
- }
460138
- function shouldShowDesktopUpsellStartup() {
460139
- if (!isSupportedPlatform2())
460140
- return false;
460141
- if (!getDesktopUpsellConfig().enable_startup_dialog)
460142
- return false;
460143
- const config3 = getGlobalConfig();
460144
- if (config3.desktopUpsellDismissed)
460145
- return false;
460146
- if ((config3.desktopUpsellSeenCount ?? 0) >= 3)
460147
- return false;
460148
- return true;
460149
- }
460150
- function DesktopUpsellStartup(t0) {
460151
- const $2 = import_react_compiler_runtime309.c(14);
460152
- const {
460153
- onDone
460154
- } = t0;
460155
- const [showHandoff, setShowHandoff] = import_react275.useState(false);
460156
- let t1;
460157
- if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
460158
- t1 = [];
460159
- $2[0] = t1;
460160
- } else {
460161
- t1 = $2[0];
460162
- }
460163
- import_react275.useEffect(_temp181, t1);
460164
- if (showHandoff) {
460165
- let t22;
460166
- if ($2[1] !== onDone) {
460167
- t22 = /* @__PURE__ */ jsx_dev_runtime396.jsxDEV(DesktopHandoff, {
460168
- onDone: () => onDone()
460169
- }, undefined, false, undefined, this);
460170
- $2[1] = onDone;
460171
- $2[2] = t22;
460172
- } else {
460173
- t22 = $2[2];
460174
- }
460175
- return t22;
460176
- }
460177
- let t2;
460178
- if ($2[3] !== onDone) {
460179
- t2 = function handleSelect2(value) {
460180
- switch (value) {
460181
- case "try": {
460182
- setShowHandoff(true);
460183
- return;
460184
- }
460185
- case "never": {
460186
- saveGlobalConfig(_temp277);
460187
- onDone();
460188
- return;
460189
- }
460190
- case "not-now": {
460191
- onDone();
460192
- return;
460193
- }
460194
- }
460195
- };
460196
- $2[3] = onDone;
460197
- $2[4] = t2;
460198
- } else {
460199
- t2 = $2[4];
460200
- }
460201
- const handleSelect = t2;
460202
- let t3;
460203
- if ($2[5] === Symbol.for("react.memo_cache_sentinel")) {
460204
- t3 = {
460205
- label: "Open in Orbit AI Desktop",
460206
- value: "try"
460207
- };
460208
- $2[5] = t3;
460209
- } else {
460210
- t3 = $2[5];
460211
- }
460212
- let t4;
460213
- if ($2[6] === Symbol.for("react.memo_cache_sentinel")) {
460214
- t4 = {
460215
- label: "Not now",
460216
- value: "not-now"
460217
- };
460218
- $2[6] = t4;
460219
- } else {
460220
- t4 = $2[6];
460221
- }
460222
- let t5;
460223
- if ($2[7] === Symbol.for("react.memo_cache_sentinel")) {
460224
- t5 = [t3, t4, {
460225
- label: "Don't ask again",
460226
- value: "never"
460227
- }];
460228
- $2[7] = t5;
460229
- } else {
460230
- t5 = $2[7];
460231
- }
460232
- const options2 = t5;
460233
- let t6;
460234
- if ($2[8] === Symbol.for("react.memo_cache_sentinel")) {
460235
- t6 = /* @__PURE__ */ jsx_dev_runtime396.jsxDEV(ThemedBox_default, {
460236
- marginBottom: 1,
460237
- children: /* @__PURE__ */ jsx_dev_runtime396.jsxDEV(ThemedText, {
460238
- children: "Same Orbit AI with visual diffs, live app preview, parallel sessions, and more."
460239
- }, undefined, false, undefined, this)
460240
- }, undefined, false, undefined, this);
460241
- $2[8] = t6;
460242
- } else {
460243
- t6 = $2[8];
460244
- }
460245
- let t7;
460246
- if ($2[9] !== handleSelect) {
460247
- t7 = () => handleSelect("not-now");
460248
- $2[9] = handleSelect;
460249
- $2[10] = t7;
460250
- } else {
460251
- t7 = $2[10];
460252
- }
460253
- let t8;
460254
- if ($2[11] !== handleSelect || $2[12] !== t7) {
460255
- t8 = /* @__PURE__ */ jsx_dev_runtime396.jsxDEV(PermissionDialog, {
460256
- title: "Try Orbit AI Desktop",
460257
- children: /* @__PURE__ */ jsx_dev_runtime396.jsxDEV(ThemedBox_default, {
460258
- flexDirection: "column",
460259
- paddingX: 2,
460260
- paddingY: 1,
460261
- children: [
460262
- t6,
460263
- /* @__PURE__ */ jsx_dev_runtime396.jsxDEV(Select, {
460264
- options: options2,
460265
- onChange: handleSelect,
460266
- onCancel: t7
460267
- }, undefined, false, undefined, this)
460268
- ]
460269
- }, undefined, true, undefined, this)
460270
- }, undefined, false, undefined, this);
460271
- $2[11] = handleSelect;
460272
- $2[12] = t7;
460273
- $2[13] = t8;
460274
- } else {
460275
- t8 = $2[13];
460276
- }
460277
- return t8;
460278
- }
460279
- function _temp277(prev_0) {
460280
- if (prev_0.desktopUpsellDismissed) {
460281
- return prev_0;
460282
- }
460283
- return {
460284
- ...prev_0,
460285
- desktopUpsellDismissed: true
460286
- };
460287
- }
460288
- function _temp181() {
460289
- const newCount = (getGlobalConfig().desktopUpsellSeenCount ?? 0) + 1;
460290
- saveGlobalConfig((prev) => {
460291
- if ((prev.desktopUpsellSeenCount ?? 0) >= newCount) {
460292
- return prev;
460293
- }
460294
- return {
460295
- ...prev,
460296
- desktopUpsellSeenCount: newCount
460297
- };
460298
- });
460299
- logEvent("tengu_desktop_upsell_shown", {
460300
- seen_count: newCount
460301
- });
460302
- }
460303
- var import_react_compiler_runtime309, import_react275, jsx_dev_runtime396, DESKTOP_UPSELL_DEFAULT;
460304
- var init_DesktopUpsellStartup = __esm(() => {
460305
- init_ink2();
460306
- init_config();
460307
- init_select();
460308
- init_DesktopHandoff();
460309
- init_PermissionDialog();
460310
- import_react_compiler_runtime309 = __toESM(require_dist3(), 1);
460311
- import_react275 = __toESM(require_react(), 1);
460312
- jsx_dev_runtime396 = __toESM(require_jsx_dev_runtime(), 1);
460313
- DESKTOP_UPSELL_DEFAULT = {
460314
- enable_shortcut_tip: false,
460315
- enable_startup_dialog: false
460316
- };
460317
- });
460318
-
460319
- // src/services/api/referral.ts
460320
- async function fetchReferralEligibility(campaign = "orbit_code_guest_pass") {
460321
- const { accessToken, orgUUID } = await prepareApiRequest();
460322
- const headers = {
460323
- ...getOAuthHeaders(accessToken),
460324
- "x-organization-uuid": orgUUID
460325
- };
460326
- const url3 = `${getOauthConfig().BASE_API_URL}/api/oauth/organizations/${orgUUID}/referral/eligibility`;
460327
- const response = await axios_default.get(url3, {
460328
- headers,
460329
- params: { campaign },
460330
- timeout: 5000
460331
- });
460332
- return response.data;
460333
- }
460334
- function shouldCheckForPasses() {
460335
- return !!(getOauthAccountInfo()?.organizationUuid && isOrbitAISubscriber() && getSubscriptionType() === "max");
460336
- }
460337
- function checkCachedPassesEligibility() {
460338
- if (!shouldCheckForPasses()) {
460339
- return {
460340
- eligible: false,
460341
- needsRefresh: false,
460342
- hasCache: false
460343
- };
460344
- }
460345
- const orgId = getOauthAccountInfo()?.organizationUuid;
460346
- if (!orgId) {
460347
- return {
460348
- eligible: false,
460349
- needsRefresh: false,
460350
- hasCache: false
460351
- };
460352
- }
460353
- const config3 = getGlobalConfig();
460354
- const cachedEntry = config3.passesEligibilityCache?.[orgId];
460355
- if (!cachedEntry) {
460356
- return {
460357
- eligible: false,
460358
- needsRefresh: true,
460359
- hasCache: false
460360
- };
460361
- }
460362
- const { eligible: eligible2, timestamp } = cachedEntry;
460363
- const now2 = Date.now();
460364
- const needsRefresh = now2 - timestamp > CACHE_EXPIRATION_MS;
460365
- return {
460366
- eligible: eligible2,
460367
- needsRefresh,
460368
- hasCache: true
460369
- };
460370
- }
460371
- function formatCreditAmount(reward) {
460372
- const symbol2 = CURRENCY_SYMBOLS[reward.currency] ?? `${reward.currency} `;
460373
- const amount = reward.amount_minor_units / 100;
460374
- const formatted = amount % 1 === 0 ? amount.toString() : amount.toFixed(2);
460375
- return `${symbol2}${formatted}`;
460376
- }
460377
- function getCachedReferrerReward() {
460378
- const orgId = getOauthAccountInfo()?.organizationUuid;
460379
- if (!orgId)
460380
- return null;
460381
- const config3 = getGlobalConfig();
460382
- const cachedEntry = config3.passesEligibilityCache?.[orgId];
460383
- return cachedEntry?.referrer_reward ?? null;
460384
- }
460385
- async function fetchAndStorePassesEligibility() {
460386
- if (fetchInProgress) {
460387
- logForDebugging2("Passes: Reusing in-flight eligibility fetch");
460388
- return fetchInProgress;
460389
- }
460390
- const orgId = getOauthAccountInfo()?.organizationUuid;
460391
- if (!orgId) {
460392
- return null;
460393
- }
460394
- fetchInProgress = (async () => {
460395
- try {
460396
- const response = await fetchReferralEligibility();
460397
- const cacheEntry = {
460398
- ...response,
460399
- timestamp: Date.now()
460400
- };
460401
- saveGlobalConfig((current) => ({
460402
- ...current,
460403
- passesEligibilityCache: {
460404
- ...current.passesEligibilityCache,
460405
- [orgId]: cacheEntry
460406
- }
460407
- }));
460408
- logForDebugging2(`Passes eligibility cached for org ${orgId}: ${response.eligible}`);
460409
- return response;
460410
- } catch (error41) {
460411
- logForDebugging2("Failed to fetch and cache passes eligibility");
460412
- logError(error41);
460413
- return null;
460414
- } finally {
460415
- fetchInProgress = null;
460416
- }
460417
- })();
460418
- return fetchInProgress;
460419
- }
460420
- async function getCachedOrFetchPassesEligibility() {
460421
- if (!shouldCheckForPasses()) {
460422
- return null;
460423
- }
460424
- const orgId = getOauthAccountInfo()?.organizationUuid;
460425
- if (!orgId) {
460426
- return null;
460427
- }
460428
- const config3 = getGlobalConfig();
460429
- const cachedEntry = config3.passesEligibilityCache?.[orgId];
460430
- const now2 = Date.now();
460431
- if (!cachedEntry) {
460432
- logForDebugging2("Passes: No cache, fetching eligibility in background (command unavailable this session)");
460433
- fetchAndStorePassesEligibility();
460434
- return null;
460435
- }
460436
- if (now2 - cachedEntry.timestamp > CACHE_EXPIRATION_MS) {
460437
- logForDebugging2("Passes: Cache stale, returning cached data and refreshing in background");
460438
- fetchAndStorePassesEligibility();
460439
- const { timestamp: timestamp2, ...response2 } = cachedEntry;
460440
- return response2;
460441
- }
460442
- logForDebugging2("Passes: Using fresh cached eligibility data");
460443
- const { timestamp, ...response } = cachedEntry;
460444
- return response;
460445
- }
460446
- async function prefetchPassesEligibility() {
460447
- if (isEssentialTrafficOnly()) {
460448
- return;
460449
- }
460450
- getCachedOrFetchPassesEligibility();
460451
- }
460452
- var CACHE_EXPIRATION_MS, fetchInProgress = null, CURRENCY_SYMBOLS;
460453
- var init_referral = __esm(() => {
460454
- init_axios2();
460455
- init_oauth();
460456
- init_auth();
460457
- init_config();
460458
- init_debug();
460459
- init_log2();
460460
- init_api2();
460461
- CACHE_EXPIRATION_MS = 24 * 60 * 60 * 1000;
460462
- CURRENCY_SYMBOLS = {
460463
- USD: "$",
460464
- EUR: "€",
460465
- GBP: "£",
460466
- BRL: "R$",
460467
- CAD: "CA$",
460468
- AUD: "A$",
460469
- NZD: "NZ$",
460470
- SGD: "S$"
460471
- };
460472
- });
460473
-
460474
459792
  // src/services/tips/tipRegistry.ts
460475
459793
  async function isOfficialMarketplaceInstalled() {
460476
459794
  if (_isOfficialMarketplaceInstalledCache !== undefined) {
@@ -460532,9 +459850,7 @@ var init_tipRegistry = __esm(() => {
460532
459850
  init_fileHistory();
460533
459851
  init_settings2();
460534
459852
  init_terminalSetup();
460535
- init_DesktopUpsellStartup();
460536
459853
  init_color();
460537
- init_OverageCreditUpsell();
460538
459854
  init_shortcutFormat();
460539
459855
  init_prompt10();
460540
459856
  init_auth();
@@ -460551,8 +459867,6 @@ var init_tipRegistry = __esm(() => {
460551
459867
  init_marketplaceManager();
460552
459868
  init_officialMarketplace();
460553
459869
  init_sessionStorage();
460554
- init_overageCreditGrant();
460555
- init_referral();
460556
459870
  init_tipHistory();
460557
459871
  externalTips = [
460558
459872
  {
@@ -460744,18 +460058,6 @@ var init_tipRegistry = __esm(() => {
460744
460058
  return runningIDEs.length > 0;
460745
460059
  }
460746
460060
  },
460747
- {
460748
- id: "install-github-app",
460749
- content: async () => "Run /install-github-app to tag @orbit right from your Github issues and PRs",
460750
- cooldownSessions: 10,
460751
- isRelevant: async () => !getGlobalConfig().githubActionSetupCount
460752
- },
460753
- {
460754
- id: "install-slack-app",
460755
- content: async () => "Run /install-slack-app to use Orbit in Slack",
460756
- cooldownSessions: 10,
460757
- isRelevant: async () => !getGlobalConfig().slackAppInstallCount
460758
- },
460759
460061
  {
460760
460062
  id: "permissions",
460761
460063
  content: async () => "Use /permissions to pre-approve and pre-deny bash, edit, and MCP tools",
@@ -460791,7 +460093,7 @@ var init_tipRegistry = __esm(() => {
460791
460093
  },
460792
460094
  {
460793
460095
  id: "continue",
460794
- content: async () => "Run orbitcode --continue or orbitcode --resume to resume a conversation",
460096
+ content: async () => "Run orbit --continue or orbit --resume to resume a conversation",
460795
460097
  cooldownSessions: 10,
460796
460098
  isRelevant: async () => true
460797
460099
  },
@@ -460840,51 +460142,6 @@ var init_tipRegistry = __esm(() => {
460840
460142
  return config3.numStartups > 5;
460841
460143
  }
460842
460144
  },
460843
- {
460844
- id: "desktop-app",
460845
- content: async () => "Run Orbit AI locally or remotely using the Orbit desktop app: clau.de/desktop",
460846
- cooldownSessions: 15,
460847
- isRelevant: async () => getPlatform() !== "linux"
460848
- },
460849
- {
460850
- id: "desktop-shortcut",
460851
- content: async (ctx) => {
460852
- const blue2 = color("suggestion", ctx.theme);
460853
- return `Continue your session in Orbit AI Desktop with ${blue2("/desktop")}`;
460854
- },
460855
- cooldownSessions: 15,
460856
- isRelevant: async () => {
460857
- if (!getDesktopUpsellConfig().enable_shortcut_tip)
460858
- return false;
460859
- return process.platform === "darwin" || process.platform === "win32" && process.arch === "x64";
460860
- }
460861
- },
460862
- {
460863
- id: "web-app",
460864
- content: async () => "Run tasks in the cloud while you keep coding locally · clau.de/web",
460865
- cooldownSessions: 15,
460866
- isRelevant: async () => true
460867
- },
460868
- {
460869
- id: "mobile-app",
460870
- content: async () => "/mobile to use Orbit AI from the Orbit app on your phone",
460871
- cooldownSessions: 15,
460872
- isRelevant: async () => true
460873
- },
460874
- {
460875
- id: "opusplan-mode-reminder",
460876
- content: async () => `Your default model setting is Opus Plan Mode. Press ${getShortcutDisplay("chat:cycleMode", "Chat", "shift+tab")} twice to activate Plan Mode and plan with Orbit Opus.`,
460877
- cooldownSessions: 2,
460878
- async isRelevant() {
460879
- if (process.env.USER_TYPE === "ant")
460880
- return false;
460881
- const config3 = getGlobalConfig();
460882
- const modelSetting = getUserSpecifiedModelSetting();
460883
- const hasOpusPlanMode = modelSetting === "opusplan";
460884
- const daysSinceLastUse = config3.lastPlanModeUse ? (Date.now() - config3.lastPlanModeUse) / (1000 * 60 * 60 * 24) : Infinity;
460885
- return hasOpusPlanMode && daysSinceLastUse > 3;
460886
- }
460887
- },
460888
460145
  {
460889
460146
  id: "frontend-design-plugin",
460890
460147
  content: async (ctx) => {
@@ -460964,48 +460221,6 @@ ${blue2(`/plugin install vercel@${OFFICIAL_MARKETPLACE_NAME}`)}`;
460964
460221
  return false;
460965
460222
  return getFeatureValue_CACHED_MAY_BE_STALE("tengu_timber_lark", "off") !== "off";
460966
460223
  }
460967
- },
460968
- {
460969
- id: "guest-passes",
460970
- content: async (ctx) => {
460971
- const orbit = color("orbit", ctx.theme);
460972
- const reward = getCachedReferrerReward();
460973
- return reward ? `Share Orbit AI and earn ${orbit(formatCreditAmount(reward))} of extra usage · ${orbit("/passes")}` : `You have free guest passes to share · ${orbit("/passes")}`;
460974
- },
460975
- cooldownSessions: 3,
460976
- isRelevant: async () => {
460977
- const config3 = getGlobalConfig();
460978
- if (config3.hasVisitedPasses) {
460979
- return false;
460980
- }
460981
- const { eligible: eligible2 } = checkCachedPassesEligibility();
460982
- return eligible2;
460983
- }
460984
- },
460985
- {
460986
- id: "overage-credit",
460987
- content: async (ctx) => {
460988
- const orbit = color("orbit", ctx.theme);
460989
- const info = getCachedOverageCreditGrant();
460990
- const amount = info ? formatGrantAmount(info) : null;
460991
- if (!amount)
460992
- return "";
460993
- return `${orbit(`${amount} in extra usage, on us`)} · third-party apps · ${orbit("/extra-usage")}`;
460994
- },
460995
- cooldownSessions: 3,
460996
- isRelevant: async () => shouldShowOverageCreditUpsell()
460997
- },
460998
- {
460999
- id: "feedback-command",
461000
- content: async () => "Use /feedback to help us improve!",
461001
- cooldownSessions: 15,
461002
- async isRelevant() {
461003
- if (process.env.USER_TYPE === "ant") {
461004
- return false;
461005
- }
461006
- const config3 = getGlobalConfig();
461007
- return config3.numStartups > 5;
461008
- }
461009
460224
  }
461010
460225
  ];
461011
460226
  internalOnlyTips = process.env.USER_TYPE === "ant" ? [
@@ -461970,8 +461185,8 @@ var init_structuredIO = __esm(() => {
461970
461185
 
461971
461186
  // src/hooks/useFileHistorySnapshotInit.ts
461972
461187
  function useFileHistorySnapshotInit(initialFileHistorySnapshots, fileHistoryState, onUpdateState) {
461973
- const initialized5 = import_react276.useRef(false);
461974
- import_react276.useEffect(() => {
461188
+ const initialized5 = import_react274.useRef(false);
461189
+ import_react274.useEffect(() => {
461975
461190
  if (!fileHistoryEnabled() || initialized5.current) {
461976
461191
  return;
461977
461192
  }
@@ -461981,15 +461196,15 @@ function useFileHistorySnapshotInit(initialFileHistorySnapshots, fileHistoryStat
461981
461196
  }
461982
461197
  }, [fileHistoryState, initialFileHistorySnapshots, onUpdateState]);
461983
461198
  }
461984
- var import_react276;
461199
+ var import_react274;
461985
461200
  var init_useFileHistorySnapshotInit = __esm(() => {
461986
461201
  init_fileHistory();
461987
- import_react276 = __toESM(require_react(), 1);
461202
+ import_react274 = __toESM(require_react(), 1);
461988
461203
  });
461989
461204
 
461990
461205
  // src/components/permissions/SandboxPermissionRequest.tsx
461991
461206
  function SandboxPermissionRequest(t0) {
461992
- const $2 = import_react_compiler_runtime310.c(22);
461207
+ const $2 = import_react_compiler_runtime308.c(22);
461993
461208
  const {
461994
461209
  hostPattern: t1,
461995
461210
  onUserResponse
@@ -462051,10 +461266,10 @@ function SandboxPermissionRequest(t0) {
462051
461266
  let t5;
462052
461267
  if ($2[4] !== host) {
462053
461268
  t5 = !managedDomainsOnly ? [{
462054
- label: /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedText, {
461269
+ label: /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedText, {
462055
461270
  children: [
462056
461271
  "Yes, and don't ask again for ",
462057
- /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedText, {
461272
+ /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedText, {
462058
461273
  bold: true,
462059
461274
  children: host
462060
461275
  }, undefined, false, undefined, this)
@@ -462070,10 +461285,10 @@ function SandboxPermissionRequest(t0) {
462070
461285
  let t6;
462071
461286
  if ($2[6] === Symbol.for("react.memo_cache_sentinel")) {
462072
461287
  t6 = {
462073
- label: /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedText, {
461288
+ label: /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedText, {
462074
461289
  children: [
462075
461290
  "No, and tell Orbit what to do differently ",
462076
- /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedText, {
461291
+ /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedText, {
462077
461292
  bold: true,
462078
461293
  children: "(esc)"
462079
461294
  }, undefined, false, undefined, this)
@@ -462096,7 +461311,7 @@ function SandboxPermissionRequest(t0) {
462096
461311
  const options2 = t7;
462097
461312
  let t8;
462098
461313
  if ($2[9] === Symbol.for("react.memo_cache_sentinel")) {
462099
- t8 = /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedText, {
461314
+ t8 = /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedText, {
462100
461315
  dimColor: true,
462101
461316
  children: "Host:"
462102
461317
  }, undefined, false, undefined, this);
@@ -462106,10 +461321,10 @@ function SandboxPermissionRequest(t0) {
462106
461321
  }
462107
461322
  let t9;
462108
461323
  if ($2[10] !== host) {
462109
- t9 = /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedBox_default, {
461324
+ t9 = /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedBox_default, {
462110
461325
  children: [
462111
461326
  t8,
462112
- /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedText, {
461327
+ /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedText, {
462113
461328
  children: [
462114
461329
  " ",
462115
461330
  host
@@ -462124,9 +461339,9 @@ function SandboxPermissionRequest(t0) {
462124
461339
  }
462125
461340
  let t10;
462126
461341
  if ($2[12] === Symbol.for("react.memo_cache_sentinel")) {
462127
- t10 = /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedBox_default, {
461342
+ t10 = /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedBox_default, {
462128
461343
  marginTop: 1,
462129
- children: /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedText, {
461344
+ children: /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedText, {
462130
461345
  children: "Do you want to allow this connection?"
462131
461346
  }, undefined, false, undefined, this)
462132
461347
  }, undefined, false, undefined, this);
@@ -462149,8 +461364,8 @@ function SandboxPermissionRequest(t0) {
462149
461364
  }
462150
461365
  let t12;
462151
461366
  if ($2[15] !== onSelect || $2[16] !== options2 || $2[17] !== t11) {
462152
- t12 = /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedBox_default, {
462153
- children: /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(Select, {
461367
+ t12 = /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedBox_default, {
461368
+ children: /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(Select, {
462154
461369
  options: options2,
462155
461370
  onChange: onSelect,
462156
461371
  onCancel: t11
@@ -462165,9 +461380,9 @@ function SandboxPermissionRequest(t0) {
462165
461380
  }
462166
461381
  let t13;
462167
461382
  if ($2[19] !== t12 || $2[20] !== t9) {
462168
- t13 = /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(PermissionDialog, {
461383
+ t13 = /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(PermissionDialog, {
462169
461384
  title: "Network request outside of sandbox",
462170
- children: /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedBox_default, {
461385
+ children: /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedBox_default, {
462171
461386
  flexDirection: "column",
462172
461387
  paddingX: 2,
462173
461388
  paddingY: 1,
@@ -462186,14 +461401,14 @@ function SandboxPermissionRequest(t0) {
462186
461401
  }
462187
461402
  return t13;
462188
461403
  }
462189
- var import_react_compiler_runtime310, jsx_dev_runtime397;
461404
+ var import_react_compiler_runtime308, jsx_dev_runtime395;
462190
461405
  var init_SandboxPermissionRequest = __esm(() => {
462191
461406
  init_ink2();
462192
461407
  init_sandbox_adapter();
462193
461408
  init_select();
462194
461409
  init_PermissionDialog();
462195
- import_react_compiler_runtime310 = __toESM(require_dist3(), 1);
462196
- jsx_dev_runtime397 = __toESM(require_jsx_dev_runtime(), 1);
461410
+ import_react_compiler_runtime308 = __toESM(require_dist3(), 1);
461411
+ jsx_dev_runtime395 = __toESM(require_jsx_dev_runtime(), 1);
462197
461412
  });
462198
461413
 
462199
461414
  // src/components/SandboxViolationExpandedView.tsx
@@ -462205,7 +461420,7 @@ function formatTime(date6) {
462205
461420
  return `${h2}:${m}:${s}${ampm}`;
462206
461421
  }
462207
461422
  function SandboxViolationExpandedView() {
462208
- const $2 = import_react_compiler_runtime311.c(15);
461423
+ const $2 = import_react_compiler_runtime309.c(15);
462209
461424
  let t0;
462210
461425
  if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
462211
461426
  t0 = [];
@@ -462213,8 +461428,8 @@ function SandboxViolationExpandedView() {
462213
461428
  } else {
462214
461429
  t0 = $2[0];
462215
461430
  }
462216
- const [violations, setViolations] = import_react277.useState(t0);
462217
- const [totalCount, setTotalCount] = import_react277.useState(0);
461431
+ const [violations, setViolations] = import_react275.useState(t0);
461432
+ const [totalCount, setTotalCount] = import_react275.useState(0);
462218
461433
  let t1;
462219
461434
  let t2;
462220
461435
  if ($2[1] === Symbol.for("react.memo_cache_sentinel")) {
@@ -462239,7 +461454,7 @@ function SandboxViolationExpandedView() {
462239
461454
  t1 = $2[1];
462240
461455
  t2 = $2[2];
462241
461456
  }
462242
- import_react277.useEffect(t1, t2);
461457
+ import_react275.useEffect(t1, t2);
462243
461458
  if (!SandboxManager6.isSandboxingEnabled() || getPlatform() === "linux") {
462244
461459
  return null;
462245
461460
  }
@@ -462249,9 +461464,9 @@ function SandboxViolationExpandedView() {
462249
461464
  const t3 = totalCount === 1 ? "operation" : "operations";
462250
461465
  let t4;
462251
461466
  if ($2[3] !== t3 || $2[4] !== totalCount) {
462252
- t4 = /* @__PURE__ */ jsx_dev_runtime398.jsxDEV(ThemedBox_default, {
461467
+ t4 = /* @__PURE__ */ jsx_dev_runtime396.jsxDEV(ThemedBox_default, {
462253
461468
  marginLeft: 0,
462254
- children: /* @__PURE__ */ jsx_dev_runtime398.jsxDEV(ThemedText, {
461469
+ children: /* @__PURE__ */ jsx_dev_runtime396.jsxDEV(ThemedText, {
462255
461470
  color: "permission",
462256
461471
  children: [
462257
461472
  "⧈ Sandbox blocked ",
@@ -462270,7 +461485,7 @@ function SandboxViolationExpandedView() {
462270
461485
  }
462271
461486
  let t5;
462272
461487
  if ($2[6] !== violations) {
462273
- t5 = violations.map(_temp183);
461488
+ t5 = violations.map(_temp180);
462274
461489
  $2[6] = violations;
462275
461490
  $2[7] = t5;
462276
461491
  } else {
@@ -462279,9 +461494,9 @@ function SandboxViolationExpandedView() {
462279
461494
  const t6 = Math.min(10, violations.length);
462280
461495
  let t7;
462281
461496
  if ($2[8] !== t6 || $2[9] !== totalCount) {
462282
- t7 = /* @__PURE__ */ jsx_dev_runtime398.jsxDEV(ThemedBox_default, {
461497
+ t7 = /* @__PURE__ */ jsx_dev_runtime396.jsxDEV(ThemedBox_default, {
462283
461498
  paddingLeft: 2,
462284
- children: /* @__PURE__ */ jsx_dev_runtime398.jsxDEV(ThemedText, {
461499
+ children: /* @__PURE__ */ jsx_dev_runtime396.jsxDEV(ThemedText, {
462285
461500
  dimColor: true,
462286
461501
  children: [
462287
461502
  "… showing last ",
@@ -462299,7 +461514,7 @@ function SandboxViolationExpandedView() {
462299
461514
  }
462300
461515
  let t8;
462301
461516
  if ($2[11] !== t4 || $2[12] !== t5 || $2[13] !== t7) {
462302
- t8 = /* @__PURE__ */ jsx_dev_runtime398.jsxDEV(ThemedBox_default, {
461517
+ t8 = /* @__PURE__ */ jsx_dev_runtime396.jsxDEV(ThemedBox_default, {
462303
461518
  flexDirection: "column",
462304
461519
  marginTop: 1,
462305
461520
  children: [
@@ -462317,10 +461532,10 @@ function SandboxViolationExpandedView() {
462317
461532
  }
462318
461533
  return t8;
462319
461534
  }
462320
- function _temp183(v, i3) {
462321
- return /* @__PURE__ */ jsx_dev_runtime398.jsxDEV(ThemedBox_default, {
461535
+ function _temp180(v, i3) {
461536
+ return /* @__PURE__ */ jsx_dev_runtime396.jsxDEV(ThemedBox_default, {
462322
461537
  paddingLeft: 2,
462323
- children: /* @__PURE__ */ jsx_dev_runtime398.jsxDEV(ThemedText, {
461538
+ children: /* @__PURE__ */ jsx_dev_runtime396.jsxDEV(ThemedText, {
462324
461539
  dimColor: true,
462325
461540
  children: [
462326
461541
  formatTime(v.timestamp),
@@ -462331,19 +461546,19 @@ function _temp183(v, i3) {
462331
461546
  }, undefined, true, undefined, this)
462332
461547
  }, `${v.timestamp.getTime()}-${i3}`, false, undefined, this);
462333
461548
  }
462334
- var import_react_compiler_runtime311, import_react277, jsx_dev_runtime398;
461549
+ var import_react_compiler_runtime309, import_react275, jsx_dev_runtime396;
462335
461550
  var init_SandboxViolationExpandedView = __esm(() => {
462336
461551
  init_ink2();
462337
461552
  init_sandbox_adapter();
462338
461553
  init_platform();
462339
- import_react_compiler_runtime311 = __toESM(require_dist3(), 1);
462340
- import_react277 = __toESM(require_react(), 1);
462341
- jsx_dev_runtime398 = __toESM(require_jsx_dev_runtime(), 1);
461554
+ import_react_compiler_runtime309 = __toESM(require_dist3(), 1);
461555
+ import_react275 = __toESM(require_react(), 1);
461556
+ jsx_dev_runtime396 = __toESM(require_jsx_dev_runtime(), 1);
462342
461557
  });
462343
461558
 
462344
461559
  // src/hooks/notifs/useMcpConnectivityStatus.tsx
462345
461560
  function useMcpConnectivityStatus(t0) {
462346
- const $2 = import_react_compiler_runtime312.c(4);
461561
+ const $2 = import_react_compiler_runtime310.c(4);
462347
461562
  const {
462348
461563
  mcpClients: t1
462349
461564
  } = t0;
@@ -462359,8 +461574,8 @@ function useMcpConnectivityStatus(t0) {
462359
461574
  if (getIsRemoteMode()) {
462360
461575
  return;
462361
461576
  }
462362
- const failedLocalClients = mcpClients.filter(_temp185);
462363
- const failedOrbitAiClients = mcpClients.filter(_temp278);
461577
+ const failedLocalClients = mcpClients.filter(_temp181);
461578
+ const failedOrbitAiClients = mcpClients.filter(_temp276);
462364
461579
  const needsAuthLocalServers = mcpClients.filter(_temp349);
462365
461580
  const needsAuthOrbitAiServers = mcpClients.filter(_temp437);
462366
461581
  if (failedLocalClients.length === 0 && failedOrbitAiClients.length === 0 && needsAuthLocalServers.length === 0 && needsAuthOrbitAiServers.length === 0) {
@@ -462369,9 +461584,9 @@ function useMcpConnectivityStatus(t0) {
462369
461584
  if (failedLocalClients.length > 0) {
462370
461585
  addNotification({
462371
461586
  key: "mcp-failed",
462372
- jsx: /* @__PURE__ */ jsx_dev_runtime399.jsxDEV(jsx_dev_runtime399.Fragment, {
461587
+ jsx: /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(jsx_dev_runtime397.Fragment, {
462373
461588
  children: [
462374
- /* @__PURE__ */ jsx_dev_runtime399.jsxDEV(ThemedText, {
461589
+ /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedText, {
462375
461590
  color: "error",
462376
461591
  children: [
462377
461592
  failedLocalClients.length,
@@ -462381,7 +461596,7 @@ function useMcpConnectivityStatus(t0) {
462381
461596
  " failed"
462382
461597
  ]
462383
461598
  }, undefined, true, undefined, this),
462384
- /* @__PURE__ */ jsx_dev_runtime399.jsxDEV(ThemedText, {
461599
+ /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedText, {
462385
461600
  dimColor: true,
462386
461601
  children: " · /mcp"
462387
461602
  }, undefined, false, undefined, this)
@@ -462393,9 +461608,9 @@ function useMcpConnectivityStatus(t0) {
462393
461608
  if (failedOrbitAiClients.length > 0) {
462394
461609
  addNotification({
462395
461610
  key: "mcp-orbitai-failed",
462396
- jsx: /* @__PURE__ */ jsx_dev_runtime399.jsxDEV(jsx_dev_runtime399.Fragment, {
461611
+ jsx: /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(jsx_dev_runtime397.Fragment, {
462397
461612
  children: [
462398
- /* @__PURE__ */ jsx_dev_runtime399.jsxDEV(ThemedText, {
461613
+ /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedText, {
462399
461614
  color: "error",
462400
461615
  children: [
462401
461616
  failedOrbitAiClients.length,
@@ -462406,7 +461621,7 @@ function useMcpConnectivityStatus(t0) {
462406
461621
  "unavailable"
462407
461622
  ]
462408
461623
  }, undefined, true, undefined, this),
462409
- /* @__PURE__ */ jsx_dev_runtime399.jsxDEV(ThemedText, {
461624
+ /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedText, {
462410
461625
  dimColor: true,
462411
461626
  children: " · /mcp"
462412
461627
  }, undefined, false, undefined, this)
@@ -462418,9 +461633,9 @@ function useMcpConnectivityStatus(t0) {
462418
461633
  if (needsAuthLocalServers.length > 0) {
462419
461634
  addNotification({
462420
461635
  key: "mcp-needs-auth",
462421
- jsx: /* @__PURE__ */ jsx_dev_runtime399.jsxDEV(jsx_dev_runtime399.Fragment, {
461636
+ jsx: /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(jsx_dev_runtime397.Fragment, {
462422
461637
  children: [
462423
- /* @__PURE__ */ jsx_dev_runtime399.jsxDEV(ThemedText, {
461638
+ /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedText, {
462424
461639
  color: "warning",
462425
461640
  children: [
462426
461641
  needsAuthLocalServers.length,
@@ -462431,7 +461646,7 @@ function useMcpConnectivityStatus(t0) {
462431
461646
  "auth"
462432
461647
  ]
462433
461648
  }, undefined, true, undefined, this),
462434
- /* @__PURE__ */ jsx_dev_runtime399.jsxDEV(ThemedText, {
461649
+ /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedText, {
462435
461650
  dimColor: true,
462436
461651
  children: " · /mcp"
462437
461652
  }, undefined, false, undefined, this)
@@ -462443,9 +461658,9 @@ function useMcpConnectivityStatus(t0) {
462443
461658
  if (needsAuthOrbitAiServers.length > 0) {
462444
461659
  addNotification({
462445
461660
  key: "mcp-orbitai-needs-auth",
462446
- jsx: /* @__PURE__ */ jsx_dev_runtime399.jsxDEV(jsx_dev_runtime399.Fragment, {
461661
+ jsx: /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(jsx_dev_runtime397.Fragment, {
462447
461662
  children: [
462448
- /* @__PURE__ */ jsx_dev_runtime399.jsxDEV(ThemedText, {
461663
+ /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedText, {
462449
461664
  color: "warning",
462450
461665
  children: [
462451
461666
  needsAuthOrbitAiServers.length,
@@ -462456,7 +461671,7 @@ function useMcpConnectivityStatus(t0) {
462456
461671
  "auth"
462457
461672
  ]
462458
461673
  }, undefined, true, undefined, this),
462459
- /* @__PURE__ */ jsx_dev_runtime399.jsxDEV(ThemedText, {
461674
+ /* @__PURE__ */ jsx_dev_runtime397.jsxDEV(ThemedText, {
462460
461675
  dimColor: true,
462461
461676
  children: " · /mcp"
462462
461677
  }, undefined, false, undefined, this)
@@ -462478,7 +461693,7 @@ function useMcpConnectivityStatus(t0) {
462478
461693
  t2 = $2[2];
462479
461694
  t3 = $2[3];
462480
461695
  }
462481
- import_react278.useEffect(t2, t3);
461696
+ import_react276.useEffect(t2, t3);
462482
461697
  }
462483
461698
  function _temp437(client_2) {
462484
461699
  return client_2.type === "needs-auth" && client_2.config.type === "orbitai-proxy" && hasOrbitAiMcpEverConnected(client_2.name);
@@ -462486,22 +461701,22 @@ function _temp437(client_2) {
462486
461701
  function _temp349(client_1) {
462487
461702
  return client_1.type === "needs-auth" && client_1.config.type !== "orbitai-proxy";
462488
461703
  }
462489
- function _temp278(client_0) {
461704
+ function _temp276(client_0) {
462490
461705
  return client_0.type === "failed" && client_0.config.type === "orbitai-proxy" && hasOrbitAiMcpEverConnected(client_0.name);
462491
461706
  }
462492
- function _temp185(client) {
461707
+ function _temp181(client) {
462493
461708
  return client.type === "failed" && client.config.type !== "sse-ide" && client.config.type !== "ws-ide" && client.config.type !== "orbitai-proxy";
462494
461709
  }
462495
- var import_react_compiler_runtime312, import_react278, jsx_dev_runtime399, EMPTY_MCP_CLIENTS;
461710
+ var import_react_compiler_runtime310, import_react276, jsx_dev_runtime397, EMPTY_MCP_CLIENTS;
462496
461711
  var init_useMcpConnectivityStatus = __esm(() => {
462497
461712
  init_log2();
462498
461713
  init_notifications();
462499
461714
  init_state();
462500
461715
  init_ink2();
462501
461716
  init_orbitai();
462502
- import_react_compiler_runtime312 = __toESM(require_dist3(), 1);
462503
- import_react278 = __toESM(require_react(), 1);
462504
- jsx_dev_runtime399 = __toESM(require_jsx_dev_runtime(), 1);
461717
+ import_react_compiler_runtime310 = __toESM(require_dist3(), 1);
461718
+ import_react276 = __toESM(require_react(), 1);
461719
+ jsx_dev_runtime397 = __toESM(require_jsx_dev_runtime(), 1);
462505
461720
  EMPTY_MCP_CLIENTS = [];
462506
461721
  });
462507
461722
 
@@ -462510,9 +461725,9 @@ function useAutoModeUnavailableNotification() {
462510
461725
  const { addNotification } = useNotifications();
462511
461726
  const mode = useAppState((s) => s.toolPermissionContext.mode);
462512
461727
  const isAutoModeAvailable = useAppState((s) => s.toolPermissionContext.isAutoModeAvailable);
462513
- const shownRef = import_react279.useRef(false);
462514
- const prevModeRef = import_react279.useRef(mode);
462515
- import_react279.useEffect(() => {
461728
+ const shownRef = import_react277.useRef(false);
461729
+ const prevModeRef = import_react277.useRef(mode);
461730
+ import_react277.useEffect(() => {
462516
461731
  const prevMode = prevModeRef.current;
462517
461732
  prevModeRef.current = mode;
462518
461733
  if (true)
@@ -462536,24 +461751,24 @@ function useAutoModeUnavailableNotification() {
462536
461751
  });
462537
461752
  }, [mode, isAutoModeAvailable, addNotification]);
462538
461753
  }
462539
- var import_react279;
461754
+ var import_react277;
462540
461755
  var init_useAutoModeUnavailableNotification = __esm(() => {
462541
461756
  init_notifications();
462542
461757
  init_state();
462543
461758
  init_AppState();
462544
461759
  init_permissionSetup();
462545
461760
  init_settings2();
462546
- import_react279 = __toESM(require_react(), 1);
461761
+ import_react277 = __toESM(require_react(), 1);
462547
461762
  });
462548
461763
 
462549
461764
  // src/hooks/notifs/useLspInitializationNotification.tsx
462550
461765
  function useLspInitializationNotification() {
462551
- const $2 = import_react_compiler_runtime313.c(10);
461766
+ const $2 = import_react_compiler_runtime311.c(10);
462552
461767
  const {
462553
461768
  addNotification
462554
461769
  } = useNotifications();
462555
461770
  const setAppState = useSetAppState();
462556
- const [shouldPoll, setShouldPoll] = React134.useState(_temp186);
461771
+ const [shouldPoll, setShouldPoll] = React133.useState(_temp183);
462557
461772
  let t0;
462558
461773
  if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
462559
461774
  t0 = new Set;
@@ -462561,7 +461776,7 @@ function useLspInitializationNotification() {
462561
461776
  } else {
462562
461777
  t0 = $2[0];
462563
461778
  }
462564
- const notifiedErrorsRef = React134.useRef(t0);
461779
+ const notifiedErrorsRef = React133.useRef(t0);
462565
461780
  let t1;
462566
461781
  if ($2[1] !== addNotification || $2[2] !== setAppState) {
462567
461782
  t1 = (source, errorMessage4) => {
@@ -462572,7 +461787,7 @@ function useLspInitializationNotification() {
462572
461787
  notifiedErrorsRef.current.add(errorKey);
462573
461788
  logForDebugging2(`LSP error: ${source} - ${errorMessage4}`);
462574
461789
  setAppState((prev) => {
462575
- const existingKeys = new Set(prev.plugins.errors.map(_temp279));
461790
+ const existingKeys = new Set(prev.plugins.errors.map(_temp277));
462576
461791
  const stateErrorKey = `generic-error:${source}:${errorMessage4}`;
462577
461792
  if (existingKeys.has(stateErrorKey)) {
462578
461793
  return prev;
@@ -462592,9 +461807,9 @@ function useLspInitializationNotification() {
462592
461807
  const displayName = source.startsWith("plugin:") ? source.split(":")[1] ?? source : source;
462593
461808
  addNotification({
462594
461809
  key: `lsp-error-${source}`,
462595
- jsx: /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(jsx_dev_runtime400.Fragment, {
461810
+ jsx: /* @__PURE__ */ jsx_dev_runtime398.jsxDEV(jsx_dev_runtime398.Fragment, {
462596
461811
  children: [
462597
- /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedText, {
461812
+ /* @__PURE__ */ jsx_dev_runtime398.jsxDEV(ThemedText, {
462598
461813
  color: "error",
462599
461814
  children: [
462600
461815
  "LSP for ",
@@ -462602,7 +461817,7 @@ function useLspInitializationNotification() {
462602
461817
  " failed"
462603
461818
  ]
462604
461819
  }, undefined, true, undefined, this),
462605
- /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedText, {
461820
+ /* @__PURE__ */ jsx_dev_runtime398.jsxDEV(ThemedText, {
462606
461821
  dimColor: true,
462607
461822
  children: " · /plugin for details"
462608
461823
  }, undefined, false, undefined, this)
@@ -462672,18 +461887,18 @@ function useLspInitializationNotification() {
462672
461887
  t3 = $2[8];
462673
461888
  t4 = $2[9];
462674
461889
  }
462675
- React134.useEffect(t3, t4);
461890
+ React133.useEffect(t3, t4);
462676
461891
  }
462677
- function _temp279(e2) {
461892
+ function _temp277(e2) {
462678
461893
  if (e2.type === "generic-error") {
462679
461894
  return `generic-error:${e2.source}:${e2.error}`;
462680
461895
  }
462681
461896
  return `${e2.type}:${e2.source}`;
462682
461897
  }
462683
- function _temp186() {
461898
+ function _temp183() {
462684
461899
  return isEnvTruthy("true");
462685
461900
  }
462686
- var import_react_compiler_runtime313, React134, jsx_dev_runtime400, LSP_POLL_INTERVAL_MS = 5000;
461901
+ var import_react_compiler_runtime311, React133, jsx_dev_runtime398, LSP_POLL_INTERVAL_MS = 5000;
462687
461902
  var init_useLspInitializationNotification = __esm(() => {
462688
461903
  init_dist();
462689
461904
  init_state();
@@ -462693,9 +461908,9 @@ var init_useLspInitializationNotification = __esm(() => {
462693
461908
  init_AppState();
462694
461909
  init_debug();
462695
461910
  init_envUtils();
462696
- import_react_compiler_runtime313 = __toESM(require_dist3(), 1);
462697
- React134 = __toESM(require_react(), 1);
462698
- jsx_dev_runtime400 = __toESM(require_jsx_dev_runtime(), 1);
461911
+ import_react_compiler_runtime311 = __toESM(require_dist3(), 1);
461912
+ React133 = __toESM(require_react(), 1);
461913
+ jsx_dev_runtime398 = __toESM(require_jsx_dev_runtime(), 1);
462699
461914
  });
462700
461915
 
462701
461916
  // src/utils/binaryCheck.ts
@@ -462906,9 +462121,9 @@ var init_lspRecommendation = __esm(() => {
462906
462121
 
462907
462122
  // src/hooks/usePluginRecommendationBase.tsx
462908
462123
  function usePluginRecommendationBase() {
462909
- const $2 = import_react_compiler_runtime314.c(6);
462910
- const [recommendation, setRecommendation] = React135.useState(null);
462911
- const isCheckingRef = React135.useRef(false);
462124
+ const $2 = import_react_compiler_runtime312.c(6);
462125
+ const [recommendation, setRecommendation] = React134.useState(null);
462126
+ const isCheckingRef = React134.useRef(false);
462912
462127
  let t0;
462913
462128
  if ($2[0] !== recommendation) {
462914
462129
  t0 = (resolve39) => {
@@ -462968,7 +462183,7 @@ async function installPluginAndNotify(pluginId, pluginName, keyPrefix, addNotifi
462968
462183
  await install(pluginData);
462969
462184
  addNotification({
462970
462185
  key: `${keyPrefix}-installed`,
462971
- jsx: /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedText, {
462186
+ jsx: /* @__PURE__ */ jsx_dev_runtime399.jsxDEV(ThemedText, {
462972
462187
  color: "success",
462973
462188
  children: [
462974
462189
  figures_default.tick,
@@ -462984,7 +462199,7 @@ async function installPluginAndNotify(pluginId, pluginName, keyPrefix, addNotifi
462984
462199
  logError(error41);
462985
462200
  addNotification({
462986
462201
  key: `${keyPrefix}-install-failed`,
462987
- jsx: /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedText, {
462202
+ jsx: /* @__PURE__ */ jsx_dev_runtime399.jsxDEV(ThemedText, {
462988
462203
  color: "error",
462989
462204
  children: [
462990
462205
  "Failed to install ",
@@ -462996,23 +462211,23 @@ async function installPluginAndNotify(pluginId, pluginName, keyPrefix, addNotifi
462996
462211
  });
462997
462212
  }
462998
462213
  }
462999
- var import_react_compiler_runtime314, React135, jsx_dev_runtime401;
462214
+ var import_react_compiler_runtime312, React134, jsx_dev_runtime399;
463000
462215
  var init_usePluginRecommendationBase = __esm(() => {
463001
462216
  init_figures();
463002
462217
  init_state();
463003
462218
  init_ink2();
463004
462219
  init_log2();
463005
462220
  init_marketplaceManager();
463006
- import_react_compiler_runtime314 = __toESM(require_dist3(), 1);
463007
- React135 = __toESM(require_react(), 1);
463008
- jsx_dev_runtime401 = __toESM(require_jsx_dev_runtime(), 1);
462221
+ import_react_compiler_runtime312 = __toESM(require_dist3(), 1);
462222
+ React134 = __toESM(require_react(), 1);
462223
+ jsx_dev_runtime399 = __toESM(require_jsx_dev_runtime(), 1);
463009
462224
  });
463010
462225
 
463011
462226
  // src/hooks/useLspPluginRecommendation.tsx
463012
- import { extname as extname13, join as join123 } from "path";
462227
+ import { extname as extname13, join as join122 } from "path";
463013
462228
  function useLspPluginRecommendation() {
463014
- const $2 = import_react_compiler_runtime315.c(12);
463015
- const trackedFiles = useAppState(_temp187);
462229
+ const $2 = import_react_compiler_runtime313.c(12);
462230
+ const trackedFiles = useAppState(_temp185);
463016
462231
  const {
463017
462232
  addNotification
463018
462233
  } = useNotifications();
@@ -463023,7 +462238,7 @@ function useLspPluginRecommendation() {
463023
462238
  } else {
463024
462239
  t0 = $2[0];
463025
462240
  }
463026
- const checkedFilesRef = React136.useRef(t0);
462241
+ const checkedFilesRef = React135.useRef(t0);
463027
462242
  const {
463028
462243
  recommendation,
463029
462244
  clearRecommendation,
@@ -463076,7 +462291,7 @@ function useLspPluginRecommendation() {
463076
462291
  t1 = $2[3];
463077
462292
  t2 = $2[4];
463078
462293
  }
463079
- React136.useEffect(t1, t2);
462294
+ React135.useEffect(t1, t2);
463080
462295
  let t3;
463081
462296
  if ($2[5] !== addNotification || $2[6] !== clearRecommendation || $2[7] !== recommendation) {
463082
462297
  t3 = (response) => {
@@ -463094,7 +462309,7 @@ function useLspPluginRecommendation() {
463094
462309
  case "yes": {
463095
462310
  installPluginAndNotify(pluginId, pluginName, "lsp-plugin", addNotification, async (pluginData) => {
463096
462311
  logForDebugging2(`[useLspPluginRecommendation] Installing plugin: ${pluginId}`);
463097
- const localSourcePath = typeof pluginData.entry.source === "string" ? join123(pluginData.marketplaceInstallLocation, pluginData.entry.source) : undefined;
462312
+ const localSourcePath = typeof pluginData.entry.source === "string" ? join122(pluginData.marketplaceInstallLocation, pluginData.entry.source) : undefined;
463098
462313
  await cacheAndRegisterPlugin(pluginId, pluginData.entry, "user", undefined, localSourcePath);
463099
462314
  const settings = getSettingsForSource("userSettings");
463100
462315
  updateSettingsForSource("userSettings", {
@@ -463120,7 +462335,7 @@ function useLspPluginRecommendation() {
463120
462335
  break bb60;
463121
462336
  }
463122
462337
  case "disable": {
463123
- saveGlobalConfig(_temp280);
462338
+ saveGlobalConfig(_temp278);
463124
462339
  }
463125
462340
  }
463126
462341
  clearRecommendation();
@@ -463147,7 +462362,7 @@ function useLspPluginRecommendation() {
463147
462362
  }
463148
462363
  return t4;
463149
462364
  }
463150
- function _temp280(current) {
462365
+ function _temp278(current) {
463151
462366
  if (current.lspRecommendationDisabled) {
463152
462367
  return current;
463153
462368
  }
@@ -463156,10 +462371,10 @@ function _temp280(current) {
463156
462371
  lspRecommendationDisabled: true
463157
462372
  };
463158
462373
  }
463159
- function _temp187(s) {
462374
+ function _temp185(s) {
463160
462375
  return s.fileHistory.trackedFiles;
463161
462376
  }
463162
- var import_react_compiler_runtime315, React136, TIMEOUT_THRESHOLD_MS = 28000;
462377
+ var import_react_compiler_runtime313, React135, TIMEOUT_THRESHOLD_MS = 28000;
463163
462378
  var init_useLspPluginRecommendation = __esm(() => {
463164
462379
  init_state();
463165
462380
  init_notifications();
@@ -463171,8 +462386,8 @@ var init_useLspPluginRecommendation = __esm(() => {
463171
462386
  init_pluginInstallationHelpers();
463172
462387
  init_settings2();
463173
462388
  init_usePluginRecommendationBase();
463174
- import_react_compiler_runtime315 = __toESM(require_dist3(), 1);
463175
- React136 = __toESM(require_react(), 1);
462389
+ import_react_compiler_runtime313 = __toESM(require_dist3(), 1);
462390
+ React135 = __toESM(require_react(), 1);
463176
462391
  });
463177
462392
 
463178
462393
  // src/components/LspRecommendation/LspRecommendationMenu.tsx
@@ -463182,9 +462397,9 @@ function LspRecommendationMenu({
463182
462397
  fileExtension: fileExtension2,
463183
462398
  onResponse
463184
462399
  }) {
463185
- const onResponseRef = React137.useRef(onResponse);
462400
+ const onResponseRef = React136.useRef(onResponse);
463186
462401
  onResponseRef.current = onResponse;
463187
- React137.useEffect(() => {
462402
+ React136.useEffect(() => {
463188
462403
  const timeoutId = setTimeout((ref) => ref.current("no"), AUTO_DISMISS_MS2, onResponseRef);
463189
462404
  return () => clearTimeout(timeoutId);
463190
462405
  }, []);
@@ -463205,10 +462420,10 @@ function LspRecommendationMenu({
463205
462420
  }
463206
462421
  }
463207
462422
  const options2 = [{
463208
- label: /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedText, {
462423
+ label: /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedText, {
463209
462424
  children: [
463210
462425
  "Yes, install ",
463211
- /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedText, {
462426
+ /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedText, {
463212
462427
  bold: true,
463213
462428
  children: pluginName
463214
462429
  }, undefined, false, undefined, this)
@@ -463219,10 +462434,10 @@ function LspRecommendationMenu({
463219
462434
  label: "No, not now",
463220
462435
  value: "no"
463221
462436
  }, {
463222
- label: /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedText, {
462437
+ label: /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedText, {
463223
462438
  children: [
463224
462439
  "Never for ",
463225
- /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedText, {
462440
+ /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedText, {
463226
462441
  bold: true,
463227
462442
  children: pluginName
463228
462443
  }, undefined, false, undefined, this)
@@ -463233,27 +462448,27 @@ function LspRecommendationMenu({
463233
462448
  label: "Disable all LSP recommendations",
463234
462449
  value: "disable"
463235
462450
  }];
463236
- return /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(PermissionDialog, {
462451
+ return /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(PermissionDialog, {
463237
462452
  title: "LSP Plugin Recommendation",
463238
- children: /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedBox_default, {
462453
+ children: /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedBox_default, {
463239
462454
  flexDirection: "column",
463240
462455
  paddingX: 2,
463241
462456
  paddingY: 1,
463242
462457
  children: [
463243
- /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedBox_default, {
462458
+ /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedBox_default, {
463244
462459
  marginBottom: 1,
463245
- children: /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedText, {
462460
+ children: /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedText, {
463246
462461
  dimColor: true,
463247
462462
  children: "LSP provides code intelligence like go-to-definition and error checking"
463248
462463
  }, undefined, false, undefined, this)
463249
462464
  }, undefined, false, undefined, this),
463250
- /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedBox_default, {
462465
+ /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedBox_default, {
463251
462466
  children: [
463252
- /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedText, {
462467
+ /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedText, {
463253
462468
  dimColor: true,
463254
462469
  children: "Plugin:"
463255
462470
  }, undefined, false, undefined, this),
463256
- /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedText, {
462471
+ /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedText, {
463257
462472
  children: [
463258
462473
  " ",
463259
462474
  pluginName
@@ -463261,19 +462476,19 @@ function LspRecommendationMenu({
463261
462476
  }, undefined, true, undefined, this)
463262
462477
  ]
463263
462478
  }, undefined, true, undefined, this),
463264
- pluginDescription && /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedBox_default, {
463265
- children: /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedText, {
462479
+ pluginDescription && /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedBox_default, {
462480
+ children: /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedText, {
463266
462481
  dimColor: true,
463267
462482
  children: pluginDescription
463268
462483
  }, undefined, false, undefined, this)
463269
462484
  }, undefined, false, undefined, this),
463270
- /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedBox_default, {
462485
+ /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedBox_default, {
463271
462486
  children: [
463272
- /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedText, {
462487
+ /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedText, {
463273
462488
  dimColor: true,
463274
462489
  children: "Triggered by:"
463275
462490
  }, undefined, false, undefined, this),
463276
- /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedText, {
462491
+ /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedText, {
463277
462492
  children: [
463278
462493
  " ",
463279
462494
  fileExtension2,
@@ -463282,14 +462497,14 @@ function LspRecommendationMenu({
463282
462497
  }, undefined, true, undefined, this)
463283
462498
  ]
463284
462499
  }, undefined, true, undefined, this),
463285
- /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedBox_default, {
462500
+ /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedBox_default, {
463286
462501
  marginTop: 1,
463287
- children: /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedText, {
462502
+ children: /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedText, {
463288
462503
  children: "Would you like to install this LSP plugin?"
463289
462504
  }, undefined, false, undefined, this)
463290
462505
  }, undefined, false, undefined, this),
463291
- /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedBox_default, {
463292
- children: /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(Select, {
462506
+ /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(ThemedBox_default, {
462507
+ children: /* @__PURE__ */ jsx_dev_runtime400.jsxDEV(Select, {
463293
462508
  options: options2,
463294
462509
  onChange: onSelect,
463295
462510
  onCancel: () => onResponse("no")
@@ -463299,19 +462514,19 @@ function LspRecommendationMenu({
463299
462514
  }, undefined, true, undefined, this)
463300
462515
  }, undefined, false, undefined, this);
463301
462516
  }
463302
- var React137, jsx_dev_runtime402, AUTO_DISMISS_MS2 = 30000;
462517
+ var React136, jsx_dev_runtime400, AUTO_DISMISS_MS2 = 30000;
463303
462518
  var init_LspRecommendationMenu = __esm(() => {
463304
462519
  init_ink2();
463305
462520
  init_select();
463306
462521
  init_PermissionDialog();
463307
- React137 = __toESM(require_react(), 1);
463308
- jsx_dev_runtime402 = __toESM(require_jsx_dev_runtime(), 1);
462522
+ React136 = __toESM(require_react(), 1);
462523
+ jsx_dev_runtime400 = __toESM(require_jsx_dev_runtime(), 1);
463309
462524
  });
463310
462525
 
463311
462526
  // src/hooks/useOrbitCodeHintRecommendation.tsx
463312
462527
  function useOrbitCodeHintRecommendation() {
463313
- const $2 = import_react_compiler_runtime316.c(11);
463314
- const pendingHint2 = React138.useSyncExternalStore(subscribeToPendingHint, getPendingHintSnapshot);
462528
+ const $2 = import_react_compiler_runtime314.c(11);
462529
+ const pendingHint2 = React137.useSyncExternalStore(subscribeToPendingHint, getPendingHintSnapshot);
463315
462530
  const {
463316
462531
  addNotification
463317
462532
  } = useNotifications();
@@ -463348,7 +462563,7 @@ function useOrbitCodeHintRecommendation() {
463348
462563
  t0 = $2[2];
463349
462564
  t1 = $2[3];
463350
462565
  }
463351
- React138.useEffect(t0, t1);
462566
+ React137.useEffect(t0, t1);
463352
462567
  let t2;
463353
462568
  if ($2[4] !== addNotification || $2[5] !== clearRecommendation || $2[6] !== recommendation) {
463354
462569
  t2 = (response) => {
@@ -463413,7 +462628,7 @@ function useOrbitCodeHintRecommendation() {
463413
462628
  }
463414
462629
  return t3;
463415
462630
  }
463416
- var import_react_compiler_runtime316, React138;
462631
+ var import_react_compiler_runtime314, React137;
463417
462632
  var init_useOrbitCodeHintRecommendation = __esm(() => {
463418
462633
  init_notifications();
463419
462634
  init_orbitCodeHints();
@@ -463421,8 +462636,8 @@ var init_useOrbitCodeHintRecommendation = __esm(() => {
463421
462636
  init_hintRecommendation();
463422
462637
  init_pluginInstallationHelpers();
463423
462638
  init_usePluginRecommendationBase();
463424
- import_react_compiler_runtime316 = __toESM(require_dist3(), 1);
463425
- React138 = __toESM(require_react(), 1);
462639
+ import_react_compiler_runtime314 = __toESM(require_dist3(), 1);
462640
+ React137 = __toESM(require_react(), 1);
463426
462641
  });
463427
462642
 
463428
462643
  // src/components/OrbitCodeHint/PluginHintMenu.tsx
@@ -463433,9 +462648,9 @@ function PluginHintMenu({
463433
462648
  sourceCommand,
463434
462649
  onResponse
463435
462650
  }) {
463436
- const onResponseRef = React139.useRef(onResponse);
462651
+ const onResponseRef = React138.useRef(onResponse);
463437
462652
  onResponseRef.current = onResponse;
463438
- React139.useEffect(() => {
462653
+ React138.useEffect(() => {
463439
462654
  const timeoutId = setTimeout((ref) => ref.current("no"), AUTO_DISMISS_MS3, onResponseRef);
463440
462655
  return () => clearTimeout(timeoutId);
463441
462656
  }, []);
@@ -463452,10 +462667,10 @@ function PluginHintMenu({
463452
462667
  }
463453
462668
  }
463454
462669
  const options2 = [{
463455
- label: /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedText, {
462670
+ label: /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedText, {
463456
462671
  children: [
463457
462672
  "Yes, install ",
463458
- /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedText, {
462673
+ /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedText, {
463459
462674
  bold: true,
463460
462675
  children: pluginName
463461
462676
  }, undefined, false, undefined, this)
@@ -463469,20 +462684,20 @@ function PluginHintMenu({
463469
462684
  label: "No, and don't show plugin installation hints again",
463470
462685
  value: "disable"
463471
462686
  }];
463472
- return /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(PermissionDialog, {
462687
+ return /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(PermissionDialog, {
463473
462688
  title: "Plugin Recommendation",
463474
- children: /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedBox_default, {
462689
+ children: /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedBox_default, {
463475
462690
  flexDirection: "column",
463476
462691
  paddingX: 2,
463477
462692
  paddingY: 1,
463478
462693
  children: [
463479
- /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedBox_default, {
462694
+ /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedBox_default, {
463480
462695
  marginBottom: 1,
463481
- children: /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedText, {
462696
+ children: /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedText, {
463482
462697
  dimColor: true,
463483
462698
  children: [
463484
462699
  "The ",
463485
- /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedText, {
462700
+ /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedText, {
463486
462701
  bold: true,
463487
462702
  children: sourceCommand
463488
462703
  }, undefined, false, undefined, this),
@@ -463490,13 +462705,13 @@ function PluginHintMenu({
463490
462705
  ]
463491
462706
  }, undefined, true, undefined, this)
463492
462707
  }, undefined, false, undefined, this),
463493
- /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedBox_default, {
462708
+ /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedBox_default, {
463494
462709
  children: [
463495
- /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedText, {
462710
+ /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedText, {
463496
462711
  dimColor: true,
463497
462712
  children: "Plugin:"
463498
462713
  }, undefined, false, undefined, this),
463499
- /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedText, {
462714
+ /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedText, {
463500
462715
  children: [
463501
462716
  " ",
463502
462717
  pluginName
@@ -463504,13 +462719,13 @@ function PluginHintMenu({
463504
462719
  }, undefined, true, undefined, this)
463505
462720
  ]
463506
462721
  }, undefined, true, undefined, this),
463507
- /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedBox_default, {
462722
+ /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedBox_default, {
463508
462723
  children: [
463509
- /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedText, {
462724
+ /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedText, {
463510
462725
  dimColor: true,
463511
462726
  children: "Marketplace:"
463512
462727
  }, undefined, false, undefined, this),
463513
- /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedText, {
462728
+ /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedText, {
463514
462729
  children: [
463515
462730
  " ",
463516
462731
  marketplaceName
@@ -463518,20 +462733,20 @@ function PluginHintMenu({
463518
462733
  }, undefined, true, undefined, this)
463519
462734
  ]
463520
462735
  }, undefined, true, undefined, this),
463521
- pluginDescription && /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedBox_default, {
463522
- children: /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedText, {
462736
+ pluginDescription && /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedBox_default, {
462737
+ children: /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedText, {
463523
462738
  dimColor: true,
463524
462739
  children: pluginDescription
463525
462740
  }, undefined, false, undefined, this)
463526
462741
  }, undefined, false, undefined, this),
463527
- /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedBox_default, {
462742
+ /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedBox_default, {
463528
462743
  marginTop: 1,
463529
- children: /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedText, {
462744
+ children: /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedText, {
463530
462745
  children: "Would you like to install it?"
463531
462746
  }, undefined, false, undefined, this)
463532
462747
  }, undefined, false, undefined, this),
463533
- /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedBox_default, {
463534
- children: /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(Select, {
462748
+ /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(ThemedBox_default, {
462749
+ children: /* @__PURE__ */ jsx_dev_runtime401.jsxDEV(Select, {
463535
462750
  options: options2,
463536
462751
  onChange: onSelect,
463537
462752
  onCancel: () => onResponse("no")
@@ -463541,13 +462756,577 @@ function PluginHintMenu({
463541
462756
  }, undefined, true, undefined, this)
463542
462757
  }, undefined, false, undefined, this);
463543
462758
  }
463544
- var React139, jsx_dev_runtime403, AUTO_DISMISS_MS3 = 30000;
462759
+ var React138, jsx_dev_runtime401, AUTO_DISMISS_MS3 = 30000;
463545
462760
  var init_PluginHintMenu = __esm(() => {
463546
462761
  init_ink2();
463547
462762
  init_select();
463548
462763
  init_PermissionDialog();
463549
- React139 = __toESM(require_react(), 1);
462764
+ React138 = __toESM(require_react(), 1);
462765
+ jsx_dev_runtime401 = __toESM(require_jsx_dev_runtime(), 1);
462766
+ });
462767
+
462768
+ // src/utils/desktopDeepLink.ts
462769
+ import { readdir as readdir26 } from "fs/promises";
462770
+ import { join as join123 } from "path";
462771
+ function isDevMode() {
462772
+ if (true) {
462773
+ return true;
462774
+ }
462775
+ const pathsToCheck = [process.argv[1] || "", process.execPath || ""];
462776
+ const buildDirs = [
462777
+ "/build-ant/",
462778
+ "/build-ant-native/",
462779
+ "/build-external/",
462780
+ "/build-external-native/"
462781
+ ];
462782
+ return pathsToCheck.some((p) => buildDirs.some((dir) => p.includes(dir)));
462783
+ }
462784
+ function buildDesktopDeepLink(sessionId) {
462785
+ const protocol = isDevMode() ? "orbit-dev" : "orbit";
462786
+ const url3 = new URL(`${protocol}://resume`);
462787
+ url3.searchParams.set("session", sessionId);
462788
+ url3.searchParams.set("cwd", getCwd());
462789
+ return url3.toString();
462790
+ }
462791
+ async function isDesktopInstalled() {
462792
+ if (isDevMode()) {
462793
+ return true;
462794
+ }
462795
+ const platform6 = process.platform;
462796
+ if (platform6 === "darwin") {
462797
+ return pathExists("/Applications/Orbit.app");
462798
+ } else if (platform6 === "linux") {
462799
+ const { code, stdout } = await execFileNoThrow("xdg-mime", [
462800
+ "query",
462801
+ "default",
462802
+ "x-scheme-handler/orbit"
462803
+ ]);
462804
+ return code === 0 && stdout.trim().length > 0;
462805
+ } else if (platform6 === "win32") {
462806
+ const { code } = await execFileNoThrow("reg", [
462807
+ "query",
462808
+ "HKEY_CLASSES_ROOT\\orbit",
462809
+ "/ve"
462810
+ ]);
462811
+ return code === 0;
462812
+ }
462813
+ return false;
462814
+ }
462815
+ async function getDesktopVersion() {
462816
+ const platform6 = process.platform;
462817
+ if (platform6 === "darwin") {
462818
+ const { code, stdout } = await execFileNoThrow("defaults", [
462819
+ "read",
462820
+ "/Applications/Orbit.app/Contents/Info.plist",
462821
+ "CFBundleShortVersionString"
462822
+ ]);
462823
+ if (code !== 0) {
462824
+ return null;
462825
+ }
462826
+ const version2 = stdout.trim();
462827
+ return version2.length > 0 ? version2 : null;
462828
+ } else if (platform6 === "win32") {
462829
+ const localAppData = process.env.LOCALAPPDATA;
462830
+ if (!localAppData) {
462831
+ return null;
462832
+ }
462833
+ const installDir = join123(localAppData, "AnthropicOrbit");
462834
+ try {
462835
+ const entries = await readdir26(installDir);
462836
+ const versions2 = entries.filter((e2) => e2.startsWith("app-")).map((e2) => e2.slice(4)).filter((v) => import_semver11.coerce(v) !== null).sort((a2, b) => {
462837
+ const ca = import_semver11.coerce(a2);
462838
+ const cb = import_semver11.coerce(b);
462839
+ return ca.compare(cb);
462840
+ });
462841
+ return versions2.length > 0 ? versions2[versions2.length - 1] : null;
462842
+ } catch {
462843
+ return null;
462844
+ }
462845
+ }
462846
+ return null;
462847
+ }
462848
+ async function getDesktopInstallStatus() {
462849
+ const installed = await isDesktopInstalled();
462850
+ if (!installed) {
462851
+ return { status: "not-installed" };
462852
+ }
462853
+ let version2;
462854
+ try {
462855
+ version2 = await getDesktopVersion();
462856
+ } catch {
462857
+ return { status: "ready", version: "unknown" };
462858
+ }
462859
+ if (!version2) {
462860
+ return { status: "ready", version: "unknown" };
462861
+ }
462862
+ const coerced = import_semver11.coerce(version2);
462863
+ if (!coerced || !gte(coerced.version, MIN_DESKTOP_VERSION)) {
462864
+ return { status: "version-too-old", version: version2 };
462865
+ }
462866
+ return { status: "ready", version: version2 };
462867
+ }
462868
+ async function openDeepLink(deepLinkUrl) {
462869
+ const platform6 = process.platform;
462870
+ logForDebugging2(`Opening deep link: ${deepLinkUrl}`);
462871
+ if (platform6 === "darwin") {
462872
+ if (isDevMode()) {
462873
+ const { code: code2 } = await execFileNoThrow("osascript", [
462874
+ "-e",
462875
+ `tell application "Electron" to open location "${deepLinkUrl}"`
462876
+ ]);
462877
+ return code2 === 0;
462878
+ }
462879
+ const { code } = await execFileNoThrow("open", [deepLinkUrl]);
462880
+ return code === 0;
462881
+ } else if (platform6 === "linux") {
462882
+ const { code } = await execFileNoThrow("xdg-open", [deepLinkUrl]);
462883
+ return code === 0;
462884
+ } else if (platform6 === "win32") {
462885
+ const { code } = await execFileNoThrow("cmd", [
462886
+ "/c",
462887
+ "start",
462888
+ "",
462889
+ deepLinkUrl
462890
+ ]);
462891
+ return code === 0;
462892
+ }
462893
+ return false;
462894
+ }
462895
+ async function openCurrentSessionInDesktop() {
462896
+ const sessionId = getSessionId();
462897
+ const installed = await isDesktopInstalled();
462898
+ if (!installed) {
462899
+ return {
462900
+ success: false,
462901
+ error: "Orbit Desktop is not installed. Install it from https://orbit.ai/download"
462902
+ };
462903
+ }
462904
+ const deepLinkUrl = buildDesktopDeepLink(sessionId);
462905
+ const opened = await openDeepLink(deepLinkUrl);
462906
+ if (!opened) {
462907
+ return {
462908
+ success: false,
462909
+ error: "Failed to open Orbit Desktop. Please try opening it manually.",
462910
+ deepLinkUrl
462911
+ };
462912
+ }
462913
+ return { success: true, deepLinkUrl };
462914
+ }
462915
+ var import_semver11, MIN_DESKTOP_VERSION = "1.1.2396";
462916
+ var init_desktopDeepLink = __esm(() => {
462917
+ init_state();
462918
+ init_cwd();
462919
+ init_debug();
462920
+ init_execFileNoThrow();
462921
+ init_file();
462922
+ import_semver11 = __toESM(require_semver2(), 1);
462923
+ });
462924
+
462925
+ // src/components/DesktopHandoff.tsx
462926
+ function getDownloadUrl() {
462927
+ switch (process.platform) {
462928
+ case "win32":
462929
+ return "https://orbit.ai/api/desktop/win32/x64/exe/latest/redirect";
462930
+ default:
462931
+ return "https://orbit.ai/api/desktop/darwin/universal/dmg/latest/redirect";
462932
+ }
462933
+ }
462934
+ function DesktopHandoff(t0) {
462935
+ const $2 = import_react_compiler_runtime315.c(20);
462936
+ const {
462937
+ onDone
462938
+ } = t0;
462939
+ const [state2, setState] = import_react278.useState("checking");
462940
+ const [error41, setError] = import_react278.useState(null);
462941
+ const [downloadMessage, setDownloadMessage] = import_react278.useState("");
462942
+ let t1;
462943
+ if ($2[0] !== error41 || $2[1] !== onDone || $2[2] !== state2) {
462944
+ t1 = (input) => {
462945
+ if (state2 === "error") {
462946
+ onDone(error41 ?? "Unknown error", {
462947
+ display: "system"
462948
+ });
462949
+ return;
462950
+ }
462951
+ if (state2 === "prompt-download") {
462952
+ if (input === "y" || input === "Y") {
462953
+ openBrowser(getDownloadUrl()).catch(_temp186);
462954
+ onDone(`Starting download. Re-run /desktop once you’ve installed the app.
462955
+ Learn more at ${DESKTOP_DOCS_URL}`, {
462956
+ display: "system"
462957
+ });
462958
+ } else {
462959
+ if (input === "n" || input === "N") {
462960
+ onDone(`The desktop app is required for /desktop. Learn more at ${DESKTOP_DOCS_URL}`, {
462961
+ display: "system"
462962
+ });
462963
+ }
462964
+ }
462965
+ }
462966
+ };
462967
+ $2[0] = error41;
462968
+ $2[1] = onDone;
462969
+ $2[2] = state2;
462970
+ $2[3] = t1;
462971
+ } else {
462972
+ t1 = $2[3];
462973
+ }
462974
+ use_input_default(t1);
462975
+ let t2;
462976
+ let t3;
462977
+ if ($2[4] !== onDone) {
462978
+ t2 = () => {
462979
+ const performHandoff = async function performHandoff2() {
462980
+ setState("checking");
462981
+ const installStatus = await getDesktopInstallStatus();
462982
+ if (installStatus.status === "not-installed") {
462983
+ setDownloadMessage("Orbit Desktop is not installed.");
462984
+ setState("prompt-download");
462985
+ return;
462986
+ }
462987
+ if (installStatus.status === "version-too-old") {
462988
+ setDownloadMessage(`Orbit Desktop needs to be updated (found v${installStatus.version}, need v1.1.2396+).`);
462989
+ setState("prompt-download");
462990
+ return;
462991
+ }
462992
+ setState("flushing");
462993
+ await flushSessionStorage();
462994
+ setState("opening");
462995
+ const result = await openCurrentSessionInDesktop();
462996
+ if (!result.success) {
462997
+ setError(result.error ?? "Failed to open Orbit Desktop");
462998
+ setState("error");
462999
+ return;
463000
+ }
463001
+ setState("success");
463002
+ setTimeout(_temp279, 500, onDone);
463003
+ };
463004
+ performHandoff().catch((err2) => {
463005
+ setError(errorMessage(err2));
463006
+ setState("error");
463007
+ });
463008
+ };
463009
+ t3 = [onDone];
463010
+ $2[4] = onDone;
463011
+ $2[5] = t2;
463012
+ $2[6] = t3;
463013
+ } else {
463014
+ t2 = $2[5];
463015
+ t3 = $2[6];
463016
+ }
463017
+ import_react278.useEffect(t2, t3);
463018
+ if (state2 === "error") {
463019
+ let t42;
463020
+ if ($2[7] !== error41) {
463021
+ t42 = /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedText, {
463022
+ color: "error",
463023
+ children: [
463024
+ "Error: ",
463025
+ error41
463026
+ ]
463027
+ }, undefined, true, undefined, this);
463028
+ $2[7] = error41;
463029
+ $2[8] = t42;
463030
+ } else {
463031
+ t42 = $2[8];
463032
+ }
463033
+ let t52;
463034
+ if ($2[9] === Symbol.for("react.memo_cache_sentinel")) {
463035
+ t52 = /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedText, {
463036
+ dimColor: true,
463037
+ children: "Press any key to continue…"
463038
+ }, undefined, false, undefined, this);
463039
+ $2[9] = t52;
463040
+ } else {
463041
+ t52 = $2[9];
463042
+ }
463043
+ let t62;
463044
+ if ($2[10] !== t42) {
463045
+ t62 = /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedBox_default, {
463046
+ flexDirection: "column",
463047
+ paddingX: 2,
463048
+ children: [
463049
+ t42,
463050
+ t52
463051
+ ]
463052
+ }, undefined, true, undefined, this);
463053
+ $2[10] = t42;
463054
+ $2[11] = t62;
463055
+ } else {
463056
+ t62 = $2[11];
463057
+ }
463058
+ return t62;
463059
+ }
463060
+ if (state2 === "prompt-download") {
463061
+ let t42;
463062
+ if ($2[12] !== downloadMessage) {
463063
+ t42 = /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedText, {
463064
+ children: downloadMessage
463065
+ }, undefined, false, undefined, this);
463066
+ $2[12] = downloadMessage;
463067
+ $2[13] = t42;
463068
+ } else {
463069
+ t42 = $2[13];
463070
+ }
463071
+ let t52;
463072
+ if ($2[14] === Symbol.for("react.memo_cache_sentinel")) {
463073
+ t52 = /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedText, {
463074
+ children: "Download now? (y/n)"
463075
+ }, undefined, false, undefined, this);
463076
+ $2[14] = t52;
463077
+ } else {
463078
+ t52 = $2[14];
463079
+ }
463080
+ let t62;
463081
+ if ($2[15] !== t42) {
463082
+ t62 = /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(ThemedBox_default, {
463083
+ flexDirection: "column",
463084
+ paddingX: 2,
463085
+ children: [
463086
+ t42,
463087
+ t52
463088
+ ]
463089
+ }, undefined, true, undefined, this);
463090
+ $2[15] = t42;
463091
+ $2[16] = t62;
463092
+ } else {
463093
+ t62 = $2[16];
463094
+ }
463095
+ return t62;
463096
+ }
463097
+ let t4;
463098
+ if ($2[17] === Symbol.for("react.memo_cache_sentinel")) {
463099
+ t4 = {
463100
+ checking: "Checking for Orbit Desktop…",
463101
+ flushing: "Saving session…",
463102
+ opening: "Opening Orbit Desktop…",
463103
+ success: "Opening in Orbit Desktop…"
463104
+ };
463105
+ $2[17] = t4;
463106
+ } else {
463107
+ t4 = $2[17];
463108
+ }
463109
+ const messages = t4;
463110
+ const t5 = messages[state2];
463111
+ let t6;
463112
+ if ($2[18] !== t5) {
463113
+ t6 = /* @__PURE__ */ jsx_dev_runtime402.jsxDEV(LoadingState, {
463114
+ message: t5
463115
+ }, undefined, false, undefined, this);
463116
+ $2[18] = t5;
463117
+ $2[19] = t6;
463118
+ } else {
463119
+ t6 = $2[19];
463120
+ }
463121
+ return t6;
463122
+ }
463123
+ async function _temp279(onDone_0) {
463124
+ onDone_0("Session transferred to Orbit Desktop", {
463125
+ display: "system"
463126
+ });
463127
+ await gracefulShutdown(0, "other");
463128
+ }
463129
+ function _temp186() {}
463130
+ var import_react_compiler_runtime315, import_react278, jsx_dev_runtime402, DESKTOP_DOCS_URL = "https://clau.de/desktop";
463131
+ var init_DesktopHandoff = __esm(() => {
463132
+ init_ink2();
463133
+ init_browser();
463134
+ init_desktopDeepLink();
463135
+ init_errors();
463136
+ init_gracefulShutdown();
463137
+ init_sessionStorage();
463138
+ init_LoadingState();
463139
+ import_react_compiler_runtime315 = __toESM(require_dist3(), 1);
463140
+ import_react278 = __toESM(require_react(), 1);
463141
+ jsx_dev_runtime402 = __toESM(require_jsx_dev_runtime(), 1);
463142
+ });
463143
+
463144
+ // src/components/DesktopUpsell/DesktopUpsellStartup.tsx
463145
+ function getDesktopUpsellConfig() {
463146
+ return getDynamicConfig_CACHED_MAY_BE_STALE("tengu_desktop_upsell", DESKTOP_UPSELL_DEFAULT);
463147
+ }
463148
+ function isSupportedPlatform2() {
463149
+ return process.platform === "darwin" || process.platform === "win32" && process.arch === "x64";
463150
+ }
463151
+ function shouldShowDesktopUpsellStartup() {
463152
+ if (!isSupportedPlatform2())
463153
+ return false;
463154
+ if (!getDesktopUpsellConfig().enable_startup_dialog)
463155
+ return false;
463156
+ const config3 = getGlobalConfig();
463157
+ if (config3.desktopUpsellDismissed)
463158
+ return false;
463159
+ if ((config3.desktopUpsellSeenCount ?? 0) >= 3)
463160
+ return false;
463161
+ return true;
463162
+ }
463163
+ function DesktopUpsellStartup(t0) {
463164
+ const $2 = import_react_compiler_runtime316.c(14);
463165
+ const {
463166
+ onDone
463167
+ } = t0;
463168
+ const [showHandoff, setShowHandoff] = import_react279.useState(false);
463169
+ let t1;
463170
+ if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
463171
+ t1 = [];
463172
+ $2[0] = t1;
463173
+ } else {
463174
+ t1 = $2[0];
463175
+ }
463176
+ import_react279.useEffect(_temp187, t1);
463177
+ if (showHandoff) {
463178
+ let t22;
463179
+ if ($2[1] !== onDone) {
463180
+ t22 = /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(DesktopHandoff, {
463181
+ onDone: () => onDone()
463182
+ }, undefined, false, undefined, this);
463183
+ $2[1] = onDone;
463184
+ $2[2] = t22;
463185
+ } else {
463186
+ t22 = $2[2];
463187
+ }
463188
+ return t22;
463189
+ }
463190
+ let t2;
463191
+ if ($2[3] !== onDone) {
463192
+ t2 = function handleSelect2(value) {
463193
+ switch (value) {
463194
+ case "try": {
463195
+ setShowHandoff(true);
463196
+ return;
463197
+ }
463198
+ case "never": {
463199
+ saveGlobalConfig(_temp280);
463200
+ onDone();
463201
+ return;
463202
+ }
463203
+ case "not-now": {
463204
+ onDone();
463205
+ return;
463206
+ }
463207
+ }
463208
+ };
463209
+ $2[3] = onDone;
463210
+ $2[4] = t2;
463211
+ } else {
463212
+ t2 = $2[4];
463213
+ }
463214
+ const handleSelect = t2;
463215
+ let t3;
463216
+ if ($2[5] === Symbol.for("react.memo_cache_sentinel")) {
463217
+ t3 = {
463218
+ label: "Open in Orbit AI Desktop",
463219
+ value: "try"
463220
+ };
463221
+ $2[5] = t3;
463222
+ } else {
463223
+ t3 = $2[5];
463224
+ }
463225
+ let t4;
463226
+ if ($2[6] === Symbol.for("react.memo_cache_sentinel")) {
463227
+ t4 = {
463228
+ label: "Not now",
463229
+ value: "not-now"
463230
+ };
463231
+ $2[6] = t4;
463232
+ } else {
463233
+ t4 = $2[6];
463234
+ }
463235
+ let t5;
463236
+ if ($2[7] === Symbol.for("react.memo_cache_sentinel")) {
463237
+ t5 = [t3, t4, {
463238
+ label: "Don't ask again",
463239
+ value: "never"
463240
+ }];
463241
+ $2[7] = t5;
463242
+ } else {
463243
+ t5 = $2[7];
463244
+ }
463245
+ const options2 = t5;
463246
+ let t6;
463247
+ if ($2[8] === Symbol.for("react.memo_cache_sentinel")) {
463248
+ t6 = /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedBox_default, {
463249
+ marginBottom: 1,
463250
+ children: /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedText, {
463251
+ children: "Same Orbit AI with visual diffs, live app preview, parallel sessions, and more."
463252
+ }, undefined, false, undefined, this)
463253
+ }, undefined, false, undefined, this);
463254
+ $2[8] = t6;
463255
+ } else {
463256
+ t6 = $2[8];
463257
+ }
463258
+ let t7;
463259
+ if ($2[9] !== handleSelect) {
463260
+ t7 = () => handleSelect("not-now");
463261
+ $2[9] = handleSelect;
463262
+ $2[10] = t7;
463263
+ } else {
463264
+ t7 = $2[10];
463265
+ }
463266
+ let t8;
463267
+ if ($2[11] !== handleSelect || $2[12] !== t7) {
463268
+ t8 = /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(PermissionDialog, {
463269
+ title: "Try Orbit AI Desktop",
463270
+ children: /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(ThemedBox_default, {
463271
+ flexDirection: "column",
463272
+ paddingX: 2,
463273
+ paddingY: 1,
463274
+ children: [
463275
+ t6,
463276
+ /* @__PURE__ */ jsx_dev_runtime403.jsxDEV(Select, {
463277
+ options: options2,
463278
+ onChange: handleSelect,
463279
+ onCancel: t7
463280
+ }, undefined, false, undefined, this)
463281
+ ]
463282
+ }, undefined, true, undefined, this)
463283
+ }, undefined, false, undefined, this);
463284
+ $2[11] = handleSelect;
463285
+ $2[12] = t7;
463286
+ $2[13] = t8;
463287
+ } else {
463288
+ t8 = $2[13];
463289
+ }
463290
+ return t8;
463291
+ }
463292
+ function _temp280(prev_0) {
463293
+ if (prev_0.desktopUpsellDismissed) {
463294
+ return prev_0;
463295
+ }
463296
+ return {
463297
+ ...prev_0,
463298
+ desktopUpsellDismissed: true
463299
+ };
463300
+ }
463301
+ function _temp187() {
463302
+ const newCount = (getGlobalConfig().desktopUpsellSeenCount ?? 0) + 1;
463303
+ saveGlobalConfig((prev) => {
463304
+ if ((prev.desktopUpsellSeenCount ?? 0) >= newCount) {
463305
+ return prev;
463306
+ }
463307
+ return {
463308
+ ...prev,
463309
+ desktopUpsellSeenCount: newCount
463310
+ };
463311
+ });
463312
+ logEvent("tengu_desktop_upsell_shown", {
463313
+ seen_count: newCount
463314
+ });
463315
+ }
463316
+ var import_react_compiler_runtime316, import_react279, jsx_dev_runtime403, DESKTOP_UPSELL_DEFAULT;
463317
+ var init_DesktopUpsellStartup = __esm(() => {
463318
+ init_ink2();
463319
+ init_config();
463320
+ init_select();
463321
+ init_DesktopHandoff();
463322
+ init_PermissionDialog();
463323
+ import_react_compiler_runtime316 = __toESM(require_dist3(), 1);
463324
+ import_react279 = __toESM(require_react(), 1);
463550
463325
  jsx_dev_runtime403 = __toESM(require_jsx_dev_runtime(), 1);
463326
+ DESKTOP_UPSELL_DEFAULT = {
463327
+ enable_shortcut_tip: false,
463328
+ enable_startup_dialog: false
463329
+ };
463551
463330
  });
463552
463331
 
463553
463332
  // src/hooks/notifs/usePluginInstallationStatus.tsx
@@ -469816,6 +469595,103 @@ var init_bootstrap = __esm(() => {
469816
469595
  }));
469817
469596
  });
469818
469597
 
469598
+ // src/services/api/referral.ts
469599
+ async function fetchReferralEligibility(campaign = "orbit_code_guest_pass") {
469600
+ const { accessToken, orgUUID } = await prepareApiRequest();
469601
+ const headers = {
469602
+ ...getOAuthHeaders(accessToken),
469603
+ "x-organization-uuid": orgUUID
469604
+ };
469605
+ const url3 = `${getOauthConfig().BASE_API_URL}/api/oauth/organizations/${orgUUID}/referral/eligibility`;
469606
+ const response = await axios_default.get(url3, {
469607
+ headers,
469608
+ params: { campaign },
469609
+ timeout: 5000
469610
+ });
469611
+ return response.data;
469612
+ }
469613
+ function shouldCheckForPasses() {
469614
+ return !!(getOauthAccountInfo()?.organizationUuid && isOrbitAISubscriber() && getSubscriptionType() === "max");
469615
+ }
469616
+ async function fetchAndStorePassesEligibility() {
469617
+ if (fetchInProgress) {
469618
+ logForDebugging2("Passes: Reusing in-flight eligibility fetch");
469619
+ return fetchInProgress;
469620
+ }
469621
+ const orgId = getOauthAccountInfo()?.organizationUuid;
469622
+ if (!orgId) {
469623
+ return null;
469624
+ }
469625
+ fetchInProgress = (async () => {
469626
+ try {
469627
+ const response = await fetchReferralEligibility();
469628
+ const cacheEntry = {
469629
+ ...response,
469630
+ timestamp: Date.now()
469631
+ };
469632
+ saveGlobalConfig((current) => ({
469633
+ ...current,
469634
+ passesEligibilityCache: {
469635
+ ...current.passesEligibilityCache,
469636
+ [orgId]: cacheEntry
469637
+ }
469638
+ }));
469639
+ logForDebugging2(`Passes eligibility cached for org ${orgId}: ${response.eligible}`);
469640
+ return response;
469641
+ } catch (error41) {
469642
+ logForDebugging2("Failed to fetch and cache passes eligibility");
469643
+ logError(error41);
469644
+ return null;
469645
+ } finally {
469646
+ fetchInProgress = null;
469647
+ }
469648
+ })();
469649
+ return fetchInProgress;
469650
+ }
469651
+ async function getCachedOrFetchPassesEligibility() {
469652
+ if (!shouldCheckForPasses()) {
469653
+ return null;
469654
+ }
469655
+ const orgId = getOauthAccountInfo()?.organizationUuid;
469656
+ if (!orgId) {
469657
+ return null;
469658
+ }
469659
+ const config3 = getGlobalConfig();
469660
+ const cachedEntry = config3.passesEligibilityCache?.[orgId];
469661
+ const now2 = Date.now();
469662
+ if (!cachedEntry) {
469663
+ logForDebugging2("Passes: No cache, fetching eligibility in background (command unavailable this session)");
469664
+ fetchAndStorePassesEligibility();
469665
+ return null;
469666
+ }
469667
+ if (now2 - cachedEntry.timestamp > CACHE_EXPIRATION_MS) {
469668
+ logForDebugging2("Passes: Cache stale, returning cached data and refreshing in background");
469669
+ fetchAndStorePassesEligibility();
469670
+ const { timestamp: timestamp2, ...response2 } = cachedEntry;
469671
+ return response2;
469672
+ }
469673
+ logForDebugging2("Passes: Using fresh cached eligibility data");
469674
+ const { timestamp, ...response } = cachedEntry;
469675
+ return response;
469676
+ }
469677
+ async function prefetchPassesEligibility() {
469678
+ if (isEssentialTrafficOnly()) {
469679
+ return;
469680
+ }
469681
+ getCachedOrFetchPassesEligibility();
469682
+ }
469683
+ var CACHE_EXPIRATION_MS, fetchInProgress = null;
469684
+ var init_referral = __esm(() => {
469685
+ init_axios2();
469686
+ init_oauth();
469687
+ init_auth();
469688
+ init_config();
469689
+ init_debug();
469690
+ init_log2();
469691
+ init_api2();
469692
+ CACHE_EXPIRATION_MS = 24 * 60 * 60 * 1000;
469693
+ });
469694
+
469819
469695
  // src/services/mcp/officialRegistry.ts
469820
469696
  function normalizeUrl2(url3) {
469821
469697
  try {
@@ -470842,7 +470718,7 @@ function WelcomeV2() {
470842
470718
  dimColor: true,
470843
470719
  children: [
470844
470720
  "v",
470845
- "0.1.11",
470721
+ "0.1.13",
470846
470722
  " "
470847
470723
  ]
470848
470724
  }, undefined, true, undefined, this)
@@ -471042,7 +470918,7 @@ function WelcomeV2() {
471042
470918
  dimColor: true,
471043
470919
  children: [
471044
470920
  "v",
471045
- "0.1.11",
470921
+ "0.1.13",
471046
470922
  " "
471047
470923
  ]
471048
470924
  }, undefined, true, undefined, this)
@@ -471268,7 +471144,7 @@ function AppleTerminalWelcomeV2(t0) {
471268
471144
  dimColor: true,
471269
471145
  children: [
471270
471146
  "v",
471271
- "0.1.11",
471147
+ "0.1.13",
471272
471148
  " "
471273
471149
  ]
471274
471150
  }, undefined, true, undefined, this);
@@ -471522,7 +471398,7 @@ function AppleTerminalWelcomeV2(t0) {
471522
471398
  dimColor: true,
471523
471399
  children: [
471524
471400
  "v",
471525
- "0.1.11",
471401
+ "0.1.13",
471526
471402
  " "
471527
471403
  ]
471528
471404
  }, undefined, true, undefined, this);
@@ -476034,7 +475910,7 @@ If a hook isn't running:
476034
475910
  3. **Check the matcher** - Does it match the tool name? (e.g., "Bash", "Write", "Edit")
476035
475911
  4. **Check hook type** - Is it "command", "prompt", or "agent"?
476036
475912
  5. **Test the command** - Run the hook command manually to see if it works
476037
- 6. **Use --debug** - Run \`orbitcode --debug\` to see hook execution logs
475913
+ 6. **Use --debug** - Run \`orbit --debug\` to see hook execution logs
476038
475914
  `;
476039
475915
  });
476040
475916
 
@@ -491904,7 +491780,7 @@ ${customInstructions}` : customInstructions;
491904
491780
  const isRemoteTuiEnabled = getFeatureValue_CACHED_MAY_BE_STALE("tengu_remote_backend", false);
491905
491781
  if (!isRemoteTuiEnabled && !hasInitialPrompt) {
491906
491782
  return await exitWithError2(root2, `Error: --remote requires a description.
491907
- Usage: orbitcode --remote "your task description"`, () => gracefulShutdown(1));
491783
+ Usage: orbit --remote "your task description"`, () => gracefulShutdown(1));
491908
491784
  }
491909
491785
  logEvent("tengu_remote_create_session", {
491910
491786
  has_initial_prompt: String(hasInitialPrompt)
@@ -492143,7 +492019,7 @@ Usage: orbitcode --remote "your task description"`, () => gracefulShutdown(1));
492143
492019
  pendingHookMessages
492144
492020
  }, renderAndRun);
492145
492021
  }
492146
- }).version("0.1.11 (Orbit AI)", "-v, --version", "Output the version number");
492022
+ }).version("0.1.13 (Orbit AI)", "-v, --version", "Output the version number");
492147
492023
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
492148
492024
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
492149
492025
  if (canUserConfigureAdvisor()) {
@@ -492665,7 +492541,7 @@ if (false) {}
492665
492541
  async function main2() {
492666
492542
  const args = process.argv.slice(2);
492667
492543
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
492668
- console.log(`${"0.1.11"} (Orbit AI)`);
492544
+ console.log(`${"0.1.13"} (Orbit AI)`);
492669
492545
  return;
492670
492546
  }
492671
492547
  if (args.includes("--provider")) {
@@ -492685,7 +492561,7 @@ async function main2() {
492685
492561
  applySafeConfigEnvironmentVariables2();
492686
492562
  }
492687
492563
  const { printStartupScreen: printStartupScreen2 } = await Promise.resolve().then(() => (init_StartupScreen(), exports_StartupScreen));
492688
- printStartupScreen2();
492564
+ await printStartupScreen2();
492689
492565
  const {
492690
492566
  profileCheckpoint: profileCheckpoint2
492691
492567
  } = await Promise.resolve().then(() => (init_startupProfiler(), exports_startupProfiler));
@@ -492769,4 +492645,4 @@ async function main2() {
492769
492645
  }
492770
492646
  main2();
492771
492647
 
492772
- //# debugId=A0CF00039A801F7064756E2164756E21
492648
+ //# debugId=B28F8D0C30A17B0164756E2164756E21