fss-link 1.4.4 → 1.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/fss-link.js +576 -560
- package/package.json +1 -1
package/bundle/fss-link.js
CHANGED
|
@@ -22379,7 +22379,7 @@ async function createContentGeneratorConfig(config, authType) {
|
|
|
22379
22379
|
async function createContentGenerator(config, gcConfig, sessionId2) {
|
|
22380
22380
|
if (DEBUG_CONTENT)
|
|
22381
22381
|
console.log(`\u{1F41B} DEBUG createContentGenerator: authType=${config.authType}, apiKey=${config.apiKey}, baseUrl=${config.baseUrl}`);
|
|
22382
|
-
const version = "1.4.
|
|
22382
|
+
const version = "1.4.6";
|
|
22383
22383
|
const userAgent = `FSS-Link/${version} (${process.platform}; ${process.arch})`;
|
|
22384
22384
|
const baseHeaders = {
|
|
22385
22385
|
"User-Agent": userAgent
|
|
@@ -96074,7 +96074,7 @@ async function getPackageJson() {
|
|
|
96074
96074
|
// packages/cli/src/utils/version.ts
|
|
96075
96075
|
async function getCliVersion() {
|
|
96076
96076
|
const pkgJson = await getPackageJson();
|
|
96077
|
-
return "1.4.
|
|
96077
|
+
return "1.4.6";
|
|
96078
96078
|
}
|
|
96079
96079
|
|
|
96080
96080
|
// packages/cli/src/ui/commands/aboutCommand.ts
|
|
@@ -96126,7 +96126,7 @@ import open4 from "open";
|
|
|
96126
96126
|
import process11 from "node:process";
|
|
96127
96127
|
|
|
96128
96128
|
// packages/cli/src/generated/git-commit.ts
|
|
96129
|
-
var GIT_COMMIT_INFO = "
|
|
96129
|
+
var GIT_COMMIT_INFO = "f7444f01";
|
|
96130
96130
|
|
|
96131
96131
|
// packages/cli/src/ui/commands/bugCommand.ts
|
|
96132
96132
|
init_dist2();
|
|
@@ -120421,7 +120421,6 @@ function LMStudioModelPrompt({
|
|
|
120421
120421
|
init_dist2();
|
|
120422
120422
|
import { useState as useState33, useEffect as useEffect32 } from "react";
|
|
120423
120423
|
import { Box as Box19, Text as Text26, useInput as useInput4 } from "ink";
|
|
120424
|
-
import TextInput from "ink-text-input";
|
|
120425
120424
|
|
|
120426
120425
|
// packages/cli/src/utils/modelFetcher.ts
|
|
120427
120426
|
async function fetchModelsFromCustomEndpoint(baseUrl, providerType, apiKey) {
|
|
@@ -120468,7 +120467,7 @@ async function fetchModelsFromCustomEndpoint(baseUrl, providerType, apiKey) {
|
|
|
120468
120467
|
throw new Error("Connection timeout (10s) - endpoint did not respond");
|
|
120469
120468
|
}
|
|
120470
120469
|
if (error.message.includes("fetch failed")) {
|
|
120471
|
-
throw new Error(`Network error - cannot reach ${normalizedBase}
|
|
120470
|
+
throw new Error(`Network error - cannot reach ${normalizedBase}: ${error.message}`);
|
|
120472
120471
|
}
|
|
120473
120472
|
throw error;
|
|
120474
120473
|
}
|
|
@@ -120476,8 +120475,25 @@ async function fetchModelsFromCustomEndpoint(baseUrl, providerType, apiKey) {
|
|
|
120476
120475
|
}
|
|
120477
120476
|
}
|
|
120478
120477
|
|
|
120478
|
+
// packages/cli/src/ui/components/shared/PasteAwareTextInput.tsx
|
|
120479
|
+
import TextInput from "ink-text-input";
|
|
120480
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
120481
|
+
function stripBracketedPaste(value) {
|
|
120482
|
+
return value.replace(/\x1b\[200~/g, "").replace(/\x1b\[201~/g, "").replace(/~200~/g, "").replace(/~201~/g, "");
|
|
120483
|
+
}
|
|
120484
|
+
function PasteAwareTextInput({
|
|
120485
|
+
onChange,
|
|
120486
|
+
...props
|
|
120487
|
+
}) {
|
|
120488
|
+
const handleChange = (value) => {
|
|
120489
|
+
const cleaned = stripBracketedPaste(value);
|
|
120490
|
+
onChange(cleaned);
|
|
120491
|
+
};
|
|
120492
|
+
return /* @__PURE__ */ jsx24(TextInput, { ...props, onChange: handleChange });
|
|
120493
|
+
}
|
|
120494
|
+
|
|
120479
120495
|
// packages/cli/src/ui/components/AddCustomEndpointDialog.tsx
|
|
120480
|
-
import { Fragment as Fragment4, jsx as
|
|
120496
|
+
import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
120481
120497
|
function AddCustomEndpointDialog({
|
|
120482
120498
|
onSubmit,
|
|
120483
120499
|
onCancel
|
|
@@ -120605,13 +120621,13 @@ function AddCustomEndpointDialog({
|
|
|
120605
120621
|
switch (step) {
|
|
120606
120622
|
case "name":
|
|
120607
120623
|
return /* @__PURE__ */ jsxs22(Fragment4, { children: [
|
|
120608
|
-
/* @__PURE__ */
|
|
120609
|
-
/* @__PURE__ */
|
|
120610
|
-
/* @__PURE__ */
|
|
120624
|
+
/* @__PURE__ */ jsx25(Text26, { bold: true, color: Colors.AccentBlue, children: "Step 1: Endpoint Name" }),
|
|
120625
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { children: "Enter a friendly name for this endpoint:" }) }),
|
|
120626
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: 'Example: "RTX3090 Proxy" or "Inference Server"' }) }),
|
|
120611
120627
|
/* @__PURE__ */ jsxs22(Box19, { marginTop: 1, children: [
|
|
120612
|
-
/* @__PURE__ */
|
|
120613
|
-
/* @__PURE__ */
|
|
120614
|
-
|
|
120628
|
+
/* @__PURE__ */ jsx25(Text26, { color: Colors.AccentPurple, children: "> " }),
|
|
120629
|
+
/* @__PURE__ */ jsx25(
|
|
120630
|
+
PasteAwareTextInput,
|
|
120615
120631
|
{
|
|
120616
120632
|
value: name2,
|
|
120617
120633
|
onChange: setName,
|
|
@@ -120619,21 +120635,21 @@ function AddCustomEndpointDialog({
|
|
|
120619
120635
|
}
|
|
120620
120636
|
)
|
|
120621
120637
|
] }),
|
|
120622
|
-
/* @__PURE__ */
|
|
120638
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.Gray, children: "Press Enter to continue, Esc to cancel" }) })
|
|
120623
120639
|
] });
|
|
120624
120640
|
case "url":
|
|
120625
120641
|
return /* @__PURE__ */ jsxs22(Fragment4, { children: [
|
|
120626
|
-
/* @__PURE__ */
|
|
120627
|
-
/* @__PURE__ */
|
|
120642
|
+
/* @__PURE__ */ jsx25(Text26, { bold: true, color: Colors.AccentBlue, children: "Step 2: Endpoint URL" }),
|
|
120643
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
|
|
120628
120644
|
"Endpoint name: ",
|
|
120629
|
-
/* @__PURE__ */
|
|
120645
|
+
/* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: name2 })
|
|
120630
120646
|
] }) }),
|
|
120631
|
-
/* @__PURE__ */
|
|
120632
|
-
/* @__PURE__ */
|
|
120647
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { children: "Enter the base URL for this endpoint:" }) }),
|
|
120648
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: 'Example: "https://rtx3090.bobai.com.au/v1"' }) }),
|
|
120633
120649
|
/* @__PURE__ */ jsxs22(Box19, { marginTop: 1, children: [
|
|
120634
|
-
/* @__PURE__ */
|
|
120635
|
-
/* @__PURE__ */
|
|
120636
|
-
|
|
120650
|
+
/* @__PURE__ */ jsx25(Text26, { color: Colors.AccentPurple, children: "> " }),
|
|
120651
|
+
/* @__PURE__ */ jsx25(
|
|
120652
|
+
PasteAwareTextInput,
|
|
120637
120653
|
{
|
|
120638
120654
|
value: url2,
|
|
120639
120655
|
onChange: setUrl,
|
|
@@ -120641,20 +120657,20 @@ function AddCustomEndpointDialog({
|
|
|
120641
120657
|
}
|
|
120642
120658
|
)
|
|
120643
120659
|
] }),
|
|
120644
|
-
/* @__PURE__ */
|
|
120660
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.Gray, children: "Press Enter to continue, Esc to cancel" }) })
|
|
120645
120661
|
] });
|
|
120646
120662
|
case "provider":
|
|
120647
120663
|
return /* @__PURE__ */ jsxs22(Fragment4, { children: [
|
|
120648
|
-
/* @__PURE__ */
|
|
120649
|
-
/* @__PURE__ */
|
|
120664
|
+
/* @__PURE__ */ jsx25(Text26, { bold: true, color: Colors.AccentBlue, children: "Step 3: Provider Type" }),
|
|
120665
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
|
|
120650
120666
|
"Endpoint: ",
|
|
120651
|
-
/* @__PURE__ */
|
|
120667
|
+
/* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: name2 }),
|
|
120652
120668
|
" (",
|
|
120653
120669
|
url2,
|
|
120654
120670
|
")"
|
|
120655
120671
|
] }) }),
|
|
120656
|
-
/* @__PURE__ */
|
|
120657
|
-
/* @__PURE__ */
|
|
120672
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { children: "Select the API type:" }) }),
|
|
120673
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, flexDirection: "column", children: providerOptions.map((option2, index) => {
|
|
120658
120674
|
const isSelected = index === selectedProviderIndex;
|
|
120659
120675
|
const prefix = isSelected ? ">" : " ";
|
|
120660
120676
|
return /* @__PURE__ */ jsxs22(
|
|
@@ -120671,24 +120687,24 @@ function AddCustomEndpointDialog({
|
|
|
120671
120687
|
option2.value
|
|
120672
120688
|
);
|
|
120673
120689
|
}) }),
|
|
120674
|
-
/* @__PURE__ */
|
|
120690
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.Gray, children: "\u2191/\u2193 to navigate, Enter to select, Esc to cancel" }) })
|
|
120675
120691
|
] });
|
|
120676
120692
|
case "apikey":
|
|
120677
120693
|
return /* @__PURE__ */ jsxs22(Fragment4, { children: [
|
|
120678
|
-
/* @__PURE__ */
|
|
120679
|
-
/* @__PURE__ */
|
|
120694
|
+
/* @__PURE__ */ jsx25(Text26, { bold: true, color: Colors.AccentBlue, children: "Step 4: API Key (Optional)" }),
|
|
120695
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
|
|
120680
120696
|
"Endpoint: ",
|
|
120681
|
-
/* @__PURE__ */
|
|
120697
|
+
/* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: name2 }),
|
|
120682
120698
|
" (",
|
|
120683
120699
|
providerOptions[selectedProviderIndex].label,
|
|
120684
120700
|
")"
|
|
120685
120701
|
] }) }),
|
|
120686
|
-
/* @__PURE__ */
|
|
120687
|
-
/* @__PURE__ */
|
|
120702
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { children: "Enter API key if required (leave empty if none):" }) }),
|
|
120703
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentYellow, children: "\u2139 External endpoints usually require authentication" }) }),
|
|
120688
120704
|
/* @__PURE__ */ jsxs22(Box19, { marginTop: 1, children: [
|
|
120689
|
-
/* @__PURE__ */
|
|
120690
|
-
/* @__PURE__ */
|
|
120691
|
-
|
|
120705
|
+
/* @__PURE__ */ jsx25(Text26, { color: Colors.AccentPurple, children: "> " }),
|
|
120706
|
+
/* @__PURE__ */ jsx25(
|
|
120707
|
+
PasteAwareTextInput,
|
|
120692
120708
|
{
|
|
120693
120709
|
value: apiKey,
|
|
120694
120710
|
onChange: setApiKey,
|
|
@@ -120696,66 +120712,66 @@ function AddCustomEndpointDialog({
|
|
|
120696
120712
|
}
|
|
120697
120713
|
)
|
|
120698
120714
|
] }),
|
|
120699
|
-
/* @__PURE__ */
|
|
120715
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.Gray, children: "Press Enter to fetch models, Esc to cancel" }) })
|
|
120700
120716
|
] });
|
|
120701
120717
|
case "model-fetch":
|
|
120702
120718
|
if (fetchError) {
|
|
120703
120719
|
return /* @__PURE__ */ jsxs22(Fragment4, { children: [
|
|
120704
|
-
/* @__PURE__ */
|
|
120705
|
-
/* @__PURE__ */
|
|
120720
|
+
/* @__PURE__ */ jsx25(Text26, { bold: true, color: Colors.AccentRed, children: "Connection Failed" }),
|
|
120721
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
|
|
120706
120722
|
"Name: ",
|
|
120707
|
-
/* @__PURE__ */
|
|
120723
|
+
/* @__PURE__ */ jsx25(Text26, { color: Colors.AccentCyan, children: name2 })
|
|
120708
120724
|
] }) }),
|
|
120709
|
-
/* @__PURE__ */
|
|
120725
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
|
|
120710
120726
|
"URL: ",
|
|
120711
|
-
/* @__PURE__ */
|
|
120727
|
+
/* @__PURE__ */ jsx25(Text26, { color: Colors.AccentCyan, children: url2 })
|
|
120712
120728
|
] }) }),
|
|
120713
|
-
/* @__PURE__ */
|
|
120729
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
|
|
120714
120730
|
"Provider: ",
|
|
120715
|
-
/* @__PURE__ */
|
|
120731
|
+
/* @__PURE__ */ jsx25(Text26, { color: Colors.AccentCyan, children: providerOptions[selectedProviderIndex].label })
|
|
120716
120732
|
] }) }),
|
|
120717
|
-
/* @__PURE__ */
|
|
120733
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
|
|
120718
120734
|
"API Key: ",
|
|
120719
|
-
/* @__PURE__ */
|
|
120735
|
+
/* @__PURE__ */ jsx25(Text26, { color: Colors.AccentCyan, children: apiKey ? `${apiKey.substring(0, 20)}...` : "(none)" })
|
|
120720
120736
|
] }) }),
|
|
120721
|
-
/* @__PURE__ */
|
|
120737
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { color: Colors.AccentRed, children: [
|
|
120722
120738
|
"\u2716 Error: ",
|
|
120723
120739
|
fetchError
|
|
120724
120740
|
] }) }),
|
|
120725
|
-
/* @__PURE__ */
|
|
120741
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentYellow, children: "What would you like to do?" }) }),
|
|
120726
120742
|
/* @__PURE__ */ jsxs22(Box19, { marginTop: 1, flexDirection: "column", children: [
|
|
120727
|
-
/* @__PURE__ */
|
|
120728
|
-
/* @__PURE__ */
|
|
120729
|
-
/* @__PURE__ */
|
|
120730
|
-
/* @__PURE__ */
|
|
120731
|
-
/* @__PURE__ */
|
|
120743
|
+
/* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: " [U] Edit URL" }),
|
|
120744
|
+
/* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: " [K] Edit API Key" }),
|
|
120745
|
+
/* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: " [P] Change Provider Type" }),
|
|
120746
|
+
/* @__PURE__ */ jsx25(Text26, { color: Colors.AccentBlue, children: " [R] Retry Connection" }),
|
|
120747
|
+
/* @__PURE__ */ jsx25(Text26, { color: Colors.Gray, children: " [Esc] Cancel and Exit" })
|
|
120732
120748
|
] })
|
|
120733
120749
|
] });
|
|
120734
120750
|
}
|
|
120735
120751
|
return /* @__PURE__ */ jsxs22(Fragment4, { children: [
|
|
120736
|
-
/* @__PURE__ */
|
|
120737
|
-
/* @__PURE__ */
|
|
120752
|
+
/* @__PURE__ */ jsx25(Text26, { bold: true, color: Colors.AccentBlue, children: "Fetching Models..." }),
|
|
120753
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
|
|
120738
120754
|
"Connecting to ",
|
|
120739
|
-
/* @__PURE__ */
|
|
120755
|
+
/* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: url2 })
|
|
120740
120756
|
] }) }),
|
|
120741
|
-
/* @__PURE__ */
|
|
120757
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.Gray, children: "Please wait..." }) })
|
|
120742
120758
|
] });
|
|
120743
120759
|
case "model-select":
|
|
120744
120760
|
return /* @__PURE__ */ jsxs22(Fragment4, { children: [
|
|
120745
|
-
/* @__PURE__ */
|
|
120746
|
-
/* @__PURE__ */
|
|
120761
|
+
/* @__PURE__ */ jsx25(Text26, { bold: true, color: Colors.AccentBlue, children: "Step 5: Select Model" }),
|
|
120762
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
|
|
120747
120763
|
"Endpoint: ",
|
|
120748
|
-
/* @__PURE__ */
|
|
120764
|
+
/* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: name2 }),
|
|
120749
120765
|
" (",
|
|
120750
120766
|
url2,
|
|
120751
120767
|
")"
|
|
120752
120768
|
] }) }),
|
|
120753
|
-
/* @__PURE__ */
|
|
120769
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { color: Colors.AccentGreen, children: [
|
|
120754
120770
|
"\u2713 Found ",
|
|
120755
120771
|
availableModels.length,
|
|
120756
120772
|
" available models"
|
|
120757
120773
|
] }) }),
|
|
120758
|
-
/* @__PURE__ */
|
|
120774
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { children: "Choose a model to use:" }) }),
|
|
120759
120775
|
/* @__PURE__ */ jsxs22(Box19, { marginTop: 1, flexDirection: "column", children: [
|
|
120760
120776
|
availableModels.slice(0, 15).map((model, index) => {
|
|
120761
120777
|
const isSelected = index === selectedModelIndex;
|
|
@@ -120786,7 +120802,7 @@ function AddCustomEndpointDialog({
|
|
|
120786
120802
|
" more models"
|
|
120787
120803
|
] })
|
|
120788
120804
|
] }),
|
|
120789
|
-
/* @__PURE__ */
|
|
120805
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.Gray, children: "\u2191/\u2193 to navigate, Enter to confirm, Esc to cancel" }) })
|
|
120790
120806
|
] });
|
|
120791
120807
|
}
|
|
120792
120808
|
};
|
|
@@ -120799,8 +120815,8 @@ function AddCustomEndpointDialog({
|
|
|
120799
120815
|
padding: 1,
|
|
120800
120816
|
width: "100%",
|
|
120801
120817
|
children: [
|
|
120802
|
-
/* @__PURE__ */
|
|
120803
|
-
/* @__PURE__ */
|
|
120818
|
+
/* @__PURE__ */ jsx25(Text26, { bold: true, color: Colors.AccentBlue, children: "Add Custom Endpoint" }),
|
|
120819
|
+
/* @__PURE__ */ jsx25(Box19, { marginTop: 1, flexDirection: "column", children: renderStep() })
|
|
120804
120820
|
]
|
|
120805
120821
|
}
|
|
120806
120822
|
);
|
|
@@ -120813,7 +120829,7 @@ init_modelManager();
|
|
|
120813
120829
|
import { useState as useState34, useEffect as useEffect33 } from "react";
|
|
120814
120830
|
import { Box as Box20, Text as Text27 } from "ink";
|
|
120815
120831
|
init_database();
|
|
120816
|
-
import { jsx as
|
|
120832
|
+
import { jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
120817
120833
|
var COMMON_ENDPOINTS = [
|
|
120818
120834
|
{
|
|
120819
120835
|
name: "OpenAI Official",
|
|
@@ -120870,12 +120886,12 @@ function OpenAIEndpointDialog({
|
|
|
120870
120886
|
}
|
|
120871
120887
|
}, { isActive: true });
|
|
120872
120888
|
if (isLoading) {
|
|
120873
|
-
return /* @__PURE__ */
|
|
120889
|
+
return /* @__PURE__ */ jsx26(Box20, { flexDirection: "column", padding: 1, children: /* @__PURE__ */ jsx26(Text27, { children: "Loading endpoints..." }) });
|
|
120874
120890
|
}
|
|
120875
120891
|
return /* @__PURE__ */ jsxs23(Box20, { flexDirection: "column", padding: 1, children: [
|
|
120876
|
-
/* @__PURE__ */
|
|
120877
|
-
/* @__PURE__ */
|
|
120878
|
-
/* @__PURE__ */
|
|
120892
|
+
/* @__PURE__ */ jsx26(Text27, { bold: true, color: Colors.AccentBlue, children: "Select OpenAI Endpoint" }),
|
|
120893
|
+
/* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text27, { children: "Choose an OpenAI API endpoint:" }) }),
|
|
120894
|
+
/* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx26(
|
|
120879
120895
|
RadioButtonSelect,
|
|
120880
120896
|
{
|
|
120881
120897
|
items: allEndpoints.map((e2) => ({
|
|
@@ -120886,13 +120902,13 @@ function OpenAIEndpointDialog({
|
|
|
120886
120902
|
onSelect: handleSelect
|
|
120887
120903
|
}
|
|
120888
120904
|
) }),
|
|
120889
|
-
/* @__PURE__ */
|
|
120905
|
+
/* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text27, { color: Colors.Gray, children: "(Press Escape to cancel)" }) })
|
|
120890
120906
|
] });
|
|
120891
120907
|
}
|
|
120892
120908
|
|
|
120893
120909
|
// packages/cli/src/ui/components/AuthDialog.tsx
|
|
120894
120910
|
init_database();
|
|
120895
|
-
import { jsx as
|
|
120911
|
+
import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
120896
120912
|
function parseDefaultAuthType(defaultAuthType) {
|
|
120897
120913
|
if (defaultAuthType && Object.values(AuthType).includes(defaultAuthType)) {
|
|
120898
120914
|
return defaultAuthType;
|
|
@@ -121112,7 +121128,7 @@ function AuthDialog({
|
|
|
121112
121128
|
{ isActive: true }
|
|
121113
121129
|
);
|
|
121114
121130
|
if (showOpenAIEndpointDialog) {
|
|
121115
|
-
return /* @__PURE__ */
|
|
121131
|
+
return /* @__PURE__ */ jsx27(
|
|
121116
121132
|
OpenAIEndpointDialog,
|
|
121117
121133
|
{
|
|
121118
121134
|
onSelect: handleEndpointSelect,
|
|
@@ -121121,7 +121137,7 @@ function AuthDialog({
|
|
|
121121
121137
|
);
|
|
121122
121138
|
}
|
|
121123
121139
|
if (showAddCustomEndpointDialog) {
|
|
121124
|
-
return /* @__PURE__ */
|
|
121140
|
+
return /* @__PURE__ */ jsx27(
|
|
121125
121141
|
AddCustomEndpointDialog,
|
|
121126
121142
|
{
|
|
121127
121143
|
onSubmit: handleCustomEndpointSubmit,
|
|
@@ -121130,7 +121146,7 @@ function AuthDialog({
|
|
|
121130
121146
|
);
|
|
121131
121147
|
}
|
|
121132
121148
|
if (showOpenAIKeyPrompt) {
|
|
121133
|
-
return /* @__PURE__ */
|
|
121149
|
+
return /* @__PURE__ */ jsx27(
|
|
121134
121150
|
OpenAIKeyPrompt,
|
|
121135
121151
|
{
|
|
121136
121152
|
onSubmit: handleOpenAIKeySubmit,
|
|
@@ -121140,7 +121156,7 @@ function AuthDialog({
|
|
|
121140
121156
|
);
|
|
121141
121157
|
}
|
|
121142
121158
|
if (showOllamaModelPrompt) {
|
|
121143
|
-
return /* @__PURE__ */
|
|
121159
|
+
return /* @__PURE__ */ jsx27(
|
|
121144
121160
|
OllamaModelPrompt,
|
|
121145
121161
|
{
|
|
121146
121162
|
onSubmit: handleOllamaModelSubmit,
|
|
@@ -121149,7 +121165,7 @@ function AuthDialog({
|
|
|
121149
121165
|
);
|
|
121150
121166
|
}
|
|
121151
121167
|
if (showLMStudioModelPrompt) {
|
|
121152
|
-
return /* @__PURE__ */
|
|
121168
|
+
return /* @__PURE__ */ jsx27(
|
|
121153
121169
|
LMStudioModelPrompt,
|
|
121154
121170
|
{
|
|
121155
121171
|
onSubmit: handleLMStudioModelSubmit,
|
|
@@ -121166,9 +121182,9 @@ function AuthDialog({
|
|
|
121166
121182
|
padding: 1,
|
|
121167
121183
|
width: "100%",
|
|
121168
121184
|
children: [
|
|
121169
|
-
/* @__PURE__ */
|
|
121170
|
-
/* @__PURE__ */
|
|
121171
|
-
/* @__PURE__ */
|
|
121185
|
+
/* @__PURE__ */ jsx27(Text28, { bold: true, children: "Get started" }),
|
|
121186
|
+
/* @__PURE__ */ jsx27(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx27(Text28, { children: "How would you like to authenticate for this project?" }) }),
|
|
121187
|
+
/* @__PURE__ */ jsx27(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx27(
|
|
121172
121188
|
RadioButtonSelect,
|
|
121173
121189
|
{
|
|
121174
121190
|
items,
|
|
@@ -121176,10 +121192,10 @@ function AuthDialog({
|
|
|
121176
121192
|
onSelect: handleAuthSelect
|
|
121177
121193
|
}
|
|
121178
121194
|
) }),
|
|
121179
|
-
errorMessage && /* @__PURE__ */
|
|
121180
|
-
/* @__PURE__ */
|
|
121181
|
-
/* @__PURE__ */
|
|
121182
|
-
/* @__PURE__ */
|
|
121195
|
+
errorMessage && /* @__PURE__ */ jsx27(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx27(Text28, { color: Colors.AccentRed, children: errorMessage }) }),
|
|
121196
|
+
/* @__PURE__ */ jsx27(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx27(Text28, { color: Colors.AccentPurple, children: "(Use Enter to Set Auth)" }) }),
|
|
121197
|
+
/* @__PURE__ */ jsx27(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx27(Text28, { children: "Terms of Services and Privacy Notice for FSS Link" }) }),
|
|
121198
|
+
/* @__PURE__ */ jsx27(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx27(Text28, { color: Colors.AccentBlue, children: "https://github.com/FSSCoding/fss-link/blob/main/README.md" }) })
|
|
121183
121199
|
]
|
|
121184
121200
|
}
|
|
121185
121201
|
);
|
|
@@ -121189,7 +121205,7 @@ function AuthDialog({
|
|
|
121189
121205
|
import { useState as useState36, useEffect as useEffect34 } from "react";
|
|
121190
121206
|
import { Box as Box22, Text as Text29, useInput as useInput5 } from "ink";
|
|
121191
121207
|
init_modelManager();
|
|
121192
|
-
import { jsx as
|
|
121208
|
+
import { jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
121193
121209
|
function ProviderEndpointSelectionDialog({
|
|
121194
121210
|
onSelect,
|
|
121195
121211
|
onAddCustom,
|
|
@@ -121333,8 +121349,8 @@ function ProviderEndpointSelectionDialog({
|
|
|
121333
121349
|
padding: 1,
|
|
121334
121350
|
width: "100%",
|
|
121335
121351
|
children: [
|
|
121336
|
-
/* @__PURE__ */
|
|
121337
|
-
/* @__PURE__ */
|
|
121352
|
+
/* @__PURE__ */ jsx28(Text29, { bold: true, color: Colors.AccentBlue, children: "Provider / Endpoint Selection" }),
|
|
121353
|
+
/* @__PURE__ */ jsx28(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text29, { children: "Loading providers and endpoints..." }) })
|
|
121338
121354
|
]
|
|
121339
121355
|
}
|
|
121340
121356
|
);
|
|
@@ -121349,8 +121365,8 @@ function ProviderEndpointSelectionDialog({
|
|
|
121349
121365
|
padding: 1,
|
|
121350
121366
|
width: "100%",
|
|
121351
121367
|
children: [
|
|
121352
|
-
/* @__PURE__ */
|
|
121353
|
-
/* @__PURE__ */
|
|
121368
|
+
/* @__PURE__ */ jsx28(Text29, { bold: true, color: Colors.AccentBlue, children: "Switching Model" }),
|
|
121369
|
+
/* @__PURE__ */ jsx28(Box22, { marginTop: 1, children: /* @__PURE__ */ jsxs25(Text29, { children: [
|
|
121354
121370
|
"Activating ",
|
|
121355
121371
|
endpoints[selectedIndex]?.modelName || "model",
|
|
121356
121372
|
"..."
|
|
@@ -121369,9 +121385,9 @@ function ProviderEndpointSelectionDialog({
|
|
|
121369
121385
|
padding: 1,
|
|
121370
121386
|
width: "100%",
|
|
121371
121387
|
children: [
|
|
121372
|
-
/* @__PURE__ */
|
|
121373
|
-
/* @__PURE__ */
|
|
121374
|
-
/* @__PURE__ */
|
|
121388
|
+
/* @__PURE__ */ jsx28(Text29, { bold: true, color: Colors.AccentRed, children: "Provider Selection Error" }),
|
|
121389
|
+
/* @__PURE__ */ jsx28(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text29, { children: error }) }),
|
|
121390
|
+
/* @__PURE__ */ jsx28(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text29, { color: Colors.Gray, children: "Press Esc to cancel" }) })
|
|
121375
121391
|
]
|
|
121376
121392
|
}
|
|
121377
121393
|
);
|
|
@@ -121385,9 +121401,9 @@ function ProviderEndpointSelectionDialog({
|
|
|
121385
121401
|
padding: 1,
|
|
121386
121402
|
width: "100%",
|
|
121387
121403
|
children: [
|
|
121388
|
-
/* @__PURE__ */
|
|
121389
|
-
/* @__PURE__ */
|
|
121390
|
-
/* @__PURE__ */
|
|
121404
|
+
/* @__PURE__ */ jsx28(Text29, { bold: true, color: Colors.AccentBlue, children: "Model Selection" }),
|
|
121405
|
+
/* @__PURE__ */ jsx28(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text29, { children: "Select a model or provider:" }) }),
|
|
121406
|
+
/* @__PURE__ */ jsx28(Box22, { marginTop: 1, flexDirection: "column", children: endpoints.map((endpoint, index) => {
|
|
121391
121407
|
const isSelected = index === selectedIndex;
|
|
121392
121408
|
const prefix = isSelected ? ">" : " ";
|
|
121393
121409
|
if (endpoint.type === "recent-model") {
|
|
@@ -121436,8 +121452,8 @@ function ProviderEndpointSelectionDialog({
|
|
|
121436
121452
|
`${endpoint.label}-${index}`
|
|
121437
121453
|
);
|
|
121438
121454
|
}) }),
|
|
121439
|
-
/* @__PURE__ */
|
|
121440
|
-
/* @__PURE__ */
|
|
121455
|
+
/* @__PURE__ */ jsx28(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text29, { color: Colors.Gray, children: "\u25CF = Active model | Recent models listed first" }) }),
|
|
121456
|
+
/* @__PURE__ */ jsx28(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text29, { color: Colors.Gray, children: "\u2191/\u2193 to navigate, Enter to select, Esc to cancel" }) })
|
|
121441
121457
|
]
|
|
121442
121458
|
}
|
|
121443
121459
|
);
|
|
@@ -121447,7 +121463,7 @@ function ProviderEndpointSelectionDialog({
|
|
|
121447
121463
|
import { useState as useState37, useEffect as useEffect35 } from "react";
|
|
121448
121464
|
import { Box as Box23, Text as Text30, useInput as useInput6 } from "ink";
|
|
121449
121465
|
init_modelManager();
|
|
121450
|
-
import { jsx as
|
|
121466
|
+
import { jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
121451
121467
|
function EnhancedModelSelectionDialog({
|
|
121452
121468
|
providerType,
|
|
121453
121469
|
endpointUrl,
|
|
@@ -121551,7 +121567,7 @@ function EnhancedModelSelectionDialog({
|
|
|
121551
121567
|
"Model Selection - ",
|
|
121552
121568
|
endpointLabel
|
|
121553
121569
|
] }),
|
|
121554
|
-
/* @__PURE__ */
|
|
121570
|
+
/* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text30, { children: "Loading models..." }) })
|
|
121555
121571
|
]
|
|
121556
121572
|
}
|
|
121557
121573
|
);
|
|
@@ -121566,8 +121582,8 @@ function EnhancedModelSelectionDialog({
|
|
|
121566
121582
|
padding: 1,
|
|
121567
121583
|
width: "100%",
|
|
121568
121584
|
children: [
|
|
121569
|
-
/* @__PURE__ */
|
|
121570
|
-
/* @__PURE__ */
|
|
121585
|
+
/* @__PURE__ */ jsx29(Text30, { bold: true, color: Colors.AccentBlue, children: "Switching Model" }),
|
|
121586
|
+
/* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsxs26(Text30, { children: [
|
|
121571
121587
|
"Activating ",
|
|
121572
121588
|
models[selectedIndex].modelName,
|
|
121573
121589
|
"..."
|
|
@@ -121586,9 +121602,9 @@ function EnhancedModelSelectionDialog({
|
|
|
121586
121602
|
padding: 1,
|
|
121587
121603
|
width: "100%",
|
|
121588
121604
|
children: [
|
|
121589
|
-
/* @__PURE__ */
|
|
121590
|
-
/* @__PURE__ */
|
|
121591
|
-
/* @__PURE__ */
|
|
121605
|
+
/* @__PURE__ */ jsx29(Text30, { bold: true, color: Colors.AccentRed, children: "Model Selection Error" }),
|
|
121606
|
+
/* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text30, { children: error }) }),
|
|
121607
|
+
/* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text30, { color: Colors.Gray, children: "Press Esc to go back" }) })
|
|
121592
121608
|
]
|
|
121593
121609
|
}
|
|
121594
121610
|
);
|
|
@@ -121606,14 +121622,14 @@ function EnhancedModelSelectionDialog({
|
|
|
121606
121622
|
"Model Selection - ",
|
|
121607
121623
|
endpointLabel
|
|
121608
121624
|
] }),
|
|
121609
|
-
/* @__PURE__ */
|
|
121610
|
-
/* @__PURE__ */
|
|
121625
|
+
/* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text30, { children: "Choose a model:" }) }),
|
|
121626
|
+
/* @__PURE__ */ jsx29(Box23, { marginTop: 1, flexDirection: "column", children: models.map((model, index) => {
|
|
121611
121627
|
const isSelected = index === selectedIndex;
|
|
121612
121628
|
const prefix = isSelected ? ">" : " ";
|
|
121613
121629
|
const active = model.isActive ? "\u25CF " : "";
|
|
121614
121630
|
const favorite = model.isFavorite ? "\u2605 " : "";
|
|
121615
121631
|
const label = `${prefix} ${active}${favorite}${model.modelName}`;
|
|
121616
|
-
return /* @__PURE__ */
|
|
121632
|
+
return /* @__PURE__ */ jsx29(
|
|
121617
121633
|
Text30,
|
|
121618
121634
|
{
|
|
121619
121635
|
color: isSelected ? Colors.AccentBlue : Colors.Foreground,
|
|
@@ -121623,9 +121639,9 @@ function EnhancedModelSelectionDialog({
|
|
|
121623
121639
|
model.id || index
|
|
121624
121640
|
);
|
|
121625
121641
|
}) }),
|
|
121626
|
-
/* @__PURE__ */
|
|
121627
|
-
/* @__PURE__ */
|
|
121628
|
-
/* @__PURE__ */
|
|
121642
|
+
/* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text30, { color: Colors.Gray, children: "\u25CF = Active \u2605 = Favorite" }) }),
|
|
121643
|
+
/* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text30, { color: Colors.Gray, children: "Enter to switch, F to toggle favorite, Esc to go back" }) }),
|
|
121644
|
+
/* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsxs26(Text30, { color: Colors.Gray, children: [
|
|
121629
121645
|
"Endpoint: ",
|
|
121630
121646
|
endpointUrl || "default"
|
|
121631
121647
|
] }) })
|
|
@@ -121636,7 +121652,7 @@ function EnhancedModelSelectionDialog({
|
|
|
121636
121652
|
|
|
121637
121653
|
// packages/cli/src/ui/components/WelcomeBackDialog.tsx
|
|
121638
121654
|
import { Box as Box24, Text as Text31 } from "ink";
|
|
121639
|
-
import { Fragment as Fragment5, jsx as
|
|
121655
|
+
import { Fragment as Fragment5, jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
121640
121656
|
var WelcomeBackDialog = ({
|
|
121641
121657
|
projectSummary,
|
|
121642
121658
|
onContinue,
|
|
@@ -121736,31 +121752,31 @@ var WelcomeBackDialog = ({
|
|
|
121736
121752
|
}
|
|
121737
121753
|
};
|
|
121738
121754
|
return /* @__PURE__ */ jsxs27(Box24, { flexDirection: "column", padding: 1, children: [
|
|
121739
|
-
/* @__PURE__ */
|
|
121755
|
+
/* @__PURE__ */ jsx30(Box24, { marginBottom: 1, children: /* @__PURE__ */ jsx30(Text31, { bold: true, color: Colors.AccentPurple, children: "Welcome Back to FSS Link" }) }),
|
|
121740
121756
|
/* @__PURE__ */ jsxs27(Box24, { flexDirection: "column", marginBottom: 2, paddingX: 1, children: [
|
|
121741
|
-
projectSummary.projectGoal && /* @__PURE__ */
|
|
121742
|
-
/* @__PURE__ */
|
|
121757
|
+
projectSummary.projectGoal && /* @__PURE__ */ jsx30(Box24, { marginBottom: 1, children: /* @__PURE__ */ jsxs27(Text31, { color: Colors.Foreground, children: [
|
|
121758
|
+
/* @__PURE__ */ jsx30(Text31, { bold: true, children: "Project:" }),
|
|
121743
121759
|
" ",
|
|
121744
121760
|
projectSummary.projectGoal
|
|
121745
121761
|
] }) }),
|
|
121746
121762
|
/* @__PURE__ */ jsxs27(Box24, { flexDirection: "row", marginBottom: 1, children: [
|
|
121747
|
-
/* @__PURE__ */
|
|
121748
|
-
/* @__PURE__ */
|
|
121763
|
+
/* @__PURE__ */ jsx30(Text31, { color: Colors.Gray, children: "Last worked: " }),
|
|
121764
|
+
/* @__PURE__ */ jsx30(Text31, { color: Colors.Foreground, children: projectSummary.timeAgo })
|
|
121749
121765
|
] }),
|
|
121750
121766
|
/* @__PURE__ */ jsxs27(Box24, { flexDirection: "row", marginBottom: 1, children: [
|
|
121751
|
-
/* @__PURE__ */
|
|
121752
|
-
/* @__PURE__ */
|
|
121767
|
+
/* @__PURE__ */ jsx30(Text31, { color: Colors.Gray, children: "Sessions: " }),
|
|
121768
|
+
/* @__PURE__ */ jsx30(Text31, { color: Colors.Foreground, children: projectSummary.totalSessions }),
|
|
121753
121769
|
projectSummary.activeSessions > 0 && /* @__PURE__ */ jsxs27(Fragment5, { children: [
|
|
121754
|
-
/* @__PURE__ */
|
|
121770
|
+
/* @__PURE__ */ jsx30(Text31, { color: Colors.Gray, children: " (" }),
|
|
121755
121771
|
/* @__PURE__ */ jsxs27(Text31, { color: Colors.AccentGreen, children: [
|
|
121756
121772
|
projectSummary.activeSessions,
|
|
121757
121773
|
" active"
|
|
121758
121774
|
] }),
|
|
121759
|
-
/* @__PURE__ */
|
|
121775
|
+
/* @__PURE__ */ jsx30(Text31, { color: Colors.Gray, children: ")" })
|
|
121760
121776
|
] })
|
|
121761
121777
|
] }),
|
|
121762
121778
|
/* @__PURE__ */ jsxs27(Box24, { flexDirection: "row", marginBottom: 1, children: [
|
|
121763
|
-
/* @__PURE__ */
|
|
121779
|
+
/* @__PURE__ */ jsx30(Text31, { color: Colors.Gray, children: "Momentum: " }),
|
|
121764
121780
|
/* @__PURE__ */ jsxs27(Text31, { color: getMomentumColor(projectSummary.momentum), children: [
|
|
121765
121781
|
getMomentumEmoji(projectSummary.momentum),
|
|
121766
121782
|
" ",
|
|
@@ -121769,8 +121785,8 @@ var WelcomeBackDialog = ({
|
|
|
121769
121785
|
] }),
|
|
121770
121786
|
projectSummary.gitStatus && /* @__PURE__ */ jsxs27(Box24, { flexDirection: "column", marginBottom: 1, children: [
|
|
121771
121787
|
/* @__PURE__ */ jsxs27(Box24, { flexDirection: "row", marginBottom: 1, children: [
|
|
121772
|
-
/* @__PURE__ */
|
|
121773
|
-
/* @__PURE__ */
|
|
121788
|
+
/* @__PURE__ */ jsx30(Text31, { color: Colors.Gray, children: "Branch: " }),
|
|
121789
|
+
/* @__PURE__ */ jsx30(Text31, { color: Colors.AccentBlue, children: projectSummary.gitStatus.branch }),
|
|
121774
121790
|
(projectSummary.gitStatus.ahead || projectSummary.gitStatus.behind) && /* @__PURE__ */ jsxs27(Text31, { color: Colors.Gray, children: [
|
|
121775
121791
|
" ",
|
|
121776
121792
|
"[",
|
|
@@ -121781,19 +121797,19 @@ var WelcomeBackDialog = ({
|
|
|
121781
121797
|
] })
|
|
121782
121798
|
] }),
|
|
121783
121799
|
projectSummary.gitStatus.hasChanges && /* @__PURE__ */ jsxs27(Box24, { flexDirection: "row", marginBottom: 1, children: [
|
|
121784
|
-
/* @__PURE__ */
|
|
121800
|
+
/* @__PURE__ */ jsx30(Text31, { color: Colors.Gray, children: "Changes: " }),
|
|
121785
121801
|
projectSummary.gitStatus.stagedFiles > 0 && /* @__PURE__ */ jsxs27(Text31, { color: Colors.AccentGreen, children: [
|
|
121786
121802
|
projectSummary.gitStatus.stagedFiles,
|
|
121787
121803
|
" staged"
|
|
121788
121804
|
] }),
|
|
121789
|
-
projectSummary.gitStatus.stagedFiles > 0 && projectSummary.gitStatus.unstagedFiles > 0 && /* @__PURE__ */
|
|
121805
|
+
projectSummary.gitStatus.stagedFiles > 0 && projectSummary.gitStatus.unstagedFiles > 0 && /* @__PURE__ */ jsx30(Text31, { color: Colors.Gray, children: ", " }),
|
|
121790
121806
|
projectSummary.gitStatus.unstagedFiles > 0 && /* @__PURE__ */ jsxs27(Text31, { color: Colors.AccentYellow, children: [
|
|
121791
121807
|
projectSummary.gitStatus.unstagedFiles,
|
|
121792
121808
|
" unstaged"
|
|
121793
121809
|
] })
|
|
121794
121810
|
] }),
|
|
121795
121811
|
projectSummary.gitStatus.lastCommitMessage && /* @__PURE__ */ jsxs27(Box24, { flexDirection: "row", marginBottom: 1, children: [
|
|
121796
|
-
/* @__PURE__ */
|
|
121812
|
+
/* @__PURE__ */ jsx30(Text31, { color: Colors.Gray, children: "Last commit: " }),
|
|
121797
121813
|
/* @__PURE__ */ jsxs27(Text31, { color: Colors.Foreground, children: [
|
|
121798
121814
|
projectSummary.gitStatus.lastCommitHash,
|
|
121799
121815
|
' "',
|
|
@@ -121803,34 +121819,34 @@ var WelcomeBackDialog = ({
|
|
|
121803
121819
|
] })
|
|
121804
121820
|
] }),
|
|
121805
121821
|
(projectSummary.efficiency || projectSummary.recentActivity || projectSummary.tokenEfficiency) && /* @__PURE__ */ jsxs27(Box24, { flexDirection: "column", marginBottom: 1, paddingY: 1, borderStyle: "single", borderColor: Colors.Gray, children: [
|
|
121806
|
-
/* @__PURE__ */
|
|
121807
|
-
projectSummary.efficiency && /* @__PURE__ */
|
|
121822
|
+
/* @__PURE__ */ jsx30(Box24, { marginBottom: 1, children: /* @__PURE__ */ jsx30(Text31, { bold: true, color: Colors.AccentPurple, children: "Quick Status" }) }),
|
|
121823
|
+
projectSummary.efficiency && /* @__PURE__ */ jsx30(Box24, { flexDirection: "row", marginBottom: 1, children: /* @__PURE__ */ jsxs27(Text31, { color: getEfficiencyColor(projectSummary.efficiency), children: [
|
|
121808
121824
|
getEfficiencyEmoji(projectSummary.efficiency),
|
|
121809
121825
|
" ",
|
|
121810
121826
|
projectSummary.efficiency,
|
|
121811
121827
|
" efficiency"
|
|
121812
121828
|
] }) }),
|
|
121813
|
-
projectSummary.recentActivity && /* @__PURE__ */
|
|
121814
|
-
projectSummary.tokenEfficiency && /* @__PURE__ */
|
|
121829
|
+
projectSummary.recentActivity && /* @__PURE__ */ jsx30(Box24, { marginBottom: 1, children: /* @__PURE__ */ jsx30(Text31, { color: Colors.Foreground, children: projectSummary.recentActivity }) }),
|
|
121830
|
+
projectSummary.tokenEfficiency && /* @__PURE__ */ jsx30(Box24, { children: /* @__PURE__ */ jsx30(Text31, { color: Colors.Gray, children: projectSummary.tokenEfficiency }) })
|
|
121815
121831
|
] }),
|
|
121816
|
-
projectSummary.nextSuggestion && /* @__PURE__ */
|
|
121832
|
+
projectSummary.nextSuggestion && /* @__PURE__ */ jsx30(Box24, { marginBottom: 1, children: /* @__PURE__ */ jsxs27(Text31, { color: Colors.AccentPurple, children: [
|
|
121817
121833
|
"\u{1F4A1} ",
|
|
121818
121834
|
projectSummary.nextSuggestion
|
|
121819
121835
|
] }) }),
|
|
121820
|
-
projectSummary.lastContent && /* @__PURE__ */
|
|
121836
|
+
projectSummary.lastContent && /* @__PURE__ */ jsx30(Box24, { marginBottom: 1, children: /* @__PURE__ */ jsxs27(Text31, { color: Colors.Gray, children: [
|
|
121821
121837
|
'Last message: "',
|
|
121822
121838
|
projectSummary.lastContent,
|
|
121823
121839
|
'"'
|
|
121824
121840
|
] }) })
|
|
121825
121841
|
] }),
|
|
121826
|
-
/* @__PURE__ */
|
|
121842
|
+
/* @__PURE__ */ jsx30(
|
|
121827
121843
|
RadioButtonSelect,
|
|
121828
121844
|
{
|
|
121829
121845
|
items,
|
|
121830
121846
|
onSelect: handleSelection
|
|
121831
121847
|
}
|
|
121832
121848
|
),
|
|
121833
|
-
/* @__PURE__ */
|
|
121849
|
+
/* @__PURE__ */ jsx30(Box24, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx30(Text31, { color: Colors.Gray, children: "Press C to continue, R to restart, Q to cancel, or use \u2191\u2193 arrows" }) })
|
|
121834
121850
|
] });
|
|
121835
121851
|
};
|
|
121836
121852
|
|
|
@@ -121838,7 +121854,7 @@ var WelcomeBackDialog = ({
|
|
|
121838
121854
|
import { useState as useState38, useEffect as useEffect36 } from "react";
|
|
121839
121855
|
import { Box as Box25, Text as Text32, useInput as useInput7 } from "ink";
|
|
121840
121856
|
init_database();
|
|
121841
|
-
import { jsx as
|
|
121857
|
+
import { jsx as jsx31, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
121842
121858
|
function SearchEngineConfigDialog({
|
|
121843
121859
|
onSubmit,
|
|
121844
121860
|
onCancel
|
|
@@ -121996,7 +122012,7 @@ function SearchEngineConfigDialog({
|
|
|
121996
122012
|
}
|
|
121997
122013
|
});
|
|
121998
122014
|
if (isLoading) {
|
|
121999
|
-
return /* @__PURE__ */
|
|
122015
|
+
return /* @__PURE__ */ jsx31(
|
|
122000
122016
|
Box25,
|
|
122001
122017
|
{
|
|
122002
122018
|
borderStyle: "round",
|
|
@@ -122004,7 +122020,7 @@ function SearchEngineConfigDialog({
|
|
|
122004
122020
|
flexDirection: "column",
|
|
122005
122021
|
padding: 1,
|
|
122006
122022
|
width: "100%",
|
|
122007
|
-
children: /* @__PURE__ */
|
|
122023
|
+
children: /* @__PURE__ */ jsx31(Text32, { children: "Loading search engine configuration..." })
|
|
122008
122024
|
}
|
|
122009
122025
|
);
|
|
122010
122026
|
}
|
|
@@ -122018,8 +122034,8 @@ function SearchEngineConfigDialog({
|
|
|
122018
122034
|
padding: 1,
|
|
122019
122035
|
width: "100%",
|
|
122020
122036
|
children: [
|
|
122021
|
-
/* @__PURE__ */
|
|
122022
|
-
/* @__PURE__ */
|
|
122037
|
+
/* @__PURE__ */ jsx31(Text32, { bold: true, color: Colors.AccentGreen, children: "\u{1F4BE} Saving API keys to database..." }),
|
|
122038
|
+
/* @__PURE__ */ jsx31(Box25, { marginTop: 1, children: /* @__PURE__ */ jsx31(Text32, { color: Colors.Gray, children: "Please wait while your search engine configuration is saved." }) })
|
|
122023
122039
|
]
|
|
122024
122040
|
}
|
|
122025
122041
|
);
|
|
@@ -122033,59 +122049,59 @@ function SearchEngineConfigDialog({
|
|
|
122033
122049
|
padding: 1,
|
|
122034
122050
|
width: "100%",
|
|
122035
122051
|
children: [
|
|
122036
|
-
/* @__PURE__ */
|
|
122037
|
-
/* @__PURE__ */
|
|
122038
|
-
/* @__PURE__ */
|
|
122039
|
-
/* @__PURE__ */
|
|
122052
|
+
/* @__PURE__ */ jsx31(Text32, { bold: true, color: Colors.AccentPurple, children: "Search Engine Configuration" }),
|
|
122053
|
+
/* @__PURE__ */ jsx31(Box25, { marginTop: 1, children: /* @__PURE__ */ jsx31(Text32, { children: "Configure search engine APIs for web research. You need at least one API key." }) }),
|
|
122054
|
+
/* @__PURE__ */ jsx31(Box25, { marginTop: 1, children: /* @__PURE__ */ jsx31(Text32, { bold: true, color: Colors.AccentBlue, children: "Brave Search (General Web Search)" }) }),
|
|
122055
|
+
/* @__PURE__ */ jsx31(Box25, { marginTop: 1, children: /* @__PURE__ */ jsxs28(Text32, { color: Colors.Gray, children: [
|
|
122040
122056
|
"Get API key: ",
|
|
122041
|
-
/* @__PURE__ */
|
|
122057
|
+
/* @__PURE__ */ jsx31(Text32, { color: Colors.AccentBlue, children: "https://api.search.brave.com/" })
|
|
122042
122058
|
] }) }),
|
|
122043
122059
|
/* @__PURE__ */ jsxs28(Box25, { marginTop: 1, flexDirection: "row", children: [
|
|
122044
|
-
/* @__PURE__ */
|
|
122060
|
+
/* @__PURE__ */ jsx31(Box25, { width: 14, children: /* @__PURE__ */ jsx31(
|
|
122045
122061
|
Text32,
|
|
122046
122062
|
{
|
|
122047
122063
|
color: currentField === "braveApiKey" ? Colors.AccentPurple : Colors.Gray,
|
|
122048
122064
|
children: "Brave API Key:"
|
|
122049
122065
|
}
|
|
122050
122066
|
) }),
|
|
122051
|
-
/* @__PURE__ */
|
|
122067
|
+
/* @__PURE__ */ jsx31(Box25, { flexGrow: 1, children: /* @__PURE__ */ jsxs28(Text32, { children: [
|
|
122052
122068
|
currentField === "braveApiKey" ? "> " : " ",
|
|
122053
122069
|
braveApiKey ? "\u2022".repeat(Math.min(braveApiKey.length, 20)) + (braveApiKey.length > 20 ? "..." : "") : "optional"
|
|
122054
122070
|
] }) })
|
|
122055
122071
|
] }),
|
|
122056
|
-
/* @__PURE__ */
|
|
122057
|
-
/* @__PURE__ */
|
|
122072
|
+
/* @__PURE__ */ jsx31(Box25, { marginTop: 1, children: /* @__PURE__ */ jsx31(Text32, { bold: true, color: Colors.AccentBlue, children: "Tavily Search (Research Focus)" }) }),
|
|
122073
|
+
/* @__PURE__ */ jsx31(Box25, { marginTop: 1, children: /* @__PURE__ */ jsxs28(Text32, { color: Colors.Gray, children: [
|
|
122058
122074
|
"Get API key: ",
|
|
122059
|
-
/* @__PURE__ */
|
|
122075
|
+
/* @__PURE__ */ jsx31(Text32, { color: Colors.AccentBlue, children: "https://tavily.com/" })
|
|
122060
122076
|
] }) }),
|
|
122061
122077
|
/* @__PURE__ */ jsxs28(Box25, { marginTop: 1, flexDirection: "row", children: [
|
|
122062
|
-
/* @__PURE__ */
|
|
122078
|
+
/* @__PURE__ */ jsx31(Box25, { width: 14, children: /* @__PURE__ */ jsx31(
|
|
122063
122079
|
Text32,
|
|
122064
122080
|
{
|
|
122065
122081
|
color: currentField === "tavilyApiKey" ? Colors.AccentPurple : Colors.Gray,
|
|
122066
122082
|
children: "Tavily API Key:"
|
|
122067
122083
|
}
|
|
122068
122084
|
) }),
|
|
122069
|
-
/* @__PURE__ */
|
|
122085
|
+
/* @__PURE__ */ jsx31(Box25, { flexGrow: 1, children: /* @__PURE__ */ jsxs28(Text32, { children: [
|
|
122070
122086
|
currentField === "tavilyApiKey" ? "> " : " ",
|
|
122071
122087
|
tavilyApiKey ? "\u2022".repeat(Math.min(tavilyApiKey.length, 20)) + (tavilyApiKey.length > 20 ? "..." : "") : "optional"
|
|
122072
122088
|
] }) })
|
|
122073
122089
|
] }),
|
|
122074
122090
|
/* @__PURE__ */ jsxs28(Box25, { marginTop: 1, flexDirection: "row", children: [
|
|
122075
|
-
/* @__PURE__ */
|
|
122091
|
+
/* @__PURE__ */ jsx31(Box25, { width: 14, children: /* @__PURE__ */ jsx31(
|
|
122076
122092
|
Text32,
|
|
122077
122093
|
{
|
|
122078
122094
|
color: currentField === "submit" ? Colors.AccentGreen : Colors.Gray,
|
|
122079
122095
|
children: "Ready:"
|
|
122080
122096
|
}
|
|
122081
122097
|
) }),
|
|
122082
|
-
/* @__PURE__ */
|
|
122098
|
+
/* @__PURE__ */ jsx31(Box25, { flexGrow: 1, children: /* @__PURE__ */ jsxs28(Text32, { color: currentField === "submit" ? Colors.AccentGreen : Colors.Gray, children: [
|
|
122083
122099
|
currentField === "submit" ? "> " : " ",
|
|
122084
122100
|
"Save & Continue"
|
|
122085
122101
|
] }) })
|
|
122086
122102
|
] }),
|
|
122087
|
-
/* @__PURE__ */
|
|
122088
|
-
!braveApiKey && !tavilyApiKey && /* @__PURE__ */
|
|
122103
|
+
/* @__PURE__ */ jsx31(Box25, { marginTop: 1, children: /* @__PURE__ */ jsx31(Text32, { color: Colors.Gray, children: "Press Enter to continue, Tab/\u2191\u2193 to navigate, Esc to cancel" }) }),
|
|
122104
|
+
!braveApiKey && !tavilyApiKey && /* @__PURE__ */ jsx31(Box25, { marginTop: 1, children: /* @__PURE__ */ jsx31(Text32, { color: Colors.AccentYellow, children: "\u26A0\uFE0F At least one API key is required for search functionality" }) })
|
|
122089
122105
|
]
|
|
122090
122106
|
}
|
|
122091
122107
|
);
|
|
@@ -122095,7 +122111,7 @@ function SearchEngineConfigDialog({
|
|
|
122095
122111
|
import { useState as useState39, useEffect as useEffect37 } from "react";
|
|
122096
122112
|
import { Box as Box26, Text as Text33 } from "ink";
|
|
122097
122113
|
import Spinner2 from "ink-spinner";
|
|
122098
|
-
import { jsx as
|
|
122114
|
+
import { jsx as jsx32, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
122099
122115
|
function AuthInProgress({
|
|
122100
122116
|
onTimeout
|
|
122101
122117
|
}) {
|
|
@@ -122115,7 +122131,7 @@ function AuthInProgress({
|
|
|
122115
122131
|
}, 18e4);
|
|
122116
122132
|
return () => clearTimeout(timer);
|
|
122117
122133
|
}, [onTimeout]);
|
|
122118
|
-
return /* @__PURE__ */
|
|
122134
|
+
return /* @__PURE__ */ jsx32(
|
|
122119
122135
|
Box26,
|
|
122120
122136
|
{
|
|
122121
122137
|
borderStyle: "round",
|
|
@@ -122123,8 +122139,8 @@ function AuthInProgress({
|
|
|
122123
122139
|
flexDirection: "column",
|
|
122124
122140
|
padding: 1,
|
|
122125
122141
|
width: "100%",
|
|
122126
|
-
children: timedOut ? /* @__PURE__ */
|
|
122127
|
-
/* @__PURE__ */
|
|
122142
|
+
children: timedOut ? /* @__PURE__ */ jsx32(Text33, { color: Colors.AccentRed, children: "Authentication timed out. Please try again." }) : /* @__PURE__ */ jsx32(Box26, { children: /* @__PURE__ */ jsxs29(Text33, { children: [
|
|
122143
|
+
/* @__PURE__ */ jsx32(Spinner2, { type: "dots" }),
|
|
122128
122144
|
" Waiting for auth... (Press ESC or CTRL+C to cancel)"
|
|
122129
122145
|
] }) })
|
|
122130
122146
|
}
|
|
@@ -122181,7 +122197,7 @@ var editorSettingsManager = new EditorSettingsManager();
|
|
|
122181
122197
|
// packages/cli/src/ui/components/EditorSettingsDialog.tsx
|
|
122182
122198
|
init_settings();
|
|
122183
122199
|
init_dist2();
|
|
122184
|
-
import { jsx as
|
|
122200
|
+
import { jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
122185
122201
|
function EditorSettingsDialog({
|
|
122186
122202
|
onSelect,
|
|
122187
122203
|
settings,
|
|
@@ -122251,9 +122267,9 @@ function EditorSettingsDialog({
|
|
|
122251
122267
|
focusedSection === "editor" ? "> " : " ",
|
|
122252
122268
|
"Select Editor",
|
|
122253
122269
|
" ",
|
|
122254
|
-
/* @__PURE__ */
|
|
122270
|
+
/* @__PURE__ */ jsx33(Text34, { color: Colors.Gray, children: otherScopeModifiedMessage })
|
|
122255
122271
|
] }),
|
|
122256
|
-
/* @__PURE__ */
|
|
122272
|
+
/* @__PURE__ */ jsx33(
|
|
122257
122273
|
RadioButtonSelect,
|
|
122258
122274
|
{
|
|
122259
122275
|
items: editorItems.map((item) => ({
|
|
@@ -122272,7 +122288,7 @@ function EditorSettingsDialog({
|
|
|
122272
122288
|
focusedSection === "scope" ? "> " : " ",
|
|
122273
122289
|
"Apply To"
|
|
122274
122290
|
] }),
|
|
122275
|
-
/* @__PURE__ */
|
|
122291
|
+
/* @__PURE__ */ jsx33(
|
|
122276
122292
|
RadioButtonSelect,
|
|
122277
122293
|
{
|
|
122278
122294
|
items: scopeItems,
|
|
@@ -122282,16 +122298,16 @@ function EditorSettingsDialog({
|
|
|
122282
122298
|
}
|
|
122283
122299
|
)
|
|
122284
122300
|
] }),
|
|
122285
|
-
/* @__PURE__ */
|
|
122301
|
+
/* @__PURE__ */ jsx33(Box27, { marginTop: 1, children: /* @__PURE__ */ jsx33(Text34, { color: Colors.Gray, children: "(Use Enter to select, Tab to change focus)" }) })
|
|
122286
122302
|
] }),
|
|
122287
122303
|
/* @__PURE__ */ jsxs30(Box27, { flexDirection: "column", width: "55%", paddingLeft: 2, children: [
|
|
122288
|
-
/* @__PURE__ */
|
|
122304
|
+
/* @__PURE__ */ jsx33(Text34, { bold: true, children: "Editor Preference" }),
|
|
122289
122305
|
/* @__PURE__ */ jsxs30(Box27, { flexDirection: "column", gap: 1, marginTop: 1, children: [
|
|
122290
|
-
/* @__PURE__ */
|
|
122306
|
+
/* @__PURE__ */ jsx33(Text34, { color: Colors.Gray, children: "These editors are currently supported. Please note that some editors cannot be used in sandbox mode." }),
|
|
122291
122307
|
/* @__PURE__ */ jsxs30(Text34, { color: Colors.Gray, children: [
|
|
122292
122308
|
"Your preferred editor is:",
|
|
122293
122309
|
" ",
|
|
122294
|
-
/* @__PURE__ */
|
|
122310
|
+
/* @__PURE__ */ jsx33(
|
|
122295
122311
|
Text34,
|
|
122296
122312
|
{
|
|
122297
122313
|
color: mergedEditorName === "None" ? Colors.AccentRed : Colors.AccentCyan,
|
|
@@ -122315,7 +122331,7 @@ import { Box as Box28, Text as Text36 } from "ink";
|
|
|
122315
122331
|
// packages/cli/src/ui/utils/InlineMarkdownRenderer.tsx
|
|
122316
122332
|
import React24 from "react";
|
|
122317
122333
|
import { Text as Text35 } from "ink";
|
|
122318
|
-
import { Fragment as Fragment6, jsx as
|
|
122334
|
+
import { Fragment as Fragment6, jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
122319
122335
|
var BOLD_MARKER_LENGTH = 2;
|
|
122320
122336
|
var ITALIC_MARKER_LENGTH = 1;
|
|
122321
122337
|
var STRIKETHROUGH_MARKER_LENGTH = 2;
|
|
@@ -122324,7 +122340,7 @@ var UNDERLINE_TAG_START_LENGTH = 3;
|
|
|
122324
122340
|
var UNDERLINE_TAG_END_LENGTH = 4;
|
|
122325
122341
|
var RenderInlineInternal = ({ text }) => {
|
|
122326
122342
|
if (!/[*_~`<[https?:]/.test(text)) {
|
|
122327
|
-
return /* @__PURE__ */
|
|
122343
|
+
return /* @__PURE__ */ jsx34(Text35, { children: text });
|
|
122328
122344
|
}
|
|
122329
122345
|
const nodes = [];
|
|
122330
122346
|
let lastIndex = 0;
|
|
@@ -122333,7 +122349,7 @@ var RenderInlineInternal = ({ text }) => {
|
|
|
122333
122349
|
while ((match2 = inlineRegex.exec(text)) !== null) {
|
|
122334
122350
|
if (match2.index > lastIndex) {
|
|
122335
122351
|
nodes.push(
|
|
122336
|
-
/* @__PURE__ */
|
|
122352
|
+
/* @__PURE__ */ jsx34(Text35, { children: text.slice(lastIndex, match2.index) }, `t-${lastIndex}`)
|
|
122337
122353
|
);
|
|
122338
122354
|
}
|
|
122339
122355
|
const fullMatch = match2[0];
|
|
@@ -122341,22 +122357,22 @@ var RenderInlineInternal = ({ text }) => {
|
|
|
122341
122357
|
const key = `m-${match2.index}`;
|
|
122342
122358
|
try {
|
|
122343
122359
|
if (fullMatch.startsWith("**") && fullMatch.endsWith("**") && fullMatch.length > BOLD_MARKER_LENGTH * 2) {
|
|
122344
|
-
renderedNode = /* @__PURE__ */
|
|
122360
|
+
renderedNode = /* @__PURE__ */ jsx34(Text35, { bold: true, children: fullMatch.slice(BOLD_MARKER_LENGTH, -BOLD_MARKER_LENGTH) }, key);
|
|
122345
122361
|
} else if (fullMatch.length > ITALIC_MARKER_LENGTH * 2 && (fullMatch.startsWith("*") && fullMatch.endsWith("*") || fullMatch.startsWith("_") && fullMatch.endsWith("_")) && !/\w/.test(text.substring(match2.index - 1, match2.index)) && !/\w/.test(
|
|
122346
122362
|
text.substring(inlineRegex.lastIndex, inlineRegex.lastIndex + 1)
|
|
122347
122363
|
) && !/\S[./\\]/.test(text.substring(match2.index - 2, match2.index)) && !/[./\\]\S/.test(
|
|
122348
122364
|
text.substring(inlineRegex.lastIndex, inlineRegex.lastIndex + 2)
|
|
122349
122365
|
)) {
|
|
122350
|
-
renderedNode = /* @__PURE__ */
|
|
122366
|
+
renderedNode = /* @__PURE__ */ jsx34(Text35, { italic: true, children: fullMatch.slice(ITALIC_MARKER_LENGTH, -ITALIC_MARKER_LENGTH) }, key);
|
|
122351
122367
|
} else if (fullMatch.startsWith("~~") && fullMatch.endsWith("~~") && fullMatch.length > STRIKETHROUGH_MARKER_LENGTH * 2) {
|
|
122352
|
-
renderedNode = /* @__PURE__ */
|
|
122368
|
+
renderedNode = /* @__PURE__ */ jsx34(Text35, { strikethrough: true, children: fullMatch.slice(
|
|
122353
122369
|
STRIKETHROUGH_MARKER_LENGTH,
|
|
122354
122370
|
-STRIKETHROUGH_MARKER_LENGTH
|
|
122355
122371
|
) }, key);
|
|
122356
122372
|
} else if (fullMatch.startsWith("`") && fullMatch.endsWith("`") && fullMatch.length > INLINE_CODE_MARKER_LENGTH) {
|
|
122357
122373
|
const codeMatch = fullMatch.match(/^(`+)(.+?)\1$/s);
|
|
122358
122374
|
if (codeMatch && codeMatch[2]) {
|
|
122359
|
-
renderedNode = /* @__PURE__ */
|
|
122375
|
+
renderedNode = /* @__PURE__ */ jsx34(Text35, { color: Colors.AccentPurple, children: codeMatch[2] }, key);
|
|
122360
122376
|
}
|
|
122361
122377
|
} else if (fullMatch.startsWith("[") && fullMatch.includes("](") && fullMatch.endsWith(")")) {
|
|
122362
122378
|
const linkMatch = fullMatch.match(/\[(.*?)\]\((.*?)\)/);
|
|
@@ -122373,24 +122389,24 @@ var RenderInlineInternal = ({ text }) => {
|
|
|
122373
122389
|
] }, key);
|
|
122374
122390
|
}
|
|
122375
122391
|
} else if (fullMatch.startsWith("<u>") && fullMatch.endsWith("</u>") && fullMatch.length > UNDERLINE_TAG_START_LENGTH + UNDERLINE_TAG_END_LENGTH - 1) {
|
|
122376
|
-
renderedNode = /* @__PURE__ */
|
|
122392
|
+
renderedNode = /* @__PURE__ */ jsx34(Text35, { underline: true, children: fullMatch.slice(
|
|
122377
122393
|
UNDERLINE_TAG_START_LENGTH,
|
|
122378
122394
|
-UNDERLINE_TAG_END_LENGTH
|
|
122379
122395
|
) }, key);
|
|
122380
122396
|
} else if (fullMatch.match(/^https?:\/\//)) {
|
|
122381
|
-
renderedNode = /* @__PURE__ */
|
|
122397
|
+
renderedNode = /* @__PURE__ */ jsx34(Text35, { color: Colors.AccentBlue, children: fullMatch }, key);
|
|
122382
122398
|
}
|
|
122383
122399
|
} catch (e2) {
|
|
122384
122400
|
console.error("Error parsing inline markdown part:", fullMatch, e2);
|
|
122385
122401
|
renderedNode = null;
|
|
122386
122402
|
}
|
|
122387
|
-
nodes.push(renderedNode ?? /* @__PURE__ */
|
|
122403
|
+
nodes.push(renderedNode ?? /* @__PURE__ */ jsx34(Text35, { children: fullMatch }, key));
|
|
122388
122404
|
lastIndex = inlineRegex.lastIndex;
|
|
122389
122405
|
}
|
|
122390
122406
|
if (lastIndex < text.length) {
|
|
122391
|
-
nodes.push(/* @__PURE__ */
|
|
122407
|
+
nodes.push(/* @__PURE__ */ jsx34(Text35, { children: text.slice(lastIndex) }, `t-${lastIndex}`));
|
|
122392
122408
|
}
|
|
122393
|
-
return /* @__PURE__ */
|
|
122409
|
+
return /* @__PURE__ */ jsx34(Fragment6, { children: nodes.filter((node) => node !== null) });
|
|
122394
122410
|
};
|
|
122395
122411
|
var RenderInline = React24.memo(RenderInlineInternal);
|
|
122396
122412
|
var getPlainTextLength = (text) => {
|
|
@@ -122399,7 +122415,7 @@ var getPlainTextLength = (text) => {
|
|
|
122399
122415
|
};
|
|
122400
122416
|
|
|
122401
122417
|
// packages/cli/src/ui/components/ShellConfirmationDialog.tsx
|
|
122402
|
-
import { jsx as
|
|
122418
|
+
import { jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
122403
122419
|
var ShellConfirmationDialog = ({ request: request2 }) => {
|
|
122404
122420
|
const { commands, onConfirm } = request2;
|
|
122405
122421
|
useKeypress(
|
|
@@ -122442,9 +122458,9 @@ var ShellConfirmationDialog = ({ request: request2 }) => {
|
|
|
122442
122458
|
marginLeft: 1,
|
|
122443
122459
|
children: [
|
|
122444
122460
|
/* @__PURE__ */ jsxs32(Box28, { flexDirection: "column", marginBottom: 1, children: [
|
|
122445
|
-
/* @__PURE__ */
|
|
122446
|
-
/* @__PURE__ */
|
|
122447
|
-
/* @__PURE__ */
|
|
122461
|
+
/* @__PURE__ */ jsx35(Text36, { bold: true, children: "Shell Command Execution" }),
|
|
122462
|
+
/* @__PURE__ */ jsx35(Text36, { children: "A custom command wants to run the following shell commands:" }),
|
|
122463
|
+
/* @__PURE__ */ jsx35(
|
|
122448
122464
|
Box28,
|
|
122449
122465
|
{
|
|
122450
122466
|
flexDirection: "column",
|
|
@@ -122452,12 +122468,12 @@ var ShellConfirmationDialog = ({ request: request2 }) => {
|
|
|
122452
122468
|
borderColor: Colors.Gray,
|
|
122453
122469
|
paddingX: 1,
|
|
122454
122470
|
marginTop: 1,
|
|
122455
|
-
children: commands.map((cmd) => /* @__PURE__ */
|
|
122471
|
+
children: commands.map((cmd) => /* @__PURE__ */ jsx35(Text36, { color: Colors.AccentCyan, children: /* @__PURE__ */ jsx35(RenderInline, { text: cmd }) }, cmd))
|
|
122456
122472
|
}
|
|
122457
122473
|
)
|
|
122458
122474
|
] }),
|
|
122459
|
-
/* @__PURE__ */
|
|
122460
|
-
/* @__PURE__ */
|
|
122475
|
+
/* @__PURE__ */ jsx35(Box28, { marginBottom: 1, children: /* @__PURE__ */ jsx35(Text36, { children: "Do you want to proceed?" }) }),
|
|
122476
|
+
/* @__PURE__ */ jsx35(RadioButtonSelect, { items: options2, onSelect: handleSelect, isFocused: true })
|
|
122461
122477
|
]
|
|
122462
122478
|
}
|
|
122463
122479
|
);
|
|
@@ -123510,24 +123526,24 @@ init_database();
|
|
|
123510
123526
|
|
|
123511
123527
|
// packages/cli/src/ui/components/Tips.tsx
|
|
123512
123528
|
import { Box as Box29, Text as Text37 } from "ink";
|
|
123513
|
-
import { jsx as
|
|
123529
|
+
import { jsx as jsx36, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
123514
123530
|
var Tips = ({ config }) => {
|
|
123515
123531
|
const geminiMdFileCount = config.getGeminiMdFileCount();
|
|
123516
123532
|
return /* @__PURE__ */ jsxs33(Box29, { flexDirection: "column", children: [
|
|
123517
|
-
/* @__PURE__ */
|
|
123518
|
-
/* @__PURE__ */
|
|
123519
|
-
/* @__PURE__ */
|
|
123533
|
+
/* @__PURE__ */ jsx36(Text37, { color: Colors.Foreground, children: "Tips for getting started:" }),
|
|
123534
|
+
/* @__PURE__ */ jsx36(Text37, { color: Colors.Foreground, children: "1. Ask questions, edit files, or run commands." }),
|
|
123535
|
+
/* @__PURE__ */ jsx36(Text37, { color: Colors.Foreground, children: "2. Be specific for the best results." }),
|
|
123520
123536
|
geminiMdFileCount === 0 && /* @__PURE__ */ jsxs33(Text37, { color: Colors.Foreground, children: [
|
|
123521
123537
|
"3. Create",
|
|
123522
123538
|
" ",
|
|
123523
|
-
/* @__PURE__ */
|
|
123539
|
+
/* @__PURE__ */ jsx36(Text37, { bold: true, color: Colors.AccentPurple, children: "LINK.md" }),
|
|
123524
123540
|
" ",
|
|
123525
123541
|
"files to customize your interactions with FSS Link."
|
|
123526
123542
|
] }),
|
|
123527
123543
|
/* @__PURE__ */ jsxs33(Text37, { color: Colors.Foreground, children: [
|
|
123528
123544
|
geminiMdFileCount === 0 ? "4." : "3.",
|
|
123529
123545
|
" ",
|
|
123530
|
-
/* @__PURE__ */
|
|
123546
|
+
/* @__PURE__ */ jsx36(Text37, { bold: true, color: Colors.AccentPurple, children: "/help" }),
|
|
123531
123547
|
" ",
|
|
123532
123548
|
"for more information."
|
|
123533
123549
|
] })
|
|
@@ -123583,7 +123599,7 @@ var ConsolePatcher = class {
|
|
|
123583
123599
|
|
|
123584
123600
|
// packages/cli/src/ui/components/DetailedMessagesDisplay.tsx
|
|
123585
123601
|
import { Box as Box30, Text as Text38 } from "ink";
|
|
123586
|
-
import { jsx as
|
|
123602
|
+
import { jsx as jsx37, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
123587
123603
|
var DetailedMessagesDisplay = ({ messages, maxHeight, width }) => {
|
|
123588
123604
|
if (messages.length === 0) {
|
|
123589
123605
|
return null;
|
|
@@ -123599,11 +123615,11 @@ var DetailedMessagesDisplay = ({ messages, maxHeight, width }) => {
|
|
|
123599
123615
|
paddingX: 1,
|
|
123600
123616
|
width,
|
|
123601
123617
|
children: [
|
|
123602
|
-
/* @__PURE__ */
|
|
123618
|
+
/* @__PURE__ */ jsx37(Box30, { marginBottom: 1, children: /* @__PURE__ */ jsxs34(Text38, { bold: true, color: Colors.Foreground, children: [
|
|
123603
123619
|
"Debug Console ",
|
|
123604
|
-
/* @__PURE__ */
|
|
123620
|
+
/* @__PURE__ */ jsx37(Text38, { color: Colors.Gray, children: "(ctrl+o to close)" })
|
|
123605
123621
|
] }) }),
|
|
123606
|
-
/* @__PURE__ */
|
|
123622
|
+
/* @__PURE__ */ jsx37(MaxSizedBox, { maxHeight, maxWidth: width - borderAndPadding, children: messages.map((msg, index) => {
|
|
123607
123623
|
let textColor = Colors.Foreground;
|
|
123608
123624
|
let icon = "\u2139";
|
|
123609
123625
|
switch (msg.type) {
|
|
@@ -123645,7 +123661,7 @@ var DetailedMessagesDisplay = ({ messages, maxHeight, width }) => {
|
|
|
123645
123661
|
|
|
123646
123662
|
// packages/cli/src/ui/components/messages/UserMessage.tsx
|
|
123647
123663
|
import { Text as Text39, Box as Box31 } from "ink";
|
|
123648
|
-
import { jsx as
|
|
123664
|
+
import { jsx as jsx38, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
123649
123665
|
var UserMessage = ({ text }) => {
|
|
123650
123666
|
const prefix = "> ";
|
|
123651
123667
|
const prefixWidth = prefix.length;
|
|
@@ -123663,8 +123679,8 @@ var UserMessage = ({ text }) => {
|
|
|
123663
123679
|
marginY: 1,
|
|
123664
123680
|
alignSelf: "flex-start",
|
|
123665
123681
|
children: [
|
|
123666
|
-
/* @__PURE__ */
|
|
123667
|
-
/* @__PURE__ */
|
|
123682
|
+
/* @__PURE__ */ jsx38(Box31, { width: prefixWidth, children: /* @__PURE__ */ jsx38(Text39, { color: textColor, children: prefix }) }),
|
|
123683
|
+
/* @__PURE__ */ jsx38(Box31, { flexGrow: 1, children: /* @__PURE__ */ jsx38(Text39, { wrap: "wrap", color: textColor, children: text }) })
|
|
123668
123684
|
]
|
|
123669
123685
|
}
|
|
123670
123686
|
);
|
|
@@ -123672,12 +123688,12 @@ var UserMessage = ({ text }) => {
|
|
|
123672
123688
|
|
|
123673
123689
|
// packages/cli/src/ui/components/messages/UserShellMessage.tsx
|
|
123674
123690
|
import { Box as Box32, Text as Text40 } from "ink";
|
|
123675
|
-
import { jsx as
|
|
123691
|
+
import { jsx as jsx39, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
123676
123692
|
var UserShellMessage = ({ text }) => {
|
|
123677
123693
|
const commandToDisplay = text.startsWith("!") ? text.substring(1) : text;
|
|
123678
123694
|
return /* @__PURE__ */ jsxs36(Box32, { children: [
|
|
123679
|
-
/* @__PURE__ */
|
|
123680
|
-
/* @__PURE__ */
|
|
123695
|
+
/* @__PURE__ */ jsx39(Text40, { color: Colors.AccentCyan, children: "$ " }),
|
|
123696
|
+
/* @__PURE__ */ jsx39(Text40, { children: commandToDisplay })
|
|
123681
123697
|
] });
|
|
123682
123698
|
};
|
|
123683
123699
|
|
|
@@ -123691,7 +123707,7 @@ import { Text as Text42, Box as Box34 } from "ink";
|
|
|
123691
123707
|
// packages/cli/src/ui/utils/TableRenderer.tsx
|
|
123692
123708
|
import React25 from "react";
|
|
123693
123709
|
import { Text as Text41, Box as Box33 } from "ink";
|
|
123694
|
-
import { jsx as
|
|
123710
|
+
import { jsx as jsx40, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
123695
123711
|
var TableRenderer = ({
|
|
123696
123712
|
headers,
|
|
123697
123713
|
rows,
|
|
@@ -123740,7 +123756,7 @@ var TableRenderer = ({
|
|
|
123740
123756
|
const actualDisplayWidth = getPlainTextLength(cellContent);
|
|
123741
123757
|
const paddingNeeded = Math.max(0, contentWidth - actualDisplayWidth);
|
|
123742
123758
|
return /* @__PURE__ */ jsxs37(Text41, { children: [
|
|
123743
|
-
isHeader ? /* @__PURE__ */
|
|
123759
|
+
isHeader ? /* @__PURE__ */ jsx40(Text41, { bold: true, color: Colors.AccentCyan, children: /* @__PURE__ */ jsx40(RenderInline, { text: cellContent }) }) : /* @__PURE__ */ jsx40(RenderInline, { text: cellContent }),
|
|
123744
123760
|
" ".repeat(paddingNeeded)
|
|
123745
123761
|
] });
|
|
123746
123762
|
};
|
|
@@ -123753,7 +123769,7 @@ var TableRenderer = ({
|
|
|
123753
123769
|
const char = chars[type2];
|
|
123754
123770
|
const borderParts = adjustedWidths.map((w) => char.horizontal.repeat(w));
|
|
123755
123771
|
const border = char.left + borderParts.join(char.middle) + char.right;
|
|
123756
|
-
return /* @__PURE__ */
|
|
123772
|
+
return /* @__PURE__ */ jsx40(Text41, { children: border });
|
|
123757
123773
|
};
|
|
123758
123774
|
const renderRow = (cells, isHeader = false) => {
|
|
123759
123775
|
const renderedCells = cells.map((cell, index) => {
|
|
@@ -123775,7 +123791,7 @@ var TableRenderer = ({
|
|
|
123775
123791
|
renderBorder("top"),
|
|
123776
123792
|
renderRow(headers, true),
|
|
123777
123793
|
renderBorder("middle"),
|
|
123778
|
-
rows.map((row, index) => /* @__PURE__ */
|
|
123794
|
+
rows.map((row, index) => /* @__PURE__ */ jsx40(React25.Fragment, { children: renderRow(row) }, index)),
|
|
123779
123795
|
renderBorder("bottom")
|
|
123780
123796
|
] });
|
|
123781
123797
|
};
|
|
@@ -123794,7 +123810,7 @@ var useSettings = () => {
|
|
|
123794
123810
|
};
|
|
123795
123811
|
|
|
123796
123812
|
// packages/cli/src/ui/utils/MarkdownDisplay.tsx
|
|
123797
|
-
import { Fragment as Fragment7, jsx as
|
|
123813
|
+
import { Fragment as Fragment7, jsx as jsx41, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
123798
123814
|
var EMPTY_LINE_HEIGHT = 1;
|
|
123799
123815
|
var CODE_BLOCK_PREFIX_PADDING = 1;
|
|
123800
123816
|
var LIST_ITEM_PREFIX_PADDING = 1;
|
|
@@ -123805,7 +123821,7 @@ var MarkdownDisplayInternal = ({
|
|
|
123805
123821
|
availableTerminalHeight,
|
|
123806
123822
|
terminalWidth
|
|
123807
123823
|
}) => {
|
|
123808
|
-
if (!text) return /* @__PURE__ */
|
|
123824
|
+
if (!text) return /* @__PURE__ */ jsx41(Fragment7, {});
|
|
123809
123825
|
const lines = text.split("\n");
|
|
123810
123826
|
const headerRegex = /^ *(#{1,4}) +(.*)/;
|
|
123811
123827
|
const codeFenceRegex = /^ *(`{3,}|~{3,}) *(\w*?) *$/;
|
|
@@ -123835,7 +123851,7 @@ var MarkdownDisplayInternal = ({
|
|
|
123835
123851
|
const fenceMatch = line.match(codeFenceRegex);
|
|
123836
123852
|
if (fenceMatch && fenceMatch[1].startsWith(codeBlockFence[0]) && fenceMatch[1].length >= codeBlockFence.length) {
|
|
123837
123853
|
addContentBlock(
|
|
123838
|
-
/* @__PURE__ */
|
|
123854
|
+
/* @__PURE__ */ jsx41(
|
|
123839
123855
|
RenderCodeBlock,
|
|
123840
123856
|
{
|
|
123841
123857
|
content: codeBlockContent,
|
|
@@ -123874,7 +123890,7 @@ var MarkdownDisplayInternal = ({
|
|
|
123874
123890
|
tableRows = [];
|
|
123875
123891
|
} else {
|
|
123876
123892
|
addContentBlock(
|
|
123877
|
-
/* @__PURE__ */
|
|
123893
|
+
/* @__PURE__ */ jsx41(Box34, { children: /* @__PURE__ */ jsx41(Text42, { wrap: "wrap", children: /* @__PURE__ */ jsx41(RenderInline, { text: line }) }) }, key)
|
|
123878
123894
|
);
|
|
123879
123895
|
}
|
|
123880
123896
|
} else if (inTable && tableSeparatorMatch) {
|
|
@@ -123890,7 +123906,7 @@ var MarkdownDisplayInternal = ({
|
|
|
123890
123906
|
} else if (inTable && !tableRowMatch) {
|
|
123891
123907
|
if (tableHeaders.length > 0 && tableRows.length > 0) {
|
|
123892
123908
|
addContentBlock(
|
|
123893
|
-
/* @__PURE__ */
|
|
123909
|
+
/* @__PURE__ */ jsx41(
|
|
123894
123910
|
RenderTable,
|
|
123895
123911
|
{
|
|
123896
123912
|
headers: tableHeaders,
|
|
@@ -123906,12 +123922,12 @@ var MarkdownDisplayInternal = ({
|
|
|
123906
123922
|
tableHeaders = [];
|
|
123907
123923
|
if (line.trim().length > 0) {
|
|
123908
123924
|
addContentBlock(
|
|
123909
|
-
/* @__PURE__ */
|
|
123925
|
+
/* @__PURE__ */ jsx41(Box34, { children: /* @__PURE__ */ jsx41(Text42, { wrap: "wrap", children: /* @__PURE__ */ jsx41(RenderInline, { text: line }) }) }, key)
|
|
123910
123926
|
);
|
|
123911
123927
|
}
|
|
123912
123928
|
} else if (hrMatch) {
|
|
123913
123929
|
addContentBlock(
|
|
123914
|
-
/* @__PURE__ */
|
|
123930
|
+
/* @__PURE__ */ jsx41(Box34, { children: /* @__PURE__ */ jsx41(Text42, { dimColor: true, children: "---" }) }, key)
|
|
123915
123931
|
);
|
|
123916
123932
|
} else if (headerMatch) {
|
|
123917
123933
|
const level = headerMatch[1].length;
|
|
@@ -123919,28 +123935,28 @@ var MarkdownDisplayInternal = ({
|
|
|
123919
123935
|
let headerNode = null;
|
|
123920
123936
|
switch (level) {
|
|
123921
123937
|
case 1:
|
|
123922
|
-
headerNode = /* @__PURE__ */
|
|
123938
|
+
headerNode = /* @__PURE__ */ jsx41(Text42, { bold: true, color: Colors.AccentCyan, children: /* @__PURE__ */ jsx41(RenderInline, { text: headerText }) });
|
|
123923
123939
|
break;
|
|
123924
123940
|
case 2:
|
|
123925
|
-
headerNode = /* @__PURE__ */
|
|
123941
|
+
headerNode = /* @__PURE__ */ jsx41(Text42, { bold: true, color: Colors.AccentBlue, children: /* @__PURE__ */ jsx41(RenderInline, { text: headerText }) });
|
|
123926
123942
|
break;
|
|
123927
123943
|
case 3:
|
|
123928
|
-
headerNode = /* @__PURE__ */
|
|
123944
|
+
headerNode = /* @__PURE__ */ jsx41(Text42, { bold: true, children: /* @__PURE__ */ jsx41(RenderInline, { text: headerText }) });
|
|
123929
123945
|
break;
|
|
123930
123946
|
case 4:
|
|
123931
|
-
headerNode = /* @__PURE__ */
|
|
123947
|
+
headerNode = /* @__PURE__ */ jsx41(Text42, { italic: true, color: Colors.Gray, children: /* @__PURE__ */ jsx41(RenderInline, { text: headerText }) });
|
|
123932
123948
|
break;
|
|
123933
123949
|
default:
|
|
123934
|
-
headerNode = /* @__PURE__ */
|
|
123950
|
+
headerNode = /* @__PURE__ */ jsx41(Text42, { children: /* @__PURE__ */ jsx41(RenderInline, { text: headerText }) });
|
|
123935
123951
|
break;
|
|
123936
123952
|
}
|
|
123937
|
-
if (headerNode) addContentBlock(/* @__PURE__ */
|
|
123953
|
+
if (headerNode) addContentBlock(/* @__PURE__ */ jsx41(Box34, { children: headerNode }, key));
|
|
123938
123954
|
} else if (ulMatch) {
|
|
123939
123955
|
const leadingWhitespace = ulMatch[1];
|
|
123940
123956
|
const marker = ulMatch[2];
|
|
123941
123957
|
const itemText = ulMatch[3];
|
|
123942
123958
|
addContentBlock(
|
|
123943
|
-
/* @__PURE__ */
|
|
123959
|
+
/* @__PURE__ */ jsx41(
|
|
123944
123960
|
RenderListItem,
|
|
123945
123961
|
{
|
|
123946
123962
|
itemText,
|
|
@@ -123956,7 +123972,7 @@ var MarkdownDisplayInternal = ({
|
|
|
123956
123972
|
const marker = olMatch[2];
|
|
123957
123973
|
const itemText = olMatch[3];
|
|
123958
123974
|
addContentBlock(
|
|
123959
|
-
/* @__PURE__ */
|
|
123975
|
+
/* @__PURE__ */ jsx41(
|
|
123960
123976
|
RenderListItem,
|
|
123961
123977
|
{
|
|
123962
123978
|
itemText,
|
|
@@ -123971,20 +123987,20 @@ var MarkdownDisplayInternal = ({
|
|
|
123971
123987
|
if (line.trim().length === 0 && !inCodeBlock) {
|
|
123972
123988
|
if (!lastLineEmpty) {
|
|
123973
123989
|
contentBlocks.push(
|
|
123974
|
-
/* @__PURE__ */
|
|
123990
|
+
/* @__PURE__ */ jsx41(Box34, { height: EMPTY_LINE_HEIGHT }, `spacer-${index}`)
|
|
123975
123991
|
);
|
|
123976
123992
|
lastLineEmpty = true;
|
|
123977
123993
|
}
|
|
123978
123994
|
} else {
|
|
123979
123995
|
addContentBlock(
|
|
123980
|
-
/* @__PURE__ */
|
|
123996
|
+
/* @__PURE__ */ jsx41(Box34, { children: /* @__PURE__ */ jsx41(Text42, { wrap: "wrap", children: /* @__PURE__ */ jsx41(RenderInline, { text: line }) }) }, key)
|
|
123981
123997
|
);
|
|
123982
123998
|
}
|
|
123983
123999
|
}
|
|
123984
124000
|
});
|
|
123985
124001
|
if (inCodeBlock) {
|
|
123986
124002
|
addContentBlock(
|
|
123987
|
-
/* @__PURE__ */
|
|
124003
|
+
/* @__PURE__ */ jsx41(
|
|
123988
124004
|
RenderCodeBlock,
|
|
123989
124005
|
{
|
|
123990
124006
|
content: codeBlockContent,
|
|
@@ -123999,7 +124015,7 @@ var MarkdownDisplayInternal = ({
|
|
|
123999
124015
|
}
|
|
124000
124016
|
if (inTable && tableHeaders.length > 0 && tableRows.length > 0) {
|
|
124001
124017
|
addContentBlock(
|
|
124002
|
-
/* @__PURE__ */
|
|
124018
|
+
/* @__PURE__ */ jsx41(
|
|
124003
124019
|
RenderTable,
|
|
124004
124020
|
{
|
|
124005
124021
|
headers: tableHeaders,
|
|
@@ -124010,7 +124026,7 @@ var MarkdownDisplayInternal = ({
|
|
|
124010
124026
|
)
|
|
124011
124027
|
);
|
|
124012
124028
|
}
|
|
124013
|
-
return /* @__PURE__ */
|
|
124029
|
+
return /* @__PURE__ */ jsx41(Fragment7, { children: contentBlocks });
|
|
124014
124030
|
};
|
|
124015
124031
|
var RenderCodeBlockInternal = ({
|
|
124016
124032
|
content,
|
|
@@ -124029,7 +124045,7 @@ var RenderCodeBlockInternal = ({
|
|
|
124029
124045
|
);
|
|
124030
124046
|
if (content.length > MAX_CODE_LINES_WHEN_PENDING) {
|
|
124031
124047
|
if (MAX_CODE_LINES_WHEN_PENDING < MIN_LINES_FOR_MESSAGE) {
|
|
124032
|
-
return /* @__PURE__ */
|
|
124048
|
+
return /* @__PURE__ */ jsx41(Box34, { paddingLeft: CODE_BLOCK_PREFIX_PADDING, children: /* @__PURE__ */ jsx41(Text42, { color: Colors.Gray, children: "... code is being written ..." }) });
|
|
124033
124049
|
}
|
|
124034
124050
|
const truncatedContent = content.slice(0, MAX_CODE_LINES_WHEN_PENDING);
|
|
124035
124051
|
const colorizedTruncatedCode = colorizeCode(
|
|
@@ -124042,7 +124058,7 @@ var RenderCodeBlockInternal = ({
|
|
|
124042
124058
|
);
|
|
124043
124059
|
return /* @__PURE__ */ jsxs38(Box34, { paddingLeft: CODE_BLOCK_PREFIX_PADDING, flexDirection: "column", children: [
|
|
124044
124060
|
colorizedTruncatedCode,
|
|
124045
|
-
/* @__PURE__ */
|
|
124061
|
+
/* @__PURE__ */ jsx41(Text42, { color: Colors.Gray, children: "... generating more ..." })
|
|
124046
124062
|
] });
|
|
124047
124063
|
}
|
|
124048
124064
|
}
|
|
@@ -124055,7 +124071,7 @@ var RenderCodeBlockInternal = ({
|
|
|
124055
124071
|
void 0,
|
|
124056
124072
|
settings
|
|
124057
124073
|
);
|
|
124058
|
-
return /* @__PURE__ */
|
|
124074
|
+
return /* @__PURE__ */ jsx41(
|
|
124059
124075
|
Box34,
|
|
124060
124076
|
{
|
|
124061
124077
|
paddingLeft: CODE_BLOCK_PREFIX_PADDING,
|
|
@@ -124082,8 +124098,8 @@ var RenderListItemInternal = ({
|
|
|
124082
124098
|
paddingLeft: indentation + LIST_ITEM_PREFIX_PADDING,
|
|
124083
124099
|
flexDirection: "row",
|
|
124084
124100
|
children: [
|
|
124085
|
-
/* @__PURE__ */
|
|
124086
|
-
/* @__PURE__ */
|
|
124101
|
+
/* @__PURE__ */ jsx41(Box34, { width: prefixWidth, children: /* @__PURE__ */ jsx41(Text42, { children: prefix }) }),
|
|
124102
|
+
/* @__PURE__ */ jsx41(Box34, { flexGrow: LIST_ITEM_TEXT_FLEX_GROW, children: /* @__PURE__ */ jsx41(Text42, { wrap: "wrap", children: /* @__PURE__ */ jsx41(RenderInline, { text: itemText }) }) })
|
|
124087
124103
|
]
|
|
124088
124104
|
}
|
|
124089
124105
|
);
|
|
@@ -124093,12 +124109,12 @@ var RenderTableInternal = ({
|
|
|
124093
124109
|
headers,
|
|
124094
124110
|
rows,
|
|
124095
124111
|
terminalWidth
|
|
124096
|
-
}) => /* @__PURE__ */
|
|
124112
|
+
}) => /* @__PURE__ */ jsx41(TableRenderer, { headers, rows, terminalWidth });
|
|
124097
124113
|
var RenderTable = React27.memo(RenderTableInternal);
|
|
124098
124114
|
var MarkdownDisplay = React27.memo(MarkdownDisplayInternal);
|
|
124099
124115
|
|
|
124100
124116
|
// packages/cli/src/ui/components/messages/GeminiMessage.tsx
|
|
124101
|
-
import { jsx as
|
|
124117
|
+
import { jsx as jsx42, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
124102
124118
|
var GeminiMessage = ({
|
|
124103
124119
|
text,
|
|
124104
124120
|
isPending,
|
|
@@ -124108,8 +124124,8 @@ var GeminiMessage = ({
|
|
|
124108
124124
|
const prefix = "\u2726 ";
|
|
124109
124125
|
const prefixWidth = prefix.length;
|
|
124110
124126
|
return /* @__PURE__ */ jsxs39(Box35, { flexDirection: "row", children: [
|
|
124111
|
-
/* @__PURE__ */
|
|
124112
|
-
/* @__PURE__ */
|
|
124127
|
+
/* @__PURE__ */ jsx42(Box35, { width: prefixWidth, children: /* @__PURE__ */ jsx42(Text43, { color: Colors.AccentPurple, children: prefix }) }),
|
|
124128
|
+
/* @__PURE__ */ jsx42(Box35, { flexGrow: 1, flexDirection: "column", children: /* @__PURE__ */ jsx42(
|
|
124113
124129
|
MarkdownDisplay,
|
|
124114
124130
|
{
|
|
124115
124131
|
text,
|
|
@@ -124123,25 +124139,25 @@ var GeminiMessage = ({
|
|
|
124123
124139
|
|
|
124124
124140
|
// packages/cli/src/ui/components/messages/InfoMessage.tsx
|
|
124125
124141
|
import { Text as Text44, Box as Box36 } from "ink";
|
|
124126
|
-
import { jsx as
|
|
124142
|
+
import { jsx as jsx43, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
124127
124143
|
var InfoMessage = ({ text }) => {
|
|
124128
124144
|
const prefix = "\u2139 ";
|
|
124129
124145
|
const prefixWidth = prefix.length;
|
|
124130
124146
|
return /* @__PURE__ */ jsxs40(Box36, { flexDirection: "row", marginTop: 1, children: [
|
|
124131
|
-
/* @__PURE__ */
|
|
124132
|
-
/* @__PURE__ */
|
|
124147
|
+
/* @__PURE__ */ jsx43(Box36, { width: prefixWidth, children: /* @__PURE__ */ jsx43(Text44, { color: Colors.AccentYellow, children: prefix }) }),
|
|
124148
|
+
/* @__PURE__ */ jsx43(Box36, { flexGrow: 1, children: /* @__PURE__ */ jsx43(Text44, { wrap: "wrap", color: Colors.AccentYellow, children: /* @__PURE__ */ jsx43(RenderInline, { text }) }) })
|
|
124133
124149
|
] });
|
|
124134
124150
|
};
|
|
124135
124151
|
|
|
124136
124152
|
// packages/cli/src/ui/components/messages/ErrorMessage.tsx
|
|
124137
124153
|
import { Text as Text45, Box as Box37 } from "ink";
|
|
124138
|
-
import { jsx as
|
|
124154
|
+
import { jsx as jsx44, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
124139
124155
|
var ErrorMessage = ({ text }) => {
|
|
124140
124156
|
const prefix = "\u2715 ";
|
|
124141
124157
|
const prefixWidth = prefix.length;
|
|
124142
124158
|
return /* @__PURE__ */ jsxs41(Box37, { flexDirection: "row", marginBottom: 1, children: [
|
|
124143
|
-
/* @__PURE__ */
|
|
124144
|
-
/* @__PURE__ */
|
|
124159
|
+
/* @__PURE__ */ jsx44(Box37, { width: prefixWidth, children: /* @__PURE__ */ jsx44(Text45, { color: Colors.AccentRed, children: prefix }) }),
|
|
124160
|
+
/* @__PURE__ */ jsx44(Box37, { flexGrow: 1, children: /* @__PURE__ */ jsx44(Text45, { wrap: "wrap", color: Colors.AccentRed, children: text }) })
|
|
124145
124161
|
] });
|
|
124146
124162
|
};
|
|
124147
124163
|
|
|
@@ -124155,7 +124171,7 @@ import { Box as Box39, Text as Text47 } from "ink";
|
|
|
124155
124171
|
|
|
124156
124172
|
// packages/cli/src/ui/components/TodoDisplay.tsx
|
|
124157
124173
|
import { Box as Box38, Text as Text46 } from "ink";
|
|
124158
|
-
import { jsx as
|
|
124174
|
+
import { jsx as jsx45, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
124159
124175
|
var STATUS_ICONS = {
|
|
124160
124176
|
pending: "\u25CB",
|
|
124161
124177
|
in_progress: "\u25D0",
|
|
@@ -124165,7 +124181,7 @@ var TodoDisplay = ({ todos }) => {
|
|
|
124165
124181
|
if (!todos || todos.length === 0) {
|
|
124166
124182
|
return null;
|
|
124167
124183
|
}
|
|
124168
|
-
return /* @__PURE__ */
|
|
124184
|
+
return /* @__PURE__ */ jsx45(Box38, { flexDirection: "column", children: todos.map((todo) => /* @__PURE__ */ jsx45(TodoItemRow, { todo }, todo.id)) });
|
|
124169
124185
|
};
|
|
124170
124186
|
var TodoItemRow = ({ todo }) => {
|
|
124171
124187
|
const statusIcon = STATUS_ICONS[todo.status];
|
|
@@ -124173,13 +124189,13 @@ var TodoItemRow = ({ todo }) => {
|
|
|
124173
124189
|
const isInProgress = todo.status === "in_progress";
|
|
124174
124190
|
const itemColor = isCompleted ? Colors.Foreground : isInProgress ? Colors.AccentGreen : Colors.Foreground;
|
|
124175
124191
|
return /* @__PURE__ */ jsxs42(Box38, { flexDirection: "row", minHeight: 1, children: [
|
|
124176
|
-
/* @__PURE__ */
|
|
124177
|
-
/* @__PURE__ */
|
|
124192
|
+
/* @__PURE__ */ jsx45(Box38, { width: 3, children: /* @__PURE__ */ jsx45(Text46, { color: itemColor, children: statusIcon }) }),
|
|
124193
|
+
/* @__PURE__ */ jsx45(Box38, { flexGrow: 1, children: /* @__PURE__ */ jsx45(Text46, { color: itemColor, strikethrough: isCompleted, wrap: "wrap", children: todo.content }) })
|
|
124178
124194
|
] });
|
|
124179
124195
|
};
|
|
124180
124196
|
|
|
124181
124197
|
// packages/cli/src/ui/components/messages/ToolMessage.tsx
|
|
124182
|
-
import { jsx as
|
|
124198
|
+
import { jsx as jsx46, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
124183
124199
|
var STATIC_HEIGHT = 1;
|
|
124184
124200
|
var RESERVED_LINE_COUNT = 5;
|
|
124185
124201
|
var STATUS_INDICATOR_WIDTH = 3;
|
|
@@ -124208,14 +124224,14 @@ var useResultDisplayRenderer = (resultDisplay) => React28.useMemo(() => {
|
|
|
124208
124224
|
}, [resultDisplay]);
|
|
124209
124225
|
var TodoResultRenderer = ({
|
|
124210
124226
|
data
|
|
124211
|
-
}) => /* @__PURE__ */
|
|
124227
|
+
}) => /* @__PURE__ */ jsx46(TodoDisplay, { todos: data.todos });
|
|
124212
124228
|
var StringResultRenderer = ({ data, renderAsMarkdown, availableHeight, childWidth }) => {
|
|
124213
124229
|
let displayData = data;
|
|
124214
124230
|
if (displayData.length > MAXIMUM_RESULT_DISPLAY_CHARACTERS) {
|
|
124215
124231
|
displayData = "..." + displayData.slice(-MAXIMUM_RESULT_DISPLAY_CHARACTERS);
|
|
124216
124232
|
}
|
|
124217
124233
|
if (renderAsMarkdown) {
|
|
124218
|
-
return /* @__PURE__ */
|
|
124234
|
+
return /* @__PURE__ */ jsx46(Box39, { flexDirection: "column", children: /* @__PURE__ */ jsx46(
|
|
124219
124235
|
MarkdownDisplay,
|
|
124220
124236
|
{
|
|
124221
124237
|
text: displayData,
|
|
@@ -124225,9 +124241,9 @@ var StringResultRenderer = ({ data, renderAsMarkdown, availableHeight, childWidt
|
|
|
124225
124241
|
}
|
|
124226
124242
|
) });
|
|
124227
124243
|
}
|
|
124228
|
-
return /* @__PURE__ */
|
|
124244
|
+
return /* @__PURE__ */ jsx46(MaxSizedBox, { maxHeight: availableHeight, maxWidth: childWidth, children: /* @__PURE__ */ jsx46(Box39, { children: /* @__PURE__ */ jsx46(Text47, { wrap: "wrap", children: displayData }) }) });
|
|
124229
124245
|
};
|
|
124230
|
-
var DiffResultRenderer = ({ data, availableHeight, childWidth }) => /* @__PURE__ */
|
|
124246
|
+
var DiffResultRenderer = ({ data, availableHeight, childWidth }) => /* @__PURE__ */ jsx46(
|
|
124231
124247
|
DiffRenderer,
|
|
124232
124248
|
{
|
|
124233
124249
|
diffContent: data.fileDiff,
|
|
@@ -124258,8 +124274,8 @@ var ToolMessage = ({
|
|
|
124258
124274
|
const displayRenderer = useResultDisplayRenderer(resultDisplay);
|
|
124259
124275
|
return /* @__PURE__ */ jsxs43(Box39, { paddingX: 1, paddingY: 0, flexDirection: "column", children: [
|
|
124260
124276
|
/* @__PURE__ */ jsxs43(Box39, { minHeight: 1, children: [
|
|
124261
|
-
/* @__PURE__ */
|
|
124262
|
-
/* @__PURE__ */
|
|
124277
|
+
/* @__PURE__ */ jsx46(ToolStatusIndicator, { status }),
|
|
124278
|
+
/* @__PURE__ */ jsx46(
|
|
124263
124279
|
ToolInfo,
|
|
124264
124280
|
{
|
|
124265
124281
|
name: name2,
|
|
@@ -124268,11 +124284,11 @@ var ToolMessage = ({
|
|
|
124268
124284
|
emphasis
|
|
124269
124285
|
}
|
|
124270
124286
|
),
|
|
124271
|
-
emphasis === "high" && /* @__PURE__ */
|
|
124287
|
+
emphasis === "high" && /* @__PURE__ */ jsx46(TrailingIndicator, {})
|
|
124272
124288
|
] }),
|
|
124273
|
-
displayRenderer.type !== "none" && /* @__PURE__ */
|
|
124274
|
-
displayRenderer.type === "todo" && /* @__PURE__ */
|
|
124275
|
-
displayRenderer.type === "string" && /* @__PURE__ */
|
|
124289
|
+
displayRenderer.type !== "none" && /* @__PURE__ */ jsx46(Box39, { paddingLeft: STATUS_INDICATOR_WIDTH, width: "100%", marginTop: 1, children: /* @__PURE__ */ jsxs43(Box39, { flexDirection: "column", children: [
|
|
124290
|
+
displayRenderer.type === "todo" && /* @__PURE__ */ jsx46(TodoResultRenderer, { data: displayRenderer.data }),
|
|
124291
|
+
displayRenderer.type === "string" && /* @__PURE__ */ jsx46(
|
|
124276
124292
|
StringResultRenderer,
|
|
124277
124293
|
{
|
|
124278
124294
|
data: displayRenderer.data,
|
|
@@ -124281,7 +124297,7 @@ var ToolMessage = ({
|
|
|
124281
124297
|
childWidth
|
|
124282
124298
|
}
|
|
124283
124299
|
),
|
|
124284
|
-
displayRenderer.type === "diff" && /* @__PURE__ */
|
|
124300
|
+
displayRenderer.type === "diff" && /* @__PURE__ */ jsx46(
|
|
124285
124301
|
DiffResultRenderer,
|
|
124286
124302
|
{
|
|
124287
124303
|
data: displayRenderer.data,
|
|
@@ -124295,18 +124311,18 @@ var ToolMessage = ({
|
|
|
124295
124311
|
var ToolStatusIndicator = ({
|
|
124296
124312
|
status
|
|
124297
124313
|
}) => /* @__PURE__ */ jsxs43(Box39, { minWidth: STATUS_INDICATOR_WIDTH, children: [
|
|
124298
|
-
status === "Pending" /* Pending */ && /* @__PURE__ */
|
|
124299
|
-
status === "Executing" /* Executing */ && /* @__PURE__ */
|
|
124314
|
+
status === "Pending" /* Pending */ && /* @__PURE__ */ jsx46(Text47, { color: Colors.AccentGreen, children: "o" }),
|
|
124315
|
+
status === "Executing" /* Executing */ && /* @__PURE__ */ jsx46(
|
|
124300
124316
|
GeminiRespondingSpinner,
|
|
124301
124317
|
{
|
|
124302
124318
|
spinnerType: "toggle",
|
|
124303
124319
|
nonRespondingDisplay: "\u22B7"
|
|
124304
124320
|
}
|
|
124305
124321
|
),
|
|
124306
|
-
status === "Success" /* Success */ && /* @__PURE__ */
|
|
124307
|
-
status === "Confirming" /* Confirming */ && /* @__PURE__ */
|
|
124308
|
-
status === "Canceled" /* Canceled */ && /* @__PURE__ */
|
|
124309
|
-
status === "Error" /* Error */ && /* @__PURE__ */
|
|
124322
|
+
status === "Success" /* Success */ && /* @__PURE__ */ jsx46(Text47, { color: Colors.AccentGreen, children: "\u2714" }),
|
|
124323
|
+
status === "Confirming" /* Confirming */ && /* @__PURE__ */ jsx46(Text47, { color: Colors.AccentYellow, children: "?" }),
|
|
124324
|
+
status === "Canceled" /* Canceled */ && /* @__PURE__ */ jsx46(Text47, { color: Colors.AccentYellow, bold: true, children: "-" }),
|
|
124325
|
+
status === "Error" /* Error */ && /* @__PURE__ */ jsx46(Text47, { color: Colors.AccentRed, bold: true, children: "x" })
|
|
124310
124326
|
] });
|
|
124311
124327
|
var ToolInfo = ({
|
|
124312
124328
|
name: name2,
|
|
@@ -124328,15 +124344,15 @@ var ToolInfo = ({
|
|
|
124328
124344
|
}
|
|
124329
124345
|
}
|
|
124330
124346
|
}, [emphasis]);
|
|
124331
|
-
return /* @__PURE__ */
|
|
124347
|
+
return /* @__PURE__ */ jsx46(Box39, { children: /* @__PURE__ */ jsxs43(
|
|
124332
124348
|
Text47,
|
|
124333
124349
|
{
|
|
124334
124350
|
wrap: "truncate-end",
|
|
124335
124351
|
strikethrough: status === "Canceled" /* Canceled */,
|
|
124336
124352
|
children: [
|
|
124337
|
-
/* @__PURE__ */
|
|
124353
|
+
/* @__PURE__ */ jsx46(Text47, { color: nameColor, bold: true, children: name2 }),
|
|
124338
124354
|
" ",
|
|
124339
|
-
/* @__PURE__ */
|
|
124355
|
+
/* @__PURE__ */ jsx46(Text47, { color: Colors.Gray, children: description })
|
|
124340
124356
|
]
|
|
124341
124357
|
}
|
|
124342
124358
|
) });
|
|
@@ -124349,7 +124365,7 @@ var TrailingIndicator = () => /* @__PURE__ */ jsxs43(Text47, { color: Colors.For
|
|
|
124349
124365
|
// packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
|
|
124350
124366
|
import { Box as Box40, Text as Text48 } from "ink";
|
|
124351
124367
|
init_dist2();
|
|
124352
|
-
import { jsx as
|
|
124368
|
+
import { jsx as jsx47, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
124353
124369
|
var ToolConfirmationMessage = ({
|
|
124354
124370
|
confirmationDetails,
|
|
124355
124371
|
config,
|
|
@@ -124412,8 +124428,8 @@ var ToolConfirmationMessage = ({
|
|
|
124412
124428
|
padding: 1,
|
|
124413
124429
|
overflow: "hidden",
|
|
124414
124430
|
children: [
|
|
124415
|
-
/* @__PURE__ */
|
|
124416
|
-
/* @__PURE__ */
|
|
124431
|
+
/* @__PURE__ */ jsx47(Text48, { children: "Modify in progress: " }),
|
|
124432
|
+
/* @__PURE__ */ jsx47(Text48, { color: Colors.AccentGreen, children: "Save and close external editor to continue" })
|
|
124417
124433
|
]
|
|
124418
124434
|
}
|
|
124419
124435
|
);
|
|
@@ -124444,7 +124460,7 @@ var ToolConfirmationMessage = ({
|
|
|
124444
124460
|
value: ToolConfirmationOutcome.Cancel
|
|
124445
124461
|
});
|
|
124446
124462
|
}
|
|
124447
|
-
bodyContent = /* @__PURE__ */
|
|
124463
|
+
bodyContent = /* @__PURE__ */ jsx47(
|
|
124448
124464
|
DiffRenderer,
|
|
124449
124465
|
{
|
|
124450
124466
|
diffContent: confirmationDetails.fileDiff,
|
|
@@ -124474,12 +124490,12 @@ var ToolConfirmationMessage = ({
|
|
|
124474
124490
|
if (bodyContentHeight !== void 0) {
|
|
124475
124491
|
bodyContentHeight -= 2;
|
|
124476
124492
|
}
|
|
124477
|
-
bodyContent = /* @__PURE__ */
|
|
124493
|
+
bodyContent = /* @__PURE__ */ jsx47(Box40, { flexDirection: "column", children: /* @__PURE__ */ jsx47(Box40, { paddingX: 1, marginLeft: 1, children: /* @__PURE__ */ jsx47(
|
|
124478
124494
|
MaxSizedBox,
|
|
124479
124495
|
{
|
|
124480
124496
|
maxHeight: bodyContentHeight,
|
|
124481
124497
|
maxWidth: Math.max(childWidth - 4, 1),
|
|
124482
|
-
children: /* @__PURE__ */
|
|
124498
|
+
children: /* @__PURE__ */ jsx47(Box40, { children: /* @__PURE__ */ jsx47(Text48, { color: Colors.AccentCyan, children: executionProps.command }) })
|
|
124483
124499
|
}
|
|
124484
124500
|
) }) });
|
|
124485
124501
|
} else if (confirmationDetails.type === "info") {
|
|
@@ -124501,13 +124517,13 @@ var ToolConfirmationMessage = ({
|
|
|
124501
124517
|
}
|
|
124502
124518
|
);
|
|
124503
124519
|
bodyContent = /* @__PURE__ */ jsxs44(Box40, { flexDirection: "column", paddingX: 1, marginLeft: 1, children: [
|
|
124504
|
-
/* @__PURE__ */
|
|
124520
|
+
/* @__PURE__ */ jsx47(Text48, { color: Colors.AccentCyan, children: /* @__PURE__ */ jsx47(RenderInline, { text: infoProps.prompt }) }),
|
|
124505
124521
|
displayUrls && infoProps.urls && infoProps.urls.length > 0 && /* @__PURE__ */ jsxs44(Box40, { flexDirection: "column", marginTop: 1, children: [
|
|
124506
|
-
/* @__PURE__ */
|
|
124522
|
+
/* @__PURE__ */ jsx47(Text48, { children: "URLs to fetch:" }),
|
|
124507
124523
|
infoProps.urls.map((url2) => /* @__PURE__ */ jsxs44(Text48, { children: [
|
|
124508
124524
|
" ",
|
|
124509
124525
|
"- ",
|
|
124510
|
-
/* @__PURE__ */
|
|
124526
|
+
/* @__PURE__ */ jsx47(RenderInline, { text: url2 })
|
|
124511
124527
|
] }, url2))
|
|
124512
124528
|
] })
|
|
124513
124529
|
] });
|
|
@@ -124545,9 +124561,9 @@ var ToolConfirmationMessage = ({
|
|
|
124545
124561
|
);
|
|
124546
124562
|
}
|
|
124547
124563
|
return /* @__PURE__ */ jsxs44(Box40, { flexDirection: "column", padding: 1, width: childWidth, children: [
|
|
124548
|
-
/* @__PURE__ */
|
|
124549
|
-
/* @__PURE__ */
|
|
124550
|
-
/* @__PURE__ */
|
|
124564
|
+
/* @__PURE__ */ jsx47(Box40, { flexGrow: 1, flexShrink: 1, overflow: "hidden", marginBottom: 1, children: bodyContent }),
|
|
124565
|
+
/* @__PURE__ */ jsx47(Box40, { marginBottom: 1, flexShrink: 0, children: /* @__PURE__ */ jsx47(Text48, { wrap: "truncate", children: question }) }),
|
|
124566
|
+
/* @__PURE__ */ jsx47(Box40, { flexShrink: 0, children: /* @__PURE__ */ jsx47(
|
|
124551
124567
|
RadioButtonSelect,
|
|
124552
124568
|
{
|
|
124553
124569
|
items: options2,
|
|
@@ -124559,7 +124575,7 @@ var ToolConfirmationMessage = ({
|
|
|
124559
124575
|
};
|
|
124560
124576
|
|
|
124561
124577
|
// packages/cli/src/ui/components/messages/ToolGroupMessage.tsx
|
|
124562
|
-
import { jsx as
|
|
124578
|
+
import { jsx as jsx48, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
124563
124579
|
var ToolGroupMessage = ({
|
|
124564
124580
|
toolCalls,
|
|
124565
124581
|
availableTerminalHeight,
|
|
@@ -124595,7 +124611,7 @@ var ToolGroupMessage = ({
|
|
|
124595
124611
|
),
|
|
124596
124612
|
1
|
|
124597
124613
|
) : void 0;
|
|
124598
|
-
return /* @__PURE__ */
|
|
124614
|
+
return /* @__PURE__ */ jsx48(
|
|
124599
124615
|
Box41,
|
|
124600
124616
|
{
|
|
124601
124617
|
flexDirection: "column",
|
|
@@ -124607,7 +124623,7 @@ var ToolGroupMessage = ({
|
|
|
124607
124623
|
children: toolCalls.map((tool) => {
|
|
124608
124624
|
const isConfirming = toolAwaitingApproval?.callId === tool.callId;
|
|
124609
124625
|
return /* @__PURE__ */ jsxs45(Box41, { flexDirection: "column", minHeight: 1, children: [
|
|
124610
|
-
/* @__PURE__ */
|
|
124626
|
+
/* @__PURE__ */ jsx48(Box41, { flexDirection: "row", alignItems: "center", children: /* @__PURE__ */ jsx48(
|
|
124611
124627
|
ToolMessage,
|
|
124612
124628
|
{
|
|
124613
124629
|
callId: tool.callId,
|
|
@@ -124622,7 +124638,7 @@ var ToolGroupMessage = ({
|
|
|
124622
124638
|
renderOutputAsMarkdown: tool.renderOutputAsMarkdown
|
|
124623
124639
|
}
|
|
124624
124640
|
) }),
|
|
124625
|
-
tool.status === "Confirming" /* Confirming */ && isConfirming && tool.confirmationDetails && /* @__PURE__ */
|
|
124641
|
+
tool.status === "Confirming" /* Confirming */ && isConfirming && tool.confirmationDetails && /* @__PURE__ */ jsx48(
|
|
124626
124642
|
ToolConfirmationMessage,
|
|
124627
124643
|
{
|
|
124628
124644
|
confirmationDetails: tool.confirmationDetails,
|
|
@@ -124640,7 +124656,7 @@ var ToolGroupMessage = ({
|
|
|
124640
124656
|
|
|
124641
124657
|
// packages/cli/src/ui/components/messages/GeminiMessageContent.tsx
|
|
124642
124658
|
import { Box as Box42 } from "ink";
|
|
124643
|
-
import { jsx as
|
|
124659
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
124644
124660
|
var GeminiMessageContent = ({
|
|
124645
124661
|
text,
|
|
124646
124662
|
isPending,
|
|
@@ -124649,7 +124665,7 @@ var GeminiMessageContent = ({
|
|
|
124649
124665
|
}) => {
|
|
124650
124666
|
const originalPrefix = "\u2726 ";
|
|
124651
124667
|
const prefixWidth = originalPrefix.length;
|
|
124652
|
-
return /* @__PURE__ */
|
|
124668
|
+
return /* @__PURE__ */ jsx49(Box42, { flexDirection: "column", paddingLeft: prefixWidth, children: /* @__PURE__ */ jsx49(
|
|
124653
124669
|
MarkdownDisplay,
|
|
124654
124670
|
{
|
|
124655
124671
|
text,
|
|
@@ -124663,14 +124679,14 @@ var GeminiMessageContent = ({
|
|
|
124663
124679
|
// packages/cli/src/ui/components/messages/CompressionMessage.tsx
|
|
124664
124680
|
import { Box as Box43, Text as Text49 } from "ink";
|
|
124665
124681
|
import Spinner3 from "ink-spinner";
|
|
124666
|
-
import { jsx as
|
|
124682
|
+
import { jsx as jsx50, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
124667
124683
|
var CompressionMessage = ({
|
|
124668
124684
|
compression
|
|
124669
124685
|
}) => {
|
|
124670
124686
|
const text = compression.isPending ? "Compressing chat history" : `Chat history compressed from ${compression.originalTokenCount ?? "unknown"} to ${compression.newTokenCount ?? "unknown"} tokens.`;
|
|
124671
124687
|
return /* @__PURE__ */ jsxs46(Box43, { flexDirection: "row", children: [
|
|
124672
|
-
/* @__PURE__ */
|
|
124673
|
-
/* @__PURE__ */
|
|
124688
|
+
/* @__PURE__ */ jsx50(Box43, { marginRight: 1, children: compression.isPending ? /* @__PURE__ */ jsx50(Spinner3, { type: "dots" }) : /* @__PURE__ */ jsx50(Text49, { color: Colors.AccentPurple, children: "\u2726" }) }),
|
|
124689
|
+
/* @__PURE__ */ jsx50(Box43, { children: /* @__PURE__ */ jsx50(
|
|
124674
124690
|
Text49,
|
|
124675
124691
|
{
|
|
124676
124692
|
color: compression.isPending ? Colors.AccentPurple : Colors.AccentGreen,
|
|
@@ -124685,7 +124701,7 @@ import { Box as Box49 } from "ink";
|
|
|
124685
124701
|
|
|
124686
124702
|
// packages/cli/src/ui/components/AboutBox.tsx
|
|
124687
124703
|
import { Box as Box44, Text as Text50 } from "ink";
|
|
124688
|
-
import { jsx as
|
|
124704
|
+
import { jsx as jsx51, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
124689
124705
|
var AboutBox = ({
|
|
124690
124706
|
cliVersion,
|
|
124691
124707
|
osVersion,
|
|
@@ -124704,38 +124720,38 @@ var AboutBox = ({
|
|
|
124704
124720
|
marginY: 1,
|
|
124705
124721
|
width: "100%",
|
|
124706
124722
|
children: [
|
|
124707
|
-
/* @__PURE__ */
|
|
124723
|
+
/* @__PURE__ */ jsx51(Box44, { marginBottom: 1, children: /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: "About FSS Link" }) }),
|
|
124708
124724
|
/* @__PURE__ */ jsxs47(Box44, { flexDirection: "row", children: [
|
|
124709
|
-
/* @__PURE__ */
|
|
124710
|
-
/* @__PURE__ */
|
|
124725
|
+
/* @__PURE__ */ jsx51(Box44, { width: "35%", children: /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.LightBlue, children: "CLI Version" }) }),
|
|
124726
|
+
/* @__PURE__ */ jsx51(Box44, { children: /* @__PURE__ */ jsx51(Text50, { children: cliVersion }) })
|
|
124711
124727
|
] }),
|
|
124712
124728
|
GIT_COMMIT_INFO && !["N/A"].includes(GIT_COMMIT_INFO) && /* @__PURE__ */ jsxs47(Box44, { flexDirection: "row", children: [
|
|
124713
|
-
/* @__PURE__ */
|
|
124714
|
-
/* @__PURE__ */
|
|
124729
|
+
/* @__PURE__ */ jsx51(Box44, { width: "35%", children: /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.LightBlue, children: "Git Commit" }) }),
|
|
124730
|
+
/* @__PURE__ */ jsx51(Box44, { children: /* @__PURE__ */ jsx51(Text50, { children: GIT_COMMIT_INFO }) })
|
|
124715
124731
|
] }),
|
|
124716
124732
|
/* @__PURE__ */ jsxs47(Box44, { flexDirection: "row", children: [
|
|
124717
|
-
/* @__PURE__ */
|
|
124718
|
-
/* @__PURE__ */
|
|
124733
|
+
/* @__PURE__ */ jsx51(Box44, { width: "35%", children: /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.LightBlue, children: "Model" }) }),
|
|
124734
|
+
/* @__PURE__ */ jsx51(Box44, { children: /* @__PURE__ */ jsx51(Text50, { children: modelVersion }) })
|
|
124719
124735
|
] }),
|
|
124720
124736
|
/* @__PURE__ */ jsxs47(Box44, { flexDirection: "row", children: [
|
|
124721
|
-
/* @__PURE__ */
|
|
124722
|
-
/* @__PURE__ */
|
|
124737
|
+
/* @__PURE__ */ jsx51(Box44, { width: "35%", children: /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.LightBlue, children: "Sandbox" }) }),
|
|
124738
|
+
/* @__PURE__ */ jsx51(Box44, { children: /* @__PURE__ */ jsx51(Text50, { children: sandboxEnv }) })
|
|
124723
124739
|
] }),
|
|
124724
124740
|
/* @__PURE__ */ jsxs47(Box44, { flexDirection: "row", children: [
|
|
124725
|
-
/* @__PURE__ */
|
|
124726
|
-
/* @__PURE__ */
|
|
124741
|
+
/* @__PURE__ */ jsx51(Box44, { width: "35%", children: /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.LightBlue, children: "OS" }) }),
|
|
124742
|
+
/* @__PURE__ */ jsx51(Box44, { children: /* @__PURE__ */ jsx51(Text50, { children: osVersion }) })
|
|
124727
124743
|
] }),
|
|
124728
124744
|
/* @__PURE__ */ jsxs47(Box44, { flexDirection: "row", children: [
|
|
124729
|
-
/* @__PURE__ */
|
|
124730
|
-
/* @__PURE__ */
|
|
124745
|
+
/* @__PURE__ */ jsx51(Box44, { width: "35%", children: /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.LightBlue, children: "Auth Method" }) }),
|
|
124746
|
+
/* @__PURE__ */ jsx51(Box44, { children: /* @__PURE__ */ jsx51(Text50, { children: selectedAuthType.startsWith("oauth") ? "OAuth" : selectedAuthType }) })
|
|
124731
124747
|
] }),
|
|
124732
124748
|
gcpProject && /* @__PURE__ */ jsxs47(Box44, { flexDirection: "row", children: [
|
|
124733
|
-
/* @__PURE__ */
|
|
124734
|
-
/* @__PURE__ */
|
|
124749
|
+
/* @__PURE__ */ jsx51(Box44, { width: "35%", children: /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.LightBlue, children: "GCP Project" }) }),
|
|
124750
|
+
/* @__PURE__ */ jsx51(Box44, { children: /* @__PURE__ */ jsx51(Text50, { children: gcpProject }) })
|
|
124735
124751
|
] }),
|
|
124736
124752
|
ideClient && /* @__PURE__ */ jsxs47(Box44, { flexDirection: "row", children: [
|
|
124737
|
-
/* @__PURE__ */
|
|
124738
|
-
/* @__PURE__ */
|
|
124753
|
+
/* @__PURE__ */ jsx51(Box44, { width: "35%", children: /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.LightBlue, children: "IDE Client" }) }),
|
|
124754
|
+
/* @__PURE__ */ jsx51(Box44, { children: /* @__PURE__ */ jsx51(Text50, { children: ideClient }) })
|
|
124739
124755
|
] })
|
|
124740
124756
|
]
|
|
124741
124757
|
}
|
|
@@ -124819,20 +124835,20 @@ var computeSessionStats = (metrics2) => {
|
|
|
124819
124835
|
};
|
|
124820
124836
|
|
|
124821
124837
|
// packages/cli/src/ui/components/StatsDisplay.tsx
|
|
124822
|
-
import { jsx as
|
|
124838
|
+
import { jsx as jsx52, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
124823
124839
|
var StatRow = ({ title, children }) => /* @__PURE__ */ jsxs48(Box45, { children: [
|
|
124824
|
-
/* @__PURE__ */
|
|
124840
|
+
/* @__PURE__ */ jsx52(Box45, { width: 28, children: /* @__PURE__ */ jsx52(Text51, { color: theme.text.link, children: title }) }),
|
|
124825
124841
|
children
|
|
124826
124842
|
] });
|
|
124827
124843
|
var SubStatRow = ({ title, children }) => /* @__PURE__ */ jsxs48(Box45, { paddingLeft: 2, children: [
|
|
124828
|
-
/* @__PURE__ */
|
|
124844
|
+
/* @__PURE__ */ jsx52(Box45, { width: 26, children: /* @__PURE__ */ jsxs48(Text51, { children: [
|
|
124829
124845
|
"\xBB ",
|
|
124830
124846
|
title
|
|
124831
124847
|
] }) }),
|
|
124832
124848
|
children
|
|
124833
124849
|
] });
|
|
124834
124850
|
var Section = ({ title, children }) => /* @__PURE__ */ jsxs48(Box45, { flexDirection: "column", width: "100%", marginBottom: 1, children: [
|
|
124835
|
-
/* @__PURE__ */
|
|
124851
|
+
/* @__PURE__ */ jsx52(Text51, { bold: true, children: title }),
|
|
124836
124852
|
children
|
|
124837
124853
|
] });
|
|
124838
124854
|
var ModelUsageTable = ({ models, totalCachedTokens, cacheEfficiency }) => {
|
|
@@ -124842,12 +124858,12 @@ var ModelUsageTable = ({ models, totalCachedTokens, cacheEfficiency }) => {
|
|
|
124842
124858
|
const outputTokensWidth = 15;
|
|
124843
124859
|
return /* @__PURE__ */ jsxs48(Box45, { flexDirection: "column", marginTop: 1, children: [
|
|
124844
124860
|
/* @__PURE__ */ jsxs48(Box45, { children: [
|
|
124845
|
-
/* @__PURE__ */
|
|
124846
|
-
/* @__PURE__ */
|
|
124847
|
-
/* @__PURE__ */
|
|
124848
|
-
/* @__PURE__ */
|
|
124861
|
+
/* @__PURE__ */ jsx52(Box45, { width: nameWidth, children: /* @__PURE__ */ jsx52(Text51, { bold: true, children: "Model Usage" }) }),
|
|
124862
|
+
/* @__PURE__ */ jsx52(Box45, { width: requestsWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx52(Text51, { bold: true, children: "Reqs" }) }),
|
|
124863
|
+
/* @__PURE__ */ jsx52(Box45, { width: inputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx52(Text51, { bold: true, children: "Input Tokens" }) }),
|
|
124864
|
+
/* @__PURE__ */ jsx52(Box45, { width: outputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx52(Text51, { bold: true, children: "Output Tokens" }) })
|
|
124849
124865
|
] }),
|
|
124850
|
-
/* @__PURE__ */
|
|
124866
|
+
/* @__PURE__ */ jsx52(
|
|
124851
124867
|
Box45,
|
|
124852
124868
|
{
|
|
124853
124869
|
borderStyle: "round",
|
|
@@ -124859,22 +124875,22 @@ var ModelUsageTable = ({ models, totalCachedTokens, cacheEfficiency }) => {
|
|
|
124859
124875
|
}
|
|
124860
124876
|
),
|
|
124861
124877
|
Object.entries(models).map(([name2, modelMetrics]) => /* @__PURE__ */ jsxs48(Box45, { children: [
|
|
124862
|
-
/* @__PURE__ */
|
|
124863
|
-
/* @__PURE__ */
|
|
124864
|
-
/* @__PURE__ */
|
|
124865
|
-
/* @__PURE__ */
|
|
124878
|
+
/* @__PURE__ */ jsx52(Box45, { width: nameWidth, children: /* @__PURE__ */ jsx52(Text51, { children: name2.replace("-001", "") }) }),
|
|
124879
|
+
/* @__PURE__ */ jsx52(Box45, { width: requestsWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx52(Text51, { children: modelMetrics.api.totalRequests }) }),
|
|
124880
|
+
/* @__PURE__ */ jsx52(Box45, { width: inputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx52(Text51, { color: theme.status.warning, children: modelMetrics.tokens.prompt.toLocaleString() }) }),
|
|
124881
|
+
/* @__PURE__ */ jsx52(Box45, { width: outputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx52(Text51, { color: theme.status.warning, children: modelMetrics.tokens.candidates.toLocaleString() }) })
|
|
124866
124882
|
] }, name2)),
|
|
124867
124883
|
cacheEfficiency > 0 && /* @__PURE__ */ jsxs48(Box45, { flexDirection: "column", marginTop: 1, children: [
|
|
124868
124884
|
/* @__PURE__ */ jsxs48(Text51, { children: [
|
|
124869
|
-
/* @__PURE__ */
|
|
124885
|
+
/* @__PURE__ */ jsx52(Text51, { color: theme.status.success, children: "Savings Highlight:" }),
|
|
124870
124886
|
" ",
|
|
124871
124887
|
totalCachedTokens.toLocaleString(),
|
|
124872
124888
|
" (",
|
|
124873
124889
|
cacheEfficiency.toFixed(1),
|
|
124874
124890
|
"%) of input tokens were served from the cache, reducing costs."
|
|
124875
124891
|
] }),
|
|
124876
|
-
/* @__PURE__ */
|
|
124877
|
-
/* @__PURE__ */
|
|
124892
|
+
/* @__PURE__ */ jsx52(Box45, { height: 1 }),
|
|
124893
|
+
/* @__PURE__ */ jsx52(Text51, { color: theme.text.secondary, children: "\xBB Tip: For a full token breakdown, run `/stats model`." })
|
|
124878
124894
|
] })
|
|
124879
124895
|
] });
|
|
124880
124896
|
};
|
|
@@ -124901,9 +124917,9 @@ var StatsDisplay = ({
|
|
|
124901
124917
|
);
|
|
124902
124918
|
const renderTitle = () => {
|
|
124903
124919
|
if (title) {
|
|
124904
|
-
return theme.ui.gradient && theme.ui.gradient.length > 0 ? /* @__PURE__ */
|
|
124920
|
+
return theme.ui.gradient && theme.ui.gradient.length > 0 ? /* @__PURE__ */ jsx52(Gradient3, { colors: theme.ui.gradient, children: /* @__PURE__ */ jsx52(Text51, { bold: true, children: title }) }) : /* @__PURE__ */ jsx52(Text51, { bold: true, color: theme.text.accent, children: title });
|
|
124905
124921
|
}
|
|
124906
|
-
return /* @__PURE__ */
|
|
124922
|
+
return /* @__PURE__ */ jsx52(Text51, { bold: true, color: theme.text.accent, children: "Session Stats" });
|
|
124907
124923
|
};
|
|
124908
124924
|
return /* @__PURE__ */ jsxs48(
|
|
124909
124925
|
Box45,
|
|
@@ -124915,10 +124931,10 @@ var StatsDisplay = ({
|
|
|
124915
124931
|
paddingX: 2,
|
|
124916
124932
|
children: [
|
|
124917
124933
|
renderTitle(),
|
|
124918
|
-
/* @__PURE__ */
|
|
124934
|
+
/* @__PURE__ */ jsx52(Box45, { height: 1 }),
|
|
124919
124935
|
/* @__PURE__ */ jsxs48(Section, { title: "Interaction Summary", children: [
|
|
124920
|
-
/* @__PURE__ */
|
|
124921
|
-
/* @__PURE__ */
|
|
124936
|
+
/* @__PURE__ */ jsx52(StatRow, { title: "Session ID:", children: /* @__PURE__ */ jsx52(Text51, { children: stats.sessionId }) }),
|
|
124937
|
+
/* @__PURE__ */ jsx52(StatRow, { title: "Tool Calls:", children: /* @__PURE__ */ jsxs48(Text51, { children: [
|
|
124922
124938
|
tools.totalCalls,
|
|
124923
124939
|
" (",
|
|
124924
124940
|
" ",
|
|
@@ -124933,11 +124949,11 @@ var StatsDisplay = ({
|
|
|
124933
124949
|
] }),
|
|
124934
124950
|
" )"
|
|
124935
124951
|
] }) }),
|
|
124936
|
-
/* @__PURE__ */
|
|
124952
|
+
/* @__PURE__ */ jsx52(StatRow, { title: "Success Rate:", children: /* @__PURE__ */ jsxs48(Text51, { color: successColor, children: [
|
|
124937
124953
|
computed.successRate.toFixed(1),
|
|
124938
124954
|
"%"
|
|
124939
124955
|
] }) }),
|
|
124940
|
-
computed.totalDecisions > 0 && /* @__PURE__ */
|
|
124956
|
+
computed.totalDecisions > 0 && /* @__PURE__ */ jsx52(StatRow, { title: "User Agreement:", children: /* @__PURE__ */ jsxs48(Text51, { color: agreementColor, children: [
|
|
124941
124957
|
computed.agreementRate.toFixed(1),
|
|
124942
124958
|
"%",
|
|
124943
124959
|
" ",
|
|
@@ -124947,7 +124963,7 @@ var StatsDisplay = ({
|
|
|
124947
124963
|
" reviewed)"
|
|
124948
124964
|
] })
|
|
124949
124965
|
] }) }),
|
|
124950
|
-
files && (files.totalLinesAdded > 0 || files.totalLinesRemoved > 0) && /* @__PURE__ */
|
|
124966
|
+
files && (files.totalLinesAdded > 0 || files.totalLinesRemoved > 0) && /* @__PURE__ */ jsx52(StatRow, { title: "Code Changes:", children: /* @__PURE__ */ jsxs48(Text51, { children: [
|
|
124951
124967
|
/* @__PURE__ */ jsxs48(Text51, { color: theme.status.success, children: [
|
|
124952
124968
|
"+",
|
|
124953
124969
|
files.totalLinesAdded
|
|
@@ -124960,9 +124976,9 @@ var StatsDisplay = ({
|
|
|
124960
124976
|
] }) })
|
|
124961
124977
|
] }),
|
|
124962
124978
|
/* @__PURE__ */ jsxs48(Section, { title: "Performance", children: [
|
|
124963
|
-
/* @__PURE__ */
|
|
124964
|
-
/* @__PURE__ */
|
|
124965
|
-
/* @__PURE__ */
|
|
124979
|
+
/* @__PURE__ */ jsx52(StatRow, { title: "Wall Time:", children: /* @__PURE__ */ jsx52(Text51, { children: duration }) }),
|
|
124980
|
+
/* @__PURE__ */ jsx52(StatRow, { title: "Agent Active:", children: /* @__PURE__ */ jsx52(Text51, { children: formatDuration(computed.agentActiveTime) }) }),
|
|
124981
|
+
/* @__PURE__ */ jsx52(SubStatRow, { title: "API Time:", children: /* @__PURE__ */ jsxs48(Text51, { children: [
|
|
124966
124982
|
formatDuration(computed.totalApiTime),
|
|
124967
124983
|
" ",
|
|
124968
124984
|
/* @__PURE__ */ jsxs48(Text51, { color: theme.text.secondary, children: [
|
|
@@ -124971,7 +124987,7 @@ var StatsDisplay = ({
|
|
|
124971
124987
|
"%)"
|
|
124972
124988
|
] })
|
|
124973
124989
|
] }) }),
|
|
124974
|
-
/* @__PURE__ */
|
|
124990
|
+
/* @__PURE__ */ jsx52(SubStatRow, { title: "Tool Time:", children: /* @__PURE__ */ jsxs48(Text51, { children: [
|
|
124975
124991
|
formatDuration(computed.totalToolTime),
|
|
124976
124992
|
" ",
|
|
124977
124993
|
/* @__PURE__ */ jsxs48(Text51, { color: theme.text.secondary, children: [
|
|
@@ -124981,7 +124997,7 @@ var StatsDisplay = ({
|
|
|
124981
124997
|
] })
|
|
124982
124998
|
] }) })
|
|
124983
124999
|
] }),
|
|
124984
|
-
Object.keys(models).length > 0 && /* @__PURE__ */
|
|
125000
|
+
Object.keys(models).length > 0 && /* @__PURE__ */ jsx52(
|
|
124985
125001
|
ModelUsageTable,
|
|
124986
125002
|
{
|
|
124987
125003
|
models,
|
|
@@ -124996,7 +125012,7 @@ var StatsDisplay = ({
|
|
|
124996
125012
|
|
|
124997
125013
|
// packages/cli/src/ui/components/ModelStatsDisplay.tsx
|
|
124998
125014
|
import { Box as Box46, Text as Text52 } from "ink";
|
|
124999
|
-
import { jsx as
|
|
125015
|
+
import { jsx as jsx53, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
125000
125016
|
var METRIC_COL_WIDTH = 28;
|
|
125001
125017
|
var MODEL_COL_WIDTH = 22;
|
|
125002
125018
|
var StatRow2 = ({
|
|
@@ -125005,8 +125021,8 @@ var StatRow2 = ({
|
|
|
125005
125021
|
isSubtle = false,
|
|
125006
125022
|
isSection = false
|
|
125007
125023
|
}) => /* @__PURE__ */ jsxs49(Box46, { children: [
|
|
125008
|
-
/* @__PURE__ */
|
|
125009
|
-
values.map((value, index) => /* @__PURE__ */
|
|
125024
|
+
/* @__PURE__ */ jsx53(Box46, { width: METRIC_COL_WIDTH, children: /* @__PURE__ */ jsx53(Text52, { bold: isSection, color: isSection ? void 0 : Colors.LightBlue, children: isSubtle ? ` \u21B3 ${title}` : title }) }),
|
|
125025
|
+
values.map((value, index) => /* @__PURE__ */ jsx53(Box46, { width: MODEL_COL_WIDTH, children: /* @__PURE__ */ jsx53(Text52, { children: value }) }, index))
|
|
125010
125026
|
] });
|
|
125011
125027
|
var ModelStatsDisplay = () => {
|
|
125012
125028
|
const { stats } = useSessionStats();
|
|
@@ -125015,14 +125031,14 @@ var ModelStatsDisplay = () => {
|
|
|
125015
125031
|
([, metrics2]) => metrics2.api.totalRequests > 0
|
|
125016
125032
|
);
|
|
125017
125033
|
if (activeModels.length === 0) {
|
|
125018
|
-
return /* @__PURE__ */
|
|
125034
|
+
return /* @__PURE__ */ jsx53(
|
|
125019
125035
|
Box46,
|
|
125020
125036
|
{
|
|
125021
125037
|
borderStyle: "round",
|
|
125022
125038
|
borderColor: Colors.Gray,
|
|
125023
125039
|
paddingY: 1,
|
|
125024
125040
|
paddingX: 2,
|
|
125025
|
-
children: /* @__PURE__ */
|
|
125041
|
+
children: /* @__PURE__ */ jsx53(Text52, { children: "No API calls have been made in this session." })
|
|
125026
125042
|
}
|
|
125027
125043
|
);
|
|
125028
125044
|
}
|
|
@@ -125044,13 +125060,13 @@ var ModelStatsDisplay = () => {
|
|
|
125044
125060
|
paddingY: 1,
|
|
125045
125061
|
paddingX: 2,
|
|
125046
125062
|
children: [
|
|
125047
|
-
/* @__PURE__ */
|
|
125048
|
-
/* @__PURE__ */
|
|
125063
|
+
/* @__PURE__ */ jsx53(Text52, { bold: true, color: Colors.AccentPurple, children: "Model Stats For Nerds" }),
|
|
125064
|
+
/* @__PURE__ */ jsx53(Box46, { height: 1 }),
|
|
125049
125065
|
/* @__PURE__ */ jsxs49(Box46, { children: [
|
|
125050
|
-
/* @__PURE__ */
|
|
125051
|
-
modelNames.map((name2) => /* @__PURE__ */
|
|
125066
|
+
/* @__PURE__ */ jsx53(Box46, { width: METRIC_COL_WIDTH, children: /* @__PURE__ */ jsx53(Text52, { bold: true, children: "Metric" }) }),
|
|
125067
|
+
modelNames.map((name2) => /* @__PURE__ */ jsx53(Box46, { width: MODEL_COL_WIDTH, children: /* @__PURE__ */ jsx53(Text52, { bold: true, children: name2 }) }, name2))
|
|
125052
125068
|
] }),
|
|
125053
|
-
/* @__PURE__ */
|
|
125069
|
+
/* @__PURE__ */ jsx53(
|
|
125054
125070
|
Box46,
|
|
125055
125071
|
{
|
|
125056
125072
|
borderStyle: "single",
|
|
@@ -125060,15 +125076,15 @@ var ModelStatsDisplay = () => {
|
|
|
125060
125076
|
borderRight: false
|
|
125061
125077
|
}
|
|
125062
125078
|
),
|
|
125063
|
-
/* @__PURE__ */
|
|
125064
|
-
/* @__PURE__ */
|
|
125079
|
+
/* @__PURE__ */ jsx53(StatRow2, { title: "API", values: [], isSection: true }),
|
|
125080
|
+
/* @__PURE__ */ jsx53(
|
|
125065
125081
|
StatRow2,
|
|
125066
125082
|
{
|
|
125067
125083
|
title: "Requests",
|
|
125068
125084
|
values: getModelValues((m) => m.api.totalRequests.toLocaleString())
|
|
125069
125085
|
}
|
|
125070
125086
|
),
|
|
125071
|
-
/* @__PURE__ */
|
|
125087
|
+
/* @__PURE__ */ jsx53(
|
|
125072
125088
|
StatRow2,
|
|
125073
125089
|
{
|
|
125074
125090
|
title: "Errors",
|
|
@@ -125089,7 +125105,7 @@ var ModelStatsDisplay = () => {
|
|
|
125089
125105
|
})
|
|
125090
125106
|
}
|
|
125091
125107
|
),
|
|
125092
|
-
/* @__PURE__ */
|
|
125108
|
+
/* @__PURE__ */ jsx53(
|
|
125093
125109
|
StatRow2,
|
|
125094
125110
|
{
|
|
125095
125111
|
title: "Avg Latency",
|
|
@@ -125099,16 +125115,16 @@ var ModelStatsDisplay = () => {
|
|
|
125099
125115
|
})
|
|
125100
125116
|
}
|
|
125101
125117
|
),
|
|
125102
|
-
/* @__PURE__ */
|
|
125103
|
-
/* @__PURE__ */
|
|
125104
|
-
/* @__PURE__ */
|
|
125118
|
+
/* @__PURE__ */ jsx53(Box46, { height: 1 }),
|
|
125119
|
+
/* @__PURE__ */ jsx53(StatRow2, { title: "Tokens", values: [], isSection: true }),
|
|
125120
|
+
/* @__PURE__ */ jsx53(
|
|
125105
125121
|
StatRow2,
|
|
125106
125122
|
{
|
|
125107
125123
|
title: "Total",
|
|
125108
|
-
values: getModelValues((m) => /* @__PURE__ */
|
|
125124
|
+
values: getModelValues((m) => /* @__PURE__ */ jsx53(Text52, { color: Colors.AccentYellow, children: m.tokens.total.toLocaleString() }))
|
|
125109
125125
|
}
|
|
125110
125126
|
),
|
|
125111
|
-
/* @__PURE__ */
|
|
125127
|
+
/* @__PURE__ */ jsx53(
|
|
125112
125128
|
StatRow2,
|
|
125113
125129
|
{
|
|
125114
125130
|
title: "Prompt",
|
|
@@ -125116,7 +125132,7 @@ var ModelStatsDisplay = () => {
|
|
|
125116
125132
|
values: getModelValues((m) => m.tokens.prompt.toLocaleString())
|
|
125117
125133
|
}
|
|
125118
125134
|
),
|
|
125119
|
-
hasCached && /* @__PURE__ */
|
|
125135
|
+
hasCached && /* @__PURE__ */ jsx53(
|
|
125120
125136
|
StatRow2,
|
|
125121
125137
|
{
|
|
125122
125138
|
title: "Cached",
|
|
@@ -125132,7 +125148,7 @@ var ModelStatsDisplay = () => {
|
|
|
125132
125148
|
})
|
|
125133
125149
|
}
|
|
125134
125150
|
),
|
|
125135
|
-
hasThoughts && /* @__PURE__ */
|
|
125151
|
+
hasThoughts && /* @__PURE__ */ jsx53(
|
|
125136
125152
|
StatRow2,
|
|
125137
125153
|
{
|
|
125138
125154
|
title: "Thoughts",
|
|
@@ -125140,7 +125156,7 @@ var ModelStatsDisplay = () => {
|
|
|
125140
125156
|
values: getModelValues((m) => m.tokens.thoughts.toLocaleString())
|
|
125141
125157
|
}
|
|
125142
125158
|
),
|
|
125143
|
-
hasTool && /* @__PURE__ */
|
|
125159
|
+
hasTool && /* @__PURE__ */ jsx53(
|
|
125144
125160
|
StatRow2,
|
|
125145
125161
|
{
|
|
125146
125162
|
title: "Tool",
|
|
@@ -125148,7 +125164,7 @@ var ModelStatsDisplay = () => {
|
|
|
125148
125164
|
values: getModelValues((m) => m.tokens.tool.toLocaleString())
|
|
125149
125165
|
}
|
|
125150
125166
|
),
|
|
125151
|
-
/* @__PURE__ */
|
|
125167
|
+
/* @__PURE__ */ jsx53(
|
|
125152
125168
|
StatRow2,
|
|
125153
125169
|
{
|
|
125154
125170
|
title: "Output",
|
|
@@ -125163,7 +125179,7 @@ var ModelStatsDisplay = () => {
|
|
|
125163
125179
|
|
|
125164
125180
|
// packages/cli/src/ui/components/ToolStatsDisplay.tsx
|
|
125165
125181
|
import { Box as Box47, Text as Text53 } from "ink";
|
|
125166
|
-
import { jsx as
|
|
125182
|
+
import { jsx as jsx54, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
125167
125183
|
var TOOL_NAME_COL_WIDTH = 25;
|
|
125168
125184
|
var CALLS_COL_WIDTH = 8;
|
|
125169
125185
|
var SUCCESS_RATE_COL_WIDTH = 15;
|
|
@@ -125176,13 +125192,13 @@ var StatRow3 = ({ name: name2, stats }) => {
|
|
|
125176
125192
|
yellow: TOOL_SUCCESS_RATE_MEDIUM
|
|
125177
125193
|
});
|
|
125178
125194
|
return /* @__PURE__ */ jsxs50(Box47, { children: [
|
|
125179
|
-
/* @__PURE__ */
|
|
125180
|
-
/* @__PURE__ */
|
|
125181
|
-
/* @__PURE__ */
|
|
125195
|
+
/* @__PURE__ */ jsx54(Box47, { width: TOOL_NAME_COL_WIDTH, children: /* @__PURE__ */ jsx54(Text53, { color: Colors.LightBlue, children: name2 }) }),
|
|
125196
|
+
/* @__PURE__ */ jsx54(Box47, { width: CALLS_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx54(Text53, { children: stats.count }) }),
|
|
125197
|
+
/* @__PURE__ */ jsx54(Box47, { width: SUCCESS_RATE_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsxs50(Text53, { color: successColor, children: [
|
|
125182
125198
|
successRate.toFixed(1),
|
|
125183
125199
|
"%"
|
|
125184
125200
|
] }) }),
|
|
125185
|
-
/* @__PURE__ */
|
|
125201
|
+
/* @__PURE__ */ jsx54(Box47, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx54(Text53, { children: formatDuration(avgDuration) }) })
|
|
125186
125202
|
] });
|
|
125187
125203
|
};
|
|
125188
125204
|
var ToolStatsDisplay = () => {
|
|
@@ -125192,14 +125208,14 @@ var ToolStatsDisplay = () => {
|
|
|
125192
125208
|
([, metrics2]) => metrics2.count > 0
|
|
125193
125209
|
);
|
|
125194
125210
|
if (activeTools.length === 0) {
|
|
125195
|
-
return /* @__PURE__ */
|
|
125211
|
+
return /* @__PURE__ */ jsx54(
|
|
125196
125212
|
Box47,
|
|
125197
125213
|
{
|
|
125198
125214
|
borderStyle: "round",
|
|
125199
125215
|
borderColor: Colors.Gray,
|
|
125200
125216
|
paddingY: 1,
|
|
125201
125217
|
paddingX: 2,
|
|
125202
|
-
children: /* @__PURE__ */
|
|
125218
|
+
children: /* @__PURE__ */ jsx54(Text53, { children: "No tool calls have been made in this session." })
|
|
125203
125219
|
}
|
|
125204
125220
|
);
|
|
125205
125221
|
}
|
|
@@ -125228,15 +125244,15 @@ var ToolStatsDisplay = () => {
|
|
|
125228
125244
|
paddingX: 2,
|
|
125229
125245
|
width: 70,
|
|
125230
125246
|
children: [
|
|
125231
|
-
/* @__PURE__ */
|
|
125232
|
-
/* @__PURE__ */
|
|
125247
|
+
/* @__PURE__ */ jsx54(Text53, { bold: true, color: Colors.AccentPurple, children: "Tool Stats For Nerds" }),
|
|
125248
|
+
/* @__PURE__ */ jsx54(Box47, { height: 1 }),
|
|
125233
125249
|
/* @__PURE__ */ jsxs50(Box47, { children: [
|
|
125234
|
-
/* @__PURE__ */
|
|
125235
|
-
/* @__PURE__ */
|
|
125236
|
-
/* @__PURE__ */
|
|
125237
|
-
/* @__PURE__ */
|
|
125250
|
+
/* @__PURE__ */ jsx54(Box47, { width: TOOL_NAME_COL_WIDTH, children: /* @__PURE__ */ jsx54(Text53, { bold: true, children: "Tool Name" }) }),
|
|
125251
|
+
/* @__PURE__ */ jsx54(Box47, { width: CALLS_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx54(Text53, { bold: true, children: "Calls" }) }),
|
|
125252
|
+
/* @__PURE__ */ jsx54(Box47, { width: SUCCESS_RATE_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx54(Text53, { bold: true, children: "Success Rate" }) }),
|
|
125253
|
+
/* @__PURE__ */ jsx54(Box47, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx54(Text53, { bold: true, children: "Avg Duration" }) })
|
|
125238
125254
|
] }),
|
|
125239
|
-
/* @__PURE__ */
|
|
125255
|
+
/* @__PURE__ */ jsx54(
|
|
125240
125256
|
Box47,
|
|
125241
125257
|
{
|
|
125242
125258
|
borderStyle: "single",
|
|
@@ -125247,50 +125263,50 @@ var ToolStatsDisplay = () => {
|
|
|
125247
125263
|
width: "100%"
|
|
125248
125264
|
}
|
|
125249
125265
|
),
|
|
125250
|
-
activeTools.map(([name2, stats2]) => /* @__PURE__ */
|
|
125251
|
-
/* @__PURE__ */
|
|
125252
|
-
/* @__PURE__ */
|
|
125266
|
+
activeTools.map(([name2, stats2]) => /* @__PURE__ */ jsx54(StatRow3, { name: name2, stats: stats2 }, name2)),
|
|
125267
|
+
/* @__PURE__ */ jsx54(Box47, { height: 1 }),
|
|
125268
|
+
/* @__PURE__ */ jsx54(Text53, { bold: true, children: "User Decision Summary" }),
|
|
125253
125269
|
/* @__PURE__ */ jsxs50(Box47, { children: [
|
|
125254
|
-
/* @__PURE__ */
|
|
125270
|
+
/* @__PURE__ */ jsx54(
|
|
125255
125271
|
Box47,
|
|
125256
125272
|
{
|
|
125257
125273
|
width: TOOL_NAME_COL_WIDTH + CALLS_COL_WIDTH + SUCCESS_RATE_COL_WIDTH,
|
|
125258
|
-
children: /* @__PURE__ */
|
|
125274
|
+
children: /* @__PURE__ */ jsx54(Text53, { color: Colors.LightBlue, children: "Total Reviewed Suggestions:" })
|
|
125259
125275
|
}
|
|
125260
125276
|
),
|
|
125261
|
-
/* @__PURE__ */
|
|
125277
|
+
/* @__PURE__ */ jsx54(Box47, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx54(Text53, { children: totalReviewed }) })
|
|
125262
125278
|
] }),
|
|
125263
125279
|
/* @__PURE__ */ jsxs50(Box47, { children: [
|
|
125264
|
-
/* @__PURE__ */
|
|
125280
|
+
/* @__PURE__ */ jsx54(
|
|
125265
125281
|
Box47,
|
|
125266
125282
|
{
|
|
125267
125283
|
width: TOOL_NAME_COL_WIDTH + CALLS_COL_WIDTH + SUCCESS_RATE_COL_WIDTH,
|
|
125268
|
-
children: /* @__PURE__ */
|
|
125284
|
+
children: /* @__PURE__ */ jsx54(Text53, { children: " \xBB Accepted:" })
|
|
125269
125285
|
}
|
|
125270
125286
|
),
|
|
125271
|
-
/* @__PURE__ */
|
|
125287
|
+
/* @__PURE__ */ jsx54(Box47, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx54(Text53, { color: Colors.AccentGreen, children: totalDecisions.accept }) })
|
|
125272
125288
|
] }),
|
|
125273
125289
|
/* @__PURE__ */ jsxs50(Box47, { children: [
|
|
125274
|
-
/* @__PURE__ */
|
|
125290
|
+
/* @__PURE__ */ jsx54(
|
|
125275
125291
|
Box47,
|
|
125276
125292
|
{
|
|
125277
125293
|
width: TOOL_NAME_COL_WIDTH + CALLS_COL_WIDTH + SUCCESS_RATE_COL_WIDTH,
|
|
125278
|
-
children: /* @__PURE__ */
|
|
125294
|
+
children: /* @__PURE__ */ jsx54(Text53, { children: " \xBB Rejected:" })
|
|
125279
125295
|
}
|
|
125280
125296
|
),
|
|
125281
|
-
/* @__PURE__ */
|
|
125297
|
+
/* @__PURE__ */ jsx54(Box47, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx54(Text53, { color: Colors.AccentRed, children: totalDecisions.reject }) })
|
|
125282
125298
|
] }),
|
|
125283
125299
|
/* @__PURE__ */ jsxs50(Box47, { children: [
|
|
125284
|
-
/* @__PURE__ */
|
|
125300
|
+
/* @__PURE__ */ jsx54(
|
|
125285
125301
|
Box47,
|
|
125286
125302
|
{
|
|
125287
125303
|
width: TOOL_NAME_COL_WIDTH + CALLS_COL_WIDTH + SUCCESS_RATE_COL_WIDTH,
|
|
125288
|
-
children: /* @__PURE__ */
|
|
125304
|
+
children: /* @__PURE__ */ jsx54(Text53, { children: " \xBB Modified:" })
|
|
125289
125305
|
}
|
|
125290
125306
|
),
|
|
125291
|
-
/* @__PURE__ */
|
|
125307
|
+
/* @__PURE__ */ jsx54(Box47, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx54(Text53, { color: Colors.AccentYellow, children: totalDecisions.modify }) })
|
|
125292
125308
|
] }),
|
|
125293
|
-
/* @__PURE__ */
|
|
125309
|
+
/* @__PURE__ */ jsx54(
|
|
125294
125310
|
Box47,
|
|
125295
125311
|
{
|
|
125296
125312
|
borderStyle: "single",
|
|
@@ -125302,14 +125318,14 @@ var ToolStatsDisplay = () => {
|
|
|
125302
125318
|
}
|
|
125303
125319
|
),
|
|
125304
125320
|
/* @__PURE__ */ jsxs50(Box47, { children: [
|
|
125305
|
-
/* @__PURE__ */
|
|
125321
|
+
/* @__PURE__ */ jsx54(
|
|
125306
125322
|
Box47,
|
|
125307
125323
|
{
|
|
125308
125324
|
width: TOOL_NAME_COL_WIDTH + CALLS_COL_WIDTH + SUCCESS_RATE_COL_WIDTH,
|
|
125309
|
-
children: /* @__PURE__ */
|
|
125325
|
+
children: /* @__PURE__ */ jsx54(Text53, { children: " Overall Agreement Rate:" })
|
|
125310
125326
|
}
|
|
125311
125327
|
),
|
|
125312
|
-
/* @__PURE__ */
|
|
125328
|
+
/* @__PURE__ */ jsx54(Box47, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx54(Text53, { bold: true, color: totalReviewed > 0 ? agreementColor : void 0, children: totalReviewed > 0 ? `${agreementRate.toFixed(1)}%` : "--" }) })
|
|
125313
125329
|
] })
|
|
125314
125330
|
]
|
|
125315
125331
|
}
|
|
@@ -125317,14 +125333,14 @@ var ToolStatsDisplay = () => {
|
|
|
125317
125333
|
};
|
|
125318
125334
|
|
|
125319
125335
|
// packages/cli/src/ui/components/SessionSummaryDisplay.tsx
|
|
125320
|
-
import { jsx as
|
|
125336
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
125321
125337
|
var SessionSummaryDisplay = ({
|
|
125322
125338
|
duration
|
|
125323
|
-
}) => /* @__PURE__ */
|
|
125339
|
+
}) => /* @__PURE__ */ jsx55(StatsDisplay, { title: "Agent powering down. Goodbye!", duration });
|
|
125324
125340
|
|
|
125325
125341
|
// packages/cli/src/ui/components/Help.tsx
|
|
125326
125342
|
import { Box as Box48, Text as Text54 } from "ink";
|
|
125327
|
-
import { jsx as
|
|
125343
|
+
import { jsx as jsx56, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
125328
125344
|
var Help = ({ commands }) => /* @__PURE__ */ jsxs51(
|
|
125329
125345
|
Box48,
|
|
125330
125346
|
{
|
|
@@ -125334,34 +125350,34 @@ var Help = ({ commands }) => /* @__PURE__ */ jsxs51(
|
|
|
125334
125350
|
borderStyle: "round",
|
|
125335
125351
|
padding: 1,
|
|
125336
125352
|
children: [
|
|
125337
|
-
/* @__PURE__ */
|
|
125353
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.Foreground, children: "Basics:" }),
|
|
125338
125354
|
/* @__PURE__ */ jsxs51(Text54, { color: Colors.Foreground, children: [
|
|
125339
|
-
/* @__PURE__ */
|
|
125355
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.AccentPurple, children: "Add context" }),
|
|
125340
125356
|
": Use",
|
|
125341
125357
|
" ",
|
|
125342
|
-
/* @__PURE__ */
|
|
125358
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.AccentPurple, children: "@" }),
|
|
125343
125359
|
" ",
|
|
125344
125360
|
"to specify files for context (e.g.,",
|
|
125345
125361
|
" ",
|
|
125346
|
-
/* @__PURE__ */
|
|
125362
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.AccentPurple, children: "@src/myFile.ts" }),
|
|
125347
125363
|
") to target specific files or folders."
|
|
125348
125364
|
] }),
|
|
125349
125365
|
/* @__PURE__ */ jsxs51(Text54, { color: Colors.Foreground, children: [
|
|
125350
|
-
/* @__PURE__ */
|
|
125366
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.AccentPurple, children: "Shell mode" }),
|
|
125351
125367
|
": Execute shell commands via",
|
|
125352
125368
|
" ",
|
|
125353
|
-
/* @__PURE__ */
|
|
125369
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.AccentPurple, children: "!" }),
|
|
125354
125370
|
" ",
|
|
125355
125371
|
"(e.g.,",
|
|
125356
125372
|
" ",
|
|
125357
|
-
/* @__PURE__ */
|
|
125373
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.AccentPurple, children: "!npm run start" }),
|
|
125358
125374
|
") or use natural language (e.g.",
|
|
125359
125375
|
" ",
|
|
125360
|
-
/* @__PURE__ */
|
|
125376
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.AccentPurple, children: "start server" }),
|
|
125361
125377
|
")."
|
|
125362
125378
|
] }),
|
|
125363
|
-
/* @__PURE__ */
|
|
125364
|
-
/* @__PURE__ */
|
|
125379
|
+
/* @__PURE__ */ jsx56(Box48, { height: 1 }),
|
|
125380
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.Foreground, children: "Commands:" }),
|
|
125365
125381
|
commands.filter((command) => command.description).map((command) => /* @__PURE__ */ jsxs51(Box48, { flexDirection: "column", children: [
|
|
125366
125382
|
/* @__PURE__ */ jsxs51(Text54, { color: Colors.Foreground, children: [
|
|
125367
125383
|
/* @__PURE__ */ jsxs51(Text54, { bold: true, color: Colors.AccentPurple, children: [
|
|
@@ -125387,70 +125403,70 @@ var Help = ({ commands }) => /* @__PURE__ */ jsxs51(
|
|
|
125387
125403
|
] }),
|
|
125388
125404
|
"- shell command"
|
|
125389
125405
|
] }),
|
|
125390
|
-
/* @__PURE__ */
|
|
125391
|
-
/* @__PURE__ */
|
|
125406
|
+
/* @__PURE__ */ jsx56(Box48, { height: 1 }),
|
|
125407
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.Foreground, children: "Keyboard Shortcuts:" }),
|
|
125392
125408
|
/* @__PURE__ */ jsxs51(Text54, { color: Colors.Foreground, children: [
|
|
125393
|
-
/* @__PURE__ */
|
|
125409
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.AccentPurple, children: "Alt+Left/Right" }),
|
|
125394
125410
|
" ",
|
|
125395
125411
|
"- Jump through words in the input"
|
|
125396
125412
|
] }),
|
|
125397
125413
|
/* @__PURE__ */ jsxs51(Text54, { color: Colors.Foreground, children: [
|
|
125398
|
-
/* @__PURE__ */
|
|
125414
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.AccentPurple, children: "Ctrl+C" }),
|
|
125399
125415
|
" ",
|
|
125400
125416
|
"- Quit application"
|
|
125401
125417
|
] }),
|
|
125402
125418
|
/* @__PURE__ */ jsxs51(Text54, { color: Colors.Foreground, children: [
|
|
125403
|
-
/* @__PURE__ */
|
|
125419
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.AccentPurple, children: process.platform === "win32" ? "Ctrl+Enter" : "Ctrl+J" }),
|
|
125404
125420
|
" ",
|
|
125405
125421
|
process.platform === "linux" ? "- New line (Alt+Enter works for certain linux distros)" : "- New line"
|
|
125406
125422
|
] }),
|
|
125407
125423
|
/* @__PURE__ */ jsxs51(Text54, { color: Colors.Foreground, children: [
|
|
125408
|
-
/* @__PURE__ */
|
|
125424
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.AccentPurple, children: "Ctrl+L" }),
|
|
125409
125425
|
" ",
|
|
125410
125426
|
"- Clear the screen"
|
|
125411
125427
|
] }),
|
|
125412
125428
|
/* @__PURE__ */ jsxs51(Text54, { color: Colors.Foreground, children: [
|
|
125413
|
-
/* @__PURE__ */
|
|
125429
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.AccentPurple, children: process.platform === "darwin" ? "Ctrl+X / Meta+Enter" : "Ctrl+X" }),
|
|
125414
125430
|
" ",
|
|
125415
125431
|
"- Open input in external editor"
|
|
125416
125432
|
] }),
|
|
125417
125433
|
/* @__PURE__ */ jsxs51(Text54, { color: Colors.Foreground, children: [
|
|
125418
|
-
/* @__PURE__ */
|
|
125434
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.AccentPurple, children: "Ctrl+Y" }),
|
|
125419
125435
|
" ",
|
|
125420
125436
|
"- Toggle YOLO mode"
|
|
125421
125437
|
] }),
|
|
125422
125438
|
/* @__PURE__ */ jsxs51(Text54, { color: Colors.Foreground, children: [
|
|
125423
|
-
/* @__PURE__ */
|
|
125439
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.AccentPurple, children: "Enter" }),
|
|
125424
125440
|
" ",
|
|
125425
125441
|
"- Send message"
|
|
125426
125442
|
] }),
|
|
125427
125443
|
/* @__PURE__ */ jsxs51(Text54, { color: Colors.Foreground, children: [
|
|
125428
|
-
/* @__PURE__ */
|
|
125444
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.AccentPurple, children: "Esc" }),
|
|
125429
125445
|
" ",
|
|
125430
125446
|
"- Cancel operation"
|
|
125431
125447
|
] }),
|
|
125432
125448
|
/* @__PURE__ */ jsxs51(Text54, { color: Colors.Foreground, children: [
|
|
125433
|
-
/* @__PURE__ */
|
|
125449
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.AccentPurple, children: "Shift+Tab" }),
|
|
125434
125450
|
" ",
|
|
125435
125451
|
"- Toggle auto-accepting edits"
|
|
125436
125452
|
] }),
|
|
125437
125453
|
/* @__PURE__ */ jsxs51(Text54, { color: Colors.Foreground, children: [
|
|
125438
|
-
/* @__PURE__ */
|
|
125454
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.AccentPurple, children: "Up/Down" }),
|
|
125439
125455
|
" ",
|
|
125440
125456
|
"- Cycle through your prompt history"
|
|
125441
125457
|
] }),
|
|
125442
|
-
/* @__PURE__ */
|
|
125458
|
+
/* @__PURE__ */ jsx56(Box48, { height: 1 }),
|
|
125443
125459
|
/* @__PURE__ */ jsxs51(Text54, { color: Colors.Foreground, children: [
|
|
125444
125460
|
"For a full list of shortcuts, see",
|
|
125445
125461
|
" ",
|
|
125446
|
-
/* @__PURE__ */
|
|
125462
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: Colors.AccentPurple, children: "docs/keyboard-shortcuts.md" })
|
|
125447
125463
|
] })
|
|
125448
125464
|
]
|
|
125449
125465
|
}
|
|
125450
125466
|
);
|
|
125451
125467
|
|
|
125452
125468
|
// packages/cli/src/ui/components/HistoryItemDisplay.tsx
|
|
125453
|
-
import { jsx as
|
|
125469
|
+
import { jsx as jsx57, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
125454
125470
|
var HistoryItemDisplay = ({
|
|
125455
125471
|
item,
|
|
125456
125472
|
availableTerminalHeight,
|
|
@@ -125460,9 +125476,9 @@ var HistoryItemDisplay = ({
|
|
|
125460
125476
|
commands,
|
|
125461
125477
|
isFocused = true
|
|
125462
125478
|
}) => /* @__PURE__ */ jsxs52(Box49, { flexDirection: "column", children: [
|
|
125463
|
-
item.type === "user" && /* @__PURE__ */
|
|
125464
|
-
item.type === "user_shell" && /* @__PURE__ */
|
|
125465
|
-
item.type === "gemini" && /* @__PURE__ */
|
|
125479
|
+
item.type === "user" && /* @__PURE__ */ jsx57(UserMessage, { text: item.text }),
|
|
125480
|
+
item.type === "user_shell" && /* @__PURE__ */ jsx57(UserShellMessage, { text: item.text }),
|
|
125481
|
+
item.type === "gemini" && /* @__PURE__ */ jsx57(
|
|
125466
125482
|
GeminiMessage,
|
|
125467
125483
|
{
|
|
125468
125484
|
text: item.text,
|
|
@@ -125471,7 +125487,7 @@ var HistoryItemDisplay = ({
|
|
|
125471
125487
|
terminalWidth
|
|
125472
125488
|
}
|
|
125473
125489
|
),
|
|
125474
|
-
item.type === "gemini_content" && /* @__PURE__ */
|
|
125490
|
+
item.type === "gemini_content" && /* @__PURE__ */ jsx57(
|
|
125475
125491
|
GeminiMessageContent,
|
|
125476
125492
|
{
|
|
125477
125493
|
text: item.text,
|
|
@@ -125480,9 +125496,9 @@ var HistoryItemDisplay = ({
|
|
|
125480
125496
|
terminalWidth
|
|
125481
125497
|
}
|
|
125482
125498
|
),
|
|
125483
|
-
item.type === "info" && /* @__PURE__ */
|
|
125484
|
-
item.type === "error" && /* @__PURE__ */
|
|
125485
|
-
item.type === "about" && /* @__PURE__ */
|
|
125499
|
+
item.type === "info" && /* @__PURE__ */ jsx57(InfoMessage, { text: item.text }),
|
|
125500
|
+
item.type === "error" && /* @__PURE__ */ jsx57(ErrorMessage, { text: item.text }),
|
|
125501
|
+
item.type === "about" && /* @__PURE__ */ jsx57(
|
|
125486
125502
|
AboutBox,
|
|
125487
125503
|
{
|
|
125488
125504
|
cliVersion: item.cliVersion,
|
|
@@ -125494,12 +125510,12 @@ var HistoryItemDisplay = ({
|
|
|
125494
125510
|
ideClient: item.ideClient
|
|
125495
125511
|
}
|
|
125496
125512
|
),
|
|
125497
|
-
item.type === "help" && commands && /* @__PURE__ */
|
|
125498
|
-
item.type === "stats" && /* @__PURE__ */
|
|
125499
|
-
item.type === "model_stats" && /* @__PURE__ */
|
|
125500
|
-
item.type === "tool_stats" && /* @__PURE__ */
|
|
125501
|
-
item.type === "quit" && /* @__PURE__ */
|
|
125502
|
-
item.type === "tool_group" && /* @__PURE__ */
|
|
125513
|
+
item.type === "help" && commands && /* @__PURE__ */ jsx57(Help, { commands }),
|
|
125514
|
+
item.type === "stats" && /* @__PURE__ */ jsx57(StatsDisplay, { duration: item.duration }),
|
|
125515
|
+
item.type === "model_stats" && /* @__PURE__ */ jsx57(ModelStatsDisplay, {}),
|
|
125516
|
+
item.type === "tool_stats" && /* @__PURE__ */ jsx57(ToolStatsDisplay, {}),
|
|
125517
|
+
item.type === "quit" && /* @__PURE__ */ jsx57(SessionSummaryDisplay, { duration: item.duration }),
|
|
125518
|
+
item.type === "tool_group" && /* @__PURE__ */ jsx57(
|
|
125503
125519
|
ToolGroupMessage,
|
|
125504
125520
|
{
|
|
125505
125521
|
toolCalls: item.tools,
|
|
@@ -125510,12 +125526,12 @@ var HistoryItemDisplay = ({
|
|
|
125510
125526
|
isFocused
|
|
125511
125527
|
}
|
|
125512
125528
|
),
|
|
125513
|
-
item.type === "compression" && /* @__PURE__ */
|
|
125529
|
+
item.type === "compression" && /* @__PURE__ */ jsx57(CompressionMessage, { compression: item.compression })
|
|
125514
125530
|
] }, item.id);
|
|
125515
125531
|
|
|
125516
125532
|
// packages/cli/src/ui/components/ContextSummaryDisplay.tsx
|
|
125517
125533
|
import { Box as Box50, Text as Text55 } from "ink";
|
|
125518
|
-
import { jsx as
|
|
125534
|
+
import { jsx as jsx58, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
125519
125535
|
var ContextSummaryDisplay = ({
|
|
125520
125536
|
geminiMdFileCount,
|
|
125521
125537
|
contextFileNames,
|
|
@@ -125530,7 +125546,7 @@ var ContextSummaryDisplay = ({
|
|
|
125530
125546
|
const blockedMcpServerCount = blockedMcpServers?.length || 0;
|
|
125531
125547
|
const openFileCount = ideContext2?.workspaceState?.openFiles?.length ?? 0;
|
|
125532
125548
|
if (geminiMdFileCount === 0 && mcpServerCount === 0 && blockedMcpServerCount === 0 && openFileCount === 0) {
|
|
125533
|
-
return /* @__PURE__ */
|
|
125549
|
+
return /* @__PURE__ */ jsx58(Text55, { children: " " });
|
|
125534
125550
|
}
|
|
125535
125551
|
const openFilesText = (() => {
|
|
125536
125552
|
if (openFileCount === 0) {
|
|
@@ -125576,7 +125592,7 @@ var ContextSummaryDisplay = ({
|
|
|
125576
125592
|
const summaryParts = [openFilesText, geminiMdText, mcpText].filter(Boolean);
|
|
125577
125593
|
if (isNarrow) {
|
|
125578
125594
|
return /* @__PURE__ */ jsxs53(Box50, { flexDirection: "column", children: [
|
|
125579
|
-
/* @__PURE__ */
|
|
125595
|
+
/* @__PURE__ */ jsx58(Text55, { color: Colors.Gray, children: "Using:" }),
|
|
125580
125596
|
summaryParts.map((part, index) => /* @__PURE__ */ jsxs53(Text55, { color: Colors.Gray, children: [
|
|
125581
125597
|
" ",
|
|
125582
125598
|
"- ",
|
|
@@ -125584,7 +125600,7 @@ var ContextSummaryDisplay = ({
|
|
|
125584
125600
|
] }, index))
|
|
125585
125601
|
] });
|
|
125586
125602
|
}
|
|
125587
|
-
return /* @__PURE__ */
|
|
125603
|
+
return /* @__PURE__ */ jsx58(Box50, { children: /* @__PURE__ */ jsxs53(Text55, { color: Colors.Gray, children: [
|
|
125588
125604
|
"Using: ",
|
|
125589
125605
|
summaryParts.join(" | ")
|
|
125590
125606
|
] }) });
|
|
@@ -125653,7 +125669,7 @@ import process18 from "node:process";
|
|
|
125653
125669
|
// packages/cli/src/ui/IdeIntegrationNudge.tsx
|
|
125654
125670
|
init_dist2();
|
|
125655
125671
|
import { Box as Box51, Text as Text56 } from "ink";
|
|
125656
|
-
import { jsx as
|
|
125672
|
+
import { jsx as jsx59, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
125657
125673
|
function IdeIntegrationNudge({
|
|
125658
125674
|
ide,
|
|
125659
125675
|
onComplete
|
|
@@ -125707,12 +125723,12 @@ function IdeIntegrationNudge({
|
|
|
125707
125723
|
children: [
|
|
125708
125724
|
/* @__PURE__ */ jsxs54(Box51, { marginBottom: 1, flexDirection: "column", children: [
|
|
125709
125725
|
/* @__PURE__ */ jsxs54(Text56, { children: [
|
|
125710
|
-
/* @__PURE__ */
|
|
125726
|
+
/* @__PURE__ */ jsx59(Text56, { color: "yellow", children: "> " }),
|
|
125711
125727
|
`Do you want to connect ${ideName ?? "your"} editor to FSS Link?`
|
|
125712
125728
|
] }),
|
|
125713
|
-
/* @__PURE__ */
|
|
125729
|
+
/* @__PURE__ */ jsx59(Text56, { dimColor: true, children: installText })
|
|
125714
125730
|
] }),
|
|
125715
|
-
/* @__PURE__ */
|
|
125731
|
+
/* @__PURE__ */ jsx59(RadioButtonSelect, { items: OPTIONS, onSelect: onComplete })
|
|
125716
125732
|
]
|
|
125717
125733
|
}
|
|
125718
125734
|
);
|
|
@@ -125809,7 +125825,7 @@ import {
|
|
|
125809
125825
|
useEffect as useEffect40,
|
|
125810
125826
|
useState as useState43
|
|
125811
125827
|
} from "react";
|
|
125812
|
-
import { jsx as
|
|
125828
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
125813
125829
|
var VimModeContext = createContext5(void 0);
|
|
125814
125830
|
var VimModeProvider = ({
|
|
125815
125831
|
children,
|
|
@@ -125842,7 +125858,7 @@ var VimModeProvider = ({
|
|
|
125842
125858
|
toggleVimEnabled,
|
|
125843
125859
|
setVimMode
|
|
125844
125860
|
};
|
|
125845
|
-
return /* @__PURE__ */
|
|
125861
|
+
return /* @__PURE__ */ jsx60(VimModeContext.Provider, { value, children });
|
|
125846
125862
|
};
|
|
125847
125863
|
var useVimMode = () => {
|
|
125848
125864
|
const context = useContext5(VimModeContext);
|
|
@@ -126410,15 +126426,15 @@ import * as fs67 from "fs";
|
|
|
126410
126426
|
|
|
126411
126427
|
// packages/cli/src/ui/components/UpdateNotification.tsx
|
|
126412
126428
|
import { Box as Box52, Text as Text57 } from "ink";
|
|
126413
|
-
import { jsx as
|
|
126414
|
-
var UpdateNotification = ({ message }) => /* @__PURE__ */
|
|
126429
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
126430
|
+
var UpdateNotification = ({ message }) => /* @__PURE__ */ jsx61(
|
|
126415
126431
|
Box52,
|
|
126416
126432
|
{
|
|
126417
126433
|
borderStyle: "round",
|
|
126418
126434
|
borderColor: Colors.AccentYellow,
|
|
126419
126435
|
paddingX: 1,
|
|
126420
126436
|
marginY: 1,
|
|
126421
|
-
children: /* @__PURE__ */
|
|
126437
|
+
children: /* @__PURE__ */ jsx61(Text57, { color: Colors.AccentYellow, children: message })
|
|
126422
126438
|
}
|
|
126423
126439
|
);
|
|
126424
126440
|
|
|
@@ -126603,14 +126619,14 @@ init_SearchEngineConfigProvider();
|
|
|
126603
126619
|
|
|
126604
126620
|
// packages/cli/src/ui/components/ShowMoreLines.tsx
|
|
126605
126621
|
import { Box as Box53, Text as Text58 } from "ink";
|
|
126606
|
-
import { jsx as
|
|
126622
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
126607
126623
|
var ShowMoreLines = ({ constrainHeight }) => {
|
|
126608
126624
|
const overflowState = useOverflowState();
|
|
126609
126625
|
const streamingState = useStreamingContext();
|
|
126610
126626
|
if (overflowState === void 0 || overflowState.overflowingIds.size === 0 || !constrainHeight || !(streamingState === "idle" /* Idle */ || streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */)) {
|
|
126611
126627
|
return null;
|
|
126612
126628
|
}
|
|
126613
|
-
return /* @__PURE__ */
|
|
126629
|
+
return /* @__PURE__ */ jsx62(Box53, { children: /* @__PURE__ */ jsx62(Text58, { color: Colors.Gray, wrap: "truncate", children: "Press ctrl-s to show more lines" }) });
|
|
126614
126630
|
};
|
|
126615
126631
|
|
|
126616
126632
|
// packages/cli/src/ui/privacy/PrivacyNotice.tsx
|
|
@@ -126619,7 +126635,7 @@ import { Box as Box57 } from "ink";
|
|
|
126619
126635
|
|
|
126620
126636
|
// packages/cli/src/ui/privacy/GeminiPrivacyNotice.tsx
|
|
126621
126637
|
import { Box as Box54, Newline, Text as Text59 } from "ink";
|
|
126622
|
-
import { jsx as
|
|
126638
|
+
import { jsx as jsx63, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
126623
126639
|
var GeminiPrivacyNotice = ({ onExit }) => {
|
|
126624
126640
|
useKeypress(
|
|
126625
126641
|
(key) => {
|
|
@@ -126630,47 +126646,47 @@ var GeminiPrivacyNotice = ({ onExit }) => {
|
|
|
126630
126646
|
{ isActive: true }
|
|
126631
126647
|
);
|
|
126632
126648
|
return /* @__PURE__ */ jsxs55(Box54, { flexDirection: "column", marginBottom: 1, children: [
|
|
126633
|
-
/* @__PURE__ */
|
|
126634
|
-
/* @__PURE__ */
|
|
126649
|
+
/* @__PURE__ */ jsx63(Text59, { bold: true, color: Colors.AccentPurple, children: "Gemini API Key Notice" }),
|
|
126650
|
+
/* @__PURE__ */ jsx63(Newline, {}),
|
|
126635
126651
|
/* @__PURE__ */ jsxs55(Text59, { children: [
|
|
126636
126652
|
"By using the Gemini API",
|
|
126637
|
-
/* @__PURE__ */
|
|
126653
|
+
/* @__PURE__ */ jsx63(Text59, { color: Colors.AccentBlue, children: "[1]" }),
|
|
126638
126654
|
", Google AI Studio",
|
|
126639
|
-
/* @__PURE__ */
|
|
126655
|
+
/* @__PURE__ */ jsx63(Text59, { color: Colors.AccentRed, children: "[2]" }),
|
|
126640
126656
|
', and the other Google developer services that reference these terms (collectively, the "APIs" or "Services"), you are agreeing to Google APIs Terms of Service (the "API Terms")',
|
|
126641
|
-
/* @__PURE__ */
|
|
126657
|
+
/* @__PURE__ */ jsx63(Text59, { color: Colors.AccentGreen, children: "[3]" }),
|
|
126642
126658
|
', and the Gemini API Additional Terms of Service (the "Additional Terms")',
|
|
126643
|
-
/* @__PURE__ */
|
|
126659
|
+
/* @__PURE__ */ jsx63(Text59, { color: Colors.AccentPurple, children: "[4]" }),
|
|
126644
126660
|
"."
|
|
126645
126661
|
] }),
|
|
126646
|
-
/* @__PURE__ */
|
|
126662
|
+
/* @__PURE__ */ jsx63(Newline, {}),
|
|
126647
126663
|
/* @__PURE__ */ jsxs55(Text59, { children: [
|
|
126648
|
-
/* @__PURE__ */
|
|
126664
|
+
/* @__PURE__ */ jsx63(Text59, { color: Colors.AccentBlue, children: "[1]" }),
|
|
126649
126665
|
" ",
|
|
126650
126666
|
"https://ai.google.dev/docs/gemini_api_overview"
|
|
126651
126667
|
] }),
|
|
126652
126668
|
/* @__PURE__ */ jsxs55(Text59, { children: [
|
|
126653
|
-
/* @__PURE__ */
|
|
126669
|
+
/* @__PURE__ */ jsx63(Text59, { color: Colors.AccentRed, children: "[2]" }),
|
|
126654
126670
|
" https://aistudio.google.com/"
|
|
126655
126671
|
] }),
|
|
126656
126672
|
/* @__PURE__ */ jsxs55(Text59, { children: [
|
|
126657
|
-
/* @__PURE__ */
|
|
126673
|
+
/* @__PURE__ */ jsx63(Text59, { color: Colors.AccentGreen, children: "[3]" }),
|
|
126658
126674
|
" ",
|
|
126659
126675
|
"https://developers.google.com/terms"
|
|
126660
126676
|
] }),
|
|
126661
126677
|
/* @__PURE__ */ jsxs55(Text59, { children: [
|
|
126662
|
-
/* @__PURE__ */
|
|
126678
|
+
/* @__PURE__ */ jsx63(Text59, { color: Colors.AccentPurple, children: "[4]" }),
|
|
126663
126679
|
" ",
|
|
126664
126680
|
"https://ai.google.dev/gemini-api/terms"
|
|
126665
126681
|
] }),
|
|
126666
|
-
/* @__PURE__ */
|
|
126667
|
-
/* @__PURE__ */
|
|
126682
|
+
/* @__PURE__ */ jsx63(Newline, {}),
|
|
126683
|
+
/* @__PURE__ */ jsx63(Text59, { color: Colors.Gray, children: "Press Esc to exit." })
|
|
126668
126684
|
] });
|
|
126669
126685
|
};
|
|
126670
126686
|
|
|
126671
126687
|
// packages/cli/src/ui/privacy/CloudPaidPrivacyNotice.tsx
|
|
126672
126688
|
import { Box as Box55, Newline as Newline2, Text as Text60 } from "ink";
|
|
126673
|
-
import { jsx as
|
|
126689
|
+
import { jsx as jsx64, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
126674
126690
|
var CloudPaidPrivacyNotice = ({
|
|
126675
126691
|
onExit
|
|
126676
126692
|
}) => {
|
|
@@ -126683,28 +126699,28 @@ var CloudPaidPrivacyNotice = ({
|
|
|
126683
126699
|
{ isActive: true }
|
|
126684
126700
|
);
|
|
126685
126701
|
return /* @__PURE__ */ jsxs56(Box55, { flexDirection: "column", marginBottom: 1, children: [
|
|
126686
|
-
/* @__PURE__ */
|
|
126687
|
-
/* @__PURE__ */
|
|
126702
|
+
/* @__PURE__ */ jsx64(Text60, { bold: true, color: Colors.AccentPurple, children: "Vertex AI Notice" }),
|
|
126703
|
+
/* @__PURE__ */ jsx64(Newline2, {}),
|
|
126688
126704
|
/* @__PURE__ */ jsxs56(Text60, { children: [
|
|
126689
126705
|
"Service Specific Terms",
|
|
126690
|
-
/* @__PURE__ */
|
|
126706
|
+
/* @__PURE__ */ jsx64(Text60, { color: Colors.AccentBlue, children: "[1]" }),
|
|
126691
126707
|
" are incorporated into the agreement under which Google has agreed to provide Google Cloud Platform",
|
|
126692
|
-
/* @__PURE__ */
|
|
126708
|
+
/* @__PURE__ */ jsx64(Text60, { color: Colors.AccentGreen, children: "[2]" }),
|
|
126693
126709
|
" to Customer (the \u201CAgreement\u201D). If the Agreement authorizes the resale or supply of Google Cloud Platform under a Google Cloud partner or reseller program, then except for in the section entitled \u201CPartner-Specific Terms\u201D, all references to Customer in the Service Specific Terms mean Partner or Reseller (as applicable), and all references to Customer Data in the Service Specific Terms mean Partner Data. Capitalized terms used but not defined in the Service Specific Terms have the meaning given to them in the Agreement."
|
|
126694
126710
|
] }),
|
|
126695
|
-
/* @__PURE__ */
|
|
126711
|
+
/* @__PURE__ */ jsx64(Newline2, {}),
|
|
126696
126712
|
/* @__PURE__ */ jsxs56(Text60, { children: [
|
|
126697
|
-
/* @__PURE__ */
|
|
126713
|
+
/* @__PURE__ */ jsx64(Text60, { color: Colors.AccentBlue, children: "[1]" }),
|
|
126698
126714
|
" ",
|
|
126699
126715
|
"https://cloud.google.com/terms/service-terms"
|
|
126700
126716
|
] }),
|
|
126701
126717
|
/* @__PURE__ */ jsxs56(Text60, { children: [
|
|
126702
|
-
/* @__PURE__ */
|
|
126718
|
+
/* @__PURE__ */ jsx64(Text60, { color: Colors.AccentGreen, children: "[2]" }),
|
|
126703
126719
|
" ",
|
|
126704
126720
|
"https://cloud.google.com/terms/services"
|
|
126705
126721
|
] }),
|
|
126706
|
-
/* @__PURE__ */
|
|
126707
|
-
/* @__PURE__ */
|
|
126722
|
+
/* @__PURE__ */ jsx64(Newline2, {}),
|
|
126723
|
+
/* @__PURE__ */ jsx64(Text60, { color: Colors.Gray, children: "Press Esc to exit." })
|
|
126708
126724
|
] });
|
|
126709
126725
|
};
|
|
126710
126726
|
|
|
@@ -126822,7 +126838,7 @@ async function setRemoteDataCollectionOptIn(server, optIn) {
|
|
|
126822
126838
|
}
|
|
126823
126839
|
|
|
126824
126840
|
// packages/cli/src/ui/privacy/CloudFreePrivacyNotice.tsx
|
|
126825
|
-
import { jsx as
|
|
126841
|
+
import { jsx as jsx65, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
126826
126842
|
var CloudFreePrivacyNotice = ({
|
|
126827
126843
|
config,
|
|
126828
126844
|
onExit
|
|
@@ -126837,7 +126853,7 @@ var CloudFreePrivacyNotice = ({
|
|
|
126837
126853
|
{ isActive: true }
|
|
126838
126854
|
);
|
|
126839
126855
|
if (privacyState.isLoading) {
|
|
126840
|
-
return /* @__PURE__ */
|
|
126856
|
+
return /* @__PURE__ */ jsx65(Text61, { color: Colors.Gray, children: "Loading..." });
|
|
126841
126857
|
}
|
|
126842
126858
|
if (privacyState.error) {
|
|
126843
126859
|
return /* @__PURE__ */ jsxs57(Box56, { flexDirection: "column", marginY: 1, children: [
|
|
@@ -126845,32 +126861,32 @@ var CloudFreePrivacyNotice = ({
|
|
|
126845
126861
|
"Error loading Opt-in settings: ",
|
|
126846
126862
|
privacyState.error
|
|
126847
126863
|
] }),
|
|
126848
|
-
/* @__PURE__ */
|
|
126864
|
+
/* @__PURE__ */ jsx65(Text61, { color: Colors.Gray, children: "Press Esc to exit." })
|
|
126849
126865
|
] });
|
|
126850
126866
|
}
|
|
126851
126867
|
if (privacyState.isFreeTier === false) {
|
|
126852
|
-
return /* @__PURE__ */
|
|
126868
|
+
return /* @__PURE__ */ jsx65(CloudPaidPrivacyNotice, { onExit });
|
|
126853
126869
|
}
|
|
126854
126870
|
const items = [
|
|
126855
126871
|
{ label: "Yes", value: true },
|
|
126856
126872
|
{ label: "No", value: false }
|
|
126857
126873
|
];
|
|
126858
126874
|
return /* @__PURE__ */ jsxs57(Box56, { flexDirection: "column", marginY: 1, children: [
|
|
126859
|
-
/* @__PURE__ */
|
|
126860
|
-
/* @__PURE__ */
|
|
126875
|
+
/* @__PURE__ */ jsx65(Text61, { bold: true, color: Colors.AccentPurple, children: "Gemini Code Assist for Individuals Privacy Notice" }),
|
|
126876
|
+
/* @__PURE__ */ jsx65(Newline3, {}),
|
|
126861
126877
|
/* @__PURE__ */ jsxs57(Text61, { children: [
|
|
126862
126878
|
"This notice and our Privacy Policy",
|
|
126863
|
-
/* @__PURE__ */
|
|
126879
|
+
/* @__PURE__ */ jsx65(Text61, { color: Colors.AccentBlue, children: "[1]" }),
|
|
126864
126880
|
" describe how Gemini Code Assist handles your data. Please read them carefully."
|
|
126865
126881
|
] }),
|
|
126866
|
-
/* @__PURE__ */
|
|
126867
|
-
/* @__PURE__ */
|
|
126868
|
-
/* @__PURE__ */
|
|
126869
|
-
/* @__PURE__ */
|
|
126870
|
-
/* @__PURE__ */
|
|
126882
|
+
/* @__PURE__ */ jsx65(Newline3, {}),
|
|
126883
|
+
/* @__PURE__ */ jsx65(Text61, { children: "When you use Gemini Code Assist for individuals with Gemini CLI, Google collects your prompts, related code, generated output, code edits, related feature usage information, and your feedback to provide, improve, and develop Google products and services and machine learning technologies." }),
|
|
126884
|
+
/* @__PURE__ */ jsx65(Newline3, {}),
|
|
126885
|
+
/* @__PURE__ */ jsx65(Text61, { children: "To help with quality and improve our products (such as generative machine-learning models), human reviewers may read, annotate, and process the data collected above. We take steps to protect your privacy as part of this process. This includes disconnecting the data from your Google Account before reviewers see or annotate it, and storing those disconnected copies for up to 18 months. Please don't submit confidential information or any data you wouldn't want a reviewer to see or Google to use to improve our products, services and machine-learning technologies." }),
|
|
126886
|
+
/* @__PURE__ */ jsx65(Newline3, {}),
|
|
126871
126887
|
/* @__PURE__ */ jsxs57(Box56, { flexDirection: "column", children: [
|
|
126872
|
-
/* @__PURE__ */
|
|
126873
|
-
/* @__PURE__ */
|
|
126888
|
+
/* @__PURE__ */ jsx65(Text61, { children: "Allow Google to use this data to develop and improve our products?" }),
|
|
126889
|
+
/* @__PURE__ */ jsx65(
|
|
126874
126890
|
RadioButtonSelect,
|
|
126875
126891
|
{
|
|
126876
126892
|
items,
|
|
@@ -126884,19 +126900,19 @@ var CloudFreePrivacyNotice = ({
|
|
|
126884
126900
|
}
|
|
126885
126901
|
)
|
|
126886
126902
|
] }),
|
|
126887
|
-
/* @__PURE__ */
|
|
126903
|
+
/* @__PURE__ */ jsx65(Newline3, {}),
|
|
126888
126904
|
/* @__PURE__ */ jsxs57(Text61, { children: [
|
|
126889
|
-
/* @__PURE__ */
|
|
126905
|
+
/* @__PURE__ */ jsx65(Text61, { color: Colors.AccentBlue, children: "[1]" }),
|
|
126890
126906
|
" ",
|
|
126891
126907
|
"https://policies.google.com/privacy"
|
|
126892
126908
|
] }),
|
|
126893
|
-
/* @__PURE__ */
|
|
126894
|
-
/* @__PURE__ */
|
|
126909
|
+
/* @__PURE__ */ jsx65(Newline3, {}),
|
|
126910
|
+
/* @__PURE__ */ jsx65(Text61, { color: Colors.Gray, children: "Press Enter to choose an option and exit." })
|
|
126895
126911
|
] });
|
|
126896
126912
|
};
|
|
126897
126913
|
|
|
126898
126914
|
// packages/cli/src/ui/privacy/PrivacyNotice.tsx
|
|
126899
|
-
import { jsx as
|
|
126915
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
126900
126916
|
var PrivacyNoticeText = ({
|
|
126901
126917
|
config,
|
|
126902
126918
|
onExit
|
|
@@ -126904,15 +126920,15 @@ var PrivacyNoticeText = ({
|
|
|
126904
126920
|
const authType = config.getContentGeneratorConfig()?.authType;
|
|
126905
126921
|
switch (authType) {
|
|
126906
126922
|
case AuthType.USE_GEMINI:
|
|
126907
|
-
return /* @__PURE__ */
|
|
126923
|
+
return /* @__PURE__ */ jsx66(GeminiPrivacyNotice, { onExit });
|
|
126908
126924
|
case AuthType.USE_VERTEX_AI:
|
|
126909
|
-
return /* @__PURE__ */
|
|
126925
|
+
return /* @__PURE__ */ jsx66(CloudPaidPrivacyNotice, { onExit });
|
|
126910
126926
|
case AuthType.LOGIN_WITH_GOOGLE:
|
|
126911
126927
|
default:
|
|
126912
|
-
return /* @__PURE__ */
|
|
126928
|
+
return /* @__PURE__ */ jsx66(CloudFreePrivacyNotice, { config, onExit });
|
|
126913
126929
|
}
|
|
126914
126930
|
};
|
|
126915
|
-
var PrivacyNotice = ({ onExit, config }) => /* @__PURE__ */
|
|
126931
|
+
var PrivacyNotice = ({ onExit, config }) => /* @__PURE__ */ jsx66(Box57, { borderStyle: "round", padding: 1, flexDirection: "column", children: /* @__PURE__ */ jsx66(PrivacyNoticeText, { config, onExit }) });
|
|
126916
126932
|
|
|
126917
126933
|
// packages/cli/src/ui/hooks/useSettingsCommand.ts
|
|
126918
126934
|
import { useState as useState46, useCallback as useCallback28 } from "react";
|
|
@@ -126936,7 +126952,7 @@ import React30, { useState as useState47, useEffect as useEffect43 } from "react
|
|
|
126936
126952
|
import { Box as Box58, Text as Text62 } from "ink";
|
|
126937
126953
|
init_settings();
|
|
126938
126954
|
import chalk2 from "chalk";
|
|
126939
|
-
import { jsx as
|
|
126955
|
+
import { jsx as jsx67, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
126940
126956
|
var maxItemsToShow = 8;
|
|
126941
126957
|
function SettingsDialog({
|
|
126942
126958
|
settings,
|
|
@@ -127372,7 +127388,7 @@ function SettingsDialog({
|
|
|
127372
127388
|
},
|
|
127373
127389
|
{ isActive: true }
|
|
127374
127390
|
);
|
|
127375
|
-
return /* @__PURE__ */
|
|
127391
|
+
return /* @__PURE__ */ jsx67(
|
|
127376
127392
|
Box58,
|
|
127377
127393
|
{
|
|
127378
127394
|
borderStyle: "round",
|
|
@@ -127382,9 +127398,9 @@ function SettingsDialog({
|
|
|
127382
127398
|
width: "100%",
|
|
127383
127399
|
height: "100%",
|
|
127384
127400
|
children: /* @__PURE__ */ jsxs58(Box58, { flexDirection: "column", flexGrow: 1, children: [
|
|
127385
|
-
/* @__PURE__ */
|
|
127386
|
-
/* @__PURE__ */
|
|
127387
|
-
showScrollUp && /* @__PURE__ */
|
|
127401
|
+
/* @__PURE__ */ jsx67(Text62, { bold: true, color: Colors.AccentBlue, children: "Settings" }),
|
|
127402
|
+
/* @__PURE__ */ jsx67(Box58, { height: 1 }),
|
|
127403
|
+
showScrollUp && /* @__PURE__ */ jsx67(Text62, { color: Colors.Gray, children: "\u25B2" }),
|
|
127388
127404
|
visibleItems.map((item, idx) => {
|
|
127389
127405
|
const isActive = focusSection === "settings" && activeSettingIndex === idx + scrollOffset;
|
|
127390
127406
|
const scopeSettings = settings.forScope(selectedScope).settings;
|
|
@@ -127437,8 +127453,8 @@ function SettingsDialog({
|
|
|
127437
127453
|
);
|
|
127438
127454
|
return /* @__PURE__ */ jsxs58(React30.Fragment, { children: [
|
|
127439
127455
|
/* @__PURE__ */ jsxs58(Box58, { flexDirection: "row", alignItems: "center", children: [
|
|
127440
|
-
/* @__PURE__ */
|
|
127441
|
-
/* @__PURE__ */
|
|
127456
|
+
/* @__PURE__ */ jsx67(Box58, { minWidth: 2, flexShrink: 0, children: /* @__PURE__ */ jsx67(Text62, { color: isActive ? Colors.AccentGreen : Colors.Gray, children: isActive ? "\u25CF" : "" }) }),
|
|
127457
|
+
/* @__PURE__ */ jsx67(Box58, { minWidth: 50, children: /* @__PURE__ */ jsxs58(
|
|
127442
127458
|
Text62,
|
|
127443
127459
|
{
|
|
127444
127460
|
color: isActive ? Colors.AccentGreen : Colors.Foreground,
|
|
@@ -127451,8 +127467,8 @@ function SettingsDialog({
|
|
|
127451
127467
|
]
|
|
127452
127468
|
}
|
|
127453
127469
|
) }),
|
|
127454
|
-
/* @__PURE__ */
|
|
127455
|
-
/* @__PURE__ */
|
|
127470
|
+
/* @__PURE__ */ jsx67(Box58, { minWidth: 3 }),
|
|
127471
|
+
/* @__PURE__ */ jsx67(
|
|
127456
127472
|
Text62,
|
|
127457
127473
|
{
|
|
127458
127474
|
color: isActive ? Colors.AccentGreen : shouldBeGreyedOut ? Colors.Gray : Colors.Foreground,
|
|
@@ -127460,17 +127476,17 @@ function SettingsDialog({
|
|
|
127460
127476
|
}
|
|
127461
127477
|
)
|
|
127462
127478
|
] }),
|
|
127463
|
-
/* @__PURE__ */
|
|
127479
|
+
/* @__PURE__ */ jsx67(Box58, { height: 1 })
|
|
127464
127480
|
] }, item.value);
|
|
127465
127481
|
}),
|
|
127466
|
-
showScrollDown && /* @__PURE__ */
|
|
127467
|
-
/* @__PURE__ */
|
|
127482
|
+
showScrollDown && /* @__PURE__ */ jsx67(Text62, { color: Colors.Gray, children: "\u25BC" }),
|
|
127483
|
+
/* @__PURE__ */ jsx67(Box58, { height: 1 }),
|
|
127468
127484
|
/* @__PURE__ */ jsxs58(Box58, { marginTop: 1, flexDirection: "column", children: [
|
|
127469
127485
|
/* @__PURE__ */ jsxs58(Text62, { bold: focusSection === "scope", wrap: "truncate", children: [
|
|
127470
127486
|
focusSection === "scope" ? "> " : " ",
|
|
127471
127487
|
"Apply To"
|
|
127472
127488
|
] }),
|
|
127473
|
-
/* @__PURE__ */
|
|
127489
|
+
/* @__PURE__ */ jsx67(
|
|
127474
127490
|
RadioButtonSelect,
|
|
127475
127491
|
{
|
|
127476
127492
|
items: scopeItems,
|
|
@@ -127482,9 +127498,9 @@ function SettingsDialog({
|
|
|
127482
127498
|
}
|
|
127483
127499
|
)
|
|
127484
127500
|
] }),
|
|
127485
|
-
/* @__PURE__ */
|
|
127486
|
-
/* @__PURE__ */
|
|
127487
|
-
showRestartPrompt && /* @__PURE__ */
|
|
127501
|
+
/* @__PURE__ */ jsx67(Box58, { height: 1 }),
|
|
127502
|
+
/* @__PURE__ */ jsx67(Text62, { color: Colors.Gray, children: "(Use Enter to select, Tab to change focus)" }),
|
|
127503
|
+
showRestartPrompt && /* @__PURE__ */ jsx67(Text62, { color: Colors.AccentYellow, children: "To see changes, Gemini CLI must be restarted. Press r to exit and apply changes now." })
|
|
127488
127504
|
] })
|
|
127489
127505
|
}
|
|
127490
127506
|
);
|
|
@@ -127755,17 +127771,17 @@ import { EventEmitter as EventEmitter5 } from "events";
|
|
|
127755
127771
|
var appEvents = new EventEmitter5();
|
|
127756
127772
|
|
|
127757
127773
|
// packages/cli/src/ui/App.tsx
|
|
127758
|
-
import { Fragment as Fragment8, jsx as
|
|
127774
|
+
import { Fragment as Fragment8, jsx as jsx68, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
127759
127775
|
var CTRL_EXIT_PROMPT_DURATION_MS = 1e3;
|
|
127760
127776
|
var MAX_DISPLAYED_QUEUED_MESSAGES = 3;
|
|
127761
127777
|
var AppWrapper = (props) => {
|
|
127762
127778
|
const kittyProtocolStatus = useKittyKeyboardProtocol();
|
|
127763
|
-
return /* @__PURE__ */
|
|
127779
|
+
return /* @__PURE__ */ jsx68(
|
|
127764
127780
|
KeypressProvider,
|
|
127765
127781
|
{
|
|
127766
127782
|
kittyProtocolEnabled: kittyProtocolStatus.enabled,
|
|
127767
127783
|
config: props.config,
|
|
127768
|
-
children: /* @__PURE__ */
|
|
127784
|
+
children: /* @__PURE__ */ jsx68(SessionStatsProvider, { children: /* @__PURE__ */ jsx68(VimModeProvider, { settings: props.settings, children: /* @__PURE__ */ jsx68(App, { ...props }) }) })
|
|
127769
127785
|
}
|
|
127770
127786
|
);
|
|
127771
127787
|
};
|
|
@@ -128402,7 +128418,7 @@ ${queuedText}` : queuedText;
|
|
|
128402
128418
|
geminiClient
|
|
128403
128419
|
]);
|
|
128404
128420
|
if (quittingMessages) {
|
|
128405
|
-
return /* @__PURE__ */
|
|
128421
|
+
return /* @__PURE__ */ jsx68(Box59, { flexDirection: "column", marginBottom: 1, children: quittingMessages.map((item) => /* @__PURE__ */ jsx68(
|
|
128406
128422
|
HistoryItemDisplay,
|
|
128407
128423
|
{
|
|
128408
128424
|
availableTerminalHeight: constrainHeight ? availableTerminalHeight : void 0,
|
|
@@ -128418,16 +128434,16 @@ ${queuedText}` : queuedText;
|
|
|
128418
128434
|
const debugConsoleMaxHeight = Math.floor(Math.max(terminalHeight * 0.2, 5));
|
|
128419
128435
|
const staticAreaMaxItemHeight = Math.max(terminalHeight * 4, 100);
|
|
128420
128436
|
const placeholder = vimModeEnabled ? " Press 'i' for INSERT mode and 'Esc' for NORMAL mode." : " Type your message or @path/to/file";
|
|
128421
|
-
return /* @__PURE__ */
|
|
128422
|
-
/* @__PURE__ */
|
|
128437
|
+
return /* @__PURE__ */ jsx68(StreamingContext.Provider, { value: streamingState, children: /* @__PURE__ */ jsxs59(Box59, { flexDirection: "column", width: "90%", children: [
|
|
128438
|
+
/* @__PURE__ */ jsx68(
|
|
128423
128439
|
Static,
|
|
128424
128440
|
{
|
|
128425
128441
|
items: [
|
|
128426
128442
|
/* @__PURE__ */ jsxs59(Box59, { flexDirection: "column", children: [
|
|
128427
|
-
!settings.merged.hideBanner && /* @__PURE__ */
|
|
128428
|
-
!settings.merged.hideTips && /* @__PURE__ */
|
|
128443
|
+
!settings.merged.hideBanner && /* @__PURE__ */ jsx68(Header, { version, nightly }),
|
|
128444
|
+
!settings.merged.hideTips && /* @__PURE__ */ jsx68(Tips, { config })
|
|
128429
128445
|
] }, "header"),
|
|
128430
|
-
...history.map((h) => /* @__PURE__ */
|
|
128446
|
+
...history.map((h) => /* @__PURE__ */ jsx68(
|
|
128431
128447
|
HistoryItemDisplay,
|
|
128432
128448
|
{
|
|
128433
128449
|
terminalWidth: mainAreaWidth,
|
|
@@ -128444,8 +128460,8 @@ ${queuedText}` : queuedText;
|
|
|
128444
128460
|
},
|
|
128445
128461
|
staticKey
|
|
128446
128462
|
),
|
|
128447
|
-
/* @__PURE__ */
|
|
128448
|
-
pendingHistoryItems.map((item, i) => /* @__PURE__ */
|
|
128463
|
+
/* @__PURE__ */ jsx68(OverflowProvider, { children: /* @__PURE__ */ jsxs59(Box59, { ref: pendingHistoryItemRef, flexDirection: "column", children: [
|
|
128464
|
+
pendingHistoryItems.map((item, i) => /* @__PURE__ */ jsx68(
|
|
128449
128465
|
HistoryItemDisplay,
|
|
128450
128466
|
{
|
|
128451
128467
|
availableTerminalHeight: constrainHeight ? availableTerminalHeight : void 0,
|
|
@@ -128457,11 +128473,11 @@ ${queuedText}` : queuedText;
|
|
|
128457
128473
|
},
|
|
128458
128474
|
i
|
|
128459
128475
|
)),
|
|
128460
|
-
/* @__PURE__ */
|
|
128476
|
+
/* @__PURE__ */ jsx68(ShowMoreLines, { constrainHeight })
|
|
128461
128477
|
] }) }),
|
|
128462
128478
|
/* @__PURE__ */ jsxs59(Box59, { flexDirection: "column", ref: mainControlsRef, children: [
|
|
128463
|
-
updateInfo && /* @__PURE__ */
|
|
128464
|
-
startupWarnings.length > 0 && /* @__PURE__ */
|
|
128479
|
+
updateInfo && /* @__PURE__ */ jsx68(UpdateNotification, { message: updateInfo.message }),
|
|
128480
|
+
startupWarnings.length > 0 && /* @__PURE__ */ jsx68(
|
|
128465
128481
|
Box59,
|
|
128466
128482
|
{
|
|
128467
128483
|
borderStyle: "round",
|
|
@@ -128469,18 +128485,18 @@ ${queuedText}` : queuedText;
|
|
|
128469
128485
|
paddingX: 1,
|
|
128470
128486
|
marginY: 1,
|
|
128471
128487
|
flexDirection: "column",
|
|
128472
|
-
children: startupWarnings.map((warning, index) => /* @__PURE__ */
|
|
128488
|
+
children: startupWarnings.map((warning, index) => /* @__PURE__ */ jsx68(Text63, { color: Colors.AccentYellow, children: warning }, index))
|
|
128473
128489
|
}
|
|
128474
128490
|
),
|
|
128475
|
-
shouldShowIdePrompt && currentIDE ? /* @__PURE__ */
|
|
128491
|
+
shouldShowIdePrompt && currentIDE ? /* @__PURE__ */ jsx68(
|
|
128476
128492
|
IdeIntegrationNudge,
|
|
128477
128493
|
{
|
|
128478
128494
|
ide: currentIDE,
|
|
128479
128495
|
onComplete: handleIdePromptComplete
|
|
128480
128496
|
}
|
|
128481
|
-
) : isFolderTrustDialogOpen ? /* @__PURE__ */
|
|
128497
|
+
) : isFolderTrustDialogOpen ? /* @__PURE__ */ jsx68(FolderTrustDialog, { onSelect: handleFolderTrustSelect }) : shellConfirmationRequest ? /* @__PURE__ */ jsx68(ShellConfirmationDialog, { request: shellConfirmationRequest }) : confirmationRequest ? /* @__PURE__ */ jsxs59(Box59, { flexDirection: "column", children: [
|
|
128482
128498
|
confirmationRequest.prompt,
|
|
128483
|
-
/* @__PURE__ */
|
|
128499
|
+
/* @__PURE__ */ jsx68(Box59, { paddingY: 1, children: /* @__PURE__ */ jsx68(
|
|
128484
128500
|
RadioButtonSelect,
|
|
128485
128501
|
{
|
|
128486
128502
|
isFocused: !!confirmationRequest,
|
|
@@ -128494,8 +128510,8 @@ ${queuedText}` : queuedText;
|
|
|
128494
128510
|
}
|
|
128495
128511
|
) })
|
|
128496
128512
|
] }) : isThemeDialogOpen ? /* @__PURE__ */ jsxs59(Box59, { flexDirection: "column", children: [
|
|
128497
|
-
themeError && /* @__PURE__ */
|
|
128498
|
-
/* @__PURE__ */
|
|
128513
|
+
themeError && /* @__PURE__ */ jsx68(Box59, { marginBottom: 1, children: /* @__PURE__ */ jsx68(Text63, { color: Colors.AccentRed, children: themeError }) }),
|
|
128514
|
+
/* @__PURE__ */ jsx68(
|
|
128499
128515
|
ThemeDialog,
|
|
128500
128516
|
{
|
|
128501
128517
|
onSelect: handleThemeSelect,
|
|
@@ -128505,7 +128521,7 @@ ${queuedText}` : queuedText;
|
|
|
128505
128521
|
terminalWidth: mainAreaWidth
|
|
128506
128522
|
}
|
|
128507
128523
|
)
|
|
128508
|
-
] }) : isSettingsDialogOpen ? /* @__PURE__ */
|
|
128524
|
+
] }) : isSettingsDialogOpen ? /* @__PURE__ */ jsx68(Box59, { flexDirection: "column", children: /* @__PURE__ */ jsx68(
|
|
128509
128525
|
SettingsDialog,
|
|
128510
128526
|
{
|
|
128511
128527
|
settings,
|
|
@@ -128513,7 +128529,7 @@ ${queuedText}` : queuedText;
|
|
|
128513
128529
|
onRestartRequest: () => process18.exit(0)
|
|
128514
128530
|
}
|
|
128515
128531
|
) }) : isAuthenticating ? /* @__PURE__ */ jsxs59(Fragment8, { children: [
|
|
128516
|
-
/* @__PURE__ */
|
|
128532
|
+
/* @__PURE__ */ jsx68(
|
|
128517
128533
|
AuthInProgress,
|
|
128518
128534
|
{
|
|
128519
128535
|
onTimeout: () => {
|
|
@@ -128523,8 +128539,8 @@ ${queuedText}` : queuedText;
|
|
|
128523
128539
|
}
|
|
128524
128540
|
}
|
|
128525
128541
|
),
|
|
128526
|
-
showErrorDetails && /* @__PURE__ */
|
|
128527
|
-
/* @__PURE__ */
|
|
128542
|
+
showErrorDetails && /* @__PURE__ */ jsx68(OverflowProvider, { children: /* @__PURE__ */ jsxs59(Box59, { flexDirection: "column", children: [
|
|
128543
|
+
/* @__PURE__ */ jsx68(
|
|
128528
128544
|
DetailedMessagesDisplay,
|
|
128529
128545
|
{
|
|
128530
128546
|
messages: filteredConsoleMessages,
|
|
@@ -128532,9 +128548,9 @@ ${queuedText}` : queuedText;
|
|
|
128532
128548
|
width: inputWidth
|
|
128533
128549
|
}
|
|
128534
128550
|
),
|
|
128535
|
-
/* @__PURE__ */
|
|
128551
|
+
/* @__PURE__ */ jsx68(ShowMoreLines, { constrainHeight })
|
|
128536
128552
|
] }) })
|
|
128537
|
-
] }) : isAuthDialogOpen ? /* @__PURE__ */
|
|
128553
|
+
] }) : isAuthDialogOpen ? /* @__PURE__ */ jsx68(Box59, { flexDirection: "column", children: /* @__PURE__ */ jsx68(
|
|
128538
128554
|
AuthDialog,
|
|
128539
128555
|
{
|
|
128540
128556
|
onSelect: handleAuthSelect,
|
|
@@ -128542,7 +128558,7 @@ ${queuedText}` : queuedText;
|
|
|
128542
128558
|
initialErrorMessage: authError,
|
|
128543
128559
|
onQuickModelSwitch: openProviderDialog
|
|
128544
128560
|
}
|
|
128545
|
-
) }) : modelDialogState === "provider" ? /* @__PURE__ */
|
|
128561
|
+
) }) : modelDialogState === "provider" ? /* @__PURE__ */ jsx68(Box59, { flexDirection: "column", children: /* @__PURE__ */ jsx68(
|
|
128546
128562
|
ProviderEndpointSelectionDialog,
|
|
128547
128563
|
{
|
|
128548
128564
|
onSelect: (providerType, endpointUrl, endpointLabel) => {
|
|
@@ -128554,7 +128570,7 @@ ${queuedText}` : queuedText;
|
|
|
128554
128570
|
},
|
|
128555
128571
|
onCancel: closeModelDialogs
|
|
128556
128572
|
}
|
|
128557
|
-
) }) : modelDialogState === "model" ? /* @__PURE__ */
|
|
128573
|
+
) }) : modelDialogState === "model" ? /* @__PURE__ */ jsx68(Box59, { flexDirection: "column", children: /* @__PURE__ */ jsx68(
|
|
128558
128574
|
EnhancedModelSelectionDialog,
|
|
128559
128575
|
{
|
|
128560
128576
|
providerType: selectedProvider,
|
|
@@ -128564,7 +128580,7 @@ ${queuedText}` : queuedText;
|
|
|
128564
128580
|
onBack: goBackToProvider,
|
|
128565
128581
|
onCancel: closeModelDialogs
|
|
128566
128582
|
}
|
|
128567
|
-
) }) : shouldShowWelcomeBack && projectSummary ? /* @__PURE__ */
|
|
128583
|
+
) }) : shouldShowWelcomeBack && projectSummary ? /* @__PURE__ */ jsx68(Box59, { flexDirection: "column", children: /* @__PURE__ */ jsx68(
|
|
128568
128584
|
WelcomeBackDialog,
|
|
128569
128585
|
{
|
|
128570
128586
|
projectSummary,
|
|
@@ -128573,8 +128589,8 @@ ${queuedText}` : queuedText;
|
|
|
128573
128589
|
onCancel: handleWelcomeBackCancel
|
|
128574
128590
|
}
|
|
128575
128591
|
) }) : isEditorDialogOpen ? /* @__PURE__ */ jsxs59(Box59, { flexDirection: "column", children: [
|
|
128576
|
-
editorError && /* @__PURE__ */
|
|
128577
|
-
/* @__PURE__ */
|
|
128592
|
+
editorError && /* @__PURE__ */ jsx68(Box59, { marginBottom: 1, children: /* @__PURE__ */ jsx68(Text63, { color: Colors.AccentRed, children: editorError }) }),
|
|
128593
|
+
/* @__PURE__ */ jsx68(
|
|
128578
128594
|
EditorSettingsDialog,
|
|
128579
128595
|
{
|
|
128580
128596
|
onSelect: handleEditorSelect,
|
|
@@ -128582,7 +128598,7 @@ ${queuedText}` : queuedText;
|
|
|
128582
128598
|
onExit: exitEditorDialog
|
|
128583
128599
|
}
|
|
128584
128600
|
)
|
|
128585
|
-
] }) : isSearchDialogOpen ? /* @__PURE__ */
|
|
128601
|
+
] }) : isSearchDialogOpen ? /* @__PURE__ */ jsx68(Box59, { flexDirection: "column", children: /* @__PURE__ */ jsx68(
|
|
128586
128602
|
SearchEngineConfigDialog,
|
|
128587
128603
|
{
|
|
128588
128604
|
onSubmit: (result) => {
|
|
@@ -128599,7 +128615,7 @@ ${queuedText}` : queuedText;
|
|
|
128599
128615
|
setIsSearchDialogOpen(false);
|
|
128600
128616
|
}
|
|
128601
128617
|
}
|
|
128602
|
-
) }) : isAddCustomEndpointDialogOpen ? /* @__PURE__ */
|
|
128618
|
+
) }) : isAddCustomEndpointDialogOpen ? /* @__PURE__ */ jsx68(Box59, { flexDirection: "column", children: /* @__PURE__ */ jsx68(
|
|
128603
128619
|
AddCustomEndpointDialog,
|
|
128604
128620
|
{
|
|
128605
128621
|
onSubmit: async (name2, url2, apiKey, providerType) => {
|
|
@@ -128628,14 +128644,14 @@ ${queuedText}` : queuedText;
|
|
|
128628
128644
|
setIsAddCustomEndpointDialogOpen(false);
|
|
128629
128645
|
}
|
|
128630
128646
|
}
|
|
128631
|
-
) }) : showPrivacyNotice ? /* @__PURE__ */
|
|
128647
|
+
) }) : showPrivacyNotice ? /* @__PURE__ */ jsx68(
|
|
128632
128648
|
PrivacyNotice,
|
|
128633
128649
|
{
|
|
128634
128650
|
onExit: () => setShowPrivacyNotice(false),
|
|
128635
128651
|
config
|
|
128636
128652
|
}
|
|
128637
128653
|
) : /* @__PURE__ */ jsxs59(Fragment8, { children: [
|
|
128638
|
-
/* @__PURE__ */
|
|
128654
|
+
/* @__PURE__ */ jsx68(
|
|
128639
128655
|
LoadingIndicator,
|
|
128640
128656
|
{
|
|
128641
128657
|
thought: streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ || config.getAccessibility()?.disableLoadingPhrases ? void 0 : thought,
|
|
@@ -128648,10 +128664,10 @@ ${queuedText}` : queuedText;
|
|
|
128648
128664
|
const preview = message.replace(/\s+/g, " ");
|
|
128649
128665
|
return (
|
|
128650
128666
|
// Ensure the Box takes full width so truncation calculates correctly
|
|
128651
|
-
/* @__PURE__ */
|
|
128667
|
+
/* @__PURE__ */ jsx68(Box59, { paddingLeft: 2, width: "100%", children: /* @__PURE__ */ jsx68(Text63, { dimColor: true, wrap: "truncate", children: preview }) }, index)
|
|
128652
128668
|
);
|
|
128653
128669
|
}),
|
|
128654
|
-
messageQueue.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */
|
|
128670
|
+
messageQueue.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ jsx68(Box59, { paddingLeft: 2, children: /* @__PURE__ */ jsxs59(Text63, { dimColor: true, children: [
|
|
128655
128671
|
"... (+",
|
|
128656
128672
|
messageQueue.length - MAX_DISPLAYED_QUEUED_MESSAGES,
|
|
128657
128673
|
" ",
|
|
@@ -128668,8 +128684,8 @@ ${queuedText}` : queuedText;
|
|
|
128668
128684
|
alignItems: isNarrow ? "flex-start" : "center",
|
|
128669
128685
|
children: [
|
|
128670
128686
|
/* @__PURE__ */ jsxs59(Box59, { children: [
|
|
128671
|
-
process18.env["GEMINI_SYSTEM_MD"] && /* @__PURE__ */
|
|
128672
|
-
ctrlCPressedOnce ? /* @__PURE__ */
|
|
128687
|
+
process18.env["GEMINI_SYSTEM_MD"] && /* @__PURE__ */ jsx68(Text63, { color: Colors.AccentRed, children: "|\u2310\u25A0_\u25A0| " }),
|
|
128688
|
+
ctrlCPressedOnce ? /* @__PURE__ */ jsx68(Text63, { color: Colors.AccentYellow, children: "Press Ctrl+C again to exit." }) : ctrlDPressedOnce ? /* @__PURE__ */ jsx68(Text63, { color: Colors.AccentYellow, children: "Press Ctrl+D again to exit." }) : showEscapePrompt ? /* @__PURE__ */ jsx68(Text63, { color: Colors.Gray, children: "Press Esc again to clear." }) : /* @__PURE__ */ jsx68(
|
|
128673
128689
|
ContextSummaryDisplay,
|
|
128674
128690
|
{
|
|
128675
128691
|
ideContext: ideContextState,
|
|
@@ -128682,19 +128698,19 @@ ${queuedText}` : queuedText;
|
|
|
128682
128698
|
)
|
|
128683
128699
|
] }),
|
|
128684
128700
|
/* @__PURE__ */ jsxs59(Box59, { paddingTop: isNarrow ? 1 : 0, children: [
|
|
128685
|
-
showAutoAcceptIndicator !== ApprovalMode.DEFAULT && !shellModeActive && /* @__PURE__ */
|
|
128701
|
+
showAutoAcceptIndicator !== ApprovalMode.DEFAULT && !shellModeActive && /* @__PURE__ */ jsx68(
|
|
128686
128702
|
AutoAcceptIndicator,
|
|
128687
128703
|
{
|
|
128688
128704
|
approvalMode: showAutoAcceptIndicator
|
|
128689
128705
|
}
|
|
128690
128706
|
),
|
|
128691
|
-
shellModeActive && /* @__PURE__ */
|
|
128707
|
+
shellModeActive && /* @__PURE__ */ jsx68(ShellModeIndicator, {})
|
|
128692
128708
|
] })
|
|
128693
128709
|
]
|
|
128694
128710
|
}
|
|
128695
128711
|
),
|
|
128696
|
-
showErrorDetails && /* @__PURE__ */
|
|
128697
|
-
/* @__PURE__ */
|
|
128712
|
+
showErrorDetails && /* @__PURE__ */ jsx68(OverflowProvider, { children: /* @__PURE__ */ jsxs59(Box59, { flexDirection: "column", children: [
|
|
128713
|
+
/* @__PURE__ */ jsx68(
|
|
128698
128714
|
DetailedMessagesDisplay,
|
|
128699
128715
|
{
|
|
128700
128716
|
messages: filteredConsoleMessages,
|
|
@@ -128702,9 +128718,9 @@ ${queuedText}` : queuedText;
|
|
|
128702
128718
|
width: inputWidth
|
|
128703
128719
|
}
|
|
128704
128720
|
),
|
|
128705
|
-
/* @__PURE__ */
|
|
128721
|
+
/* @__PURE__ */ jsx68(ShowMoreLines, { constrainHeight })
|
|
128706
128722
|
] }) }),
|
|
128707
|
-
isInputActive && /* @__PURE__ */
|
|
128723
|
+
isInputActive && /* @__PURE__ */ jsx68(
|
|
128708
128724
|
InputPrompt,
|
|
128709
128725
|
{
|
|
128710
128726
|
buffer,
|
|
@@ -128725,7 +128741,7 @@ ${queuedText}` : queuedText;
|
|
|
128725
128741
|
}
|
|
128726
128742
|
)
|
|
128727
128743
|
] }),
|
|
128728
|
-
initError && streamingState !== "responding" /* Responding */ && /* @__PURE__ */
|
|
128744
|
+
initError && streamingState !== "responding" /* Responding */ && /* @__PURE__ */ jsx68(
|
|
128729
128745
|
Box59,
|
|
128730
128746
|
{
|
|
128731
128747
|
borderStyle: "round",
|
|
@@ -128734,7 +128750,7 @@ ${queuedText}` : queuedText;
|
|
|
128734
128750
|
marginBottom: 1,
|
|
128735
128751
|
children: history.find(
|
|
128736
128752
|
(item) => item.type === "error" && item.text?.includes(initError)
|
|
128737
|
-
)?.text ? /* @__PURE__ */
|
|
128753
|
+
)?.text ? /* @__PURE__ */ jsx68(Text63, { color: Colors.AccentRed, children: history.find(
|
|
128738
128754
|
(item) => item.type === "error" && item.text?.includes(initError)
|
|
128739
128755
|
)?.text }) : /* @__PURE__ */ jsxs59(Fragment8, { children: [
|
|
128740
128756
|
/* @__PURE__ */ jsxs59(Text63, { color: Colors.AccentRed, children: [
|
|
@@ -128748,7 +128764,7 @@ ${queuedText}` : queuedText;
|
|
|
128748
128764
|
] })
|
|
128749
128765
|
}
|
|
128750
128766
|
),
|
|
128751
|
-
!settings.merged.hideFooter && /* @__PURE__ */
|
|
128767
|
+
!settings.merged.hideFooter && /* @__PURE__ */ jsx68(
|
|
128752
128768
|
Footer,
|
|
128753
128769
|
{
|
|
128754
128770
|
model: currentModel,
|
|
@@ -131109,7 +131125,7 @@ function toPermissionOptions(confirmation) {
|
|
|
131109
131125
|
}
|
|
131110
131126
|
|
|
131111
131127
|
// packages/cli/src/gemini.tsx
|
|
131112
|
-
import { jsx as
|
|
131128
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
131113
131129
|
var DEBUG_CLI = process.env["FSS_DEBUG"] === "true" || process.env["NODE_ENV"] === "development";
|
|
131114
131130
|
function validateDnsResolutionOrder(order) {
|
|
131115
131131
|
const defaultValue = "ipv4first";
|
|
@@ -131317,7 +131333,7 @@ async function main() {
|
|
|
131317
131333
|
await detectAndEnableKittyProtocol();
|
|
131318
131334
|
setWindowTitle(basename15(workspaceRoot), settings);
|
|
131319
131335
|
const instance = render2(
|
|
131320
|
-
/* @__PURE__ */
|
|
131336
|
+
/* @__PURE__ */ jsx69(React31.StrictMode, { children: /* @__PURE__ */ jsx69(SettingsContext.Provider, { value: settings, children: /* @__PURE__ */ jsx69(
|
|
131321
131337
|
AppWrapper,
|
|
131322
131338
|
{
|
|
131323
131339
|
config,
|