From 58615081531ef21a2f493239fb4915c4c47aabc0 Mon Sep 17 00:00:00 2001 From: jialin Date: Fri, 27 Jun 2025 13:41:42 +0800 Subject: [PATCH] fix(style): imgs overflow style on chat --- src/components/audio-player/simple-audio.tsx | 2 +- src/pages/dashboard/components/over-view.tsx | 2 +- src/pages/llmodels/components/deploy-modal.tsx | 10 ++++++---- .../playground/components/message-input.tsx | 16 ++++++++++++++-- .../components/multiple-chat/message-body.tsx | 17 ++++++++++++++--- 5 files changed, 36 insertions(+), 11 deletions(-) diff --git a/src/components/audio-player/simple-audio.tsx b/src/components/audio-player/simple-audio.tsx index 87eaeae8..9016cc69 100644 --- a/src/components/audio-player/simple-audio.tsx +++ b/src/components/audio-player/simple-audio.tsx @@ -50,7 +50,7 @@ const useStyles = createStyles(({ css, token }) => { return { wrapper: css` position: relative; - min-width: 300px; + min-width: 360px; height: 54px; display: flex; align-items: center; diff --git a/src/pages/dashboard/components/over-view.tsx b/src/pages/dashboard/components/over-view.tsx index f60f27b4..43c91279 100644 --- a/src/pages/dashboard/components/over-view.tsx +++ b/src/pages/dashboard/components/over-view.tsx @@ -52,7 +52,7 @@ const Overview: React.FC = () => { }; return (
- + {overviewConfigs.map((config, index) => ( = (props) => { }; const getDefaultSpec = (item: any) => { - const defaultSpec = item.evaluateResult?.default_spec || {}; - return _.omit(defaultSpec, [ - 'cpu_offloading', - 'distributed_inference_across_workers' + const defaultSpec = _.get(item.evaluateResult?.default_spec, [ + 'backend_version', + 'backend_parameters', + 'env' ]); + + return defaultSpec; }; const getCategory = (item: any) => { diff --git a/src/pages/playground/components/message-input.tsx b/src/pages/playground/components/message-input.tsx index 500accdf..dae1104c 100644 --- a/src/pages/playground/components/message-input.tsx +++ b/src/pages/playground/components/message-input.tsx @@ -36,11 +36,22 @@ const audioTypeMap: Record = { const AudioWrapper = styled.div` padding-block: 10px; + height: max-content; + width: max-content; audio { padding-top: 10px; } `; +const ImgsWrapper = styled.div.attrs({ + className: 'custom-scrollbar-horizontal' +})` + display: flex; + overflow-x: auto; + width: 100%; + flex-direction: column; +`; + type CurrentMessage = Omit; type ActionType = @@ -505,8 +516,9 @@ const MessageInput: React.FC = forwardRef( )}
-
+ = forwardRef( > )} -
+
{actions.includes('paste') ? (