feat: add support for disabling specific tools in self-hosting
- Introduced build-time and runtime options to disable tools for compliance or security. - Updated documentation to include instructions for disabling tools in Docker and Kubernetes setups. - Added translations for disabled tool messages in multiple languages. - Implemented logic to filter out disabled tools from the toolbox and shortcuts in the application. - Created utility functions to manage disabled tools configuration.
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
getNodesByCategory,
|
||||
createNodeByType,
|
||||
} from '../workflow/nodes/registry';
|
||||
import { isToolDisabled } from '../utils/disabled-tools.js';
|
||||
import type { BaseWorkflowNode } from '../workflow/nodes/base-node';
|
||||
import type { WorkflowEditor } from '../workflow/editor';
|
||||
import {
|
||||
@@ -447,7 +448,9 @@ function buildToolbox() {
|
||||
];
|
||||
|
||||
for (const cat of categoryOrder) {
|
||||
const entries = categorized[cat.key as keyof typeof categorized] ?? [];
|
||||
const entries = (
|
||||
categorized[cat.key as keyof typeof categorized] ?? []
|
||||
).filter((entry) => !entry.toolPageId || !isToolDisabled(entry.toolPageId));
|
||||
if (entries.length === 0) continue;
|
||||
|
||||
const section = document.createElement('div');
|
||||
|
||||
Reference in New Issue
Block a user