| | |
| | | }, [onChange]) |
| | | return ( |
| | | <div className='flex items-center justify-between'> |
| | | <div className='text-[13px] font-normal text-text-secondary'>{title}</div> |
| | | <Input |
| | | <div className='text-[13px] font-normal text-gray-700'>{title}</div> |
| | | <input |
| | | readOnly={readonly} |
| | | value={value} |
| | | onChange={handleChange} |
| | | className='h-8 w-[200px]' |
| | | className='w-[200px] h-8 leading-8 px-2.5 rounded-lg border-0 bg-gray-100 text-gray-900 text-[13px] placeholder:text-gray-400 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200' |
| | | type='text' /> |
| | | </div> |
| | | ) |
| | |
| | | limitedSize = null |
| | | } |
| | | else { |
| | | limitedSize = Number.parseInt(limitedSize as string, 10) |
| | | limitedSize = parseInt(limitedSize as string, 10) |
| | | if (isNaN(limitedSize)) |
| | | limitedSize = WINDOW_SIZE_DEFAULT |
| | | |
| | |
| | | <> |
| | | {/* window size */} |
| | | <div className='flex justify-between'> |
| | | <div className='flex h-8 items-center space-x-2'> |
| | | <div className='flex items-center h-8 space-x-2'> |
| | | <Switch |
| | | defaultValue={payload?.window?.enabled} |
| | | onChange={handleWindowEnabledChange} |
| | | size='md' |
| | | disabled={readonly} |
| | | /> |
| | | <div className='system-xs-medium-uppercase text-text-tertiary'>{t(`${i18nPrefix}.windowSize`)}</div> |
| | | <div className='text-text-tertiary system-xs-medium-uppercase'>{t(`${i18nPrefix}.windowSize`)}</div> |
| | | </div> |
| | | <div className='flex h-8 items-center space-x-2'> |
| | | <div className='flex items-center h-8 space-x-2'> |
| | | <Slider |
| | | className='w-[144px]' |
| | | value={(payload.window?.size || WINDOW_SIZE_DEFAULT) as number} |
| | |
| | | <Input |
| | | value={(payload.window?.size || WINDOW_SIZE_DEFAULT) as number} |
| | | wrapperClassName='w-12' |
| | | className='appearance-none pr-0' |
| | | className='pr-0 appearance-none' |
| | | type='number' |
| | | min={WINDOW_SIZE_MIN} |
| | | max={WINDOW_SIZE_MAX} |
| | |
| | | </div> |
| | | {canSetRoleName && ( |
| | | <div className='mt-4'> |
| | | <div className='text-xs font-medium uppercase leading-6 text-text-tertiary'>{t(`${i18nPrefix}.conversationRoleName`)}</div> |
| | | <div className='leading-6 text-xs font-medium text-gray-500 uppercase'>{t(`${i18nPrefix}.conversationRoleName`)}</div> |
| | | <div className='mt-1 space-y-2'> |
| | | <RoleItem |
| | | readonly={readonly} |