From 7d8f8118865480f4b2b29c107b749422ab13c9b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20J=C3=A4gle?= Date: Thu, 21 Nov 2024 22:27:29 +0100 Subject: [PATCH] Fix linting issues --- app/components/chat/APIKeyManager.tsx | 1 + app/components/chat/BaseChat.tsx | 9 +++++--- app/components/sidebar/Menu.client.tsx | 1 - app/lib/.server/llm/api-key.ts | 3 ++- app/lib/.server/llm/model.ts | 28 ++++++++++++------------- app/lib/persistence/useChatHistory.ts | 1 + app/lib/runtime/action-runner.ts | 9 ++++---- app/lib/stores/workbench.ts | 4 ++-- app/utils/constants.ts | 23 +++++++++++--------- app/utils/shell.ts | 29 +++++++++++++++++--------- worker-configuration.d.ts | 3 +++ 11 files changed, 65 insertions(+), 46 deletions(-) diff --git a/app/components/chat/APIKeyManager.tsx b/app/components/chat/APIKeyManager.tsx index c61e466..28847bc 100644 --- a/app/components/chat/APIKeyManager.tsx +++ b/app/components/chat/APIKeyManager.tsx @@ -10,6 +10,7 @@ interface APIKeyManagerProps { labelForGetApiKey?: string; } +// eslint-disable-next-line @typescript-eslint/naming-convention export const APIKeyManager: React.FC = ({ provider, apiKey, setApiKey }) => { const [isEditing, setIsEditing] = useState(false); const [tempKey, setTempKey] = useState(apiKey); diff --git a/app/components/chat/BaseChat.tsx b/app/components/chat/BaseChat.tsx index c384138..b7792bf 100644 --- a/app/components/chat/BaseChat.tsx +++ b/app/components/chat/BaseChat.tsx @@ -9,7 +9,7 @@ import { Menu } from '~/components/sidebar/Menu.client'; import { IconButton } from '~/components/ui/IconButton'; import { Workbench } from '~/components/workbench/Workbench.client'; import { classNames } from '~/utils/classNames'; -import { MODEL_LIST, DEFAULT_PROVIDER, PROVIDER_LIST, initializeModelList } from '~/utils/constants'; +import { MODEL_LIST, PROVIDER_LIST, initializeModelList } from '~/utils/constants'; import { Messages } from './Messages.client'; import { SendButton } from './SendButton.client'; import { useState } from 'react'; @@ -27,22 +27,25 @@ const EXAMPLE_PROMPTS = [ { text: 'How do I center a div?' }, ]; +// eslint-disable-next-line @typescript-eslint/no-unused-vars const providerList = PROVIDER_LIST; +// @ts-ignore TODO: Introduce proper types +// eslint-disable-next-line @typescript-eslint/no-unused-vars const ModelSelector = ({ model, setModel, provider, setProvider, modelList, providerList, apiKeys }) => { return (