@@ -491,79 +491,79 @@ export function ChatActions(props: {
491
491
492
492
return (
493
493
< div className = { styles [ "chat-input-actions" ] } >
494
- { /*{ couldStop && (*/ }
495
- { /* <ChatAction*/ }
496
- { /* onClick={stopAll}*/ }
497
- { /* text={Locale.Chat.InputActions.Stop}*/ }
498
- { /* icon={<StopIcon />}*/ }
499
- { /* />*/ }
500
- { /*)}*/ }
501
- { /*{ !props.hitBottom && (*/ }
502
- { /* <ChatAction*/ }
503
- { /* onClick={props.scrollToBottom}*/ }
504
- { /* text={Locale.Chat.InputActions.ToBottom}*/ }
505
- { /* icon={<BottomIcon />}*/ }
506
- { /* />*/ }
507
- { /*)}*/ }
508
- { /*{ props.hitBottom && (*/ }
509
- { /* <ChatAction*/ }
510
- { /* onClick={props.showPromptModal}*/ }
511
- { /* text={Locale.Chat.InputActions.Settings}*/ }
512
- { /* icon={<SettingsIcon />}*/ }
513
- { /* />*/ }
514
- { /*)}*/ }
515
-
516
- { /*{ showUploadImage && (*/ }
517
- { /* <ChatAction*/ }
518
- { /* onClick={props.uploadImage}*/ }
519
- { /* text={Locale.Chat.InputActions.UploadImage}*/ }
520
- { /* icon={props.uploading ? <LoadingButtonIcon /> : <ImageIcon />}*/ }
521
- { /* />*/ }
522
- { /*)}*/ }
523
- { /* <ChatAction*/ }
524
- { /* onClick={nextTheme}*/ }
525
- { /* text={Locale.Chat.InputActions.Theme[theme]}*/ }
526
- { /* icon={*/ }
527
- { /* <>*/ }
528
- { /* {theme === Theme.Auto ? (*/ }
529
- { /* <AutoIcon />*/ }
530
- { /* ) : theme === Theme.Light ? (*/ }
531
- { /* <LightIcon />*/ }
532
- { /* ) : theme === Theme.Dark ? (*/ }
533
- { /* <DarkIcon />*/ }
534
- { /* ) : null}*/ }
535
- { /* </>*/ }
536
- { /* }*/ }
537
- { /*/>*/ }
538
-
539
- { /* <ChatAction*/ }
540
- { /* onClick={props.showPromptHints}*/ }
541
- { /* text={Locale.Chat.InputActions.Prompt}*/ }
542
- { /* icon={<PromptIcon />}*/ }
543
- { /*/>*/ }
544
-
545
- { /* <ChatAction*/ }
546
- { /* onClick={() => {*/ }
547
- { /* navigate(Path.Masks);*/ }
548
- { /* }}*/ }
549
- { /* text={Locale.Chat.InputActions.Masks}*/ }
550
- { /* icon={<MaskIcon />}*/ }
551
- { /*/>*/ }
552
-
553
- { /* <ChatAction*/ }
554
- { /* text={Locale.Chat.InputActions.Clear}*/ }
555
- { /* icon={<BreakIcon />}*/ }
556
- { /* onClick={() => {*/ }
557
- { /* chatStore.updateCurrentSession((session) => {*/ }
558
- { /* if (session.clearContextIndex === session.messages.length) {*/ }
559
- { /* session.clearContextIndex = undefined;*/ }
560
- { /* } else {*/ }
561
- { /* session.clearContextIndex = session.messages.length;*/ }
562
- { /* session.memoryPrompt = ""; // will clear memory*/ }
563
- { /* }*/ }
564
- { /* });*/ }
565
- { /* }}*/ }
566
- { /*/>*/ }
494
+ { couldStop && (
495
+ < ChatAction
496
+ onClick = { stopAll }
497
+ text = { Locale . Chat . InputActions . Stop }
498
+ icon = { < StopIcon /> }
499
+ />
500
+ ) }
501
+ { ! props . hitBottom && (
502
+ < ChatAction
503
+ onClick = { props . scrollToBottom }
504
+ text = { Locale . Chat . InputActions . ToBottom }
505
+ icon = { < BottomIcon /> }
506
+ />
507
+ ) }
508
+ { props . hitBottom && (
509
+ < ChatAction
510
+ onClick = { props . showPromptModal }
511
+ text = { Locale . Chat . InputActions . Settings }
512
+ icon = { < SettingsIcon /> }
513
+ />
514
+ ) }
515
+
516
+ { showUploadImage && (
517
+ < ChatAction
518
+ onClick = { props . uploadImage }
519
+ text = { Locale . Chat . InputActions . UploadImage }
520
+ icon = { props . uploading ? < LoadingButtonIcon /> : < ImageIcon /> }
521
+ />
522
+ ) }
523
+ < ChatAction
524
+ onClick = { nextTheme }
525
+ text = { Locale . Chat . InputActions . Theme [ theme ] }
526
+ icon = {
527
+ < >
528
+ { theme === Theme . Auto ? (
529
+ < AutoIcon />
530
+ ) : theme === Theme . Light ? (
531
+ < LightIcon />
532
+ ) : theme === Theme . Dark ? (
533
+ < DarkIcon />
534
+ ) : null }
535
+ </ >
536
+ }
537
+ />
538
+
539
+ < ChatAction
540
+ onClick = { props . showPromptHints }
541
+ text = { Locale . Chat . InputActions . Prompt }
542
+ icon = { < PromptIcon /> }
543
+ />
544
+
545
+ < ChatAction
546
+ onClick = { ( ) => {
547
+ navigate ( Path . Masks ) ;
548
+ } }
549
+ text = { Locale . Chat . InputActions . Masks }
550
+ icon = { < MaskIcon /> }
551
+ />
552
+
553
+ < ChatAction
554
+ text = { Locale . Chat . InputActions . Clear }
555
+ icon = { < BreakIcon /> }
556
+ onClick = { ( ) => {
557
+ chatStore . updateCurrentSession ( ( session ) => {
558
+ if ( session . clearContextIndex === session . messages . length ) {
559
+ session . clearContextIndex = undefined ;
560
+ } else {
561
+ session . clearContextIndex = session . messages . length ;
562
+ session . memoryPrompt = "" ; // will clear memory
563
+ }
564
+ } ) ;
565
+ } }
566
+ />
567
567
568
568
< ChatAction
569
569
onClick = { ( ) => setShowModelSelector ( true ) }
@@ -1089,6 +1089,7 @@ function _Chat() {
1089
1089
if ( payload . url ) {
1090
1090
accessStore . update ( ( access ) => ( access . openaiUrl = payload . url ! ) ) ;
1091
1091
}
1092
+ accessStore . update ( ( access ) => ( access . useCustomConfig = true ) ) ;
1092
1093
} ) ;
1093
1094
}
1094
1095
} catch {
@@ -1233,25 +1234,25 @@ function _Chat() {
1233
1234
</ div >
1234
1235
</ div >
1235
1236
< div className = "window-actions" >
1236
- { /*{ !isMobileScreen && (*/ }
1237
- { /* <div className="window-action-button">*/ }
1238
- { /* <IconButton*/ }
1239
- { /* icon={<RenameIcon />}*/ }
1240
- { /* bordered*/ }
1241
- { /* onClick={() => setIsEditingMessage(true)}*/ }
1242
- { /* />*/ }
1243
- { /* </div>*/ }
1244
- { /*)}*/ }
1245
- { /* <div className="window-action-button">*/ }
1246
- { /* <IconButton*/ }
1247
- { /* icon={<ExportIcon />}*/ }
1248
- { /* bordered*/ }
1249
- { /* title={Locale.Chat.Actions.Export}*/ }
1250
- { /* onClick={() => {*/ }
1251
- { /* setShowExport(true);*/ }
1252
- { /* }}*/ }
1253
- { /* />*/ }
1254
- { /* </div>*/ }
1237
+ { ! isMobileScreen && (
1238
+ < div className = "window-action-button" >
1239
+ < IconButton
1240
+ icon = { < RenameIcon /> }
1241
+ bordered
1242
+ onClick = { ( ) => setIsEditingMessage ( true ) }
1243
+ />
1244
+ </ div >
1245
+ ) }
1246
+ < div className = "window-action-button" >
1247
+ < IconButton
1248
+ icon = { < ExportIcon /> }
1249
+ bordered
1250
+ title = { Locale . Chat . Actions . Export }
1251
+ onClick = { ( ) => {
1252
+ setShowExport ( true ) ;
1253
+ } }
1254
+ />
1255
+ </ div >
1255
1256
{ showMaxIcon && (
1256
1257
< div className = "window-action-button" >
1257
1258
< IconButton
0 commit comments