diff --git a/binary/package-lock.json b/binary/package-lock.json index 7ed2f9aea..39367be9a 100644 --- a/binary/package-lock.json +++ b/binary/package-lock.json @@ -48,7 +48,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.10", - "@continuedev/llm-info": "^1.0.1", + "@continuedev/llm-info": "^1.0.2", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", "@typescript-eslint/eslint-plugin": "^7.8.0", diff --git a/core/llm/index.ts b/core/llm/index.ts index d7d0c5425..ee70973b3 100644 --- a/core/llm/index.ts +++ b/core/llm/index.ts @@ -342,11 +342,11 @@ ${prompt}`; ) { if (resp.url.includes("codestral.mistral.ai")) { throw new Error( - `You are using a Mistral API key, which is not compatible with the Codestral API. Please either obtain a Codestral API key, or use the Mistral API by setting "apiBase" to "https://api.mistral.ai/v1" in config.json.`, + 'You are using a Mistral API key, which is not compatible with the Codestral API. Please either obtain a Codestral API key, or use the Mistral API by setting "apiBase" to "https://api.mistral.ai/v1" in config.json.', ); } else { throw new Error( - `You are using a Codestral API key, which is not compatible with the Mistral API. Please either obtain a Mistral API key, or use the the Codestral API by setting "apiBase" to "https://codestral.mistral.ai/v1" in config.json.`, + 'You are using a Codestral API key, which is not compatible with the Mistral API. Please either obtain a Mistral API key, or use the the Codestral API by setting "apiBase" to "https://codestral.mistral.ai/v1" in config.json.', ); } } diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 890c69954..94995c095 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.209", + "version": "0.9.211", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.209", + "version": "0.9.211", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", @@ -99,7 +99,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.10", - "@continuedev/llm-info": "^1.0.1", + "@continuedev/llm-info": "^1.0.2", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", "@typescript-eslint/eslint-plugin": "^7.8.0", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index d0088b9de..9277bd90e 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "0.9.210", + "version": "0.9.211", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" diff --git a/gui/package-lock.json b/gui/package-lock.json index 589d7578f..aa31ee27b 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -92,7 +92,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.10", - "@continuedev/llm-info": "^1.0.1", + "@continuedev/llm-info": "^1.0.2", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", "@typescript-eslint/eslint-plugin": "^7.8.0", diff --git a/gui/src/components/HeaderButtonWithText.tsx b/gui/src/components/HeaderButtonWithText.tsx index 9af9a4236..ab7af3b5a 100644 --- a/gui/src/components/HeaderButtonWithText.tsx +++ b/gui/src/components/HeaderButtonWithText.tsx @@ -1,9 +1,10 @@ import React, { useState } from "react"; import ReactDOM from "react-dom"; -import { HeaderButton, StyledTooltip } from "."; +import { HeaderButton } from "."; import { type PlacesType } from "react-tooltip"; import { v4 as uuidv4 } from "uuid"; +import { ToolTip } from "./gui/Tooltip"; interface HeaderButtonWithTextProps { text: string | undefined; @@ -59,12 +60,9 @@ const HeaderButtonWithText = React.forwardRef< {props.text && tooltipPortalDiv && ReactDOM.createPortal( - + {props.text} - , + , tooltipPortalDiv, )} diff --git a/gui/src/components/InfoHover.tsx b/gui/src/components/InfoHover.tsx index 57fbd99c0..1f71be91c 100644 --- a/gui/src/components/InfoHover.tsx +++ b/gui/src/components/InfoHover.tsx @@ -1,6 +1,6 @@ import { InformationCircleIcon } from "@heroicons/react/24/outline"; import ReactDOM from "react-dom"; -import { StyledTooltip } from "."; +import { ToolTip } from "./gui/Tooltip"; const InfoHover = ({ msg }: { msg: string }) => { const id = `info-hover-${encodeURIComponent(msg)}`; @@ -15,10 +15,10 @@ const InfoHover = ({ msg }: { msg: string }) => { /> {tooltipPortalDiv && ReactDOM.createPortal( - + {msg} - , - tooltipPortalDiv + , + tooltipPortalDiv, )} ); diff --git a/gui/src/components/OnboardingCard/OnboardingCard.tsx b/gui/src/components/OnboardingCard/OnboardingCard.tsx index 0dc00ad9d..251ff7b1c 100644 --- a/gui/src/components/OnboardingCard/OnboardingCard.tsx +++ b/gui/src/components/OnboardingCard/OnboardingCard.tsx @@ -1,5 +1,5 @@ import * as Tabs from "./tabs"; -import OnboardingCardTabs, { TabTitle } from "./components/OnboardingCardTabs"; +import { TabTitle, OnboardingCardTabs } from "./components/OnboardingCardTabs"; import { XMarkIcon } from "@heroicons/react/24/outline"; import styled from "styled-components"; import { CloseButton, defaultBorderRadius, vscInputBackground } from "../"; @@ -20,14 +20,9 @@ export interface OnboardingCardState { activeTab?: TabTitle; } -export const defaultOnboardingCardState: OnboardingCardState = { - show: false, - activeTab: "Quickstart", -}; - export type OnboardingCardProps = Pick; -function OnboardingCard(props: OnboardingCardProps) { +export function OnboardingCard(props: OnboardingCardProps) { const onboardingCard = useOnboardingCard(); function renderTabContent() { @@ -60,5 +55,3 @@ function OnboardingCard(props: OnboardingCardProps) { ); } - -export default OnboardingCard; diff --git a/gui/src/components/OnboardingCard/components/OllamaModelDownload.tsx b/gui/src/components/OnboardingCard/components/OllamaModelDownload.tsx index e9683a431..37831a70f 100644 --- a/gui/src/components/OnboardingCard/components/OllamaModelDownload.tsx +++ b/gui/src/components/OnboardingCard/components/OllamaModelDownload.tsx @@ -2,8 +2,9 @@ import { CommandLineIcon } from "@heroicons/react/24/outline"; import { useContext } from "react"; import { IdeMessengerContext } from "../../../context/IdeMessenger"; import ReactDOM from "react-dom"; -import { StyledActionButton, StyledTooltip } from "../.."; +import { StyledActionButton } from "../.."; import OllamaCompletedStep from "./OllamaCompletedStep"; +import { ToolTip } from "../../gui/Tooltip"; interface OllamaModelDownloadProps { title: string; @@ -39,9 +40,9 @@ function OllamaModelDownload({ {tooltipPortalDiv && ReactDOM.createPortal( - + Copy into terminal - , + , tooltipPortalDiv, )} diff --git a/gui/src/components/OnboardingCard/components/OllamaStatus.tsx b/gui/src/components/OnboardingCard/components/OllamaStatus.tsx index a6dcd89ad..546ddff5d 100644 --- a/gui/src/components/OnboardingCard/components/OllamaStatus.tsx +++ b/gui/src/components/OnboardingCard/components/OllamaStatus.tsx @@ -8,12 +8,7 @@ import { providers } from "../../../pages/AddNewModel/configs/providers"; import { useCheckOllamaModels } from "../hooks/useCheckOllamaModels"; import { StyledActionButton } from "../.."; import OllamaCompletedStep from "./OllamaCompletedStep"; - -export enum OllamaConnectionStatuses { - WaitingToDownload = "WaitingToDownload", - Downloading = "Downloading", - Verified = "Verified", -} +import { OllamaConnectionStatuses } from "../utils"; interface OllamaStatusProps { onConnectionVerified: () => void; @@ -23,7 +18,7 @@ const { ollama: { downloadUrl }, } = providers; -function OllamaStatus({ onConnectionVerified }: OllamaStatusProps) { +export function OllamaStatus({ onConnectionVerified }: OllamaStatusProps) { const ideMessenger = useContext(IdeMessengerContext); const [status, setStatus] = useState( @@ -63,5 +58,3 @@ function OllamaStatus({ onConnectionVerified }: OllamaStatusProps) { ); } } - -export default OllamaStatus; diff --git a/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx b/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx index c35f2aa52..7e7fcdcee 100644 --- a/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx +++ b/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx @@ -1,5 +1,5 @@ import styled from "styled-components"; -import { vscButtonBackground, vscForeground } from "../.."; +import { vscForeground } from "../.."; import { hasPassedFTL } from "../../../util/freeTrial"; interface OnboardingCardTabsProps { @@ -49,7 +49,7 @@ const TabList = styled.div` border-color: ${vscForeground}; `; -function OnboardingCardTabs({ +export function OnboardingCardTabs({ activeTab, onTabClick, }: OnboardingCardTabsProps) { @@ -74,5 +74,3 @@ function OnboardingCardTabs({ ); } - -export default OnboardingCardTabs; diff --git a/gui/src/components/OnboardingCard/index.ts b/gui/src/components/OnboardingCard/index.ts index ff4448f45..5a9a0c0d8 100644 --- a/gui/src/components/OnboardingCard/index.ts +++ b/gui/src/components/OnboardingCard/index.ts @@ -1,4 +1,3 @@ export * from "./OnboardingCard"; -export { default } from "./OnboardingCard"; export * from "./utils"; export * from "./hooks/useOnboardingCard"; diff --git a/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx b/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx index 653950a27..03d940163 100644 --- a/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx +++ b/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx @@ -12,7 +12,7 @@ import { setDefaultModel } from "../../../redux/slices/stateSlice"; import { hasPassedFTL } from "../../../util/freeTrial"; import AddModelButtonSubtext from "../../AddModelButtonSubtext"; import OllamaModelDownload from "../components/OllamaModelDownload"; -import OllamaStatus from "../components/OllamaStatus"; +import { OllamaStatus } from "../components/OllamaStatus"; import { useCheckOllamaModels, useSubmitOnboarding } from "../hooks"; function OnboardingLocalTab() { diff --git a/gui/src/components/OnboardingCard/utils.ts b/gui/src/components/OnboardingCard/utils.ts index 61e71626e..c54031eb5 100644 --- a/gui/src/components/OnboardingCard/utils.ts +++ b/gui/src/components/OnboardingCard/utils.ts @@ -1,4 +1,5 @@ import { getLocalStorage, setLocalStorage } from "../../util/localStorage"; +import { OnboardingCardState } from "./OnboardingCard"; // Note that there is no "NotStarted" status since the // local storage value is null until onboarding begins @@ -20,3 +21,14 @@ export function isNewUserOnboarding() { return onboardingStatus === undefined; } + +export const defaultOnboardingCardState: OnboardingCardState = { + show: false, + activeTab: "Quickstart", +}; + +export enum OllamaConnectionStatuses { + WaitingToDownload = "WaitingToDownload", + Downloading = "Downloading", + Verified = "Verified", +} diff --git a/gui/src/components/dialogs/KeyboardShortcuts.tsx b/gui/src/components/dialogs/KeyboardShortcuts.tsx index 84aede2a0..2a25f98f8 100644 --- a/gui/src/components/dialogs/KeyboardShortcuts.tsx +++ b/gui/src/components/dialogs/KeyboardShortcuts.tsx @@ -1,12 +1,8 @@ import ReactDOM from "react-dom"; import styled from "styled-components"; -import { - StyledTooltip, - defaultBorderRadius, - lightGray, - vscForeground, -} from ".."; +import { defaultBorderRadius, lightGray, vscForeground } from ".."; import { getPlatform, isJetBrains } from "../../util"; +import { ToolTip } from "../gui/Tooltip"; const GridDiv = styled.div` display: grid; @@ -51,9 +47,9 @@ function KeyDiv({ text }: { text: string }) { {tooltipPortalDiv && ReactDOM.createPortal( - + {keyToName[text]} - , + , tooltipPortalDiv, )} diff --git a/gui/src/components/gui/Tooltip.tsx b/gui/src/components/gui/Tooltip.tsx new file mode 100644 index 000000000..8eee71dba --- /dev/null +++ b/gui/src/components/gui/Tooltip.tsx @@ -0,0 +1,24 @@ +import { Tooltip } from "react-tooltip"; +import { vscInputBackground, vscBadgeBackground, vscForeground } from ".."; +import { getFontSize } from "../../util"; + +const TooltipStyles = { + fontSize: `${getFontSize() - 2}px`, + backgroundColor: vscInputBackground, + boxShadow: `0px 0px 2px 1px ${vscBadgeBackground}`, + color: vscForeground, + padding: "2px 6px", + zIndex: 1000, + maxWidth: "80vw", + textAlign: "center", + overflow: "hidden", +}; + +export function ToolTip(props: any) { + const combinedStyles = { + ...TooltipStyles, + ...props.style, + }; + + return ; +} diff --git a/gui/src/components/index.tsx b/gui/src/components/index.ts similarity index 95% rename from gui/src/components/index.tsx rename to gui/src/components/index.ts index d376f3dd5..5a5619b75 100644 --- a/gui/src/components/index.tsx +++ b/gui/src/components/index.ts @@ -1,4 +1,3 @@ -import { Tooltip } from "react-tooltip"; import styled, { keyframes } from "styled-components"; import { getFontSize, isJetBrains } from "../util"; @@ -197,27 +196,6 @@ export const CustomScrollbarDiv = styled.div` } `; -const TooltipStyles = { - fontSize: `${getFontSize() - 2}px`, - backgroundColor: vscInputBackground, - boxShadow: `0px 0px 2px 1px ${vscBadgeBackground}`, - color: vscForeground, - padding: "2px 6px", - zIndex: 1000, - maxWidth: "80vw", - textAlign: "center", - overflow: "hidden", -}; - -export function StyledTooltip(props: any) { - const combinedStyles = { - ...TooltipStyles, - ...props.style, // Merge any additional styles passed via props - }; - - return ; -} - export const TextArea = styled.textarea` padding: 8px; font-family: inherit; diff --git a/gui/src/components/loaders/ProgressBar.tsx b/gui/src/components/loaders/ProgressBar.tsx index d347999b7..285f3c6fe 100644 --- a/gui/src/components/loaders/ProgressBar.tsx +++ b/gui/src/components/loaders/ProgressBar.tsx @@ -3,7 +3,7 @@ import ReactDOM from "react-dom"; import { useDispatch } from "react-redux"; import { useNavigate } from "react-router-dom"; import styled from "styled-components"; -import { StyledTooltip, lightGray, vscForeground } from ".."; +import { lightGray, vscForeground } from ".."; import AddModelForm from "../../forms/AddModelForm"; import { setDialogMessage, @@ -11,6 +11,7 @@ import { } from "../../redux/slices/uiStateSlice"; import { getFontSize } from "../../util"; import { FREE_TRIAL_LIMIT_REQUESTS } from "../../util/freeTrial"; +import { ToolTip } from "../gui/Tooltip"; const ProgressBarWrapper = styled.div` width: 100px; @@ -71,9 +72,9 @@ const ProgressBar = ({ completed, total }: ProgressBarProps) => { {tooltipPortalDiv && ReactDOM.createPortal( - + Configure a model above in order to continue - , + , tooltipPortalDiv, )} @@ -117,9 +118,9 @@ const ProgressBar = ({ completed, total }: ProgressBarProps) => { {tooltipPortalDiv && ReactDOM.createPortal( - + {`Click to use your own API key or local LLM (required after ${FREE_TRIAL_LIMIT_REQUESTS} inputs)`} - , + , tooltipPortalDiv, )} diff --git a/gui/src/components/mainInput/CodeBlockComponent.tsx b/gui/src/components/mainInput/CodeBlockComponent.tsx new file mode 100644 index 000000000..3c0ba951f --- /dev/null +++ b/gui/src/components/mainInput/CodeBlockComponent.tsx @@ -0,0 +1,97 @@ +import { NodeViewWrapper } from "@tiptap/react"; +import { ContextItemWithId } from "core"; +import { useDispatch, useSelector } from "react-redux"; +import { vscBadgeBackground } from ".."; +import { setEditingContextItemAtIndex } from "../../redux/slices/stateSlice"; +import { RootState } from "../../redux/store"; +import CodeSnippetPreview from "../markdown/CodeSnippetPreview"; + +export const CodeBlockComponent = ({ + node, + deleteNode, + selected, + editor, + updateAttributes, +}: any) => { + const dispatch = useDispatch(); + const item: ContextItemWithId = node.attrs.item; + + const contextItems = useSelector( + (state: RootState) => state.state.contextItems, + ); + return ( + + { + deleteNode(); + }} + onEdit={async () => { + dispatch(setEditingContextItemAtIndex({ item })); + if (item.id === contextItems[0]?.id) { + // Find and delete the /edit command + let index = 0; + for (const el of editor.getJSON().content) { + if (el.type === "slashcommand") { + if (el.attrs.id === "/edit") { + editor + .chain() + .deleteRange({ from: index, to: index + 2 }) + .focus("end") + .run(); + break; + } + } + index += 1; + } + + updateAttributes({ + item: { + ...item, + editing: false, + }, + }); + } else { + let index = 0; + for (const el of editor.getJSON().content) { + if (el.type === "codeBlock") { + index += 2; + } else { + break; + } + } + editor + .chain() + .focus("end") + .insertContent([ + { + type: "slashcommand", + attrs: { id: "/edit", label: "/edit" }, + }, + { type: "text", text: " " }, + ]) + .run(); + + updateAttributes({ + item: { + ...item, + editing: true, + }, + }); + + await new Promise((resolve) => setTimeout(resolve, 100)); + editor.commands.focus("end"); + } + }} + editing={item.id === contextItems[0]?.id} + /> + + ); +}; diff --git a/gui/src/components/mainInput/CodeBlockExtension.tsx b/gui/src/components/mainInput/CodeBlockExtension.tsx index 4f9c670af..57be51893 100644 --- a/gui/src/components/mainInput/CodeBlockExtension.tsx +++ b/gui/src/components/mainInput/CodeBlockExtension.tsx @@ -1,103 +1,8 @@ import { mergeAttributes, Node } from "@tiptap/core"; -import { NodeViewWrapper, ReactNodeViewRenderer } from "@tiptap/react"; -import { ContextItemWithId } from "core"; -import { useDispatch, useSelector } from "react-redux"; -import { vscBadgeBackground } from ".."; -import { setEditingContextItemAtIndex } from "../../redux/slices/stateSlice"; -import { RootState } from "../../redux/store"; -import CodeSnippetPreview from "../markdown/CodeSnippetPreview"; +import { ReactNodeViewRenderer } from "@tiptap/react"; +import { CodeBlockComponent } from "./CodeBlockComponent"; -const CodeBlockComponent = ({ - node, - deleteNode, - selected, - editor, - updateAttributes, -}: any) => { - const dispatch = useDispatch(); - const item: ContextItemWithId = node.attrs.item; - - const contextItems = useSelector( - (state: RootState) => state.state.contextItems, - ); - return ( - - { - deleteNode(); - }} - onEdit={async () => { - dispatch(setEditingContextItemAtIndex({ item })); - if (item.id === contextItems[0]?.id) { - // Find and delete the /edit command - let index = 0; - for (const el of editor.getJSON().content) { - if (el.type === "slashcommand") { - if (el.attrs.id === "/edit") { - editor - .chain() - .deleteRange({ from: index, to: index + 2 }) - .focus("end") - .run(); - break; - } - } - index += 1; - } - - updateAttributes({ - item: { - ...item, - editing: false, - }, - }); - } else { - let index = 0; - for (const el of editor.getJSON().content) { - if (el.type === "codeBlock") { - index += 2; - } else { - break; - } - } - editor - .chain() - .focus("end") - .insertContent([ - { - type: "slashcommand", - attrs: { id: "/edit", label: "/edit" }, - }, - { type: "text", text: " " }, - ]) - .run(); - - updateAttributes({ - item: { - ...item, - editing: true, - }, - }); - - await new Promise((resolve) => setTimeout(resolve, 100)); - editor.commands.focus("end"); - } - }} - editing={item.id === contextItems[0]?.id} - /> - - ); -}; - -export default Node.create({ +export const CodeBlockExtension = Node.create({ name: "codeBlock", group: "block", diff --git a/gui/src/components/mainInput/InputToolbar.tsx b/gui/src/components/mainInput/InputToolbar.tsx index 7462c69cd..960baa999 100644 --- a/gui/src/components/mainInput/InputToolbar.tsx +++ b/gui/src/components/mainInput/InputToolbar.tsx @@ -202,7 +202,7 @@ function InputToolbar(props: InputToolbarProps) { }} className={"hover:underline cursor-pointer float-right"} > - {getMetaKeyLabel()} ⏎ Use codebase + {getMetaKeyLabel()} ⏎ Use @codebase )} ` opacity: 0.5; ` : props.hovered - ? ` + ? ` border: 1px solid ${props.color}; background-color: ${props.color}22; cursor: pointer;` - : ""} + : ""} `; const DimensionsDiv = styled.div` @@ -147,7 +148,9 @@ function ModelCard(props: ModelCardProps) {

{props.title}

- {props.tags?.map((tag, i) => )} + {props.tags?.map((tag, i) => ( + + ))}

{props.description}

diff --git a/gui/src/components/modelSelection/ModelProviderTag.tsx b/gui/src/components/modelSelection/ModelProviderTag.tsx index 11fbece42..0c0df5767 100644 --- a/gui/src/components/modelSelection/ModelProviderTag.tsx +++ b/gui/src/components/modelSelection/ModelProviderTag.tsx @@ -1,24 +1,11 @@ import { defaultBorderRadius } from ".."; - -export enum ModelProviderTags { - RequiresApiKey = "Requires API Key", - Local = "Local", - Free = "Free", - OpenSource = "Open-Source", -} +import { MODEL_PROVIDER_TAG_COLORS, ModelProviderTags } from "./utils"; export interface ModelProviderTagProps { tag: ModelProviderTags; } -export const MODEL_PROVIDER_TAG_COLORS = { - [ModelProviderTags.RequiresApiKey]: "#FF0000", - [ModelProviderTags.Local]: "#00bb00", - [ModelProviderTags.OpenSource]: "#0033FF", - [ModelProviderTags.Free]: "#ffff00", -}; - -export default function ModelProviderTag({ tag }: ModelProviderTagProps) { +export function ModelProviderTag({ tag }: ModelProviderTagProps) { return ( {option.title} -
+
{showDelete && ( diff --git a/gui/src/components/modelSelection/ModelSelectionListbox.tsx b/gui/src/components/modelSelection/ModelSelectionListbox.tsx index fd732d163..fcac2ce8b 100644 --- a/gui/src/components/modelSelection/ModelSelectionListbox.tsx +++ b/gui/src/components/modelSelection/ModelSelectionListbox.tsx @@ -111,7 +111,7 @@ function ModelSelectionListbox({ }: ModelSelectionListboxProps) { return ( -
+
{window.vscMediaUrl && selectedProvider.icon && ( @@ -160,7 +160,7 @@ function ModelSelectionListbox({ {option.title} {selected ? ( - + ) : null} diff --git a/gui/src/components/modelSelection/utils.ts b/gui/src/components/modelSelection/utils.ts new file mode 100644 index 000000000..f4a3ee8c8 --- /dev/null +++ b/gui/src/components/modelSelection/utils.ts @@ -0,0 +1,13 @@ +export enum ModelProviderTags { + RequiresApiKey = "Requires API Key", + Local = "Local", + Free = "Free", + OpenSource = "Open-Source", +} + +export const MODEL_PROVIDER_TAG_COLORS = { + [ModelProviderTags.RequiresApiKey]: "#FF0000", + [ModelProviderTags.Local]: "#00bb00", + [ModelProviderTags.OpenSource]: "#0033FF", + [ModelProviderTags.Free]: "#ffff00", +}; diff --git a/gui/src/forms/AddModelForm.tsx b/gui/src/forms/AddModelForm.tsx index ddb29799d..94aa0cf3b 100644 --- a/gui/src/forms/AddModelForm.tsx +++ b/gui/src/forms/AddModelForm.tsx @@ -177,7 +177,9 @@ function AddModelForm({ {selectedProvider.apiKeyUrl && (
<> - + { + packages: [models.llama31Chat].map((p) => { p.params.contextLength = 4096; return p; }), diff --git a/gui/src/pages/gui.tsx b/gui/src/pages/gui.tsx index 5f00d93e6..9b8b1d9b0 100644 --- a/gui/src/pages/gui.tsx +++ b/gui/src/pages/gui.tsx @@ -31,7 +31,8 @@ import TimelineItem from "../components/gui/TimelineItem"; import ContinueInputBox from "../components/mainInput/ContinueInputBox"; import { defaultInputModifiers } from "../components/mainInput/inputModifiers"; import { TutorialCard } from "../components/mainInput/TutorialCard"; -import OnboardingCard, { +import { + OnboardingCard, useOnboardingCard, } from "../components/OnboardingCard"; import { IdeMessengerContext } from "../context/IdeMessenger";