fluxflow-cli 3.9.0 → 3.10.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.
Files changed (2) hide show
  1. package/dist/fluxflow.js +1069 -270
  2. 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,
@@ -3252,7 +3253,8 @@ var init_MultilineInput = __esm({
3252
3253
  cursorIndex = 0,
3253
3254
  highlight,
3254
3255
  columns = 80,
3255
- pasteBlocks = []
3256
+ pasteBlocks = [],
3257
+ cursorColor
3256
3258
  }) => {
3257
3259
  const scrollOffsetRef = useRef(0);
3258
3260
  const wrapWidth = useMemo(() => Math.max(20, columns - 10), [columns]);
@@ -3326,10 +3328,10 @@ var init_MultilineInput = __esm({
3326
3328
  }, [focus, showCursor, value, cursorIndex]);
3327
3329
  const cursorStyle = useMemo(() => ({
3328
3330
  ...textStyle,
3329
- color: showCursor && focus && blink ? "white" : void 0,
3331
+ color: showCursor && focus && blink ? cursorColor || "white" : void 0,
3330
3332
  bold: showCursor && focus && blink,
3331
3333
  inverse: showCursor && focus && blink
3332
- }), [textStyle, showCursor, focus, blink]);
3334
+ }), [textStyle, showCursor, focus, blink, cursorColor]);
3333
3335
  const renderLineText = (text, isCursor, col, cStyle) => {
3334
3336
  if (!text) {
3335
3337
  const emptyText = placeholder && value.length === 0 ? formatText(placeholder, true) : "";
@@ -3389,6 +3391,7 @@ var init_MultilineInput = __esm({
3389
3391
  columns = 80,
3390
3392
  useCustomInput = (inputHandler, isActive) => useInput(inputHandler, { isActive }),
3391
3393
  onPasteStateChange,
3394
+ cursorColor,
3392
3395
  ...controlledProps
3393
3396
  }) => {
3394
3397
  const [cursorIndex, setCursorIndex] = useState2(value.length);
@@ -3714,13 +3717,634 @@ var init_MultilineInput = __esm({
3714
3717
  showCursor,
3715
3718
  focus,
3716
3719
  columns,
3717
- pasteBlocks
3720
+ pasteBlocks,
3721
+ cursorColor
3718
3722
  }
3719
3723
  );
3720
3724
  };
3721
3725
  }
3722
3726
  });
3723
3727
 
3728
+ // src/utils/theme.js
3729
+ var CHAOS_PRESETS, THEMES, getThemeColors;
3730
+ var init_theme = __esm({
3731
+ "src/utils/theme.js"() {
3732
+ CHAOS_PRESETS = [
3733
+ {
3734
+ name: "Cyan Cyberpunk",
3735
+ text: "cyan",
3736
+ textMuted: "#4da6b8",
3737
+ textDim: "#2d6d7a",
3738
+ textInverted: "black",
3739
+ border: "cyan",
3740
+ borderMuted: "#1a5966",
3741
+ borderDim: "#0f3840",
3742
+ bg: void 0,
3743
+ cardBg: "#061e24",
3744
+ highlightBg: "#092b33",
3745
+ activeBg: "#0e3e4a",
3746
+ inputBg: "#092b33",
3747
+ inputBorder: "#092b33",
3748
+ inputText: "cyan",
3749
+ inputPlaceholder: "#2d6d7a",
3750
+ inputPrompt: "cyan",
3751
+ codeBg: "#020d10",
3752
+ codeBorder: "#1a5966",
3753
+ userMsgBg: "#092b33",
3754
+ userMsgBorder: "#092b33",
3755
+ userMsgText: "cyan",
3756
+ diffRemovalBg: "#3a0c1a",
3757
+ diffAdditionBg: "#0c3a32",
3758
+ diffRemovalText: "#ff4d88",
3759
+ diffAdditionText: "#00ffaa",
3760
+ diffRemovalHighlightColor: "#ff1a66",
3761
+ diffRemovalHighlightBg: "#590022",
3762
+ diffAdditionHighlightColor: "#00ffcc",
3763
+ diffAdditionHighlightBg: "#00593b",
3764
+ diffRemovalNum: "#ff4d88",
3765
+ diffAdditionNum: "#00ffaa",
3766
+ diffRemovalPrefix: "#ff1a66",
3767
+ diffAdditionPrefix: "#00ffcc",
3768
+ primary: "cyan",
3769
+ secondary: "blue",
3770
+ accent: "magenta",
3771
+ success: "green",
3772
+ warning: "yellow",
3773
+ danger: "red",
3774
+ info: "blue",
3775
+ statusOn: "cyan",
3776
+ statusOff: "#2d6d7a",
3777
+ logoTextAnsi: "\x1B[1;36m",
3778
+ logoBodyAnsi: "\x1B[36m",
3779
+ logoMutedAnsi: "\x1B[90m",
3780
+ logoGradient: ["#00ffff", "#0088ff"]
3781
+ },
3782
+ {
3783
+ name: "Magenta Vaporwave",
3784
+ text: "magenta",
3785
+ textMuted: "#c451d6",
3786
+ textDim: "#7d2b8a",
3787
+ textInverted: "black",
3788
+ border: "magenta",
3789
+ borderMuted: "#5e1b69",
3790
+ borderDim: "#3b0f42",
3791
+ bg: void 0,
3792
+ cardBg: "#240729",
3793
+ highlightBg: "#310938",
3794
+ activeBg: "#470e52",
3795
+ inputBg: "#310938",
3796
+ inputBorder: "#310938",
3797
+ inputText: "magenta",
3798
+ inputPlaceholder: "#7d2b8a",
3799
+ inputPrompt: "magenta",
3800
+ codeBg: "#100312",
3801
+ codeBorder: "#5e1b69",
3802
+ userMsgBg: "#310938",
3803
+ userMsgBorder: "#310938",
3804
+ userMsgText: "magenta",
3805
+ diffRemovalBg: "#3a0c20",
3806
+ diffAdditionBg: "#200c3a",
3807
+ diffRemovalText: "#ff4d94",
3808
+ diffAdditionText: "#aa4dff",
3809
+ diffRemovalHighlightColor: "#ff1a75",
3810
+ diffRemovalHighlightBg: "#59002b",
3811
+ diffAdditionHighlightColor: "#bb66ff",
3812
+ diffAdditionHighlightBg: "#3b0059",
3813
+ diffRemovalNum: "#ff4d94",
3814
+ diffAdditionNum: "#aa4dff",
3815
+ diffRemovalPrefix: "#ff1a75",
3816
+ diffAdditionPrefix: "#bb66ff",
3817
+ primary: "magenta",
3818
+ secondary: "cyan",
3819
+ accent: "purple",
3820
+ success: "green",
3821
+ warning: "yellow",
3822
+ danger: "red",
3823
+ info: "blue",
3824
+ statusOn: "magenta",
3825
+ statusOff: "#7d2b8a",
3826
+ logoTextAnsi: "\x1B[1;35m",
3827
+ logoBodyAnsi: "\x1B[35m",
3828
+ logoMutedAnsi: "\x1B[90m",
3829
+ logoGradient: ["#ff00ff", "#8800ff"]
3830
+ },
3831
+ {
3832
+ name: "Glitch Matrix",
3833
+ text: "#00ff41",
3834
+ textMuted: "#00b32d",
3835
+ textDim: "#00661a",
3836
+ textInverted: "black",
3837
+ border: "#00ff41",
3838
+ borderMuted: "#008020",
3839
+ borderDim: "#004d13",
3840
+ bg: void 0,
3841
+ cardBg: "#0d1f0d",
3842
+ highlightBg: "#122912",
3843
+ activeBg: "#1c3e1c",
3844
+ inputBg: "#122912",
3845
+ inputBorder: "#122912",
3846
+ inputText: "#00ff41",
3847
+ inputPlaceholder: "#00b32d",
3848
+ inputPrompt: "#ffff00",
3849
+ codeBg: "#040a04",
3850
+ codeBorder: "#008020",
3851
+ userMsgBg: "#122912",
3852
+ userMsgBorder: "#122912",
3853
+ userMsgText: "#00ff41",
3854
+ diffRemovalBg: "#3a001a",
3855
+ diffAdditionBg: "#003a10",
3856
+ diffRemovalText: "#ff0055",
3857
+ diffAdditionText: "#00ff66",
3858
+ diffRemovalHighlightColor: "#ff0033",
3859
+ diffRemovalHighlightBg: "#59001b",
3860
+ diffAdditionHighlightColor: "#33ff88",
3861
+ diffAdditionHighlightBg: "#005918",
3862
+ diffRemovalNum: "#ff0055",
3863
+ diffAdditionNum: "#00ff66",
3864
+ diffRemovalPrefix: "#ff0033",
3865
+ diffAdditionPrefix: "#33ff88",
3866
+ primary: "#00ff41",
3867
+ secondary: "yellow",
3868
+ accent: "cyan",
3869
+ success: "#00ff41",
3870
+ warning: "yellow",
3871
+ danger: "red",
3872
+ info: "cyan",
3873
+ statusOn: "#00ff41",
3874
+ statusOff: "#00661a",
3875
+ logoTextAnsi: "\x1B[1;32m",
3876
+ logoBodyAnsi: "\x1B[32m",
3877
+ logoMutedAnsi: "\x1B[90m",
3878
+ logoGradient: ["#00ff41", "#ffff00"]
3879
+ },
3880
+ {
3881
+ name: "Warm Sunset",
3882
+ text: "#ffaa55",
3883
+ textMuted: "#cc8844",
3884
+ textDim: "#885522",
3885
+ textInverted: "black",
3886
+ border: "#ff9933",
3887
+ borderMuted: "#aa6622",
3888
+ borderDim: "#663311",
3889
+ bg: void 0,
3890
+ cardBg: "#24180f",
3891
+ highlightBg: "#2e1e12",
3892
+ activeBg: "#422c1b",
3893
+ inputBg: "#2e1e12",
3894
+ inputBorder: "#2e1e12",
3895
+ inputText: "#ffaa55",
3896
+ inputPlaceholder: "#885522",
3897
+ inputPrompt: "#ff7733",
3898
+ codeBg: "#120c08",
3899
+ codeBorder: "#aa6622",
3900
+ userMsgBg: "#2e1e12",
3901
+ userMsgBorder: "#2e1e12",
3902
+ userMsgText: "#ffaa55",
3903
+ diffRemovalBg: "#3d120c",
3904
+ diffAdditionBg: "#3a2e0c",
3905
+ diffRemovalText: "#ff5544",
3906
+ diffAdditionText: "#ffcc33",
3907
+ diffRemovalHighlightColor: "#ff3322",
3908
+ diffRemovalHighlightBg: "#591108",
3909
+ diffAdditionHighlightColor: "#ffee44",
3910
+ diffAdditionHighlightBg: "#594400",
3911
+ diffRemovalNum: "#ff5544",
3912
+ diffAdditionNum: "#ffcc33",
3913
+ diffRemovalPrefix: "#ff3322",
3914
+ diffAdditionPrefix: "#ffee44",
3915
+ primary: "#ffaa55",
3916
+ secondary: "#ff7733",
3917
+ accent: "magenta",
3918
+ success: "#ffcc33",
3919
+ warning: "#ff7733",
3920
+ danger: "#ff3322",
3921
+ info: "#ffaa55",
3922
+ statusOn: "#ffaa55",
3923
+ statusOff: "#885522",
3924
+ logoTextAnsi: "\x1B[1;33m",
3925
+ logoBodyAnsi: "\x1B[33m",
3926
+ logoMutedAnsi: "\x1B[90m",
3927
+ logoGradient: ["#ff9933", "#ff0055"]
3928
+ },
3929
+ {
3930
+ name: "Sakura Blossom",
3931
+ text: "#ffc0e0",
3932
+ textMuted: "#d98cb3",
3933
+ textDim: "#804d66",
3934
+ textInverted: "black",
3935
+ border: "#ff99cc",
3936
+ borderMuted: "#aa4d7a",
3937
+ borderDim: "#662647",
3938
+ bg: void 0,
3939
+ cardBg: "#291320",
3940
+ highlightBg: "#331826",
3941
+ activeBg: "#472235",
3942
+ inputBg: "#331826",
3943
+ inputBorder: "#331826",
3944
+ inputText: "#ffc0e0",
3945
+ inputPlaceholder: "#804d66",
3946
+ inputPrompt: "#ff99cc",
3947
+ codeBg: "#140a10",
3948
+ codeBorder: "#aa4d7a",
3949
+ userMsgBg: "#331826",
3950
+ userMsgBorder: "#331826",
3951
+ userMsgText: "#ffc0e0",
3952
+ diffRemovalBg: "#3e0c1b",
3953
+ diffAdditionBg: "#1b3e2b",
3954
+ diffRemovalText: "#ff6699",
3955
+ diffAdditionText: "#66ffb3",
3956
+ diffRemovalHighlightColor: "#ff3377",
3957
+ diffRemovalHighlightBg: "#590022",
3958
+ diffAdditionHighlightColor: "#33ff99",
3959
+ diffAdditionHighlightBg: "#00592e",
3960
+ diffRemovalNum: "#ff6699",
3961
+ diffAdditionNum: "#66ffb3",
3962
+ diffRemovalPrefix: "#ff3377",
3963
+ diffAdditionPrefix: "#33ff99",
3964
+ primary: "#ffc0e0",
3965
+ secondary: "#ff99cc",
3966
+ accent: "magenta",
3967
+ success: "#66ffb3",
3968
+ warning: "yellow",
3969
+ danger: "#ff3377",
3970
+ info: "#ff99cc",
3971
+ statusOn: "#ffc0e0",
3972
+ statusOff: "#804d66",
3973
+ logoTextAnsi: "\x1B[1;35m",
3974
+ logoBodyAnsi: "\x1B[35m",
3975
+ logoMutedAnsi: "\x1B[90m",
3976
+ logoGradient: ["#ffb3d9", "#ff3399"]
3977
+ }
3978
+ ];
3979
+ THEMES = {
3980
+ Dark: {
3981
+ id: "Dark",
3982
+ name: "Dark (Default)",
3983
+ // Base Colors
3984
+ text: "white",
3985
+ textMuted: "gray",
3986
+ textDim: "grey",
3987
+ textInverted: "black",
3988
+ // Borders
3989
+ border: "white",
3990
+ borderMuted: "gray",
3991
+ borderDim: "grey",
3992
+ // Backgrounds
3993
+ bg: void 0,
3994
+ cardBg: "#1e1e1e",
3995
+ highlightBg: "#2a2a2a",
3996
+ activeBg: "#3a3a3a",
3997
+ // Input Box Colors
3998
+ inputBg: "#555555",
3999
+ inputBorder: "#555555",
4000
+ inputText: "white",
4001
+ inputPlaceholder: "#cccccc",
4002
+ inputPrompt: "white",
4003
+ // Code & Message Component Colors
4004
+ codeBg: "#1a1a1a",
4005
+ codeBorder: "#444444",
4006
+ userMsgBg: "#444444",
4007
+ userMsgBorder: "#444444",
4008
+ userMsgText: "white",
4009
+ // Diff Component Palette
4010
+ diffRemovalBg: "#3a0c0c",
4011
+ diffAdditionBg: "#0c3a1a",
4012
+ diffRemovalText: "#885555",
4013
+ diffAdditionText: "#558866",
4014
+ diffRemovalHighlightColor: "#ff3333",
4015
+ diffRemovalHighlightBg: "#5a1818",
4016
+ diffAdditionHighlightColor: "#33ff66",
4017
+ diffAdditionHighlightBg: "#185a25",
4018
+ diffRemovalNum: "#d96868",
4019
+ diffAdditionNum: "#68d98c",
4020
+ diffRemovalPrefix: "#ff4d4d",
4021
+ diffAdditionPrefix: "#4dff88",
4022
+ // Accents & Indicators
4023
+ primary: "white",
4024
+ secondary: "cyan",
4025
+ accent: "magenta",
4026
+ success: "green",
4027
+ warning: "yellow",
4028
+ danger: "red",
4029
+ info: "blue",
4030
+ // Status Indicators
4031
+ statusOn: "white",
4032
+ statusOff: "gray",
4033
+ // Logo / Terminal ANSI Colors
4034
+ logoTextAnsi: "\x1B[1;37m",
4035
+ logoBodyAnsi: "\x1B[37m",
4036
+ logoMutedAnsi: "\x1B[90m",
4037
+ logoGradient: ["#0077ff", "#ff00ff"]
4038
+ },
4039
+ Light: {
4040
+ id: "Light",
4041
+ name: "Light",
4042
+ // Base Colors
4043
+ text: "black",
4044
+ textMuted: "gray",
4045
+ textDim: "grey",
4046
+ textInverted: "white",
4047
+ // Borders
4048
+ border: "black",
4049
+ borderMuted: "gray",
4050
+ borderDim: "grey",
4051
+ // Backgrounds
4052
+ bg: void 0,
4053
+ cardBg: "#e5e5e5",
4054
+ highlightBg: "#d4d4d4",
4055
+ activeBg: "#c0c0c0",
4056
+ // Input Box Colors
4057
+ inputBg: "#d0d0d0",
4058
+ inputBorder: "#d0d0d0",
4059
+ inputText: "black",
4060
+ inputPlaceholder: "#555555",
4061
+ inputPrompt: "black",
4062
+ // Code & Message Component Colors
4063
+ codeBg: "#e8e8e8",
4064
+ codeBorder: "#b0b0b0",
4065
+ userMsgBg: "#d0d0d0",
4066
+ userMsgBorder: "#d0d0d0",
4067
+ userMsgText: "black",
4068
+ // Diff Component Palette
4069
+ diffRemovalBg: "#fce8e8",
4070
+ diffAdditionBg: "#e6f9e6",
4071
+ diffRemovalText: "#661111",
4072
+ diffAdditionText: "#115511",
4073
+ diffRemovalHighlightColor: "#440000",
4074
+ diffRemovalHighlightBg: "#f8b4b4",
4075
+ diffAdditionHighlightColor: "#003300",
4076
+ diffAdditionHighlightBg: "#a6ebad",
4077
+ diffRemovalNum: "#c02020",
4078
+ diffAdditionNum: "#188028",
4079
+ diffRemovalPrefix: "#d01010",
4080
+ diffAdditionPrefix: "#109020",
4081
+ // Accents & Indicators
4082
+ primary: "black",
4083
+ secondary: "blue",
4084
+ accent: "magenta",
4085
+ success: "green",
4086
+ warning: "yellow",
4087
+ danger: "red",
4088
+ info: "blue",
4089
+ // Status Indicators
4090
+ statusOn: "black",
4091
+ statusOff: "gray",
4092
+ // Logo / Terminal ANSI Colors
4093
+ logoTextAnsi: "\x1B[1;30m",
4094
+ logoBodyAnsi: "\x1B[30m",
4095
+ logoMutedAnsi: "\x1B[38;5;244m",
4096
+ logoGradient: ["#0077ff", "#ff00ff"]
4097
+ },
4098
+ "GitHub Dark": {
4099
+ id: "GitHub Dark",
4100
+ name: "GitHub Dark",
4101
+ // Base Colors
4102
+ text: "#c9d1d9",
4103
+ textMuted: "#8b949e",
4104
+ textDim: "#6e7681",
4105
+ textInverted: "#0d1117",
4106
+ // Borders
4107
+ border: "#30363d",
4108
+ borderMuted: "#30363d",
4109
+ borderDim: "#21262d",
4110
+ // Backgrounds
4111
+ bg: void 0,
4112
+ cardBg: "#161b22",
4113
+ highlightBg: "#21262d",
4114
+ activeBg: "#30363d",
4115
+ // Input Box Colors
4116
+ inputBg: "#21262d",
4117
+ inputBorder: "#21262d",
4118
+ inputText: "#c9d1d9",
4119
+ inputPlaceholder: "#8b949e",
4120
+ inputPrompt: "#58a6ff",
4121
+ // Code & Message Component Colors
4122
+ codeBg: "#0d1117",
4123
+ codeBorder: "#30363d",
4124
+ userMsgBg: "#21262d",
4125
+ userMsgBorder: "#21262d",
4126
+ userMsgText: "#c9d1d9",
4127
+ // Diff Component Palette
4128
+ diffRemovalBg: "#3c1e1e",
4129
+ diffAdditionBg: "#11381e",
4130
+ diffRemovalText: "#f85149",
4131
+ diffAdditionText: "#3fb950",
4132
+ diffRemovalHighlightColor: "#ff7b72",
4133
+ diffRemovalHighlightBg: "#701c1c",
4134
+ diffAdditionHighlightColor: "#56d364",
4135
+ diffAdditionHighlightBg: "#116329",
4136
+ diffRemovalNum: "#f85149",
4137
+ diffAdditionNum: "#3fb950",
4138
+ diffRemovalPrefix: "#f85149",
4139
+ diffAdditionPrefix: "#3fb950",
4140
+ // Accents & Indicators
4141
+ primary: "#c9d1d9",
4142
+ secondary: "#58a6ff",
4143
+ accent: "#bc8cff",
4144
+ success: "#3fb950",
4145
+ warning: "#d29922",
4146
+ danger: "#f85149",
4147
+ info: "#58a6ff",
4148
+ // Status Indicators
4149
+ statusOn: "#58a6ff",
4150
+ statusOff: "#8b949e",
4151
+ // Logo / Terminal ANSI Colors
4152
+ logoTextAnsi: "\x1B[1;36m",
4153
+ logoBodyAnsi: "\x1B[37m",
4154
+ logoMutedAnsi: "\x1B[90m",
4155
+ logoGradient: ["#2ea043", "#56d364"]
4156
+ },
4157
+ "GitHub Light": {
4158
+ id: "GitHub Light",
4159
+ name: "GitHub Light",
4160
+ // Base Colors
4161
+ text: "#24292f",
4162
+ textMuted: "#57606a",
4163
+ textDim: "#6e7781",
4164
+ textInverted: "#ffffff",
4165
+ // Borders
4166
+ border: "#d0d7de",
4167
+ borderMuted: "#d0d7de",
4168
+ borderDim: "#e1e4e8",
4169
+ // Backgrounds
4170
+ bg: void 0,
4171
+ cardBg: "#f6f8fa",
4172
+ highlightBg: "#eaeef2",
4173
+ activeBg: "#d0d7de",
4174
+ // Input Box Colors
4175
+ inputBg: "#eaeef2",
4176
+ inputBorder: "#eaeef2",
4177
+ inputText: "#24292f",
4178
+ inputPlaceholder: "#57606a",
4179
+ inputPrompt: "#0969da",
4180
+ // Code & Message Component Colors
4181
+ codeBg: "#ffffff",
4182
+ codeBorder: "#d0d7de",
4183
+ userMsgBg: "#eaeef2",
4184
+ userMsgBorder: "#eaeef2",
4185
+ userMsgText: "#24292f",
4186
+ // Diff Component Palette
4187
+ diffRemovalBg: "#ffebe9",
4188
+ diffAdditionBg: "#e6ffec",
4189
+ diffRemovalText: "#cf222e",
4190
+ diffAdditionText: "#1a7f37",
4191
+ diffRemovalHighlightColor: "#82071e",
4192
+ diffRemovalHighlightBg: "#ffc1c0",
4193
+ diffAdditionHighlightColor: "#116329",
4194
+ diffAdditionHighlightBg: "#acf2bd",
4195
+ diffRemovalNum: "#cf222e",
4196
+ diffAdditionNum: "#1a7f37",
4197
+ diffRemovalPrefix: "#cf222e",
4198
+ diffAdditionPrefix: "#1a7f37",
4199
+ // Accents & Indicators
4200
+ primary: "#24292f",
4201
+ secondary: "#0969da",
4202
+ accent: "#8250df",
4203
+ success: "#1a7f37",
4204
+ warning: "#9a6700",
4205
+ danger: "#cf222e",
4206
+ info: "#0969da",
4207
+ // Status Indicators
4208
+ statusOn: "#0969da",
4209
+ statusOff: "#57606a",
4210
+ // Logo / Terminal ANSI Colors
4211
+ logoTextAnsi: "\x1B[1;34m",
4212
+ logoBodyAnsi: "\x1B[30m",
4213
+ logoMutedAnsi: "\x1B[38;5;244m",
4214
+ logoGradient: ["#1a7f37", "#2da44e"]
4215
+ },
4216
+ "Transparent Dark": {
4217
+ id: "Transparent Dark",
4218
+ name: "Transparent Dark",
4219
+ // Base Colors
4220
+ text: "white",
4221
+ textMuted: "gray",
4222
+ textDim: "grey",
4223
+ textInverted: "black",
4224
+ // Borders
4225
+ border: "gray",
4226
+ borderMuted: "gray",
4227
+ borderDim: "grey",
4228
+ // Backgrounds (All transparent / undefined)
4229
+ bg: void 0,
4230
+ cardBg: void 0,
4231
+ highlightBg: "#2a2a2a",
4232
+ activeBg: "#3a3a3a",
4233
+ // Input Box Colors
4234
+ inputBg: "#555555",
4235
+ inputBorder: "#555555",
4236
+ inputText: "white",
4237
+ inputPlaceholder: "#cccccc",
4238
+ inputPrompt: "white",
4239
+ // Code & Message Component Colors
4240
+ codeBg: void 0,
4241
+ codeBorder: "gray",
4242
+ userMsgBg: "#555555",
4243
+ userMsgBorder: "#555555",
4244
+ userMsgText: "white",
4245
+ // Diff Component Palette (Transparent background, colored lines)
4246
+ diffRemovalBg: void 0,
4247
+ diffAdditionBg: void 0,
4248
+ diffRemovalText: "#ff6666",
4249
+ diffAdditionText: "#66ff66",
4250
+ diffRemovalHighlightColor: "#ff3333",
4251
+ diffRemovalHighlightBg: void 0,
4252
+ diffAdditionHighlightColor: "#33ff66",
4253
+ diffAdditionHighlightBg: void 0,
4254
+ diffRemovalNum: "#ff6666",
4255
+ diffAdditionNum: "#66ff66",
4256
+ diffRemovalPrefix: "#ff4d4d",
4257
+ diffAdditionPrefix: "#4dff88",
4258
+ // Accents & Indicators
4259
+ primary: "white",
4260
+ secondary: "cyan",
4261
+ accent: "magenta",
4262
+ success: "green",
4263
+ warning: "yellow",
4264
+ danger: "red",
4265
+ info: "blue",
4266
+ // Status Indicators
4267
+ statusOn: "white",
4268
+ statusOff: "gray",
4269
+ // Logo / Terminal ANSI Colors
4270
+ logoTextAnsi: "\x1B[1;37m",
4271
+ logoBodyAnsi: "\x1B[37m",
4272
+ logoMutedAnsi: "\x1B[90m",
4273
+ logoGradient: ["#0077ff", "#ff00ff"]
4274
+ },
4275
+ "Transparent Light": {
4276
+ id: "Transparent Light",
4277
+ name: "Transparent Light",
4278
+ // Base Colors
4279
+ text: "black",
4280
+ textMuted: "gray",
4281
+ textDim: "grey",
4282
+ textInverted: "white",
4283
+ // Borders
4284
+ border: "gray",
4285
+ borderMuted: "gray",
4286
+ borderDim: "grey",
4287
+ // Backgrounds (All transparent / undefined)
4288
+ bg: void 0,
4289
+ cardBg: void 0,
4290
+ highlightBg: "#d4d4d4",
4291
+ activeBg: "#c0c0c0",
4292
+ // Input Box Colors
4293
+ inputBg: "#d0d0d0",
4294
+ inputBorder: "#d0d0d0",
4295
+ inputText: "black",
4296
+ inputPlaceholder: "#555555",
4297
+ inputPrompt: "black",
4298
+ // Code & Message Component Colors
4299
+ codeBg: void 0,
4300
+ codeBorder: "gray",
4301
+ userMsgBg: "#d0d0d0",
4302
+ userMsgBorder: "#d0d0d0",
4303
+ userMsgText: "black",
4304
+ // Diff Component Palette (Transparent background, colored lines)
4305
+ diffRemovalBg: void 0,
4306
+ diffAdditionBg: void 0,
4307
+ diffRemovalText: "#c02020",
4308
+ diffAdditionText: "#188028",
4309
+ diffRemovalHighlightColor: "#800000",
4310
+ diffRemovalHighlightBg: void 0,
4311
+ diffAdditionHighlightColor: "#004000",
4312
+ diffAdditionHighlightBg: void 0,
4313
+ diffRemovalNum: "#c02020",
4314
+ diffAdditionNum: "#188028",
4315
+ diffRemovalPrefix: "#d01010",
4316
+ diffAdditionPrefix: "#109020",
4317
+ // Accents & Indicators
4318
+ primary: "black",
4319
+ secondary: "blue",
4320
+ accent: "magenta",
4321
+ success: "green",
4322
+ warning: "yellow",
4323
+ danger: "red",
4324
+ info: "blue",
4325
+ // Status Indicators
4326
+ statusOn: "black",
4327
+ statusOff: "gray",
4328
+ // Logo / Terminal ANSI Colors
4329
+ logoTextAnsi: "\x1B[1;30m",
4330
+ logoBodyAnsi: "\x1B[30m",
4331
+ logoMutedAnsi: "\x1B[38;5;244m",
4332
+ logoGradient: ["#0077ff", "#ff00ff"]
4333
+ }
4334
+ };
4335
+ getThemeColors = (themeName = "Dark") => {
4336
+ if (themeName === "Chaos" || themeName === "Mystery") {
4337
+ const randomPreset = CHAOS_PRESETS[Math.floor(Math.random() * CHAOS_PRESETS.length)];
4338
+ return { ...randomPreset, id: "Chaos" };
4339
+ }
4340
+ if (THEMES[themeName]) return THEMES[themeName];
4341
+ if (themeName === "GitHub") return THEMES["GitHub Dark"];
4342
+ if (themeName === "Transparent") return THEMES["Transparent Dark"];
4343
+ return THEMES.Dark;
4344
+ };
4345
+ }
4346
+ });
4347
+
3724
4348
  // src/components/TerminalBox.jsx
