Fix type error (#27250)
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
import type { ButtonHTMLAttributes } from 'react'
|
import type { ButtonHTMLAttributes } from 'react'
|
||||||
|
|
||||||
|
type ElementProps = {
|
||||||
|
className?: string
|
||||||
|
children?: React.ReactNode
|
||||||
|
[key: string]: unknown
|
||||||
|
}
|
||||||
|
|
||||||
type IBasePaginationProps = {
|
type IBasePaginationProps = {
|
||||||
currentPage: number
|
currentPage: number
|
||||||
setCurrentPage: (page: number) => void
|
setCurrentPage: (page: number) => void
|
||||||
@@ -31,7 +37,7 @@ type IPagination = IUsePagination & {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
||||||
as?: React.ReactNode
|
as?: React.ReactElement<ElementProps>
|
||||||
children?: string | React.ReactNode
|
children?: string | React.ReactNode
|
||||||
className?: string
|
className?: string
|
||||||
dataTestId?: string
|
dataTestId?: string
|
||||||
@@ -39,9 +45,9 @@ type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|||||||
|
|
||||||
type PageButtonProps = ButtonProps & {
|
type PageButtonProps = ButtonProps & {
|
||||||
/**
|
/**
|
||||||
* Provide a custom ReactNode (e.g. Next/Link)
|
* Provide a custom ReactElement (e.g. Next/Link)
|
||||||
*/
|
*/
|
||||||
as?: React.ReactNode
|
as?: React.ReactElement<ElementProps>
|
||||||
activeClassName?: string
|
activeClassName?: string
|
||||||
inactiveClassName?: string
|
inactiveClassName?: string
|
||||||
dataTestIdActive?: string
|
dataTestIdActive?: string
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
|
import type { TypeWithI18N } from '@/app/components/header/account-setting/model-provider-page/declarations'
|
||||||
|
|
||||||
export type Label = {
|
export type Label = {
|
||||||
name: string
|
name: string
|
||||||
label: string
|
label: TypeWithI18N
|
||||||
|
icon: string
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ export const vars: VarInInspect[] = [
|
|||||||
value_type: VarType.string,
|
value_type: VarType.string,
|
||||||
value: 'text value...',
|
value: 'text value...',
|
||||||
edited: false,
|
edited: false,
|
||||||
|
visible: true,
|
||||||
|
is_truncated: false,
|
||||||
|
full_content: { size_bytes: 0, download_url: '' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'fdklajljgldjglkagjlk',
|
id: 'fdklajljgldjglkagjlk',
|
||||||
@@ -22,6 +25,9 @@ export const vars: VarInInspect[] = [
|
|||||||
value_type: VarType.string,
|
value_type: VarType.string,
|
||||||
value: 'made zhizhang',
|
value: 'made zhizhang',
|
||||||
edited: false,
|
edited: false,
|
||||||
|
visible: true,
|
||||||
|
is_truncated: false,
|
||||||
|
full_content: { size_bytes: 0, download_url: '' },
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -35,6 +41,9 @@ export const conversationVars: VarInInspect[] = [
|
|||||||
value_type: VarType.string,
|
value_type: VarType.string,
|
||||||
value: 'conversation var value...',
|
value: 'conversation var value...',
|
||||||
edited: false,
|
edited: false,
|
||||||
|
visible: true,
|
||||||
|
is_truncated: false,
|
||||||
|
full_content: { size_bytes: 0, download_url: '' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'con2',
|
id: 'con2',
|
||||||
@@ -45,6 +54,9 @@ export const conversationVars: VarInInspect[] = [
|
|||||||
value_type: VarType.number,
|
value_type: VarType.number,
|
||||||
value: 456,
|
value: 456,
|
||||||
edited: false,
|
edited: false,
|
||||||
|
visible: true,
|
||||||
|
is_truncated: false,
|
||||||
|
full_content: { size_bytes: 0, download_url: '' },
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -58,6 +70,9 @@ export const systemVars: VarInInspect[] = [
|
|||||||
value_type: VarType.string,
|
value_type: VarType.string,
|
||||||
value: 'Hello robot!',
|
value: 'Hello robot!',
|
||||||
edited: false,
|
edited: false,
|
||||||
|
visible: true,
|
||||||
|
is_truncated: false,
|
||||||
|
full_content: { size_bytes: 0, download_url: '' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'sys2',
|
id: 'sys2',
|
||||||
@@ -68,5 +83,8 @@ export const systemVars: VarInInspect[] = [
|
|||||||
value_type: VarType.string,
|
value_type: VarType.string,
|
||||||
value: 'djflakjerlkjdlksfjslakjsdfl',
|
value: 'djflakjerlkjdlksfjslakjsdfl',
|
||||||
edited: false,
|
edited: false,
|
||||||
|
visible: true,
|
||||||
|
is_truncated: false,
|
||||||
|
full_content: { size_bytes: 0, download_url: '' },
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -21,5 +21,8 @@ export const outputToVarInInspect = ({
|
|||||||
value_type: VarType.string, // TODO: wait for api or get from node
|
value_type: VarType.string, // TODO: wait for api or get from node
|
||||||
value,
|
value,
|
||||||
edited: false,
|
edited: false,
|
||||||
|
visible: true,
|
||||||
|
is_truncated: false,
|
||||||
|
full_content: { size_bytes: 0, download_url: '' },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user