fix(CI): fix CI errors

This commit is contained in:
zhsama 2025-10-30 16:54:17 +08:00
parent b25d379ef4
commit db744444f2
9 changed files with 11 additions and 14 deletions

View File

@ -102,14 +102,14 @@ const FormPlayground = () => {
options={{
...demoFormOpts,
validators: {
onSubmit: ({ value }) => {
const result = UserSchema.safeParse(value as typeof demoFormOpts.defaultValues)
onSubmit: ({ value: formValue }) => {
const result = UserSchema.safeParse(formValue as typeof demoFormOpts.defaultValues)
if (!result.success)
return result.error.issues[0].message
return undefined
},
},
onSubmit: ({ value }) => {
onSubmit: () => {
setStatus('Successfully saved profile.')
},
}}

View File

@ -67,7 +67,7 @@ const InputWithCopy = React.forwardRef<HTMLInputElement, InputWithCopyProps>((
inputProps.className,
)}
value={value}
{...(({ size, ...rest }) => rest)(inputProps)}
{...(({ size: _size, ...rest }) => rest)(inputProps)}
/>
{showCopyButton && (
<div

View File

@ -29,7 +29,7 @@ const VoiceInputMock = ({ onConverted, onCancel }: any) => {
<div className="absolute inset-[1.5px] flex items-center overflow-hidden rounded-[10.5px] bg-primary-25 py-[14px] pl-[14.5px] pr-[6.5px]">
{/* Waveform visualization placeholder */}
<div className="absolute bottom-0 left-0 flex h-4 w-full items-end gap-[3px] px-2">
{new Array(40).fill(0).map((_, i) => (
{Array.from({ length: 40 }).map((_, i) => (
<div
key={i}
className="w-[2px] rounded-t bg-blue-200"

View File

@ -105,8 +105,6 @@ const FileUploader = ({
return isValidType && isValidSize
}, [fileUploadConfig, notify, t, ACCEPTS])
type UploadResult = Awaited<ReturnType<typeof upload>>
const fileUpload = useCallback(async (fileItem: FileItem): Promise<FileItem> => {
const formData = new FormData()
formData.append('file', fileItem.file)

View File

@ -17,13 +17,11 @@ type SubscriptionTriggerButtonProps = {
onClick?: () => void
isOpen?: boolean
className?: string
onSelect: (v: SimpleSubscription, callback?: () => void) => void
}
const SubscriptionTriggerButton: React.FC<SubscriptionTriggerButtonProps> = ({
selectedId,
onClick,
onSelect,
isOpen = false,
className,
}) => {
@ -109,7 +107,6 @@ export const SubscriptionSelectorEntry = ({ selectedId, onSelect }: {
selectedId={selectedId}
onClick={() => setIsOpen(!isOpen)}
isOpen={isOpen}
onSelect={onSelect}
/>
</div>
</PortalToFollowElemTrigger>

View File

@ -151,7 +151,8 @@ export const useChecklist = (nodes: Node[], edges: Edge[]) => {
if (node.type === CUSTOM_NODE) {
const checkData = getCheckData(node.data)
let { errorMessage } = nodesExtraData![node.data.type]?.checkValid(checkData, t, moreDataForCheckValid)
const validator = nodesExtraData?.[node.data.type as BlockEnum]?.checkValid
let errorMessage = validator ? validator(checkData, t, moreDataForCheckValid).errorMessage : undefined
if (!errorMessage) {
const availableVars = map[node.id].availableVars

View File

@ -83,7 +83,7 @@ const useConfig = (id: string, payload: PluginTriggerNodeType) => {
const {
provider_id,
provider_name,
event_name: event_name,
event_name,
config = {},
event_parameters: rawEventParameters = {},
subscription_id,

View File

@ -16,7 +16,7 @@ export const getToolCheckParams = (
workflowTools: ToolWithProvider[],
language: string,
) => {
const { provider_id, provider_type, tool_name: tool_name } = toolData
const { provider_id, provider_type, tool_name } = toolData
const isBuiltIn = provider_type === CollectionType.builtIn
const currentTools = provider_type === CollectionType.builtIn ? buildInTools : provider_type === CollectionType.custom ? customTools : workflowTools
const currCollection = currentTools.find(item => canFindTool(item.id, provider_id))

View File

@ -295,7 +295,8 @@ export const fetchAccessToken = async ({ userId, appCode }: { userId?: string, a
if (accessToken)
headers.append('Authorization', `Bearer ${accessToken}`)
const params = new URLSearchParams()
userId && params.append('user_id', userId)
if (userId)
params.append('user_id', userId)
const url = `/passport?${params.toString()}`
return get<{ access_token: string }>(url, { headers }) as Promise<{ access_token: string }>
}