File tree Expand file tree Collapse file tree 4 files changed +17
-3
lines changed Expand file tree Collapse file tree 4 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ const DANGER_CONFIG = {
19
19
compressModel : serverConfig . compressModel ,
20
20
customHello : serverConfig . customHello ,
21
21
UnauthorizedInfo : serverConfig . UnauthorizedInfo ,
22
+ iconPosition : serverConfig . iconPosition ,
22
23
translateModel : serverConfig . translateModel ,
23
24
ocrModel : serverConfig . ocrModel ,
24
25
sidebarTitle : siderbarConfig . title ,
Original file line number Diff line number Diff line change @@ -1506,6 +1506,11 @@ function _Chat() {
1506
1506
Locale . Error . Unauthorized =
1507
1507
accessStore . UnauthorizedInfo || Locale . Error . Unauthorized ;
1508
1508
1509
+ // icon position
1510
+ const iconPosition = accessStore . iconPosition . toLowerCase ( ) || "down" ;
1511
+ const iconUpEnabled = iconPosition === "up" || iconPosition === "both" ;
1512
+ const iconDownEnabled = iconPosition === "down" || iconPosition === "both" ;
1513
+
1509
1514
async function openaiSpeech ( text : string ) {
1510
1515
if ( speechStatus ) {
1511
1516
ttsPlayer . stop ( ) ;
@@ -2079,7 +2084,7 @@ function _Chat() {
2079
2084
</ div >
2080
2085
) }
2081
2086
2082
- { ! isMobileScreen && showActions && (
2087
+ { iconUpEnabled && showActions && (
2083
2088
< div className = { styles [ "chat-message-actions" ] } >
2084
2089
< div className = { styles [ "chat-input-actions" ] } >
2085
2090
< ChatInputActions
@@ -2167,7 +2172,7 @@ function _Chat() {
2167
2172
message . model ? ` - Model: ${ message . model } ` : ""
2168
2173
} `}
2169
2174
</ div >
2170
- { showActions && (
2175
+ { iconDownEnabled && showActions && (
2171
2176
< div className = { styles [ "chat-message-actions" ] } >
2172
2177
< div className = { styles [ "chat-input-actions" ] } >
2173
2178
< ChatInputActions
Original file line number Diff line number Diff line change @@ -186,5 +186,7 @@ export const getServerSideConfig = () => {
186
186
compressModel : process . env . COMPRESS_MODEL ,
187
187
translateModel : process . env . TRANSLATE_MODEL ,
188
188
ocrModel : process . env . OCR_MODEL ,
189
+
190
+ iconPosition : process . env . ICON_POSITION || "down" ,
189
191
} ;
190
192
} ;
Original file line number Diff line number Diff line change @@ -55,6 +55,9 @@ const DEFAULT_ACCESS_STATE = {
55
55
customHello : "" ,
56
56
UnauthorizedInfo : "" ,
57
57
58
+ // icon position
59
+ iconPosition : "" ,
60
+
58
61
// sidebar config
59
62
sidebarTitle : "" ,
60
63
sidebarSubTitle : "" ,
@@ -97,6 +100,10 @@ export const useAccessStore = createPersistStore(
97
100
this . fetch ( ) ;
98
101
return get ( ) . ocrModel ;
99
102
} ,
103
+ setIconPosition ( ) {
104
+ this . fetch ( ) ;
105
+ return get ( ) . iconPosition ;
106
+ } ,
100
107
setCustomHello ( ) {
101
108
this . fetch ( ) ;
102
109
return get ( ) . customHello ;
@@ -107,7 +114,6 @@ export const useAccessStore = createPersistStore(
107
114
} ,
108
115
enabledAccessControl ( ) {
109
116
this . fetch ( ) ;
110
-
111
117
return get ( ) . needCode ;
112
118
} ,
113
119
getVisionModels ( ) {
You can’t perform that action at this time.
0 commit comments