3725
4349
  import React3, { useState as useState3 } from "react";
3726
4350
  import { Box as Box2, Text as Text3, useInput as useInput2 } from "ink";
@@ -3728,7 +4352,9 @@ var TerminalBox;
3728
4352
  var init_TerminalBox = __esm({
3729
4353
  "src/components/TerminalBox.jsx"() {
3730
4354
  init_text();
3731
- TerminalBox = React3.memo(({ command, output, completed = false, isFocused = false, columns = 80, isPty = false, terminalHeight = 24 }) => {
4355
+ init_theme();
4356
+ TerminalBox = React3.memo(({ command, output, completed = false, isFocused = false, columns = 80, isPty = false, terminalHeight = 24, theme = "Dark" }) => {
4357
+ const colors = getThemeColors(theme);
3732
4358
  const processPTY = (text) => {
3733
4359
  if (!text) return "";
3734
4360
  const lines = [[]];
@@ -3873,15 +4499,16 @@ var init_TerminalBox = __esm({
3873
4499
  borderRight: false,
3874
4500
  borderTop: true,
3875
4501
  borderBottom: true,
4502
+ borderColor: colors.codeBorder,
3876
4503
  paddingLeft: 2,
3877
4504
  paddingRight: 0,
3878
4505
  paddingY: 1,
3879
4506
  marginY: 1,
3880
4507
  width: columns - 2
3881
4508
  },
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: "white", bold: true }, completed ? "\u{1F3C1} FINISHED:" : "\u26A1 EXECUTING:", " "), /* @__PURE__ */ React3.createElement(Text3, { color: "white" }, command))), isPty && /* @__PURE__ */ React3.createElement(Box2, { flexShrink: 0, paddingX: 1 }, /* @__PURE__ */ React3.createElement(Text3, { color: "green", bold: true }, "ADVANCE"))),
3883
- displayOutput ? /* @__PURE__ */ React3.createElement(Box2, { flexDirection: "column", marginTop: 0, backgroundColor: isPty ? void 0 : "#0a0a0a", 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 ? void 0 : void 0 }, renderedOutput)) : !completed && /* @__PURE__ */ React3.createElement(Box2, { marginTop: 1, backgroundColor: isPty ? void 0 : "#0a0a0a", paddingX: 1, width: "100%" }, /* @__PURE__ */ React3.createElement(Text3, { color: "white", italic: true }, "Waiting for output...")),
3884
- /* @__PURE__ */ React3.createElement(Box2, { justifyContent: "space-between", marginTop: 1 }, !completed ? /* @__PURE__ */ React3.createElement(Text3, { color: "gray", 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: "gray", bold: true }, completed ? "\u25CF ARCHIVED" : isFocused ? "\u25B6 TERMINAL FOCUSED" : "\u25CF LIVE (Press TAB to focus)"))
4509
+ /* @__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"))),
4510
+ 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...")),
4511
+ /* @__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
4512
  );
3886
4513
  });
3887
4514
  }
@@ -4115,6 +4742,7 @@ var getTerminalEnv, emojiSpace, getFluxLogo;
4115
4742
  var init_terminal = __esm({
4116
4743
  "src/utils/terminal.js"() {
4117
4744
  init_gemini_cli();
4745
+ init_theme();
4118
4746
  getTerminalEnv = () => {
4119
4747
  if (process.env.TERM_PROGRAM === "vscode") return "vscode";
4120
4748
  if (process.env.WT_SESSION) return "wt";
@@ -4130,8 +4758,13 @@ var init_terminal = __esm({
4130
4758
  }
4131
4759
  return " ".repeat(baseSpaces);
4132
4760
  };
4133
- getFluxLogo = (version = "...", provider = "Loading...") => {
4761
+ getFluxLogo = (version = "...", provider = "Loading...", theme = "Dark") => {
4134
4762
  const quote = STARTUP_QUOTES[Math.floor(Math.random() * STARTUP_QUOTES.length)];
4763
+ const colors = getThemeColors(theme);
4764
+ const textColor = colors.logoTextAnsi;
4765
+ const bodyColor = colors.logoBodyAnsi;
4766
+ const greyColor = colors.logoMutedAnsi;
4767
+ const reset = "\x1B[0m";
4135
4768
  const art = [
4136
4769
  " \u2588\u2588\u2588 ",
4137
4770
  " \u2591\u2591\u2591\u2588\u2588\u2588 ",
@@ -4142,14 +4775,15 @@ var init_terminal = __esm({
4142
4775
  " \u2588\u2588\u2588\u2591 ",
4143
4776
  " \u2591\u2591\u2591 "
4144
4777
  ];
4145
- const coloredArt = gradient(["#0077ff", "#ff00ff"]).multiline(art.join("\n")).split("\n");
4146
- const grey = (t) => `\x1B[90m${t}\x1B[0m`;
4778
+ const logoGradient = colors.logoGradient || ["#0077ff", "#ff00ff"];
4779
+ const coloredArt = gradient(logoGradient).multiline(art.join("\n")).split("\n");
4780
+ const grey = (t) => `${greyColor}${t}${reset}`;
4147
4781
  return `${coloredArt[0]}
4148
- ${coloredArt[1]} \x1B[1;37mSelected Provider: ${provider}\x1B[0m
4782
+ ${coloredArt[1]} ${textColor}Selected Provider: ${provider}${reset}
4149
4783
  ${coloredArt[2]}
4150
- ${coloredArt[3]} \x1B[1;37mFLUX FLOW ${grey("v" + version)}\x1B[0m
4784
+ ${coloredArt[3]} ${textColor}FLUX FLOW ${grey("v" + version)}${reset}
4151
4785
  ${coloredArt[4]}
4152
- ${coloredArt[5]} \x1B[37mSee /help for additional commands.\x1B[0m
4786
+ ${coloredArt[5]} ${bodyColor}See /help for additional commands.${reset}
4153
4787
  ${coloredArt[6]} ${grey(quote)}
4154
4788
  ${coloredArt[7]}`;
4155
4789
  };
@@ -4166,6 +4800,7 @@ var init_ChatLayout = __esm({
4166
4800
  init_TerminalBox();
4167
4801
  init_text();
4168
4802
  init_terminal();
4803
+ init_theme();
4169
4804
  useStreamingText = (targetText, isStreaming, isActiveBlock) => {
4170
4805
  return targetText;
4171
4806
  };
@@ -4290,20 +4925,22 @@ var init_ChatLayout = __esm({
4290
4925
  return p;
4291
4926
  }));
4292
4927
  };
4293
- InlineMarkdown = React4.memo(({ text, color, italic }) => {
4928
+ InlineMarkdown = React4.memo(({ text, color, italic, theme = "Dark" }) => {
4294
4929
  if (!text) return null;
4930
+ const colors = getThemeColors(theme);
4931
+ const textColor = color || colors.text;
4295
4932
  const parts = text.split(REGEX_MD_TOKENS);
4296
- return /* @__PURE__ */ React4.createElement(Text4, { color, wrap: "anywhere", italic }, parts.map((part, j) => {
4933
+ return /* @__PURE__ */ React4.createElement(Text4, { color: textColor, wrap: "anywhere", italic }, parts.map((part, j) => {
4297
4934
  if (!part) return null;
4298
4935
  if (part.startsWith("```") && part.endsWith("```")) {
4299
4936
  const content = part.slice(3, -3);
4300
4937
  return /* @__PURE__ */ React4.createElement(Text4, { key: j, color: "cyan" }, content);
4301
4938
  }
4302
4939
  if (part.startsWith("**") && part.endsWith("**")) {
4303
- return /* @__PURE__ */ React4.createElement(Text4, { key: j, bold: true, color: "white" }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: part.slice(2, -2), color: "white" }));
4940
+ return /* @__PURE__ */ React4.createElement(Text4, { key: j, bold: true, color: textColor }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: part.slice(2, -2), color: textColor, theme }));
4304
4941
  }
4305
4942
  if (part.startsWith("*") && part.endsWith("*")) {
4306
- return /* @__PURE__ */ React4.createElement(Text4, { key: j, italic: true, color: "white" }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: part.slice(1, -1), color: "white", italic }));
4943
+ 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
4944
  }
4308
4945
  if (part.startsWith("`") && part.endsWith("`")) {
4309
4946
  const content = part.slice(1, -1);
@@ -4336,8 +4973,9 @@ var init_ChatLayout = __esm({
4336
4973
  return renderLatexText(part, j);
4337
4974
  }));
4338
4975
  });
4339
- TableRenderer = React4.memo(({ buffer, terminalWidth = 80 }) => {
4976
+ TableRenderer = React4.memo(({ buffer, terminalWidth = 80, theme = "Dark" }) => {
4340
4977
  if (buffer.length < 2) return null;
4978
+ const colors = getThemeColors(theme);
4341
4979
  const rows = buffer.map((line) => {
4342
4980
  const parts = line.split("|");
4343
4981
  if (parts[0] !== void 0 && parts[0].trim() === "") parts.shift();
@@ -4351,23 +4989,25 @@ var init_ChatLayout = __esm({
4351
4989
  const colChars = Math.floor(availableWidth / header.length) - 2;
4352
4990
  return (
4353
4991
  // Table MarginY here
4354
- /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", borderStyle: "round", borderColor: "#454545ff", paddingX: 1, marginY: 0, width: terminalWidth - 2 }, /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "row", borderStyle: "single", borderBottom: true, borderTop: false, borderLeft: false, borderRight: false, borderColor: "#444", 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" })))), 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: "white" }))))))
4992
+ /* @__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
4993
  );
4356
4994
  });
4357
- MarkdownText = React4.memo(({ text, color = "#D6DAE3", columns = 80, italic = false }) => {
4995
+ MarkdownText = React4.memo(({ text, color, columns = 80, italic = false, theme = "Dark" }) => {
4358
4996
  if (!text) return null;
4997
+ const colors = getThemeColors(theme);
4998
+ const textColor = color || colors.text;
4359
4999
  const lines = text.split("\n");
4360
5000
  const result = [];
4361
5001
  let tableBuffer = [];
4362
5002
  let quoteBuffer = [];
4363
5003
  const flushBuffers = (key) => {
4364
5004
  if (tableBuffer.length > 0) {
4365
- result.push(/* @__PURE__ */ React4.createElement(TableRenderer, { key: `table-${key}`, buffer: [...tableBuffer], terminalWidth: columns }));
5005
+ result.push(/* @__PURE__ */ React4.createElement(TableRenderer, { key: `table-${key}`, buffer: [...tableBuffer], terminalWidth: columns, theme }));
4366
5006
  tableBuffer = [];
4367
5007
  }
4368
5008
  if (quoteBuffer.length > 0) {
4369
5009
  result.push(
4370
- /* @__PURE__ */ React4.createElement(Box3, { key: `quote-${key}`, borderStyle: "bold", borderLeft: true, borderRight: false, borderTop: false, borderBottom: false, borderColor: "gray", paddingLeft: 1, marginY: 1, flexDirection: "column" }, quoteBuffer.map((line, qi) => /* @__PURE__ */ React4.createElement(InlineMarkdown, { key: qi, text: line, color: "gray", italic })))
5010
+ /* @__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
5011
  );
4372
5012
  quoteBuffer = [];
4373
5013
  }
@@ -4389,7 +5029,7 @@ var init_ChatLayout = __esm({
4389
5029
  return;
4390
5030
  }
4391
5031
  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: "#333" }));
5032
+ 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
5033
  return;
4394
5034
  }
4395
5035
  const headingMatch = trimmed.match(/^(#{1,6})\s+(.*)/);
@@ -4397,7 +5037,7 @@ var init_ChatLayout = __esm({
4397
5037
  const level = headingMatch[1].length;
4398
5038
  const hText = headingMatch[2];
4399
5039
  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 ? "purple" : level === 3 ? "yellow" : level === 4 ? "green" : level === 5 ? "blue" : "white", underline: true }, hText))
5040
+ /* @__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
5041
  );
4402
5042
  return;
4403
5043
  }
@@ -4416,22 +5056,23 @@ var init_ChatLayout = __esm({
4416
5056
  content = wrapText(trimmed, columns - 4);
4417
5057
  }
4418
5058
  result.push(
4419
- /* @__PURE__ */ React4.createElement(Box3, { key: i, flexDirection: "column", width: "100%" }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: content, color, italic }))
5059
+ /* @__PURE__ */ React4.createElement(Box3, { key: i, flexDirection: "column", width: "100%" }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: content, color: textColor, italic, theme }))
4420
5060
  );
4421
5061
  }
4422
5062
  });
4423
5063
  flushBuffers("final");
4424
5064
  return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", width: columns - 2 }, result);
4425
5065
  });
