From d27a44ab7f215b1e9676e1ea2eac8edcc613670f Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Thu, 20 Jun 2024 14:55:02 -0700 Subject: [PATCH] TS 5.5.2 fixes --- next.config.mjs | 5 ++++- .../composer/llmattachments/useLLMAttachmentDrafts.ts | 2 +- src/apps/news/beam.data.tsx | 1 - src/common/components/forms/FormLabelStart.tsx | 1 - src/common/styles/GithubMarkdown.css | 2 +- src/common/styles/NProgress.css | 3 +-- src/common/util/trpc.client.ts | 2 +- src/modules/llms/llm.client.ts | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index 9a1b35206..b6362cf26 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -43,8 +43,11 @@ let nextConfig = { } // prevent too many small chunks (40kb min) on 'client' packs (not 'server' or 'edge-server') - if (typeof config.optimization.splitChunks === 'object' && config.optimization.splitChunks.minSize) + // noinspection JSUnresolvedReference + if (typeof config.optimization.splitChunks === 'object' && config.optimization.splitChunks.minSize) { + // noinspection JSUnresolvedReference config.optimization.splitChunks.minSize = 40 * 1024; + } return config; }, diff --git a/src/apps/chat/components/composer/llmattachments/useLLMAttachmentDrafts.ts b/src/apps/chat/components/composer/llmattachments/useLLMAttachmentDrafts.ts index a72241f69..423ca6f6a 100644 --- a/src/apps/chat/components/composer/llmattachments/useLLMAttachmentDrafts.ts +++ b/src/apps/chat/components/composer/llmattachments/useLLMAttachmentDrafts.ts @@ -29,7 +29,7 @@ export function useLLMAttachmentDrafts(attachmentDrafts: AttachmentDraft[], chat // LLM-dependent multi-modal enablement const supportsImages = !!chatLLM?.interfaces?.includes(LLM_IF_OAI_Vision); const supportedTypes: DMessageAttachmentFragment['part']['pt'][] = supportsImages ? ['image_ref', 'text'] : ['text']; - const supportedTextTypes = supportedTypes.filter(pt => pt === 'text'); + const supportedTextTypes: DMessageAttachmentFragment['part']['pt'][] = supportedTypes.filter(pt => pt === 'text'); // Add LLM-specific properties to each attachment draft const llmAttachmentDrafts = attachmentDrafts.map((a): LLMAttachmentDraft => ({ diff --git a/src/apps/news/beam.data.tsx b/src/apps/news/beam.data.tsx index 99f08c61b..8893f76b4 100644 --- a/src/apps/news/beam.data.tsx +++ b/src/apps/news/beam.data.tsx @@ -2,7 +2,6 @@ import * as React from 'react'; import { Button, Card, CardContent, Grid, Typography } from '@mui/joy'; import LaunchIcon from '@mui/icons-material/Launch'; -import ThumbUpRoundedIcon from '@mui/icons-material/ThumbUpRounded'; import { Link } from '~/common/components/Link'; diff --git a/src/common/components/forms/FormLabelStart.tsx b/src/common/components/forms/FormLabelStart.tsx index ec29dd23f..7ede9f0d8 100644 --- a/src/common/components/forms/FormLabelStart.tsx +++ b/src/common/components/forms/FormLabelStart.tsx @@ -5,7 +5,6 @@ import { SxProps } from '@mui/joy/styles/types'; import InfoIcon from '@mui/icons-material/Info'; import { GoodTooltip } from '~/common/components/GoodTooltip'; -import { formLabelStartWidth } from '~/common/app.theme'; /** diff --git a/src/common/styles/GithubMarkdown.css b/src/common/styles/GithubMarkdown.css index 75ae98af8..e8718301d 100644 --- a/src/common/styles/GithubMarkdown.css +++ b/src/common/styles/GithubMarkdown.css @@ -1085,7 +1085,7 @@ .markdown-body g-emoji { display: inline-block; min-width: 1ch; - font-family: "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"; + font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", serif; font-size: 1em; font-style: normal !important; font-weight: 400; diff --git a/src/common/styles/NProgress.css b/src/common/styles/NProgress.css index c3432483a..6f8439b7b 100644 --- a/src/common/styles/NProgress.css +++ b/src/common/styles/NProgress.css @@ -26,13 +26,12 @@ #nprogress .peg { display: block; position: absolute; - right: 0px; + right: 0; width: 100px; height: 100%; box-shadow: 0 0 10px var(--barColor), 0 0 5px var(--barColor); opacity: 1.0; - -webkit-transform: rotate(3deg) translate(0px, -4px); -ms-transform: rotate(3deg) translate(0px, -4px); transform: rotate(3deg) translate(0px, -4px); } diff --git a/src/common/util/trpc.client.ts b/src/common/util/trpc.client.ts index 1ab709827..a697b74cb 100644 --- a/src/common/util/trpc.client.ts +++ b/src/common/util/trpc.client.ts @@ -6,7 +6,7 @@ * * We also create a few inference helpers for input and output types. */ -import { createTRPCClient, httpBatchLink, httpLink, loggerLink } from '@trpc/client'; +import { createTRPCClient, httpLink, loggerLink } from '@trpc/client'; import { createTRPCNext } from '@trpc/next'; import type { AppRouterEdge } from '~/server/api/trpc.router-edge'; diff --git a/src/modules/llms/llm.client.ts b/src/modules/llms/llm.client.ts index eaf9b04b3..f4b9c589f 100644 --- a/src/modules/llms/llm.client.ts +++ b/src/modules/llms/llm.client.ts @@ -7,7 +7,7 @@ import type { GenerateContextNameSchema, ModelDescriptionSchema, StreamingContex import type { OpenAIWire } from './server/openai/openai.wiretypes'; import { DLLM, DLLMId, DModelSource, DModelSourceId, LLM_IF_OAI_Chat, LLM_IF_OAI_Fn, useModelsStore } from './store-llms'; import { FALLBACK_LLM_TEMPERATURE } from './vendors/openai/openai.vendor'; -import { StreamingClientUpdate, unifiedStreamingClient } from './vendors/unifiedStreamingClient'; +import { StreamingClientUpdate } from './vendors/unifiedStreamingClient'; import { findAccessForSourceOrThrow, findVendorForLlmOrThrow } from './vendors/vendors.registry';