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.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
import { resolveDatasourceIcon } from '../datasource-icon'
vi.mock('@/utils/var', () => ({ basePath: '/dify' }))
it.each([
['/console/api/plugin/icon', '/dify/console/api/plugin/icon'],
['/dify/console/api/plugin/icon', '/dify/console/api/plugin/icon'],
['/dify', '/dify'],
['/dify-other/icon.svg', '/dify/dify-other/icon.svg'],
['https://assets.dify.ai/icon.svg', 'https://assets.dify.ai/icon.svg'],
['//assets.dify.ai/icon.svg', '//assets.dify.ai/icon.svg'],
['data:image/svg+xml,icon', 'data:image/svg+xml,icon'],
['icon.svg', 'icon.svg'],
['', ''],
])(
'resolves datasource icon %s without changing external or already prefixed URLs',
(icon, expected) => {
expect(resolveDatasourceIcon(icon)).toBe(expected)
},
)