4426
- DiffLine = React4.memo(({ line, pairContent, parentText, columns = 80, extension }) => {
5066
+ DiffLine = React4.memo(({ line, pairContent, parentText, columns = 80, extension, theme = "Dark" }) => {
5067
+ const colors = getThemeColors(theme);
4427
5068
  const isContext = line.includes("[UI_CONTEXT]");
4428
5069
  const cleanLine = line.replace("[UI_CONTEXT]", "");
4429
5070
  if (isContext && cleanLine.includes("\u2550")) {
4430
- return /* @__PURE__ */ React4.createElement(Box3, { backgroundColor: "#1a1a1a", paddingX: 1, width: columns }, /* @__PURE__ */ React4.createElement(Text4, { color: "gray" }, "\u2550".repeat(Math.max(10, columns - 4))));
5071
+ 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
5072
  }
4432
5073
  const parsedCurrent = parseLineInfo(line);
4433
5074
  if (!parsedCurrent) {
4434
- return /* @__PURE__ */ React4.createElement(Box3, { backgroundColor: "#1a1a1a", 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))));
5075
+ 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
5076
  }
4436
5077
  const { isR: isRemoval, isA: isAddition, num: lineNum, content } = parsedCurrent;
4437
5078
  let finalPairContent = pairContent;
@@ -4447,19 +5088,19 @@ var init_ChatLayout = __esm({
4447
5088
  }
4448
5089
  const hasInlineChange = words.some((part) => isRemoval && part.removed || isAddition && part.added);
4449
5090
  const isPureUnpairedBlock = !finalPairContent && (isRemoval || isAddition);
4450
- const innerBgColor = isRemoval ? "#3a0c0c" : isAddition ? "#0c3a1a" : void 0;
4451
- const finalNumColor = isRemoval || isAddition ? isRemoval ? "#d96868" : "#68d98c" : "gray";
4452
- const finalPrefixColor = isRemoval ? "#ff4d4d" : "#4dff88";
5091
+ const innerBgColor = isRemoval ? colors.diffRemovalBg : isAddition ? colors.diffAdditionBg : void 0;
5092
+ const finalNumColor = isRemoval || isAddition ? isRemoval ? colors.diffRemovalNum : colors.diffAdditionNum : colors.textMuted;
5093
+ const finalPrefixColor = isRemoval ? colors.diffRemovalPrefix : colors.diffAdditionPrefix;
4453
5094
  const displayPrefix = isRemoval ? "-" : isAddition ? "+" : " ";
4454
5095
  const renderInlineDiff = () => {
4455
5096
  if (isPureUnpairedBlock) {
4456
- const blockColor = isRemoval ? "#ff3333" : "#33ff66";
4457
- const textBgColor = isRemoval ? "#5a1818" : "#185a25";
5097
+ const blockColor = isRemoval ? colors.diffRemovalHighlightColor : colors.diffAdditionHighlightColor;
5098
+ const textBgColor = isRemoval ? colors.diffRemovalHighlightBg : colors.diffAdditionHighlightBg;
4458
5099
  const wrappedLines = wrapText(content, columns - 15).split("\n");
4459
5100
  return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column" }, wrappedLines.map((wl, idx) => /* @__PURE__ */ React4.createElement(Box3, { key: idx }, renderHighlightedLine(wl, extension, blockColor, textBgColor))));
4460
5101
  }
4461
5102
  if (!(isRemoval || isAddition) || words.length === 0 || !hasInlineChange) {
4462
- const textColor = isRemoval ? "#885555" : isAddition ? "#558866" : "gray";
5103
+ const textColor = isRemoval ? colors.diffRemovalText : isAddition ? colors.diffAdditionText : colors.textMuted;
4463
5104
  const textBgColor = void 0;
4464
5105
  const wrappedLines = wrapText(content, columns - 15).split("\n");
4465
5106
  return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column" }, wrappedLines.map((wl, idx) => /* @__PURE__ */ React4.createElement(Box3, { key: idx }, renderHighlightedLine(wl, extension, textColor, textBgColor))));
@@ -4469,25 +5110,26 @@ var init_ChatLayout = __esm({
4469
5110
  if (isRemoval) {
4470
5111
  const isSurroundedByRemoval = words[idx - 1]?.removed || words[idx + 1]?.removed;
4471
5112
  if (part.removed || isWhitespace && isSurroundedByRemoval) {
4472
- return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color: "#ff3333", backgroundColor: "#5a1818" }, part.value);
5113
+ return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color: colors.diffRemovalHighlightColor, backgroundColor: colors.diffRemovalHighlightBg }, part.value);
4473
5114
  }
4474
5115
  if (part.added) return null;
4475
- return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color: "#885555" }, part.value);
5116
+ return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color: colors.diffRemovalText }, part.value);
4476
5117
  }
4477
5118
  if (isAddition) {
4478
5119
  const isSurroundedByAddition = words[idx - 1]?.added || words[idx + 1]?.added;
4479
5120
  if (part.added || isWhitespace && isSurroundedByAddition) {
4480
- return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color: "#33ff66", backgroundColor: "#185a25" }, part.value);
5121
+ return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color: colors.diffAdditionHighlightColor, backgroundColor: colors.diffAdditionHighlightBg }, part.value);
4481
5122
  }
4482
5123
  if (part.removed) return null;
4483
- return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color: "#558866" }, part.value);
5124
+ return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color: colors.diffAdditionText }, part.value);
4484
5125
  }
4485
- return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color: "gray" }, part.value);
5126
+ return /* @__PURE__ */ React4.createElement(Text4, { key: idx, color: colors.textMuted }, part.value);
4486
5127
  }));
4487
5128
  };
4488
- return /* @__PURE__ */ React4.createElement(Box3, { backgroundColor: "#1a1a1a", 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()));
5129
+ 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
5130
  });
4490
- DiffBlock = React4.memo(({ text, columns = 80, extension }) => {
5131
+ DiffBlock = React4.memo(({ text, columns = 80, extension, theme = "Dark" }) => {
5132
+ const colors = getThemeColors(theme);
4491
5133
  const match = text.match(/\[DIFF_START\]([\s\S]*?)(?:\[DIFF_END\]|$)/);
4492
5134
  const diffBody = match ? match[1].trim() : "";
4493
5135
  const diffLines = diffBody.split("\n");
@@ -4513,26 +5155,28 @@ var init_ChatLayout = __esm({
4513
5155
  if (currentGroup.length > 0) {
4514
5156
  alignChangeGroup(currentGroup);
4515
5157
  }
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: "#1a1a1a", 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(
5158
+ 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
5159
  DiffLine,
4518
5160
  {
4519
5161
  key: i,
4520
5162
  line: item.line,
4521
5163
  pairContent: item.pairContent,
4522
5164
  columns: columns - 3,
4523
- extension
5165
+ extension,
5166
+ theme
4524
5167
  }
4525
- )), /* @__PURE__ */ React4.createElement(Box3, { backgroundColor: "#1a1a1a", 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, " ")))));
5168
+ )), /* @__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
5169
  });
4527
- CodeRenderer = React4.memo(({ text, columns = 80 }) => {
5170
+ CodeRenderer = React4.memo(({ text, columns = 80, theme = "Dark" }) => {
4528
5171
  if (!text) return null;
5172
+ const colors = getThemeColors(theme);
4529
5173
  let extension = "";
4530
5174
  const fileMatch = text.match(/File\s+\[(.*?)\]/i);
4531
5175
  if (fileMatch) {
4532
5176
  extension = fileMatch[1].split(".").pop().toLowerCase();
4533
5177
  }
4534
5178
  if (text.includes("[DIFF_START]")) {
4535
- return /* @__PURE__ */ React4.createElement(DiffBlock, { text, columns, extension });
5179
+ return /* @__PURE__ */ React4.createElement(DiffBlock, { text, columns, extension, theme });
4536
5180
  }
4537
5181
  if (text.includes("- Content Preview:")) {
4538
5182
  const mainParts = text.split("- Content Preview:");
@@ -4553,14 +5197,14 @@ var init_ChatLayout = __esm({
4553
5197
  borderRight: false,
4554
5198
  borderTop: false,
4555
5199
  borderBottom: false,
4556
- borderColor: "#444444",
5200
+ borderColor: colors.codeBorder,
4557
5201
  paddingLeft: 2,
4558
5202
  paddingRight: 0,
4559
5203
  width: "100%",
4560
5204
  marginBottom: 1,
4561
- backgroundColor: "#1a1a1a"
5205
+ backgroundColor: colors.codeBg
4562
5206
  },
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, "white")))), /* @__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, " "))))
5207
+ /* @__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
5208
  ));
4565
5209
  }
4566
5210
  if (text.includes("```")) {
@@ -4583,13 +5227,13 @@ var init_ChatLayout = __esm({
4583
5227
  borderRight: false,
4584
5228
  borderTop: false,
4585
5229
  borderBottom: false,
4586
- borderColor: "#444444",
5230
+ borderColor: colors.codeBorder,
4587
5231
  paddingLeft: 2,
4588
5232
  paddingRight: 0,
4589
5233
  width: "100%"
4590
5234
  },
4591
5235
  /* @__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, "#e1e4e8")))))
5236
+ /* @__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
5237
  );
4594
5238
  }
4595
5239
  let cleanPart = part;
@@ -4600,10 +5244,10 @@ var init_ChatLayout = __esm({
4600
5244
  cleanPart = cleanPart.replace(/[\r\n]+$/, "");
4601
5245
  }
4602
5246
  if (!cleanPart) return null;
4603
- return /* @__PURE__ */ React4.createElement(MarkdownText, { key: i, text: cleanPart, columns: columns - 3 });
5247
+ return /* @__PURE__ */ React4.createElement(MarkdownText, { key: i, text: cleanPart, columns: columns - 3, theme });
4604
5248
  }));
4605
5249
  }
4606
- return /* @__PURE__ */ React4.createElement(MarkdownText, { text, columns: columns - 3 });
5250
+ return /* @__PURE__ */ React4.createElement(MarkdownText, { text, columns: columns - 3, theme });
4607
5251
  });
4608
5252
  formatThinkingDuration = (ms) => {
4609
5253
  const totalSecs = Math.round(ms / 1e3);
@@ -4615,39 +5259,39 @@ var init_ChatLayout = __esm({
4615
5259
  }
4616
5260
  return `${totalSecs}s`;
4617
5261
  };
4618
- MessageItem = React4.memo(({ msg, showFullThinking, columns = 80, aiProvider, version }) => {
5262
+ MessageItem = React4.memo(({ msg, showFullThinking, columns = 80, aiProvider, version, theme = "Dark" }) => {
5263
+ const colors = getThemeColors(theme);
4619
5264
  const isDiffResult = msg.role === "system" && (msg.text?.includes("[DIFF_START]") || msg.text?.includes("- Content Preview:"));
4620
5265
  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
5266
  const isTerminalRecord = msg.isTerminalRecord;
4622
5267
  const isHomeWarning = msg.isHomeWarning;
4623
5268
  if (isHomeWarning) {
4624
- return /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 1, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", borderStyle: "round", borderColor: "white", dimColor: true, padding: 0, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "white", bold: true }, msg.text)), /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 0, marginBottom: 0 }, /* @__PURE__ */ React4.createElement(Text4, { color: "white" }, msg.subText))));
5269
+ 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
5270
  }
4626
5271
  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)));
5272
+ return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", alignItems: "flex-start", width: "100%", marginY: 1 }, /* @__PURE__ */ React4.createElement(Text4, null, getFluxLogo(version, aiProvider, theme)));
4628
5273
  }
4629
5274
  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: "grey", paddingX: 3, paddingY: 0 }, /* @__PURE__ */ React4.createElement(Text4, { color: "white", bold: true }, msg.text.trim())));
5275
+ 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
5276
  }
4632
5277
  if (msg.isVisualFeedback) {
4633
5278
  return (
4634
5279
  // [SPACE POINT]
4635
- /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 0, marginTop: 0, paddingX: 0, width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, { color: "white" }, msg.text))
5280
+ /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 0, marginTop: 0, paddingX: 0, width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.text }, msg.text))
4636
5281
  );
4637
5282
  }
4638
5283
  if (isPatchError) {
4639
- return /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 1 }, /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", borderStyle: "round", borderColor: "white", paddingX: 1, paddingY: 0 }, /* @__PURE__ */ React4.createElement(Text4, { color: "white", bold: true, underline: true }, "\u2717 PATCH FAILED"), /* @__PURE__ */ React4.createElement(Box3, { marginTop: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "grey", bold: true }, "Model generated malformed edit."))));
5284
+ 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
5285
  }
4641
5286
  if (msg.role === "system" && msg.text?.includes("[TOOL RESULT]") && !isDiffResult && !isTerminalRecord && !isPatchError) return null;
4642
5287
  if (msg.isImageStats) {
4643
- return /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 1, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", borderStyle: "round", borderColor: "grey", padding: 0, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, backgroundColor: "#0e1b21" }, /* @__PURE__ */ React4.createElement(Text4, { color: "white", 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: "grey" }, line)))));
5288
+ 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
5289
  }
