mirror of
https://github.com/langgenius/dify.git
synced 2026-04-29 04:26:30 +08:00
Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins
This commit is contained in:
commit
07494459cc
@ -33,7 +33,7 @@ const AppInputsPanel = ({
|
|||||||
const isBasicApp = appDetail.mode !== 'advanced-chat' && appDetail.mode !== 'workflow'
|
const isBasicApp = appDetail.mode !== 'advanced-chat' && appDetail.mode !== 'workflow'
|
||||||
const { data: fileUploadConfig } = useFileUploadConfig()
|
const { data: fileUploadConfig } = useFileUploadConfig()
|
||||||
const { data: currentApp, isFetching: isAppLoading } = useAppDetail(appDetail.id)
|
const { data: currentApp, isFetching: isAppLoading } = useAppDetail(appDetail.id)
|
||||||
const { data: currentWorkflow, isFetching: isWorkflowLoading } = useAppWorkflow(isBasicApp ? 'empty' : appDetail.id)
|
const { data: currentWorkflow, isFetching: isWorkflowLoading } = useAppWorkflow(isBasicApp ? '' : appDetail.id)
|
||||||
const isLoading = isAppLoading || isWorkflowLoading
|
const isLoading = isAppLoading || isWorkflowLoading
|
||||||
|
|
||||||
const basicAppFileConfig = useMemo(() => {
|
const basicAppFileConfig = useMemo(() => {
|
||||||
|
|||||||
@ -8,11 +8,8 @@ const NAME_SPACE = 'workflow'
|
|||||||
|
|
||||||
export const useAppWorkflow = (appID: string) => {
|
export const useAppWorkflow = (appID: string) => {
|
||||||
return useQuery<FetchWorkflowDraftResponse>({
|
return useQuery<FetchWorkflowDraftResponse>({
|
||||||
|
enabled: !!appID,
|
||||||
queryKey: [NAME_SPACE, 'publish', appID],
|
queryKey: [NAME_SPACE, 'publish', appID],
|
||||||
queryFn: () => {
|
queryFn: () => get<FetchWorkflowDraftResponse>(`/apps/${appID}/workflows/publish`),
|
||||||
if (appID === 'empty')
|
|
||||||
return Promise.resolve({} as unknown as FetchWorkflowDraftResponse)
|
|
||||||
return get<FetchWorkflowDraftResponse>(`/apps/${appID}/workflows/publish`)
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user