Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

feat: add optional hidden property to endpoint items and filter hidden endpoints in endpoint card (#19163)

Yeuoly623ac7ea6d0b
diff --git a/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx b/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx
index 9ab0c5b9a37..cc3688aebc4 100644
--- a/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx
@@ -149,7 +149,7 @@ const EndpointCard = ({
</ActionButton>
</div>
</div>
- {data.declaration.endpoints.map((endpoint, index) => (
+ {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'>
diff --git a/web/app/components/plugins/types.ts b/web/app/components/plugins/types.ts
index 5ed05d45233..f552d7c17a9 100644
--- a/web/app/components/plugins/types.ts
+++ b/web/app/components/plugins/types.ts
@@ -36,6 +36,7 @@ export type PluginEndpointDeclaration = {
export type EndpointItem = {
path: string
method: string
+ hidden?: boolean
}
export type EndpointListItem = {