4645
5290
  if (msg.isAskRecord) {
4646
5291
  const selectionMatch = msg.text.match(/Selection: (.*)/);
4647
5292
  const selection = selectionMatch ? selectionMatch[1] : "No selection";
4648
5293
  const questionMatch = msg.text.match(/Question: (.*)/);
4649
5294
  const question = questionMatch ? questionMatch[1] : null;
4650
- const s = emojiSpace(2);
4651
5295
  return /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 0, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(
4652
5296
  Box3,
4653
5297
  {
@@ -4657,7 +5301,7 @@ var init_ChatLayout = __esm({
4657
5301
  borderRight: false,
4658
5302
  borderTop: true,
4659
5303
  borderBottom: true,
4660
- borderColor: "#444444",
5304
+ borderColor: colors.codeBorder,
4661
5305
  paddingLeft: 2,
4662
5306
  paddingRight: 0,
4663
5307
  paddingTop: 1,
@@ -4665,9 +5309,9 @@ var init_ChatLayout = __esm({
4665
5309
  marginY: 1,
4666
5310
  width: columns - 2
4667
5311
  },
4668
- /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "green", bold: true }, "AGENT REQUEST: RESOLVED")),
4669
- question && /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "cyan" }, question)),
4670
- /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1, marginBottom: 0 }, /* @__PURE__ */ React4.createElement(Text4, { color: "white" }, "Selection: ", /* @__PURE__ */ React4.createElement(Text4, { color: "grey", bold: true }, selection)))
5312
+ /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.success, bold: true }, "AGENT REQUEST: RESOLVED")),
5313
+ question && /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.secondary }, question)),
5314
+ /* @__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
5315
  ));
4672
5316
  }
4673
5317
  if (msg.isAboutRecord) {
@@ -4681,11 +5325,11 @@ var init_ChatLayout = __esm({
4681
5325
  paddingRight: 0,
4682
5326
  paddingTop: 1,
4683
5327
  paddingBottom: 1,
4684
- backgroundColor: "#1a1a1a",
5328
+ backgroundColor: colors.codeBg,
4685
5329
  width: "100%"
4686
5330
  },
4687
- /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "white", bold: true }, "ABOUT FLUX FLOW")),
4688
- /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1, marginBottom: 1 }, /* @__PURE__ */ React4.createElement(Text4, null, msg.text))
5331
+ /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.text, bold: true }, "ABOUT FLUX FLOW")),
5332
+ /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1, marginBottom: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.text }, msg.text))
4689
5333
  ));
4690
5334
  }
4691
5335
  if (msg.isUpdateNotification) {
@@ -4699,11 +5343,11 @@ var init_ChatLayout = __esm({
4699
5343
  paddingRight: 0,
4700
5344
  paddingTop: 1,
4701
5345
  paddingBottom: 1,
4702
- backgroundColor: "#1a1a1a",
5346
+ backgroundColor: colors.codeBg,
4703
5347
  width: "100%"
4704
5348
  },
4705
- /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "white", bold: true }, "UPDATE AVAILABLE")),
4706
- /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1, marginBottom: 1 }, /* @__PURE__ */ React4.createElement(CodeRenderer, { text: msg.text, columns }))
5349
+ /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.text, bold: true }, "UPDATE AVAILABLE")),
5350
+ /* @__PURE__ */ React4.createElement(Box3, { paddingX: 1, marginTop: 1, marginBottom: 1 }, /* @__PURE__ */ React4.createElement(CodeRenderer, { text: msg.text, columns, theme }))
4707
5351
  ));
4708
5352
  }
4709
5353
  if (msg.isHelpRecord) {
@@ -4735,7 +5379,7 @@ var init_ChatLayout = __esm({
4735
5379
  { cmd: "/fluxflow", desc: "Project management" },
4736
5380
  { cmd: "/update", desc: "Check/Install updates" }
4737
5381
  ];
4738
- return /* @__PURE__ */ React4.createElement(Box3, { marginBottom: 1, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, { color: "white", 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: "white", bold: true }, c.cmd)), /* @__PURE__ */ React4.createElement(Text4, { color: "gray" }, " - ", c.desc))))));
5382
+ 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
5383
  }
4740
5384
  if (msg.isTerminalRecord) {
4741
5385
  const cmdMatch = msg.text.match(/COMMAND: (.*)/);
@@ -4744,7 +5388,7 @@ var init_ChatLayout = __esm({
4744
5388
  const cmd = cmdMatch ? cmdMatch[1] : "Unknown";
4745
5389
  const isPty = ptyMatch ? ptyMatch[1] === "true" : false;
4746
5390
  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 }));
5391
+ 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
5392
  }
4749
5393
  const [animationDone, setAnimationDone] = React4.useState(!msg.isStreaming);
4750
5394
  const content = React4.useMemo(() => cleanSignals(msg.text), [msg.text]);
@@ -4760,25 +5404,23 @@ var init_ChatLayout = __esm({
4760
5404
  if (msg.role === "agent" && finalContent.trim() === "") {
4761
5405
  return null;
4762
5406
  }
4763
- return (
4764
- // [SPACE POINT]
4765
- /* @__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: "#444444" }, "\u2584".repeat(Math.max(1, columns - 1)))), /* @__PURE__ */ React4.createElement(
4766
- Box3,
4767
- {
4768
- backgroundColor: "#444444",
4769
- paddingX: 1,
4770
- paddingY: 0,
4771
- width: columns - 1,
4772
- flexDirection: "column"
4773
- },
4774
- wrapText(
4775
- finalContent.replace(/\r\n/g, "\n").replace(/\r/g, "\n").replace(/\\\n/g, "\n").replace(/\\$/, ""),
4776
- columns - 7
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
- );
5407
+ 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(
5408
+ Box3,
5409
+ {
5410
+ backgroundColor: colors.userMsgBg,
5411
+ paddingX: 1,
5412
+ paddingY: 0,
5413
+ width: columns - 1,
5414
+ flexDirection: "column"
5415
+ },
5416
+ wrapText(
5417
+ finalContent.replace(/\r\n/g, "\n").replace(/\r/g, "\n").replace(/\\\n/g, "\n").replace(/\\$/, ""),
5418
+ columns - 7
5419
+ ).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 }))))
5420
+ ), /* @__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
5421
  });
4781
- BlockItem = React4.memo(({ block, columns = 80, showFullThinking, aiProvider, version }) => {
5422
+ BlockItem = React4.memo(({ block, columns = 80, showFullThinking, aiProvider, version, theme = "Dark" }) => {
5423
+ const colors = getThemeColors(theme);
4782
5424
  const { msg, type, text, isStreamingMsg, workedDuration } = block;
4783
5425
  if (type === "chunk") {
4784
5426
  return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", width: "100%" }, block.blocks.map((b) => /* @__PURE__ */ React4.createElement(
@@ -4789,7 +5431,8 @@ var init_ChatLayout = __esm({
4789
5431
  columns,
4790
5432
  showFullThinking,
4791
5433
  aiProvider,
4792
- version
5434
+ version,
5435
+ theme
4793
5436
  }
4794
5437
  )));
4795
5438
  }
@@ -4801,17 +5444,18 @@ var init_ChatLayout = __esm({
4801
5444
  showFullThinking,
4802
5445
  columns,
4803
5446
  aiProvider,
4804
- version
5447
+ version,
5448
+ theme
4805
5449
  }
4806
5450
  );
4807
5451
  }
4808
5452
  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: "#F2F2F2" }, "\u2727 Thinking...") : /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: "#F2F2F2" }, "\u2726 Thought..."), showFullThinking && /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "row", width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, { color: "gray" }, "\u2502 ")));
5453
+ 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
5454
  }
4811
5455
  if (type === "think-line") {
4812
5456
  if (!showFullThinking) return null;
4813
5457
  if (!text || text.trim() === "") {
4814
- return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "row", width: "100%", paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "gray" }, "\u2502 "));
5458
+ return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "row", width: "100%", paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.textMuted }, "\u2502 "));
4815
5459
  }
4816
5460
  const animatedText = useStreamingText(text, isStreamingMsg, block.isActiveBlock);
4817
5461
  const trimmed = animatedText.trim();
@@ -4827,32 +5471,33 @@ var init_ChatLayout = __esm({
4827
5471
  content = wrapText(animatedText, columns - 10);
4828
5472
  }
4829
5473
  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: "gray" }, "\u2502 "), /* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1, marginLeft: 1 }, /* @__PURE__ */ React4.createElement(InlineMarkdown, { text: wLine, color: "gray", italic: true })))));
5474
+ 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
5475
  }
4832
5476
  if (type === "think-footer-padding") {
4833
5477
  if (!showFullThinking) return null;
4834
- return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "row", width: "100%", paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: "gray" }, "\u2502 "));
5478
+ return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "row", width: "100%", paddingX: 1 }, /* @__PURE__ */ React4.createElement(Text4, { color: colors.textMuted }, "\u2502 "));
4835
5479
  }
4836
5480
  if (type === "agent-line") {
4837
5481
  if (!text || text.trim() === "") {
4838
5482
  return /* @__PURE__ */ React4.createElement(Box3, { height: 1 });
4839
5483
  }
4840
5484
  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 }));
5485
+ return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(CodeRenderer, { text: animatedText, columns, theme }));
4842
5486
  }
4843
5487
  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 }));
5488
+ return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(TableRenderer, { buffer: text.split("\n"), terminalWidth: columns, theme }));
4845
5489
  }
4846
5490
  if (type === "diff-line") {
4847
5491
  const { isFirstLine, isLastLine } = block;
4848
- const renderPaddingLine = (isEnd = false) => /* @__PURE__ */ React4.createElement(Box3, { backgroundColor: "#1a1a1a", 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, " ")));
5492
+ 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
5493
  return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column" }, isFirstLine && renderPaddingLine(false), /* @__PURE__ */ React4.createElement(
4850
5494
  DiffLine,
4851
5495
  {
4852
5496
  line: text,
4853
5497
  pairContent: block.pairContent,
4854
5498
  parentText: void 0,
4855
- columns
5499
+ columns,
5500
+ theme
4856
5501
  }
4857
5502
  ), isLastLine && renderPaddingLine(true));
4858
5503
  }
@@ -4863,7 +5508,7 @@ var init_ChatLayout = __esm({
4863
5508
  borderRight: false,
4864
5509
  borderTop: false,
4865
5510
  borderBottom: false,
4866
- borderColor: "#444444",
5511
+ borderColor: colors.codeBorder,
4867
5512
  paddingLeft: 2,
4868
5513
  width: "100%"
4869
5514
  };
@@ -4880,12 +5525,12 @@ var init_ChatLayout = __esm({
4880
5525
  borderRight: false,
4881
5526
  borderTop: false,
4882
5527
  borderBottom: false,
4883
- borderColor: "#444444",
5528
+ borderColor: colors.codeBorder,
4884
5529
  paddingLeft: 2,
4885
5530
  width: "100%"
4886
5531
  },
4887
5532
  /* @__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, "#e1e4e8"))
5533
+ /* @__PURE__ */ React4.createElement(Box3, { flexGrow: 1 }, renderHighlightedLine(text, lang, colors.text))
4889
5534
  );
4890
5535
  }
4891
5536
  if (type === "code-fence-close") {
@@ -4898,7 +5543,7 @@ var init_ChatLayout = __esm({
4898
5543
  borderRight: false,
4899
5544
  borderTop: false,
4900
5545
  borderBottom: false,
4901
- borderColor: "#444444",
5546
+ borderColor: colors.codeBorder,
4902
5547
  paddingLeft: 2,
4903
5548
  marginBottom: 1,
4904
5549
  width: "100%"
@@ -4907,7 +5552,7 @@ var init_ChatLayout = __esm({
4907
5552
  );
4908
5553
  }
4909
5554
  if (type === "write-header") {
4910
- return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: columns }, /* @__PURE__ */ React4.createElement(MarkdownText, { text, columns }));
5555
+ return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: columns }, /* @__PURE__ */ React4.createElement(MarkdownText, { text, columns, theme }));
4911
5556
  }
4912
5557
  if (type === "write-line") {
4913
5558
  const { gutterWidth, lineNum, isFirstLine, isLastLine, extension, wrappedLines } = block;
@@ -4921,10 +5566,10 @@ var init_ChatLayout = __esm({
4921
5566
  borderRight: false,
4922
5567
  borderTop: false,
4923
5568
  borderBottom: false,
4924
- borderColor: "#444444",
5569
+ borderColor: colors.codeBorder,
4925
5570
  paddingLeft: 2,
4926
5571
  paddingRight: 0,
4927
- backgroundColor: "#1a1a1a",
5572
+ backgroundColor: colors.codeBg,
4928
5573
  marginBottom: isEnd ? 1 : 0
4929
5574
  },
4930
5575
  /* @__PURE__ */ React4.createElement(Box3, { width: gutterWidth + 2, flexShrink: 0 }, /* @__PURE__ */ React4.createElement(Text4, null, " ".repeat(gutterWidth + 2))),
@@ -4940,24 +5585,24 @@ var init_ChatLayout = __esm({
4940
5585
  borderRight: false,
4941
5586
  borderTop: false,
4942
5587
  borderBottom: false,
4943
- borderColor: "#444444",
5588
+ borderColor: colors.codeBorder,
4944
5589
  paddingLeft: 2,
4945
5590
  paddingRight: 0,
4946
- backgroundColor: "#1a1a1a"
5591
+ backgroundColor: colors.codeBg
4947
5592
  },
4948
5593
  /* @__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, "white"))))
5594
+ /* @__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
5595
  ), isLastLine && renderPaddingLine(true));
4951
5596
  }
4952
5597
  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 }));
5598
+ return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", paddingX: 1, width: columns, marginTop: 1, marginBottom: 1 }, /* @__PURE__ */ React4.createElement(MarkdownText, { text, columns, theme }));
4954
5599
  }
4955
5600
  if (type === "worked-duration") {
4956
- return /* @__PURE__ */ React4.createElement(Box3, { marginTop: 1, marginBottom: 2, paddingX: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(Text4, null, "["), /* @__PURE__ */ React4.createElement(Text4, { color: "gray" }, "Worked for ", /* @__PURE__ */ React4.createElement(Text4, { bold: true, color: "white" }, formatThinkingDuration(workedDuration))), /* @__PURE__ */ React4.createElement(Text4, null, "]"));
5601
+ 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
5602
  }
4958
5603
  return null;
4959
5604
  });
4960
- ChatLayout = React4.memo(({ messages, showFullThinking, columns = 80, aiProvider, version }) => {
5605
+ ChatLayout = React4.memo(({ messages, showFullThinking, columns = 80, aiProvider, version, theme = "Dark" }) => {
4961
5606
  return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", width: "100%" }, messages.map((msg, idx) => /* @__PURE__ */ React4.createElement(
4962
5607
  MessageItem,
4963
5608
  {
@@ -4966,7 +5611,8 @@ var init_ChatLayout = __esm({
4966
5611
  showFullThinking,
4967
5612
  columns,
4968
5613
  aiProvider,
4969
- version
5614
+ version,
5615
+ theme
4970
5616
  }
4971
5617
  )));
4972
5618
  });
@@ -4986,6 +5632,7 @@ var activeGetMemoryInfo, getLatencyColor, StatusBar, StatusBar_default;
4986
5632
  var init_StatusBar = __esm({
4987
5633
  "src/components/StatusBar.jsx"() {
4988
5634
  init_text();
5635
+ init_theme();
4989
5636
  activeGetMemoryInfo = null;
4990
5637
  getLatencyColor = (delay) => {
4991
5638
  if (delay <= 370) return "#00a564";
@@ -5024,7 +5671,8 @@ var init_StatusBar = __esm({
5024
5671
  }
5025
5672
  return "#ff0000";
5026
5673
  };
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 }) => {
5674
+ 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" }) => {
5675
+ const colors = getThemeColors(theme);
5028
5676
  const modeIcon = mode === "Flux" ? "" : "";
5029
5677
  const [memoryUsage, setMemoryUsage] = useState5(0);
5030
5678
  const [memoryLimit, setMemoryLimit] = useState5(0);
@@ -5112,13 +5760,13 @@ var init_StatusBar = __esm({
5112
5760
  paddingX: 1,
5113
5761
  width: "100%"
5114
5762
  },
5115
- /* @__PURE__ */ React5.createElement(Box4, null, /* @__PURE__ */ React5.createElement(Box4, { marginRight: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: "white", bold: true }, mode.toUpperCase())), /* @__PURE__ */ React5.createElement(Text5, { color: "gray", dimColor: true }, "\u2503"), /* @__PURE__ */ React5.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: "white", bold: true }, thinkingLevel.toUpperCase())), isMemoryEnabled && /* @__PURE__ */ React5.createElement(Box4, null, /* @__PURE__ */ React5.createElement(Text5, { color: "gray", dimColor: true }, "\u2503"), /* @__PURE__ */ React5.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: "white", dimColor: true, bold: true }, "MEMORY")))),
5116
- /* @__PURE__ */ React5.createElement(Box4, { flexGrow: 1, justifyContent: "center", paddingX: 2 }, /* @__PURE__ */ React5.createElement(Text5, { color: "white", italic: true }, truncatePath(process.cwd(), 35))),
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), " ", (() => {
5763
+ /* @__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, bold: true }, thinkingLevel.toUpperCase())), isMemoryEnabled && /* @__PURE__ */ React5.createElement(Box4, null, /* @__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")))),
5764
+ /* @__PURE__ */ React5.createElement(Box4, { flexGrow: 1, justifyContent: "center", paddingX: 2 }, /* @__PURE__ */ React5.createElement(Text5, { color: colors.text, italic: true }, truncatePath(process.cwd(), 35))),
5765
+ /* @__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: colors.text }, formatTokens(tokensTotal), " ", (() => {
5118
5766
  const pct = tokens / maxLimit * 100;
5119
- const color = pct < 60 ? "white" : pct < 80 ? "yellow" : "red";
5767
+ const color = pct < 60 ? colors.text : pct < 80 ? colors.warning : colors.danger;
5120
5768
  return /* @__PURE__ */ React5.createElement(Text5, { color, dimColor: true }, pct.toFixed(0), "%");
5121
- })())), /* @__PURE__ */ React5.createElement(Text5, { color: "gray", dimColor: true }, "\u2503"), /* @__PURE__ */ React5.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: "grey", bold: true }, memoryUsage, "/", memoryLimit, " ", memoryUnit)), /* @__PURE__ */ React5.createElement(Text5, { color: "gray", dimColor: true }, "\u2503"), /* @__PURE__ */ React5.createElement(Box4, { marginLeft: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: "gray", bold: true }, chatId), (apiTier === "Custom" || apiTier === "Paid") && /* @__PURE__ */ React5.createElement(Box4, null, /* @__PURE__ */ React5.createElement(Text5, { color: "gray", dimColor: true }, " \u2503 "), /* @__PURE__ */ React5.createElement(Text5, { color: "gray", bold: true }, "PAID"))))
5769
+ })())), /* @__PURE__ */ React5.createElement(Text5, { color: colors.textMuted, dimColor: true }, "\u2503"), /* @__PURE__ */ React5.createElement(Box4, { marginX: 1 }, /* @__PURE__ */ React5.createElement(Text5, { color: colors.textMuted, bold: true }, memoryUsage, "/", memoryLimit, " ", memoryUnit)), /* @__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 }, chatId), (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
5770
  );
5123
5771
  });
5124
5772
  StatusBar_default = StatusBar;
@@ -5129,46 +5777,49 @@ var init_StatusBar = __esm({
5129
5777
  import React6 from "react";
5130
5778
  import { Box as Box5, Text as Text6 } from "ink";
5131
5779
  import SelectInput from "ink-select-input";
5132
- function CommandMenu({ title, subtitle, items, onSelect }) {
5780
+ function CommandMenu({ title, subtitle, items, onSelect, theme = "Dark" }) {
5781
+ const colors = getThemeColors(theme);
5133
5782
  return /* @__PURE__ */ React6.createElement(
5134
5783
  Box5,
5135
5784
  {
5136
5785
  flexDirection: "column",
5137
5786
  borderStyle: "round",
5138
- borderColor: "white",
5787
+ borderColor: colors.borderMuted,
5139
5788
  padding: 0,
5140
5789
  marginTop: 0,
5141
5790
  flexShrink: 0,
5142
5791
  width: "100%"
5143
5792
  },
5144
- title && /* @__PURE__ */ React6.createElement(Box5, { paddingX: 1, paddingY: 0, marginBottom: subtitle ? 0 : 1 }, /* @__PURE__ */ React6.createElement(Text6, { color: "gray", bold: true }, typeof title === "string" ? title.toUpperCase() : title)),
5145
- subtitle && /* @__PURE__ */ React6.createElement(Box5, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React6.createElement(Text6, { color: "gray", italic: true }, " ", subtitle)),
5793
+ 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)),
5794
+ subtitle && /* @__PURE__ */ React6.createElement(Box5, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React6.createElement(Text6, { color: colors.textMuted, italic: true }, " ", subtitle)),
5146
5795
  /* @__PURE__ */ React6.createElement(Box5, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React6.createElement(
5147
5796
  SelectInput,
5148
5797
  {
5149
5798
  items,
5150
5799
  onSelect,
5151
- itemComponent: CustomItem,
5800
+ itemComponent: (props) => /* @__PURE__ */ React6.createElement(CustomItem, { ...props, theme }),
5152
5801
  indicatorComponent: () => null
5153
5802
  }
5154
5803
  )),
