Feat: Display error messages from intermediate nodes of the webhook. #10427 (#11954)

### What problem does this PR solve?

Feat: Remove HMAC from the webhook #10427

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-12-19 12:56:56 +08:00
committed by GitHub
parent 6cd1824a77
commit 4cbe470089
27 changed files with 737 additions and 359 deletions

View File

@ -25,3 +25,12 @@ const CopyToClipboard = ({ text }: Props) => {
};
export default CopyToClipboard;
export function CopyToClipboardWithText({ text }: { text: string }) {
return (
<div className="bg-bg-card p-1 rounded-md flex gap-2">
<span className="flex-1 truncate">{text}</span>
<CopyToClipboard text={text}></CopyToClipboard>
</div>
);
}

View File

@ -7,6 +7,7 @@ interface NumberInputProps {
onChange?: (value: number) => void;
height?: number | string;
min?: number;
max?: number;
}
const NumberInput: React.FC<NumberInputProps> = ({
@ -15,6 +16,7 @@ const NumberInput: React.FC<NumberInputProps> = ({
onChange,
height,
min = 0,
max = Infinity,
}) => {
const [value, setValue] = useState<number>(() => {
return initialValue ?? 0;
@ -34,6 +36,9 @@ const NumberInput: React.FC<NumberInputProps> = ({
};
const handleIncrement = () => {
if (value > max - 1) {
return;
}
setValue(value + 1);
onChange?.(value + 1);
};
@ -41,6 +46,9 @@ const NumberInput: React.FC<NumberInputProps> = ({
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const newValue = Number(e.target.value);
if (!isNaN(newValue)) {
if (newValue > max) {
return;
}
setValue(newValue);
onChange?.(newValue);
}

View File

@ -7,7 +7,11 @@ import {
} from '@/components/ui/form';
import { cn } from '@/lib/utils';
import { ReactNode, cloneElement, isValidElement } from 'react';
import { ControllerRenderProps, useFormContext } from 'react-hook-form';
import {
ControllerRenderProps,
UseControllerProps,
useFormContext,
} from 'react-hook-form';
type RAGFlowFormItemProps = {
name: string;
@ -18,7 +22,7 @@ type RAGFlowFormItemProps = {
required?: boolean;
labelClassName?: string;
className?: string;
};
} & Pick<UseControllerProps<any>, 'rules'>;
export function RAGFlowFormItem({
name,
@ -29,11 +33,13 @@ export function RAGFlowFormItem({
required = false,
labelClassName,
className,
rules,
}: RAGFlowFormItemProps) {
const form = useFormContext();
return (
<FormField
control={form.control}
rules={rules}
name={name}
render={({ field }) => (
<FormItem