Merge branch 'feat/plugins' into dev/plugin-deploy
This commit is contained in:
commit
27ea150a44
@ -106,6 +106,16 @@ const SettingBuiltInTool: FC<Props> = ({
|
||||
return valid
|
||||
})()
|
||||
|
||||
const getType = (type: string) => {
|
||||
if (type === 'number-input')
|
||||
return t('tools.setBuiltInTools.number')
|
||||
if (type === 'text-input')
|
||||
return t('tools.setBuiltInTools.string')
|
||||
if (type === 'file')
|
||||
return t('tools.setBuiltInTools.file')
|
||||
return type
|
||||
}
|
||||
|
||||
const infoUI = (
|
||||
<div className=''>
|
||||
{infoSchemas.length > 0 && (
|
||||
@ -114,7 +124,9 @@ const SettingBuiltInTool: FC<Props> = ({
|
||||
<div key={index} className='py-1'>
|
||||
<div className='flex items-center gap-2'>
|
||||
<div className='text-text-secondary code-sm-semibold'>{item.label[language]}</div>
|
||||
<div className='text-text-tertiary system-xs-regular'>{item.type === 'number-input' ? t('tools.setBuiltInTools.number') : t('tools.setBuiltInTools.string')}</div>
|
||||
<div className='text-text-tertiary system-xs-regular'>
|
||||
{getType(item.type)}
|
||||
</div>
|
||||
{item.required && (
|
||||
<div className='text-text-warning-secondary system-xs-medium'>{t('tools.setBuiltInTools.required')}</div>
|
||||
)}
|
||||
|
@ -24,14 +24,16 @@ const ActionList = ({
|
||||
}: Props) => {
|
||||
const { t } = useTranslation()
|
||||
const { isCurrentWorkspaceManager } = useAppContext()
|
||||
const { data: provider } = useBuiltinProviderInfo(`${detail.plugin_id}/${detail.name}`)
|
||||
const providerBriefInfo = detail.declaration.tool.identity
|
||||
const providerKey = `${detail.plugin_id}/${providerBriefInfo.name}`
|
||||
const { data: provider } = useBuiltinProviderInfo(providerKey)
|
||||
const invalidateProviderInfo = useInvalidateBuiltinProviderInfo()
|
||||
const { data } = useBuiltinTools(`${detail.plugin_id}/${detail.name}`)
|
||||
const { data } = useBuiltinTools(providerKey)
|
||||
|
||||
const [showSettingAuth, setShowSettingAuth] = useState(false)
|
||||
|
||||
const handleCredentialSettingUpdate = () => {
|
||||
invalidateProviderInfo(`${detail.plugin_id}/${detail.name}`)
|
||||
invalidateProviderInfo(providerKey)
|
||||
Toast.notify({
|
||||
type: 'success',
|
||||
message: t('common.api.actionSuccess'),
|
||||
|
@ -3,9 +3,9 @@ import type { ToolCredential } from '@/app/components/tools/types'
|
||||
import type { Locale } from '@/i18n'
|
||||
|
||||
export enum PluginType {
|
||||
tool = 'tools',
|
||||
model = 'models',
|
||||
extension = 'endpoints',
|
||||
tool = 'tool',
|
||||
model = 'model',
|
||||
extension = 'extension',
|
||||
}
|
||||
|
||||
export enum PluginSource {
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
@import "../../themes/light.css";
|
||||
@import "../../themes/dark.css";
|
||||
@import "../../themes/other-light.css";
|
||||
@import "../../themes/other-dark.css";
|
||||
@import "../../themes/manual-light.css";
|
||||
@import "../../themes/manual-dark.css";
|
||||
|
||||
html[data-changing-theme] * {
|
||||
transition: none !important;
|
||||
|
@ -129,6 +129,7 @@ const translation = {
|
||||
parameters: 'parameters',
|
||||
string: 'string',
|
||||
number: 'number',
|
||||
file: 'file',
|
||||
required: 'Required',
|
||||
infoAndSetting: 'Info & Settings',
|
||||
},
|
||||
|
@ -129,6 +129,7 @@ const translation = {
|
||||
parameters: '参数',
|
||||
string: '字符串',
|
||||
number: '数字',
|
||||
file: '文件',
|
||||
required: '必填',
|
||||
infoAndSetting: '信息和设置',
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user