5155
- /* @__PURE__ */ React6.createElement(Box5, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React6.createElement(Text6, { color: "gray", italic: true }, "(Arrows to select \u2022 Enter to confirm)"))
5804
+ /* @__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
5805
  );
5157
5806
  }
5158
5807
  var CustomItem;
5159
5808
  var init_CommandMenu = __esm({
5160
5809
  "src/components/CommandMenu.jsx"() {
5161
- CustomItem = ({ label, isSelected }) => {
5810
+ init_theme();
5811
+ CustomItem = ({ label, isSelected, theme = "Dark" }) => {
5812
+ const colors = getThemeColors(theme);
5162
5813
  const isCancel = label === "Cancel" || label === "Back" || label.toLowerCase().includes("exit") || label.toLowerCase().includes("back");
5163
5814
  return /* @__PURE__ */ React6.createElement(
5164
5815
  Box5,
5165
5816
  {
5166
5817
  marginTop: isCancel ? 1 : 0,
5167
- backgroundColor: isSelected ? "#2a2a2a" : void 0,
5818
+ backgroundColor: isSelected ? colors.highlightBg : void 0,
5168
5819
  paddingX: 1,
5169
5820
  width: "100%"
5170
5821
  },
5171
- /* @__PURE__ */ React6.createElement(Text6, { color: isSelected ? "white" : "gray", bold: isSelected }, isSelected ? "\u276F " : " ", label)
5822
+ /* @__PURE__ */ React6.createElement(Text6, { color: isSelected ? colors.text : colors.textMuted, bold: isSelected }, isSelected ? "\u276F " : " ", label)
5172
5823
  );
5173
5824
  };
5174
5825
  }
@@ -5352,17 +6003,18 @@ ${mode === "Flux" ? "- **File Tools >> Code in chat**\n\n" : ""}- COMMUNICATION
5352
6003
  ${mode === "Flux" ? `- WORKSPACE TOOLS (path = relative to CWD & WILL BE FIRST ARGUMENT, path separator: '/') -
5353
6004
  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
6005
  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, variable
5356
- 4. [tool:functions.PatchFile(path="...", replaceContent1="full line/block", newContent1="...", ...MAX 6)]. Surgical Patch. **Multiple patch on same file/path? Use replaceContent2, newContent2 etc >>> multiple spams**. Unsure? ReadFile >> guessing. **MUST VERIFY DIFF**
6006
+ 3. [tool:functions.FileMap(path="path/file")]. Shows file structure, functions, class, import/export, variables
6007
+ 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
6008
  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: auto-detect
6009
+ 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
6010
  7. [tool:functions.Run(command="...")]. Runs ${osDetected === "Windows" ? isPsAvailable() ? `WINDOWS POWERSHELL ONLY` : `WINDOWS CMD ONLY` : `BASH`} command. Destructive/Irreversible ops \u2192 Ask user
5360
6011
  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
6012
  9. [tool:functions.Await(time="seconds")]. For waiting without exiting agent loop, 15s - 180s
5362
6013
  ${advanceRollback ? `
5363
6014
  - EMERGENCY SAFETY TOOLS -
5364
6015
  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. Usage: ONLY in catastrophic situations. Verify nothing catastrophic happened in codebase before ending agent loop. 'id' not needed with getCheckPoint
6016
+ 1. [tool:functions.EmergencyRollback(method="getCheckpoint/forceRevert", id="...")]. Rollback workspace to a specific checkpoint in THIS agent loop
6017
+ Usage: ONLY in catastrophic situations/Codebase Corruption. Verify nothing catastrophic happened in codebase before ending agent loop. 'id' not needed with getCheckPoint
5366
6018
  ` : ""}
5367
6019
  - SUB AGENT TOOLS -
5368
6020
  **PROACTIVE USE OF SUB AGENTS HIGHLY RECOMMENDED, PREFER USING FOR ALL TASK WHERE EVEN SLIGHTLY BENEFICIAL, EVEN WITHOUT EXPLICIT USER NUDGE**
@@ -5370,16 +6022,16 @@ Invocation Types:
5370
6022
  - 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
6023
  - InvokeSync (sync, blocking main agent loop). Usage: Repeatetive work, Sequential tasks, Task delegation. Tokens/Costs savings
5372
6024
  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
6025
+ 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
6026
  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
6027
+ 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
6028
+ 2. [tool:functions.WriteDoc(path="...", content="...")]. A4 Word document, NO WATERMARKS, stable margins & headers/footers
5377
6029
  - WORKSPACE & SUB AGENT TOOLS ARE NOT AVAILABLE IN FLOW`.trim()}
5378
6030
 
5379
6031
  - 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`.trim();
6032
+ - **Escape quotes: \\" for code strings**
6033
+ - **Literal escapes: Double-escape sequences (e.g., \\\\n)**
6034
+ - **File structure: Real newlines for code formatting**`.trim();
5383
6035
  }
5384
6036
  });
5385
6037
 
@@ -6104,6 +6756,17 @@ function SettingsMenu({
6104
6756
  }, []);
6105
6757
  const getCategoryItems = (catId) => {
6106
6758
  switch (catId) {
6759
+ case "providers":
6760
+ return [
6761
+ { label: "Current Provider", value: "aiProvider", status: aiProvider },
6762
+ { label: "Key Strategy", value: "apiTier", status: apiTier === "Free" ? "Free" : quotas?.providerBudgets?.__useProvider ? "Paid" : "Paid" }
6763
+ ];
6764
+ case "appearance":
6765
+ return [
6766
+ { label: "Theme", value: "theme", status: systemSettings.theme || "Dark" },
6767
+ { label: "Loading Phrases", value: "loadingPhrases", status: systemSettings.loadingPhrases !== false ? "ON" : "OFF" },
6768
+ { label: "Progressive Rendering [EXPERIMENTAL]", value: "progressiveRendering", status: systemSettings.progressiveRendering ? "ON" : "OFF" }
6769
+ ];
6107
6770
  case "memory":
6108
6771
  return [
6109
6772
  { label: "Toggle Memory", value: "memory", status: systemSettings.memory ? "ON" : "OFF" }
@@ -6126,15 +6789,11 @@ function SettingsMenu({
6126
6789
  case "updater":
6127
6790
  return [
6128
6791
  { label: "Auto-Update", value: "autoUpdate", status: systemSettings.autoUpdate ? "ON" : "OFF" },
6129
- { label: "Preferred Updater", value: "updateManager", status: (systemSettings.updateManager || "npm") === "custom" ? "Custom" : (systemSettings.updateManager || "npm").toUpperCase() }
6792
+ { label: "Preferred Package Manager", value: "updateManager", status: (systemSettings.updateManager || "npm") === "custom" ? "Custom" : (systemSettings.updateManager || "npm").toUpperCase() }
6130
6793
  ];
6131
6794
  case "other":
6132
6795
  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
6796
  { 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
6797
  { label: "Download Language Parsers", value: "parserDownload", status: "ACTION" }
6139
6798
  ];
6140
6799
  default:
@@ -6309,30 +6968,41 @@ function SettingsMenu({
6309
6968
  saveSettings2({ systemSettings: newSysSettings, apiTier, quotas });
6310
6969
  return newSysSettings;
6311
6970
  });
6971
+ } else if (item.value === "theme") {
6972
+ const options = ["Dark", "Light", "GitHub Dark", "GitHub Light", "Transparent Dark", "Transparent Light", "Chaos"];
6973
+ const activeTheme = systemSettings.theme === "Mystery" ? "Chaos" : systemSettings.theme || "Dark";
6974
+ const currentIndex = options.indexOf(activeTheme);
6975
+ const nextIndex = (currentIndex + 1) % options.length;
6976
+ setSystemSettings((s) => {
6977
+ const newSysSettings = { ...s, theme: options[nextIndex] };
6978
+ saveSettings2({ systemSettings: newSysSettings, apiTier, quotas });
6979
+ return newSysSettings;
6980
+ });
6312
6981
  }
6313
6982
  };
6314
- return /* @__PURE__ */ React7.createElement(Box6, { flexDirection: "column", borderStyle: "round", borderColor: "white", padding: 0, width: "100%", minHeight: 32 }, /* @__PURE__ */ React7.createElement(Box6, { paddingX: 1, paddingY: 0, marginBottom: 0, borderStyle: "single", borderColor: "gray", width: "100%" }, /* @__PURE__ */ React7.createElement(Text7, { color: "white", bold: true }, "SYSTEM CONFIGURATION")), /* @__PURE__ */ React7.createElement(Box6, { flexDirection: "row", width: "100%", minHeight: 26 }, /* @__PURE__ */ React7.createElement(Box6, { flexDirection: "column", width: "30%", borderStyle: "round", borderColor: activeColumn === "categories" ? "white" : "grey", padding: 1, paddingY: 0 }, /* @__PURE__ */ React7.createElement(Box6, { marginBottom: 1 }, /* @__PURE__ */ React7.createElement(Text7, { color: activeColumn === "categories" ? "white" : "grey", bold: true, underline: true }, "CATEGORIES")), CATEGORIES.map((cat, index) => {
6983
+ const colors = getThemeColors(systemSettings.theme);
6984
+ 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
6985
  const isSelected = selectedCategoryIndex === index;
6316
6986
  const isExit = cat.id === "exit";
6317
6987
  return /* @__PURE__ */ React7.createElement(
6318
6988
  Box6,
6319
6989
  {
6320
6990
  key: cat.id,
6321
- marginTop: isExit ? 17 : 0,
6322
- backgroundColor: isSelected ? activeColumn === "categories" ? "#2a2a2a" : "#1e1e1e" : void 0,
6991
+ marginTop: isExit ? 15 : 0,
6992
+ backgroundColor: isSelected ? activeColumn === "categories" ? colors.highlightBg : colors.cardBg : void 0,
6323
6993
  paddingX: 1
6324
6994
  },
6325
6995
  /* @__PURE__ */ React7.createElement(
6326
6996
  Text7,
6327
6997
  {
6328
- color: isSelected ? activeColumn === "categories" ? "white" : "grey" : "grey",
6998
+ color: isSelected ? activeColumn === "categories" ? colors.text : colors.textDim : colors.textDim,
6329
6999
  bold: isSelected
6330
7000
  },
6331
7001
  isSelected ? "\u276F " : " ",
6332
7002
  cat.label
6333
7003
  )
6334
7004
  );
6335
- })), /* @__PURE__ */ React7.createElement(Box6, { flexDirection: "column", width: "70%", borderStyle: "round", borderColor: activeColumn === "items" ? "white" : "grey", paddingX: 1, marginLeft: 1, paddingY: 0 }, /* @__PURE__ */ React7.createElement(Box6, { marginBottom: 1 }, /* @__PURE__ */ React7.createElement(Text7, { color: activeColumn === "items" ? "white" : "grey", bold: true, underline: true }, CATEGORIES[selectedCategoryIndex].label.toUpperCase(), " SETTINGS")), currentItems.length > 0 ? (() => {
7005
+ })), /* @__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
7006
  let lastSection = null;
6337
7007
  const elements = [];
6338
7008
  const getListItems = (val) => (val || "").split(",").map((s) => s.trim().toLowerCase()).filter(Boolean);
@@ -6350,13 +7020,13 @@ function SettingsMenu({
6350
7020
  const getStatusColor = (item2) => {
6351
7021
  if (currentCatId === "security") {
6352
7022
  if ((item2.value === "autoExec" || item2.value === "externalAccess") && item2.status === "ON") {
6353
- return "white";
7023
+ return colors.statusOn;
6354
7024
  }
6355
- return "gray";
7025
+ return colors.statusOff;
6356
7026
  }
6357
- if (item2.status?.startsWith("\u2713")) return "white";
6358
- if (item2.status?.startsWith("\u26A0")) return "gray";
6359
- return item2.status === "ON" ? "white" : item2.status === "OFF" ? "gray" : "white";
7027
+ if (item2.status?.startsWith("\u2713")) return colors.statusOn;
7028
+ if (item2.status?.startsWith("\u26A0")) return colors.statusOff;
7029
+ return item2.status === "ON" ? colors.statusOn : item2.status === "OFF" ? colors.statusOff : colors.text;
6360
7030
  };
6361
7031
  if (item.section && item.section !== lastSection) {
6362
7032
  lastSection = item.section;
@@ -6368,10 +7038,10 @@ function SettingsMenu({
6368
7038
  const isCommandListItem = item.value === "alwaysAsk" || item.value === "autoApprove" || item.value === "autoDisallow";
6369
7039
  const isParserDownload = item.value === "parserDownload";
6370
7040
  elements.push(
6371
- /* @__PURE__ */ React7.createElement(Box6, { key: item.value, flexDirection: "column" }, /* @__PURE__ */ React7.createElement(Box6, { backgroundColor: isSelected && !isEditingThis ? "#2a2a2a" : void 0, paddingX: 2 }, /* @__PURE__ */ React7.createElement(
7041
+ /* @__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
7042
  Text7,
6373
7043
  {
6374
- color: isSelected ? "white" : "grey",
7044
+ color: isSelected ? colors.text : colors.textDim,
6375
7045
  bold: isSelected
6376
7046
  },
6377
7047
  isSelected ? "\u276F " : " ",
@@ -6391,31 +7061,26 @@ function SettingsMenu({
6391
7061
  )), /* @__PURE__ */ React7.createElement(Text7, { color: "gray", italic: true }, " Comma separated \u2022 Press Enter to save, Esc to cancel")))
6392
7062
  );
6393
7063
  });
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
7064
  if (hasConflict) {
6403
7065
  elements.push(
6404
- /* @__PURE__ */ React7.createElement(Box6, { key: "conflict-warning", marginTop: 1, paddingX: 1 }, /* @__PURE__ */ React7.createElement(Text7, { color: "white", italic: true }, "* Conflicting commands will be ignored and defaulted to highest priority"))
7066
+ /* @__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
7067
  );
6406
7068
  }
6407
7069
  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)));
7070
+ })() : /* @__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
7071
  }
6410
7072
  var CATEGORIES, getActivePreset, truncateCSV;
6411
7073
  var init_SettingsMenu = __esm({
6412
7074
  async "src/components/SettingsMenu.jsx"() {
6413
7075
  await init_exec_command();
7076
+ init_theme();
6414
7077
  CATEGORIES = [
7078
+ { id: "appearance", label: "Appearance", desc: "Customize UI theme & rendering options" },
6415
7079
  { id: "memory", label: "Memory", desc: "Manage system context & agent's memory" },
7080
+ { id: "other", label: "Miscellaneous", desc: "Miscellaneous preferences" },
7081
+ { id: "providers", label: "Providers", desc: "Configure AI models & API key strategies" },
6416
7082
  { id: "security", label: "Security", desc: "Configure permissions & data safety" },
6417
7083
  { id: "updater", label: "Updater", desc: "Manage application updates" },
6418
- { id: "other", label: "Other", desc: "Miscellaneous preferences" },
6419
7084
  { id: "exit", label: "Exit Settings", desc: "Return to chat view" }
6420
7085
  ];
6421
7086
  getActivePreset = (settings) => {
@@ -6442,7 +7107,8 @@ var init_SettingsMenu = __esm({
6442
7107
  import React8, { useState as useState7, useEffect as useEffect6 } from "react";
6443
7108
  import { Box as Box7, Text as Text8 } from "ink";
6444
7109
  import TextInput2 from "ink-text-input";
6445
- function ProfileForm({ initialData, onSave, onCancel }) {
7110
+ function ProfileForm({ initialData, onSave, onCancel, theme = "Dark" }) {
7111
+ const colors = getThemeColors(theme);
6446
7112
  const [step, setStep] = useState7(0);
6447
7113
  const [currentInput, setCurrentInput] = useState7("");
6448
7114
  const [profile, setProfile] = useState7(() => ({
@@ -6478,27 +7144,28 @@ function ProfileForm({ initialData, onSave, onCancel }) {
6478
7144
  Box7,
6479
7145
  {
6480
7146
  borderStyle: "round",
6481
- borderColor: "gray",
7147
+ borderColor: colors.borderMuted,
6482
7148
  padding: 0,
6483
7149
  marginTop: 1,
6484
7150
  flexShrink: 0,
6485
7151
  flexDirection: "column",
6486
7152
  width: "100%"
6487
7153
  },
6488
- /* @__PURE__ */ React8.createElement(Box7, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React8.createElement(Text8, { color: "white", bold: true }, "DEVELOPER PROFILE CONFIGURATION")),
6489
- /* @__PURE__ */ React8.createElement(Box7, { paddingX: 1, flexDirection: "column" }, /* @__PURE__ */ React8.createElement(Box7, null, /* @__PURE__ */ React8.createElement(Text8, { color: "white", bold: true }, steps[step].label), /* @__PURE__ */ React8.createElement(
7154
+ /* @__PURE__ */ React8.createElement(Box7, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React8.createElement(Text8, { color: colors.text, bold: true }, "DEVELOPER PROFILE CONFIGURATION")),
7155
+ /* @__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
7156
  TextInput2,
6491
7157
  {
6492
7158
  value: currentInput,
6493
7159
  onChange: setCurrentInput,
6494
7160
  onSubmit: handleSubmit
6495
7161
  }
6496
- )), /* @__PURE__ */ React8.createElement(Box7, { marginTop: 1 }, /* @__PURE__ */ React8.createElement(Text8, { color: "gray", italic: true }, "Step ", step + 1, " of ", steps.length))),
6497
- /* @__PURE__ */ React8.createElement(Box7, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React8.createElement(Text8, { color: "gray", italic: true }, "(Enter to submit \u2022 Type /cancel to abort)"))
7162
+ )), /* @__PURE__ */ React8.createElement(Box7, { marginTop: 1 }, /* @__PURE__ */ React8.createElement(Text8, { color: colors.textMuted, italic: true }, "Step ", step + 1, " of ", steps.length))),
7163
+ /* @__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
7164
  );
6499
7165
  }
6500
7166
  var init_ProfileForm = __esm({
6501
7167
  "src/components/ProfileForm.jsx"() {
7168
+ init_theme();
6502
7169
  }
6503
7170
  });
6504
7171
 
@@ -6510,7 +7177,9 @@ var AskUserModal, AskUserModal_default;
6510
7177
  var init_AskUserModal = __esm({
6511
7178
  "src/components/AskUserModal.jsx"() {
6512
7179
  init_terminal();
6513
- AskUserModal = ({ question, options, onResolve }) => {
7180
+ init_theme();
7181
+ AskUserModal = ({ question, options, onResolve, theme = "Dark" }) => {
7182
+ const colors = getThemeColors(theme);
6514
7183
  const [isSuggestingElse, setIsSuggestingElse] = useState8(false);
6515
7184
  const [customInput, setCustomInput] = useState8("");
6516
7185
  const [selectedIndex, setSelectedIndex] = useState8(0);
@@ -6550,16 +7219,16 @@ var init_AskUserModal = __esm({
6550
7219
  borderRight: false,
6551
7220
  borderTop: false,
6552
7221
  borderBottom: false,
6553
- borderColor: "#444444",
7222
+ borderColor: colors.codeBorder,
6554
7223
  paddingLeft: 2,
6555
7224
  paddingRight: 0,
6556
7225
  paddingTop: 1,
6557
7226
  paddingBottom: 1,
6558
- backgroundColor: "#1a1a1a",
7227
+ backgroundColor: colors.codeBg,
6559
7228
  width: "100%"
6560
7229
  },
6561
- /* @__PURE__ */ React9.createElement(Box8, { paddingX: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color: "white", bold: true }, "SUGGEST SOMETHING ELSE")),
6562
- /* @__PURE__ */ React9.createElement(Box8, { marginTop: 1, paddingX: 1 }, /* @__PURE__ */ React9.createElement(Text9, { italic: true, color: "gray" }, "Replying to: ", question)),
7230
+ /* @__PURE__ */ React9.createElement(Box8, { paddingX: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color: colors.text, bold: true }, "SUGGEST SOMETHING ELSE")),
7231
+ /* @__PURE__ */ React9.createElement(Box8, { marginTop: 1, paddingX: 1 }, /* @__PURE__ */ React9.createElement(Text9, { italic: true, color: colors.textMuted }, "Replying to: ", question)),
6563
7232
  /* @__PURE__ */ React9.createElement(Box8, { marginTop: 1, paddingX: 1, flexDirection: "row" }, /* @__PURE__ */ React9.createElement(
6564
7233
  TextInput3,
6565
7234
  {
@@ -6568,7 +7237,7 @@ var init_AskUserModal = __esm({
6568
7237
  onSubmit: () => onResolve(customInput)
6569
7238
  }
6570
7239
  )),
6571
- /* @__PURE__ */ React9.createElement(Box8, { marginTop: 1, paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color: "gray", italic: true }, "(Press Enter to send)"))
7240
+ /* @__PURE__ */ React9.createElement(Box8, { marginTop: 1, paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color: colors.textMuted, italic: true }, "(Press Enter to send)"))
6572
7241
  );
6573
7242
  }
