File tree Expand file tree Collapse file tree
components/ConfigDropdown Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 "currentLabel" : " current" ,
1212 "localeEn" : " English" ,
1313 "localeZhCN" : " \u4e2d\u6587 " ,
14- "categoryWithValue" : " {label} ({value})"
14+ "categoryWithValue" : " {label} ({value})" ,
15+ "languageUpdated" : " Language: {locale}" ,
16+ "thinkingLanguageUpdated" : " Thinking language: {locale}" ,
17+ "replyLanguageUpdated" : " Reply language: {locale}"
1518 }
1619 }
1720}
Original file line number Diff line number Diff line change 1111 "currentLabel" : " 当前" ,
1212 "localeEn" : " English" ,
1313 "localeZhCN" : " 中文" ,
14- "categoryWithValue" : " {label}({value})"
14+ "categoryWithValue" : " {label}({value})" ,
15+ "languageUpdated" : " 语言:{locale}" ,
16+ "thinkingLanguageUpdated" : " 推理语言:{locale}" ,
17+ "replyLanguageUpdated" : " 回复语言:{locale}"
1518 }
1619 }
1720}
Original file line number Diff line number Diff line change @@ -939,6 +939,7 @@ export const PromptInput = React.memo(function PromptInput({
939939 onLocaleChange = { ( locale ) => onLocaleChange ?.( locale ) }
940940 onThinkingLocaleChange = { ( locale ) => onThinkingLocaleChange ?.( locale ) }
941941 onReplyLocaleChange = { ( locale ) => onReplyLocaleChange ?.( locale ) }
942+ onStatusMessage = { setStatusMessage }
942943 />
943944 < SlashCommandMenu width = { screenWidth } items = { slashMenu } activeIndex = { menuIndex } />
944945 { ! showFooterText && (
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ type Props = {
5151 onLocaleChange : ( locale : Locale ) => void ;
5252 onThinkingLocaleChange : ( locale : Locale ) => void ;
5353 onReplyLocaleChange : ( locale : Locale ) => void ;
54+ onStatusMessage ?: ( message : string | null ) => void ;
5455} ;
5556
5657const ConfigDropdown : React . FC < Props > = ( {
@@ -63,6 +64,7 @@ const ConfigDropdown: React.FC<Props> = ({
6364 onLocaleChange,
6465 onThinkingLocaleChange,
6566 onReplyLocaleChange,
67+ onStatusMessage,
6668} ) => {
6769 const [ step , setStep ] = useState < ConfigStep | null > ( null ) ;
6870 const [ activeIndex , setActiveIndex ] = useState ( 0 ) ;
@@ -108,18 +110,25 @@ const ConfigDropdown: React.FC<Props> = ({
108110 return ;
109111 }
110112
113+ const localeDisplay = getLocaleDisplayName ( locale . key ) ;
111114 switch ( selectedCategory ) {
112115 case "locale" :
113116 onLocaleChange ( locale . key ) ;
117+ onStatusMessage ?.( t ( "ui.config.languageUpdated" , { locale : localeDisplay } ) ) ;
114118 break ;
115119 case "thinkingLocale" :
116120 onThinkingLocaleChange ( locale . key ) ;
121+ onStatusMessage ?.( t ( "ui.config.thinkingLanguageUpdated" , { locale : localeDisplay } ) ) ;
117122 break ;
118123 case "replyLocale" :
119124 onReplyLocaleChange ( locale . key ) ;
125+ onStatusMessage ?.( t ( "ui.config.replyLanguageUpdated" , { locale : localeDisplay } ) ) ;
120126 break ;
121127 }
122- onClose ( ) ;
128+ // Return to category selection after applying
129+ setStep ( "category" ) ;
130+ setActiveIndex ( 0 ) ;
131+ setSelectedCategory ( null ) ;
123132 }
124133
125134 useInput (
You can’t perform that action at this time.
0 commit comments