mirror of
https://github.com/langgenius/dify.git
synced 2026-04-28 20:17:29 +08:00
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 outputSchema = useMemo(() => {
|
||||||
const res: any[] = []
|
const res: any[] = []
|
||||||
if (!detail.output_schema)
|
if (!detail.output_schema || !detail.output_schema.properties)
|
||||||
return []
|
return []
|
||||||
Object.keys(detail.output_schema.properties).forEach((outputKey) => {
|
Object.keys(detail.output_schema.properties).forEach((outputKey) => {
|
||||||
const output = detail.output_schema.properties[outputKey]
|
const output = detail.output_schema.properties[outputKey]
|
||||||
|
|||||||
@ -181,7 +181,7 @@ const useConfig = (id: string, payload: AgentNodeType) => {
|
|||||||
|
|
||||||
const outputSchema = useMemo(() => {
|
const outputSchema = useMemo(() => {
|
||||||
const res: any[] = []
|
const res: any[] = []
|
||||||
if (!inputs.output_schema)
|
if (!inputs.output_schema || !inputs.output_schema.properties)
|
||||||
return []
|
return []
|
||||||
Object.keys(inputs.output_schema.properties).forEach((outputKey) => {
|
Object.keys(inputs.output_schema.properties).forEach((outputKey) => {
|
||||||
const output = inputs.output_schema.properties[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 currTool = currCollection?.tools.find(tool => tool.name === payload.tool_name)
|
||||||
const output_schema = currTool?.output_schema
|
const output_schema = currTool?.output_schema
|
||||||
let res: any[] = []
|
let res: any[] = []
|
||||||
if (!output_schema) {
|
if (!output_schema || !output_schema.properties) {
|
||||||
res = TOOL_OUTPUT_STRUCT
|
res = TOOL_OUTPUT_STRUCT
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@ -23,7 +23,7 @@ import type {
|
|||||||
} from '@/types/workflow'
|
} from '@/types/workflow'
|
||||||
import { removeAccessToken } from '@/app/components/share/utils'
|
import { removeAccessToken } from '@/app/components/share/utils'
|
||||||
import type { FetchOptionType, ResponseError } from './fetch'
|
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 { asyncRunSafe } from '@/utils'
|
||||||
import type {
|
import type {
|
||||||
DataSourceNodeCompletedResponse,
|
DataSourceNodeCompletedResponse,
|
||||||
@ -400,6 +400,7 @@ export const ssePost = async (
|
|||||||
|
|
||||||
const token = localStorage.getItem('console_token')
|
const token = localStorage.getItem('console_token')
|
||||||
|
|
||||||
|
const baseOptions = getBaseOptions()
|
||||||
const options = Object.assign({}, baseOptions, {
|
const options = Object.assign({}, baseOptions, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
signal: abortController.signal,
|
signal: abortController.signal,
|
||||||
|
|||||||
@ -111,7 +111,7 @@ const baseClient = ky.create({
|
|||||||
timeout: TIME_OUT,
|
timeout: TIME_OUT,
|
||||||
})
|
})
|
||||||
|
|
||||||
export const baseOptions: RequestInit = {
|
export const getBaseOptions = (): RequestInit => ({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
mode: 'cors',
|
mode: 'cors',
|
||||||
credentials: 'include', // always send cookies、HTTP Basic authentication.
|
credentials: 'include', // always send cookies、HTTP Basic authentication.
|
||||||
@ -119,9 +119,10 @@ export const baseOptions: RequestInit = {
|
|||||||
'Content-Type': ContentType.json,
|
'Content-Type': ContentType.json,
|
||||||
}),
|
}),
|
||||||
redirect: 'follow',
|
redirect: 'follow',
|
||||||
}
|
})
|
||||||
|
|
||||||
async function base<T>(url: string, options: FetchOptionType = {}, otherOptions: IOtherOptions = {}): Promise<T> {
|
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 { params, body, headers, ...init } = Object.assign({}, baseOptions, options)
|
||||||
const {
|
const {
|
||||||
isPublicAPI = false,
|
isPublicAPI = false,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user