chore: tool add or setting copywriting

pull/20294/head
Joel 1 year ago
parent fe01de5667
commit a9475902d4

@ -141,7 +141,7 @@ const MultipleToolSelector = ({
} }
panelShowState={panelShowState} panelShowState={panelShowState}
onPanelShowStateChange={setPanelShowState} onPanelShowStateChange={setPanelShowState}
isEdit={false}
/> />
{value.length === 0 && ( {value.length === 0 && (
<div className='system-xs-regular flex justify-center rounded-[10px] bg-background-section p-3 text-text-tertiary'>{t('plugin.detailPanel.toolSelector.empty')}</div> <div className='system-xs-regular flex justify-center rounded-[10px] bg-background-section p-3 text-text-tertiary'>{t('plugin.detailPanel.toolSelector.empty')}</div>
@ -158,6 +158,7 @@ const MultipleToolSelector = ({
onSelect={item => handleConfigure(item, index)} onSelect={item => handleConfigure(item, index)}
onDelete={() => handleDelete(index)} onDelete={() => handleDelete(index)}
supportEnableSwitch supportEnableSwitch
isEdit
/> />
</div> </div>
))} ))}

@ -54,6 +54,7 @@ type Props = {
scope?: string scope?: string
value?: ToolValue value?: ToolValue
selectedTools?: ToolValue[] selectedTools?: ToolValue[]
isEdit?: boolean
onSelect: (tool: { onSelect: (tool: {
provider_name: string provider_name: string
tool_name: string tool_name: string
@ -77,6 +78,7 @@ type Props = {
const ToolSelector: FC<Props> = ({ const ToolSelector: FC<Props> = ({
value, value,
selectedTools, selectedTools,
isEdit,
disabled, disabled,
placement = 'left', placement = 'left',
offset = 4, offset = 4,
@ -277,7 +279,7 @@ const ToolSelector: FC<Props> = ({
<div className={cn('relative max-h-[642px] min-h-20 w-[361px] rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-bg-blur pb-4 shadow-lg backdrop-blur-sm', !isShowSettingAuth && 'overflow-y-auto pb-2')}> <div className={cn('relative max-h-[642px] min-h-20 w-[361px] rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-bg-blur pb-4 shadow-lg backdrop-blur-sm', !isShowSettingAuth && 'overflow-y-auto pb-2')}>
{!isShowSettingAuth && ( {!isShowSettingAuth && (
<> <>
<div className='system-xl-semibold px-4 pb-1 pt-3.5 text-text-primary'>{t('plugin.detailPanel.toolSelector.title')}</div> <div className='system-xl-semibold px-4 pb-1 pt-3.5 text-text-primary'>{t(`plugin.detailPanel.toolSelector.${isEdit ? 'toolSetting' : 'title'}`)}</div>
{/* base form */} {/* base form */}
<div className='flex flex-col gap-3 px-4 py-2'> <div className='flex flex-col gap-3 px-4 py-2'>
<div className='flex flex-col gap-1'> <div className='flex flex-col gap-1'>

@ -77,6 +77,7 @@ const translation = {
modelNum: '{{num}} MODELS INCLUDED', modelNum: '{{num}} MODELS INCLUDED',
toolSelector: { toolSelector: {
title: 'Add tool', title: 'Add tool',
toolSetting: 'Tool Settings',
toolLabel: 'Tool', toolLabel: 'Tool',
descriptionLabel: 'Tool description', descriptionLabel: 'Tool description',
descriptionPlaceholder: 'Brief description of the tool\'s purpose, e.g., get the temperature for a specific location.', descriptionPlaceholder: 'Brief description of the tool\'s purpose, e.g., get the temperature for a specific location.',

@ -77,6 +77,7 @@ const translation = {
modelNum: '{{num}} 模型已包含', modelNum: '{{num}} 模型已包含',
toolSelector: { toolSelector: {
title: '添加工具', title: '添加工具',
toolSetting: '工具设置',
toolLabel: '工具', toolLabel: '工具',
descriptionLabel: '工具描述', descriptionLabel: '工具描述',
descriptionPlaceholder: '简要描述工具目的,例如,获取特定位置的温度。', descriptionPlaceholder: '简要描述工具目的,例如,获取特定位置的温度。',

Loading…
Cancel
Save