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:
chanx
2025-08-01 21:55:49 +08:00
committed by GitHub
parent a16cd4f110
commit 47ba683728
4 changed files with 93 additions and 48 deletions

View File

@ -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>