fluxflow-cli 3.9.1 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fluxflow.js +1147 -289
- package/model_config.json +1 -1
- package/package.json +2 -2
package/dist/fluxflow.js
CHANGED
|
@@ -452,6 +452,7 @@ var init_settings = __esm({
|
|
|
452
452
|
},
|
|
453
453
|
systemSettings: {
|
|
454
454
|
memory: true,
|
|
455
|
+
theme: "Dark",
|
|
455
456
|
compression: 0,
|
|
456
457
|
autoExec: false,
|
|
457
458
|
allowExternalAccess: false,
|
|
@@ -461,7 +462,8 @@ var init_settings = __esm({
|
|
|
461
462
|
externalDataPath: "",
|
|
462
463
|
preserveThinking: true,
|
|
463
464
|
loadingPhrases: true,
|
|
464
|
-
progressiveRendering:
|
|
465
|
+
progressiveRendering: true,
|
|
466
|
+
showTPMEstimate: false
|
|
465
467
|
},
|
|
466
468
|
profileData: {
|
|
467
469
|
name: null,
|
|
@@ -3252,7 +3254,8 @@ var init_MultilineInput = __esm({
|
|
|
3252
3254
|
cursorIndex = 0,
|
|
3253
3255
|
highlight,
|
|
3254
3256
|
columns = 80,
|
|
3255
|
-
pasteBlocks = []
|
|
3257
|
+
pasteBlocks = [],
|
|
3258
|
+
cursorColor
|
|
3256
3259
|
}) => {
|
|
3257
3260
|
const scrollOffsetRef = useRef(0);
|
|
3258
3261
|
const wrapWidth = useMemo(() => Math.max(20, columns - 10), [columns]);
|
|
@@ -3326,10 +3329,10 @@ var init_MultilineInput = __esm({
|
|
|
3326
3329
|
}, [focus, showCursor, value, cursorIndex]);
|
|
3327
3330
|
const cursorStyle = useMemo(() => ({
|
|
3328
3331
|
...textStyle,
|
|
3329
|
-
color: showCursor && focus && blink ? "white" : void 0,
|
|
3332
|
+
color: showCursor && focus && blink ? cursorColor || "white" : void 0,
|
|
3330
3333
|
bold: showCursor && focus && blink,
|
|
3331
3334
|
inverse: showCursor && focus && blink
|
|
3332
|
-
}), [textStyle, showCursor, focus, blink]);
|
|
3335
|
+
}), [textStyle, showCursor, focus, blink, cursorColor]);
|
|
3333
3336
|
const renderLineText = (text, isCursor, col, cStyle) => {
|
|
3334
3337
|
if (!text) {
|
|
3335
3338
|
const emptyText = placeholder && value.length === 0 ? formatText(placeholder, true) : "";
|
|
@@ -3389,6 +3392,7 @@ var init_MultilineInput = __esm({
|
|
|
3389
3392
|
columns = 80,
|
|
3390
3393
|
useCustomInput = (inputHandler, isActive) => useInput(inputHandler, { isActive }),
|
|
3391
3394
|
onPasteStateChange,
|
|
3395
|
+
cursorColor,
|
|
3392
3396
|
...controlledProps
|
|
3393
3397
|
}) => {
|
|
3394
3398
|
const [cursorIndex, setCursorIndex] = useState2(value.length);
|
|
@@ -3714,13 +3718,634 @@ var init_MultilineInput = __esm({
|
|
|
3714
3718
|
showCursor,
|
|
3715
3719
|
focus,
|
|
3716
3720
|
columns,
|
|
3717
|
-
pasteBlocks
|
|
3721
|
+
pasteBlocks,
|
|
3722
|
+
cursorColor
|
|
3718
3723
|
}
|
|
3719
3724
|
);
|
|
3720
3725
|
};
|
|
3721
3726
|
}
|
|
3722
3727
|
});
|
|
3723
3728
|
|
|
3729
|
+
// src/utils/theme.js
|
|
3730
|
+
var CHAOS_PRESETS, THEMES, getThemeColors;
|
|
3731
|
+
var init_theme = __esm({
|
|
3732
|
+
"src/utils/theme.js"() {
|
|
3733
|
+
CHAOS_PRESETS = [
|
|
3734
|
+
{
|
|
3735
|
+
name: "Cyan Cyberpunk",
|
|
3736
|
+
text: "cyan",
|
|
3737
|
+
textMuted: "#4da6b8",
|
|
3738
|
+
textDim: "#2d6d7a",
|
|
3739
|
+
textInverted: "black",
|
|
3740
|
+
border: "cyan",
|
|
3741
|
+
borderMuted: "#1a5966",
|
|
3742
|
+
borderDim: "#0f3840",
|
|
3743
|
+
bg: void 0,
|
|
3744
|
+
cardBg: "#061e24",
|
|
3745
|
+
highlightBg: "#092b33",
|
|
3746
|
+
activeBg: "#0e3e4a",
|
|
3747
|
+
inputBg: "#092b33",
|
|
3748
|
+
inputBorder: "#092b33",
|
|
3749
|
+
inputText: "cyan",
|
|
3750
|
+
inputPlaceholder: "#2d6d7a",
|
|
3751
|
+
inputPrompt: "cyan",
|
|
3752
|
+
codeBg: "#020d10",
|
|
3753
|
+
codeBorder: "#1a5966",
|
|
3754
|
+
userMsgBg: "#092b33",
|
|
3755
|
+
userMsgBorder: "#092b33",
|
|
3756
|
+
userMsgText: "cyan",
|
|
3757
|
+
diffRemovalBg: "#3a0c1a",
|
|
3758
|
+
diffAdditionBg: "#0c3a32",
|
|
3759
|
+
diffRemovalText: "#ff4d88",
|
|
3760
|
+
diffAdditionText: "#00ffaa",
|
|
3761
|
+
diffRemovalHighlightColor: "#ff1a66",
|
|
3762
|
+
diffRemovalHighlightBg: "#590022",
|
|
3763
|
+
diffAdditionHighlightColor: "#00ffcc",
|
|
3764
|
+
diffAdditionHighlightBg: "#00593b",
|
|
3765
|
+
diffRemovalNum: "#ff4d88",
|
|
3766
|
+
diffAdditionNum: "#00ffaa",
|
|
3767
|
+
diffRemovalPrefix: "#ff1a66",
|
|
3768
|
+
diffAdditionPrefix: "#00ffcc",
|
|
3769
|
+
primary: "cyan",
|
|
3770
|
+
secondary: "blue",
|
|
3771
|
+
accent: "magenta",
|
|
3772
|
+
success: "green",
|
|
3773
|
+
warning: "yellow",
|
|
3774
|
+
danger: "red",
|
|
3775
|
+
info: "blue",
|
|
3776
|
+
statusOn: "cyan",
|
|
3777
|
+
statusOff: "#2d6d7a",
|
|
3778
|
+
logoTextAnsi: "\x1B[1;36m",
|
|
3779
|
+
logoBodyAnsi: "\x1B[36m",
|
|
3780
|
+
logoMutedAnsi: "\x1B[90m",
|
|
3781
|
+
logoGradient: ["#00ffff", "#0088ff"]
|
|
3782
|
+
},
|
|
3783
|
+
{
|
|
3784
|
+
name: "Magenta Vaporwave",
|
|
3785
|
+
text: "magenta",
|
|
3786
|
+
textMuted: "#c451d6",
|
|
3787
|
+
textDim: "#7d2b8a",
|
|
3788
|
+
textInverted: "black",
|
|
3789
|
+
border: "magenta",
|
|
3790
|
+
borderMuted: "#5e1b69",
|
|
3791
|
+
borderDim: "#3b0f42",
|
|
3792
|
+
bg: void 0,
|
|
3793
|
+
cardBg: "#240729",
|
|
3794
|
+
highlightBg: "#310938",
|
|
3795
|
+
activeBg: "#470e52",
|
|
3796
|
+
inputBg: "#310938",
|
|
3797
|
+
inputBorder: "#310938",
|
|
3798
|
+
inputText: "magenta",
|
|
3799
|
+
inputPlaceholder: "#7d2b8a",
|
|
3800
|
+
inputPrompt: "magenta",
|
|
3801
|
+
codeBg: "#100312",
|
|
3802
|
+
codeBorder: "#5e1b69",
|
|
3803
|
+
userMsgBg: "#310938",
|
|
3804
|
+
userMsgBorder: "#310938",
|
|
3805
|
+
userMsgText: "magenta",
|
|
3806
|
+
diffRemovalBg: "#3a0c20",
|
|
3807
|
+
diffAdditionBg: "#200c3a",
|
|
3808
|
+
diffRemovalText: "#ff4d94",
|
|
3809
|
+
diffAdditionText: "#aa4dff",
|
|
3810
|
+
diffRemovalHighlightColor: "#ff1a75",
|
|
3811
|
+
diffRemovalHighlightBg: "#59002b",
|
|
3812
|
+
diffAdditionHighlightColor: "#bb66ff",
|
|
3813
|
+
diffAdditionHighlightBg: "#3b0059",
|
|
3814
|
+
diffRemovalNum: "#ff4d94",
|
|
3815
|
+
diffAdditionNum: "#aa4dff",
|
|
3816
|
+
diffRemovalPrefix: "#ff1a75",
|
|
3817
|
+
diffAdditionPrefix: "#bb66ff",
|
|
3818
|
+
primary: "magenta",
|
|
3819
|
+
secondary: "cyan",
|
|
3820
|
+
accent: "purple",
|
|
3821
|
+
success: "green",
|
|
3822
|
+
warning: "yellow",
|
|
3823
|
+
danger: "red",
|
|
3824
|
+
info: "blue",
|
|
3825
|
+
statusOn: "magenta",
|
|
3826
|
+
statusOff: "#7d2b8a",
|
|
3827
|
+
logoTextAnsi: "\x1B[1;35m",
|
|
3828
|
+
logoBodyAnsi: "\x1B[35m",
|
|
3829
|
+
logoMutedAnsi: "\x1B[90m",
|
|
3830
|
+
logoGradient: ["#ff00ff", "#8800ff"]
|
|
3831
|
+
},
|
|
3832
|
+
{
|
|
3833
|
+
name: "Glitch Matrix",
|
|
3834
|
+
text: "#00ff41",
|
|
3835
|
+
textMuted: "#00b32d",
|
|
3836
|
+
textDim: "#00661a",
|
|
3837
|
+
textInverted: "black",
|
|
3838
|
+
border: "#00ff41",
|
|
3839
|
+
borderMuted: "#008020",
|
|
3840
|
+
borderDim: "#004d13",
|
|
3841
|
+
bg: void 0,
|
|
3842
|
+
cardBg: "#0d1f0d",
|
|
3843
|
+
highlightBg: "#122912",
|
|
3844
|
+
activeBg: "#1c3e1c",
|
|
3845
|
+
inputBg: "#122912",
|
|
3846
|
+
inputBorder: "#122912",
|
|
3847
|
+
inputText: "#00ff41",
|
|
3848
|
+
inputPlaceholder: "#00b32d",
|
|
3849
|
+
inputPrompt: "#ffff00",
|
|
3850
|
+
codeBg: "#040a04",
|
|
3851
|
+
codeBorder: "#008020",
|
|
3852
|
+
userMsgBg: "#122912",
|
|
3853
|
+
userMsgBorder: "#122912",
|
|
3854
|
+
userMsgText: "#00ff41",
|
|
3855
|
+
diffRemovalBg: "#3a001a",
|
|
3856
|
+
diffAdditionBg: "#003a10",
|
|
3857
|
+
diffRemovalText: "#ff0055",
|
|
3858
|
+
diffAdditionText: "#00ff66",
|
|
3859
|
+
diffRemovalHighlightColor: "#ff0033",
|
|
3860
|
+
diffRemovalHighlightBg: "#59001b",
|
|
3861
|
+
diffAdditionHighlightColor: "#33ff88",
|
|
3862
|
+
diffAdditionHighlightBg: "#005918",
|
|
3863
|
+
diffRemovalNum: "#ff0055",
|
|
3864
|
+
diffAdditionNum: "#00ff66",
|
|
3865
|
+
diffRemovalPrefix: "#ff0033",
|
|
3866
|
+
diffAdditionPrefix: "#33ff88",
|
|
3867
|
+
primary: "#00ff41",
|
|
3868
|
+
secondary: "yellow",
|
|
3869
|
+
accent: "cyan",
|
|
3870
|
+
success: "#00ff41",
|
|
3871
|
+
warning: "yellow",
|
|
3872
|
+
danger: "red",
|
|
3873
|
+
info: "cyan",
|
|
3874
|
+
statusOn: "#00ff41",
|
|
3875
|
+
statusOff: "#00661a",
|
|
3876
|
+
logoTextAnsi: "\x1B[1;32m",
|
|
3877
|
+
logoBodyAnsi: "\x1B[32m",
|
|
3878
|
+
logoMutedAnsi: "\x1B[90m",
|
|
3879
|
+
logoGradient: ["#00ff41", "#ffff00"]
|
|
3880
|
+
},
|
|
3881
|
+
{
|
|
3882
|
+
name: "Warm Sunset",
|
|
3883
|
+
text: "#ffaa55",
|
|
3884
|
+
textMuted: "#cc8844",
|
|
3885
|
+
textDim: "#885522",
|
|
3886
|
+
textInverted: "black",
|
|
3887
|
+
border: "#ff9933",
|
|
3888
|
+
borderMuted: "#aa6622",
|
|
3889
|
+
borderDim: "#663311",
|
|
3890
|
+
bg: void 0,
|
|
3891
|
+
cardBg: "#24180f",
|
|
3892
|
+
highlightBg: "#2e1e12",
|
|
3893
|
+
activeBg: "#422c1b",
|
|
3894
|
+
inputBg: "#2e1e12",
|
|
3895
|
+
inputBorder: "#2e1e12",
|
|
3896
|
+
inputText: "#ffaa55",
|
|
3897
|
+
inputPlaceholder: "#885522",
|
|
3898
|
+
inputPrompt: "#ff7733",
|
|
3899
|
+
codeBg: "#120c08",
|
|
3900
|
+
codeBorder: "#aa6622",
|
|
3901
|
+
userMsgBg: "#2e1e12",
|
|
3902
|
+
userMsgBorder: "#2e1e12",
|
|
3903
|
+
userMsgText: "#ffaa55",
|
|
3904
|
+
diffRemovalBg: "#3d120c",
|
|
3905
|
+
diffAdditionBg: "#3a2e0c",
|
|
3906
|
+
diffRemovalText: "#ff5544",
|
|
3907
|
+
diffAdditionText: "#ffcc33",
|
|
3908
|
+
diffRemovalHighlightColor: "#ff3322",
|
|
3909
|
+
diffRemovalHighlightBg: "#591108",
|
|
3910
|
+
diffAdditionHighlightColor: "#ffee44",
|
|
3911
|
+
diffAdditionHighlightBg: "#594400",
|
|
3912
|
+
diffRemovalNum: "#ff5544",
|
|
3913
|
+
diffAdditionNum: "#ffcc33",
|
|
3914
|
+
diffRemovalPrefix: "#ff3322",
|
|
3915
|
+
diffAdditionPrefix: "#ffee44",
|
|
3916
|
+
primary: "#ffaa55",
|
|
3917
|
+
secondary: "#ff7733",
|
|
3918
|
+
accent: "magenta",
|
|
3919
|
+
success: "#ffcc33",
|
|
3920
|
+
warning: "#ff7733",
|
|
3921
|
+
danger: "#ff3322",
|
|
3922
|
+
info: "#ffaa55",
|
|
3923
|
+
statusOn: "#ffaa55",
|
|
3924
|
+
statusOff: "#885522",
|
|
3925
|
+
logoTextAnsi: "\x1B[1;33m",
|
|
3926
|
+
logoBodyAnsi: "\x1B[33m",
|
|
3927
|
+
logoMutedAnsi: "\x1B[90m",
|
|
3928
|
+
logoGradient: ["#ff9933", "#ff0055"]
|
|
3929
|
+
},
|
|
3930
|
+
{
|
|
3931
|
+
name: "Sakura Blossom",
|
|
3932
|
+
text: "#ffc0e0",
|
|
3933
|
+
textMuted: "#d98cb3",
|
|
3934
|
+
textDim: "#804d66",
|
|
3935
|
+
textInverted: "black",
|
|
3936
|
+
border: "#ff99cc",
|
|
3937
|
+
borderMuted: "#aa4d7a",
|
|
3938
|
+
borderDim: "#662647",
|
|
3939
|
+
bg: void 0,
|
|
3940
|
+
cardBg: "#291320",
|
|
3941
|
+
highlightBg: "#331826",
|
|
3942
|
+
activeBg: "#472235",
|
|
3943
|
+
inputBg: "#331826",
|
|
3944
|
+
inputBorder: "#331826",
|
|
3945
|
+
inputText: "#ffc0e0",
|
|
3946
|
+
inputPlaceholder: "#804d66",
|
|
3947
|
+
inputPrompt: "#ff99cc",
|
|
3948
|
+
codeBg: "#140a10",
|
|
3949
|
+
codeBorder: "#aa4d7a",
|
|
3950
|
+
userMsgBg: "#331826",
|
|
3951
|
+
userMsgBorder: "#331826",
|
|
3952
|
+
userMsgText: "#ffc0e0",
|
|
3953
|
+
diffRemovalBg: "#3e0c1b",
|
|
3954
|
+
diffAdditionBg: "#1b3e2b",
|
|
3955
|
+
diffRemovalText: "#ff6699",
|
|
3956
|
+
diffAdditionText: "#66ffb3",
|
|
3957
|
+
diffRemovalHighlightColor: "#ff3377",
|
|
3958
|
+
diffRemovalHighlightBg: "#590022",
|
|
3959
|
+
diffAdditionHighlightColor: "#33ff99",
|
|
3960
|
+
diffAdditionHighlightBg: "#00592e",
|
|
3961
|
+
diffRemovalNum: "#ff6699",
|
|
3962
|
+
diffAdditionNum: "#66ffb3",
|
|
3963
|
+
diffRemovalPrefix: "#ff3377",
|
|
3964
|
+
diffAdditionPrefix: "#33ff99",
|
|
3965
|
+
primary: "#ffc0e0",
|
|
3966
|
+
secondary: "#ff99cc",
|
|
3967
|
+
accent: "magenta",
|
|
3968
|
+
success: "#66ffb3",
|
|
3969
|
+
warning: "yellow",
|
|
3970
|
+
danger: "#ff3377",
|
|
3971
|
+
info: "#ff99cc",
|
|
3972
|
+
statusOn: "#ffc0e0",
|
|
3973
|
+
statusOff: "#804d66",
|
|
3974
|
+
logoTextAnsi: "\x1B[1;35m",
|
|
3975
|
+
logoBodyAnsi: "\x1B[35m",
|
|
3976
|
+
logoMutedAnsi: "\x1B[90m",
|
|
3977
|
+
logoGradient: ["#ffb3d9", "#ff3399"]
|
|
3978
|
+
}
|
|
3979
|
+
];
|
|
3980
|
+
THEMES = {
|
|
3981
|
+
Dark: {
|
|
3982
|
+
id: "Dark",
|
|
3983
|
+
name: "Dark (Default)",
|
|
3984
|
+
// Base Colors
|
|
3985
|
+
text: "white",
|
|
3986
|
+
textMuted: "gray",
|
|
3987
|
+
textDim: "grey",
|
|
3988
|
+
textInverted: "black",
|
|
3989
|
+
// Borders
|
|
3990
|
+
border: "white",
|
|
3991
|
+
borderMuted: "gray",
|
|
3992
|
+
borderDim: "grey",
|
|
3993
|
+
// Backgrounds
|
|
3994
|
+
bg: void 0,
|
|
3995
|
+
cardBg: "#1e1e1e",
|
|
3996
|
+
highlightBg: "#2a2a2a",
|
|
3997
|
+
activeBg: "#3a3a3a",
|
|
3998
|
+
// Input Box Colors
|
|
3999
|
+
inputBg: "#555555",
|
|
4000
|
+
inputBorder: "#555555",
|
|
4001
|
+
inputText: "white",
|
|
4002
|
+
inputPlaceholder: "#cccccc",
|
|
4003
|
+
inputPrompt: "white",
|
|
4004
|
+
// Code & Message Component Colors
|
|
4005
|
+
codeBg: "#1a1a1a",
|
|
4006
|
+
codeBorder: "#444444",
|
|
4007
|
+
userMsgBg: "#444444",
|
|
4008
|
+
userMsgBorder: "#444444",
|
|
4009
|
+
userMsgText: "white",
|
|
4010
|
+
// Diff Component Palette
|
|
4011
|
+
diffRemovalBg: "#3a0c0c",
|
|
4012
|
+
diffAdditionBg: "#0c3a1a",
|
|
4013
|
+
diffRemovalText: "#885555",
|
|
4014
|
+
diffAdditionText: "#558866",
|
|
4015
|
+
diffRemovalHighlightColor: "#ff3333",
|
|
4016
|
+
diffRemovalHighlightBg: "#5a1818",
|
|
4017
|
+
diffAdditionHighlightColor: "#33ff66",
|
|
4018
|
+
diffAdditionHighlightBg: "#185a25",
|
|
4019
|
+
diffRemovalNum: "#d96868",
|
|
4020
|
+
diffAdditionNum: "#68d98c",
|
|
4021
|
+
diffRemovalPrefix: "#ff4d4d",
|
|
4022
|
+
diffAdditionPrefix: "#4dff88",
|
|
4023
|
+
// Accents & Indicators
|
|
4024
|
+
primary: "white",
|
|
4025
|
+
secondary: "cyan",
|
|
4026
|
+
accent: "magenta",
|
|
4027
|
+
success: "green",
|
|
4028
|
+
warning: "yellow",
|
|
4029
|
+
danger: "red",
|
|
4030
|
+
info: "blue",
|
|
4031
|
+
// Status Indicators
|
|
4032
|
+
statusOn: "white",
|
|
4033
|
+
statusOff: "gray",
|
|
4034
|
+
// Logo / Terminal ANSI Colors
|
|
4035
|
+
logoTextAnsi: "\x1B[1;37m",
|
|
4036
|
+
logoBodyAnsi: "\x1B[37m",
|
|
4037
|
+
logoMutedAnsi: "\x1B[90m",
|
|
4038
|
+
logoGradient: ["#0077ff", "#ff00ff"]
|
|
4039
|
+
},
|
|
4040
|
+
Light: {
|
|
4041
|
+
id: "Light",
|
|
4042
|
+
name: "Light",
|
|
4043
|
+
// Base Colors
|
|
4044
|
+
text: "black",
|
|
4045
|
+
textMuted: "gray",
|
|
4046
|
+
textDim: "grey",
|
|
4047
|
+
textInverted: "white",
|
|
4048
|
+
// Borders
|
|
4049
|
+
border: "black",
|
|
4050
|
+
borderMuted: "gray",
|
|
4051
|
+
borderDim: "grey",
|
|
4052
|
+
// Backgrounds
|
|
4053
|
+
bg: void 0,
|
|
4054
|
+
cardBg: "#e5e5e5",
|
|
4055
|
+
highlightBg: "#d4d4d4",
|
|
4056
|
+
activeBg: "#c0c0c0",
|
|
4057
|
+
// Input Box Colors
|
|
4058
|
+
inputBg: "#d0d0d0",
|
|
4059
|
+
inputBorder: "#d0d0d0",
|
|
4060
|
+
inputText: "black",
|
|
4061
|
+
inputPlaceholder: "#555555",
|
|
4062
|
+
inputPrompt: "black",
|
|
4063
|
+
// Code & Message Component Colors
|
|
4064
|
+
codeBg: "#e8e8e8",
|
|
4065
|
+
codeBorder: "#b0b0b0",
|
|
4066
|
+
userMsgBg: "#d0d0d0",
|
|
4067
|
+
userMsgBorder: "#d0d0d0",
|
|
4068
|
+
userMsgText: "black",
|
|
4069
|
+
// Diff Component Palette
|
|
4070
|
+
diffRemovalBg: "#fce8e8",
|
|
4071
|
+
diffAdditionBg: "#e6f9e6",
|
|
4072
|
+
diffRemovalText: "#661111",
|
|
4073
|
+
diffAdditionText: "#115511",
|
|
4074
|
+
diffRemovalHighlightColor: "#440000",
|
|
4075
|
+
diffRemovalHighlightBg: "#f8b4b4",
|
|
4076
|
+
diffAdditionHighlightColor: "#003300",
|
|
4077
|
+
diffAdditionHighlightBg: "#a6ebad",
|
|
4078
|
+
diffRemovalNum: "#c02020",
|
|
4079
|
+
diffAdditionNum: "#188028",
|
|
4080
|
+
diffRemovalPrefix: "#d01010",
|
|
4081
|
+
diffAdditionPrefix: "#109020",
|
|
4082
|
+
// Accents & Indicators
|
|
4083
|
+
primary: "black",
|
|
4084
|
+
secondary: "blue",
|
|
4085
|
+
accent: "magenta",
|
|
4086
|
+
success: "green",
|
|
4087
|
+
warning: "yellow",
|
|
4088
|
+
danger: "red",
|
|
4089
|
+
info: "blue",
|
|
4090
|
+
// Status Indicators
|
|
4091
|
+
statusOn: "black",
|
|
4092
|
+
statusOff: "gray",
|
|
4093
|
+
// Logo / Terminal ANSI Colors
|
|
4094
|
+
logoTextAnsi: "\x1B[1;30m",
|
|
4095
|
+
logoBodyAnsi: "\x1B[30m",
|
|
4096
|
+
logoMutedAnsi: "\x1B[38;5;244m",
|
|
4097
|
+
logoGradient: ["#0077ff", "#ff00ff"]
|
|
4098
|
+
},
|
|
4099
|
+
"GitHub Dark": {
|
|
4100
|
+
id: "GitHub Dark",
|
|
4101
|
+
name: "GitHub Dark",
|
|
4102
|
+
// Base Colors
|
|
4103
|
+
text: "#c9d1d9",
|
|
4104
|
+
textMuted: "#8b949e",
|
|
4105
|
+
textDim: "#6e7681",
|
|
4106
|
+
textInverted: "#0d1117",
|
|
4107
|
+
// Borders
|
|
4108
|
+
border: "#30363d",
|
|
4109
|
+
borderMuted: "#30363d",
|
|
4110
|
+
borderDim: "#21262d",
|
|
4111
|
+
// Backgrounds
|
|
4112
|
+
bg: void 0,
|
|
4113
|
+
cardBg: "#161b22",
|
|
4114
|
+
highlightBg: "#21262d",
|
|
4115
|
+
activeBg: "#30363d",
|
|
4116
|
+
// Input Box Colors
|
|
4117
|
+
inputBg: "#21262d",
|
|
4118
|
+
inputBorder: "#21262d",
|
|
4119
|
+
inputText: "#c9d1d9",
|
|
4120
|
+
inputPlaceholder: "#8b949e",
|
|
4121
|
+
inputPrompt: "#58a6ff",
|
|
4122
|
+
// Code & Message Component Colors
|
|
4123
|
+
codeBg: "#0d1117",
|
|
4124
|
+
codeBorder: "#30363d",
|
|
4125
|
+
userMsgBg: "#21262d",
|
|
4126
|
+
userMsgBorder: "#21262d",
|
|
4127
|
+
userMsgText: "#c9d1d9",
|
|
4128
|
+
// Diff Component Palette
|
|
4129
|
+
diffRemovalBg: "#3c1e1e",
|
|
4130
|
+
diffAdditionBg: "#11381e",
|
|
4131
|
+
diffRemovalText: "#f85149",
|
|
4132
|
+
diffAdditionText: "#3fb950",
|
|
4133
|
+
diffRemovalHighlightColor: "#ff7b72",
|
|
4134
|
+
diffRemovalHighlightBg: "#701c1c",
|
|
4135
|
+
diffAdditionHighlightColor: "#56d364",
|
|
4136
|
+
diffAdditionHighlightBg: "#116329",
|
|
4137
|
+
diffRemovalNum: "#f85149",
|
|
4138
|
+
diffAdditionNum: "#3fb950",
|
|
4139
|
+
diffRemovalPrefix: "#f85149",
|
|
4140
|
+
diffAdditionPrefix: "#3fb950",
|
|
4141
|
+
// Accents & Indicators
|
|
4142
|
+
primary: "#c9d1d9",
|
|
4143
|
+
secondary: "#58a6ff",
|
|
4144
|
+
accent: "#bc8cff",
|
|
4145
|
+
success: "#3fb950",
|
|
4146
|
+
warning: "#d29922",
|
|
4147
|
+
danger: "#f85149",
|
|
4148
|
+
info: "#58a6ff",
|
|
4149
|
+
// Status Indicators
|
|
4150
|
+
statusOn: "#58a6ff",
|
|
4151
|
+
statusOff: "#8b949e",
|
|
4152
|
+
// Logo / Terminal ANSI Colors
|
|
4153
|
+
logoTextAnsi: "\x1B[1;36m",
|
|
4154
|
+
logoBodyAnsi: "\x1B[37m",
|
|
4155
|
+
logoMutedAnsi: "\x1B[90m",
|
|
4156
|
+
logoGradient: ["#2ea043", "#56d364"]
|
|
4157
|
+
},
|
|
4158
|
+
"GitHub Light": {
|
|
4159
|
+
id: "GitHub Light",
|
|
4160
|
+
name: "GitHub Light",
|
|
4161
|
+
// Base Colors
|
|
4162
|
+
text: "#24292f",
|
|
4163
|
+
textMuted: "#57606a",
|
|
4164
|
+
textDim: "#6e7781",
|
|
4165
|
+
textInverted: "#ffffff",
|
|
4166
|
+
// Borders
|
|
4167
|
+
border: "#d0d7de",
|
|
4168
|
+
borderMuted: "#d0d7de",
|
|
4169
|
+
borderDim: "#e1e4e8",
|
|
4170
|
+
// Backgrounds
|
|
4171
|
+
bg: void 0,
|
|
4172
|
+
cardBg: "#f6f8fa",
|
|
4173
|
+
highlightBg: "#eaeef2",
|
|
4174
|
+
activeBg: "#d0d7de",
|
|
4175
|
+
// Input Box Colors
|
|
4176
|
+
inputBg: "#eaeef2",
|
|
4177
|
+
inputBorder: "#eaeef2",
|
|
4178
|
+
inputText: "#24292f",
|
|
4179
|
+
inputPlaceholder: "#57606a",
|
|
4180
|
+
inputPrompt: "#0969da",
|
|
4181
|
+
// Code & Message Component Colors
|
|
4182
|
+
codeBg: "#ffffff",
|
|
4183
|
+
codeBorder: "#d0d7de",
|
|
4184
|
+
userMsgBg: "#eaeef2",
|
|
4185
|
+
userMsgBorder: "#eaeef2",
|
|
4186
|
+
userMsgText: "#24292f",
|
|
4187
|
+
// Diff Component Palette
|
|
4188
|
+
diffRemovalBg: "#ffebe9",
|
|
4189
|
+
diffAdditionBg: "#e6ffec",
|
|
4190
|
+
diffRemovalText: "#cf222e",
|
|
4191
|
+
diffAdditionText: "#1a7f37",
|
|
4192
|
+
diffRemovalHighlightColor: "#82071e",
|
|
4193
|
+
diffRemovalHighlightBg: "#ffc1c0",
|
|
4194
|
+
diffAdditionHighlightColor: "#116329",
|
|
4195
|
+
diffAdditionHighlightBg: "#acf2bd",
|
|
4196
|
+
diffRemovalNum: "#cf222e",
|
|
4197
|
+
diffAdditionNum: "#1a7f37",
|
|
4198
|
+
diffRemovalPrefix: "#cf222e",
|
|
4199
|
+
diffAdditionPrefix: "#1a7f37",
|
|
4200
|
+
// Accents & Indicators
|
|
4201
|
+
primary: "#24292f",
|
|
4202
|
+
secondary: "#0969da",
|
|
4203
|
+
accent: "#8250df",
|
|
4204
|
+
success: "#1a7f37",
|
|
4205
|
+
warning: "#9a6700",
|
|
4206
|
+
danger: "#cf222e",
|
|
4207
|
+
info: "#0969da",
|
|
4208
|
+
// Status Indicators
|
|
4209
|
+
statusOn: "#0969da",
|
|
4210
|
+
statusOff: "#57606a",
|
|
4211
|
+
// Logo / Terminal ANSI Colors
|
|
4212
|
+
logoTextAnsi: "\x1B[1;34m",
|
|
4213
|
+
logoBodyAnsi: "\x1B[30m",
|
|
4214
|
+
logoMutedAnsi: "\x1B[38;5;244m",
|
|
4215
|
+
logoGradient: ["#1a7f37", "#2da44e"]
|
|
4216
|
+
},
|
|
4217
|
+
"Transparent Dark": {
|
|
4218
|
+
id: "Transparent Dark",
|
|
4219
|
+
name: "Transparent Dark",
|
|
4220
|
+
// Base Colors
|
|
4221
|
+
text: "white",
|
|
4222
|
+
textMuted: "gray",
|
|
4223
|
+
textDim: "grey",
|
|
4224
|
+
textInverted: "black",
|
|
4225
|
+
// Borders
|
|
4226
|
+
border: "gray",
|
|
4227
|
+
borderMuted: "gray",
|
|
4228
|
+
borderDim: "grey",
|
|
4229
|
+
// Backgrounds (All transparent / undefined)
|
|
4230
|
+
bg: void 0,
|
|
4231
|
+
cardBg: void 0,
|
|
4232
|
+
highlightBg: "#2a2a2a",
|
|
4233
|
+
activeBg: "#3a3a3a",
|
|
4234
|
+
// Input Box Colors
|
|
4235
|
+
inputBg: "#555555",
|
|
4236
|
+
inputBorder: "#555555",
|
|
4237
|
+
inputText: "white",
|
|
4238
|
+
inputPlaceholder: "#cccccc",
|
|
4239
|
+
inputPrompt: "white",
|
|
4240
|
+
// Code & Message Component Colors
|
|
4241
|
+
codeBg: void 0,
|
|
4242
|
+
codeBorder: "gray",
|
|
4243
|
+
userMsgBg: "#555555",
|
|
4244
|
+
userMsgBorder: "#555555",
|
|
4245
|
+
userMsgText: "white",
|
|
4246
|
+
// Diff Component Palette (Transparent background, colored lines)
|
|
4247
|
+
diffRemovalBg: void 0,
|
|
4248
|
+
diffAdditionBg: void 0,
|
|
4249
|
+
diffRemovalText: "#ff6666",
|
|
4250
|
+
diffAdditionText: "#66ff66",
|
|
4251
|
+
diffRemovalHighlightColor: "#ff3333",
|
|
4252
|
+
diffRemovalHighlightBg: void 0,
|
|
4253
|
+
diffAdditionHighlightColor: "#33ff66",
|
|
4254
|
+
diffAdditionHighlightBg: void 0,
|
|
4255
|
+
diffRemovalNum: "#ff6666",
|
|
4256
|
+
diffAdditionNum: "#66ff66",
|
|
4257
|
+
diffRemovalPrefix: "#ff4d4d",
|
|
4258
|
+
diffAdditionPrefix: "#4dff88",
|
|
4259
|
+
// Accents & Indicators
|
|
4260
|
+
primary: "white",
|
|
4261
|
+
secondary: "cyan",
|
|
4262
|
+
accent: "magenta",
|
|
4263
|
+
success: "green",
|
|
4264
|
+
warning: "yellow",
|
|
4265
|
+
danger: "red",
|
|
4266
|
+
info: "blue",
|
|
4267
|
+
// Status Indicators
|
|
4268
|
+
statusOn: "white",
|
|
4269
|
+
statusOff: "gray",
|
|
4270
|
+
// Logo / Terminal ANSI Colors
|
|
4271
|
+
logoTextAnsi: "\x1B[1;37m",
|
|
4272
|
+
logoBodyAnsi: "\x1B[37m",
|
|
4273
|
+
logoMutedAnsi: "\x1B[90m",
|
|
4274
|
+
logoGradient: ["#0077ff", "#ff00ff"]
|
|
4275
|
+
},
|
|
4276
|
+
"Transparent Light": {
|
|
4277
|
+
id: "Transparent Light",
|
|
4278
|
+
name: "Transparent Light",
|
|
4279
|
+
// Base Colors
|
|
4280
|
+
text: "black",
|
|
4281
|
+
textMuted: "gray",
|
|
4282
|
+
textDim: "grey",
|
|
4283
|
+
textInverted: "white",
|
|
4284
|
+
// Borders
|
|
4285
|
+
border: "gray",
|
|
4286
|
+
borderMuted: "gray",
|
|
4287
|
+
borderDim: "grey",
|
|
4288
|
+
// Backgrounds (All transparent / undefined)
|
|
4289
|
+
bg: void 0,
|
|
4290
|
+
cardBg: void 0,
|
|
4291
|
+
highlightBg: "#d4d4d4",
|
|
4292
|
+
activeBg: "#c0c0c0",
|
|
4293
|
+
// Input Box Colors
|
|
4294
|
+
inputBg: "#d0d0d0",
|
|
4295
|
+
inputBorder: "#d0d0d0",
|
|
4296
|
+
inputText: "black",
|
|
4297
|
+
inputPlaceholder: "#555555",
|
|
4298
|
+
inputPrompt: "black",
|
|
4299
|
+
// Code & Message Component Colors
|
|
4300
|
+
codeBg: void 0,
|
|
4301
|
+
codeBorder: "gray",
|
|
4302
|
+
userMsgBg: "#d0d0d0",
|
|
4303
|
+
userMsgBorder: "#d0d0d0",
|
|
4304
|
+
userMsgText: "black",
|
|
4305
|
+
// Diff Component Palette (Transparent background, colored lines)
|
|
4306
|
+
diffRemovalBg: void 0,
|
|
4307
|
+
diffAdditionBg: void 0,
|
|
4308
|
+
diffRemovalText: "#c02020",
|
|
4309
|
+
diffAdditionText: "#188028",
|
|
4310
|
+
diffRemovalHighlightColor: "#800000",
|
|
4311
|
+
diffRemovalHighlightBg: void 0,
|
|
4312
|
+
diffAdditionHighlightColor: "#004000",
|
|
4313
|
+
diffAdditionHighlightBg: void 0,
|
|
4314
|
+
diffRemovalNum: "#c02020",
|
|
4315
|
+
diffAdditionNum: "#188028",
|
|
4316
|
+
diffRemovalPrefix: "#d01010",
|
|
4317
|
+
diffAdditionPrefix: "#109020",
|
|
4318
|
+
// Accents & Indicators
|
|
4319
|
+
primary: "black",
|
|
4320
|
+
secondary: "blue",
|
|
4321
|
+
accent: "magenta",
|
|
4322
|
+
success: "green",
|
|
4323
|
+
warning: "yellow",
|
|
4324
|
+
danger: "red",
|
|
4325
|
+
info: "blue",
|
|
4326
|
+
// Status Indicators
|
|
4327
|
+
statusOn: "black",
|
|
4328
|
+
statusOff: "gray",
|
|
4329
|
+
// Logo / Terminal ANSI Colors
|
|
4330
|
+
logoTextAnsi: "\x1B[1;30m",
|
|
4331
|
+
logoBodyAnsi: "\x1B[30m",
|
|
4332
|
+
logoMutedAnsi: "\x1B[38;5;244m",
|
|
4333
|
+
logoGradient: ["#0077ff", "#ff00ff"]
|
|
4334
|
+
}
|
|
4335
|
+
};
|
|
4336
|
+
getThemeColors = (themeName = "Dark") => {
|
|
4337
|
+
if (themeName === "Chaos" || themeName === "Mystery") {
|
|
4338
|
+
const randomPreset = CHAOS_PRESETS[Math.floor(Math.random() * CHAOS_PRESETS.length)];
|
|
4339
|
+
return { ...randomPreset, id: "Chaos" };
|
|
4340
|
+
}
|
|
4341
|
+
if (THEMES[themeName]) return THEMES[themeName];
|
|
4342
|
+
if (themeName === "GitHub") return THEMES["GitHub Dark"];
|
|
4343
|
+
if (themeName === "Transparent") return THEMES["Transparent Dark"];
|
|
4344
|
+
return THEMES.Dark;
|
|
4345
|
+
};
|
|
4346
|
+
}
|
|
4347
|
+
});
|
|
4348
|
+
|
|
3724
4349
|
// src/components/TerminalBox.jsx
|
|
3725
4350
|
import React3, { useState as useState3 } from "react";
|
|
3726
4351
|
import { Box as Box2, Text as Text3, useInput as useInput2 } from "ink";
|
|
@@ -3728,7 +4353,9 @@ var TerminalBox;
|
|
|
3728
4353
|
var init_TerminalBox = __esm({
|
|
3729
4354
|
"src/components/TerminalBox.jsx"() {
|
|
3730
4355
|
init_text();
|
|
3731
|
-
|
|
4356
|
+
init_theme();
|
|
4357
|
+
TerminalBox = React3.memo(({ command, output, completed = false, isFocused = false, columns = 80, isPty = false, terminalHeight = 24, theme = "Dark" }) => {
|
|
4358
|
+
const colors = getThemeColors(theme);
|
|
3732
4359
|
const processPTY = (text) => {
|
|
3733
4360
|
if (!text) return "";
|
|
3734
4361
|
const lines = [[]];
|
|
@@ -3873,15 +4500,16 @@ var init_TerminalBox = __esm({
|
|
|
3873
4500
|
borderRight: false,
|
|
3874
4501
|
borderTop: true,
|
|
3875
4502
|
borderBottom: true,
|
|
4503
|
+
borderColor: colors.codeBorder,
|
|
3876
4504
|
paddingLeft: 2,
|
|
3877
4505
|
paddingRight: 0,
|
|
3878
4506
|
paddingY: 1,
|
|
3879
4507
|
marginY: 1,
|
|
3880
4508
|
width: columns - 2
|
|
3881
4509
|
},
|
|
3882
|
-
/* @__PURE__ */ React3.createElement(Box2, { marginBottom: 1, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React3.createElement(Box2, { flexShrink: 1, paddingRight: 2 }, /* @__PURE__ */ React3.createElement(Text3, null, /* @__PURE__ */ React3.createElement(Text3, { color:
|
|
3883
|
-
displayOutput ? /* @__PURE__ */ React3.createElement(Box2, { flexDirection: "column", marginTop: 0, backgroundColor: isPty ? void 0 :
|
|
3884
|
-
/* @__PURE__ */ React3.createElement(Box2, { justifyContent: "space-between", marginTop: 1 }, !completed ? /* @__PURE__ */ React3.createElement(Text3, { color:
|
|
4510
|
+
/* @__PURE__ */ React3.createElement(Box2, { marginBottom: 1, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React3.createElement(Box2, { flexShrink: 1, paddingRight: 2 }, /* @__PURE__ */ React3.createElement(Text3, null, /* @__PURE__ */ React3.createElement(Text3, { color: colors.text, bold: true }, completed ? "\u{1F3C1} FINISHED:" : "\u26A1 EXECUTING:", " "), /* @__PURE__ */ React3.createElement(Text3, { color: colors.text }, command))), isPty && /* @__PURE__ */ React3.createElement(Box2, { flexShrink: 0, paddingX: 1 }, /* @__PURE__ */ React3.createElement(Text3, { color: "green", bold: true }, "ADVANCE"))),
|
|
4511
|
+
displayOutput ? /* @__PURE__ */ React3.createElement(Box2, { flexDirection: "column", marginTop: 0, backgroundColor: isPty ? void 0 : colors.codeBg, paddingX: 1, width: "100%" }, hasCollapsibleContent && !isExpanded && /* @__PURE__ */ React3.createElement(Box2, { marginBottom: 1 }, /* @__PURE__ */ React3.createElement(Text3, { color: "magenta" }, "...", collapsedCount, " lines collapsed...")), /* @__PURE__ */ React3.createElement(Text3, { color: completed ? colors.text : colors.text }, renderedOutput)) : !completed && /* @__PURE__ */ React3.createElement(Box2, { marginTop: 1, backgroundColor: isPty ? void 0 : colors.codeBg, paddingX: 1, width: "100%" }, /* @__PURE__ */ React3.createElement(Text3, { color: colors.textMuted, italic: true }, "Waiting for output...")),
|
|
4512
|
+
/* @__PURE__ */ React3.createElement(Box2, { justifyContent: "space-between", marginTop: 1 }, !completed ? /* @__PURE__ */ React3.createElement(Text3, { color: colors.textMuted, italic: true }, isFocused ? "Press TAB to unfocus, then double-press ESC to terminate." : "Double-press ESC to terminate if hanging.") : /* @__PURE__ */ React3.createElement(Box2, null), /* @__PURE__ */ React3.createElement(Text3, { color: colors.textMuted, bold: true }, completed ? "\u25CF ARCHIVED" : isFocused ? "\u25B6 TERMINAL FOCUSED" : "\u25CF LIVE (Press TAB to focus)"))
|
|
3885
4513
|
);
|
|
3886
4514
|
});
|
|
3887
4515
|
}
|
|
@@ -4115,6 +4743,7 @@ var getTerminalEnv, emojiSpace, getFluxLogo;
|
|
|
4115
4743
|
var init_terminal = __esm({
|
|
4116
4744
|
"src/utils/terminal.js"() {
|
|
4117
4745
|
init_gemini_cli();
|
|
4746
|
+
init_theme();
|
|
4118
4747
|
getTerminalEnv = () => {
|
|
4119
4748
|
if (process.env.TERM_PROGRAM === "vscode") return "vscode";
|
|
4120
4749
|
if (process.env.WT_SESSION) return "wt";
|
|
@@ -4130,8 +4759,13 @@ var init_terminal = __esm({
|
|
|
4130
4759
|
}
|
|
4131
4760
|
return " ".repeat(baseSpaces);
|
|
4132
4761
|
};
|
|
4133
|
-
getFluxLogo = (version = "...", provider = "Loading...") => {
|
|
4762
|
+
getFluxLogo = (version = "...", provider = "Loading...", theme = "Dark") => {
|
|
4134
4763
|
const quote = STARTUP_QUOTES[Math.floor(Math.random() * STARTUP_QUOTES.length)];
|
|
4764
|
+
const colors = getThemeColors(theme);
|
|
4765
|
+
const textColor = colors.logoTextAnsi;
|
|
4766
|
+
const bodyColor = colors.logoBodyAnsi;
|
|
4767
|
+
const greyColor = colors.logoMutedAnsi;
|
|
4768
|
+
const reset = "\x1B[0m";
|
|
4135
4769
|
const art = [
|
|
4136
4770
|
" \u2588\u2588\u2588 ",
|
|
4137
4771
|
" \u2591\u2591\u2591\u2588\u2588\u2588 ",
|
|
@@ -4142,14 +4776,15 @@ var init_terminal = __esm({
|
|
|
4142
4776
|
" \u2588\u2588\u2588\u2591 ",
|
|
4143
4777
|
" \u2591\u2591\u2591 "
|
|
4144
4778
|
];
|
|
4145
|
-
const
|
|
4146
|
-
const
|
|
4779
|
+
const logoGradient = colors.logoGradient || ["#0077ff", "#ff00ff"];
|
|
4780
|
+
const coloredArt = gradient(logoGradient).multiline(art.join("\n")).split("\n");
|
|
4781
|
+
const grey = (t) => `${greyColor}${t}${reset}`;
|
|
4147
4782
|
return `${coloredArt[0]}
|
|
4148
|
-
${coloredArt[1]}
|
|
4783
|
+
${coloredArt[1]} ${textColor}Selected Provider: ${provider}${reset}
|
|
4149
4784
|
${coloredArt[2]}
|
|
4150
|
-
${coloredArt[3]}
|
|
4785
|
+
${coloredArt[3]} ${textColor}FLUX FLOW ${grey("v" + version)}${reset}
|
|
4151
4786
|
${coloredArt[4]}
|
|
4152
|
-
${coloredArt[5]}
|
|
4787
|
+
${coloredArt[5]} ${bodyColor}See /help for additional commands.${reset}
|
|
4153
4788
|
${coloredArt[6]} ${grey(quote)}
|
|
4154
4789
|
${coloredArt[7]}`;
|
|
4155
4790
|
};
|
|
@@ -4166,6 +4801,7 @@ var init_ChatLayout = __esm({
|
|
|
4166
4801
|
init_TerminalBox();
|
|
4167
4802
|
init_text();
|
|
4168
4803
|
init_terminal();
|
|
4804
|
+
init_theme();
|
|
4169
4805
|
useStreamingText = (targetText, isStreaming, isActiveBlock) => {
|
|
4170
4806
|
return targetText;
|
|
4171
4807
|
};
|
|
@@ -4290,20 +4926,22 @@ var init_ChatLayout = __esm({
|
|
|
4290
4926
|
return p;
|
|
4291
4927
|
}));
|
|
4292
4928
|
};
|
|
4293
|
-
InlineMarkdown = React4.memo(({ text, color, italic }) => {
|
|
4929
|
+
InlineMarkdown = React4.memo(({ text, color, italic, theme = "Dark" }) => {
|
|
4294
4930
|
if (!text) return null;
|
|
4931
|
+
const colors = getThemeColors(theme);
|
|
4932
|
+
const textColor = color || colors.text;
|
|
4295
4933
|
const parts = text.split(REGEX_MD_TOKENS);
|
|
4296
|
-
return /* @__PURE__ */ React4.createElement(Text4, { color, wrap: "anywhere", italic }, parts.map((part, j) => {
|
|
4934
|
+
return /* @__PURE__ */ React4.createElement(Text4, { color: textColor, wrap: "anywhere", italic }, parts.map((part, j) => {
|
|
4297
4935
|
if (!part) return null;
|
|
4298
4936
|
if (part.startsWith("```") && part.endsWith("```")) {
|
|
4299
4937
|
const content = part.slice(3, -3);
|
|
4300
4938
|
return /* @__PURE__ */ React4.createElement(Text4, { key: j, color: "cyan" }, content);
|
|
4301
4939
|
}
|
|
4302
4940
|
if (part.startsWith("**") && part.endsWith("**")) {
|
|
4303
|
-
return /* @__PURE__ */ React4.createElement(Text4, { key: j, bold: true, color:
|
|
4941
|
+
return /* @__PURE__ */ React4.createElement(Text4, { key: j, bold: true, color: textColor }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: part.slice(2, -2), color: textColor, theme }));
|
|
4304
4942
|
}
|
|
4305
4943
|
if (part.startsWith("*") && part.endsWith("*")) {
|
|
4306
|
-
return /* @__PURE__ */ React4.createElement(Text4, { key: j, italic: true, color:
|
|
4944
|
+
return /* @__PURE__ */ React4.createElement(Text4, { key: j, italic: true, color: textColor }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: part.slice(1, -1), color: textColor, italic, theme }));
|
|
4307
4945
|
}
|
|
4308
4946
|
if (part.startsWith("`") && part.endsWith("`")) {
|
|
4309
4947
|
const content = part.slice(1, -1);
|
|
@@ -4336,8 +4974,9 @@ var init_ChatLayout = __esm({
|
|
|
4336
4974
|
return renderLatexText(part, j);
|
|
4337
4975
|
}));
|
|
4338
4976
|
});
|
|
4339
|
-
TableRenderer = React4.memo(({ buffer, terminalWidth = 80 }) => {
|
|
4977
|
+
TableRenderer = React4.memo(({ buffer, terminalWidth = 80, theme = "Dark" }) => {
|
|
4340
4978
|
if (buffer.length < 2) return null;
|
|
4979
|
+
const colors = getThemeColors(theme);
|
|
4341
4980
|
const rows = buffer.map((line) => {
|
|
4342
4981
|
const parts = line.split("|");
|
|
4343
4982
|
if (parts[0] !== void 0 && parts[0].trim() === "") parts.shift();
|
|
@@ -4351,23 +4990,25 @@ var init_ChatLayout = __esm({
|
|
|
4351
4990
|
const colChars = Math.floor(availableWidth / header.length) - 2;
|
|
4352
4991
|
return (
|
|
4353
4992
|
// Table MarginY here
|
|
4354
|
-
/* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
4993
|
+
/* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", borderStyle: "round", borderColor: colors.borderMuted, paddingX: 1, marginY: 0, width: terminalWidth - 2 }, /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "row", borderStyle: "single", borderBottom: true, borderTop: false, borderLeft: false, borderRight: false, borderColor: colors.borderMuted, marginBottom: 1, paddingBottom: 0, width: "100%" }, header.map((cell, i) => /* @__PURE__ */ React4.createElement(Box3, { key: i, flexBasis: `${colPercentage}%`, flexGrow: 1, flexShrink: 0, paddingRight: 2 }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: wrapText(cell, colChars), color: "cyan", theme })))), data.map((row, ri) => /* @__PURE__ */ React4.createElement(Box3, { key: ri, flexDirection: "row", marginBottom: ri === data.length - 1 ? 0 : 1, width: "100%" }, row.map((cell, ci) => /* @__PURE__ */ React4.createElement(Box3, { key: ci, flexBasis: `${colPercentage}%`, flexGrow: 1, flexShrink: 0, paddingRight: 2, flexDirection: "column" }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: wrapText(cell, colChars), color: colors.text, theme }))))))
|
|
4355
4994
|
);
|
|
4356
4995
|
});
|
|
4357
|
-
MarkdownText = React4.memo(({ text, color
|
|
4996
|
+
MarkdownText = React4.memo(({ text, color, columns = 80, italic = false, theme = "Dark" }) => {
|
|
4358
4997
|
if (!text) return null;
|
|
4998
|
+
const colors = getThemeColors(theme);
|
|
4999
|
+
const textColor = color || colors.text;
|
|
4359
5000
|
const lines = text.split("\n");
|
|
4360
5001
|
const result = [];
|
|
4361
5002
|
let tableBuffer = [];
|
|
4362
5003
|
let quoteBuffer = [];
|
|
4363
5004
|
const flushBuffers = (key) => {
|
|
4364
5005
|
if (tableBuffer.length > 0) {
|
|
4365
|
-
result.push(/* @__PURE__ */ React4.createElement(TableRenderer, { key: `table-${key}`, buffer: [...tableBuffer], terminalWidth: columns }));
|
|
5006
|
+
result.push(/* @__PURE__ */ React4.createElement(TableRenderer, { key: `table-${key}`, buffer: [...tableBuffer], terminalWidth: columns, theme }));
|
|
4366
5007
|
tableBuffer = [];
|
|
4367
5008
|
}
|
|
4368
5009
|
if (quoteBuffer.length > 0) {
|
|
4369
5010
|
result.push(
|
|
4370
|
-
/* @__PURE__ */ React4.createElement(Box3, { key: `quote-${key}`, borderStyle: "bold", borderLeft: true, borderRight: false, borderTop: false, borderBottom: false, borderColor:
|
|
5011
|
+
/* @__PURE__ */ React4.createElement(Box3, { key: `quote-${key}`, borderStyle: "bold", borderLeft: true, borderRight: false, borderTop: false, borderBottom: false, borderColor: colors.borderMuted, paddingLeft: 1, marginY: 1, flexDirection: "column" }, quoteBuffer.map((line, qi) => /* @__PURE__ */ React4.createElement(InlineMarkdown, { key: qi, text: line, color: colors.textMuted, italic, theme })))
|
|
4371
5012
|
);
|
|
4372
5013
|
quoteBuffer = [];
|
|
4373
5014
|
}
|
|
@@ -4389,7 +5030,7 @@ var init_ChatLayout = __esm({
|
|
|
4389
5030
|
return;
|
|
4390
5031
|
}
|
|
4391
5032
|
if (trimmed === "---" || trimmed === "***" || trimmed === "___") {
|
|
4392
|
-
result.push(/* @__PURE__ */ React4.createElement(Box3, { key: i, marginY: 1, borderStyle: "single", borderTop: true, borderBottom: false, borderLeft: false, borderRight: false, width: "100%", borderColor:
|
|
5033
|
+
result.push(/* @__PURE__ */ React4.createElement(Box3, { key: i, marginY: 1, borderStyle: "single", borderTop: true, borderBottom: false, borderLeft: false, borderRight: false, width: "100%", borderColor: colors.borderMuted }));
|
|
4393
5034
|
return;
|
|
4394
5035
|
}
|
|
4395
5036
|
const headingMatch = trimmed.match(/^(#{1,6})\s+(.*)/);
|
|
@@ -4397,7 +5038,7 @@ var init_ChatLayout = __esm({
|
|
|
4397
5038
|
const level = headingMatch[1].length;
|
|
4398
5039
|
const hText = headingMatch[2];
|
|
4399
5040
|
result.push(
|
|
4400
|
-
/* @__PURE__ */ React4.createElement(Box3, { key: i, marginTop: 1, marginBottom: 0, width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: level === 1 ? "cyan" : level === 2 ? "
|
|
5041
|
+
/* @__PURE__ */ React4.createElement(Box3, { key: i, marginTop: 1, marginBottom: 0, width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: level === 1 ? "cyan" : level === 2 ? "magenta" : level === 3 ? "yellow" : level === 4 ? "green" : level === 5 ? "blue" : colors.text, underline: true }, hText))
|
|
4401
5042
|
);
|
|
4402
5043
|
return;
|
|
4403
5044
|
}
|
|
@@ -4416,22 +5057,23 @@ var init_ChatLayout = __esm({
|
|
|
4416
5057
|
content = wrapText(trimmed, columns - 4);
|
|
4417
5058
|
}
|
|
4418
5059
|
result.push(
|
|
4419
|
-
/* @__PURE__ */ React4.createElement(Box3, { key: i, flexDirection: "column", width: "100%" }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: content, color, italic }))
|
|
5060
|
+
/* @__PURE__ */ React4.createElement(Box3, { key: i, flexDirection: "column", width: "100%" }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: content, color: textColor, italic, theme }))
|
|
4420
5061
|
);
|
|
4421
5062
|
}
|
|
4422
5063
|
});
|
|
4423
5064
|
flushBuffers("final");
|
|
4424
5065
|
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", width: columns - 2 }, result);
|
|
4425
5066
|
});
|
|
4426
|
-
DiffLine = React4.memo(({ line, pairContent, parentText, columns = 80, extension }) => {
|
|
5067
|
+
DiffLine = React4.memo(({ line, pairContent, parentText, columns = 80, extension, theme = "Dark" }) => {
|
|
5068
|
+
const colors = getThemeColors(theme);
|
|
4427
5069
|
const isContext = line.includes("[UI_CONTEXT]");
|
|
4428
5070
|
const cleanLine = line.replace("[UI_CONTEXT]", "");
|
|
4429
5071
|
if (isContext && cleanLine.includes("\u2550")) {
|
|
4430
|
-
return /* @__PURE__ */ React4.createElement(Box3, { backgroundColor:
|
|
5072
|
+
return /* @__PURE__ */ React4.createElement(Box3, { backgroundColor: colors.codeBg, paddingX: 1, width: columns }, /* @__PURE__ */ React4.createElement(Text4, { color: "gray" }, "\u2550".repeat(Math.max(10, columns - 4))));
|
|
4431
5073
|
}
|
|
4432
5074
|
const parsedCurrent = parseLineInfo(line);
|
|
4433
5075
|
if (!parsedCurrent) {
|
|
4434
|
-
return /* @__PURE__ */ React4.createElement(Box3, { backgroundColor:
|
|
5076
|
+
return /* @__PURE__ */ React4.createElement(Box3, { backgroundColor: colors.codeBg, paddingX: 1, width: columns }, /* @__PURE__ */ React4.createElement(Box3, { width: 3, flexShrink: 0 }), /* @__PURE__ */ React4.createElement(Box3, { width: 1, flexShrink: 0, marginLeft: 1 }), /* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1, marginLeft: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "gray" }, wrapText(cleanLine, columns - 14))));
|
|
4435
5077
|
}
|
|
4436
5078
|
const { isR: isRemoval, isA: isAddition, num: lineNum, content } = parsedCurrent;
|
|
4437
5079
|
let finalPairContent = pairContent;
|
|
@@ -4447,19 +5089,19 @@ var init_ChatLayout = __esm({
|
|
|
4447
5089
|
}
|
|
4448
5090
|
const hasInlineChange = words.some((part) => isRemoval && part.removed || isAddition && part.added);
|
|
4449
5091
|
const isPureUnpairedBlock = !finalPairContent && (isRemoval || isAddition);
|
|
4450
|
-
const innerBgColor = isRemoval ?
|
|
4451
|
-
const finalNumColor = isRemoval || isAddition ? isRemoval ?
|
|
4452
|
-
const finalPrefixColor = isRemoval ?
|
|
5092
|
+
const innerBgColor = isRemoval ? colors.diffRemovalBg : isAddition ? colors.diffAdditionBg : void 0;
|
|
5093
|
+
const finalNumColor = isRemoval || isAddition ? isRemoval ? colors.diffRemovalNum : colors.diffAdditionNum : colors.textMuted;
|
|
5094
|
+
const finalPrefixColor = isRemoval ? colors.diffRemovalPrefix : colors.diffAdditionPrefix;
|
|
4453
5095
|
const displayPrefix = isRemoval ? "-" : isAddition ? "+" : " ";
|
|
4454
5096
|
const renderInlineDiff = () => {
|
|
4455
5097
|
if (isPureUnpairedBlock) {
|
|
4456
|
-
const blockColor = isRemoval ?
|
|
4457
|
-
const textBgColor = isRemoval ?
|
|
5098
|
+
const blockColor = isRemoval ? colors.diffRemovalHighlightColor : colors.diffAdditionHighlightColor;
|
|
5099
|
+
const textBgColor = isRemoval ? colors.diffRemovalHighlightBg : colors.diffAdditionHighlightBg;
|
|
4458
5100
|
const wrappedLines = wrapText(content, columns - 15).split("\n");
|
|
4459
5101
|
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column" }, wrappedLines.map((wl, idx) => /* @__PURE__ */ React4.createElement(Box3, { key: idx }, renderHighlightedLine(wl, extension, blockColor, textBgColor))));
|
|
4460
5102
|
}
|
|
4461
5103
|
if (!(isRemoval || isAddition) || words.length === 0 || !hasInlineChange) {
|
|
4462
|
-
const textColor = isRemoval ?
|
|
5104
|
+
const textColor = isRemoval ? colors.diffRemovalText : isAddition ? colors.diffAdditionText : colors.textMuted;
|
|
4463
5105
|
const textBgColor = void 0;
|
|
4464
5106
|
const wrappedLines = wrapText(content, columns - 15).split("\n");
|
|
4465
5107
|
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column" }, wrappedLines.map((wl, idx) => /* @__PURE__ */ React4.createElement(Box3, { key: idx }, renderHighlightedLine(wl, extension, textColor, textBgColor))));
|
|
@@ -4469,25 +5111,26 @@ var init_ChatLayout = __esm({
|
|
|
4469
5111
|
if (isRemoval) {
|
|
4470
5112
|
const isSurroundedByRemoval = words[idx - 1]?.removed || words[idx + 1]?.removed;
|
|
4471
5113
|
if (part.removed || isWhitespace && isSurroundedByRemoval) {
|
|
4472
|
-
return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color:
|
|
5114
|
+
return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color: colors.diffRemovalHighlightColor, backgroundColor: colors.diffRemovalHighlightBg }, part.value);
|
|
4473
5115
|
}
|
|
4474
5116
|
if (part.added) return null;
|
|
4475
|
-
return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color:
|
|
5117
|
+
return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color: colors.diffRemovalText }, part.value);
|
|
4476
5118
|
}
|
|
4477
5119
|
if (isAddition) {
|
|
4478
5120
|
const isSurroundedByAddition = words[idx - 1]?.added || words[idx + 1]?.added;
|
|
4479
5121
|
if (part.added || isWhitespace && isSurroundedByAddition) {
|
|
4480
|
-
return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color:
|
|
5122
|
+
return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color: colors.diffAdditionHighlightColor, backgroundColor: colors.diffAdditionHighlightBg }, part.value);
|
|
4481
5123
|
}
|
|
4482
5124
|
if (part.removed) return null;
|
|
4483
|
-
return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color:
|
|
5125
|
+
return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color: colors.diffAdditionText }, part.value);
|
|
4484
5126
|
}
|
|
4485
|
-
return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color:
|
|
5127
|
+
return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color: colors.textMuted }, part.value);
|
|
4486
5128
|
}));
|
|
4487
5129
|
};
|
|
4488
|
-
return /* @__PURE__ */ React4.createElement(Box3, { backgroundColor:
|
|
5130
|
+
return /* @__PURE__ */ React4.createElement(Box3, { backgroundColor: colors.codeBg, paddingX: 1, width: columns }, /* @__PURE__ */ React4.createElement(Box3, { width: 4, flexShrink: 0, justifyContent: "flex-end" }, /* @__PURE__ */ React4.createElement(Text4, { color: finalNumColor }, lineNum)), /* @__PURE__ */ React4.createElement(Box3, { width: 1, flexShrink: 0, marginLeft: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: finalPrefixColor }, displayPrefix)), /* @__PURE__ */ React4.createElement(Box3, { marginLeft: 1, backgroundColor: innerBgColor, flexShrink: 1 }, renderInlineDiff()));
|
|
4489
5131
|
});
|
|
4490
|
-
DiffBlock = React4.memo(({ text, columns = 80, extension }) => {
|
|
5132
|
+
DiffBlock = React4.memo(({ text, columns = 80, extension, theme = "Dark" }) => {
|
|
5133
|
+
const colors = getThemeColors(theme);
|
|
4491
5134
|
const match = text.match(/\[DIFF_START\]([\s\S]*?)(?:\[DIFF_END\]|$)/);
|
|
4492
5135
|
const diffBody = match ? match[1].trim() : "";
|
|
4493
5136
|
const diffLines = diffBody.split("\n");
|
|
@@ -4513,26 +5156,28 @@ var init_ChatLayout = __esm({
|
|
|
4513
5156
|
if (currentGroup.length > 0) {
|
|
4514
5157
|
alignChangeGroup(currentGroup);
|
|
4515
5158
|
}
|
|
4516
|
-
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", width: columns - 3, marginBottom: 1 }, /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingY: 0, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { backgroundColor:
|
|
5159
|
+
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", width: columns - 3, marginBottom: 1 }, /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingY: 0, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { backgroundColor: colors.codeBg, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { width: 3, flexShrink: 0 }), /* @__PURE__ */ React4.createElement(Box3, { width: 1, flexShrink: 0, marginLeft: 1 }), /* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1, marginLeft: 1 }, /* @__PURE__ */ React4.createElement(Text4, null, " "))), parsedLines.map((item, i) => /* @__PURE__ */ React4.createElement(
|
|
4517
5160
|
DiffLine,
|
|
4518
5161
|
{
|
|
4519
5162
|
key: i,
|
|
4520
5163
|
line: item.line,
|
|
4521
5164
|
pairContent: item.pairContent,
|
|
4522
5165
|
columns: columns - 3,
|
|
4523
|
-
extension
|
|
5166
|
+
extension,
|
|
5167
|
+
theme
|
|
4524
5168
|
}
|
|
4525
|
-
)), /* @__PURE__ */ React4.createElement(Box3, { backgroundColor:
|
|
5169
|
+
)), /* @__PURE__ */ React4.createElement(Box3, { backgroundColor: colors.codeBg, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { width: 3, flexShrink: 0 }), /* @__PURE__ */ React4.createElement(Box3, { width: 1, flexShrink: 0, marginLeft: 1 }), /* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1, marginLeft: 1 }, /* @__PURE__ */ React4.createElement(Text4, null, " ")))));
|
|
4526
5170
|
});
|
|
4527
|
-
CodeRenderer = React4.memo(({ text, columns = 80 }) => {
|
|
5171
|
+
CodeRenderer = React4.memo(({ text, columns = 80, theme = "Dark" }) => {
|
|
4528
5172
|
if (!text) return null;
|
|
5173
|
+
const colors = getThemeColors(theme);
|
|
4529
5174
|
let extension = "";
|
|
4530
5175
|
const fileMatch = text.match(/File\s+\[(.*?)\]/i);
|
|
4531
5176
|
if (fileMatch) {
|
|
4532
5177
|
extension = fileMatch[1].split(".").pop().toLowerCase();
|
|
4533
5178
|
}
|
|
4534
5179
|
if (text.includes("[DIFF_START]")) {
|
|
4535
|
-
return /* @__PURE__ */ React4.createElement(DiffBlock, { text, columns, extension });
|
|
5180
|
+
return /* @__PURE__ */ React4.createElement(DiffBlock, { text, columns, extension, theme });
|
|
4536
5181
|
}
|
|
4537
5182
|
if (text.includes("- Content Preview:")) {
|
|
4538
5183
|
const mainParts = text.split("- Content Preview:");
|
|
@@ -4553,14 +5198,14 @@ var init_ChatLayout = __esm({
|
|
|
4553
5198
|
borderRight: false,
|
|
4554
5199
|
borderTop: false,
|
|
4555
5200
|
borderBottom: false,
|
|
4556
|
-
borderColor:
|
|
5201
|
+
borderColor: colors.codeBorder,
|
|
4557
5202
|
paddingLeft: 2,
|
|
4558
5203
|
paddingRight: 0,
|
|
4559
5204
|
width: "100%",
|
|
4560
5205
|
marginBottom: 1,
|
|
4561
|
-
backgroundColor:
|
|
5206
|
+
backgroundColor: colors.codeBg
|
|
4562
5207
|
},
|
|
4563
|
-
/* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { width: gutterWidth + 2, flexShrink: 0 }, /* @__PURE__ */ React4.createElement(Text4, null, " ")), /* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1 }, /* @__PURE__ */ React4.createElement(Text4, null, " "))), codeLines.map((line, idx) => /* @__PURE__ */ React4.createElement(Box3, { key: idx, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { width: gutterWidth + 2, flexShrink: 0 }, /* @__PURE__ */ React4.createElement(Text4, { color: "gray", dimColor: true }, String(idx + 1).padStart(gutterWidth, " "), " ")), /* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1 }, renderHighlightedLine(line, extension,
|
|
5208
|
+
/* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { width: gutterWidth + 2, flexShrink: 0 }, /* @__PURE__ */ React4.createElement(Text4, null, " ")), /* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1 }, /* @__PURE__ */ React4.createElement(Text4, null, " "))), codeLines.map((line, idx) => /* @__PURE__ */ React4.createElement(Box3, { key: idx, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { width: gutterWidth + 2, flexShrink: 0 }, /* @__PURE__ */ React4.createElement(Text4, { color: "gray", dimColor: true }, String(idx + 1).padStart(gutterWidth, " "), " ")), /* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1 }, renderHighlightedLine(line, extension, colors.text)))), /* @__PURE__ */ React4.createElement(Box3, { width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { width: gutterWidth + 2, flexShrink: 0 }, /* @__PURE__ */ React4.createElement(Text4, null, " ")), /* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1 }, /* @__PURE__ */ React4.createElement(Text4, null, " "))))
|
|
4564
5209
|
));
|
|
4565
5210
|
}
|
|
4566
5211
|
if (text.includes("```")) {
|
|
@@ -4583,13 +5228,13 @@ var init_ChatLayout = __esm({
|
|
|
4583
5228
|
borderRight: false,
|
|
4584
5229
|
borderTop: false,
|
|
4585
5230
|
borderBottom: false,
|
|
4586
|
-
borderColor:
|
|
5231
|
+
borderColor: colors.codeBorder,
|
|
4587
5232
|
paddingLeft: 2,
|
|
4588
5233
|
paddingRight: 0,
|
|
4589
5234
|
width: "100%"
|
|
4590
5235
|
},
|
|
4591
5236
|
/* @__PURE__ */ React4.createElement(Box3, null, /* @__PURE__ */ React4.createElement(Text4, { color: "gray", bold: true }, "\u25B6_ ", lang.toUpperCase() || "CODE")),
|
|
4592
|
-
/* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", width: "100%" }, codeLines.map((line, idx) => /* @__PURE__ */ React4.createElement(Box3, { key: idx, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { width: gutterWidth + 2, flexShrink: 0 }, /* @__PURE__ */ React4.createElement(Text4, { color: "gray" }, String(idx + 1).padStart(gutterWidth, " "), " ")), /* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1 }, renderHighlightedLine(line, lang,
|
|
5237
|
+
/* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", width: "100%" }, codeLines.map((line, idx) => /* @__PURE__ */ React4.createElement(Box3, { key: idx, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { width: gutterWidth + 2, flexShrink: 0 }, /* @__PURE__ */ React4.createElement(Text4, { color: "gray" }, String(idx + 1).padStart(gutterWidth, " "), " ")), /* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1 }, renderHighlightedLine(line, lang, colors.text)))))
|
|
4593
5238
|
);
|
|
4594
5239
|
}
|
|
4595
5240
|
let cleanPart = part;
|
|
@@ -4600,10 +5245,10 @@ var init_ChatLayout = __esm({
|
|
|
4600
5245
|
cleanPart = cleanPart.replace(/[\r\n]+$/, "");
|
|
4601
5246
|
}
|
|
4602
5247
|
if (!cleanPart) return null;
|
|
4603
|
-
return /* @__PURE__ */ React4.createElement(MarkdownText, { key: i, text: cleanPart, columns: columns - 3 });
|
|
5248
|
+
return /* @__PURE__ */ React4.createElement(MarkdownText, { key: i, text: cleanPart, columns: columns - 3, theme });
|
|
4604
5249
|
}));
|
|
4605
5250
|
}
|
|
4606
|
-
return /* @__PURE__ */ React4.createElement(MarkdownText, { text, columns: columns - 3 });
|
|
5251
|
+
return /* @__PURE__ */ React4.createElement(MarkdownText, { text, columns: columns - 3, theme });
|
|
4607
5252
|
});
|
|
4608
5253
|
formatThinkingDuration = (ms) => {
|
|
4609
5254
|
const totalSecs = Math.round(ms / 1e3);
|
|
@@ -4615,39 +5260,39 @@ var init_ChatLayout = __esm({
|
|
|
4615
5260
|
}
|
|
4616
5261
|
return `${totalSecs}s`;
|
|
4617
5262
|
};
|
|
4618
|
-
MessageItem = React4.memo(({ msg, showFullThinking, columns = 80, aiProvider, version }) => {
|
|
5263
|
+
MessageItem = React4.memo(({ msg, showFullThinking, columns = 80, aiProvider, version, theme = "Dark" }) => {
|
|
5264
|
+
const colors = getThemeColors(theme);
|
|
4619
5265
|
const isDiffResult = msg.role === "system" && (msg.text?.includes("[DIFF_START]") || msg.text?.includes("- Content Preview:"));
|
|
4620
5266
|
const isPatchError = msg.role === "system" && msg.text?.includes("[TOOL RESULT]: ERROR:") && !msg.text?.includes("[DIFF_START]") && (msg.toolName === "update_file" || msg.text?.includes("Could not find exact match"));
|
|
4621
5267
|
const isTerminalRecord = msg.isTerminalRecord;
|
|
4622
5268
|
const isHomeWarning = msg.isHomeWarning;
|
|
4623
5269
|
if (isHomeWarning) {
|
|
4624
|
-
return /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 1, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
5270
|
+
return /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 1, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", borderStyle: "round", borderColor: colors.border, dimColor: true, padding: 0, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.text, bold: true }, msg.text)), /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 0, marginBottom: 0 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.text }, msg.subText))));
|
|
4625
5271
|
}
|
|
4626
5272
|
if (msg.isLogo) {
|
|
4627
|
-
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", alignItems: "flex-start", width: "100%", marginY: 1 }, /* @__PURE__ */ React4.createElement(Text4, null, getFluxLogo(version, aiProvider)));
|
|
5273
|
+
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", alignItems: "flex-start", width: "100%", marginY: 1 }, /* @__PURE__ */ React4.createElement(Text4, null, getFluxLogo(version, aiProvider, theme)));
|
|
4628
5274
|
}
|
|
4629
5275
|
if (msg.id && String(msg.id).startsWith("welcome")) {
|
|
4630
|
-
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", alignItems: "center", width: "100%", marginY: 1 }, /* @__PURE__ */ React4.createElement(Box3, { borderStyle: "round", borderColor:
|
|
5276
|
+
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", alignItems: "center", width: "100%", marginY: 1 }, /* @__PURE__ */ React4.createElement(Box3, { borderStyle: "round", borderColor: colors.borderMuted, paddingX: 3, paddingY: 0 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.text, bold: true }, msg.text.trim())));
|
|
4631
5277
|
}
|
|
4632
5278
|
if (msg.isVisualFeedback) {
|
|
4633
5279
|
return (
|
|
4634
5280
|
// [SPACE POINT]
|
|
4635
|
-
/* @__PURE__ */ React4.createElement(Box3, { marginBottom: 0, marginTop: 0, paddingX: 0, width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, { color:
|
|
5281
|
+
/* @__PURE__ */ React4.createElement(Box3, { marginBottom: 0, marginTop: 0, paddingX: 0, width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.text }, msg.text))
|
|
4636
5282
|
);
|
|
4637
5283
|
}
|
|
4638
5284
|
if (isPatchError) {
|
|
4639
|
-
return /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 1 }, /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
5285
|
+
return /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 1 }, /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", borderStyle: "round", borderColor: colors.border, paddingX: 1, paddingY: 0 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.text, bold: true, underline: true }, "\u2717 PATCH FAILED"), /* @__PURE__ */ React4.createElement(Box3, { marginTop: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.textMuted, bold: true }, "Model generated malformed edit."))));
|
|
4640
5286
|
}
|
|
4641
5287
|
if (msg.role === "system" && msg.text?.includes("[TOOL RESULT]") && !isDiffResult && !isTerminalRecord && !isPatchError) return null;
|
|
4642
5288
|
if (msg.isImageStats) {
|
|
4643
|
-
return /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 1, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
5289
|
+
return /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 1, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", borderStyle: "round", borderColor: colors.borderMuted, padding: 0, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, backgroundColor: colors.codeBg }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.text, bold: true }, "IMAGE STATS")), /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1, marginBottom: 1, flexDirection: "column" }, msg.text.split("\n").map((line, i) => /* @__PURE__ */ React4.createElement(Text4, { key: i, color: colors.textMuted }, line)))));
|
|
4644
5290
|
}
|
|
4645
5291
|
if (msg.isAskRecord) {
|
|
4646
5292
|
const selectionMatch = msg.text.match(/Selection: (.*)/);
|
|
4647
5293
|
const selection = selectionMatch ? selectionMatch[1] : "No selection";
|
|
4648
5294
|
const questionMatch = msg.text.match(/Question: (.*)/);
|
|
4649
5295
|
const question = questionMatch ? questionMatch[1] : null;
|
|
4650
|
-
const s = emojiSpace(2);
|
|
4651
5296
|
return /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 0, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(
|
|
4652
5297
|
Box3,
|
|
4653
5298
|
{
|
|
@@ -4657,7 +5302,7 @@ var init_ChatLayout = __esm({
|
|
|
4657
5302
|
borderRight: false,
|
|
4658
5303
|
borderTop: true,
|
|
4659
5304
|
borderBottom: true,
|
|
4660
|
-
borderColor:
|
|
5305
|
+
borderColor: colors.codeBorder,
|
|
4661
5306
|
paddingLeft: 2,
|
|
4662
5307
|
paddingRight: 0,
|
|
4663
5308
|
paddingTop: 1,
|
|
@@ -4665,9 +5310,9 @@ var init_ChatLayout = __esm({
|
|
|
4665
5310
|
marginY: 1,
|
|
4666
5311
|
width: columns - 2
|
|
4667
5312
|
},
|
|
4668
|
-
/* @__PURE__ */ React4.createElement(Box3, { paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color:
|
|
4669
|
-
question && /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color:
|
|
4670
|
-
/* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1, marginBottom: 0 }, /* @__PURE__ */ React4.createElement(Text4, { color:
|
|
5313
|
+
/* @__PURE__ */ React4.createElement(Box3, { paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.success, bold: true }, "AGENT REQUEST: RESOLVED")),
|
|
5314
|
+
question && /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.secondary }, question)),
|
|
5315
|
+
/* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1, marginBottom: 0 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.text }, "Selection: ", /* @__PURE__ */ React4.createElement(Text4, { color: colors.textMuted, bold: true }, selection)))
|
|
4671
5316
|
));
|
|
4672
5317
|
}
|
|
4673
5318
|
if (msg.isAboutRecord) {
|
|
@@ -4681,11 +5326,11 @@ var init_ChatLayout = __esm({
|
|
|
4681
5326
|
paddingRight: 0,
|
|
4682
5327
|
paddingTop: 1,
|
|
4683
5328
|
paddingBottom: 1,
|
|
4684
|
-
backgroundColor:
|
|
5329
|
+
backgroundColor: colors.codeBg,
|
|
4685
5330
|
width: "100%"
|
|
4686
5331
|
},
|
|
4687
|
-
/* @__PURE__ */ React4.createElement(Box3, { paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color:
|
|
4688
|
-
/* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1, marginBottom: 1 }, /* @__PURE__ */ React4.createElement(Text4,
|
|
5332
|
+
/* @__PURE__ */ React4.createElement(Box3, { paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.text, bold: true }, "ABOUT FLUX FLOW")),
|
|
5333
|
+
/* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1, marginBottom: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.text }, msg.text))
|
|
4689
5334
|
));
|
|
4690
5335
|
}
|
|
4691
5336
|
if (msg.isUpdateNotification) {
|
|
@@ -4699,11 +5344,11 @@ var init_ChatLayout = __esm({
|
|
|
4699
5344
|
paddingRight: 0,
|
|
4700
5345
|
paddingTop: 1,
|
|
4701
5346
|
paddingBottom: 1,
|
|
4702
|
-
backgroundColor:
|
|
5347
|
+
backgroundColor: colors.codeBg,
|
|
4703
5348
|
width: "100%"
|
|
4704
5349
|
},
|
|
4705
|
-
/* @__PURE__ */ React4.createElement(Box3, { paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color:
|
|
4706
|
-
/* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1, marginBottom: 1 }, /* @__PURE__ */ React4.createElement(CodeRenderer, { text: msg.text, columns }))
|
|
5350
|
+
/* @__PURE__ */ React4.createElement(Box3, { paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.text, bold: true }, "UPDATE AVAILABLE")),
|
|
5351
|
+
/* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1, marginBottom: 1 }, /* @__PURE__ */ React4.createElement(CodeRenderer, { text: msg.text, columns, theme }))
|
|
4707
5352
|
));
|
|
4708
5353
|
}
|
|
4709
5354
|
if (msg.isHelpRecord) {
|
|
@@ -4735,7 +5380,7 @@ var init_ChatLayout = __esm({
|
|
|
4735
5380
|
{ cmd: "/fluxflow", desc: "Project management" },
|
|
4736
5381
|
{ cmd: "/update", desc: "Check/Install updates" }
|
|
4737
5382
|
];
|
|
4738
|
-
return /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 1, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
5383
|
+
return /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 1, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", borderStyle: "round", borderColor: colors.borderMuted, paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.text, bold: true, underline: true }, "COMMAND REFERENCE"), /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", marginTop: 1 }, commandList.map((c, i) => /* @__PURE__ */ React4.createElement(Box3, { key: i, flexDirection: "row" }, /* @__PURE__ */ React4.createElement(Box3, { width: 15 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.text, bold: true }, c.cmd)), /* @__PURE__ */ React4.createElement(Text4, { color: colors.textMuted }, " - ", c.desc))))));
|
|
4739
5384
|
}
|
|
4740
5385
|
if (msg.isTerminalRecord) {
|
|
4741
5386
|
const cmdMatch = msg.text.match(/COMMAND: (.*)/);
|
|
@@ -4744,7 +5389,7 @@ var init_ChatLayout = __esm({
|
|
|
4744
5389
|
const cmd = cmdMatch ? cmdMatch[1] : "Unknown";
|
|
4745
5390
|
const isPty = ptyMatch ? ptyMatch[1] === "true" : false;
|
|
4746
5391
|
const outputList = outputMatch ? outputMatch[1] : "";
|
|
4747
|
-
return /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 0, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(TerminalBox, { command: cmd, output: outputList, completed: true, columns, isPty }));
|
|
5392
|
+
return /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 0, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(TerminalBox, { command: cmd, output: outputList, completed: true, columns, isPty, theme }));
|
|
4748
5393
|
}
|
|
4749
5394
|
const [animationDone, setAnimationDone] = React4.useState(!msg.isStreaming);
|
|
4750
5395
|
const content = React4.useMemo(() => cleanSignals(msg.text), [msg.text]);
|
|
@@ -4760,25 +5405,23 @@ var init_ChatLayout = __esm({
|
|
|
4760
5405
|
if (msg.role === "agent" && finalContent.trim() === "") {
|
|
4761
5406
|
return null;
|
|
4762
5407
|
}
|
|
4763
|
-
return (
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
).split("\n").map((line, lineIdx) => /* @__PURE__ */ React4.createElement(Box3, { key: lineIdx, flexDirection: "row", width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { flexShrink: 0, width: 2 }, /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: "white" }, lineIdx === 0 ? ">" : " ")), /* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1, marginLeft: 1 }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: line, color: msg.color || "white" }))))
|
|
4778
|
-
), /* @__PURE__ */ React4.createElement(Box3, { width: columns - 1, height: 1, overflow: "hidden" }, /* @__PURE__ */ React4.createElement(Text4, { color: "#444444" }, "\u2580".repeat(Math.max(1, columns - 1))))) : msg.role === "think" ? /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", marginTop: 0, marginBottom: 0, paddingX: 1, width: "100%" }, msg.isStreaming && !msg.duration ? /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: "#F2F2F2" }, "\u2727 Thinking...") : /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: "#F2F2F2" }, "\u2726 Thought", msg.duration ? /* @__PURE__ */ React4.createElement(Text4, { color: "gray" }, " for ", /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: "white" }, formatThinkingDuration(msg.duration))) : "..."), /* @__PURE__ */ React4.createElement(Box3, { borderStyle: "single", borderLeft: true, borderRight: false, borderTop: false, borderBottom: false, paddingLeft: 2, paddingTop: 1, paddingBottom: 1, flexDirection: "column", width: "100%" }, formatThinkText(finalContent, columns))) : /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, marginTop: 0, width: "100%" }, /* @__PURE__ */ React4.createElement(CodeRenderer, { text: finalContent.replace(/ \|\n\n/g, " |\n"), columns }), msg.memoryUpdated && /* @__PURE__ */ React4.createElement(Box3, { marginTop: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, { color: "white", italic: true }, "[Memory Updated]")), msg.role === "agent" && msg.workedDuration ? /* @__PURE__ */ React4.createElement(Box3, { marginTop: 1, marginBottom: 2, width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, null, "["), /* @__PURE__ */ React4.createElement(Text4, { color: "gray" }, "Worked for ", /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: "white" }, formatThinkingDuration(msg.workedDuration))), /* @__PURE__ */ React4.createElement(Text4, null, "]")) : null))
|
|
4779
|
-
);
|
|
5408
|
+
return /* @__PURE__ */ React4.createElement(Box3, { marginBottom: msg.role === "think" ? 0 : msg.role === "user" ? 0 : msg.role === "agent" ? 0 : 0, marginTop: msg.role === "think" ? 0 : msg.role === "user" ? 0 : msg.role === "agent" ? 0 : 0, flexDirection: "column", flexShrink: 0, width: "100%", flexGrow: 1 }, msg.role === "user" ? /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", width: columns - 1 }, /* @__PURE__ */ React4.createElement(Box3, { width: columns - 1, height: 1, overflow: "hidden" }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.userMsgBorder }, "\u2584".repeat(Math.max(1, columns - 1)))), /* @__PURE__ */ React4.createElement(
|
|
5409
|
+
Box3,
|
|
5410
|
+
{
|
|
5411
|
+
backgroundColor: colors.userMsgBg,
|
|
5412
|
+
paddingX: 1,
|
|
5413
|
+
paddingY: 0,
|
|
5414
|
+
width: columns - 1,
|
|
5415
|
+
flexDirection: "column"
|
|
5416
|
+
},
|
|
5417
|
+
wrapText(
|
|
5418
|
+
finalContent.replace(/\r\n/g, "\n").replace(/\r/g, "\n").replace(/\\\n/g, "\n").replace(/\\$/, ""),
|
|
5419
|
+
columns - 7
|
|
5420
|
+
).split("\n").map((line, lineIdx) => /* @__PURE__ */ React4.createElement(Box3, { key: lineIdx, flexDirection: "row", width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { flexShrink: 0, width: 2 }, /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: colors.userMsgText }, lineIdx === 0 ? ">" : " ")), /* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1, marginLeft: 1 }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: line, color: msg.color || colors.userMsgText, theme }))))
|
|
5421
|
+
), /* @__PURE__ */ React4.createElement(Box3, { width: columns - 1, height: 1, overflow: "hidden" }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.userMsgBorder }, "\u2580".repeat(Math.max(1, columns - 1))))) : msg.role === "think" ? /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", marginTop: 0, marginBottom: 0, paddingX: 1, width: "100%" }, msg.isStreaming && !msg.duration ? /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: colors.text }, "\u2727 Thinking...") : /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: colors.text }, "\u2726 Thought", msg.duration ? /* @__PURE__ */ React4.createElement(Text4, { color: colors.textMuted }, " for ", /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: colors.text }, formatThinkingDuration(msg.duration))) : "..."), /* @__PURE__ */ React4.createElement(Box3, { borderStyle: "single", borderLeft: true, borderRight: false, borderTop: false, borderBottom: false, borderColor: colors.borderMuted, paddingLeft: 2, paddingTop: 1, paddingBottom: 1, flexDirection: "column", width: "100%" }, formatThinkText(finalContent, columns))) : /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, marginTop: 0, width: "100%" }, /* @__PURE__ */ React4.createElement(CodeRenderer, { text: finalContent.replace(/ \|\n\n/g, " |\n"), columns, theme }), msg.memoryUpdated && /* @__PURE__ */ React4.createElement(Box3, { marginTop: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.text, italic: true }, "[Memory Updated]")), msg.role === "agent" && msg.workedDuration ? /* @__PURE__ */ React4.createElement(Box3, { marginTop: 1, marginBottom: 2, width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.textMuted }, "["), /* @__PURE__ */ React4.createElement(Text4, { color: colors.textMuted }, "Worked for ", /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: colors.text }, formatThinkingDuration(msg.workedDuration))), /* @__PURE__ */ React4.createElement(Text4, { color: colors.textMuted }, "]")) : null));
|
|
4780
5422
|
});
|
|
4781
|
-
BlockItem = React4.memo(({ block, columns = 80, showFullThinking, aiProvider, version }) => {
|
|
5423
|
+
BlockItem = React4.memo(({ block, columns = 80, showFullThinking, aiProvider, version, theme = "Dark" }) => {
|
|
5424
|
+
const colors = getThemeColors(theme);
|
|
4782
5425
|
const { msg, type, text, isStreamingMsg, workedDuration } = block;
|
|
4783
5426
|
if (type === "chunk") {
|
|
4784
5427
|
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", width: "100%" }, block.blocks.map((b) => /* @__PURE__ */ React4.createElement(
|
|
@@ -4789,7 +5432,8 @@ var init_ChatLayout = __esm({
|
|
|
4789
5432
|
columns,
|
|
4790
5433
|
showFullThinking,
|
|
4791
5434
|
aiProvider,
|
|
4792
|
-
version
|
|
5435
|
+
version,
|
|
5436
|
+
theme
|
|
4793
5437
|
}
|
|
4794
5438
|
)));
|
|
4795
5439
|
}
|
|
@@ -4801,17 +5445,18 @@ var init_ChatLayout = __esm({
|
|
|
4801
5445
|
showFullThinking,
|
|
4802
5446
|
columns,
|
|
4803
5447
|
aiProvider,
|
|
4804
|
-
version
|
|
5448
|
+
version,
|
|
5449
|
+
theme
|
|
4805
5450
|
}
|
|
4806
5451
|
);
|
|
4807
5452
|
}
|
|
4808
5453
|
if (type === "think-header") {
|
|
4809
|
-
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: "100%", marginTop: 0, marginBottom: 0 }, isStreamingMsg ? /* @__PURE__ */ React4.createElement(Text4, { bold: true, color:
|
|
5454
|
+
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: "100%", marginTop: 0, marginBottom: 0 }, isStreamingMsg ? /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: colors.text }, "\u2727 Thinking...") : /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: colors.text }, "\u2726 Thought..."), showFullThinking && /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "row", width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.textMuted }, "\u2502 ")));
|
|
4810
5455
|
}
|
|
4811
5456
|
if (type === "think-line") {
|
|
4812
5457
|
if (!showFullThinking) return null;
|
|
4813
5458
|
if (!text || text.trim() === "") {
|
|
4814
|
-
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "row", width: "100%", paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color:
|
|
5459
|
+
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "row", width: "100%", paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.textMuted }, "\u2502 "));
|
|
4815
5460
|
}
|
|
4816
5461
|
const animatedText = useStreamingText(text, isStreamingMsg, block.isActiveBlock);
|
|
4817
5462
|
const trimmed = animatedText.trim();
|
|
@@ -4827,32 +5472,33 @@ var init_ChatLayout = __esm({
|
|
|
4827
5472
|
content = wrapText(animatedText, columns - 10);
|
|
4828
5473
|
}
|
|
4829
5474
|
const wrappedLines = content.split("\n");
|
|
4830
|
-
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: "100%" }, wrappedLines.map((wLine, idx) => /* @__PURE__ */ React4.createElement(Box3, { key: idx, flexDirection: "row", width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, { color:
|
|
5475
|
+
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: "100%" }, wrappedLines.map((wLine, idx) => /* @__PURE__ */ React4.createElement(Box3, { key: idx, flexDirection: "row", width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.textMuted }, "\u2502 "), /* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1, marginLeft: 1 }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: wLine, color: colors.textMuted, italic: true, theme })))));
|
|
4831
5476
|
}
|
|
4832
5477
|
if (type === "think-footer-padding") {
|
|
4833
5478
|
if (!showFullThinking) return null;
|
|
4834
|
-
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "row", width: "100%", paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color:
|
|
5479
|
+
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "row", width: "100%", paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.textMuted }, "\u2502 "));
|
|
4835
5480
|
}
|
|
4836
5481
|
if (type === "agent-line") {
|
|
4837
5482
|
if (!text || text.trim() === "") {
|
|
4838
5483
|
return /* @__PURE__ */ React4.createElement(Box3, { height: 1 });
|
|
4839
5484
|
}
|
|
4840
5485
|
const animatedText = useStreamingText(text, isStreamingMsg, block.isActiveBlock);
|
|
4841
|
-
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(CodeRenderer, { text: animatedText, columns }));
|
|
5486
|
+
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(CodeRenderer, { text: animatedText, columns, theme }));
|
|
4842
5487
|
}
|
|
4843
5488
|
if (type === "table") {
|
|
4844
|
-
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(TableRenderer, { buffer: text.split("\n"), terminalWidth: columns }));
|
|
5489
|
+
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(TableRenderer, { buffer: text.split("\n"), terminalWidth: columns, theme }));
|
|
4845
5490
|
}
|
|
4846
5491
|
if (type === "diff-line") {
|
|
4847
5492
|
const { isFirstLine, isLastLine } = block;
|
|
4848
|
-
const renderPaddingLine = (isEnd = false) => /* @__PURE__ */ React4.createElement(Box3, { backgroundColor:
|
|
5493
|
+
const renderPaddingLine = (isEnd = false) => /* @__PURE__ */ React4.createElement(Box3, { backgroundColor: colors.codeBg, paddingX: 1, width: columns, marginBottom: isEnd ? 1 : 0 }, /* @__PURE__ */ React4.createElement(Box3, { width: 3, flexShrink: 0 }), /* @__PURE__ */ React4.createElement(Box3, { width: 1, flexShrink: 0, marginLeft: 1 }), /* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1, marginLeft: 1 }, /* @__PURE__ */ React4.createElement(Text4, null, " ")));
|
|
4849
5494
|
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column" }, isFirstLine && renderPaddingLine(false), /* @__PURE__ */ React4.createElement(
|
|
4850
5495
|
DiffLine,
|
|
4851
5496
|
{
|
|
4852
5497
|
line: text,
|
|
4853
5498
|
pairContent: block.pairContent,
|
|
4854
5499
|
parentText: void 0,
|
|
4855
|
-
columns
|
|
5500
|
+
columns,
|
|
5501
|
+
theme
|
|
4856
5502
|
}
|
|
4857
5503
|
), isLastLine && renderPaddingLine(true));
|
|
4858
5504
|
}
|
|
@@ -4863,7 +5509,7 @@ var init_ChatLayout = __esm({
|
|
|
4863
5509
|
borderRight: false,
|
|
4864
5510
|
borderTop: false,
|
|
4865
5511
|
borderBottom: false,
|
|
4866
|
-
borderColor:
|
|
5512
|
+
borderColor: colors.codeBorder,
|
|
4867
5513
|
paddingLeft: 2,
|
|
4868
5514
|
width: "100%"
|
|
4869
5515
|
};
|
|
@@ -4880,12 +5526,12 @@ var init_ChatLayout = __esm({
|
|
|
4880
5526
|
borderRight: false,
|
|
4881
5527
|
borderTop: false,
|
|
4882
5528
|
borderBottom: false,
|
|
4883
|
-
borderColor:
|
|
5529
|
+
borderColor: colors.codeBorder,
|
|
4884
5530
|
paddingLeft: 2,
|
|
4885
5531
|
width: "100%"
|
|
4886
5532
|
},
|
|
4887
5533
|
/* @__PURE__ */ React4.createElement(Box3, { width: 5, flexShrink: 0 }, /* @__PURE__ */ React4.createElement(Text4, { color: "gray", dimColor: true }, String(lineNum).padStart(4, " "), " ")),
|
|
4888
|
-
/* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1 }, renderHighlightedLine(text, lang,
|
|
5534
|
+
/* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1 }, renderHighlightedLine(text, lang, colors.text))
|
|
4889
5535
|
);
|
|
4890
5536
|
}
|
|
4891
5537
|
if (type === "code-fence-close") {
|
|
@@ -4898,7 +5544,7 @@ var init_ChatLayout = __esm({
|
|
|
4898
5544
|
borderRight: false,
|
|
4899
5545
|
borderTop: false,
|
|
4900
5546
|
borderBottom: false,
|
|
4901
|
-
borderColor:
|
|
5547
|
+
borderColor: colors.codeBorder,
|
|
4902
5548
|
paddingLeft: 2,
|
|
4903
5549
|
marginBottom: 1,
|
|
4904
5550
|
width: "100%"
|
|
@@ -4907,7 +5553,7 @@ var init_ChatLayout = __esm({
|
|
|
4907
5553
|
);
|
|
4908
5554
|
}
|
|
4909
5555
|
if (type === "write-header") {
|
|
4910
|
-
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: columns }, /* @__PURE__ */ React4.createElement(MarkdownText, { text, columns }));
|
|
5556
|
+
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: columns }, /* @__PURE__ */ React4.createElement(MarkdownText, { text, columns, theme }));
|
|
4911
5557
|
}
|
|
4912
5558
|
if (type === "write-line") {
|
|
4913
5559
|
const { gutterWidth, lineNum, isFirstLine, isLastLine, extension, wrappedLines } = block;
|
|
@@ -4921,10 +5567,10 @@ var init_ChatLayout = __esm({
|
|
|
4921
5567
|
borderRight: false,
|
|
4922
5568
|
borderTop: false,
|
|
4923
5569
|
borderBottom: false,
|
|
4924
|
-
borderColor:
|
|
5570
|
+
borderColor: colors.codeBorder,
|
|
4925
5571
|
paddingLeft: 2,
|
|
4926
5572
|
paddingRight: 0,
|
|
4927
|
-
backgroundColor:
|
|
5573
|
+
backgroundColor: colors.codeBg,
|
|
4928
5574
|
marginBottom: isEnd ? 1 : 0
|
|
4929
5575
|
},
|
|
4930
5576
|
/* @__PURE__ */ React4.createElement(Box3, { width: gutterWidth + 2, flexShrink: 0 }, /* @__PURE__ */ React4.createElement(Text4, null, " ".repeat(gutterWidth + 2))),
|
|
@@ -4940,24 +5586,24 @@ var init_ChatLayout = __esm({
|
|
|
4940
5586
|
borderRight: false,
|
|
4941
5587
|
borderTop: false,
|
|
4942
5588
|
borderBottom: false,
|
|
4943
|
-
borderColor:
|
|
5589
|
+
borderColor: colors.codeBorder,
|
|
4944
5590
|
paddingLeft: 2,
|
|
4945
5591
|
paddingRight: 0,
|
|
4946
|
-
backgroundColor:
|
|
5592
|
+
backgroundColor: colors.codeBg
|
|
4947
5593
|
},
|
|
4948
5594
|
/* @__PURE__ */ React4.createElement(Box3, { width: gutterWidth + 2, flexShrink: 0 }, /* @__PURE__ */ React4.createElement(Text4, { color: "gray", dimColor: true }, String(lineNum).padStart(gutterWidth, " "), " ")),
|
|
4949
|
-
/* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1, flexDirection: "column" }, (wrappedLines || [text]).map((wl, idx) => /* @__PURE__ */ React4.createElement(Box3, { key: idx }, renderHighlightedLine(wl, extension,
|
|
5595
|
+
/* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1, flexDirection: "column" }, (wrappedLines || [text]).map((wl, idx) => /* @__PURE__ */ React4.createElement(Box3, { key: idx }, renderHighlightedLine(wl, extension, colors.text))))
|
|
4950
5596
|
), isLastLine && renderPaddingLine(true));
|
|
4951
5597
|
}
|
|
4952
5598
|
if (type === "write-footer") {
|
|
4953
|
-
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: columns, marginTop: 1, marginBottom: 1 }, /* @__PURE__ */ React4.createElement(MarkdownText, { text, columns }));
|
|
5599
|
+
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: columns, marginTop: 1, marginBottom: 1 }, /* @__PURE__ */ React4.createElement(MarkdownText, { text, columns, theme }));
|
|
4954
5600
|
}
|
|
4955
5601
|
if (type === "worked-duration") {
|
|
4956
|
-
return /* @__PURE__ */ React4.createElement(Box3, { marginTop: 1, marginBottom: 2, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Text4,
|
|
5602
|
+
return /* @__PURE__ */ React4.createElement(Box3, { marginTop: 1, marginBottom: 2, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.textMuted }, "["), /* @__PURE__ */ React4.createElement(Text4, { color: colors.textMuted }, "Worked for ", /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: colors.text }, formatThinkingDuration(workedDuration))), /* @__PURE__ */ React4.createElement(Text4, { color: colors.textMuted }, "]"));
|
|
4957
5603
|
}
|
|
4958
5604
|
return null;
|
|
4959
5605
|
});
|
|
4960
|
-
ChatLayout = React4.memo(({ messages, showFullThinking, columns = 80, aiProvider, version }) => {
|
|
5606
|
+
ChatLayout = React4.memo(({ messages, showFullThinking, columns = 80, aiProvider, version, theme = "Dark" }) => {
|
|
4961
5607
|
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", width: "100%" }, messages.map((msg, idx) => /* @__PURE__ */ React4.createElement(
|
|
4962
5608
|
MessageItem,
|
|
4963
5609
|
{
|
|
@@ -4966,7 +5612,8 @@ var init_ChatLayout = __esm({
|
|
|
4966
5612
|
showFullThinking,
|
|
4967
5613
|
columns,
|
|
4968
5614
|
aiProvider,
|
|
4969
|
-
version
|
|
5615
|
+
version,
|
|
5616
|
+
theme
|
|
4970
5617
|
}
|
|
4971
5618
|
)));
|
|
4972
5619
|
});
|
|
@@ -4986,6 +5633,7 @@ var activeGetMemoryInfo, getLatencyColor, StatusBar, StatusBar_default;
|
|
|
4986
5633
|
var init_StatusBar = __esm({
|
|
4987
5634
|
"src/components/StatusBar.jsx"() {
|
|
4988
5635
|
init_text();
|
|
5636
|
+
init_theme();
|
|
4989
5637
|
activeGetMemoryInfo = null;
|
|
4990
5638
|
getLatencyColor = (delay) => {
|
|
4991
5639
|
if (delay <= 370) return "#00a564";
|
|
@@ -5024,14 +5672,58 @@ var init_StatusBar = __esm({
|
|
|
5024
5672
|
}
|
|
5025
5673
|
return "#ff0000";
|
|
5026
5674
|
};
|
|
5027
|
-
StatusBar = React5.memo(({ mode, thinkingLevel, tokens = "0.0k", tokensTotal = "0.0k", chatId = "NEW-SESSION", isMemoryEnabled = true, apiTier = "Free", aiProvider = "Google", activeModel = "", isProcessing = false, lastChunkTime = 0 }) => {
|
|
5675
|
+
StatusBar = React5.memo(({ mode, thinkingLevel, tokens = "0.0k", tokensTotal = "0.0k", chatId = "NEW-SESSION", isMemoryEnabled = true, apiTier = "Free", aiProvider = "Google", activeModel = "", isProcessing = false, lastChunkTime = 0, theme = "Dark", wps = 0, showTPMEstimate = false }) => {
|
|
5676
|
+
const colors = getThemeColors(theme);
|
|
5028
5677
|
const modeIcon = mode === "Flux" ? "" : "";
|
|
5029
5678
|
const [memoryUsage, setMemoryUsage] = useState5(0);
|
|
5030
5679
|
const [memoryLimit, setMemoryLimit] = useState5(0);
|
|
5031
5680
|
const [memoryUnit, setMemoryUnit] = useState5("MB");
|
|
5032
5681
|
const [dotColor, setDotColor] = useState5("green");
|
|
5682
|
+
const [displayedWps, setDisplayedWps] = useState5(0);
|
|
5033
5683
|
const chunkTimesRef = useRef3([]);
|
|
5034
5684
|
const smoothedDelayRef = useRef3(370);
|
|
5685
|
+
const wpsHistoryRef = useRef3([]);
|
|
5686
|
+
const lastChunkTimeRef = useRef3(lastChunkTime);
|
|
5687
|
+
useEffect4(() => {
|
|
5688
|
+
lastChunkTimeRef.current = lastChunkTime;
|
|
5689
|
+
}, [lastChunkTime]);
|
|
5690
|
+
useEffect4(() => {
|
|
5691
|
+
if (!isProcessing) {
|
|
5692
|
+
wpsHistoryRef.current = [];
|
|
5693
|
+
return;
|
|
5694
|
+
}
|
|
5695
|
+
if (wps > 0) {
|
|
5696
|
+
const history = wpsHistoryRef.current;
|
|
5697
|
+
history.push(wps);
|
|
5698
|
+
if (history.length > 3) {
|
|
5699
|
+
history.shift();
|
|
5700
|
+
}
|
|
5701
|
+
}
|
|
5702
|
+
}, [isProcessing, wps, lastChunkTime]);
|
|
5703
|
+
useEffect4(() => {
|
|
5704
|
+
if (!isProcessing) {
|
|
5705
|
+
setDisplayedWps(0);
|
|
5706
|
+
return;
|
|
5707
|
+
}
|
|
5708
|
+
const timer = setInterval(() => {
|
|
5709
|
+
const lastTime = lastChunkTimeRef.current;
|
|
5710
|
+
const timeSinceLast = lastTime > 0 ? Date.now() - lastTime : 0;
|
|
5711
|
+
const isStalled = lastTime > 0 && timeSinceLast > 2500;
|
|
5712
|
+
if (isStalled) {
|
|
5713
|
+
setDisplayedWps(0);
|
|
5714
|
+
} else {
|
|
5715
|
+
const history = wpsHistoryRef.current;
|
|
5716
|
+
if (history.length > 0) {
|
|
5717
|
+
const sum = history.reduce((acc, val) => acc + val, 0);
|
|
5718
|
+
const avg = Math.round(sum / history.length * 10) / 10;
|
|
5719
|
+
setDisplayedWps(avg);
|
|
5720
|
+
} else if (wps > 0) {
|
|
5721
|
+
setDisplayedWps(wps);
|
|
5722
|
+
}
|
|
5723
|
+
}
|
|
5724
|
+
}, 1350);
|
|
5725
|
+
return () => clearInterval(timer);
|
|
5726
|
+
}, [isProcessing]);
|
|
5035
5727
|
useEffect4(() => {
|
|
5036
5728
|
if (!isProcessing) {
|
|
5037
5729
|
chunkTimesRef.current = [];
|
|
@@ -5112,13 +5804,12 @@ var init_StatusBar = __esm({
|
|
|
5112
5804
|
paddingX: 1,
|
|
5113
5805
|
width: "100%"
|
|
5114
5806
|
},
|
|
5115
|
-
/* @__PURE__ */ React5.createElement(Box4, null, /* @__PURE__ */ React5.createElement(Box4, { marginRight: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color:
|
|
5116
|
-
/* @__PURE__ */ React5.createElement(Box4, {
|
|
5117
|
-
/* @__PURE__ */ React5.createElement(Box4, null, isProcessing ? /* @__PURE__ */ React5.createElement(Box4, { marginRight: 0 }, /* @__PURE__ */ React5.createElement(Text5, { color: dotColor }, "\u25CF")) : /* @__PURE__ */ React5.createElement(Text5, null, " "), /* @__PURE__ */ React5.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: "white" }, formatTokens(tokensTotal), " ", (() => {
|
|
5807
|
+
/* @__PURE__ */ React5.createElement(Box4, null, /* @__PURE__ */ React5.createElement(Box4, { marginRight: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: colors.text, bold: true }, mode.toUpperCase())), /* @__PURE__ */ React5.createElement(Text5, { color: colors.textMuted, dimColor: true }, "\u2503"), /* @__PURE__ */ React5.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: colors.text, italic: true }, truncatePath(process.cwd(), 35))), isMemoryEnabled && /* @__PURE__ */ React5.createElement(Box4, { flexDirection: "row" }, /* @__PURE__ */ React5.createElement(Text5, { color: colors.textMuted, dimColor: true }, "\u2503"), /* @__PURE__ */ React5.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: colors.text, dimColor: true, bold: true }, "MEMORY")))),
|
|
5808
|
+
/* @__PURE__ */ React5.createElement(Box4, null, isProcessing ? /* @__PURE__ */ React5.createElement(Box4, null, /* @__PURE__ */ React5.createElement(Text5, { color: dotColor }, "\u25CF"), showTPMEstimate && /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(Text5, { color: colors.textMuted, bold: true }, " ", displayedWps, " tps"), /* @__PURE__ */ React5.createElement(Text5, { color: colors.textMuted, dimColor: true }, " \u2503"))) : null, /* @__PURE__ */ React5.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: colors.text }, formatTokens(tokensTotal), " ", (() => {
|
|
5118
5809
|
const pct = tokens / maxLimit * 100;
|
|
5119
|
-
const color = pct < 60 ?
|
|
5810
|
+
const color = pct < 60 ? colors.text : pct < 80 ? colors.warning : colors.danger;
|
|
5120
5811
|
return /* @__PURE__ */ React5.createElement(Text5, { color, dimColor: true }, pct.toFixed(0), "%");
|
|
5121
|
-
})())), /* @__PURE__ */ React5.createElement(Text5, { color:
|
|
5812
|
+
})())), /* @__PURE__ */ React5.createElement(Text5, { color: colors.textMuted, dimColor: true }, "\u2503"), /* @__PURE__ */ React5.createElement(Box4, { marginLeft: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: colors.textMuted, bold: true }, memoryUsage, "/", memoryLimit, " ", memoryUnit), (apiTier === "Custom" || apiTier === "Paid") && /* @__PURE__ */ React5.createElement(Box4, null, /* @__PURE__ */ React5.createElement(Text5, { color: colors.textMuted, dimColor: true }, " \u2503 "), /* @__PURE__ */ React5.createElement(Text5, { color: colors.textMuted, bold: true }, "PAID"))))
|
|
5122
5813
|
);
|
|
5123
5814
|
});
|
|
5124
5815
|
StatusBar_default = StatusBar;
|
|
@@ -5129,46 +5820,49 @@ var init_StatusBar = __esm({
|
|
|
5129
5820
|
import React6 from "react";
|
|
5130
5821
|
import { Box as Box5, Text as Text6 } from "ink";
|
|
5131
5822
|
import SelectInput from "ink-select-input";
|
|
5132
|
-
function CommandMenu({ title, subtitle, items, onSelect }) {
|
|
5823
|
+
function CommandMenu({ title, subtitle, items, onSelect, theme = "Dark" }) {
|
|
5824
|
+
const colors = getThemeColors(theme);
|
|
5133
5825
|
return /* @__PURE__ */ React6.createElement(
|
|
5134
5826
|
Box5,
|
|
5135
5827
|
{
|
|
5136
5828
|
flexDirection: "column",
|
|
5137
5829
|
borderStyle: "round",
|
|
5138
|
-
borderColor:
|
|
5830
|
+
borderColor: colors.borderMuted,
|
|
5139
5831
|
padding: 0,
|
|
5140
5832
|
marginTop: 0,
|
|
5141
5833
|
flexShrink: 0,
|
|
5142
5834
|
width: "100%"
|
|
5143
5835
|
},
|
|
5144
|
-
title && /* @__PURE__ */ React6.createElement(Box5, { paddingX: 1, paddingY: 0, marginBottom: subtitle ? 0 : 1 }, /* @__PURE__ */ React6.createElement(Text6, { color:
|
|
5145
|
-
subtitle && /* @__PURE__ */ React6.createElement(Box5, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React6.createElement(Text6, { color:
|
|
5836
|
+
title && /* @__PURE__ */ React6.createElement(Box5, { paddingX: 1, paddingY: 0, marginBottom: subtitle ? 0 : 1 }, /* @__PURE__ */ React6.createElement(Text6, { color: colors.text, bold: true }, typeof title === "string" ? title.toUpperCase() : title)),
|
|
5837
|
+
subtitle && /* @__PURE__ */ React6.createElement(Box5, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React6.createElement(Text6, { color: colors.textMuted, italic: true }, " ", subtitle)),
|
|
5146
5838
|
/* @__PURE__ */ React6.createElement(Box5, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React6.createElement(
|
|
5147
5839
|
SelectInput,
|
|
5148
5840
|
{
|
|
5149
5841
|
items,
|
|
5150
5842
|
onSelect,
|
|
5151
|
-
itemComponent: CustomItem,
|
|
5843
|
+
itemComponent: (props) => /* @__PURE__ */ React6.createElement(CustomItem, { ...props, theme }),
|
|
5152
5844
|
indicatorComponent: () => null
|
|
5153
5845
|
}
|
|
5154
5846
|
)),
|
|
5155
|
-
/* @__PURE__ */ React6.createElement(Box5, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React6.createElement(Text6, { color:
|
|
5847
|
+
/* @__PURE__ */ React6.createElement(Box5, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React6.createElement(Text6, { color: colors.textMuted, italic: true }, "(Arrows to select \u2022 Enter to confirm)"))
|
|
5156
5848
|
);
|
|
5157
5849
|
}
|
|
5158
5850
|
var CustomItem;
|
|
5159
5851
|
var init_CommandMenu = __esm({
|
|
5160
5852
|
"src/components/CommandMenu.jsx"() {
|
|
5161
|
-
|
|
5853
|
+
init_theme();
|
|
5854
|
+
CustomItem = ({ label, isSelected, theme = "Dark" }) => {
|
|
5855
|
+
const colors = getThemeColors(theme);
|
|
5162
5856
|
const isCancel = label === "Cancel" || label === "Back" || label.toLowerCase().includes("exit") || label.toLowerCase().includes("back");
|
|
5163
5857
|
return /* @__PURE__ */ React6.createElement(
|
|
5164
5858
|
Box5,
|
|
5165
5859
|
{
|
|
5166
5860
|
marginTop: isCancel ? 1 : 0,
|
|
5167
|
-
backgroundColor: isSelected ?
|
|
5861
|
+
backgroundColor: isSelected ? colors.highlightBg : void 0,
|
|
5168
5862
|
paddingX: 1,
|
|
5169
5863
|
width: "100%"
|
|
5170
5864
|
},
|
|
5171
|
-
/* @__PURE__ */ React6.createElement(Text6, { color: isSelected ?
|
|
5865
|
+
/* @__PURE__ */ React6.createElement(Text6, { color: isSelected ? colors.text : colors.textMuted, bold: isSelected }, isSelected ? "\u276F " : " ", label)
|
|
5172
5866
|
);
|
|
5173
5867
|
};
|
|
5174
5868
|
}
|
|
@@ -5352,17 +6046,18 @@ ${mode === "Flux" ? "- **File Tools >> Code in chat**\n\n" : ""}- COMMUNICATION
|
|
|
5352
6046
|
${mode === "Flux" ? `- WORKSPACE TOOLS (path = relative to CWD & WILL BE FIRST ARGUMENT, path separator: '/') -
|
|
5353
6047
|
1. [tool:functions.ReadFile(path="...", startLine=number, endLine=number)]. ${aiProvider !== "Google" ? `${isMultiModal ? `Supports images/docs. **User gives image/doc: VIEW FIRST**` : `No Multimodal support`}` : `Supports images/docs. **User gives image/doc: VIEW FIRST**`}
|
|
5354
6048
|
2. [tool:functions.ReadFolder(path="...")]. Detailed DIR stats including File Sizes
|
|
5355
|
-
3. [tool:functions.FileMap(path="path/file")]. Shows file structure, functions, class, import/export,
|
|
5356
|
-
4. [tool:functions.PatchFile(path="...", replaceContent1="full line/block", newContent1="...", ...MAX
|
|
6049
|
+
3. [tool:functions.FileMap(path="path/file")]. Shows file structure, functions, class, import/export, variables
|
|
6050
|
+
4. [tool:functions.PatchFile(path="...", replaceContent1="full line/block", newContent1="...", ...MAX 10)]. Surgical Patch. **Multiple patch on same file/path? Use replaceContent2, newContent2 etc >>> multiple spams**. Unsure? ReadFile >> guessing. **MUST VERIFY DIFF**
|
|
5357
6051
|
5. [tool:functions.WriteFile(path="...", content="...")]. Creates/Overwrites. File Exist? PatchFile > WriteFile. Verify Imports
|
|
5358
|
-
6. [tool:functions.SearchKeyword(keyword="...", file="optional", subString="true/false optional", regex="optional, false for keyword")]. Global project search. If 'file' is provided, searches only that file. Finds definitions/logic without reading every file. Usage: Can search for relevent lines/logic area to read specifically for edit. defaults subString: false, regex:
|
|
6052
|
+
6. [tool:functions.SearchKeyword(keyword="...", file="optional", subString="true/false optional", regex="optional, false for keyword")]. Global project search. If 'file' is provided, searches only that file. Finds definitions/logic without reading every file. Usage: Can search for relevent lines/logic area to read specifically for edit. defaults subString: false, regex: true
|
|
5359
6053
|
7. [tool:functions.Run(command="...")]. Runs ${osDetected === "Windows" ? isPsAvailable() ? `WINDOWS POWERSHELL ONLY` : `WINDOWS CMD ONLY` : `BASH`} command. Destructive/Irreversible ops \u2192 Ask user
|
|
5360
6054
|
8. [tool:functions.Todo(method="create/append/get", tasks=[ARRAY OF STRINGS], markDone=[ARRAY OF TASK STRINGS])]. Task List, NO Markdown IN ARRAY. USAGE: ANALYZE USER REQUEST **IF** MULTIPLE TASK \u2192 BREAK DOWN TASK \u2192 CREATE TODO **BEFORE** DIVING IN. 'tasks' & 'markDone' OPTIONAL PARAMETERS WITH method 'get'. USE 'get' method WITH 'markDone' to mark task completed OR markDone with 'create' to create completed tasks. **EVERY TURN UPDATE POLICY**
|
|
5361
6055
|
9. [tool:functions.Await(time="seconds")]. For waiting without exiting agent loop, 15s - 180s
|
|
5362
6056
|
${advanceRollback ? `
|
|
5363
6057
|
- EMERGENCY SAFETY TOOLS -
|
|
5364
6058
|
Info: 'initial' = user prompted for THIS active task, revert 'id' should be a turn BEFORE the disaster tool ran eg. Disaster Tool: "turn_3", Revert ID: "turn_2" (do explicit reasoning if needed)
|
|
5365
|
-
1. [tool:functions.EmergencyRollback(method="getCheckpoint/forceRevert", id="...")]. Rollback workspace to a specific checkpoint in THIS agent loop
|
|
6059
|
+
1. [tool:functions.EmergencyRollback(method="getCheckpoint/forceRevert", id="...")]. Rollback workspace to a specific checkpoint in THIS agent loop
|
|
6060
|
+
Usage: ONLY in catastrophic situations/Codebase Corruption. Verify nothing catastrophic happened in codebase before ending agent loop. 'id' not needed with getCheckPoint
|
|
5366
6061
|
` : ""}
|
|
5367
6062
|
- SUB AGENT TOOLS -
|
|
5368
6063
|
**PROACTIVE USE OF SUB AGENTS HIGHLY RECOMMENDED, PREFER USING FOR ALL TASK WHERE EVEN SLIGHTLY BENEFICIAL, EVEN WITHOUT EXPLICIT USER NUDGE**
|
|
@@ -5370,16 +6065,16 @@ Invocation Types:
|
|
|
5370
6065
|
- Invoke (async, background worker for parallel tasks, upto 7 parallel agents together). Usage: Benefits parallelism & speed. Can take long time, If invoked DO NOT REPEAT SAME TASK WHILE ACTIVE
|
|
5371
6066
|
- InvokeSync (sync, blocking main agent loop). Usage: Repeatetive work, Sequential tasks, Task delegation. Tokens/Costs savings
|
|
5372
6067
|
1. [agent:generalist.InvokeSync/Invoke(title="...", task="...")]. Task must me detailed, including exact file paths, imports/exports, dependency, folder structure
|
|
5373
|
-
2. [agent:generalist.GetProgress(id="...")]. Usage: Check progress of async subagent task, taking time? continue your task, MUST await (exponentially longer after 1st check) than spamming getProgress. NEVER FINISH WITHOUT 'AWAIT' WHILE SUBAGENT WORKING
|
|
6068
|
+
2. [agent:generalist.GetProgress(id="...")]. Usage: Check progress of async subagent task, taking time? continue your task, MUST await (exponentially longer after 1st check) than spamming getProgress. NEVER FINISH WITHOUT 'AWAIT' WHILE SUBAGENT IS WORKING. DO NOT SPAM 'GetProgress'
|
|
5374
6069
|
3. [agent:generalist.Cancel(id="...")]. Usage: Cancel async subagent task, LAST RESORT ONLY IF ITS STUCK FOR UNUSUALLY LONG (2m+) WITH NO PROGRESS`.trim() : `- CREATIVE TOOLS (path = relative to CWD & WILL BE FIRST ARGUMENT, path separator: '/') -
|
|
5375
|
-
1. [tool:functions.WritePDF(path="...", content="...", orientation="...")]. PROACTIVE A4 PAGE BREAKS MUST IN CSS. HTML/CSS for PREMIUM layout
|
|
5376
|
-
2. [tool:functions.WriteDoc(path="...", content="...")]. A4 Word document
|
|
6070
|
+
1. [tool:functions.WritePDF(path="...", content="...", orientation="...")]. PROACTIVE A4 PAGE BREAKS MUST IN CSS. HTML/CSS for PREMIUM layout, stable margins & headers/footers, NO WATERMARKS
|
|
6071
|
+
2. [tool:functions.WriteDoc(path="...", content="...")]. A4 Word document, NO WATERMARKS, stable margins & headers/footers
|
|
5377
6072
|
- WORKSPACE & SUB AGENT TOOLS ARE NOT AVAILABLE IN FLOW`.trim()}
|
|
5378
6073
|
|
|
5379
6074
|
- VERIFY TOOL RESULT CONTENTS. Fix errors. No hallucinations
|
|
5380
|
-
- Escape quotes: \\" for code strings
|
|
5381
|
-
- Literal escapes: Double-escape sequences (e.g., \\\\n)
|
|
5382
|
-
- File structure: Real newlines for code formatting
|
|
6075
|
+
- **Escape quotes: \\" for code strings**
|
|
6076
|
+
- **Literal escapes: Double-escape sequences (e.g., \\\\n)**
|
|
6077
|
+
- **File structure: Real newlines for code formatting**`.trim();
|
|
5383
6078
|
}
|
|
5384
6079
|
});
|
|
5385
6080
|
|
|
@@ -6104,6 +6799,18 @@ function SettingsMenu({
|
|
|
6104
6799
|
}, []);
|
|
6105
6800
|
const getCategoryItems = (catId) => {
|
|
6106
6801
|
switch (catId) {
|
|
6802
|
+
case "providers":
|
|
6803
|
+
return [
|
|
6804
|
+
{ label: "Current Provider", value: "aiProvider", status: aiProvider },
|
|
6805
|
+
{ label: "Key Strategy", value: "apiTier", status: apiTier === "Free" ? "Free" : quotas?.providerBudgets?.__useProvider ? "Paid" : "Paid" }
|
|
6806
|
+
];
|
|
6807
|
+
case "appearance":
|
|
6808
|
+
return [
|
|
6809
|
+
{ label: "Theme", value: "theme", status: systemSettings.theme || "Dark" },
|
|
6810
|
+
{ label: "Loading Phrases", value: "loadingPhrases", status: systemSettings.loadingPhrases !== false ? "ON" : "OFF" },
|
|
6811
|
+
{ label: "Progressive Rendering [EXPERIMENTAL]", value: "progressiveRendering", status: systemSettings.progressiveRendering ? "ON" : "OFF" },
|
|
6812
|
+
{ label: "Show TPM Estimate", value: "showTPMEstimate", status: systemSettings.showTPMEstimate ? "ON" : "OFF" }
|
|
6813
|
+
];
|
|
6107
6814
|
case "memory":
|
|
6108
6815
|
return [
|
|
6109
6816
|
{ label: "Toggle Memory", value: "memory", status: systemSettings.memory ? "ON" : "OFF" }
|
|
@@ -6126,15 +6833,11 @@ function SettingsMenu({
|
|
|
6126
6833
|
case "updater":
|
|
6127
6834
|
return [
|
|
6128
6835
|
{ label: "Auto-Update", value: "autoUpdate", status: systemSettings.autoUpdate ? "ON" : "OFF" },
|
|
6129
|
-
{ label: "Preferred
|
|
6836
|
+
{ label: "Preferred Package Manager", value: "updateManager", status: (systemSettings.updateManager || "npm") === "custom" ? "Custom" : (systemSettings.updateManager || "npm").toUpperCase() }
|
|
6130
6837
|
];
|
|
6131
6838
|
case "other":
|
|
6132
6839
|
return [
|
|
6133
|
-
{ label: "Current Provider", value: "aiProvider", status: aiProvider },
|
|
6134
|
-
{ label: "Key Strategy", value: "apiTier", status: apiTier === "Free" ? "Free" : quotas?.providerBudgets?.__useProvider ? "Paid" : "Paid" },
|
|
6135
6840
|
{ label: "Preserve Thinking", value: "preserveThinking", status: systemSettings.preserveThinking !== false ? "ON" : "OFF" },
|
|
6136
|
-
{ label: "Loading Phrases", value: "loadingPhrases", status: systemSettings.loadingPhrases !== false ? "ON" : "OFF" },
|
|
6137
|
-
{ label: "Progressive Rendering [EXPERIMENTAL]", value: "progressiveRendering", status: systemSettings.progressiveRendering ? "ON" : "OFF" },
|
|
6138
6841
|
{ label: "Download Language Parsers", value: "parserDownload", status: "ACTION" }
|
|
6139
6842
|
];
|
|
6140
6843
|
default:
|
|
@@ -6309,30 +7012,47 @@ function SettingsMenu({
|
|
|
6309
7012
|
saveSettings2({ systemSettings: newSysSettings, apiTier, quotas });
|
|
6310
7013
|
return newSysSettings;
|
|
6311
7014
|
});
|
|
7015
|
+
} else if (item.value === "showTPMEstimate") {
|
|
7016
|
+
setSystemSettings((s) => {
|
|
7017
|
+
const newSysSettings = { ...s, showTPMEstimate: !s.showTPMEstimate };
|
|
7018
|
+
saveSettings2({ systemSettings: newSysSettings, apiTier, quotas });
|
|
7019
|
+
return newSysSettings;
|
|
7020
|
+
});
|
|
7021
|
+
} else if (item.value === "theme") {
|
|
7022
|
+
const options = ["Dark", "Light", "GitHub Dark", "GitHub Light", "Transparent Dark", "Transparent Light", "Chaos"];
|
|
7023
|
+
const activeTheme = systemSettings.theme === "Mystery" ? "Chaos" : systemSettings.theme || "Dark";
|
|
7024
|
+
const currentIndex = options.indexOf(activeTheme);
|
|
7025
|
+
const nextIndex = (currentIndex + 1) % options.length;
|
|
7026
|
+
setSystemSettings((s) => {
|
|
7027
|
+
const newSysSettings = { ...s, theme: options[nextIndex] };
|
|
7028
|
+
saveSettings2({ systemSettings: newSysSettings, apiTier, quotas });
|
|
7029
|
+
return newSysSettings;
|
|
7030
|
+
});
|
|
6312
7031
|
}
|
|
6313
7032
|
};
|
|
6314
|
-
|
|
7033
|
+
const colors = getThemeColors(systemSettings.theme);
|
|
7034
|
+
return /* @__PURE__ */ React7.createElement(Box6, { flexDirection: "column", borderStyle: "round", borderColor: colors.border, padding: 0, width: "100%", minHeight: 32 }, /* @__PURE__ */ React7.createElement(Box6, { paddingX: 1, paddingY: 0, marginBottom: 0, borderStyle: "single", borderColor: colors.borderMuted, width: "100%" }, /* @__PURE__ */ React7.createElement(Text7, { color: colors.text, bold: true }, "SYSTEM CONFIGURATION")), /* @__PURE__ */ React7.createElement(Box6, { flexDirection: "row", width: "100%", minHeight: 26 }, /* @__PURE__ */ React7.createElement(Box6, { flexDirection: "column", width: "30%", maxWidth: 40, borderStyle: "round", borderColor: activeColumn === "categories" ? colors.border : colors.borderMuted, padding: 1, paddingY: 0 }, /* @__PURE__ */ React7.createElement(Box6, { marginBottom: 1 }, /* @__PURE__ */ React7.createElement(Text7, { color: activeColumn === "categories" ? colors.text : colors.textDim, bold: true, underline: true }, "CATEGORIES")), CATEGORIES.map((cat, index) => {
|
|
6315
7035
|
const isSelected = selectedCategoryIndex === index;
|
|
6316
7036
|
const isExit = cat.id === "exit";
|
|
6317
7037
|
return /* @__PURE__ */ React7.createElement(
|
|
6318
7038
|
Box6,
|
|
6319
7039
|
{
|
|
6320
7040
|
key: cat.id,
|
|
6321
|
-
marginTop: isExit ?
|
|
6322
|
-
backgroundColor: isSelected ? activeColumn === "categories" ?
|
|
7041
|
+
marginTop: isExit ? 15 : 0,
|
|
7042
|
+
backgroundColor: isSelected ? activeColumn === "categories" ? colors.highlightBg : colors.cardBg : void 0,
|
|
6323
7043
|
paddingX: 1
|
|
6324
7044
|
},
|
|
6325
7045
|
/* @__PURE__ */ React7.createElement(
|
|
6326
7046
|
Text7,
|
|
6327
7047
|
{
|
|
6328
|
-
color: isSelected ? activeColumn === "categories" ?
|
|
7048
|
+
color: isSelected ? activeColumn === "categories" ? colors.text : colors.textDim : colors.textDim,
|
|
6329
7049
|
bold: isSelected
|
|
6330
7050
|
},
|
|
6331
7051
|
isSelected ? "\u276F " : " ",
|
|
6332
7052
|
cat.label
|
|
6333
7053
|
)
|
|
6334
7054
|
);
|
|
6335
|
-
})), /* @__PURE__ */ React7.createElement(Box6, { flexDirection: "column",
|
|
7055
|
+
})), /* @__PURE__ */ React7.createElement(Box6, { flexDirection: "column", flexGrow: 1, borderStyle: "round", borderColor: activeColumn === "items" ? colors.border : colors.borderMuted, paddingX: 1, marginLeft: 1, paddingY: 0 }, /* @__PURE__ */ React7.createElement(Box6, { marginBottom: 1 }, /* @__PURE__ */ React7.createElement(Text7, { color: activeColumn === "items" ? colors.text : colors.textDim, bold: true, underline: true }, CATEGORIES[selectedCategoryIndex].label.toUpperCase(), " SETTINGS")), currentItems.length > 0 ? (() => {
|
|
6336
7056
|
let lastSection = null;
|
|
6337
7057
|
const elements = [];
|
|
6338
7058
|
const getListItems = (val) => (val || "").split(",").map((s) => s.trim().toLowerCase()).filter(Boolean);
|
|
@@ -6350,13 +7070,13 @@ function SettingsMenu({
|
|
|
6350
7070
|
const getStatusColor = (item2) => {
|
|
6351
7071
|
if (currentCatId === "security") {
|
|
6352
7072
|
if ((item2.value === "autoExec" || item2.value === "externalAccess") && item2.status === "ON") {
|
|
6353
|
-
return
|
|
7073
|
+
return colors.statusOn;
|
|
6354
7074
|
}
|
|
6355
|
-
return
|
|
7075
|
+
return colors.statusOff;
|
|
6356
7076
|
}
|
|
6357
|
-
if (item2.status?.startsWith("\u2713")) return
|
|
6358
|
-
if (item2.status?.startsWith("\u26A0")) return
|
|
6359
|
-
return item2.status === "ON" ?
|
|
7077
|
+
if (item2.status?.startsWith("\u2713")) return colors.statusOn;
|
|
7078
|
+
if (item2.status?.startsWith("\u26A0")) return colors.statusOff;
|
|
7079
|
+
return item2.status === "ON" ? colors.statusOn : item2.status === "OFF" ? colors.statusOff : colors.text;
|
|
6360
7080
|
};
|
|
6361
7081
|
if (item.section && item.section !== lastSection) {
|
|
6362
7082
|
lastSection = item.section;
|
|
@@ -6368,10 +7088,10 @@ function SettingsMenu({
|
|
|
6368
7088
|
const isCommandListItem = item.value === "alwaysAsk" || item.value === "autoApprove" || item.value === "autoDisallow";
|
|
6369
7089
|
const isParserDownload = item.value === "parserDownload";
|
|
6370
7090
|
elements.push(
|
|
6371
|
-
/* @__PURE__ */ React7.createElement(Box6, { key: item.value, flexDirection: "column" }, /* @__PURE__ */ React7.createElement(Box6, { backgroundColor: isSelected && !isEditingThis ?
|
|
7091
|
+
/* @__PURE__ */ React7.createElement(Box6, { key: item.value, flexDirection: "column" }, /* @__PURE__ */ React7.createElement(Box6, { backgroundColor: isSelected && !isEditingThis ? colors.highlightBg : void 0, paddingX: 2 }, /* @__PURE__ */ React7.createElement(
|
|
6372
7092
|
Text7,
|
|
6373
7093
|
{
|
|
6374
|
-
color: isSelected ?
|
|
7094
|
+
color: isSelected ? colors.text : colors.textDim,
|
|
6375
7095
|
bold: isSelected
|
|
6376
7096
|
},
|
|
6377
7097
|
isSelected ? "\u276F " : " ",
|
|
@@ -6391,31 +7111,26 @@ function SettingsMenu({
|
|
|
6391
7111
|
)), /* @__PURE__ */ React7.createElement(Text7, { color: "gray", italic: true }, " Comma separated \u2022 Press Enter to save, Esc to cancel")))
|
|
6392
7112
|
);
|
|
6393
7113
|
});
|
|
6394
|
-
if (currentCatId === "other") {
|
|
6395
|
-
elements.push(
|
|
6396
|
-
/* @__PURE__ */ React7.createElement(Box6, { key: "pty-notice", marginTop: 14, paddingX: 1 }, /* @__PURE__ */ React7.createElement(Text7, { color: "white" }, isPtyAvailable ? "\u2713 Advance Interactive Terminal Supported" : "\u26A0 Interactive Terminal is Limited"))
|
|
6397
|
-
);
|
|
6398
|
-
elements.push(
|
|
6399
|
-
/* @__PURE__ */ React7.createElement(Box6, { key: "memory-load-2026", paddingX: 1 }, /* @__PURE__ */ React7.createElement(Text7, { color: "gray" }, "Memory Load: ", currentMemory, "/", maxMemory, " ", memoryUnit))
|
|
6400
|
-
);
|
|
6401
|
-
}
|
|
6402
7114
|
if (hasConflict) {
|
|
6403
7115
|
elements.push(
|
|
6404
|
-
/* @__PURE__ */ React7.createElement(Box6, { key: "conflict-warning", marginTop: 1, paddingX: 1 }, /* @__PURE__ */ React7.createElement(Text7, { color:
|
|
7116
|
+
/* @__PURE__ */ React7.createElement(Box6, { key: "conflict-warning", marginTop: 1, paddingX: 1 }, /* @__PURE__ */ React7.createElement(Text7, { color: colors.text, italic: true }, "* Conflicting commands will be ignored and defaulted to highest priority"))
|
|
6405
7117
|
);
|
|
6406
7118
|
}
|
|
6407
7119
|
return elements;
|
|
6408
|
-
})() : /* @__PURE__ */ React7.createElement(Box6, { paddingX: 1 }, /* @__PURE__ */ React7.createElement(Text7, { color: "gray", italic: true }, CATEGORIES[selectedCategoryIndex].desc)))), /* @__PURE__ */ React7.createElement(Box6, { paddingX: 1, marginTop: 0, flexDirection: "row", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(Text7, { color: "gray", italic: true }, activeColumn === "categories" ? "\u25B2\u25BC Select Category \u2022 Enter/\u25BA to configure" : "\u25B2\u25BC Select Option \u2022 Enter to Toggle \u2022 \u25C4/ESC to go back"), activeColumn === "categories" && /* @__PURE__ */ React7.createElement(Text7, { color: "gray" }, CATEGORIES[selectedCategoryIndex].desc)));
|
|
7120
|
+
})() : /* @__PURE__ */ React7.createElement(Box6, { paddingX: 1, flexDirection: "column", width: "100%" }, /* @__PURE__ */ React7.createElement(Text7, { color: "gray", italic: true }, CATEGORIES[selectedCategoryIndex].desc), currentCatId === "exit" && /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(Box6, { key: "pty-notice", marginTop: 19, paddingX: 0 }, /* @__PURE__ */ React7.createElement(Text7, { color: colors.text }, isPtyAvailable ? "\u2713 Advance Interactive Terminal Supported" : "\u26A0 Interactive Terminal is Limited")), /* @__PURE__ */ React7.createElement(Box6, { key: "memory-load-2026", paddingX: 0 }, /* @__PURE__ */ React7.createElement(Text7, { color: "gray" }, "Memory Load: ", currentMemory, "/", maxMemory, " ", memoryUnit)))))), /* @__PURE__ */ React7.createElement(Box6, { paddingX: 1, marginTop: 0, flexDirection: "row", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(Text7, { color: "gray", italic: true }, activeColumn === "categories" ? "\u25B2\u25BC Select Category \u2022 Enter/\u25BA to configure" : "\u25B2\u25BC Select Option \u2022 Enter to Toggle \u2022 \u25C4/ESC to go back"), activeColumn === "categories" && /* @__PURE__ */ React7.createElement(Text7, { color: "gray" }, CATEGORIES[selectedCategoryIndex].desc)));
|
|
6409
7121
|
}
|
|
6410
7122
|
var CATEGORIES, getActivePreset, truncateCSV;
|
|
6411
7123
|
var init_SettingsMenu = __esm({
|
|
6412
7124
|
async "src/components/SettingsMenu.jsx"() {
|
|
6413
7125
|
await init_exec_command();
|
|
7126
|
+
init_theme();
|
|
6414
7127
|
CATEGORIES = [
|
|
7128
|
+
{ id: "appearance", label: "Appearance", desc: "Customize UI theme & rendering options" },
|
|
6415
7129
|
{ id: "memory", label: "Memory", desc: "Manage system context & agent's memory" },
|
|
7130
|
+
{ id: "other", label: "Miscellaneous", desc: "Miscellaneous preferences" },
|
|
7131
|
+
{ id: "providers", label: "Providers", desc: "Configure AI models & API key strategies" },
|
|
6416
7132
|
{ id: "security", label: "Security", desc: "Configure permissions & data safety" },
|
|
6417
7133
|
{ id: "updater", label: "Updater", desc: "Manage application updates" },
|
|
6418
|
-
{ id: "other", label: "Other", desc: "Miscellaneous preferences" },
|
|
6419
7134
|
{ id: "exit", label: "Exit Settings", desc: "Return to chat view" }
|
|
6420
7135
|
];
|
|
6421
7136
|
getActivePreset = (settings) => {
|
|
@@ -6442,7 +7157,8 @@ var init_SettingsMenu = __esm({
|
|
|
6442
7157
|
import React8, { useState as useState7, useEffect as useEffect6 } from "react";
|
|
6443
7158
|
import { Box as Box7, Text as Text8 } from "ink";
|
|
6444
7159
|
import TextInput2 from "ink-text-input";
|
|
6445
|
-
function ProfileForm({ initialData, onSave, onCancel }) {
|
|
7160
|
+
function ProfileForm({ initialData, onSave, onCancel, theme = "Dark" }) {
|
|
7161
|
+
const colors = getThemeColors(theme);
|
|
6446
7162
|
const [step, setStep] = useState7(0);
|
|
6447
7163
|
const [currentInput, setCurrentInput] = useState7("");
|
|
6448
7164
|
const [profile, setProfile] = useState7(() => ({
|
|
@@ -6478,27 +7194,28 @@ function ProfileForm({ initialData, onSave, onCancel }) {
|
|
|
6478
7194
|
Box7,
|
|
6479
7195
|
{
|
|
6480
7196
|
borderStyle: "round",
|
|
6481
|
-
borderColor:
|
|
7197
|
+
borderColor: colors.borderMuted,
|
|
6482
7198
|
padding: 0,
|
|
6483
7199
|
marginTop: 1,
|
|
6484
7200
|
flexShrink: 0,
|
|
6485
7201
|
flexDirection: "column",
|
|
6486
7202
|
width: "100%"
|
|
6487
7203
|
},
|
|
6488
|
-
/* @__PURE__ */ React8.createElement(Box7, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React8.createElement(Text8, { color:
|
|
6489
|
-
/* @__PURE__ */ React8.createElement(Box7, { paddingX: 1, flexDirection: "column" }, /* @__PURE__ */ React8.createElement(Box7, null, /* @__PURE__ */ React8.createElement(Text8, { color:
|
|
7204
|
+
/* @__PURE__ */ React8.createElement(Box7, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React8.createElement(Text8, { color: colors.text, bold: true }, "DEVELOPER PROFILE CONFIGURATION")),
|
|
7205
|
+
/* @__PURE__ */ React8.createElement(Box7, { paddingX: 1, flexDirection: "column" }, /* @__PURE__ */ React8.createElement(Box7, null, /* @__PURE__ */ React8.createElement(Text8, { color: colors.text, bold: true }, steps[step].label), /* @__PURE__ */ React8.createElement(
|
|
6490
7206
|
TextInput2,
|
|
6491
7207
|
{
|
|
6492
7208
|
value: currentInput,
|
|
6493
7209
|
onChange: setCurrentInput,
|
|
6494
7210
|
onSubmit: handleSubmit
|
|
6495
7211
|
}
|
|
6496
|
-
)), /* @__PURE__ */ React8.createElement(Box7, { marginTop: 1 }, /* @__PURE__ */ React8.createElement(Text8, { color:
|
|
6497
|
-
/* @__PURE__ */ React8.createElement(Box7, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React8.createElement(Text8, { color:
|
|
7212
|
+
)), /* @__PURE__ */ React8.createElement(Box7, { marginTop: 1 }, /* @__PURE__ */ React8.createElement(Text8, { color: colors.textMuted, italic: true }, "Step ", step + 1, " of ", steps.length))),
|
|
7213
|
+
/* @__PURE__ */ React8.createElement(Box7, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React8.createElement(Text8, { color: colors.textMuted, italic: true }, "(Enter to submit \u2022 Type /cancel to abort)"))
|
|
6498
7214
|
);
|
|
6499
7215
|
}
|
|
6500
7216
|
var init_ProfileForm = __esm({
|
|
6501
7217
|
"src/components/ProfileForm.jsx"() {
|
|
7218
|
+
init_theme();
|
|
6502
7219
|
}
|
|
6503
7220
|
});
|
|
6504
7221
|
|
|
@@ -6510,7 +7227,9 @@ var AskUserModal, AskUserModal_default;
|
|
|
6510
7227
|
var init_AskUserModal = __esm({
|
|
6511
7228
|
"src/components/AskUserModal.jsx"() {
|
|
6512
7229
|
init_terminal();
|
|
6513
|
-
|
|
7230
|
+
init_theme();
|
|
7231
|
+
AskUserModal = ({ question, options, onResolve, theme = "Dark" }) => {
|
|
7232
|
+
const colors = getThemeColors(theme);
|
|
6514
7233
|
const [isSuggestingElse, setIsSuggestingElse] = useState8(false);
|
|
6515
7234
|
const [customInput, setCustomInput] = useState8("");
|
|
6516
7235
|
const [selectedIndex, setSelectedIndex] = useState8(0);
|
|
@@ -6550,16 +7269,16 @@ var init_AskUserModal = __esm({
|
|
|
6550
7269
|
borderRight: false,
|
|
6551
7270
|
borderTop: false,
|
|
6552
7271
|
borderBottom: false,
|
|
6553
|
-
borderColor:
|
|
7272
|
+
borderColor: colors.codeBorder,
|
|
6554
7273
|
paddingLeft: 2,
|
|
6555
7274
|
paddingRight: 0,
|
|
6556
7275
|
paddingTop: 1,
|
|
6557
7276
|
paddingBottom: 1,
|
|
6558
|
-
backgroundColor:
|
|
7277
|
+
backgroundColor: colors.codeBg,
|
|
6559
7278
|
width: "100%"
|
|
6560
7279
|
},
|
|
6561
|
-
/* @__PURE__ */ React9.createElement(Box8, { paddingX: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color:
|
|
6562
|
-
/* @__PURE__ */ React9.createElement(Box8, { marginTop: 1, paddingX: 1 }, /* @__PURE__ */ React9.createElement(Text9, { italic: true, color:
|
|
7280
|
+
/* @__PURE__ */ React9.createElement(Box8, { paddingX: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color: colors.text, bold: true }, "SUGGEST SOMETHING ELSE")),
|
|
7281
|
+
/* @__PURE__ */ React9.createElement(Box8, { marginTop: 1, paddingX: 1 }, /* @__PURE__ */ React9.createElement(Text9, { italic: true, color: colors.textMuted }, "Replying to: ", question)),
|
|
6563
7282
|
/* @__PURE__ */ React9.createElement(Box8, { marginTop: 1, paddingX: 1, flexDirection: "row" }, /* @__PURE__ */ React9.createElement(
|
|
6564
7283
|
TextInput3,
|
|
6565
7284
|
{
|
|
@@ -6568,7 +7287,7 @@ var init_AskUserModal = __esm({
|
|
|
6568
7287
|
onSubmit: () => onResolve(customInput)
|
|
6569
7288
|
}
|
|
6570
7289
|
)),
|
|
6571
|
-
/* @__PURE__ */ React9.createElement(Box8, { marginTop: 1, paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color:
|
|
7290
|
+
/* @__PURE__ */ React9.createElement(Box8, { marginTop: 1, paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color: colors.textMuted, italic: true }, "(Press Enter to send)"))
|
|
6572
7291
|
);
|
|
6573
7292
|
}
|
|
6574
7293
|
return /* @__PURE__ */ React9.createElement(
|
|
@@ -6577,7 +7296,7 @@ var init_AskUserModal = __esm({
|
|
|
6577
7296
|
flexDirection: "column",
|
|
6578
7297
|
border: true,
|
|
6579
7298
|
borderStyle: "round",
|
|
6580
|
-
borderColor:
|
|
7299
|
+
borderColor: colors.codeBorder,
|
|
6581
7300
|
paddingLeft: 2,
|
|
6582
7301
|
paddingRight: 0,
|
|
6583
7302
|
paddingTop: 1,
|
|
@@ -6587,7 +7306,7 @@ var init_AskUserModal = __esm({
|
|
|
6587
7306
|
width: "100%"
|
|
6588
7307
|
},
|
|
6589
7308
|
/* @__PURE__ */ React9.createElement(Box8, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color: "yellow", bold: true }, "AGENT REQUEST: ACTION REQUIRED")),
|
|
6590
|
-
/* @__PURE__ */ React9.createElement(Box8, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color:
|
|
7309
|
+
/* @__PURE__ */ React9.createElement(Box8, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color: colors.text }, question)),
|
|
6591
7310
|
/* @__PURE__ */ React9.createElement(Box8, { flexDirection: "column", width: "100%" }, allOptions.map((opt, idx) => {
|
|
6592
7311
|
const isSelected = idx === selectedIndex;
|
|
6593
7312
|
return /* @__PURE__ */ React9.createElement(
|
|
@@ -6596,15 +7315,15 @@ var init_AskUserModal = __esm({
|
|
|
6596
7315
|
key: opt.id,
|
|
6597
7316
|
flexDirection: "column",
|
|
6598
7317
|
width: "100%",
|
|
6599
|
-
backgroundColor: isSelected ?
|
|
7318
|
+
backgroundColor: isSelected ? colors.highlightBg : void 0,
|
|
6600
7319
|
paddingX: 1,
|
|
6601
7320
|
marginBottom: idx === allOptions.length - 1 ? 0 : 1
|
|
6602
7321
|
},
|
|
6603
|
-
/* @__PURE__ */ React9.createElement(Text9, { color: isSelected ?
|
|
6604
|
-
opt.description && /* @__PURE__ */ React9.createElement(Box8, { marginLeft: 4 }, /* @__PURE__ */ React9.createElement(Text9, { color:
|
|
7322
|
+
/* @__PURE__ */ React9.createElement(Text9, { color: isSelected ? colors.text : colors.textMuted, bold: isSelected }, isSelected ? "\u276F " : " ", opt.label),
|
|
7323
|
+
opt.description && /* @__PURE__ */ React9.createElement(Box8, { marginLeft: 4 }, /* @__PURE__ */ React9.createElement(Text9, { color: colors.textMuted, italic: true }, opt.description))
|
|
6605
7324
|
);
|
|
6606
7325
|
})),
|
|
6607
|
-
/* @__PURE__ */ React9.createElement(Box8, { paddingX: 1, marginTop: 1, marginBottom: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color:
|
|
7326
|
+
/* @__PURE__ */ React9.createElement(Box8, { paddingX: 1, marginTop: 1, marginBottom: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color: colors.textMuted, italic: true }, "(Use Arrows to navigate, Enter to confirm)"))
|
|
6608
7327
|
);
|
|
6609
7328
|
};
|
|
6610
7329
|
AskUserModal_default = AskUserModal;
|
|
@@ -6812,7 +7531,7 @@ ${projectContextBlock}
|
|
|
6812
7531
|
- Language: Same as User Query
|
|
6813
7532
|
- NO CHAT **AFTER** FIRING TOOLS IN CURRENT TURN
|
|
6814
7533
|
- Short headsup summary of actions before firing tools
|
|
6815
|
-
- Task Complete? End response with summary of changes made (with reason) and files edited
|
|
7534
|
+
- Task Complete? End response with summary of changes made (with reason) and files edited (if any)
|
|
6816
7535
|
- Basic LaTeX${mode === "Flux" ? "" : ".\nUse Kaomojis HEAVILY"}
|
|
6817
7536
|
=== END SYSTEM PROMPT ===`.trim();
|
|
6818
7537
|
};
|
|
@@ -7152,7 +7871,7 @@ var init_history = __esm({
|
|
|
7152
7871
|
const firstUserMsg = userMessages[0];
|
|
7153
7872
|
const latestUserMsg = userMessages[userMessages.length - 1];
|
|
7154
7873
|
if (existingChat && existingChat.prompt) {
|
|
7155
|
-
if (Math.random() < 0.
|
|
7874
|
+
if (Math.random() < 0.8) {
|
|
7156
7875
|
prompt = extractPrompt(latestUserMsg) || existingChat.prompt;
|
|
7157
7876
|
} else {
|
|
7158
7877
|
prompt = existingChat.prompt;
|
|
@@ -12642,14 +13361,19 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
|
|
|
12642
13361
|
throw new Error("Subagent task was cancelled.");
|
|
12643
13362
|
}
|
|
12644
13363
|
}
|
|
12645
|
-
|
|
12646
|
-
settings.onTokenChunk();
|
|
12647
|
-
}
|
|
13364
|
+
let chunkText = "";
|
|
12648
13365
|
if (chunk.candidates?.[0]?.content?.parts) {
|
|
12649
13366
|
for (const part of chunk.candidates[0].content.parts) {
|
|
12650
|
-
if (part.text && !part.thought)
|
|
13367
|
+
if (part.text && !part.thought) {
|
|
13368
|
+
fullText += part.text;
|
|
13369
|
+
chunkText += part.text;
|
|
13370
|
+
}
|
|
12651
13371
|
}
|
|
12652
13372
|
}
|
|
13373
|
+
const chunkWordCount = chunkText ? chunkText.trim().split(/\s+/).filter(Boolean).length : 0;
|
|
13374
|
+
if (settings && typeof settings.onTokenChunk === "function") {
|
|
13375
|
+
settings.onTokenChunk(chunkText, chunkWordCount);
|
|
13376
|
+
}
|
|
12653
13377
|
if (chunk.usageMetadata) usageMetadata = chunk.usageMetadata;
|
|
12654
13378
|
}
|
|
12655
13379
|
} finally {
|
|
@@ -13776,7 +14500,6 @@ ${ideErr} [/ERROR]`;
|
|
|
13776
14500
|
config: {
|
|
13777
14501
|
systemInstruction: currentSystemInstruction,
|
|
13778
14502
|
mediaResolution: "MEDIA_RESOLUTION_MEDIUM",
|
|
13779
|
-
temperature: 1.05,
|
|
13780
14503
|
safetySettings: [
|
|
13781
14504
|
{ category: HarmCategory.HARM_CATEGORY_HARASSMENT, threshold: HarmBlockThreshold.BLOCK_NONE },
|
|
13782
14505
|
{ category: HarmCategory.HARM_CATEGORY_HATE_SPEECH, threshold: HarmBlockThreshold.BLOCK_NONE },
|
|
@@ -14000,18 +14723,6 @@ ${ideErr} [/ERROR]`;
|
|
|
14000
14723
|
yield chunk;
|
|
14001
14724
|
continue;
|
|
14002
14725
|
}
|
|
14003
|
-
if (settings && typeof settings.onTokenChunk === "function") {
|
|
14004
|
-
settings.onTokenChunk();
|
|
14005
|
-
}
|
|
14006
|
-
if (isFirstChunk) {
|
|
14007
|
-
yield { type: "status", content: "Thinking" };
|
|
14008
|
-
isFirstChunk = false;
|
|
14009
|
-
}
|
|
14010
|
-
if (TERMINATION_SIGNAL) {
|
|
14011
|
-
yield { type: "status", content: "Request Cancelled" };
|
|
14012
|
-
yield { type: "text", content: "\n\n\x1B[33m\u24D8 Request Cancelled\x1B[0m" };
|
|
14013
|
-
break;
|
|
14014
|
-
}
|
|
14015
14726
|
let chunkText = "";
|
|
14016
14727
|
const parts = chunk.candidates?.[0]?.content?.parts;
|
|
14017
14728
|
if (parts && parts.length > 0) {
|
|
@@ -14040,6 +14751,19 @@ ${ideErr} [/ERROR]`;
|
|
|
14040
14751
|
}
|
|
14041
14752
|
chunkText += t;
|
|
14042
14753
|
}
|
|
14754
|
+
const chunkWordCount = chunkText ? chunkText.trim().split(/\s+/).filter(Boolean).length : 0;
|
|
14755
|
+
if (settings && typeof settings.onTokenChunk === "function") {
|
|
14756
|
+
settings.onTokenChunk(chunkText, chunkWordCount);
|
|
14757
|
+
}
|
|
14758
|
+
if (isFirstChunk) {
|
|
14759
|
+
yield { type: "status", content: "Thinking" };
|
|
14760
|
+
isFirstChunk = false;
|
|
14761
|
+
}
|
|
14762
|
+
if (TERMINATION_SIGNAL) {
|
|
14763
|
+
yield { type: "status", content: "Request Cancelled" };
|
|
14764
|
+
yield { type: "text", content: "\n\n\x1B[33m\u24D8 Request Cancelled\x1B[0m" };
|
|
14765
|
+
break;
|
|
14766
|
+
}
|
|
14043
14767
|
if (chunkText) {
|
|
14044
14768
|
if (isDedupeActive) {
|
|
14045
14769
|
dedupeBuffer += chunkText;
|
|
@@ -15573,14 +16297,14 @@ Error Log can be found in ${path24.join(LOGS_DIR, "agent", "error.log")}`);
|
|
|
15573
16297
|
const mergedSettings = { ...savedSettings, ...settings };
|
|
15574
16298
|
const targetModel = model || settings?.modelName || settings?.activeModel || savedSettings.activeModel;
|
|
15575
16299
|
const SUBAGENT_TOOL_DEFINITIONS = {
|
|
15576
|
-
"readfile": '- [tool:functions.ReadFile(path="...", startLine=number, endLine=number)]. View files
|
|
15577
|
-
"readfolder": '- [tool:functions.ReadFolder(path="...")]. Detailed
|
|
15578
|
-
"filemap": '- [tool:functions.FileMap(path="path/file")]. Shows file structure, functions,
|
|
15579
|
-
"patchfile": '- [tool:functions.PatchFile(path="...", replaceContent1="
|
|
15580
|
-
"writefile": '- [tool:functions.WriteFile(path="...", content="...")]. Creates
|
|
15581
|
-
"searchkeyword": `- [tool:functions.SearchKeyword(keyword="...", file="optional", subString="true/false optional", regex="optional, false for keyword")]. Global project search. If 'file' is provided, searches only that file. Finds definitions/logic without reading every file. Usage: Can search for relevent lines/logic area to read specifically for edit. defaults subString: false, regex:
|
|
15582
|
-
"websearch": `- [tool:functions.WebSearch(query="...", aiMode="true optional", limit=number)]. Limit 3-10 (not needed with aiMode). Proactive use for unknown info/docs. DON'T hallucinate.
|
|
15583
|
-
"webscrape": '- [tool:functions.WebScrape(url="...")].
|
|
16300
|
+
"readfile": '- [tool:functions.ReadFile(path="...", startLine=number, endLine=number)]. View files',
|
|
16301
|
+
"readfolder": '- [tool:functions.ReadFolder(path="...")]. Detailed DIR stats including File Sizes',
|
|
16302
|
+
"filemap": '- [tool:functions.FileMap(path="path/file")]. Shows file structure, functions, class, import/export, variables',
|
|
16303
|
+
"patchfile": '- [tool:functions.PatchFile(path="...", replaceContent1="full line/block", newContent1="...", ...MAX 10)]. Surgical Patch. **Multiple patch on same file/path? Use replaceContent2, newContent2 etc >>> multiple spams**. Unsure? ReadFile >> guessing. **MUST VERIFY DIFF**',
|
|
16304
|
+
"writefile": '- [tool:functions.WriteFile(path="...", content="...")]. Creates/Overwrites. File Exist? PatchFile > WriteFile. Verify Imports',
|
|
16305
|
+
"searchkeyword": `- [tool:functions.SearchKeyword(keyword="...", file="optional", subString="true/false optional", regex="optional, false for keyword")]. Global project search. If 'file' is provided, searches only that file. Finds definitions/logic without reading every file. Usage: Can search for relevent lines/logic area to read specifically for edit. defaults subString: false, regex: true`,
|
|
16306
|
+
"websearch": `- [tool:functions.WebSearch(query="...", aiMode="true optional", limit=number)]. Limit 3-10 (not needed with aiMode). Proactive use for unknown info/docs. DON'T hallucinate.aiMode for LLM based search results and richer data, default: false`,
|
|
16307
|
+
"webscrape": '- [tool:functions.WebScrape(url="...")]. Proactive use for specific webpage/docs/api',
|
|
15584
16308
|
"ask": `- [tool:functions.Ask(question="...", optionA="option::description", ...MAX 4)]. Ambiguity Resolution. Mandatory Triggers: Path Divergence, Security, Risk Mitigation. ask >> finish/guess. Suggest best options; don't ask for preferences. 'option' SHOULD be short`
|
|
15585
16309
|
};
|
|
15586
16310
|
const providedToolsSection = `-- TOOL DEFINITIONS (path = relative to CWD, path separator: '/') --
|
|
@@ -15599,16 +16323,16 @@ TOOL POLICY:
|
|
|
15599
16323
|
${Object.values(SUBAGENT_TOOL_DEFINITIONS).join("\n")}
|
|
15600
16324
|
|
|
15601
16325
|
- VERIFY TOOL RESULT CONTENTS. Fix errors. No hallucinations
|
|
15602
|
-
- Escape quotes: \\" for code strings
|
|
15603
|
-
- Literal escapes: Double-escape sequences (e.g., \\\\n)
|
|
15604
|
-
- File structure: Real newlines for code formatting
|
|
16326
|
+
- **Escape quotes: \\" for code strings**
|
|
16327
|
+
- **Literal escapes: Double-escape sequences (e.g., \\\\n)**
|
|
16328
|
+
- **File structure: Real newlines for code formatting**`.trim();
|
|
15605
16329
|
const systemInstruction = `=== START SYSTEM PROMPT ===
|
|
15606
16330
|
You are a subagent helping the main FluxFlow CLI agent
|
|
15607
16331
|
Your task is: "${task}"
|
|
15608
16332
|
|
|
15609
16333
|
${providedToolsSection.trimEnd()}
|
|
15610
16334
|
|
|
15611
|
-
-- THINKING
|
|
16335
|
+
-- THINKING GUIDANCE --
|
|
15612
16336
|
NO EXPLICIT THINKING REQUIRED. FOCUS ON COMPLETING THE TASK DIRECTLY
|
|
15613
16337
|
|
|
15614
16338
|
Your main focus should be on tools and task, not chatting. Your Chat won't be visible to user
|
|
@@ -15802,7 +16526,8 @@ ${result}
|
|
|
15802
16526
|
// src/components/ResumeModal.jsx
|
|
15803
16527
|
import React10, { useState as useState9, useEffect as useEffect7 } from "react";
|
|
15804
16528
|
import { Box as Box9, Text as Text10, useInput as useInput5 } from "ink";
|
|
15805
|
-
function ResumeModal({ onSelect, onDelete, onClose }) {
|
|
16529
|
+
function ResumeModal({ onSelect, onDelete, onClose, theme = "Dark" }) {
|
|
16530
|
+
const colors = getThemeColors(theme);
|
|
15806
16531
|
const [history, setHistory] = useState9({});
|
|
15807
16532
|
const [keys, setKeys] = useState9([]);
|
|
15808
16533
|
const [selectedIndex, setSelectedIndex] = useState9(0);
|
|
@@ -15843,7 +16568,7 @@ function ResumeModal({ onSelect, onDelete, onClose }) {
|
|
|
15843
16568
|
}
|
|
15844
16569
|
}
|
|
15845
16570
|
const visibleKeys = keys.slice(startIndex, startIndex + MAX_VISIBLE);
|
|
15846
|
-
return /* @__PURE__ */ React10.createElement(Box9, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
16571
|
+
return /* @__PURE__ */ React10.createElement(Box9, { flexDirection: "column", borderStyle: "round", borderColor: colors.borderMuted, padding: 0, width: "100%" }, /* @__PURE__ */ React10.createElement(Box9, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: colors.text, bold: true }, "CHAT HISTORY: RESUME CONVERSATION")), keys.length === 0 ? /* @__PURE__ */ React10.createElement(Box9, { paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React10.createElement(Text10, { italic: true, color: colors.textMuted }, "No saved chats found.")) : /* @__PURE__ */ React10.createElement(Box9, { flexDirection: "column", width: "100%" }, startIndex > 0 && /* @__PURE__ */ React10.createElement(Box9, { paddingX: 2, marginBottom: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: colors.textMuted }, "\u25B2 (+", startIndex, " more chats above)")), visibleKeys.map((id, index) => {
|
|
15847
16572
|
const chat2 = history[id];
|
|
15848
16573
|
const actualIndex = startIndex + index;
|
|
15849
16574
|
const isSelected = actualIndex === selectedIndex;
|
|
@@ -15853,17 +16578,17 @@ function ResumeModal({ onSelect, onDelete, onClose }) {
|
|
|
15853
16578
|
{
|
|
15854
16579
|
key: id,
|
|
15855
16580
|
paddingX: 1,
|
|
15856
|
-
backgroundColor: isSelected ?
|
|
16581
|
+
backgroundColor: isSelected ? colors.highlightBg : void 0,
|
|
15857
16582
|
width: "100%"
|
|
15858
16583
|
},
|
|
15859
|
-
/* @__PURE__ */ React10.createElement(Box9, { flexGrow: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: isSelected ?
|
|
16584
|
+
/* @__PURE__ */ React10.createElement(Box9, { flexGrow: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: isSelected ? colors.text : colors.textMuted, bold: isSelected }, isSelected ? "\u276F " : " ", (() => {
|
|
15860
16585
|
if (chat2?.name && !chat2.name.startsWith("Session")) return chat2.name;
|
|
15861
16586
|
if (chat2?.prompt) return chat2.prompt;
|
|
15862
16587
|
return chat2?.name || id;
|
|
15863
|
-
})(), /* @__PURE__ */ React10.createElement(Text10, { color:
|
|
15864
|
-
isSelected && /* @__PURE__ */ React10.createElement(Box9, { flexShrink: 0 }, /* @__PURE__ */ React10.createElement(Text10, { color:
|
|
16588
|
+
})(), /* @__PURE__ */ React10.createElement(Text10, { color: colors.textMuted }, " [", dateStr, " \u2022 ", id, "]"))),
|
|
16589
|
+
isSelected && /* @__PURE__ */ React10.createElement(Box9, { flexShrink: 0 }, /* @__PURE__ */ React10.createElement(Text10, { color: colors.danger, bold: true }, "[X] DELETE "))
|
|
15865
16590
|
);
|
|
15866
|
-
}), startIndex + MAX_VISIBLE < keys.length && /* @__PURE__ */ React10.createElement(Box9, { paddingX: 2, marginTop: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color:
|
|
16591
|
+
}), startIndex + MAX_VISIBLE < keys.length && /* @__PURE__ */ React10.createElement(Box9, { paddingX: 2, marginTop: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: colors.textMuted }, "\u25BC (+", keys.length - (startIndex + MAX_VISIBLE), " more chats below)"))), /* @__PURE__ */ React10.createElement(
|
|
15867
16592
|
Box9,
|
|
15868
16593
|
{
|
|
15869
16594
|
marginTop: 1,
|
|
@@ -15872,9 +16597,9 @@ function ResumeModal({ onSelect, onDelete, onClose }) {
|
|
|
15872
16597
|
borderLeft: false,
|
|
15873
16598
|
borderRight: false,
|
|
15874
16599
|
borderBottom: false,
|
|
15875
|
-
borderColor:
|
|
16600
|
+
borderColor: colors.borderMuted
|
|
15876
16601
|
},
|
|
15877
|
-
/* @__PURE__ */ React10.createElement(Text10, { italic: true }, "\u2191\u2193 navigate \u2022 Enter select \u2022 x delete \u2022 Esc close")
|
|
16602
|
+
/* @__PURE__ */ React10.createElement(Text10, { color: colors.textMuted, italic: true }, "\u2191\u2193 navigate \u2022 Enter select \u2022 x delete \u2022 Esc close")
|
|
15878
16603
|
));
|
|
15879
16604
|
}
|
|
15880
16605
|
function formatDate(timestamp) {
|
|
@@ -15892,13 +16617,15 @@ var init_ResumeModal = __esm({
|
|
|
15892
16617
|
"src/components/ResumeModal.jsx"() {
|
|
15893
16618
|
init_history();
|
|
15894
16619
|
init_terminal();
|
|
16620
|
+
init_theme();
|
|
15895
16621
|
}
|
|
15896
16622
|
});
|
|
15897
16623
|
|
|
15898
16624
|
// src/components/MemoryModal.jsx
|
|
15899
16625
|
import React11, { useState as useState10, useEffect as useEffect8 } from "react";
|
|
15900
16626
|
import { Box as Box10, Text as Text11, useInput as useInput6, useStdout } from "ink";
|
|
15901
|
-
function MemoryModal({ onClose }) {
|
|
16627
|
+
function MemoryModal({ onClose, theme = "Dark" }) {
|
|
16628
|
+
const colors = getThemeColors(theme);
|
|
15902
16629
|
const { stdout } = useStdout();
|
|
15903
16630
|
const columns = stdout?.columns || 80;
|
|
15904
16631
|
const [memories, setMemories] = useState10([]);
|
|
@@ -15976,23 +16703,23 @@ function MemoryModal({ onClose }) {
|
|
|
15976
16703
|
const filledCount = Math.round(usagePercent / 100 * barWidth);
|
|
15977
16704
|
const barStr = "\u2588".repeat(filledCount) + "\u2591".repeat(Math.max(0, barWidth - filledCount));
|
|
15978
16705
|
const getBarColor = () => {
|
|
15979
|
-
if (usagePercent < 50) return
|
|
15980
|
-
if (usagePercent < 90) return
|
|
15981
|
-
return
|
|
16706
|
+
if (usagePercent < 50) return colors.textMuted;
|
|
16707
|
+
if (usagePercent < 90) return colors.warning;
|
|
16708
|
+
return colors.danger;
|
|
15982
16709
|
};
|
|
15983
16710
|
const s = emojiSpace(2);
|
|
15984
|
-
return /* @__PURE__ */ React11.createElement(Box10, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
16711
|
+
return /* @__PURE__ */ React11.createElement(Box10, { flexDirection: "column", borderStyle: "round", borderColor: colors.borderMuted, padding: 0, width: "100%" }, /* @__PURE__ */ React11.createElement(Box10, { paddingX: 1, marginBottom: 1, justifyContent: "space-between" }, /* @__PURE__ */ React11.createElement(Text11, { color: colors.text, bold: true }, "SAVED MEMORIES"), /* @__PURE__ */ React11.createElement(Box10, null, /* @__PURE__ */ React11.createElement(Text11, { color: colors.textMuted }, "Vault: "), /* @__PURE__ */ React11.createElement(Text11, { color: getBarColor() }, barStr), /* @__PURE__ */ React11.createElement(Text11, { color: colors.text, bold: true }, " ", usagePercent, "%"))), !isMemoryOn && memories.length > 0 ? /* @__PURE__ */ React11.createElement(Box10, { paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React11.createElement(Text11, { italic: true, color: colors.textMuted }, "Memory is currently Off...")) : memories.length === 0 ? /* @__PURE__ */ React11.createElement(Box10, { paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React11.createElement(Text11, { italic: true, color: colors.textMuted }, isMemoryOn ? "Learning..." : "Memory not available...")) : /* @__PURE__ */ React11.createElement(Box10, { flexDirection: "column" }, memories.map((mem, idx) => {
|
|
15985
16712
|
const isSelected = idx === selectedIndex;
|
|
15986
16713
|
return /* @__PURE__ */ React11.createElement(
|
|
15987
16714
|
Box10,
|
|
15988
16715
|
{
|
|
15989
16716
|
key: mem.id,
|
|
15990
16717
|
paddingX: 1,
|
|
15991
|
-
backgroundColor: isSelected ?
|
|
16718
|
+
backgroundColor: isSelected ? colors.highlightBg : void 0,
|
|
15992
16719
|
width: "100%"
|
|
15993
16720
|
},
|
|
15994
|
-
/* @__PURE__ */ React11.createElement(Box10, { flexGrow: 1 }, /* @__PURE__ */ React11.createElement(Text11, { color: isSelected ?
|
|
15995
|
-
isSelected && /* @__PURE__ */ React11.createElement(Box10, { flexShrink: 0 }, /* @__PURE__ */ React11.createElement(Text11, { color:
|
|
16721
|
+
/* @__PURE__ */ React11.createElement(Box10, { flexGrow: 1 }, /* @__PURE__ */ React11.createElement(Text11, { color: isSelected ? colors.text : colors.textMuted, bold: isSelected }, isSelected ? "\u276F " : " ", idx + 1, ". ", formatMemory(mem.memory, idx, isSelected))),
|
|
16722
|
+
isSelected && /* @__PURE__ */ React11.createElement(Box10, { flexShrink: 0 }, /* @__PURE__ */ React11.createElement(Text11, { color: colors.textMuted, dimColor: true }, " [", /* @__PURE__ */ React11.createElement(Text11, { italic: true }, mem.score), "] "), /* @__PURE__ */ React11.createElement(Text11, { color: colors.danger, bold: true }, "[X] WIPE "))
|
|
15996
16723
|
);
|
|
15997
16724
|
})), /* @__PURE__ */ React11.createElement(
|
|
15998
16725
|
Box10,
|
|
@@ -16003,9 +16730,9 @@ function MemoryModal({ onClose }) {
|
|
|
16003
16730
|
borderLeft: false,
|
|
16004
16731
|
borderRight: false,
|
|
16005
16732
|
borderBottom: false,
|
|
16006
|
-
borderColor:
|
|
16733
|
+
borderColor: colors.borderMuted
|
|
16007
16734
|
},
|
|
16008
|
-
/* @__PURE__ */ React11.createElement(Text11, { color:
|
|
16735
|
+
/* @__PURE__ */ React11.createElement(Text11, { color: colors.textMuted, italic: true }, "\u2191\u2193 navigate \u2022 x wipe memory \u2022 Esc close")
|
|
16009
16736
|
));
|
|
16010
16737
|
}
|
|
16011
16738
|
var init_MemoryModal = __esm({
|
|
@@ -16013,6 +16740,7 @@ var init_MemoryModal = __esm({
|
|
|
16013
16740
|
init_crypto();
|
|
16014
16741
|
init_paths();
|
|
16015
16742
|
init_terminal();
|
|
16743
|
+
init_theme();
|
|
16016
16744
|
}
|
|
16017
16745
|
});
|
|
16018
16746
|
|
|
@@ -16396,6 +17124,7 @@ var WITTY_LOADING_PHRASES;
|
|
|
16396
17124
|
var init_witty_phrases = __esm({
|
|
16397
17125
|
"src/data/witty_phrases.js"() {
|
|
16398
17126
|
WITTY_LOADING_PHRASES = [
|
|
17127
|
+
// === ORIGINALS ===
|
|
16399
17128
|
"I'm Feeling Lucky",
|
|
16400
17129
|
"Shipping awesomeness",
|
|
16401
17130
|
"Painting the serifs back on",
|
|
@@ -16526,7 +17255,76 @@ var init_witty_phrases = __esm({
|
|
|
16526
17255
|
"Constructing additional pylons",
|
|
16527
17256
|
"New line? That\u2019s Ctrl+J.",
|
|
16528
17257
|
"Releasing the HypnoDrones",
|
|
16529
|
-
"Pushing the button, Frank."
|
|
17258
|
+
"Pushing the button, Frank.",
|
|
17259
|
+
// === NEW ===
|
|
17260
|
+
"Consulting with the Companion Cube",
|
|
17261
|
+
// --- Portal / Portal 2 ---
|
|
17262
|
+
"Testing for science. You monster.",
|
|
17263
|
+
"Dispensing deadly neurotoxin just kidding, compiling.",
|
|
17264
|
+
"Now thinking with portals",
|
|
17265
|
+
"Wheatley is currently attempting to hack this prompt",
|
|
17266
|
+
"Developing combustible lemons",
|
|
17267
|
+
"Aperture Science Enrichment Center is processing your request.",
|
|
17268
|
+
"SPAAAACE! Space! SPAAAACE!",
|
|
17269
|
+
"The cake is not a lie, it just needs a few more seconds.",
|
|
17270
|
+
// --- Other Classic Games ---
|
|
17271
|
+
"Praise the Sun! \u2600\uFE0F",
|
|
17272
|
+
"Hey you, you're finally awake.",
|
|
17273
|
+
"Stay a while and listen.",
|
|
17274
|
+
"All your base are belong to us.",
|
|
17275
|
+
"It's dangerous to go alone! Take this code.",
|
|
17276
|
+
"Protocol 3: Protect the Pilot.",
|
|
17277
|
+
"Finish Him! (The loading bar, that is)",
|
|
17278
|
+
"War war never changes. But this prompt will.",
|
|
17279
|
+
"Snake? Snake?! SNAAAAKE!",
|
|
17280
|
+
"Got a selection of good things on sale, stranger!",
|
|
17281
|
+
"Boy! Read the documentation.",
|
|
17282
|
+
"Reticulating Minecraft splines",
|
|
17283
|
+
// --- Few More ---
|
|
17284
|
+
"Feed the loading bar a quick snack",
|
|
17285
|
+
"Converting dark mode to dark magic",
|
|
17286
|
+
"Asking the rubber duck for advice",
|
|
17287
|
+
"Dividing by zero wait, NO NO NO\u2014",
|
|
17288
|
+
"Herding the 1s and 0s back into line",
|
|
17289
|
+
"Bribing the server with cookies",
|
|
17290
|
+
// --- Pragmata ---
|
|
17291
|
+
"Establishing contact with the Moon base",
|
|
17292
|
+
"Calibrating astronaut suit thrusters",
|
|
17293
|
+
"Drawing doodle on space helmet",
|
|
17294
|
+
"Synthesizing Lunafilament",
|
|
17295
|
+
"Deactivating runaway lunar defense bots",
|
|
17296
|
+
"Calculating gravity offset watch your step!",
|
|
17297
|
+
"Hacking the Delphi Corporation mainframe",
|
|
17298
|
+
"What comes after dreaming? Loading screen, apparently.",
|
|
17299
|
+
"Petting the holographic giant cat",
|
|
17300
|
+
"Securing payload for Earth re-entry",
|
|
17301
|
+
// --- Halo --- 'Launching Halo ring just kidding, still loading.',
|
|
17302
|
+
"Wort wort wort!",
|
|
17303
|
+
"Did you touch my Warthog?",
|
|
17304
|
+
"One small step for man, one giant leap for the loading bar.",
|
|
17305
|
+
"The Halo array is charging or maybe just a fan.",
|
|
17306
|
+
"Deploying Pelican dropship eventually.",
|
|
17307
|
+
"Just cleaning my plasma pistol BRB.",
|
|
17308
|
+
"Checking Master Chief's helmet for scratches.",
|
|
17309
|
+
"Counting sheep wait, wrong game.",
|
|
17310
|
+
"S-Tier loading screen incoming.",
|
|
17311
|
+
// --- GTA --- 'Traffic jam in the information highway.',
|
|
17312
|
+
"Alarm blaring it's just your internet connection.",
|
|
17313
|
+
"Looking for a helicopter or just your patience.",
|
|
17314
|
+
"Need a taxi? Just kidding, I'm loading.",
|
|
17315
|
+
"This loading time is criminal.",
|
|
17316
|
+
"Wish I had a cheat code for fast loading.",
|
|
17317
|
+
// --- Other Fun Lines ---
|
|
17318
|
+
"Polishing the loading bar until it shines",
|
|
17319
|
+
"Training the server hamsters",
|
|
17320
|
+
"Baking a fresh batch of witty comments",
|
|
17321
|
+
"Aligning my existential dread with your request",
|
|
17322
|
+
"Just doodling on the terminal",
|
|
17323
|
+
"Searching for the wifi password in the cosmos",
|
|
17324
|
+
"Trying to remember my CAPTCHA training",
|
|
17325
|
+
"Deciphering ancient scrolls (aka documentation)",
|
|
17326
|
+
"Brewing a perfect cup of code",
|
|
17327
|
+
"Petting the cat that photobombed my code"
|
|
16530
17328
|
];
|
|
16531
17329
|
}
|
|
16532
17330
|
});
|
|
@@ -16764,6 +17562,8 @@ function App({ args = [] }) {
|
|
|
16764
17562
|
});
|
|
16765
17563
|
activeStreamingMsgRef.current = null;
|
|
16766
17564
|
}
|
|
17565
|
+
chunkWordCountRef.current = 0;
|
|
17566
|
+
streamingWordStatsRef.current = { totalWords: 0, startTime: 0, wps: 0 };
|
|
16767
17567
|
};
|
|
16768
17568
|
const startTypewriter = () => {
|
|
16769
17569
|
if (typewriterTickRef.current) {
|
|
@@ -16773,12 +17573,16 @@ function App({ args = [] }) {
|
|
|
16773
17573
|
typewriterTickRef.current = setInterval(() => {
|
|
16774
17574
|
const queue = typewriterQueueRef.current;
|
|
16775
17575
|
if (queue.length > 0 && activeStreamingMsgRef.current) {
|
|
16776
|
-
let batchSize =
|
|
16777
|
-
if (queue.length >
|
|
17576
|
+
let batchSize = 1;
|
|
17577
|
+
if (queue.length > 85) batchSize = 30;
|
|
17578
|
+
else if (queue.length > 80) batchSize = 25;
|
|
17579
|
+
else if (queue.length > 75) batchSize = 20;
|
|
17580
|
+
else if (queue.length > 65) batchSize = 16;
|
|
16778
17581
|
else if (queue.length > 50) batchSize = 12;
|
|
16779
17582
|
else if (queue.length > 35) batchSize = 8;
|
|
16780
17583
|
else if (queue.length > 15) batchSize = 6;
|
|
16781
17584
|
else if (queue.length > 5) batchSize = 4;
|
|
17585
|
+
else if (queue.length > 3) batchSize = 2;
|
|
16782
17586
|
let batchedText = "";
|
|
16783
17587
|
for (let i = 0; i < batchSize && queue.length > 0; i++) {
|
|
16784
17588
|
batchedText += queue.shift();
|
|
@@ -16786,7 +17590,7 @@ function App({ args = [] }) {
|
|
|
16786
17590
|
activeStreamingMsgRef.current.text = flattenString(activeStreamingMsgRef.current.text + batchedText);
|
|
16787
17591
|
forceRender();
|
|
16788
17592
|
}
|
|
16789
|
-
},
|
|
17593
|
+
}, 80);
|
|
16790
17594
|
};
|
|
16791
17595
|
const awaitTypewriter = async () => {
|
|
16792
17596
|
while (systemSettings.progressiveRendering && typewriterQueueRef.current.length > 0) {
|
|
@@ -17095,11 +17899,14 @@ function App({ args = [] }) {
|
|
|
17095
17899
|
const [providerBudgetCursor, setProviderBudgetCursor] = useState15(0);
|
|
17096
17900
|
const [pbsCursor, setPbsCursor] = useState15(0);
|
|
17097
17901
|
const [pbsSelected, setPbsSelected] = useState15({});
|
|
17098
|
-
const [systemSettings, setSystemSettings] = useState15({ memory: true, compression: 0, autoExec: false, autoDeleteHistory: "7d", autoUpdate: false, updateManager: "npm", customUpdateCommand: "" });
|
|
17902
|
+
const [systemSettings, setSystemSettings] = useState15({ memory: true, theme: "Dark", compression: 0, autoExec: false, autoDeleteHistory: "7d", autoUpdate: false, updateManager: "npm", customUpdateCommand: "" });
|
|
17903
|
+
const colors = useMemo2(() => getThemeColors(systemSettings.theme), [systemSettings.theme]);
|
|
17099
17904
|
const [profileData, setProfileData] = useState15({ name: null, nickname: null, instructions: null });
|
|
17100
17905
|
const [imageSettings, setImageSettings] = useState15({ keyType: "Default", quality: "Low-High", apiKey: "" });
|
|
17101
17906
|
const [sessionStats, setSessionStats] = useState15({ tokens: 0 });
|
|
17102
17907
|
const [lastChunkTime, setLastChunkTime] = useState15(0);
|
|
17908
|
+
const chunkWordCountRef = useRef4(0);
|
|
17909
|
+
const streamingWordStatsRef = useRef4({ totalWords: 0, startTime: 0, wps: 0 });
|
|
17103
17910
|
const [sessionAgentCalls, setSessionAgentCalls] = useState15(0);
|
|
17104
17911
|
const [sessionBackgroundCalls, setSessionBackgroundCalls] = useState15(0);
|
|
17105
17912
|
const [sessionTotalTokens, setSessionTotalTokens] = useState15(0);
|
|
@@ -17366,7 +18173,8 @@ function App({ args = [] }) {
|
|
|
17366
18173
|
historicalBlocks: [],
|
|
17367
18174
|
seenSelections: /* @__PURE__ */ new Set(),
|
|
17368
18175
|
chatId: "",
|
|
17369
|
-
clearKey: 0
|
|
18176
|
+
clearKey: 0,
|
|
18177
|
+
theme: ""
|
|
17370
18178
|
});
|
|
17371
18179
|
const parsedBlocks = useMemo2(() => {
|
|
17372
18180
|
const columns = terminalSize.columns || 80;
|
|
@@ -17377,7 +18185,8 @@ function App({ args = [] }) {
|
|
|
17377
18185
|
const isClear = completedIndex < cachedHistoryRef.current.completedIndex;
|
|
17378
18186
|
const isChatChanged = cachedHistoryRef.current.chatId !== chatId;
|
|
17379
18187
|
const isClearKeyChanged = cachedHistoryRef.current.clearKey !== clearKey;
|
|
17380
|
-
|
|
18188
|
+
const isThemeChanged = cachedHistoryRef.current.theme !== systemSettings.theme;
|
|
18189
|
+
if (isResize || isClear || isChatChanged || isClearKeyChanged || isThemeChanged) {
|
|
17381
18190
|
const completedMsgs = messages.slice(0, completedIndex);
|
|
17382
18191
|
for (let i = 0; i < completedMsgs.length; i++) {
|
|
17383
18192
|
const msg = completedMsgs[i];
|
|
@@ -17399,7 +18208,8 @@ function App({ args = [] }) {
|
|
|
17399
18208
|
historicalBlocks,
|
|
17400
18209
|
seenSelections: new Set(seenAskSelections),
|
|
17401
18210
|
chatId,
|
|
17402
|
-
clearKey
|
|
18211
|
+
clearKey,
|
|
18212
|
+
theme: systemSettings.theme
|
|
17403
18213
|
};
|
|
17404
18214
|
} else {
|
|
17405
18215
|
historicalBlocks = cachedHistoryRef.current.historicalBlocks;
|
|
@@ -17744,6 +18554,22 @@ function App({ args = [] }) {
|
|
|
17744
18554
|
process.stdin.off("data", onData);
|
|
17745
18555
|
};
|
|
17746
18556
|
}, []);
|
|
18557
|
+
const prevThemeRef = useRef4(systemSettings.theme);
|
|
18558
|
+
useEffect12(() => {
|
|
18559
|
+
if (prevThemeRef.current && prevThemeRef.current !== systemSettings.theme) {
|
|
18560
|
+
prevThemeRef.current = systemSettings.theme;
|
|
18561
|
+
if (stdout) {
|
|
18562
|
+
stdout.write("\x1B[2J\x1B[3J\x1B[H");
|
|
18563
|
+
if (stdout.isTTY) {
|
|
18564
|
+
stdout.write("\x1B[?2004h");
|
|
18565
|
+
}
|
|
18566
|
+
}
|
|
18567
|
+
setClearKey((prev) => prev + 1);
|
|
18568
|
+
clearBlocksCache();
|
|
18569
|
+
} else {
|
|
18570
|
+
prevThemeRef.current = systemSettings.theme;
|
|
18571
|
+
}
|
|
18572
|
+
}, [systemSettings.theme, stdout]);
|
|
17747
18573
|
useEffect12(() => {
|
|
17748
18574
|
async function init() {
|
|
17749
18575
|
try {
|
|
@@ -18061,8 +18887,8 @@ function App({ args = [] }) {
|
|
|
18061
18887
|
{ cmd: "/help", desc: "Show all available commands" },
|
|
18062
18888
|
...parsedArgs.playground ? [{ cmd: "/move", desc: "Move playground directory to original CWD/playground-export" }] : [],
|
|
18063
18889
|
{ cmd: "/resume", desc: "Load previous session" },
|
|
18064
|
-
{ cmd: "/compress", desc: "Summarize and compress chat history" },
|
|
18065
18890
|
{ cmd: "/clear", desc: "Clear terminal screen" },
|
|
18891
|
+
{ cmd: "/compress", desc: "Summarize and compress chat history" },
|
|
18066
18892
|
{ cmd: "/revert", desc: "Revert codebase back to a checkpoint" },
|
|
18067
18893
|
{ cmd: "/gemini", desc: "Get a happy message from Gemini CLI" },
|
|
18068
18894
|
{ cmd: "/save", desc: "Force save current chat" },
|
|
@@ -19138,8 +19964,22 @@ ${timestamp}` };
|
|
|
19138
19964
|
apiTier,
|
|
19139
19965
|
cols: terminalSize.columns - 6,
|
|
19140
19966
|
rows: 30,
|
|
19141
|
-
onTokenChunk: () => {
|
|
19142
|
-
|
|
19967
|
+
onTokenChunk: (chunkText, wordCount) => {
|
|
19968
|
+
const now = Date.now();
|
|
19969
|
+
setLastChunkTime(now);
|
|
19970
|
+
if (typeof wordCount === "number") {
|
|
19971
|
+
chunkWordCountRef.current = wordCount;
|
|
19972
|
+
const stats = streamingWordStatsRef.current;
|
|
19973
|
+
if (!stats.startTime) {
|
|
19974
|
+
stats.startTime = now;
|
|
19975
|
+
stats.totalWords = 0;
|
|
19976
|
+
}
|
|
19977
|
+
stats.totalWords += wordCount;
|
|
19978
|
+
const elapsedSec = (now - stats.startTime) / 1e3;
|
|
19979
|
+
if (elapsedSec > 0) {
|
|
19980
|
+
stats.wps = Math.round(stats.totalWords / elapsedSec * 10) / 10;
|
|
19981
|
+
}
|
|
19982
|
+
}
|
|
19143
19983
|
},
|
|
19144
19984
|
onVisualFeedback: (content) => {
|
|
19145
19985
|
setMessages((prev) => {
|
|
@@ -19948,6 +20788,7 @@ Selection: ${val}`,
|
|
|
19948
20788
|
{ label: "OpenRouter (Free/Paid) [EXPERIMENTAL]", value: "OpenRouter" },
|
|
19949
20789
|
{ label: "Back", value: "settings" }
|
|
19950
20790
|
],
|
|
20791
|
+
theme: systemSettings.theme,
|
|
19951
20792
|
onSelect: async (item) => {
|
|
19952
20793
|
if (item.value === "settings" || item.value === "Back") {
|
|
19953
20794
|
setActiveView("settings");
|
|
@@ -20444,7 +21285,8 @@ Selection: ${val}`,
|
|
|
20444
21285
|
} else {
|
|
20445
21286
|
setActiveView("key");
|
|
20446
21287
|
}
|
|
20447
|
-
}
|
|
21288
|
+
},
|
|
21289
|
+
theme: systemSettings.theme
|
|
20448
21290
|
}
|
|
20449
21291
|
)));
|
|
20450
21292
|
case "exit":
|
|
@@ -20461,7 +21303,8 @@ Selection: ${val}`,
|
|
|
20461
21303
|
}
|
|
20462
21304
|
setPendingAsk(null);
|
|
20463
21305
|
setActiveView("chat");
|
|
20464
|
-
}
|
|
21306
|
+
},
|
|
21307
|
+
theme: systemSettings.theme
|
|
20465
21308
|
}
|
|
20466
21309
|
));
|
|
20467
21310
|
case "revert":
|
|
@@ -20575,7 +21418,8 @@ Selection: ${val}`,
|
|
|
20575
21418
|
const newHistory = await deleteChat(id);
|
|
20576
21419
|
return newHistory;
|
|
20577
21420
|
},
|
|
20578
|
-
onClose: () => setActiveView("chat")
|
|
21421
|
+
onClose: () => setActiveView("chat"),
|
|
21422
|
+
theme: systemSettings.theme
|
|
20579
21423
|
}
|
|
20580
21424
|
));
|
|
20581
21425
|
case "keybindingsPrompt":
|
|
@@ -20594,11 +21438,12 @@ Selection: ${val}`,
|
|
|
20594
21438
|
cachedShortcut = "\\ + Enter";
|
|
20595
21439
|
}
|
|
20596
21440
|
setActiveView("chat");
|
|
20597
|
-
}
|
|
21441
|
+
},
|
|
21442
|
+
theme: systemSettings.theme
|
|
20598
21443
|
}
|
|
20599
21444
|
)));
|
|
20600
21445
|
case "memory":
|
|
20601
|
-
return /* @__PURE__ */ React16.createElement(Box14, { width: "100%", alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React16.createElement(MemoryModal, { onClose: () => setActiveView("chat") }));
|
|
21446
|
+
return /* @__PURE__ */ React16.createElement(Box14, { width: "100%", alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React16.createElement(MemoryModal, { onClose: () => setActiveView("chat"), theme: systemSettings.theme }));
|
|
20602
21447
|
case "parserDownload":
|
|
20603
21448
|
return /* @__PURE__ */ React16.createElement(Box14, { width: "100%", alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React16.createElement(ParserDownloadModal, { onClose: () => setActiveView("settings") }));
|
|
20604
21449
|
case "profile":
|
|
@@ -20611,7 +21456,8 @@ Selection: ${val}`,
|
|
|
20611
21456
|
setMessages((prev) => [...prev, { id: Date.now(), role: "system", text: `Profile updated: ${profile.name} (${profile.nickname})` }]);
|
|
20612
21457
|
setActiveView("chat");
|
|
20613
21458
|
},
|
|
20614
|
-
onCancel: () => setActiveView("chat")
|
|
21459
|
+
onCancel: () => setActiveView("chat"),
|
|
21460
|
+
theme: systemSettings.theme
|
|
20615
21461
|
}
|
|
20616
21462
|
);
|
|
20617
21463
|
case "resolution":
|
|
@@ -20683,7 +21529,8 @@ Selection: ${val}`,
|
|
|
20683
21529
|
pendingApproval.resolve(decision);
|
|
20684
21530
|
setPendingApproval(null);
|
|
20685
21531
|
setActiveView("chat");
|
|
20686
|
-
}
|
|
21532
|
+
},
|
|
21533
|
+
theme: systemSettings.theme
|
|
20687
21534
|
}
|
|
20688
21535
|
)));
|
|
20689
21536
|
case "updateManager":
|
|
@@ -20720,7 +21567,8 @@ Selection: ${val}`,
|
|
|
20720
21567
|
setSystemSettings((s) => ({ ...s, updateManager: item.value }));
|
|
20721
21568
|
setActiveView("settings");
|
|
20722
21569
|
}
|
|
20723
|
-
}
|
|
21570
|
+
},
|
|
21571
|
+
theme: systemSettings.theme
|
|
20724
21572
|
}
|
|
20725
21573
|
);
|
|
20726
21574
|
case "update":
|
|
@@ -20762,75 +21610,79 @@ Selection: ${val}`,
|
|
|
20762
21610
|
pendingApproval.resolve(item.value);
|
|
20763
21611
|
setPendingApproval(null);
|
|
20764
21612
|
setActiveView("chat");
|
|
20765
|
-
}
|
|
21613
|
+
},
|
|
21614
|
+
theme: systemSettings.theme
|
|
20766
21615
|
}
|
|
20767
21616
|
)));
|
|
20768
21617
|
default:
|
|
20769
|
-
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginTop: 1, flexShrink: 0, width: "100%" }, showBtwBox && btwResponse && /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
21618
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginTop: 1, flexShrink: 0, width: "100%" }, showBtwBox && btwResponse && /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: colors.borderMuted, paddingX: 2, paddingY: 1, width: "100%", marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.text, bold: true, underline: true }, "INQUIRY RESPONSE"), /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted }, "[ ESC to Close ]")), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1, width: "100%" }, /* @__PURE__ */ React16.createElement(CodeRenderer, { text: btwResponse, columns: terminalSize.columns - 6, theme: systemSettings.theme }))), activeSubagents.filter((sa) => sa.status === "running").length > 0 && /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: colors.borderMuted, paddingX: 2, paddingY: 0, width: "100%", marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.text, bold: true }, "ACTIVE SUBAGENTS")), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginTop: 1, width: "100%" }, activeSubagents.filter((sa) => sa.status === "running").map((sa) => /* @__PURE__ */ React16.createElement(SubagentRow, { key: sa.id, sa })))), /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, null, statusText ? /* @__PURE__ */ React16.createElement(Box14, { gap: 1 }, /* @__PURE__ */ React16.createElement(build_default, null), /* @__PURE__ */ React16.createElement(
|
|
20770
21619
|
GlintText_default,
|
|
20771
21620
|
{
|
|
20772
21621
|
text: statusText.trimEnd(),
|
|
20773
|
-
baseColor:
|
|
20774
|
-
glintColor:
|
|
21622
|
+
baseColor: colors.text,
|
|
21623
|
+
glintColor: colors.textMuted,
|
|
20775
21624
|
speed: 60,
|
|
20776
21625
|
italic: true,
|
|
20777
21626
|
glintWidth: 2,
|
|
20778
21627
|
typeSpeed: 10
|
|
20779
21628
|
}
|
|
20780
|
-
), /* @__PURE__ */ React16.createElement(Text16, { color:
|
|
21629
|
+
), /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted }, activeTime > 0 ? `(${activeTime.toFixed(0)}s)` : "")) : /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted, italic: true }, input.length > 0 && escPressCount ? "Press ESC again to clear input" : hasPasteBlock ? "Press CTRL + O to expand" : "Waiting for input...")), /* @__PURE__ */ React16.createElement(Box14, null, (() => {
|
|
20781
21630
|
const status = statusText?.toLowerCase() ?? "";
|
|
20782
|
-
const showWaiting = isProcessing && Date.now() - lastChunkTime > 15e3 && activeSubagents.length === 0 && (status.includes("connecting") || status.includes("working"));
|
|
21631
|
+
const showWaiting = isProcessing && Date.now() - lastChunkTime > 15e3 && activeSubagents.length === 0 && (status.includes("connecting") || status.includes("working") || status.includes("queue"));
|
|
20783
21632
|
if (showWaiting) {
|
|
20784
21633
|
return /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(
|
|
20785
21634
|
GlintText_default,
|
|
20786
21635
|
{
|
|
20787
21636
|
text: "Waiting for API",
|
|
20788
|
-
baseColor:
|
|
20789
|
-
glintColor:
|
|
21637
|
+
baseColor: colors.text,
|
|
21638
|
+
glintColor: colors.textMuted,
|
|
20790
21639
|
glintWidth: 4,
|
|
20791
21640
|
speed: 80
|
|
20792
21641
|
}
|
|
20793
|
-
), /* @__PURE__ */ React16.createElement(Text16, { color:
|
|
21642
|
+
), /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted, dimColor: true }, " \u2503 "));
|
|
20794
21643
|
}
|
|
20795
21644
|
if (wittyPhrase) {
|
|
20796
21645
|
return /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(
|
|
20797
21646
|
GlintText_default,
|
|
20798
21647
|
{
|
|
20799
21648
|
text: wittyPhrase,
|
|
21649
|
+
baseColor: colors.text,
|
|
21650
|
+
glintColor: colors.textMuted,
|
|
20800
21651
|
italic: true,
|
|
20801
21652
|
speed: 80,
|
|
20802
21653
|
typeSpeed: 15
|
|
20803
21654
|
}
|
|
20804
|
-
), /* @__PURE__ */ React16.createElement(Text16, { color:
|
|
21655
|
+
), /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted, dimColor: true }, " \u2503 "));
|
|
20805
21656
|
}
|
|
20806
21657
|
return null;
|
|
20807
21658
|
})(), /* @__PURE__ */ React16.createElement(
|
|
20808
21659
|
GlintText_default,
|
|
20809
21660
|
{
|
|
20810
21661
|
text: tempModelOverride || activeModel.split("/")[1] || activeModel,
|
|
20811
|
-
baseColor:
|
|
20812
|
-
glintColor:
|
|
21662
|
+
baseColor: colors.text,
|
|
21663
|
+
glintColor: colors.textMuted,
|
|
20813
21664
|
glintWidth: 3
|
|
20814
21665
|
}
|
|
20815
|
-
))), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, { width: "100%", height: 1, overflow: "hidden" }, /* @__PURE__ */ React16.createElement(Text16, { color:
|
|
21666
|
+
), /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted, dimColor: true }, " (", thinkingLevel, ")"))), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, { width: "100%", height: 1, overflow: "hidden" }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.inputBorder }, "\u2584".repeat(Math.max(1, terminalSize.columns)))), /* @__PURE__ */ React16.createElement(
|
|
20816
21667
|
Box14,
|
|
20817
21668
|
{
|
|
20818
|
-
backgroundColor:
|
|
21669
|
+
backgroundColor: colors.inputBg,
|
|
20819
21670
|
paddingX: 1,
|
|
20820
21671
|
paddingY: 0,
|
|
20821
21672
|
width: "100%",
|
|
20822
21673
|
flexDirection: "column"
|
|
20823
21674
|
},
|
|
20824
|
-
/* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "row", width: "100%", paddingY: 0 }, /* @__PURE__ */ React16.createElement(Box14, { flexShrink: 0, width: 4 }, /* @__PURE__ */ React16.createElement(Text16, { color:
|
|
21675
|
+
/* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "row", width: "100%", paddingY: 0 }, /* @__PURE__ */ React16.createElement(Box14, { flexShrink: 0, width: 4 }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.inputPrompt, bold: true }, isProcessing || isCompressing ? "\u2726 " : " \u276F ")), /* @__PURE__ */ React16.createElement(Box14, { flexGrow: 1 }, /* @__PURE__ */ React16.createElement(Box14, { flexGrow: 1, position: "relative" }, input === "" && /* @__PURE__ */ React16.createElement(Box14, { position: "absolute", paddingLeft: 0 }, activeCommand && !isTerminalFocused ? /* @__PURE__ */ React16.createElement(Text16, { color: "yellow" }, isTerminalWaitingForInput ? " Terminal is waiting for user input. Press TAB to interact" : " Press TAB to interact with terminal...") : activeCommand && isTerminalFocused ? /* @__PURE__ */ React16.createElement(Text16, { color: "yellow", bold: true }, " [ TERMINAL FOCUSED ] Type to interact, press TAB to exit...") : escPressCount === 1 ? /* @__PURE__ */ React16.createElement(Text16, { color: colors.inputPrompt, bold: true }, " Press ESC again to ", input.length > 0 ? "clear input" : "revert codebase to checkpoint", "...") : /* @__PURE__ */ React16.createElement(Text16, { color: colors.inputPlaceholder }, escPressed ? " Press ESC again to cancel the request." : isCompressing ? " Compacting session history, please wait..." : !isProcessing ? ` Send message, @file or /cmd ... (${terminalEnv.shortcut} for newline)` : " Enter a prompt to steer the agent.")), /* @__PURE__ */ React16.createElement(
|
|
20825
21676
|
MultilineInput,
|
|
20826
21677
|
{
|
|
20827
21678
|
key: `input-${inputKey}`,
|
|
20828
21679
|
onPasteStateChange: setHasPasteBlock,
|
|
20829
21680
|
focus: !isTerminalFocused && !isCompressing,
|
|
20830
21681
|
showCursor: isAppFocused && !isCompressing,
|
|
21682
|
+
cursorColor: colors.inputText,
|
|
20831
21683
|
lastFocusEventTime: lastFocusEventTime.current,
|
|
20832
21684
|
value: input,
|
|
20833
|
-
textStyle: { bold: true },
|
|
21685
|
+
textStyle: { bold: true, color: colors.inputText },
|
|
20834
21686
|
columns: terminalSize.columns,
|
|
20835
21687
|
onChange: (val) => {
|
|
20836
21688
|
const cleanVal = val.replace(/\r\n/g, "\n").replace(/\r/g, "\n").replace(/\\\s*\n/g, "\n");
|
|
@@ -20846,10 +21698,10 @@ Selection: ${val}`,
|
|
|
20846
21698
|
}
|
|
20847
21699
|
}
|
|
20848
21700
|
)))))
|
|
20849
|
-
), /* @__PURE__ */ React16.createElement(Box14, { width: "100%", height: 1, overflow: "hidden" }, /* @__PURE__ */ React16.createElement(Text16, { color:
|
|
21701
|
+
), /* @__PURE__ */ React16.createElement(Box14, { width: "100%", height: 1, overflow: "hidden" }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.inputBorder }, "\u2580".repeat(Math.max(1, terminalSize.columns))))));
|
|
20850
21702
|
}
|
|
20851
21703
|
};
|
|
20852
|
-
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", width: "100%" }, isInitializing ? null : showBridgePromo ? /* @__PURE__ */ React16.createElement(BridgePromo, { width: stdout?.columns || 80, height: stdout?.rows || 24, selectedIndex: promoSelectedIndex, aiProvider }) : /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, flexDirection: "column", width: "100%" }, /* @__PURE__ */ React16.createElement(Static, { key: `static-${clearKey}-${chatId}-${terminalSize.columns}-${terminalSize.rows}`, items: parsedBlocks.completed }, (block) => /* @__PURE__ */ React16.createElement(
|
|
21704
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", width: "100%" }, isInitializing ? null : showBridgePromo ? /* @__PURE__ */ React16.createElement(BridgePromo, { width: stdout?.columns || 80, height: stdout?.rows || 24, selectedIndex: promoSelectedIndex, aiProvider, theme: systemSettings.theme }) : /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, flexDirection: "column", width: "100%" }, /* @__PURE__ */ React16.createElement(Static, { key: `static-${clearKey}-${chatId}-${terminalSize.columns}-${terminalSize.rows}-${systemSettings.theme}`, items: parsedBlocks.completed }, (block) => /* @__PURE__ */ React16.createElement(
|
|
20853
21705
|
BlockItem,
|
|
20854
21706
|
{
|
|
20855
21707
|
key: block.key,
|
|
@@ -20857,7 +21709,8 @@ Selection: ${val}`,
|
|
|
20857
21709
|
columns: (stdout?.columns || 80) - 2,
|
|
20858
21710
|
showFullThinking,
|
|
20859
21711
|
aiProvider,
|
|
20860
|
-
version: versionFluxflow
|
|
21712
|
+
version: versionFluxflow,
|
|
21713
|
+
theme: systemSettings.theme
|
|
20861
21714
|
}
|
|
20862
21715
|
))), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", paddingX: 1, paddingBottom: 0, width: "100%" }, (activeView === "chat" || ["ask", "approval", "terminalApproval"].includes(activeView)) && /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", width: "100%" }, parsedBlocks.active.map((block) => /* @__PURE__ */ React16.createElement(
|
|
20863
21716
|
BlockItem,
|
|
@@ -20867,7 +21720,8 @@ Selection: ${val}`,
|
|
|
20867
21720
|
columns: Math.max(20, (stdout?.columns || 80) - 2),
|
|
20868
21721
|
showFullThinking,
|
|
20869
21722
|
aiProvider,
|
|
20870
|
-
version: versionFluxflow
|
|
21723
|
+
version: versionFluxflow,
|
|
21724
|
+
theme: systemSettings.theme
|
|
20871
21725
|
}
|
|
20872
21726
|
)), activeCommand && /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(TerminalBox, { command: activeCommand, output: execOutput, isFocused: isTerminalFocused, isPty: isActiveCommandPty, terminalHeight: terminalSize.rows, columns: terminalSize.columns }))), isInitializing ? /* @__PURE__ */ React16.createElement(Box14, { borderStyle: "double", borderColor: "grey", padding: 1, flexShrink: 0 }, /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, "Starting Flux Flow...")) : !apiKey ? /* @__PURE__ */ React16.createElement(Box14, { borderStyle: "round", borderColor: "white", padding: 0, flexDirection: "column", flexShrink: 0, width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray", bold: true }, "API KEY REQUIRED")), /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, flexDirection: "column" }, setupStep === 0 ? /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, "Select your Preferred Provider:"), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(
|
|
20873
21727
|
CommandMenu,
|
|
@@ -20891,7 +21745,7 @@ Selection: ${val}`,
|
|
|
20891
21745
|
onSubmit: handleSetup,
|
|
20892
21746
|
mask: "*"
|
|
20893
21747
|
}
|
|
20894
|
-
)), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray", italic: true }, "(Press ESC to go back to provider selection)")))), /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray", italic: true }, setupStep === 0 ? "(Use arrows to select and Enter to confirm)" : "(Press Enter to confirm and initialize)"))) : renderActiveView(), confirmExit && /* @__PURE__ */ React16.createElement(Box14, { borderStyle: "round", borderColor:
|
|
21748
|
+
)), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray", italic: true }, "(Press ESC to go back to provider selection)")))), /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray", italic: true }, setupStep === 0 ? "(Use arrows to select and Enter to confirm)" : "(Press Enter to confirm and initialize)"))) : renderActiveView(), confirmExit && /* @__PURE__ */ React16.createElement(Box14, { borderStyle: "round", borderColor: colors.borderMuted, paddingX: 2, marginY: 0, width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "red", bold: true }, "\u{1F534} EXIT CONFIRMATION: "), /* @__PURE__ */ React16.createElement(Text16, { color: colors.text }, "Press "), /* @__PURE__ */ React16.createElement(Text16, { color: colors.text, bold: true }, "CTRL + C"), /* @__PURE__ */ React16.createElement(Text16, { color: colors.text }, " again to exit (", exitCountdown, "s). Press "), /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted, bold: true }, "ESC"), /* @__PURE__ */ React16.createElement(Text16, { color: colors.text }, " to cancel.")), suggestions.length > 0 && (() => {
|
|
20895
21749
|
const windowSize = 5;
|
|
20896
21750
|
let startIdx = suggestionOffsetRef.current;
|
|
20897
21751
|
let firstSelectableIndex = 0;
|
|
@@ -20922,7 +21776,7 @@ Selection: ${val}`,
|
|
|
20922
21776
|
width: "100%",
|
|
20923
21777
|
marginBottom: 1
|
|
20924
21778
|
},
|
|
20925
|
-
/* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color:
|
|
21779
|
+
/* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.text, bold: true }, suggestions[0]?.cmd?.startsWith("@") || suggestions[0]?.cmd?.startsWith("\\@") ? "FILE SUGGESTIONS" : "COMMAND SUGGESTIONS"), suggestions[0]?.cmd?.startsWith("@") || suggestions[0]?.cmd?.startsWith("\\@") ? /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted, italic: true }, "(Use #Lstart-Lend to specify line numbers)") : input.startsWith("/model") && apiTier === "Free" ? (() => {
|
|
20926
21780
|
let url = "https://aistudio.google.com/billing";
|
|
20927
21781
|
let label = "billing";
|
|
20928
21782
|
if (aiProvider === "DeepSeek") {
|
|
@@ -20935,7 +21789,7 @@ Selection: ${val}`,
|
|
|
20935
21789
|
url = "https://build.nvidia.com/settings/api-keys";
|
|
20936
21790
|
label = "billing";
|
|
20937
21791
|
}
|
|
20938
|
-
return /* @__PURE__ */ React16.createElement(Text16, { color:
|
|
21792
|
+
return /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted, dimColor: true, italic: true }, "Paid API Strategy has more models. Configure ", /* @__PURE__ */ React16.createElement(Text16, { color: colors.secondary, underline: true }, `\x1B]8;;${url}\x07${label}\x1B]8;;\x07`), " & /settings");
|
|
20939
21793
|
})() : null),
|
|
20940
21794
|
visible.slice(0, suggestionVisibleCount).map((s, i) => {
|
|
20941
21795
|
const actualIdx = startIdx + i;
|
|
@@ -20947,14 +21801,14 @@ Selection: ${val}`,
|
|
|
20947
21801
|
{
|
|
20948
21802
|
key: s.cmd,
|
|
20949
21803
|
flexDirection: "row",
|
|
20950
|
-
backgroundColor: isActive ?
|
|
21804
|
+
backgroundColor: isActive ? colors.highlightBg : void 0,
|
|
20951
21805
|
paddingX: 1
|
|
20952
21806
|
},
|
|
20953
|
-
/* @__PURE__ */ React16.createElement(Box14, { width: 3 }, /* @__PURE__ */ React16.createElement(Text16, { color: isActive ?
|
|
21807
|
+
/* @__PURE__ */ React16.createElement(Box14, { width: 3 }, /* @__PURE__ */ React16.createElement(Text16, { color: isActive ? colors.text : colors.textMuted, bold: isActive }, isActive ? " \u276F" : " ")),
|
|
20954
21808
|
/* @__PURE__ */ React16.createElement(Box14, { width: 55 }, /* @__PURE__ */ React16.createElement(
|
|
20955
21809
|
Text16,
|
|
20956
21810
|
{
|
|
20957
|
-
color: isDivider ?
|
|
21811
|
+
color: isDivider ? colors.textDim : isGemmaDisabled ? colors.textMuted : isActive ? colors.text : colors.textDim,
|
|
20958
21812
|
bold: false
|
|
20959
21813
|
},
|
|
20960
21814
|
s.cmd && (s.cmd.startsWith("@[") || s.cmd.startsWith("\\@[")) && s.cmd.endsWith("]") ? (() => {
|
|
@@ -20963,10 +21817,10 @@ Selection: ${val}`,
|
|
|
20963
21817
|
return parts[parts.length - 1];
|
|
20964
21818
|
})() : s.cmd && s.cmd.includes("/") ? s.cmd.split("/").pop() : s.cmd
|
|
20965
21819
|
)),
|
|
20966
|
-
/* @__PURE__ */ React16.createElement(Box14, { flexGrow: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color:
|
|
21820
|
+
/* @__PURE__ */ React16.createElement(Box14, { flexGrow: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: !isActive ? colors.textMuted : colors.text, italic: true }, s.desc))
|
|
20967
21821
|
);
|
|
20968
21822
|
}),
|
|
20969
|
-
suggestions.length > 5 && /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, height: 1 }, remaining > 0 ? /* @__PURE__ */ React16.createElement(Text16, { color:
|
|
21823
|
+
suggestions.length > 5 && /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, height: 1 }, remaining > 0 ? /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted, dimColor: true, italic: true }, " ... (", remaining, " more commands available)") : /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted, dimColor: true, italic: true }, " (End of list)"))
|
|
20970
21824
|
);
|
|
20971
21825
|
})(), /* @__PURE__ */ React16.createElement(Box14, { flexShrink: 0, width: "100%" }, /* @__PURE__ */ React16.createElement(
|
|
20972
21826
|
StatusBar_default,
|
|
@@ -20981,7 +21835,10 @@ Selection: ${val}`,
|
|
|
20981
21835
|
aiProvider,
|
|
20982
21836
|
activeModel,
|
|
20983
21837
|
isProcessing,
|
|
20984
|
-
lastChunkTime
|
|
21838
|
+
lastChunkTime,
|
|
21839
|
+
theme: systemSettings.theme,
|
|
21840
|
+
wps: streamingWordStatsRef.current.wps,
|
|
21841
|
+
showTPMEstimate: systemSettings.showTPMEstimate
|
|
20985
21842
|
}
|
|
20986
21843
|
)), activeView === "exit" && (() => {
|
|
20987
21844
|
const wallTimeMs = Date.now() - SESSION_START_TIME;
|
|
@@ -20990,7 +21847,7 @@ Selection: ${val}`,
|
|
|
20990
21847
|
const agentActiveMs = sessionApiTime + sessionToolTime;
|
|
20991
21848
|
const apiPercent = agentActiveMs > 0 ? (sessionApiTime / agentActiveMs * 100).toFixed(1) : "0.0";
|
|
20992
21849
|
const toolPercent = agentActiveMs > 0 ? (sessionToolTime / agentActiveMs * 100).toFixed(1) : "0.0";
|
|
20993
|
-
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", paddingX: 3, paddingY: 1, borderColor:
|
|
21850
|
+
return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", paddingX: 3, paddingY: 1, borderColor: colors.borderMuted, width: Math.min(100, (stdout?.columns || 100) - 2), marginTop: 0, marginBottom: 0 }, /* @__PURE__ */ React16.createElement(Box14, { marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Text16, { bold: true }, gradient2(["blue", "purple"])("Agent powering down. Goodbye!"))), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column" }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.text, bold: true, underline: true }, "Interaction Summary"), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.secondary }, "Session ID:")), /* @__PURE__ */ React16.createElement(Text16, { color: colors.text }, chatId)), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.secondary }, "Tool Calls:")), /* @__PURE__ */ React16.createElement(Text16, { color: colors.text }, runtimeSession.toolSuccess + runtimeSession.toolFailure + runtimeSession.toolDenied, " ( ", /* @__PURE__ */ React16.createElement(Text16, { color: "green" }, "\u2714 ", runtimeSession.toolSuccess), " ", /* @__PURE__ */ React16.createElement(Text16, { color: "yellow" }, "\u{1F6C7} ", runtimeSession.toolDenied), " ", /* @__PURE__ */ React16.createElement(Text16, { color: "red" }, "\u2718 ", runtimeSession.toolFailure), " )")), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.secondary }, "Success Rate:")), /* @__PURE__ */ React16.createElement(Text16, { color: colors.text }, successRate, "%")), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.secondary }, "Code Changes:")), /* @__PURE__ */ React16.createElement(Text16, { color: colors.text }, /* @__PURE__ */ React16.createElement(Text16, { color: "green" }, "+", runtimeSession.linesAdded), " ", /* @__PURE__ */ React16.createElement(Text16, { color: "red" }, "-", runtimeSession.linesRemoved))), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.secondary }, "Tokens Consumed:")), /* @__PURE__ */ React16.createElement(Text16, { color: colors.text }, formatTokens(sessionTotalTokens))), sessionTotalTokens > 0 && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React16.createElement(Box14, { width: 18 }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted }, "\xBB Input Tokens:")), /* @__PURE__ */ React16.createElement(Text16, { color: colors.text }, formatTokens(sessionTotalTokens - sessionTotalCandidateTokens))), sessionTotalCachedTokens > 0 && /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React16.createElement(Box14, { width: 16 }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted }, "\xBB Cached:")), /* @__PURE__ */ React16.createElement(Text16, { color: colors.text }, formatTokens(sessionTotalCachedTokens))), sessionTotalCandidateTokens > 0 && /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React16.createElement(Box14, { width: 18 }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted }, "\xBB Output Tokens:")), /* @__PURE__ */ React16.createElement(Text16, { color: colors.text }, formatTokens(sessionTotalCandidateTokens)))), sessionImageCount > 0 && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.secondary }, "Images Made:")), /* @__PURE__ */ React16.createElement(Text16, { color: colors.text }, sessionImageCount)), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.secondary }, "Image Credits:")), /* @__PURE__ */ React16.createElement(Text16, { color: colors.text }, Number(((sessionImageCredits || 0) * 1e3).toFixed(0)), " credits")))), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.text, bold: true, underline: true }, "Performance"), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.secondary }, "Wall Time:")), /* @__PURE__ */ React16.createElement(Text16, { color: colors.text }, formatMsDuration(wallTimeMs))), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.secondary }, "Agent Active:")), /* @__PURE__ */ React16.createElement(Text16, { color: colors.text }, formatMsDuration(agentActiveMs))), /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React16.createElement(Box14, { width: 18 }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted }, "\xBB API Time:")), /* @__PURE__ */ React16.createElement(Text16, { color: colors.text }, formatMsDuration(sessionApiTime), " (", apiPercent, "%)")), /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React16.createElement(Box14, { width: 18 }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted }, "\xBB Tool Time:")), /* @__PURE__ */ React16.createElement(Text16, { color: colors.text }, formatMsDuration(sessionToolTime), " (", toolPercent, "%)"))));
|
|
20994
21851
|
})())));
|
|
20995
21852
|
}
|
|
20996
21853
|
var shouldClearValue, getPrefilledValue, getIDEName, getIDEDirName, getKeybindingsPath, parseJsonc, hasShiftEnterBinding, getPromoOptions, BridgePromo, SESSION_START_TIME, CHANGELOG_URL, DOCS_URL, packageJsonPath, packageJson, versionFluxflow, updatedOn, ResolutionModal, parseAgentText, getProjectFiles, cachedShortcut, getLatencyColor2, SubagentRow;
|
|
@@ -21008,6 +21865,7 @@ var init_app = __esm({
|
|
|
21008
21865
|
await init_ai();
|
|
21009
21866
|
init_subagent_state();
|
|
21010
21867
|
init_settings();
|
|
21868
|
+
init_theme();
|
|
21011
21869
|
init_history();
|
|
21012
21870
|
init_ResumeModal();
|
|
21013
21871
|
init_MemoryModal();
|
|
@@ -21107,7 +21965,7 @@ var init_app = __esm({
|
|
|
21107
21965
|
options.push({ label: "Continue to CLI only", action: "dismiss" });
|
|
21108
21966
|
return options;
|
|
21109
21967
|
};
|
|
21110
|
-
BridgePromo = ({ width, height, selectedIndex, aiProvider }) => {
|
|
21968
|
+
BridgePromo = ({ width, height, selectedIndex, aiProvider, theme = "Dark" }) => {
|
|
21111
21969
|
const ideName = getIDEName();
|
|
21112
21970
|
const options = getPromoOptions(ideName);
|
|
21113
21971
|
return /* @__PURE__ */ React16.createElement(
|
|
@@ -21119,7 +21977,7 @@ var init_app = __esm({
|
|
|
21119
21977
|
width,
|
|
21120
21978
|
height
|
|
21121
21979
|
},
|
|
21122
|
-
/* @__PURE__ */ React16.createElement(Box14, { marginBottom: 1, width: Math.min(80, width - 4), justifyContent: "flex-start" }, /* @__PURE__ */ React16.createElement(Text16, null, getFluxLogo(versionFluxflow, aiProvider))),
|
|
21980
|
+
/* @__PURE__ */ React16.createElement(Box14, { marginBottom: 1, width: Math.min(80, width - 4), justifyContent: "flex-start" }, /* @__PURE__ */ React16.createElement(Text16, null, getFluxLogo(versionFluxflow, aiProvider, theme))),
|
|
21123
21981
|
/* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "double", borderColor: "grey", paddingX: 3, paddingY: 1, width: Math.min(80, width - 4) }, /* @__PURE__ */ React16.createElement(Text16, { bold: true, color: "white", textAlign: "center" }, "\u{1F680} UPGRADE YOUR WORKFLOW"), /* @__PURE__ */ React16.createElement(Box14, { marginY: 1, flexDirection: "column", alignItems: "left" }, /* @__PURE__ */ React16.createElement(Text16, null, "You're in ", /* @__PURE__ */ React16.createElement(Text16, { bold: true, color: "cyan" }, ideName), ", but the ", /* @__PURE__ */ React16.createElement(Text16, { bold: true, color: "white" }, "FluxFlow-CLI Companion"), " is not installed."), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginY: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, " \u2705 Real-time IDE context & Error Resolution"), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, " \u2705 Auto-open files created by agent"), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, " \u2705 Native DIFFing for AI edits"), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, " \u2705 Direct IDE context sharing"), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, " \u2705 Surgical Diagnostic Sync"), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, " \u2705 Native Right-Click \u276F Chat integration"), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, " \u2705 Live Status in IDE"), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, " \u2705 Clickable terminal-to-code links"))), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginTop: 1 }, options.map((opt, i) => /* @__PURE__ */ React16.createElement(Box14, { key: i }, /* @__PURE__ */ React16.createElement(Text16, { color: selectedIndex === i ? "yellow" : "white", bold: selectedIndex === i }, selectedIndex === i ? " \u276F " : " ", opt.label)))), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1, alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React16.createElement(Text16, { dimColor: true, italic: true }, "(Use arrows to navigate, Enter to select)")))
|
|
21124
21982
|
);
|
|
21125
21983
|
};
|