mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-26 17:16:52 +08:00
Fix: Share-log bugs (#9172)
### What problem does this PR solve? Fix Share-log bugs #3221 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -11,6 +11,7 @@ import { Input } from '@/components/ui/input';
|
||||
import { RAGFlowSelect } from '@/components/ui/select';
|
||||
import { Switch } from '@/components/ui/switch';
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
import { IMessage } from '@/pages/chat/interface';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import React, { ReactNode, useCallback, useMemo } from 'react';
|
||||
import { useForm } from 'react-hook-form';
|
||||
@ -28,6 +29,7 @@ const StringFields = [
|
||||
|
||||
interface IProps {
|
||||
parameters: BeginQuery[];
|
||||
message?: IMessage;
|
||||
ok(parameters: any[]): void;
|
||||
isNext?: boolean;
|
||||
loading?: boolean;
|
||||
@ -37,6 +39,7 @@ interface IProps {
|
||||
|
||||
const DebugContent = ({
|
||||
parameters,
|
||||
message,
|
||||
ok,
|
||||
isNext = true,
|
||||
loading = false,
|
||||
@ -228,10 +231,10 @@ const DebugContent = ({
|
||||
},
|
||||
[formSchemaValues, ok, parameters],
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<section>
|
||||
{message?.data?.tips && <div className="mb-2">{message.data.tips}</div>}
|
||||
<Form {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">
|
||||
{parameters.map((x, idx) => {
|
||||
@ -242,7 +245,7 @@ const DebugContent = ({
|
||||
type="submit"
|
||||
loading={loading}
|
||||
disabled={!submittable || submitButtonDisabled}
|
||||
className="w-full mt-8"
|
||||
className="w-full mt-1"
|
||||
>
|
||||
{btnText || t(isNext ? 'common.next' : 'flow.run')}
|
||||
</ButtonLoading>
|
||||
|
||||
Reference in New Issue
Block a user