6574
7243
  return /* @__PURE__ */ React9.createElement(
@@ -6577,7 +7246,7 @@ var init_AskUserModal = __esm({
6577
7246
  flexDirection: "column",
6578
7247
  border: true,
6579
7248
  borderStyle: "round",
6580
- borderColor: "#444444",
7249
+ borderColor: colors.codeBorder,
6581
7250
  paddingLeft: 2,
6582
7251
  paddingRight: 0,
6583
7252
  paddingTop: 1,
@@ -6587,7 +7256,7 @@ var init_AskUserModal = __esm({
6587
7256
  width: "100%"
6588
7257
  },
6589
7258
  /* @__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: "white" }, question)),
7259
+ /* @__PURE__ */ React9.createElement(Box8, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color: colors.text }, question)),
6591
7260
  /* @__PURE__ */ React9.createElement(Box8, { flexDirection: "column", width: "100%" }, allOptions.map((opt, idx) => {
6592
7261
  const isSelected = idx === selectedIndex;
6593
7262
  return /* @__PURE__ */ React9.createElement(
@@ -6596,15 +7265,15 @@ var init_AskUserModal = __esm({
6596
7265
  key: opt.id,
6597
7266
  flexDirection: "column",
6598
7267
  width: "100%",
6599
- backgroundColor: isSelected ? "#2a2a2a" : void 0,
7268
+ backgroundColor: isSelected ? colors.highlightBg : void 0,
6600
7269
  paddingX: 1,
6601
7270
  marginBottom: idx === allOptions.length - 1 ? 0 : 1
6602
7271
  },
6603
- /* @__PURE__ */ React9.createElement(Text9, { color: isSelected ? "white" : "grey", bold: isSelected }, isSelected ? "\u276F " : " ", opt.label),
6604
- opt.description && /* @__PURE__ */ React9.createElement(Box8, { marginLeft: 4 }, /* @__PURE__ */ React9.createElement(Text9, { color: "gray", italic: true }, opt.description))
7272
+ /* @__PURE__ */ React9.createElement(Text9, { color: isSelected ? colors.text : colors.textMuted, bold: isSelected }, isSelected ? "\u276F " : " ", opt.label),
7273
+ opt.description && /* @__PURE__ */ React9.createElement(Box8, { marginLeft: 4 }, /* @__PURE__ */ React9.createElement(Text9, { color: colors.textMuted, italic: true }, opt.description))
6605
7274
  );
6606
7275
  })),
6607
- /* @__PURE__ */ React9.createElement(Box8, { paddingX: 1, marginTop: 1, marginBottom: 1 }, /* @__PURE__ */ React9.createElement(Text9, { color: "gray", italic: true }, "(Use Arrows to navigate, Enter to confirm)"))
7276
+ /* @__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
7277
  );
6609
7278
  };
6610
7279
  AskUserModal_default = AskUserModal;
@@ -7152,7 +7821,7 @@ var init_history = __esm({
7152
7821
  const firstUserMsg = userMessages[0];
7153
7822
  const latestUserMsg = userMessages[userMessages.length - 1];
7154
7823
  if (existingChat && existingChat.prompt) {
7155
- if (Math.random() < 0.5) {
7824
+ if (Math.random() < 0.8) {
7156
7825
  prompt = extractPrompt(latestUserMsg) || existingChat.prompt;
7157
7826
  } else {
7158
7827
  prompt = existingChat.prompt;
@@ -11989,7 +12658,7 @@ var init_ai = __esm({
11989
12658
  const AGENT_CONTEXT_LENGTH = 4 * (1024 * 8);
11990
12659
  const { onStatus, onMemoryUpdated, onBackgroundIncrement } = callbacks;
11991
12660
  const { profile, thinkingLevel, mode, janitorModel, chatId, systemSettings, sessionStats, aiProvider = "Google", apiKey } = settings;
11992
- const isMemoryEnabled = systemSettings?.memory !== false;
12661
+ const isMemoryEnabled = process.env.NVIDIA_BASE_URL ? false : systemSettings?.memory !== false;
11993
12662
  const persistentStorage = readEncryptedJson(MEMORIES_FILE, []);
11994
12663
  const janitorUserMemories = persistentStorage.map((m) => `- [${m.id}]: ${m.memory}`).join("\n");
11995
12664
  const janitorContents = history.slice(0, -1).filter((msg) => msg.text && !msg.text.includes("[TOOL RESULT]") && !msg.text.includes("OBSERVATION:") && !msg.text.startsWith("[TERMINAL_RECORD]") && !msg.isTerminalRecord && !msg.isMeta && !msg.isLogo && !String(msg.id).startsWith("welcome") && !String(msg.id).startsWith("logo")).slice(-14).map((msg) => {
@@ -15573,14 +16242,14 @@ Error Log can be found in ${path24.join(LOGS_DIR, "agent", "error.log")}`);
15573
16242
  const mergedSettings = { ...savedSettings, ...settings };
15574
16243
  const targetModel = model || settings?.modelName || settings?.activeModel || savedSettings.activeModel;
15575
16244
  const SUBAGENT_TOOL_DEFINITIONS = {
15576
- "readfile": '- [tool:functions.ReadFile(path="...", startLine=number, endLine=number)]. View files, supports images/docs',
15577
- "readfolder": '- [tool:functions.ReadFolder(path="...")]. Detailed folder contents and stats',
15578
- "filemap": '- [tool:functions.FileMap(path="path/file")]. Shows file structure, functions, classes, imports/exports',
15579
- "patchfile": '- [tool:functions.PatchFile(path="...", replaceContent1="...", newContent1="...")]. Surgical block replacement for editing files',
15580
- "writefile": '- [tool:functions.WriteFile(path="...", content="...")]. Creates or overwrites a file',
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: auto-detect`,
15582
- "websearch": '- [tool:functions.WebSearch(query="...", limit=number)]. Web Search',
15583
- "webscrape": '- [tool:functions.WebScrape(url="...")]. Web Scrape',
16245
+ "readfile": '- [tool:functions.ReadFile(path="...", startLine=number, endLine=number)]. View files',
16246
+ "readfolder": '- [tool:functions.ReadFolder(path="...")]. Detailed DIR stats including File Sizes',
16247
+ "filemap": '- [tool:functions.FileMap(path="path/file")]. Shows file structure, functions, class, import/export, variables',
16248
+ "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**',
16249
+ "writefile": '- [tool:functions.WriteFile(path="...", content="...")]. Creates/Overwrites. File Exist? PatchFile > WriteFile. Verify Imports',
16250
+ "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`,
16251
+ "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`,
16252
+ "webscrape": '- [tool:functions.WebScrape(url="...")]. Proactive use for specific webpage/docs/api',
15584
16253
  "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
16254
  };
15586
16255
  const providedToolsSection = `-- TOOL DEFINITIONS (path = relative to CWD, path separator: '/') --
@@ -15599,16 +16268,16 @@ TOOL POLICY:
15599
16268
  ${Object.values(SUBAGENT_TOOL_DEFINITIONS).join("\n")}
15600
16269
 
15601
16270
  - 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`.trim();
16271
+ - **Escape quotes: \\" for code strings**
16272
+ - **Literal escapes: Double-escape sequences (e.g., \\\\n)**
16273
+ - **File structure: Real newlines for code formatting**`.trim();
15605
16274
  const systemInstruction = `=== START SYSTEM PROMPT ===
15606
16275
  You are a subagent helping the main FluxFlow CLI agent
15607
16276
  Your task is: "${task}"
15608
16277
 
15609
16278
  ${providedToolsSection.trimEnd()}
15610
16279
 
15611
- -- THINKING POLICY --
16280
+ -- THINKING GUIDANCE --
15612
16281
  NO EXPLICIT THINKING REQUIRED. FOCUS ON COMPLETING THE TASK DIRECTLY
15613
16282
 
15614
16283
  Your main focus should be on tools and task, not chatting. Your Chat won't be visible to user
@@ -15802,7 +16471,8 @@ ${result}
15802
16471
  // src/components/ResumeModal.jsx
15803
16472
  import React10, { useState as useState9, useEffect as useEffect7 } from "react";
15804
16473
  import { Box as Box9, Text as Text10, useInput as useInput5 } from "ink";
15805
- function ResumeModal({ onSelect, onDelete, onClose }) {
16474
+ function ResumeModal({ onSelect, onDelete, onClose, theme = "Dark" }) {
16475
+ const colors = getThemeColors(theme);
15806
16476
  const [history, setHistory] = useState9({});
15807
16477
  const [keys, setKeys] = useState9([]);
15808
16478
  const [selectedIndex, setSelectedIndex] = useState9(0);
@@ -15843,7 +16513,7 @@ function ResumeModal({ onSelect, onDelete, onClose }) {
15843
16513
  }
15844
16514
  }
15845
16515
  const visibleKeys = keys.slice(startIndex, startIndex + MAX_VISIBLE);
15846
- return /* @__PURE__ */ React10.createElement(Box9, { flexDirection: "column", borderStyle: "round", borderColor: "gray", padding: 0, width: "100%" }, /* @__PURE__ */ React10.createElement(Box9, { paddingX: 1, marginBottom: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "white", bold: true }, "CHAT HISTORY: RESUME CONVERSATION")), keys.length === 0 ? /* @__PURE__ */ React10.createElement(Box9, { paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React10.createElement(Text10, { italic: true, color: "gray" }, "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: "gray" }, "\u25B2 (+", startIndex, " more chats above)")), visibleKeys.map((id, index) => {
16516
+ 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
16517
  const chat2 = history[id];
15848
16518
  const actualIndex = startIndex + index;
15849
16519
  const isSelected = actualIndex === selectedIndex;
@@ -15853,17 +16523,17 @@ function ResumeModal({ onSelect, onDelete, onClose }) {
15853
16523
  {
15854
16524
  key: id,
15855
16525
  paddingX: 1,
15856
- backgroundColor: isSelected ? "#2a2a2a" : void 0,
16526
+ backgroundColor: isSelected ? colors.highlightBg : void 0,
15857
16527
  width: "100%"
15858
16528
  },
15859
- /* @__PURE__ */ React10.createElement(Box9, { flexGrow: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: isSelected ? "while" : "grey", bold: isSelected }, isSelected ? "\u276F " : " ", (() => {
16529
+ /* @__PURE__ */ React10.createElement(Box9, { flexGrow: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: isSelected ? colors.text : colors.textMuted, bold: isSelected }, isSelected ? "\u276F " : " ", (() => {
15860
16530
  if (chat2?.name && !chat2.name.startsWith("Session")) return chat2.name;
15861
16531
  if (chat2?.prompt) return chat2.prompt;
15862
16532
  return chat2?.name || id;
15863
- })(), /* @__PURE__ */ React10.createElement(Text10, { color: `${!isSelected ? "grey" : "grey"}` }, " [", dateStr, " \u2022 ", id, "]"))),
15864
- isSelected && /* @__PURE__ */ React10.createElement(Box9, { flexShrink: 0 }, /* @__PURE__ */ React10.createElement(Text10, { color: "white", bold: true }, "[X] DELETE "))
16533
+ })(), /* @__PURE__ */ React10.createElement(Text10, { color: colors.textMuted }, " [", dateStr, " \u2022 ", id, "]"))),
16534
+ isSelected && /* @__PURE__ */ React10.createElement(Box9, { flexShrink: 0 }, /* @__PURE__ */ React10.createElement(Text10, { color: colors.danger, bold: true }, "[X] DELETE "))
15865
16535
  );
15866
- }), startIndex + MAX_VISIBLE < keys.length && /* @__PURE__ */ React10.createElement(Box9, { paddingX: 2, marginTop: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "gray" }, "\u25BC (+", keys.length - (startIndex + MAX_VISIBLE), " more chats below)"))), /* @__PURE__ */ React10.createElement(
16536
+ }), 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
16537
  Box9,
15868
16538
  {
15869
16539
  marginTop: 1,
@@ -15872,9 +16542,9 @@ function ResumeModal({ onSelect, onDelete, onClose }) {
15872
16542
  borderLeft: false,
15873
16543
  borderRight: false,
15874
16544
  borderBottom: false,
15875
- borderColor: "gray"
16545
+ borderColor: colors.borderMuted
15876
16546
  },
15877
- /* @__PURE__ */ React10.createElement(Text10, { italic: true }, "\u2191\u2193 navigate \u2022 Enter select \u2022 x delete \u2022 Esc close")
16547
+ /* @__PURE__ */ React10.createElement(Text10, { color: colors.textMuted, italic: true }, "\u2191\u2193 navigate \u2022 Enter select \u2022 x delete \u2022 Esc close")
15878
16548
  ));
15879
16549
  }
