fix: trigger doc link (#31754)

This commit is contained in:
Stephen Zhou
2026-01-30 17:30:24 +08:00
committed by GitHub
parent 5a7dfd15b8
commit b7e752078c
8 changed files with 40 additions and 20 deletions

View File

@@ -282,6 +282,15 @@ function generateTypeDefinitions(
}
lines.push('')
// Add UseDifyNodesPath helper type after UseDifyPath
if (section === 'use-dify') {
lines.push('// UseDify node paths (without prefix)')
// eslint-disable-next-line no-template-curly-in-string
lines.push('type ExtractNodesPath<T> = T extends `/use-dify/nodes/${infer Path}` ? Path : never')
lines.push('export type UseDifyNodesPath = ExtractNodesPath<UseDifyPath>')
lines.push('')
}
}
// Generate API reference type (English paths only)