diff --git a/app/components/input-range.tsx b/app/components/input-range.tsx
index a8ee9532b..08756e2c8 100644
--- a/app/components/input-range.tsx
+++ b/app/components/input-range.tsx
@@ -9,6 +9,7 @@ interface InputRangeProps {
min: string;
max: string;
step: string;
+ aria: string;
}
export function InputRange({
@@ -19,11 +20,13 @@ export function InputRange({
min,
max,
step,
+ aria,
}: InputRangeProps) {
return (
{title || value}
(null);
+ const [collapsed, setCollapsed] = useState(true);
+ const [showToggle, setShowToggle] = useState(false);
+
+ useEffect(() => {
+ if (ref.current) {
+ const codeHeight = ref.current.scrollHeight;
+ setShowToggle(codeHeight > 400);
+ ref.current.scrollTop = ref.current.scrollHeight;
+ }
+ }, [props.children]);
+
+ const toggleCollapsed = () => {
+ setCollapsed((collapsed) => !collapsed);
+ };
+ return (
+ <>
+
+ {props.children}
+ {showToggle && collapsed && (
+
+
+
+ )}
+
+ >
+ );
+}
+
function escapeDollarNumber(text: string) {
let escapedText = "";
@@ -211,6 +251,7 @@ function _MarkDownContent(props: { content: string }) {
]}
components={{
pre: PreCode,
+ code: CustomCode,
p: (pProps) =>
,
a: (aProps) => {
const href = aProps.href || "";
diff --git a/app/components/mask.tsx b/app/components/mask.tsx
index 77682b0b1..8c17a544a 100644
--- a/app/components/mask.tsx
+++ b/app/components/mask.tsx
@@ -127,6 +127,8 @@ export function MaskConfig(props: {
onClose={() => setShowPicker(false)}
>
setShowPicker(true)}
style={{ cursor: "pointer" }}
>
@@ -139,6 +141,7 @@ export function MaskConfig(props: {
@@ -153,6 +156,7 @@ export function MaskConfig(props: {
subTitle={Locale.Mask.Config.HideContext.SubTitle}
>
{
@@ -169,6 +173,7 @@ export function MaskConfig(props: {
subTitle={Locale.Mask.Config.Share.SubTitle}
>
}
text={Locale.Mask.Config.Share.Action}
onClick={copyMaskLink}
@@ -182,6 +187,7 @@ export function MaskConfig(props: {
subTitle={Locale.Mask.Config.Sync.SubTitle}
>
{
diff --git a/app/components/model-config.tsx b/app/components/model-config.tsx
index 346fd3a71..6ce25f664 100644
--- a/app/components/model-config.tsx
+++ b/app/components/model-config.tsx
@@ -17,6 +17,7 @@ export function ModelConfigList(props: {
<>