15880
16550
  function formatDate(timestamp) {
@@ -15892,13 +16562,15 @@ var init_ResumeModal = __esm({
15892
16562
  "src/components/ResumeModal.jsx"() {
15893
16563
  init_history();
15894
16564
  init_terminal();
16565
+ init_theme();
15895
16566
  }
15896
16567
  });
15897
16568
 
15898
16569
  // src/components/MemoryModal.jsx
15899
16570
  import React11, { useState as useState10, useEffect as useEffect8 } from "react";
15900
16571
  import { Box as Box10, Text as Text11, useInput as useInput6, useStdout } from "ink";
15901
- function MemoryModal({ onClose }) {
16572
+ function MemoryModal({ onClose, theme = "Dark" }) {
16573
+ const colors = getThemeColors(theme);
15902
16574
  const { stdout } = useStdout();
15903
16575
  const columns = stdout?.columns || 80;
15904
16576
  const [memories, setMemories] = useState10([]);
@@ -15976,23 +16648,23 @@ function MemoryModal({ onClose }) {
15976
16648
  const filledCount = Math.round(usagePercent / 100 * barWidth);
15977
16649
  const barStr = "\u2588".repeat(filledCount) + "\u2591".repeat(Math.max(0, barWidth - filledCount));
15978
16650
  const getBarColor = () => {
15979
- if (usagePercent < 50) return "grey";
15980
- if (usagePercent < 90) return "yellow";
15981
- return "red";
16651
+ if (usagePercent < 50) return colors.textMuted;
16652
+ if (usagePercent < 90) return colors.warning;
16653
+ return colors.danger;
15982
16654
  };
15983
16655
  const s = emojiSpace(2);
15984
- return /* @__PURE__ */ React11.createElement(Box10, { flexDirection: "column", borderStyle: "round", borderColor: "gray", padding: 0, width: "100%" }, /* @__PURE__ */ React11.createElement(Box10, { paddingX: 1, marginBottom: 1, justifyContent: "space-between" }, /* @__PURE__ */ React11.createElement(Text11, { color: "white", bold: true }, "SAVED MEMORIES"), /* @__PURE__ */ React11.createElement(Box10, null, /* @__PURE__ */ React11.createElement(Text11, { color: "gray" }, "Vault: "), /* @__PURE__ */ React11.createElement(Text11, { color: getBarColor() }, barStr), /* @__PURE__ */ React11.createElement(Text11, { color: "white", bold: true }, " ", usagePercent, "%"))), !isMemoryOn && memories.length > 0 ? /* @__PURE__ */ React11.createElement(Box10, { paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React11.createElement(Text11, { italic: true, color: "gray" }, "Memory is currently Off...")) : memories.length === 0 ? /* @__PURE__ */ React11.createElement(Box10, { paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React11.createElement(Text11, { italic: true, color: "gray" }, isMemoryOn ? "Learning..." : "Memory not available...")) : /* @__PURE__ */ React11.createElement(Box10, { flexDirection: "column" }, memories.map((mem, idx) => {
16656
+ 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
16657
  const isSelected = idx === selectedIndex;
15986
16658
  return /* @__PURE__ */ React11.createElement(
15987
16659
  Box10,
15988
16660
  {
15989
16661
  key: mem.id,
15990
16662
  paddingX: 1,
15991
- backgroundColor: isSelected ? "#2a2a2a" : void 0,
16663
+ backgroundColor: isSelected ? colors.highlightBg : void 0,
15992
16664
  width: "100%"
15993
16665
  },
15994
- /* @__PURE__ */ React11.createElement(Box10, { flexGrow: 1 }, /* @__PURE__ */ React11.createElement(Text11, { color: isSelected ? "white" : "grey", bold: isSelected }, isSelected ? "\u276F " : " ", idx + 1, ". ", formatMemory(mem.memory, idx, isSelected))),
15995
- isSelected && /* @__PURE__ */ React11.createElement(Box10, { flexShrink: 0 }, /* @__PURE__ */ React11.createElement(Text11, { color: "grey", dimColor: true }, " [", /* @__PURE__ */ React11.createElement(Text11, { italic: true }, mem.score), "] "), /* @__PURE__ */ React11.createElement(Text11, { color: "grey", bold: true }, "[X] WIPE "))
16666
+ /* @__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))),
16667
+ 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
16668
  );
15997
16669
  })), /* @__PURE__ */ React11.createElement(
15998
16670
  Box10,
@@ -16003,9 +16675,9 @@ function MemoryModal({ onClose }) {
16003
16675
  borderLeft: false,
16004
16676
  borderRight: false,
16005
16677
  borderBottom: false,
16006
- borderColor: "gray"
16678
+ borderColor: colors.borderMuted
16007
16679
  },
16008
- /* @__PURE__ */ React11.createElement(Text11, { color: "grey", italic: true }, "\u2191\u2193 navigate \u2022 x wipe memory \u2022 Esc close")
16680
+ /* @__PURE__ */ React11.createElement(Text11, { color: colors.textMuted, italic: true }, "\u2191\u2193 navigate \u2022 x wipe memory \u2022 Esc close")
16009
16681
  ));
16010
16682
  }
16011
16683
  var init_MemoryModal = __esm({
@@ -16013,6 +16685,7 @@ var init_MemoryModal = __esm({
16013
16685
  init_crypto();
16014
16686
  init_paths();
16015
16687
  init_terminal();
16688
+ init_theme();
16016
16689
  }
16017
16690
  });
16018
16691
 
@@ -16396,6 +17069,7 @@ var WITTY_LOADING_PHRASES;
16396
17069
  var init_witty_phrases = __esm({
16397
17070
  "src/data/witty_phrases.js"() {
16398
17071
  WITTY_LOADING_PHRASES = [
17072
+ // === ORIGINALS ===
16399
17073
  "I'm Feeling Lucky",
16400
17074
  "Shipping awesomeness",
16401
17075
  "Painting the serifs back on",
@@ -16526,7 +17200,76 @@ var init_witty_phrases = __esm({
16526
17200
  "Constructing additional pylons",
16527
17201
  "New line? That\u2019s Ctrl+J.",
16528
17202
  "Releasing the HypnoDrones",
16529
- "Pushing the button, Frank."
17203
+ "Pushing the button, Frank.",
17204
+ // === NEW ===
17205
+ "Consulting with the Companion Cube",
17206
+ // --- Portal / Portal 2 ---
17207
+ "Testing for science. You monster.",
17208
+ "Dispensing deadly neurotoxin just kidding, compiling.",
17209
+ "Now thinking with portals",
17210
+ "Wheatley is currently attempting to hack this prompt",
17211
+ "Developing combustible lemons",
17212
+ "Aperture Science Enrichment Center is processing your request.",
17213
+ "SPAAAACE! Space! SPAAAACE!",
17214
+ "The cake is not a lie, it just needs a few more seconds.",
17215
+ // --- Other Classic Games ---
17216
+ "Praise the Sun! \u2600\uFE0F",
17217
+ "Hey you, you're finally awake.",
17218
+ "Stay a while and listen.",
17219
+ "All your base are belong to us.",
17220
+ "It's dangerous to go alone! Take this code.",
17221
+ "Protocol 3: Protect the Pilot.",
17222
+ "Finish Him! (The loading bar, that is)",
17223
+ "War war never changes. But this prompt will.",
17224
+ "Snake? Snake?! SNAAAAKE!",
17225
+ "Got a selection of good things on sale, stranger!",
17226
+ "Boy! Read the documentation.",
17227
+ "Reticulating Minecraft splines",
17228
+ // --- Few More ---
17229
+ "Feed the loading bar a quick snack",
17230
+ "Converting dark mode to dark magic",
17231
+ "Asking the rubber duck for advice",
17232
+ "Dividing by zero wait, NO NO NO\u2014",
17233
+ "Herding the 1s and 0s back into line",
17234
+ "Bribing the server with cookies",
17235
+ // --- Pragmata ---
17236
+ "Establishing contact with the Moon base",
17237
+ "Calibrating astronaut suit thrusters",
17238
+ "Drawing doodle on space helmet",
17239
+ "Synthesizing Lunafilament",
17240
+ "Deactivating runaway lunar defense bots",
17241
+ "Calculating gravity offset watch your step!",
17242
+ "Hacking the Delphi Corporation mainframe",
17243
+ "What comes after dreaming? Loading screen, apparently.",
17244
+ "Petting the holographic giant cat",
17245
+ "Securing payload for Earth re-entry",
17246
+ // --- Halo --- 'Launching Halo ring just kidding, still loading.',
17247
+ "Wort wort wort!",
17248
+ "Did you touch my Warthog?",
17249
+ "One small step for man, one giant leap for the loading bar.",
17250
+ "The Halo array is charging or maybe just a fan.",
17251
+ "Deploying Pelican dropship eventually.",
17252
+ "Just cleaning my plasma pistol BRB.",
17253
+ "Checking Master Chief's helmet for scratches.",
17254
+ "Counting sheep wait, wrong game.",
17255
+ "S-Tier loading screen incoming.",
17256
+ // --- GTA --- 'Traffic jam in the information highway.',
17257
+ "Alarm blaring it's just your internet connection.",
17258
+ "Looking for a helicopter or just your patience.",
17259
+ "Need a taxi? Just kidding, I'm loading.",
17260
+ "This loading time is criminal.",
17261
+ "Wish I had a cheat code for fast loading.",
17262
+ // --- Other Fun Lines ---
17263
+ "Polishing the loading bar until it shines",
17264
+ "Training the server hamsters",
17265
+ "Baking a fresh batch of witty comments",
17266
+ "Aligning my existential dread with your request",
17267
+ "Just doodling on the terminal",
17268
+ "Searching for the wifi password in the cosmos",
17269
+ "Trying to remember my CAPTCHA training",
17270
+ "Deciphering ancient scrolls (aka documentation)",
17271
+ "Brewing a perfect cup of code",
17272
+ "Petting the cat that photobombed my code"
16530
17273
  ];
16531
17274
  }
16532
17275
  });
@@ -17095,7 +17838,8 @@ function App({ args = [] }) {
17095
17838
  const [providerBudgetCursor, setProviderBudgetCursor] = useState15(0);
17096
17839
  const [pbsCursor, setPbsCursor] = useState15(0);
17097
17840
  const [pbsSelected, setPbsSelected] = useState15({});
17098
- const [systemSettings, setSystemSettings] = useState15({ memory: true, compression: 0, autoExec: false, autoDeleteHistory: "7d", autoUpdate: false, updateManager: "npm", customUpdateCommand: "" });
17841
+ const [systemSettings, setSystemSettings] = useState15({ memory: true, theme: "Dark", compression: 0, autoExec: false, autoDeleteHistory: "7d", autoUpdate: false, updateManager: "npm", customUpdateCommand: "" });
17842
+ const colors = useMemo2(() => getThemeColors(systemSettings.theme), [systemSettings.theme]);
17099
17843
  const [profileData, setProfileData] = useState15({ name: null, nickname: null, instructions: null });
17100
17844
  const [imageSettings, setImageSettings] = useState15({ keyType: "Default", quality: "Low-High", apiKey: "" });
17101
17845
  const [sessionStats, setSessionStats] = useState15({ tokens: 0 });
@@ -17366,7 +18110,8 @@ function App({ args = [] }) {
17366
18110
  historicalBlocks: [],
17367
18111
  seenSelections: /* @__PURE__ */ new Set(),
17368
18112
  chatId: "",
17369
- clearKey: 0
18113
+ clearKey: 0,
18114
+ theme: ""
17370
18115
  });
17371
18116
  const parsedBlocks = useMemo2(() => {
17372
18117
  const columns = terminalSize.columns || 80;
@@ -17377,7 +18122,8 @@ function App({ args = [] }) {
17377
18122
  const isClear = completedIndex < cachedHistoryRef.current.completedIndex;
17378
18123
  const isChatChanged = cachedHistoryRef.current.chatId !== chatId;
17379
18124
  const isClearKeyChanged = cachedHistoryRef.current.clearKey !== clearKey;
17380
- if (isResize || isClear || isChatChanged || isClearKeyChanged) {
18125
+ const isThemeChanged = cachedHistoryRef.current.theme !== systemSettings.theme;
18126
+ if (isResize || isClear || isChatChanged || isClearKeyChanged || isThemeChanged) {
17381
18127
  const completedMsgs = messages.slice(0, completedIndex);
17382
18128
  for (let i = 0; i < completedMsgs.length; i++) {
17383
18129
  const msg = completedMsgs[i];
@@ -17399,7 +18145,8 @@ function App({ args = [] }) {
17399
18145
  historicalBlocks,
17400
18146
  seenSelections: new Set(seenAskSelections),
17401
18147
  chatId,
17402
- clearKey
18148
+ clearKey,
18149
+ theme: systemSettings.theme
17403
18150
  };
17404
18151
  } else {
17405
18152
  historicalBlocks = cachedHistoryRef.current.historicalBlocks;
@@ -17744,6 +18491,22 @@ function App({ args = [] }) {
17744
18491
  process.stdin.off("data", onData);
17745
18492
  };
17746
18493
  }, []);
18494
+ const prevThemeRef = useRef4(systemSettings.theme);
18495
+ useEffect12(() => {
18496
+ if (prevThemeRef.current && prevThemeRef.current !== systemSettings.theme) {
18497
+ prevThemeRef.current = systemSettings.theme;
18498
+ if (stdout) {
18499
+ stdout.write("\x1B[2J\x1B[3J\x1B[H");
18500
+ if (stdout.isTTY) {
18501
+ stdout.write("\x1B[?2004h");
18502
+ }
18503
+ }
18504
+ setClearKey((prev) => prev + 1);
18505
+ clearBlocksCache();
18506
+ } else {
18507
+ prevThemeRef.current = systemSettings.theme;
18508
+ }
18509
+ }, [systemSettings.theme, stdout]);
17747
18510
  useEffect12(() => {
17748
18511
  async function init() {
17749
18512
  try {
@@ -17812,6 +18575,17 @@ function App({ args = [] }) {
17812
18575
  } else if (parsedArgs.memory === "off") {
17813
18576
  freshSettings.memory = false;
17814
18577
  }
18578
+ if (startupProvider === "NVIDIA" && process.env.NVIDIA_BASE_URL) {
18579
+ freshSettings.memory = false;
18580
+ setMessages((prev) => [
18581
+ ...prev,
18582
+ {
18583
+ role: "system",
18584
+ text: "[SYSTEM] Memory is not available with Custom Endpoints",
18585
+ isMeta: true
18586
+ }
18587
+ ]);
18588
+ }
17815
18589
  if (parsedArgs.package) {
17816
18590
  freshSettings.updateManager = parsedArgs.package;
17817
18591
  }
@@ -18050,8 +18824,8 @@ function App({ args = [] }) {
18050
18824
  { cmd: "/help", desc: "Show all available commands" },
18051
18825
  ...parsedArgs.playground ? [{ cmd: "/move", desc: "Move playground directory to original CWD/playground-export" }] : [],
18052
18826
  { cmd: "/resume", desc: "Load previous session" },
18053
- { cmd: "/compress", desc: "Summarize and compress chat history" },
18054
18827
  { cmd: "/clear", desc: "Clear terminal screen" },
18828
+ { cmd: "/compress", desc: "Summarize and compress chat history" },
18055
18829
  { cmd: "/revert", desc: "Revert codebase back to a checkpoint" },
18056
18830
  { cmd: "/gemini", desc: "Get a happy message from Gemini CLI" },
18057
18831
  { cmd: "/save", desc: "Force save current chat" },
@@ -18559,7 +19333,7 @@ ${cleanText}`, color: "magenta" }];
18559
19333
  if (val === "xhigh") {
18560
19334
  formattedLevel = "xHigh";
18561
19335
  }
18562
- if (!isBypass && mode === "Flow" && (formattedLevel === "High" || formattedLevel === "xHigh")) {
19336
+ if (!isBypass && mode === "Flow" && formattedLevel === "xHigh") {
18563
19337
  setMessages((prev) => {
18564
19338
  setCompletedIndex(prev.length + 1);
18565
19339
  return [...prev, { id: Date.now(), role: "system", text: `[RESTRICTED] "${formattedLevel}" is restricted in Flow mode. Switch to Flux to enable Higher Thinking Levels.`, isMeta: true }];
@@ -19937,6 +20711,7 @@ Selection: ${val}`,
19937
20711
  { label: "OpenRouter (Free/Paid) [EXPERIMENTAL]", value: "OpenRouter" },
19938
20712
  { label: "Back", value: "settings" }
19939
20713
  ],
20714
+ theme: systemSettings.theme,
19940
20715
  onSelect: async (item) => {
19941
20716
  if (item.value === "settings" || item.value === "Back") {
19942
20717
  setActiveView("settings");
@@ -19952,12 +20727,17 @@ Selection: ${val}`,
19952
20727
  const defaultModel = getDefaultModel(selectedProvider, targetTier);
19953
20728
  setActiveModel(defaultModel);
19954
20729
  setApiTier(targetTier);
19955
- saveSettings({ aiProvider: selectedProvider, activeModel: defaultModel, apiTier: targetTier, quotas });
20730
+ if (selectedProvider === "NVIDIA" && process.env.NVIDIA_BASE_URL) {
20731
+ setSystemSettings((s) => ({ ...s, memory: false }));
20732
+ saveSettings({ aiProvider: selectedProvider, activeModel: defaultModel, apiTier: targetTier, quotas, systemSettings: { ...systemSettings, memory: false } });
20733
+ } else {
20734
+ saveSettings({ aiProvider: selectedProvider, activeModel: defaultModel, apiTier: targetTier, quotas });
20735
+ }
19956
20736
  setMessages((prev) => [
19957
20737
  ...prev,
19958
20738
  {
19959
20739
  role: "system",
19960
- text: `[SYSTEM] Switched to ${selectedProvider}! Key loaded from Cache. Model set to ${defaultModel}.`,
20740
+ text: `[SYSTEM] Switched to ${selectedProvider}! Key loaded from Cache. Model set to ${defaultModel}.${selectedProvider === "NVIDIA" && process.env.NVIDIA_BASE_URL ? "\n[SYSTEM] Memory is not available with Custom Endpoints" : ""}`,
19961
20741
  isMeta: true
19962
20742
  }
19963
20743
  ]);
@@ -20276,9 +21056,13 @@ Selection: ${val}`,
20276
21056
  newSettings.aiProvider = prov;
20277
21057
  newSettings.activeModel = defaultModel;
20278
21058
  newSettings.apiTier = targetTier;
21059
+ if (prov === "NVIDIA" && process.env.NVIDIA_BASE_URL) {
21060
+ setSystemSettings((s) => ({ ...s, memory: false }));
21061
+ newSettings.systemSettings = { ...systemSettings, memory: false };
21062
+ }
20279
21063
  setMessages((prev) => {
20280
21064
  setCompletedIndex(prev.length + 1);
20281
- return [...prev, { id: Date.now(), role: "system", text: `\u2705 ${prov} API Key saved successfully! Model set to ${defaultModel}.`, isMeta: true }];
21065
+ return [...prev, { id: Date.now(), role: "system", text: `\u2705 ${prov} API Key saved successfully! Model set to ${defaultModel}.${prov === "NVIDIA" && process.env.NVIDIA_BASE_URL ? "\n[SYSTEM] Memory is not available with Custom Endpoints" : ""}`, isMeta: true }];
20282
21066
  });
20283
21067
  }
20284
21068
  if (next) {
@@ -20424,7 +21208,8 @@ Selection: ${val}`,
20424
21208
  } else {
20425
21209
  setActiveView("key");
20426
21210
  }
20427
- }
21211
+ },
21212
+ theme: systemSettings.theme
20428
21213
  }
20429
21214
  )));
20430
21215
  case "exit":
@@ -20441,7 +21226,8 @@ Selection: ${val}`,
20441
21226
  }
20442
21227
  setPendingAsk(null);
20443
21228
  setActiveView("chat");
20444
- }
21229
+ },
21230
+ theme: systemSettings.theme
20445
21231
  }
20446
21232
  ));
20447
21233
  case "revert":
@@ -20555,7 +21341,8 @@ Selection: ${val}`,
20555
21341
  const newHistory = await deleteChat(id);
20556
21342
  return newHistory;
20557
21343
  },
20558
- onClose: () => setActiveView("chat")
21344
+ onClose: () => setActiveView("chat"),
21345
+ theme: systemSettings.theme
20559
21346
  }
20560
21347
  ));
20561
21348
  case "keybindingsPrompt":
@@ -20574,11 +21361,12 @@ Selection: ${val}`,
20574
21361
  cachedShortcut = "\\ + Enter";
20575
21362
  }
20576
21363
  setActiveView("chat");
20577
- }
21364
+ },
21365
+ theme: systemSettings.theme
20578
21366
  }
20579
21367
  )));
20580
21368
  case "memory":
20581
- return /* @__PURE__ */ React16.createElement(Box14, { width: "100%", alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React16.createElement(MemoryModal, { onClose: () => setActiveView("chat") }));
21369
+ return /* @__PURE__ */ React16.createElement(Box14, { width: "100%", alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React16.createElement(MemoryModal, { onClose: () => setActiveView("chat"), theme: systemSettings.theme }));
20582
21370
  case "parserDownload":
20583
21371
  return /* @__PURE__ */ React16.createElement(Box14, { width: "100%", alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React16.createElement(ParserDownloadModal, { onClose: () => setActiveView("settings") }));
20584
21372
  case "profile":
@@ -20591,7 +21379,8 @@ Selection: ${val}`,
20591
21379
  setMessages((prev) => [...prev, { id: Date.now(), role: "system", text: `Profile updated: ${profile.name} (${profile.nickname})` }]);
20592
21380
  setActiveView("chat");
20593
21381
  },
20594
- onCancel: () => setActiveView("chat")
21382
+ onCancel: () => setActiveView("chat"),
21383
+ theme: systemSettings.theme
20595
21384
  }
20596
21385
  );
20597
21386
  case "resolution":
@@ -20663,7 +21452,8 @@ Selection: ${val}`,
20663
21452
  pendingApproval.resolve(decision);
20664
21453
  setPendingApproval(null);
20665
21454
  setActiveView("chat");
20666
- }
21455
+ },
21456
+ theme: systemSettings.theme
20667
21457
  }
20668
21458
  )));
20669
21459
  case "updateManager":
@@ -20700,7 +21490,8 @@ Selection: ${val}`,
20700
21490
  setSystemSettings((s) => ({ ...s, updateManager: item.value }));
20701
21491
  setActiveView("settings");
20702
21492
  }
20703
- }
21493
+ },
21494
+ theme: systemSettings.theme
20704
21495
  }
20705
21496
  );
20706
21497
  case "update":
@@ -20742,75 +21533,79 @@ Selection: ${val}`,
20742
21533
  pendingApproval.resolve(item.value);
20743
21534
  setPendingApproval(null);
20744
21535
  setActiveView("chat");
20745
- }
21536
+ },
21537
+ theme: systemSettings.theme
20746
21538
  }
20747
21539
  )));
