mirror of https://github.com/langgenius/dify.git
fix: Fix dependency version display (#25856)
This commit is contained in:
commit
092ced7c66
|
|
@ -43,7 +43,7 @@ const StrategyDetail: FC<Props> = ({
|
|||
|
||||
const outputSchema = useMemo(() => {
|
||||
const res: any[] = []
|
||||
if (!detail.output_schema)
|
||||
if (!detail.output_schema || !detail.output_schema.properties)
|
||||
return []
|
||||
Object.keys(detail.output_schema.properties).forEach((outputKey) => {
|
||||
const output = detail.output_schema.properties[outputKey]
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ const useConfig = (id: string, payload: AgentNodeType) => {
|
|||
|
||||
const outputSchema = useMemo(() => {
|
||||
const res: any[] = []
|
||||
if (!inputs.output_schema)
|
||||
if (!inputs.output_schema || !inputs.output_schema.properties)
|
||||
return []
|
||||
Object.keys(inputs.output_schema.properties).forEach((outputKey) => {
|
||||
const output = inputs.output_schema.properties[outputKey]
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ const nodeDefault: NodeDefault<ToolNodeType> = {
|
|||
const currTool = currCollection?.tools.find(tool => tool.name === payload.tool_name)
|
||||
const output_schema = currTool?.output_schema
|
||||
let res: any[] = []
|
||||
if (!output_schema) {
|
||||
if (!output_schema || !output_schema.properties) {
|
||||
res = TOOL_OUTPUT_STRUCT
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import type {
|
|||
} from '@/types/workflow'
|
||||
import { removeAccessToken } from '@/app/components/share/utils'
|
||||
import type { FetchOptionType, ResponseError } from './fetch'
|
||||
import { ContentType, base, baseOptions, getAccessToken } from './fetch'
|
||||
import { ContentType, base, getAccessToken, getBaseOptions } from './fetch'
|
||||
import { asyncRunSafe } from '@/utils'
|
||||
import type {
|
||||
DataSourceNodeCompletedResponse,
|
||||
|
|
@ -400,6 +400,7 @@ export const ssePost = async (
|
|||
|
||||
const token = localStorage.getItem('console_token')
|
||||
|
||||
const baseOptions = getBaseOptions()
|
||||
const options = Object.assign({}, baseOptions, {
|
||||
method: 'POST',
|
||||
signal: abortController.signal,
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ const baseClient = ky.create({
|
|||
timeout: TIME_OUT,
|
||||
})
|
||||
|
||||
export const baseOptions: RequestInit = {
|
||||
export const getBaseOptions = (): RequestInit => ({
|
||||
method: 'GET',
|
||||
mode: 'cors',
|
||||
credentials: 'include', // always send cookies、HTTP Basic authentication.
|
||||
|
|
@ -119,9 +119,10 @@ export const baseOptions: RequestInit = {
|
|||
'Content-Type': ContentType.json,
|
||||
}),
|
||||
redirect: 'follow',
|
||||
}
|
||||
})
|
||||
|
||||
async function base<T>(url: string, options: FetchOptionType = {}, otherOptions: IOtherOptions = {}): Promise<T> {
|
||||
const baseOptions = getBaseOptions()
|
||||
const { params, body, headers, ...init } = Object.assign({}, baseOptions, options)
|
||||
const {
|
||||
isPublicAPI = false,
|
||||
|
|
|
|||
Loading…
Reference in New Issue