}
- {/* Builtin type */}
- {!isDetailLoading && (collection.type === CollectionType.builtIn) && isAuthed && (
-
- {t('plugin.detailPanel.actionNum', { num: toolList.length, action: toolList.length > 1 ? 'actions' : 'action' })}
- {needAuth && (
-
- )}
-
- )}
- {!isDetailLoading && (collection.type === CollectionType.builtIn) && needAuth && !isAuthed && (
+ {!isDetailLoading && (
<>
-
-
{t('tools.includeToolNum', { num: toolList.length, action: toolList.length > 1 ? 'actions' : 'action' }).toLocaleUpperCase()}
-
·
-
{t('tools.auth.setup').toLocaleUpperCase()}
+
+ {(collection.type === CollectionType.builtIn || collection.type === CollectionType.model) && isAuthed && (
+
+ {t('plugin.detailPanel.actionNum', { num: toolList.length, action: toolList.length > 1 ? 'actions' : 'action' })}
+ {needAuth && (
+
+ )}
+
+ )}
+ {(collection.type === CollectionType.builtIn || collection.type === CollectionType.model) && needAuth && !isAuthed && (
+ <>
+
+ {t('tools.includeToolNum', { num: toolList.length, action: toolList.length > 1 ? 'actions' : 'action' }).toLocaleUpperCase()}
+ ·
+ {t('tools.auth.setup').toLocaleUpperCase()}
+
+
+ >
+ )}
+ {(collection.type === CollectionType.custom) && (
+
+ {t('tools.includeToolNum', { num: toolList.length, action: toolList.length > 1 ? 'actions' : 'action' }).toLocaleUpperCase()}
+
+ )}
+ {(collection.type === CollectionType.workflow) && (
+
+ {t('tools.createTool.toolInput.title').toLocaleUpperCase()}
+
+ )}
-
- >
- )}
- {/* Custom type */}
- {!isDetailLoading && (collection.type === CollectionType.custom) && (
-
- {t('tools.includeToolNum', { num: toolList.length, action: toolList.length > 1 ? 'actions' : 'action' }).toLocaleUpperCase()}
-
- )}
- {/* Workflow type */}
- {!isDetailLoading && (collection.type === CollectionType.workflow) && (
-
- {t('tools.createTool.toolInput.title').toLocaleUpperCase()}
-
- )}
- {!isDetailLoading && (
-
- {collection.type !== CollectionType.workflow && toolList.map(tool => (
-
- ))}
- {collection.type === CollectionType.workflow && (customCollection as WorkflowToolProviderResponse)?.tool?.parameters.map(item => (
-
-
-
{item.name}
-
{item.type}
-
{item.required ? t('tools.createTool.toolInput.required') : ''}
+
+ {collection.type !== CollectionType.workflow && toolList.map(tool => (
+
+ ))}
+ {collection.type === CollectionType.workflow && (customCollection as WorkflowToolProviderResponse)?.tool?.parameters.map(item => (
+
+
+ {item.name}
+ {item.type}
+ {item.required ? t('tools.createTool.toolInput.required') : ''}
+
+
{item.llm_description}
-
{item.llm_description}
-
- ))}
-
+ ))}
+
+ >
)}
{showSettingAuth && (