From 225ad308987d713afa31fc7f6f380f3eeb4581d8 Mon Sep 17 00:00:00 2001 From: glay Date: Wed, 13 Nov 2024 18:37:47 +0800 Subject: [PATCH] =?UTF-8?q?=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20=20ap?= =?UTF-8?q?p/api/bedrock.ts=20=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20?= =?UTF-8?q?=20app/components/ui-lib.tsx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/bedrock.ts | 1 - app/components/ui-lib.tsx | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/api/bedrock.ts b/app/api/bedrock.ts index b2b04cc32..c8709722e 100644 --- a/app/api/bedrock.ts +++ b/app/api/bedrock.ts @@ -190,7 +190,6 @@ export async function handle( } // If stream is false, accumulate the response and return as JSON - console.log("Body.stream==========" + body.stream); if (body.stream === false) { let fullResponse = { content: "", diff --git a/app/components/ui-lib.tsx b/app/components/ui-lib.tsx index 1df0462c0..5f183c8c4 100644 --- a/app/components/ui-lib.tsx +++ b/app/components/ui-lib.tsx @@ -272,19 +272,20 @@ export function Input(props: InputProps) { export function PasswordInput( props: HTMLProps & { aria?: string; - maskWhenShow?: boolean; // New prop to control masking behavior + maskWhenShow?: boolean; }, ) { const [visible, setVisible] = useState(false); const [displayValue, setDisplayValue] = useState(props.value as string); + const { maskWhenShow, ...inputProps } = props; useEffect(() => { - if (props.maskWhenShow && visible && props.value) { + if (maskWhenShow && visible && props.value) { setDisplayValue(maskSensitiveValue(props.value as string)); } else { setDisplayValue(props.value as string); } - }, [visible, props.value, props.maskWhenShow]); + }, [visible, props.value, maskWhenShow]); function changeVisibility() { setVisible(!visible); @@ -305,7 +306,7 @@ export function PasswordInput( className={"password-eye"} />