mirror of
https://github.com/langgenius/dify.git
synced 2026-04-30 23:48:04 +08:00
chore: skill in query to file
This commit is contained in:
@ -82,7 +82,7 @@ const FilePreviewPanel = ({ resourceId, currentNode, className, style, onClose }
|
||||
if (!canOpenInEditor)
|
||||
return
|
||||
const nextUrl = new URL(window.location.href)
|
||||
nextUrl.searchParams.set('view', 'skill')
|
||||
nextUrl.searchParams.set('view', 'file')
|
||||
nextUrl.searchParams.set('fileId', resourceId)
|
||||
window.open(nextUrl.toString(), '_blank', 'noopener,noreferrer')
|
||||
}, [canOpenInEditor, resourceId])
|
||||
|
||||
@ -606,6 +606,6 @@ export type Block = {
|
||||
|
||||
export const ViewType = {
|
||||
graph: 'graph',
|
||||
skill: 'skill',
|
||||
file: 'file',
|
||||
} as const
|
||||
export type ViewType = typeof ViewType[keyof typeof ViewType]
|
||||
|
||||
@ -24,7 +24,7 @@ const ViewPicker: FC<ViewPickerProps> = ({
|
||||
const { t } = useTranslation()
|
||||
const options = useMemo(() => ([
|
||||
{ value: ViewType.graph, text: t('viewPicker.graph', { ns: 'workflow' }), disabled: disabled && value !== ViewType.graph },
|
||||
{ value: ViewType.skill, text: t('viewPicker.file', { ns: 'workflow' }), disabled: disabled && value !== ViewType.skill },
|
||||
{ value: ViewType.file, text: t('viewPicker.file', { ns: 'workflow' }), disabled: disabled && value !== ViewType.file },
|
||||
]), [t, disabled, value])
|
||||
|
||||
const handleChange = useCallback((nextValue: string | number | symbol) => {
|
||||
|
||||
Reference in New Issue
Block a user