mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:28:10 +08:00
Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox
This commit is contained in:
@ -30,7 +30,7 @@ const ActionList = ({
|
||||
return (
|
||||
<div className="px-4 pb-4 pt-2">
|
||||
<div className="mb-1 py-1">
|
||||
<div className="system-sm-semibold-uppercase mb-1 flex h-6 items-center justify-between text-text-secondary">
|
||||
<div className="mb-1 flex h-6 items-center justify-between text-text-secondary system-sm-semibold-uppercase">
|
||||
{t('detailPanel.actionNum', { ns: 'plugin', num: data.length, action: data.length > 1 ? 'actions' : 'action' })}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -39,7 +39,7 @@ const AgentStrategyList = ({
|
||||
return (
|
||||
<div className="px-4 pb-4 pt-2">
|
||||
<div className="mb-1 py-1">
|
||||
<div className="system-sm-semibold-uppercase mb-1 flex h-6 items-center justify-between text-text-secondary">
|
||||
<div className="mb-1 flex h-6 items-center justify-between text-text-secondary system-sm-semibold-uppercase">
|
||||
{t('detailPanel.strategyNum', { ns: 'plugin', num: strategyList.length, strategy: strategyList.length > 1 ? 'strategies' : 'strategy' })}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -111,9 +111,9 @@ const AppInputsForm = ({
|
||||
<div className="flex flex-col gap-4 px-4 py-2">
|
||||
{inputsForms.map(form => (
|
||||
<div key={form.variable}>
|
||||
<div className="system-sm-semibold mb-1 flex h-6 items-center gap-1 text-text-secondary">
|
||||
<div className="mb-1 flex h-6 items-center gap-1 text-text-secondary system-sm-semibold">
|
||||
<div className="truncate">{form.label}</div>
|
||||
{!form.required && <span className="system-xs-regular text-text-tertiary">{t('panel.optional', { ns: 'workflow' })}</span>}
|
||||
{!form.required && <span className="text-text-tertiary system-xs-regular">{t('panel.optional', { ns: 'workflow' })}</span>}
|
||||
</div>
|
||||
{renderField(form)}
|
||||
</div>
|
||||
|
||||
@ -37,13 +37,13 @@ const AppInputsPanel = ({
|
||||
<div className={cn('flex max-h-[240px] flex-col rounded-b-2xl border-t border-divider-subtle pb-4')}>
|
||||
{isLoading && <div className="pt-3"><Loading type="app" /></div>}
|
||||
{!isLoading && (
|
||||
<div className="system-sm-semibold mb-2 mt-3 flex h-6 shrink-0 items-center px-4 text-text-secondary">
|
||||
<div className="mb-2 mt-3 flex h-6 shrink-0 items-center px-4 text-text-secondary system-sm-semibold">
|
||||
{t('appSelector.params', { ns: 'app' })}
|
||||
</div>
|
||||
)}
|
||||
{!isLoading && !hasInputs && (
|
||||
<div className="flex h-16 flex-col items-center justify-center">
|
||||
<div className="system-sm-regular text-text-tertiary">
|
||||
<div className="text-text-tertiary system-sm-regular">
|
||||
{t('appSelector.noParams', { ns: 'app' })}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -180,7 +180,7 @@ const AppPicker: FC<Props> = ({
|
||||
background={app.icon_background}
|
||||
imageUrl={app.icon_url}
|
||||
/>
|
||||
<div title={`${app.name} (${app.id})`} className="system-sm-medium grow text-components-input-text-filled">
|
||||
<div title={`${app.name} (${app.id})`} className="grow text-components-input-text-filled system-sm-medium">
|
||||
<span className="mr-1">{app.name}</span>
|
||||
<span className="text-text-tertiary">
|
||||
(
|
||||
@ -188,7 +188,7 @@ const AppPicker: FC<Props> = ({
|
||||
)
|
||||
</span>
|
||||
</div>
|
||||
<div className="system-2xs-medium-uppercase shrink-0 text-text-tertiary">{getAppType(app)}</div>
|
||||
<div className="shrink-0 text-text-tertiary system-2xs-medium-uppercase">{getAppType(app)}</div>
|
||||
</div>
|
||||
))}
|
||||
<div ref={observerTarget} className="h-4 w-full">
|
||||
|
||||
@ -36,10 +36,10 @@ const AppTrigger = ({
|
||||
/>
|
||||
)}
|
||||
{appDetail && (
|
||||
<div title={appDetail.name} className="system-sm-medium grow text-components-input-text-filled">{appDetail.name}</div>
|
||||
<div title={appDetail.name} className="grow text-components-input-text-filled system-sm-medium">{appDetail.name}</div>
|
||||
)}
|
||||
{!appDetail && (
|
||||
<div className="system-sm-regular grow truncate text-components-input-text-placeholder">{t('appSelector.placeholder', { ns: 'app' })}</div>
|
||||
<div className="grow truncate text-components-input-text-placeholder system-sm-regular">{t('appSelector.placeholder', { ns: 'app' })}</div>
|
||||
)}
|
||||
<RiArrowDownSLine className={cn('ml-0.5 h-4 w-4 shrink-0 text-text-quaternary group-hover:text-text-secondary', open && 'text-text-secondary')} />
|
||||
</div>
|
||||
|
||||
@ -171,7 +171,7 @@ const AppSelector: FC<Props> = ({
|
||||
<PortalToFollowElemContent className="z-[1000]">
|
||||
<div className="relative min-h-20 w-[389px] rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-bg-blur shadow-lg backdrop-blur-sm">
|
||||
<div className="flex flex-col gap-1 px-4 py-3">
|
||||
<div className="system-sm-semibold flex h-6 items-center text-text-secondary">{t('appSelector.label', { ns: 'app' })}</div>
|
||||
<div className="flex h-6 items-center text-text-secondary system-sm-semibold">{t('appSelector.label', { ns: 'app' })}</div>
|
||||
<AppPicker
|
||||
placement="bottom"
|
||||
offset={offset}
|
||||
|
||||
@ -56,7 +56,7 @@ const ActionList = ({
|
||||
return (
|
||||
<div className="px-4 pb-4 pt-2">
|
||||
<div className="mb-1 py-1">
|
||||
<div className="system-sm-semibold-uppercase mb-1 flex h-6 items-center justify-between text-text-secondary">
|
||||
<div className="mb-1 flex h-6 items-center justify-between text-text-secondary system-sm-semibold-uppercase">
|
||||
{t('detailPanel.actionNum', { ns: 'plugin', num: data.length, action: data.length > 1 ? 'actions' : 'action' })}
|
||||
{/* {provider.is_team_authorization && provider.allow_delete && (
|
||||
<Button
|
||||
|
||||
@ -48,7 +48,7 @@ const PluginSourceBadge: FC<PluginSourceBadgeProps> = ({ source }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="system-xs-regular ml-1 mr-0.5 text-text-quaternary">·</div>
|
||||
<div className="ml-1 mr-0.5 text-text-quaternary system-xs-regular">·</div>
|
||||
<Tooltip popupContent={t(config.tipKey as never, { ns: 'plugin' })}>
|
||||
<div>{config.icon}</div>
|
||||
</Tooltip>
|
||||
|
||||
@ -139,7 +139,7 @@ const EndpointCard = ({
|
||||
<div className="rounded-xl bg-background-section-burn p-0.5">
|
||||
<div className="group rounded-[10px] border-[0.5px] border-components-panel-border bg-components-panel-on-panel-item-bg p-2.5 pl-3">
|
||||
<div className="flex items-center">
|
||||
<div className="system-md-semibold mb-1 flex h-6 grow items-center gap-1 text-text-secondary">
|
||||
<div className="mb-1 flex h-6 grow items-center gap-1 text-text-secondary system-md-semibold">
|
||||
<RiLoginCircleLine className="h-4 w-4" />
|
||||
<div>{data.name}</div>
|
||||
</div>
|
||||
@ -154,8 +154,8 @@ const EndpointCard = ({
|
||||
</div>
|
||||
{data.declaration.endpoints.filter(endpoint => !endpoint.hidden).map((endpoint, index) => (
|
||||
<div key={index} className="flex h-6 items-center">
|
||||
<div className="system-xs-regular w-12 shrink-0 text-text-tertiary">{endpoint.method}</div>
|
||||
<div className="group/item system-xs-regular flex grow items-center truncate text-text-secondary">
|
||||
<div className="w-12 shrink-0 text-text-tertiary system-xs-regular">{endpoint.method}</div>
|
||||
<div className="group/item flex grow items-center truncate text-text-secondary system-xs-regular">
|
||||
<div title={`${data.url}${endpoint.path}`} className="truncate">{`${data.url}${endpoint.path}`}</div>
|
||||
<Tooltip popupContent={t(`operation.${isCopied ? 'copied' : 'copy'}`, { ns: 'common' })} position="top">
|
||||
<ActionButton className="ml-2 hidden shrink-0 group-hover/item:flex" onClick={() => handleCopy(`${data.url}${endpoint.path}`)}>
|
||||
@ -168,13 +168,13 @@ const EndpointCard = ({
|
||||
</div>
|
||||
<div className="flex items-center justify-between p-2 pl-3">
|
||||
{active && (
|
||||
<div className="system-xs-semibold-uppercase flex items-center gap-1 text-util-colors-green-green-600">
|
||||
<div className="flex items-center gap-1 text-util-colors-green-green-600 system-xs-semibold-uppercase">
|
||||
<Indicator color="green" />
|
||||
{t('detailPanel.serviceOk', { ns: 'plugin' })}
|
||||
</div>
|
||||
)}
|
||||
{!active && (
|
||||
<div className="system-xs-semibold-uppercase flex items-center gap-1 text-text-tertiary">
|
||||
<div className="flex items-center gap-1 text-text-tertiary system-xs-semibold-uppercase">
|
||||
<Indicator color="gray" />
|
||||
{t('detailPanel.disabled', { ns: 'plugin' })}
|
||||
</div>
|
||||
|
||||
@ -64,7 +64,7 @@ const EndpointList = ({ detail }: Props) => {
|
||||
|
||||
return (
|
||||
<div className={cn('border-divider-subtle px-4 py-2', showTopBorder && 'border-t')}>
|
||||
<div className="system-sm-semibold-uppercase mb-1 flex h-6 items-center justify-between text-text-secondary">
|
||||
<div className="mb-1 flex h-6 items-center justify-between text-text-secondary system-sm-semibold-uppercase">
|
||||
<div className="flex items-center gap-0.5">
|
||||
{t('detailPanel.endpoints', { ns: 'plugin' })}
|
||||
<Tooltip
|
||||
@ -75,13 +75,13 @@ const EndpointList = ({ detail }: Props) => {
|
||||
<div className="flex h-8 w-8 items-center justify-center rounded-lg border-[0.5px] border-components-panel-border-subtle bg-background-default-subtle">
|
||||
<RiApps2AddLine className="h-4 w-4 text-text-tertiary" />
|
||||
</div>
|
||||
<div className="system-xs-regular text-text-tertiary">{t('detailPanel.endpointsTip', { ns: 'plugin' })}</div>
|
||||
<div className="text-text-tertiary system-xs-regular">{t('detailPanel.endpointsTip', { ns: 'plugin' })}</div>
|
||||
<a
|
||||
href={docLink('/develop-plugin/getting-started/getting-started-dify-plugin')}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<div className="system-xs-regular inline-flex cursor-pointer items-center gap-1 text-text-accent">
|
||||
<div className="inline-flex cursor-pointer items-center gap-1 text-text-accent system-xs-regular">
|
||||
<RiBookOpenLine className="h-3 w-3" />
|
||||
{t('detailPanel.endpointsDocLink', { ns: 'plugin' })}
|
||||
</div>
|
||||
@ -95,7 +95,7 @@ const EndpointList = ({ detail }: Props) => {
|
||||
</ActionButton>
|
||||
</div>
|
||||
{data.endpoints.length === 0 && (
|
||||
<div className="system-xs-regular mb-1 flex justify-center rounded-[10px] bg-background-section p-3 text-text-tertiary">{t('detailPanel.endpointsEmpty', { ns: 'plugin' })}</div>
|
||||
<div className="mb-1 flex justify-center rounded-[10px] bg-background-section p-3 text-text-tertiary system-xs-regular">{t('detailPanel.endpointsEmpty', { ns: 'plugin' })}</div>
|
||||
)}
|
||||
<div className="flex flex-col gap-2">
|
||||
{data.endpoints.map((item, index) => (
|
||||
|
||||
@ -83,12 +83,12 @@ const EndpointModal: FC<Props> = ({
|
||||
<>
|
||||
<div className="p-4 pb-2">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="system-xl-semibold text-text-primary">{t('detailPanel.endpointModalTitle', { ns: 'plugin' })}</div>
|
||||
<div className="text-text-primary system-xl-semibold">{t('detailPanel.endpointModalTitle', { ns: 'plugin' })}</div>
|
||||
<ActionButton onClick={onCancel}>
|
||||
<RiCloseLine className="h-4 w-4" />
|
||||
</ActionButton>
|
||||
</div>
|
||||
<div className="system-xs-regular mt-0.5 text-text-tertiary">{t('detailPanel.endpointModalDesc', { ns: 'plugin' })}</div>
|
||||
<div className="mt-0.5 text-text-tertiary system-xs-regular">{t('detailPanel.endpointModalDesc', { ns: 'plugin' })}</div>
|
||||
<ReadmeEntrance pluginDetail={pluginDetail} className="px-0 pt-3" />
|
||||
</div>
|
||||
<div className="grow overflow-y-auto">
|
||||
@ -109,7 +109,7 @@ const EndpointModal: FC<Props> = ({
|
||||
href={item.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="body-xs-regular inline-flex items-center text-text-accent-secondary"
|
||||
className="inline-flex items-center text-text-accent-secondary body-xs-regular"
|
||||
>
|
||||
{t('howToGet', { ns: 'tools' })}
|
||||
<RiArrowRightUpLine className="ml-1 h-3 w-3" />
|
||||
|
||||
@ -20,7 +20,7 @@ const ModelList = ({
|
||||
|
||||
return (
|
||||
<div className="px-4 py-2">
|
||||
<div className="system-sm-semibold-uppercase mb-1 flex h-6 items-center text-text-secondary">{t('detailPanel.modelNum', { ns: 'plugin', num: res.data.length })}</div>
|
||||
<div className="mb-1 flex h-6 items-center text-text-secondary system-sm-semibold-uppercase">{t('detailPanel.modelNum', { ns: 'plugin', num: res.data.length })}</div>
|
||||
<div className="flex flex-col">
|
||||
{res.data.map(model => (
|
||||
<div key={model.model} className="flex h-6 items-center py-1">
|
||||
@ -30,7 +30,7 @@ const ModelList = ({
|
||||
modelName={model.model}
|
||||
/>
|
||||
<ModelName
|
||||
className="system-md-regular grow text-text-secondary"
|
||||
className="grow text-text-secondary system-md-regular"
|
||||
modelItem={model}
|
||||
showModelType
|
||||
showMode
|
||||
|
||||
@ -245,7 +245,7 @@ const ModelParameterModal: FC<ModelParameterModalProps> = ({
|
||||
<div className={cn(popupClassName, 'w-[389px] rounded-2xl border-[0.5px] border-components-panel-border bg-components-panel-bg shadow-lg')}>
|
||||
<div className={cn('max-h-[420px] overflow-y-auto p-4 pt-3')}>
|
||||
<div className="relative">
|
||||
<div className={cn('system-sm-semibold mb-1 flex h-6 items-center text-text-secondary')}>
|
||||
<div className={cn('mb-1 flex h-6 items-center text-text-secondary system-sm-semibold')}>
|
||||
{t('modelProvider.model', { ns: 'common' }).toLocaleUpperCase()}
|
||||
</div>
|
||||
<ModelSelector
|
||||
|
||||
@ -74,7 +74,7 @@ const LLMParamsPanel = ({
|
||||
return (
|
||||
<>
|
||||
<div className="mb-2 flex items-center justify-between">
|
||||
<div className={cn('system-sm-semibold flex h-6 items-center text-text-secondary')}>{t('modelProvider.parameters', { ns: 'common' })}</div>
|
||||
<div className={cn('flex h-6 items-center text-text-secondary system-sm-semibold')}>{t('modelProvider.parameters', { ns: 'common' })}</div>
|
||||
{
|
||||
PROVIDER_WITH_PRESET_TONE.includes(provider) && (
|
||||
<PresetsParameter onSelect={handleSelectPresetParameter} />
|
||||
|
||||
@ -36,7 +36,7 @@ const TTSParamsPanel = ({
|
||||
return (
|
||||
<>
|
||||
<div className="mb-3">
|
||||
<div className="system-sm-semibold mb-1 flex items-center py-1 text-text-secondary">
|
||||
<div className="mb-1 flex items-center py-1 text-text-secondary system-sm-semibold">
|
||||
{t('voice.voiceSettings.language', { ns: 'appDebug' })}
|
||||
</div>
|
||||
<PortalSelect
|
||||
@ -49,7 +49,7 @@ const TTSParamsPanel = ({
|
||||
/>
|
||||
</div>
|
||||
<div className="mb-3">
|
||||
<div className="system-sm-semibold mb-1 flex items-center py-1 text-text-secondary">
|
||||
<div className="mb-1 flex items-center py-1 text-text-secondary system-sm-semibold">
|
||||
{t('voice.voiceSettings.voice', { ns: 'appDebug' })}
|
||||
</div>
|
||||
<PortalSelect
|
||||
|
||||
@ -109,7 +109,7 @@ const MultipleToolSelector = ({
|
||||
className={cn('relative flex grow items-center gap-0.5', supportCollapse && 'cursor-pointer')}
|
||||
onClick={handleCollapse}
|
||||
>
|
||||
<div className="system-sm-semibold-uppercase flex h-6 items-center text-text-secondary">{label}</div>
|
||||
<div className="flex h-6 items-center text-text-secondary system-sm-semibold-uppercase">{label}</div>
|
||||
{required && <div className="text-red-500">*</div>}
|
||||
{tooltip && (
|
||||
<Tooltip
|
||||
@ -129,7 +129,7 @@ const MultipleToolSelector = ({
|
||||
</div>
|
||||
{value.length > 0 && (
|
||||
<>
|
||||
<div className="system-xs-medium flex items-center gap-1 text-text-tertiary">
|
||||
<div className="flex items-center gap-1 text-text-tertiary system-xs-medium">
|
||||
<span>{`${enabledCount}/${value.length}`}</span>
|
||||
<span>{t('agent.tools.enabled', { ns: 'appDebug' })}</span>
|
||||
</div>
|
||||
@ -152,7 +152,7 @@ const MultipleToolSelector = ({
|
||||
{!collapse && (
|
||||
<>
|
||||
{value.length === 0 && (
|
||||
<div className="system-xs-regular flex justify-center rounded-[10px] bg-background-section p-3 text-text-tertiary">{t('detailPanel.toolSelector.empty', { ns: 'plugin' })}</div>
|
||||
<div className="flex justify-center rounded-[10px] bg-background-section p-3 text-text-tertiary system-xs-regular">{t('detailPanel.toolSelector.empty', { ns: 'plugin' })}</div>
|
||||
)}
|
||||
{value.length > 0 && value.map((item, index) => (
|
||||
<div className="mb-1" key={index}>
|
||||
|
||||
@ -69,7 +69,7 @@ const OperationDropdown: FC<Props> = ({
|
||||
onInfo()
|
||||
handleTrigger()
|
||||
}}
|
||||
className="system-md-regular cursor-pointer rounded-lg px-3 py-1.5 text-text-secondary hover:bg-state-base-hover"
|
||||
className="cursor-pointer rounded-lg px-3 py-1.5 text-text-secondary system-md-regular hover:bg-state-base-hover"
|
||||
>
|
||||
{t('detailPanel.operation.info', { ns: 'plugin' })}
|
||||
</div>
|
||||
@ -80,13 +80,13 @@ const OperationDropdown: FC<Props> = ({
|
||||
onCheckVersion()
|
||||
handleTrigger()
|
||||
}}
|
||||
className="system-md-regular cursor-pointer rounded-lg px-3 py-1.5 text-text-secondary hover:bg-state-base-hover"
|
||||
className="cursor-pointer rounded-lg px-3 py-1.5 text-text-secondary system-md-regular hover:bg-state-base-hover"
|
||||
>
|
||||
{t('detailPanel.operation.checkUpdate', { ns: 'plugin' })}
|
||||
</div>
|
||||
)}
|
||||
{(source === PluginSource.marketplace || source === PluginSource.github) && enable_marketplace && (
|
||||
<a href={detailUrl} target="_blank" className="system-md-regular flex cursor-pointer items-center rounded-lg px-3 py-1.5 text-text-secondary hover:bg-state-base-hover">
|
||||
<a href={detailUrl} target="_blank" className="flex cursor-pointer items-center rounded-lg px-3 py-1.5 text-text-secondary system-md-regular hover:bg-state-base-hover">
|
||||
<span className="grow">{t('detailPanel.operation.viewDetail', { ns: 'plugin' })}</span>
|
||||
<RiArrowRightUpLine className="h-3.5 w-3.5 shrink-0 text-text-tertiary" />
|
||||
</a>
|
||||
@ -99,7 +99,7 @@ const OperationDropdown: FC<Props> = ({
|
||||
onRemove()
|
||||
handleTrigger()
|
||||
}}
|
||||
className="system-md-regular cursor-pointer rounded-lg px-3 py-1.5 text-text-secondary hover:bg-state-destructive-hover hover:text-text-destructive"
|
||||
className="cursor-pointer rounded-lg px-3 py-1.5 text-text-secondary system-md-regular hover:bg-state-destructive-hover hover:text-text-destructive"
|
||||
>
|
||||
{t('detailPanel.operation.remove', { ns: 'plugin' })}
|
||||
</div>
|
||||
|
||||
@ -92,7 +92,7 @@ const StrategyDetail: FC<Props> = ({
|
||||
</ActionButton>
|
||||
</div>
|
||||
<div
|
||||
className="system-xs-semibold-uppercase mb-2 flex cursor-pointer items-center gap-1 text-text-accent-secondary"
|
||||
className="mb-2 flex cursor-pointer items-center gap-1 text-text-accent-secondary system-xs-semibold-uppercase"
|
||||
onClick={onHide}
|
||||
>
|
||||
<RiArrowLeftLine className="h-4 w-4" />
|
||||
@ -102,29 +102,29 @@ const StrategyDetail: FC<Props> = ({
|
||||
<Icon size="tiny" className="h-6 w-6" src={`${API_PREFIX}/workspaces/current/plugin/icon?tenant_id=${provider.tenant_id}&filename=${provider.icon}`} />
|
||||
<div className="">{getValueFromI18nObject(provider.label)}</div>
|
||||
</div>
|
||||
<div className="system-md-semibold mt-1 text-text-primary">{getValueFromI18nObject(detail.identity.label)}</div>
|
||||
<div className="mt-1 text-text-primary system-md-semibold">{getValueFromI18nObject(detail.identity.label)}</div>
|
||||
<Description className="mt-3" text={getValueFromI18nObject(detail.description)} descriptionLineRows={2}></Description>
|
||||
</div>
|
||||
{/* form */}
|
||||
<div className="h-full">
|
||||
<div className="flex h-full flex-col overflow-y-auto">
|
||||
<div className="system-sm-semibold-uppercase p-4 pb-1 text-text-primary">{t('setBuiltInTools.parameters', { ns: 'tools' })}</div>
|
||||
<div className="p-4 pb-1 text-text-primary system-sm-semibold-uppercase">{t('setBuiltInTools.parameters', { ns: 'tools' })}</div>
|
||||
<div className="px-4">
|
||||
{detail.parameters.length > 0 && (
|
||||
<div className="space-y-1 py-2">
|
||||
{detail.parameters.map((item: any, index) => (
|
||||
<div key={index} className="py-1">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="code-sm-semibold text-text-secondary">{getValueFromI18nObject(item.label)}</div>
|
||||
<div className="system-xs-regular text-text-tertiary">
|
||||
<div className="text-text-secondary code-sm-semibold">{getValueFromI18nObject(item.label)}</div>
|
||||
<div className="text-text-tertiary system-xs-regular">
|
||||
{getType(item.type)}
|
||||
</div>
|
||||
{item.required && (
|
||||
<div className="system-xs-medium text-text-warning-secondary">{t('setBuiltInTools.required', { ns: 'tools' })}</div>
|
||||
<div className="text-text-warning-secondary system-xs-medium">{t('setBuiltInTools.required', { ns: 'tools' })}</div>
|
||||
)}
|
||||
</div>
|
||||
{item.human_description && (
|
||||
<div className="system-xs-regular mt-0.5 text-text-tertiary">
|
||||
<div className="mt-0.5 text-text-tertiary system-xs-regular">
|
||||
{getValueFromI18nObject(item.human_description)}
|
||||
</div>
|
||||
)}
|
||||
@ -138,17 +138,17 @@ const StrategyDetail: FC<Props> = ({
|
||||
<div className="px-4">
|
||||
<Divider className="!mt-2" />
|
||||
</div>
|
||||
<div className="system-sm-semibold-uppercase p-4 pb-1 text-text-primary">OUTPUT</div>
|
||||
<div className="p-4 pb-1 text-text-primary system-sm-semibold-uppercase">OUTPUT</div>
|
||||
{outputSchema.length > 0 && (
|
||||
<div className="space-y-1 px-4 py-2">
|
||||
{outputSchema.map((outputItem, index) => (
|
||||
<div key={index} className="py-1">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="code-sm-semibold text-text-secondary">{outputItem.name}</div>
|
||||
<div className="system-xs-regular text-text-tertiary">{outputItem.type}</div>
|
||||
<div className="text-text-secondary code-sm-semibold">{outputItem.name}</div>
|
||||
<div className="text-text-tertiary system-xs-regular">{outputItem.type}</div>
|
||||
</div>
|
||||
{outputItem.description && (
|
||||
<div className="system-xs-regular mt-0.5 text-text-tertiary">
|
||||
<div className="mt-0.5 text-text-tertiary system-xs-regular">
|
||||
{outputItem.description}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@ -35,8 +35,8 @@ const StrategyItem = ({
|
||||
className={cn('bg-components-panel-item-bg mb-2 cursor-pointer rounded-xl border-[0.5px] border-components-panel-border-subtle px-4 py-3 shadow-xs hover:bg-components-panel-on-panel-item-bg-hover')}
|
||||
onClick={() => setShowDetail(true)}
|
||||
>
|
||||
<div className="system-md-semibold pb-0.5 text-text-secondary">{getValueFromI18nObject(detail.identity.label)}</div>
|
||||
<div className="system-xs-regular line-clamp-2 text-text-tertiary" title={getValueFromI18nObject(detail.description)}>{getValueFromI18nObject(detail.description)}</div>
|
||||
<div className="pb-0.5 text-text-secondary system-md-semibold">{getValueFromI18nObject(detail.identity.label)}</div>
|
||||
<div className="line-clamp-2 text-text-tertiary system-xs-regular" title={getValueFromI18nObject(detail.description)}>{getValueFromI18nObject(detail.description)}</div>
|
||||
</div>
|
||||
{showDetail && (
|
||||
<StrategyDetailPanel
|
||||
|
||||
@ -21,7 +21,7 @@ type StatusStepProps = {
|
||||
|
||||
export const StatusStep = ({ isActive, text }: StatusStepProps) => {
|
||||
return (
|
||||
<div className={`system-2xs-semibold-uppercase flex items-center gap-1 ${isActive
|
||||
<div className={`flex items-center gap-1 system-2xs-semibold-uppercase ${isActive
|
||||
? 'text-state-accent-solid'
|
||||
: 'text-text-tertiary'}`}
|
||||
>
|
||||
@ -222,7 +222,7 @@ export const ManualPropertiesSection = ({
|
||||
)}
|
||||
<div className="mb-6">
|
||||
<div className="mb-3 flex items-center gap-2">
|
||||
<div className="system-xs-medium-uppercase text-text-tertiary">
|
||||
<div className="text-text-tertiary system-xs-medium-uppercase">
|
||||
{t('modal.manual.logs.title', { ns: 'pluginTrigger' })}
|
||||
</div>
|
||||
<div className="h-px flex-1 bg-gradient-to-r from-divider-regular to-transparent" />
|
||||
@ -232,7 +232,7 @@ export const ManualPropertiesSection = ({
|
||||
<div className="h-3.5 w-3.5">
|
||||
<RiLoader2Line className="h-full w-full animate-spin" />
|
||||
</div>
|
||||
<div className="system-xs-regular text-text-tertiary">
|
||||
<div className="text-text-tertiary system-xs-regular">
|
||||
{t('modal.manual.logs.loading', { ns: 'pluginTrigger', pluginName })}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -79,7 +79,7 @@ export const OAuthClientSettingsModal = ({ oauthConfig, onClose, showOAuthCreate
|
||||
</div>
|
||||
)}
|
||||
>
|
||||
<div className="system-sm-medium mb-2 text-text-secondary">
|
||||
<div className="mb-2 text-text-secondary system-sm-medium">
|
||||
{t('subscription.addType.options.oauth.clientTitle', { ns: 'pluginTrigger' })}
|
||||
</div>
|
||||
|
||||
@ -103,10 +103,10 @@ export const OAuthClientSettingsModal = ({ oauthConfig, onClose, showOAuthCreate
|
||||
<RiInformation2Fill className="h-5 w-5 shrink-0 text-text-accent" />
|
||||
</div>
|
||||
<div className="flex-1 text-text-secondary">
|
||||
<div className="system-sm-regular whitespace-pre-wrap leading-4">
|
||||
<div className="whitespace-pre-wrap leading-4 system-sm-regular">
|
||||
{t('modal.oauthRedirectInfo', { ns: 'pluginTrigger' })}
|
||||
</div>
|
||||
<div className="system-sm-medium my-1.5 break-all leading-4">
|
||||
<div className="my-1.5 break-all leading-4 system-sm-medium">
|
||||
{oauthConfig?.redirect_uri}
|
||||
</div>
|
||||
<Button
|
||||
|
||||
@ -60,7 +60,7 @@ export const DeleteConfirm = (props: Props) => {
|
||||
? (
|
||||
<>
|
||||
{t(`${tPrefix}.contentWithApps`, { ns: 'pluginTrigger', count: workflowsInUse })}
|
||||
<div className="system-sm-medium mb-2 mt-6 text-text-secondary">{t(`${tPrefix}.confirmInputTip`, { ns: 'pluginTrigger', name: currentName })}</div>
|
||||
<div className="mb-2 mt-6 text-text-secondary system-sm-medium">{t(`${tPrefix}.confirmInputTip`, { ns: 'pluginTrigger', name: currentName })}</div>
|
||||
<Input
|
||||
value={inputName}
|
||||
onChange={e => setInputName(e.target.value)}
|
||||
|
||||
@ -65,7 +65,7 @@ const StatusStep = ({ isActive, text, onClick, clickable }: {
|
||||
}) => {
|
||||
return (
|
||||
<div
|
||||
className={`system-2xs-semibold-uppercase flex items-center gap-1 ${isActive
|
||||
className={`flex items-center gap-1 system-2xs-semibold-uppercase ${isActive
|
||||
? 'text-state-accent-solid'
|
||||
: 'text-text-tertiary'} ${clickable ? 'cursor-pointer hover:text-text-secondary' : ''}`}
|
||||
onClick={clickable ? onClick : undefined}
|
||||
|
||||
@ -27,7 +27,7 @@ export const SubscriptionListView: React.FC<SubscriptionListViewProps> = ({
|
||||
<div className="relative flex items-center justify-between">
|
||||
{subscriptionCount > 0 && (
|
||||
<div className="flex h-8 shrink-0 items-center gap-1">
|
||||
<span className="system-sm-semibold-uppercase text-text-secondary">
|
||||
<span className="text-text-secondary system-sm-semibold-uppercase">
|
||||
{t('subscription.listNum', { ns: 'pluginTrigger', num: subscriptionCount })}
|
||||
</span>
|
||||
<Tooltip popupContent={t('subscription.list.tip', { ns: 'pluginTrigger' })} />
|
||||
|
||||
@ -70,7 +70,7 @@ const LogViewer = ({ logs, className }: Props) => {
|
||||
return (
|
||||
<CodeEditor
|
||||
readOnly
|
||||
title={<div className="system-xs-semibold-uppercase text-text-secondary">{title}</div>}
|
||||
title={<div className="text-text-secondary system-xs-semibold-uppercase">{title}</div>}
|
||||
language={CodeLanguage.json}
|
||||
value={parsedData}
|
||||
isJSONStringifyBeauty
|
||||
@ -82,7 +82,7 @@ const LogViewer = ({ logs, className }: Props) => {
|
||||
return (
|
||||
<div className="rounded-md bg-components-input-bg-normal">
|
||||
<div className="flex items-center justify-between px-2 py-1">
|
||||
<div className="system-xs-semibold-uppercase text-text-secondary">
|
||||
<div className="text-text-secondary system-xs-semibold-uppercase">
|
||||
{title}
|
||||
</div>
|
||||
<button
|
||||
@ -100,7 +100,7 @@ const LogViewer = ({ logs, className }: Props) => {
|
||||
</button>
|
||||
</div>
|
||||
<div className="px-2 pb-2 pt-1">
|
||||
<pre className="code-xs-regular whitespace-pre-wrap break-all text-text-secondary">
|
||||
<pre className="whitespace-pre-wrap break-all text-text-secondary code-xs-regular">
|
||||
{String(parsedData)}
|
||||
</pre>
|
||||
</div>
|
||||
@ -161,7 +161,7 @@ const LogViewer = ({ logs, className }: Props) => {
|
||||
: (
|
||||
<RiArrowRightSLine className="h-4 w-4 text-text-tertiary" />
|
||||
)}
|
||||
<div className="system-xs-semibold-uppercase text-text-secondary">
|
||||
<div className="text-text-secondary system-xs-semibold-uppercase">
|
||||
{t(`modal.manual.logs.${LogTypeEnum.REQUEST}`, { ns: 'pluginTrigger' })}
|
||||
{' '}
|
||||
#
|
||||
@ -170,7 +170,7 @@ const LogViewer = ({ logs, className }: Props) => {
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-1">
|
||||
<div className="system-xs-regular text-text-tertiary">
|
||||
<div className="text-text-tertiary system-xs-regular">
|
||||
{dayjs(log.created_at).format('HH:mm:ss')}
|
||||
</div>
|
||||
<div className="h-3.5 w-3.5">
|
||||
|
||||
@ -76,7 +76,7 @@ const SubscriptionTriggerButton: React.FC<SubscriptionTriggerButtonProps> = ({
|
||||
onClick={onClick}
|
||||
>
|
||||
<RiWebhookLine className={cn('h-3.5 w-3.5 shrink-0 text-text-secondary', statusConfig.color === 'red' && 'text-components-button-destructive-secondary-text')} />
|
||||
<span className={cn('system-xs-medium truncate text-components-button-ghost-text', statusConfig.color === 'red' && 'text-components-button-destructive-secondary-text')}>
|
||||
<span className={cn('truncate text-components-button-ghost-text system-xs-medium', statusConfig.color === 'red' && 'text-components-button-destructive-secondary-text')}>
|
||||
{statusConfig.label}
|
||||
</span>
|
||||
<RiArrowDownSLine
|
||||
|
||||
@ -30,7 +30,7 @@ export const SubscriptionSelectorView: React.FC<SubscriptionSelectorProps> = ({
|
||||
{subscriptionCount > 0 && (
|
||||
<div className="ml-7 mr-1.5 flex h-8 items-center justify-between">
|
||||
<div className="flex shrink-0 items-center gap-1">
|
||||
<span className="system-sm-semibold-uppercase text-text-secondary">
|
||||
<span className="text-text-secondary system-sm-semibold-uppercase">
|
||||
{t('subscription.listNum', { ns: 'pluginTrigger', num: subscriptionCount })}
|
||||
</span>
|
||||
<Tooltip popupContent={t('subscription.list.tip', { ns: 'pluginTrigger' })} />
|
||||
@ -61,7 +61,7 @@ export const SubscriptionSelectorView: React.FC<SubscriptionSelectorProps> = ({
|
||||
<RiCheckLine className="mr-2 h-4 w-4 shrink-0 text-text-accent" />
|
||||
)}
|
||||
<RiWebhookLine className={cn('mr-1.5 h-3.5 w-3.5 text-text-secondary', selectedId !== subscription.id && 'ml-6')} />
|
||||
<span className="system-md-regular leading-6 text-text-secondary">
|
||||
<span className="leading-6 text-text-secondary system-md-regular">
|
||||
{subscription.name}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -43,7 +43,7 @@ const SubscriptionCard = ({ data, pluginDetail }: Props) => {
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex h-6 items-center gap-1">
|
||||
<RiWebhookLine className="h-4 w-4 text-text-secondary" />
|
||||
<span className="system-md-semibold text-text-secondary">
|
||||
<span className="text-text-secondary system-md-semibold">
|
||||
{data.name}
|
||||
</span>
|
||||
</div>
|
||||
@ -74,12 +74,12 @@ const SubscriptionCard = ({ data, pluginDetail }: Props) => {
|
||||
)}
|
||||
position="left"
|
||||
>
|
||||
<div className="system-xs-regular flex-1 truncate text-text-tertiary">
|
||||
<div className="flex-1 truncate text-text-tertiary system-xs-regular">
|
||||
{data.endpoint}
|
||||
</div>
|
||||
</Tooltip>
|
||||
<div className="mx-2 text-xs text-text-tertiary opacity-30">·</div>
|
||||
<div className="system-xs-regular shrink-0 text-text-tertiary">
|
||||
<div className="shrink-0 text-text-tertiary system-xs-regular">
|
||||
{data.workflows_in_use > 0 ? t('subscription.list.item.usedByNum', { ns: 'pluginTrigger', num: data.workflows_in_use }) : t('subscription.list.item.noUsed', { ns: 'pluginTrigger' })}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -233,19 +233,19 @@ const ReasoningConfigForm: React.FC<Props> = ({
|
||||
|
||||
return (
|
||||
<div key={variable} className="space-y-0.5">
|
||||
<div className="system-sm-semibold flex items-center justify-between py-2 text-text-secondary">
|
||||
<div className="flex items-center justify-between py-2 text-text-secondary system-sm-semibold">
|
||||
<div className="flex items-center">
|
||||
<span className={cn('code-sm-semibold max-w-[140px] truncate text-text-secondary')} title={label[language] || label.en_US}>{label[language] || label.en_US}</span>
|
||||
<span className={cn('max-w-[140px] truncate text-text-secondary code-sm-semibold')} title={label[language] || label.en_US}>{label[language] || label.en_US}</span>
|
||||
{required && (
|
||||
<span className="ml-1 text-red-500">*</span>
|
||||
)}
|
||||
{tooltipContent}
|
||||
<span className="system-xs-regular mx-1 text-text-quaternary">·</span>
|
||||
<span className="system-xs-regular text-text-tertiary">{targetVarType()}</span>
|
||||
<span className="mx-1 text-text-quaternary system-xs-regular">·</span>
|
||||
<span className="text-text-tertiary system-xs-regular">{targetVarType()}</span>
|
||||
{isShowJSONEditor && (
|
||||
<Tooltip
|
||||
popupContent={(
|
||||
<div className="system-xs-medium text-text-secondary">
|
||||
<div className="text-text-secondary system-xs-medium">
|
||||
{t('nodes.agent.clickToViewParameterSchema', { ns: 'workflow' })}
|
||||
</div>
|
||||
)}
|
||||
@ -263,7 +263,7 @@ const ReasoningConfigForm: React.FC<Props> = ({
|
||||
</div>
|
||||
{canUseAuto && (
|
||||
<div className="flex cursor-pointer items-center gap-1 rounded-[6px] border border-divider-subtle bg-background-default-lighter px-2 py-1 hover:bg-state-base-hover" onClick={() => handleAutomatic(variable, !auto, type as FormTypeEnum)}>
|
||||
<span className="system-xs-medium text-text-secondary">{t('detailPanel.toolSelector.auto', { ns: 'plugin' })}</span>
|
||||
<span className="text-text-secondary system-xs-medium">{t('detailPanel.toolSelector.auto', { ns: 'plugin' })}</span>
|
||||
<Switch
|
||||
size="xs"
|
||||
defaultValue={!!auto}
|
||||
|
||||
@ -32,7 +32,7 @@ const SchemaModal: FC<Props> = ({
|
||||
<div className="pb-6">
|
||||
{/* Header */}
|
||||
<div className="relative flex p-6 pb-3 pr-14">
|
||||
<div className="title-2xl-semi-bold grow truncate text-text-primary">
|
||||
<div className="grow truncate text-text-primary title-2xl-semi-bold">
|
||||
{t('nodes.agent.parameterSchema', { ns: 'workflow' })}
|
||||
</div>
|
||||
<div className="absolute right-5 top-5 flex h-8 w-8 items-center justify-center p-1.5" onClick={onClose}>
|
||||
|
||||
@ -47,7 +47,7 @@ const ToolBaseForm: FC<ToolBaseFormProps> = ({
|
||||
<div className="flex flex-col gap-3 px-4 py-2">
|
||||
{/* Tool picker */}
|
||||
<div className="flex flex-col gap-1">
|
||||
<div className="system-sm-semibold flex h-6 items-center justify-between text-text-secondary">
|
||||
<div className="flex h-6 items-center justify-between text-text-secondary system-sm-semibold">
|
||||
{t('detailPanel.toolSelector.toolLabel', { ns: 'plugin' })}
|
||||
{currentProvider?.plugin_unique_identifier && (
|
||||
<ReadmeEntrance
|
||||
@ -80,7 +80,7 @@ const ToolBaseForm: FC<ToolBaseFormProps> = ({
|
||||
|
||||
{/* Description */}
|
||||
<div className="flex flex-col gap-1">
|
||||
<div className="system-sm-semibold flex h-6 items-center text-text-secondary">
|
||||
<div className="flex h-6 items-center text-text-secondary system-sm-semibold">
|
||||
{t('detailPanel.toolSelector.descriptionLabel', { ns: 'plugin' })}
|
||||
</div>
|
||||
<Textarea
|
||||
|
||||
@ -95,8 +95,8 @@ const ToolItem = ({
|
||||
</div>
|
||||
)}
|
||||
<div className={cn('grow truncate pl-0.5', isTransparent && 'opacity-50', isShowCanNotChooseMCPTip && 'opacity-30')}>
|
||||
<div className="system-2xs-medium-uppercase text-text-tertiary">{providerNameText}</div>
|
||||
<div className="system-xs-medium text-text-secondary">{toolLabel}</div>
|
||||
<div className="text-text-tertiary system-2xs-medium-uppercase">{providerNameText}</div>
|
||||
<div className="text-text-secondary system-xs-medium">{toolLabel}</div>
|
||||
</div>
|
||||
<div className="hidden items-center gap-1 group-hover:flex">
|
||||
{!noAuth && !isError && !uninstalled && !versionMismatch && !isShowCanNotChooseMCPTip && (
|
||||
|
||||
@ -39,10 +39,10 @@ const ParamsTips: FC = () => {
|
||||
const { t } = useTranslation()
|
||||
return (
|
||||
<div className="pb-1">
|
||||
<div className="system-xs-regular text-text-tertiary">
|
||||
<div className="text-text-tertiary system-xs-regular">
|
||||
{t('detailPanel.toolSelector.paramsTip1', { ns: 'plugin' })}
|
||||
</div>
|
||||
<div className="system-xs-regular text-text-tertiary">
|
||||
<div className="text-text-tertiary system-xs-regular">
|
||||
{t('detailPanel.toolSelector.paramsTip2', { ns: 'plugin' })}
|
||||
</div>
|
||||
</div>
|
||||
@ -109,7 +109,7 @@ const ToolSettingsPanel: FC<ToolSettingsPanelProps> = ({
|
||||
{/* User settings only header */}
|
||||
{userSettingsOnly && (
|
||||
<div className="p-4 pb-1">
|
||||
<div className="system-sm-semibold-uppercase text-text-primary">
|
||||
<div className="text-text-primary system-sm-semibold-uppercase">
|
||||
{t('detailPanel.toolSelector.settings', { ns: 'plugin' })}
|
||||
</div>
|
||||
</div>
|
||||
@ -118,7 +118,7 @@ const ToolSettingsPanel: FC<ToolSettingsPanelProps> = ({
|
||||
{/* Reasoning config only header */}
|
||||
{nodeId && reasoningConfigOnly && (
|
||||
<div className="mb-1 p-4 pb-1">
|
||||
<div className="system-sm-semibold-uppercase text-text-primary">
|
||||
<div className="text-text-primary system-sm-semibold-uppercase">
|
||||
{t('detailPanel.toolSelector.params', { ns: 'plugin' })}
|
||||
</div>
|
||||
<ParamsTips />
|
||||
|
||||
@ -44,10 +44,10 @@ const ToolTrigger = ({
|
||||
</div>
|
||||
)}
|
||||
{value?.tool_name && (
|
||||
<div className="system-sm-medium grow text-components-input-text-filled">{value.tool_name}</div>
|
||||
<div className="grow text-components-input-text-filled system-sm-medium">{value.tool_name}</div>
|
||||
)}
|
||||
{!value?.provider_name && (
|
||||
<div className="system-sm-regular grow text-components-input-text-placeholder">
|
||||
<div className="grow text-components-input-text-placeholder system-sm-regular">
|
||||
{!isConfigure ? t('detailPanel.toolSelector.placeholder', { ns: 'plugin' }) : t('detailPanel.configureTool', { ns: 'plugin' })}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@ -183,7 +183,7 @@ const ToolSelector: FC<Props> = ({
|
||||
)}
|
||||
>
|
||||
{/* Header */}
|
||||
<div className="system-xl-semibold px-4 pb-1 pt-3.5 text-text-primary">
|
||||
<div className="px-4 pb-1 pt-3.5 text-text-primary system-xl-semibold">
|
||||
{t(`detailPanel.toolSelector.${isEdit ? 'toolSetting' : 'title'}`, { ns: 'plugin' })}
|
||||
</div>
|
||||
|
||||
|
||||
@ -217,19 +217,19 @@ const ReasoningConfigForm: React.FC<Props> = ({
|
||||
|
||||
return (
|
||||
<div key={variable} className="space-y-0.5">
|
||||
<div className="system-sm-semibold flex items-center justify-between py-2 text-text-secondary">
|
||||
<div className="flex items-center justify-between py-2 text-text-secondary system-sm-semibold">
|
||||
<div className="flex items-center">
|
||||
<span className={cn('code-sm-semibold max-w-[140px] truncate text-text-secondary')} title={label[language] || label.en_US}>{label[language] || label.en_US}</span>
|
||||
<span className={cn('max-w-[140px] truncate text-text-secondary code-sm-semibold')} title={label[language] || label.en_US}>{label[language] || label.en_US}</span>
|
||||
{required && (
|
||||
<span className="ml-1 text-red-500">*</span>
|
||||
)}
|
||||
{tooltipContent}
|
||||
<span className="system-xs-regular mx-1 text-text-quaternary">·</span>
|
||||
<span className="system-xs-regular text-text-tertiary">{targetVarType()}</span>
|
||||
<span className="mx-1 text-text-quaternary system-xs-regular">·</span>
|
||||
<span className="text-text-tertiary system-xs-regular">{targetVarType()}</span>
|
||||
{isShowJSONEditor && (
|
||||
<Tooltip
|
||||
popupContent={(
|
||||
<div className="system-xs-medium text-text-secondary">
|
||||
<div className="text-text-secondary system-xs-medium">
|
||||
{t('nodes.agent.clickToViewParameterSchema', { ns: 'workflow' })}
|
||||
</div>
|
||||
)}
|
||||
@ -247,7 +247,7 @@ const ReasoningConfigForm: React.FC<Props> = ({
|
||||
</div>
|
||||
{canUseAuto && (
|
||||
<div className="flex cursor-pointer items-center gap-1 rounded-[6px] border border-divider-subtle bg-background-default-lighter px-2 py-1 hover:bg-state-base-hover" onClick={() => handleAutomatic(variable, !auto, type)}>
|
||||
<span className="system-xs-medium text-text-secondary">{t('detailPanel.toolSelector.auto', { ns: 'plugin' })}</span>
|
||||
<span className="text-text-secondary system-xs-medium">{t('detailPanel.toolSelector.auto', { ns: 'plugin' })}</span>
|
||||
<Switch
|
||||
size="xs"
|
||||
defaultValue={!!auto}
|
||||
|
||||
@ -32,7 +32,7 @@ const SchemaModal: FC<Props> = ({
|
||||
<div className="pb-6">
|
||||
{/* Header */}
|
||||
<div className="relative flex p-6 pb-3 pr-14">
|
||||
<div className="title-2xl-semi-bold grow truncate text-text-primary">
|
||||
<div className="grow truncate text-text-primary title-2xl-semi-bold">
|
||||
{t('nodes.agent.parameterSchema', { ns: 'workflow' })}
|
||||
</div>
|
||||
<div className="absolute right-5 top-5 flex h-8 w-8 items-center justify-center p-1.5" onClick={onClose}>
|
||||
|
||||
@ -105,23 +105,23 @@ const ToolSettingsSection: FC<ToolSettingsSectionProps> = ({
|
||||
)}
|
||||
{showTabSlider && currType === 'params' && (
|
||||
<div className="px-4 py-2">
|
||||
<div className="system-xs-regular text-text-tertiary">{t('detailPanel.toolSelector.paramsTip1', { ns: 'plugin' })}</div>
|
||||
<div className="system-xs-regular text-text-tertiary">{t('detailPanel.toolSelector.paramsTip2', { ns: 'plugin' })}</div>
|
||||
<div className="text-text-tertiary system-xs-regular">{t('detailPanel.toolSelector.paramsTip1', { ns: 'plugin' })}</div>
|
||||
<div className="text-text-tertiary system-xs-regular">{t('detailPanel.toolSelector.paramsTip2', { ns: 'plugin' })}</div>
|
||||
</div>
|
||||
)}
|
||||
{/* user settings only */}
|
||||
{userSettingsOnly && (
|
||||
<div className="p-4 pb-1">
|
||||
<div className="system-sm-semibold-uppercase text-text-primary">{t('detailPanel.toolSelector.settings', { ns: 'plugin' })}</div>
|
||||
<div className="text-text-primary system-sm-semibold-uppercase">{t('detailPanel.toolSelector.settings', { ns: 'plugin' })}</div>
|
||||
</div>
|
||||
)}
|
||||
{/* reasoning config only */}
|
||||
{reasoningConfigOnly && (
|
||||
<div className="mb-1 p-4 pb-1">
|
||||
<div className="system-sm-semibold-uppercase text-text-primary">{t('detailPanel.toolSelector.params', { ns: 'plugin' })}</div>
|
||||
<div className="text-text-primary system-sm-semibold-uppercase">{t('detailPanel.toolSelector.params', { ns: 'plugin' })}</div>
|
||||
<div className="pb-1">
|
||||
<div className="system-xs-regular text-text-tertiary">{t('detailPanel.toolSelector.paramsTip1', { ns: 'plugin' })}</div>
|
||||
<div className="system-xs-regular text-text-tertiary">{t('detailPanel.toolSelector.paramsTip2', { ns: 'plugin' })}</div>
|
||||
<div className="text-text-tertiary system-xs-regular">{t('detailPanel.toolSelector.paramsTip1', { ns: 'plugin' })}</div>
|
||||
<div className="text-text-tertiary system-xs-regular">{t('detailPanel.toolSelector.paramsTip2', { ns: 'plugin' })}</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@ -97,7 +97,7 @@ export const EventDetailDrawer: FC<EventDetailDrawerProps> = (props) => {
|
||||
</ActionButton>
|
||||
</div>
|
||||
<div
|
||||
className="system-xs-semibold-uppercase mb-2 flex cursor-pointer items-center gap-1 text-text-accent-secondary"
|
||||
className="mb-2 flex cursor-pointer items-center gap-1 text-text-accent-secondary system-xs-semibold-uppercase"
|
||||
onClick={onClose}
|
||||
>
|
||||
<RiArrowLeftLine className="h-4 w-4" />
|
||||
@ -111,36 +111,36 @@ export const EventDetailDrawer: FC<EventDetailDrawerProps> = (props) => {
|
||||
packageName={providerInfo.name.split('/').pop() || ''}
|
||||
/>
|
||||
</div>
|
||||
<div className="system-md-semibold mt-1 text-text-primary">{eventInfo?.identity?.label[language]}</div>
|
||||
<div className="mt-1 text-text-primary system-md-semibold">{eventInfo?.identity?.label[language]}</div>
|
||||
<Description className="mb-2 mt-3 h-auto" text={eventInfo.description[language]} descriptionLineRows={2}></Description>
|
||||
</div>
|
||||
<div className="flex h-full flex-col gap-2 overflow-y-auto px-4 pb-2 pt-4">
|
||||
<div className="system-sm-semibold-uppercase text-text-secondary">{t('setBuiltInTools.parameters', { ns: 'tools' })}</div>
|
||||
<div className="text-text-secondary system-sm-semibold-uppercase">{t('setBuiltInTools.parameters', { ns: 'tools' })}</div>
|
||||
{parametersSchemas.length > 0
|
||||
? (
|
||||
parametersSchemas.map((item, index) => (
|
||||
<div key={index} className="py-1">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="code-sm-semibold text-text-secondary">{item.label[language]}</div>
|
||||
<div className="system-xs-regular text-text-tertiary">
|
||||
<div className="text-text-secondary code-sm-semibold">{item.label[language]}</div>
|
||||
<div className="text-text-tertiary system-xs-regular">
|
||||
{getType(item.type, t)}
|
||||
</div>
|
||||
{item.required && (
|
||||
<div className="system-xs-medium text-text-warning-secondary">{t('setBuiltInTools.required', { ns: 'tools' })}</div>
|
||||
<div className="text-text-warning-secondary system-xs-medium">{t('setBuiltInTools.required', { ns: 'tools' })}</div>
|
||||
)}
|
||||
</div>
|
||||
{item.description && (
|
||||
<div className="system-xs-regular mt-0.5 text-text-tertiary">
|
||||
<div className="mt-0.5 text-text-tertiary system-xs-regular">
|
||||
{item.description?.[language]}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
))
|
||||
)
|
||||
: <div className="system-xs-regular text-text-tertiary">{t('events.item.noParameters', { ns: 'pluginTrigger' })}</div>}
|
||||
: <div className="text-text-tertiary system-xs-regular">{t('events.item.noParameters', { ns: 'pluginTrigger' })}</div>}
|
||||
<Divider className="mb-2 mt-1 h-px" />
|
||||
<div className="flex flex-col gap-2">
|
||||
<div className="system-sm-semibold-uppercase text-text-secondary">{t('events.output', { ns: 'pluginTrigger' })}</div>
|
||||
<div className="text-text-secondary system-sm-semibold-uppercase">{t('events.output', { ns: 'pluginTrigger' })}</div>
|
||||
<div className="relative left-[-7px]">
|
||||
{outputFields.map(item => (
|
||||
<Field
|
||||
|
||||
@ -25,8 +25,8 @@ const TriggerEventCard = ({ eventInfo, providerInfo }: TriggerEventCardProps) =>
|
||||
className={cn('bg-components-panel-item-bg cursor-pointer rounded-xl border-[0.5px] border-components-panel-border-subtle px-4 py-3 shadow-xs hover:bg-components-panel-on-panel-item-bg-hover')}
|
||||
onClick={() => setShowDetail(true)}
|
||||
>
|
||||
<div className="system-md-semibold pb-0.5 text-text-secondary">{title}</div>
|
||||
<div className="system-xs-regular line-clamp-2 text-text-tertiary" title={descriptionText}>{descriptionText}</div>
|
||||
<div className="pb-0.5 text-text-secondary system-md-semibold">{title}</div>
|
||||
<div className="line-clamp-2 text-text-tertiary system-xs-regular" title={descriptionText}>{descriptionText}</div>
|
||||
</div>
|
||||
{showDetail && (
|
||||
<EventDetailDrawer
|
||||
@ -52,7 +52,7 @@ export const TriggerEventsList = () => {
|
||||
return (
|
||||
<div className="px-4 pb-4 pt-2">
|
||||
<div className="mb-1 py-1">
|
||||
<div className="system-sm-semibold-uppercase mb-1 flex h-6 items-center justify-between text-text-secondary">
|
||||
<div className="mb-1 flex h-6 items-center justify-between text-text-secondary system-sm-semibold-uppercase">
|
||||
{t('events.actionNum', { ns: 'pluginTrigger', num: triggerEvents.length, event: t(`events.${triggerEvents.length > 1 ? 'events' : 'event'}`, { ns: 'pluginTrigger' }) })}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user