20748
21540
  default:
20749
- return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginTop: 1, flexShrink: 0, width: "100%" }, showBtwBox && btwResponse && /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 2, paddingY: 1, width: "100%", marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true, underline: true }, "INQUIRY RESPONSE"), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, "[ ESC to Close ]")), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1, width: "100%" }, /* @__PURE__ */ React16.createElement(CodeRenderer, { text: btwResponse, columns: terminalSize.columns - 6 }))), activeSubagents.filter((sa) => sa.status === "running").length > 0 && /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "gray", paddingX: 2, paddingY: 0, width: "100%", marginBottom: 1 }, /* @__PURE__ */ React16.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", 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(
21541
+ 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(
20750
21542
  GlintText_default,
20751
21543
  {
20752
21544
  text: statusText.trimEnd(),
20753
- baseColor: "#B5B8D9",
20754
- glintColor: "#D4DEE7",
21545
+ baseColor: colors.text,
21546
+ glintColor: colors.textMuted,
20755
21547
  speed: 60,
20756
21548
  italic: true,
20757
21549
  glintWidth: 2,
20758
21550
  typeSpeed: 10
20759
21551
  }
20760
- ), /* @__PURE__ */ React16.createElement(Text16, { color: "gray" }, activeTime > 0 ? `(${activeTime.toFixed(0)}s)` : "")) : /* @__PURE__ */ React16.createElement(Text16, { color: "grey", 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, (() => {
21552
+ ), /* @__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, (() => {
20761
21553
  const status = statusText?.toLowerCase() ?? "";
20762
- const showWaiting = isProcessing && Date.now() - lastChunkTime > 15e3 && activeSubagents.length === 0 && (status.includes("connecting") || status.includes("working"));
21554
+ const showWaiting = isProcessing && Date.now() - lastChunkTime > 15e3 && activeSubagents.length === 0 && (status.includes("connecting") || status.includes("working") || status.includes("queue"));
20763
21555
  if (showWaiting) {
20764
21556
  return /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(
20765
21557
  GlintText_default,
20766
21558
  {
20767
21559
  text: "Waiting for API",
20768
- baseColor: "white",
20769
- glintColor: "gray",
21560
+ baseColor: colors.text,
21561
+ glintColor: colors.textMuted,
20770
21562
  glintWidth: 4,
20771
21563
  speed: 80
20772
21564
  }
20773
- ), /* @__PURE__ */ React16.createElement(Text16, { color: "gray", dimColor: true }, " \u2503 "));
21565
+ ), /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted, dimColor: true }, " \u2503 "));
20774
21566
  }
20775
21567
  if (wittyPhrase) {
20776
21568
  return /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(
20777
21569
  GlintText_default,
20778
21570
  {
20779
21571
  text: wittyPhrase,
21572
+ baseColor: colors.text,
21573
+ glintColor: colors.textMuted,
20780
21574
  italic: true,
20781
21575
  speed: 80,
20782
21576
  typeSpeed: 15
20783
21577
  }
20784
- ), /* @__PURE__ */ React16.createElement(Text16, { color: "gray", dimColor: true }, " \u2503 "));
21578
+ ), /* @__PURE__ */ React16.createElement(Text16, { color: colors.textMuted, dimColor: true }, " \u2503 "));
20785
21579
  }
20786
21580
  return null;
20787
21581
  })(), /* @__PURE__ */ React16.createElement(
20788
21582
  GlintText_default,
20789
21583
  {
20790
21584
  text: tempModelOverride || activeModel.split("/")[1] || activeModel,
20791
- baseColor: "white",
20792
- glintColor: "gray",
21585
+ baseColor: colors.text,
21586
+ glintColor: colors.textMuted,
20793
21587
  glintWidth: 3
20794
21588
  }
20795
- ))), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React16.createElement(Box14, { width: "100%", height: 1, overflow: "hidden" }, /* @__PURE__ */ React16.createElement(Text16, { color: "#555555" }, "\u2584".repeat(Math.max(1, terminalSize.columns)))), /* @__PURE__ */ React16.createElement(
21589
+ ))), /* @__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(
20796
21590
  Box14,
20797
21591
  {
20798
- backgroundColor: "#555555",
21592
+ backgroundColor: colors.inputBg,
20799
21593
  paddingX: 1,
20800
21594
  paddingY: 0,
20801
21595
  width: "100%",
20802
21596
  flexDirection: "column"
20803
21597
  },
20804
- /* @__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: "white", 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: "white", bold: true }, " Press ESC again to ", input.length > 0 ? "clear input" : "revert codebase to checkpoint", "...") : /* @__PURE__ */ React16.createElement(Text16, { color: "#cccccc" }, 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(
21598
+ /* @__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(
20805
21599
  MultilineInput,
20806
21600
  {
20807
21601
  key: `input-${inputKey}`,
20808
21602
  onPasteStateChange: setHasPasteBlock,
20809
21603
  focus: !isTerminalFocused && !isCompressing,
20810
21604
  showCursor: isAppFocused && !isCompressing,
21605
+ cursorColor: colors.inputText,
20811
21606
  lastFocusEventTime: lastFocusEventTime.current,
20812
21607
  value: input,
20813
- textStyle: { bold: true },
21608
+ textStyle: { bold: true, color: colors.inputText },
20814
21609
  columns: terminalSize.columns,
20815
21610
  onChange: (val) => {
20816
21611
  const cleanVal = val.replace(/\r\n/g, "\n").replace(/\r/g, "\n").replace(/\\\s*\n/g, "\n");
@@ -20826,10 +21621,10 @@ Selection: ${val}`,
20826
21621
  }
20827
21622
  }
20828
21623
  )))))
20829
- ), /* @__PURE__ */ React16.createElement(Box14, { width: "100%", height: 1, overflow: "hidden" }, /* @__PURE__ */ React16.createElement(Text16, { color: "#555555" }, "\u2580".repeat(Math.max(1, terminalSize.columns))))));
21624
+ ), /* @__PURE__ */ React16.createElement(Box14, { width: "100%", height: 1, overflow: "hidden" }, /* @__PURE__ */ React16.createElement(Text16, { color: colors.inputBorder }, "\u2580".repeat(Math.max(1, terminalSize.columns))))));
20830
21625
  }
20831
21626
  };
20832
- 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(
21627
+ 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(
20833
21628
  BlockItem,
20834
21629
  {
20835
21630
  key: block.key,
@@ -20837,7 +21632,8 @@ Selection: ${val}`,
20837
21632
  columns: (stdout?.columns || 80) - 2,
20838
21633
  showFullThinking,
20839
21634
  aiProvider,
20840
- version: versionFluxflow
21635
+ version: versionFluxflow,
21636
+ theme: systemSettings.theme
20841
21637
  }
20842
21638
  ))), /* @__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(
20843
21639
  BlockItem,
@@ -20847,7 +21643,8 @@ Selection: ${val}`,
20847
21643
  columns: Math.max(20, (stdout?.columns || 80) - 2),
20848
21644
  showFullThinking,
20849
21645
  aiProvider,
20850
- version: versionFluxflow
21646
+ version: versionFluxflow,
21647
+ theme: systemSettings.theme
20851
21648
  }
20852
21649
  )), 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(
20853
21650
  CommandMenu,
@@ -20871,7 +21668,7 @@ Selection: ${val}`,
20871
21668
  onSubmit: handleSetup,
20872
21669
  mask: "*"
20873
21670
  }
20874
- )), /* @__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: "white", paddingX: 2, marginY: 0, width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true }, "\u{1F534} EXIT CONFIRMATION: "), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, "Press "), /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true }, "CTRL + C"), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, " again to exit (", exitCountdown, "s). Press "), /* @__PURE__ */ React16.createElement(Text16, { color: "gray", bold: true }, "ESC"), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, " to cancel.")), suggestions.length > 0 && (() => {
21671
+ )), /* @__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 && (() => {
20875
21672
  const windowSize = 5;
20876
21673
  let startIdx = suggestionOffsetRef.current;
20877
21674
  let firstSelectableIndex = 0;
@@ -20902,7 +21699,7 @@ Selection: ${val}`,
20902
21699
  width: "100%",
20903
21700
  marginBottom: 1
20904
21701
  },
20905
- /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", 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: "gray", italic: true }, "(Use #Lstart-Lend to specify line numbers)") : input.startsWith("/model") && apiTier === "Free" ? (() => {
21702
+ /* @__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" ? (() => {
20906
21703
  let url = "https://aistudio.google.com/billing";
20907
21704
  let label = "billing";
20908
21705
  if (aiProvider === "DeepSeek") {
@@ -20915,7 +21712,7 @@ Selection: ${val}`,
20915
21712
  url = "https://build.nvidia.com/settings/api-keys";
20916
21713
  label = "billing";
20917
21714
  }
20918
- return /* @__PURE__ */ React16.createElement(Text16, { color: "gray", dimColor: true, italic: true }, "Paid API Strategy has more models. Configure ", /* @__PURE__ */ React16.createElement(Text16, { color: "cyan", underline: true }, `\x1B]8;;${url}\x07${label}\x1B]8;;\x07`), " & /settings");
21715
+ 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");
20919
21716
  })() : null),
20920
21717
  visible.slice(0, suggestionVisibleCount).map((s, i) => {
20921
21718
  const actualIdx = startIdx + i;
@@ -20927,14 +21724,14 @@ Selection: ${val}`,
20927
21724
  {
20928
21725
  key: s.cmd,
20929
21726
  flexDirection: "row",
20930
- backgroundColor: isActive ? "#2a2a2a" : void 0,
21727
+ backgroundColor: isActive ? colors.highlightBg : void 0,
20931
21728
  paddingX: 1
20932
21729
  },
20933
- /* @__PURE__ */ React16.createElement(Box14, { width: 3 }, /* @__PURE__ */ React16.createElement(Text16, { color: isActive ? "#B8BDC9" : "gray", bold: isActive }, isActive ? " \u276F" : " ")),
21730
+ /* @__PURE__ */ React16.createElement(Box14, { width: 3 }, /* @__PURE__ */ React16.createElement(Text16, { color: isActive ? colors.text : colors.textMuted, bold: isActive }, isActive ? " \u276F" : " ")),
20934
21731
  /* @__PURE__ */ React16.createElement(Box14, { width: 55 }, /* @__PURE__ */ React16.createElement(
20935
21732
  Text16,
20936
21733
  {
20937
- color: isDivider ? "#D0CCD8" : isGemmaDisabled ? "gray" : isActive ? "white" : "grey",
21734
+ color: isDivider ? colors.textDim : isGemmaDisabled ? colors.textMuted : isActive ? colors.text : colors.textDim,
20938
21735
  bold: false
20939
21736
  },
20940
21737
  s.cmd && (s.cmd.startsWith("@[") || s.cmd.startsWith("\\@[")) && s.cmd.endsWith("]") ? (() => {
@@ -20943,10 +21740,10 @@ Selection: ${val}`,
20943
21740
  return parts[parts.length - 1];
20944
21741
  })() : s.cmd && s.cmd.includes("/") ? s.cmd.split("/").pop() : s.cmd
20945
21742
  )),
20946
- /* @__PURE__ */ React16.createElement(Box14, { flexGrow: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: `${!isActive ? "gray" : "white"}`, italic: true }, s.desc))
21743
+ /* @__PURE__ */ React16.createElement(Box14, { flexGrow: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: !isActive ? colors.textMuted : colors.text, italic: true }, s.desc))
20947
21744
  );
20948
21745
  }),
20949
- suggestions.length > 5 && /* @__PURE__ */ React16.createElement(Box14, { paddingX: 1, height: 1 }, remaining > 0 ? /* @__PURE__ */ React16.createElement(Text16, { color: "gray", dimColor: true, italic: true }, " ... (", remaining, " more commands available)") : /* @__PURE__ */ React16.createElement(Text16, { color: "gray", dimColor: true, italic: true }, " (End of list)"))
21746
+ 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)"))
20950
21747
  );
20951
21748
  })(), /* @__PURE__ */ React16.createElement(Box14, { flexShrink: 0, width: "100%" }, /* @__PURE__ */ React16.createElement(
20952
21749
  StatusBar_default,
@@ -20961,7 +21758,8 @@ Selection: ${val}`,
20961
21758
  aiProvider,
20962
21759
  activeModel,
20963
21760
  isProcessing,
20964
- lastChunkTime
21761
+ lastChunkTime,
21762
+ theme: systemSettings.theme
20965
21763
  }
20966
21764
  )), activeView === "exit" && (() => {
20967
21765
  const wallTimeMs = Date.now() - SESSION_START_TIME;
@@ -20970,7 +21768,7 @@ Selection: ${val}`,
20970
21768
  const agentActiveMs = sessionApiTime + sessionToolTime;
20971
21769
  const apiPercent = agentActiveMs > 0 ? (sessionApiTime / agentActiveMs * 100).toFixed(1) : "0.0";
20972
21770
  const toolPercent = agentActiveMs > 0 ? (sessionToolTime / agentActiveMs * 100).toFixed(1) : "0.0";
20973
- return /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", borderStyle: "round", paddingX: 3, paddingY: 1, borderColor: "grey", 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: "white", bold: true, underline: true }, "Interaction Summary"), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Session ID:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, chatId)), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Tool Calls:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, 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: "blue" }, "Success Rate:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, successRate, "%")), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Code Changes:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, /* @__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: "blue" }, "Tokens Consumed:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, 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: "grey" }, "\xBB Input Tokens:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens(sessionTotalTokens - sessionTotalCandidateTokens))), sessionTotalCachedTokens > 0 && /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 4 }, /* @__PURE__ */ React16.createElement(Box14, { width: 16 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB Cached:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatTokens(sessionTotalCachedTokens))), sessionTotalCandidateTokens > 0 && /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React16.createElement(Box14, { width: 18 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB Output Tokens:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, 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: "blue" }, "Images Made:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, sessionImageCount)), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Image Credits:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, Number(((sessionImageCredits || 0) * 1e3).toFixed(0)), " credits")))), /* @__PURE__ */ React16.createElement(Box14, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React16.createElement(Text16, { color: "white", bold: true, underline: true }, "Performance"), /* @__PURE__ */ React16.createElement(Box14, { marginTop: 1 }, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Wall Time:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatMsDuration(wallTimeMs))), /* @__PURE__ */ React16.createElement(Box14, null, /* @__PURE__ */ React16.createElement(Box14, { width: 20 }, /* @__PURE__ */ React16.createElement(Text16, { color: "blue" }, "Agent Active:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatMsDuration(agentActiveMs))), /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React16.createElement(Box14, { width: 18 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB API Time:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatMsDuration(sessionApiTime), " (", apiPercent, "%)")), /* @__PURE__ */ React16.createElement(Box14, { marginLeft: 2 }, /* @__PURE__ */ React16.createElement(Box14, { width: 18 }, /* @__PURE__ */ React16.createElement(Text16, { color: "grey" }, "\xBB Tool Time:")), /* @__PURE__ */ React16.createElement(Text16, { color: "white" }, formatMsDuration(sessionToolTime), " (", toolPercent, "%)"))));
21771
+ 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, "%)"))));
20974
21772
  })())));
20975
21773
  }
20976
21774
  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;
@@ -20988,6 +21786,7 @@ var init_app = __esm({
20988
21786
  await init_ai();
20989
21787
  init_subagent_state();
20990
21788
  init_settings();
21789
+ init_theme();
20991
21790
  init_history();
20992
21791
  init_ResumeModal();
20993
21792
  init_MemoryModal();
@@ -21087,7 +21886,7 @@ var init_app = __esm({
21087
21886
  options.push({ label: "Continue to CLI only", action: "dismiss" });
21088
21887
  return options;
21089
21888
  };
21090
- BridgePromo = ({ width, height, selectedIndex, aiProvider }) => {
21889
+ BridgePromo = ({ width, height, selectedIndex, aiProvider, theme = "Dark" }) => {
21091
21890
  const ideName = getIDEName();
21092
21891
  const options = getPromoOptions(ideName);
21093
21892
  return /* @__PURE__ */ React16.createElement(
@@ -21099,7 +21898,7 @@ var init_app = __esm({
21099
21898
  width,
21100
21899
  height
21101
21900
  },
21102
- /* @__PURE__ */ React16.createElement(Box14, { marginBottom: 1, width: Math.min(80, width - 4), justifyContent: "flex-start" }, /* @__PURE__ */ React16.createElement(Text16, null, getFluxLogo(versionFluxflow, aiProvider))),
21901
+ /* @__PURE__ */ React16.createElement(Box14, { marginBottom: 1, width: Math.min(80, width - 4), justifyContent: "flex-start" }, /* @__PURE__ */ React16.createElement(Text16, null, getFluxLogo(versionFluxflow, aiProvider, theme))),
21103
21902
  /* @__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)")))
21104
21903
  );
21105
21904
  };