@@ -82,6 +82,8 @@ export function SettingsForm() {
82
82
const [ showConfirmModal , setShowConfirmModal ] = useState ( false ) ;
83
83
const [ settings , setSettings ] = useState < Settings | null > ( null ) ;
84
84
const [ chatRetention , setChatRetention ] = useState ( "" ) ;
85
+ const [ companyName , setCompanyName ] = useState ( "" ) ;
86
+ const [ companyDescription , setCompanyDescription ] = useState ( "" ) ;
85
87
const { popup, setPopup } = usePopup ( ) ;
86
88
const isEnterpriseEnabled = usePaidEnterpriseFeaturesEnabled ( ) ;
87
89
@@ -101,6 +103,10 @@ export function SettingsForm() {
101
103
setChatRetention (
102
104
combinedSettings . settings . maximum_chat_retention_days ?. toString ( ) || ""
103
105
) ;
106
+ setCompanyName ( combinedSettings . settings . company_name || "" ) ;
107
+ setCompanyDescription (
108
+ combinedSettings . settings . company_description || ""
109
+ ) ;
104
110
}
105
111
// We don't need to fetch vision providers here anymore as the hook handles it
106
112
} , [ ] ) ;
@@ -190,10 +196,58 @@ export function SettingsForm() {
190
196
] ) ;
191
197
}
192
198
199
+ function handleCompanyNameBlur ( ) {
200
+ updateSettingField ( [
201
+ { fieldName : "company_name" , newValue : companyName || null } ,
202
+ ] ) ;
203
+ }
204
+
205
+ // NOTE: at the moment there's a small bug where if you click another admin panel page after typing
206
+ // the field doesn't update correctly
207
+ function handleCompanyDescriptionBlur ( ) {
208
+ updateSettingField ( [
209
+ {
210
+ fieldName : "company_description" ,
211
+ newValue : companyDescription || null ,
212
+ } ,
213
+ ] ) ;
214
+ }
215
+
193
216
return (
194
217
< div className = "flex flex-col pb-8" >
195
218
{ popup }
196
219
< Title className = "mb-4" > Workspace Settings</ Title >
220
+ < label className = "flex flex-col text-sm mb-4" >
221
+ < Label > Company Name</ Label >
222
+ < SubLabel >
223
+ Set the company name used for search and chat context.
224
+ </ SubLabel >
225
+ < input
226
+ type = "text"
227
+ className = "mt-1 p-2 border rounded w-full max-w-xl"
228
+ value = { companyName }
229
+ onChange = { ( e ) => setCompanyName ( e . target . value ) }
230
+ onBlur = { handleCompanyNameBlur }
231
+ placeholder = "Enter company name"
232
+ />
233
+ </ label >
234
+
235
+ < label className = "flex flex-col text-sm mb-4" >
236
+ < Label > Company Description</ Label >
237
+ < SubLabel >
238
+ Provide a short description of the company for search and chat
239
+ context.
240
+ </ SubLabel >
241
+ < textarea
242
+ className = "mt-1 p-2 border rounded w-full max-w-xl"
243
+ value = { companyDescription }
244
+ onChange = { ( e ) => setCompanyDescription ( e . target . value ) }
245
+ onBlur = { handleCompanyDescriptionBlur }
246
+ placeholder = "Enter company description"
247
+ rows = { 4 }
248
+ />
249
+ </ label >
250
+
197
251
< Checkbox
198
252
label = "Auto-scroll"
199
253
sublabel = "If set, the chat window will automatically scroll to the bottom as new lines of text are generated by the AI model. This can be overridden by individual user settings."
0 commit comments