@@ -16,21 +16,16 @@ export function PredictPrice({ token, isChatBot = false }: { token: number; isCh
const modifier = isChatBot ? tierModifierClass(token) : ''
const isHighCost = isChatBot && token >= 150
-
- if (token && token>0) {
- return (
-
-
-
- {token}
-
-
- )
- }
-
- return <>>
+ return (
+
+
+
+ {token}
+
+
+ )
}
@@ -8,6 +8,7 @@ interface Props {
maxWidth?: string
/** By default tooltip stops click propagation (useful inside buttons/menus). Set false when parent needs the click. */
stopClickPropagation?: boolean
+ wrapperWidth?: string
placement?:
| 'bottom-end'
| 'bottom-start'
@@ -36,6 +37,7 @@ export const TooltipCustom: React.FC = ({
className,
maxWidth,
stopClickPropagation = true,
+ wrapperWidth,
fullWidthTrigger = false,
tapToOpenOnMobile = false,
}) => {
@@ -43,9 +45,10 @@ export const TooltipCustom: React.FC = ({
const tapMode = Boolean(tapToOpenOnMobile && isTouchPrimary)
const [tapOpen, setTapOpen] = useState(false)
- const triggerSpanStyle: React.CSSProperties | undefined = fullWidthTrigger
- ? { display: 'flex', width: '100%', minWidth: 0 }
- : undefined
+ const triggerSpanStyle: React.CSSProperties | undefined = {
+ ...(fullWidthTrigger ? { display: 'flex', width: '100%', minWidth: 0 } : {}),
+ ...(wrapperWidth ? { display: 'block', width: wrapperWidth, maxWidth: '100%', minWidth: 0 } : {}),
+ }
const tooltip = (
= memo(({ device, images,
(device === 'mobile' ? 35 : 30) ? message.content : ''}
+ wrapperWidth={device === 'desktop' ? '250px' : '291px'}
+ title={message.content}
>
message.content.length > 0 && onPromptClick?.(message.content)}
sx={{
fontSize: '15px',
- maxWidth: device === 'desktop' ? '250px' : '100%',
+ width: '100%',
marginTop: '12px',
color: '#A4AAB5',
+ whiteSpace: 'nowrap',
+ overflow: 'hidden',
+ textOverflow: 'ellipsis',
cursor: onPromptClick && message.content.length > 0 ? 'pointer' : 'default',
}}
>
@@ -138,24 +138,27 @@ export const VideoMessagesList: React.FC = memo(({ device, videos,
30 ? message.content : ''}
+ wrapperWidth={device === 'desktop' ? '250px' : '291px'}
+ title={message.content}
>
message.content.length > 0 && onPromptClick?.(message.content)}
sx={{
fontSize: '15px',
- maxWidth: device === 'desktop' ? '250px' : '100%',
+ width: '100%',
marginTop: '12px',
color: '#A4AAB5',
+ whiteSpace: 'nowrap',
+ overflow: 'hidden',
+ textOverflow: 'ellipsis',
cursor: onPromptClick && message.content.length > 0 ? 'pointer' : 'default',
}}
>
{!loadedVideos.has(message.uid)
? ''
: message.content.length > 0
- ? message?.content.replaceAll('"', '').slice(0, 27)
+ ? message?.content.replaceAll('"', '')
: 'описание отсутствует'}
- {message?.content.length > 27 && loadedVideos.has(message.uid) && '...'}
@@ -9,8 +9,6 @@ default:
build:
stage: Build
- variables:
- IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
script:
- cp $BUILD_ENV .env
- docker compose build --push
@@ -24,7 +22,6 @@ build:
services:
- docker:dind
variables:
- IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
ENVIRONMENT: $CI_ENVIRONMENT_TIER
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: "/certs"
@@ -43,7 +40,7 @@ build:
script:
- sort -u -t '=' -k 1,1 $ENV $BUILD_ENV <(echo "RELEASE=$(echo -n $(date '+%D %X'))") > .env
- if [ "$(docker info --format '{{.Swarm.LocalNodeState}}' 2>/dev/null)" = "active" ]; then
- docker stack deploy --with-registry-auth --prune --resolve-image always -c <(docker compose config | grep -v "^name:") $COMPOSE_PROJECT_NAME;
+ docker stack deploy --prune --with-registry-auth -c <(docker compose config | grep -v "^name:") $COMPOSE_PROJECT_NAME;
else
docker compose up -d;
fi
@@ -1,6 +1,6 @@
services:
app:
- image: ${IMAGE_TAG:-air/ui/web:latest}
+ image: ${CI_REGISTRY_IMAGE:-air/ui/web}:${CI_COMMIT_SHA:-latest}
build:
context: .
dockerfile: Dockerfile