diff --git a/core/config/default.ts b/core/config/default.ts index 9d69f733d..fc52f24c3 100644 --- a/core/config/default.ts +++ b/core/config/default.ts @@ -22,6 +22,11 @@ const defaultConfig: SerializedContinueConfig = { provider: "free-trial", model: "gemini-pro", }, + { + title: "Codellama 70b (Free Trial)", + provider: "free-trial", + model: "codellama-70b", + }, ], slashCommands: [ { diff --git a/core/context/providers/FileTreeContextProvider.ts b/core/context/providers/FileTreeContextProvider.ts index 5b6c91150..6e8fe39f4 100644 --- a/core/context/providers/FileTreeContextProvider.ts +++ b/core/context/providers/FileTreeContextProvider.ts @@ -75,9 +75,9 @@ class FileTreeContextProvider extends BaseContextProvider { } currentTree.files.push(parts.pop()!); - - trees.push(formatFileTree(subDirTree)); } + + trees.push(formatFileTree(subDirTree)); } return [ diff --git a/core/context/retrieval.ts b/core/context/retrieval.ts index 3a405691f..3e72a74ec 100644 --- a/core/context/retrieval.ts +++ b/core/context/retrieval.ts @@ -151,6 +151,12 @@ export async function retrieveContextItemsFromEmbeddings( results = await rerank(results, extras.llm, extras.fullInput, nFinal); } + if (results.length === 0) { + throw new Error( + "Warning: No results found for @codebase context provider." + ); + } + return [ ...results.map((r) => { const name = `${getBasename(r.filepath)} (${r.startLine}-${r.endLine})`; diff --git a/core/index.d.ts b/core/index.d.ts index ffa22973e..4c00ad93e 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -437,6 +437,7 @@ export type ModelName = | "codellama-7b" | "codellama-13b" | "codellama-34b" + | "codellama-70b" | "phi2" | "phind-codellama-34b" | "wizardcoder-7b" diff --git a/core/llm/index.ts b/core/llm/index.ts index a38752df8..b60f0f240 100644 --- a/core/llm/index.ts +++ b/core/llm/index.ts @@ -92,6 +92,10 @@ export function modelSupportsImages( function autodetectTemplateType(model: string): TemplateType | undefined { const lower = model.toLowerCase(); + if (lower === "codellama-70b") { + return "none"; + } + if ( lower.includes("gpt") || lower.includes("chat-bison") || diff --git a/core/llm/llms/FreeTrial.ts b/core/llm/llms/FreeTrial.ts index 1ceb3084a..e8400830b 100644 --- a/core/llm/llms/FreeTrial.ts +++ b/core/llm/llms/FreeTrial.ts @@ -3,7 +3,7 @@ import { ChatMessage, CompletionOptions, ModelProvider } from "../.."; import { streamResponse } from "../stream"; // const SERVER_URL = "http://localhost:3000"; -const SERVER_URL = "https://node-proxy-server-green-l6vsfbzhba-uw.a.run.app"; +const SERVER_URL = "https://node-proxy-server-blue-l6vsfbzhba-uw.a.run.app"; class FreeTrial extends BaseLLM { static providerName: ModelProvider = "free-trial"; diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index 57817c049..91103e175 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -67,6 +67,7 @@ class Ollama extends BaseLLM { "codellama-7b": "codellama:7b", "codellama-13b": "codellama:13b", "codellama-34b": "codellama:34b", + "codellama-70b": "codellama:70b", "phi-2": "phi:2.7b", "phind-codellama-34b": "phind-codellama:34b-v2", "wizardcoder-7b": "wizardcoder:7b-python", diff --git a/core/llm/llms/Together.ts b/core/llm/llms/Together.ts index 5976b9575..4ac82c880 100644 --- a/core/llm/llms/Together.ts +++ b/core/llm/llms/Together.ts @@ -12,6 +12,7 @@ class Together extends BaseLLM { "codellama-7b": "togethercomputer/CodeLlama-7b-Instruct", "codellama-13b": "togethercomputer/CodeLlama-13b-Instruct", "codellama-34b": "togethercomputer/CodeLlama-34b-Instruct", + "codellama-70b": "codellama/CodeLlama-70b-Python-hf", "llama2-7b": "togethercomputer/llama-2-7b-chat", "llama2-13b": "togethercomputer/llama-2-13b-chat", "llama2-70b": "togethercomputer/llama-2-70b-chat", diff --git a/docs/static/schemas/config.json b/docs/static/schemas/config.json index b10e58e69..9976e7abd 100644 --- a/docs/static/schemas/config.json +++ b/docs/static/schemas/config.json @@ -386,7 +386,8 @@ "gpt-4", "phind-codellama-34b", "gemini-pro", - "gpt-4-vision-preview" + "gpt-4-vision-preview", + "codellama-70b" ] } } @@ -426,6 +427,7 @@ "codellama-7b", "codellama-13b", "codellama-34b", + "codellama-70b", "phind-codellama-34b", "wizardcoder-7b", "wizardcoder-13b", @@ -503,6 +505,7 @@ "codellama-7b", "codellama-13b", "codellama-34b", + "codellama-70b", "phind-codellama-34b" ] }, @@ -558,6 +561,7 @@ "codellama-7b", "codellama-13b", "codellama-34b", + "codellama-70b", "phind-codellama-34b", "wizardcoder-7b", "wizardcoder-13b", @@ -597,6 +601,7 @@ "codellama-7b", "codellama-13b", "codellama-34b", + "codellama-70b", "phi-2", "phind-codellama-34b", "wizardcoder-7b", @@ -772,6 +777,7 @@ "codellama-7b", "codellama-13b", "codellama-34b", + "codellama-70b", "phind-codellama-34b", "wizardcoder-7b", "wizardcoder-13b", @@ -961,7 +967,8 @@ "codebase", "problems", "folder", - "issue" + "issue", + "tree" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", @@ -974,7 +981,8 @@ "Reference all linting errors and warnings in the currently open file", "Include important files from a folder in the prompt, as determined by similarity search", "Reference GitHub issues from a repository", - "Retrieve important pages from a documentation website, as determined by similarity search" + "Retrieve important pages from a documentation website, as determined by similarity search", + "Display a file tree of the current workspace" ], "type": "string" }, diff --git a/extensions/intellij/src/main/resources/webview/index.html b/extensions/intellij/src/main/resources/webview/index.html index 5f6818c14..5f2db045f 100644 --- a/extensions/intellij/src/main/resources/webview/index.html +++ b/extensions/intellij/src/main/resources/webview/index.html @@ -1,4 +1,4 @@ - + @@ -7,17 +7,6 @@ Continue - - - - -
diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index b10e58e69..9976e7abd 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -386,7 +386,8 @@ "gpt-4", "phind-codellama-34b", "gemini-pro", - "gpt-4-vision-preview" + "gpt-4-vision-preview", + "codellama-70b" ] } } @@ -426,6 +427,7 @@ "codellama-7b", "codellama-13b", "codellama-34b", + "codellama-70b", "phind-codellama-34b", "wizardcoder-7b", "wizardcoder-13b", @@ -503,6 +505,7 @@ "codellama-7b", "codellama-13b", "codellama-34b", + "codellama-70b", "phind-codellama-34b" ] }, @@ -558,6 +561,7 @@ "codellama-7b", "codellama-13b", "codellama-34b", + "codellama-70b", "phind-codellama-34b", "wizardcoder-7b", "wizardcoder-13b", @@ -597,6 +601,7 @@ "codellama-7b", "codellama-13b", "codellama-34b", + "codellama-70b", "phi-2", "phind-codellama-34b", "wizardcoder-7b", @@ -772,6 +777,7 @@ "codellama-7b", "codellama-13b", "codellama-34b", + "codellama-70b", "phind-codellama-34b", "wizardcoder-7b", "wizardcoder-13b", @@ -961,7 +967,8 @@ "codebase", "problems", "folder", - "issue" + "issue", + "tree" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", @@ -974,7 +981,8 @@ "Reference all linting errors and warnings in the currently open file", "Include important files from a folder in the prompt, as determined by similarity search", "Reference GitHub issues from a repository", - "Retrieve important pages from a documentation website, as determined by similarity search" + "Retrieve important pages from a documentation website, as determined by similarity search", + "Display a file tree of the current workspace" ], "type": "string" }, diff --git a/extensions/vscode/media/Lexend/Lexend-VariableFont_wght.ttf b/extensions/vscode/media/Lexend/Lexend-VariableFont_wght.ttf deleted file mode 100644 index b294dc840..000000000 Binary files a/extensions/vscode/media/Lexend/Lexend-VariableFont_wght.ttf and /dev/null differ diff --git a/extensions/vscode/media/Lexend/OFL.txt b/extensions/vscode/media/Lexend/OFL.txt deleted file mode 100644 index 6b6792485..000000000 --- a/extensions/vscode/media/Lexend/OFL.txt +++ /dev/null @@ -1,93 +0,0 @@ -Copyright 2018 The Lexend Project Authors (https://github.com/googlefonts/lexend), with Reserved Font Name “RevReading Lexend”. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/extensions/vscode/media/Lexend/README.txt b/extensions/vscode/media/Lexend/README.txt deleted file mode 100644 index f2966dfed..000000000 --- a/extensions/vscode/media/Lexend/README.txt +++ /dev/null @@ -1,71 +0,0 @@ -Lexend Variable Font -==================== - -This download contains Lexend as both a variable font and static fonts. - -Lexend is a variable font with this axis: - wght - -This means all the styles are contained in a single file: - Lexend-VariableFont_wght.ttf - -If your app fully supports variable fonts, you can now pick intermediate styles -that aren’t available as static fonts. Not all apps support variable fonts, and -in those cases you can use the static font files for Lexend: - static/Lexend-Thin.ttf - static/Lexend-ExtraLight.ttf - static/Lexend-Light.ttf - static/Lexend-Regular.ttf - static/Lexend-Medium.ttf - static/Lexend-SemiBold.ttf - static/Lexend-Bold.ttf - static/Lexend-ExtraBold.ttf - static/Lexend-Black.ttf - -Get started ------------ - -1. Install the font files you want to use - -2. Use your app's font picker to view the font family and all the -available styles - -Learn more about variable fonts -------------------------------- - - https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts - https://variablefonts.typenetwork.com - https://medium.com/variable-fonts - -In desktop apps - - https://theblog.adobe.com/can-variable-fonts-illustrator-cc - https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts - -Online - - https://developers.google.com/fonts/docs/getting_started - https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide - https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts - -Installing fonts - - MacOS: https://support.apple.com/en-us/HT201749 - Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux - Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows - -Android Apps - - https://developers.google.com/fonts/docs/android - https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts - -License -------- -Please read the full license text (OFL.txt) to understand the permissions, -restrictions and requirements for usage, redistribution, and modification. - -You can use them in your products & projects – print or digital, -commercial or otherwise. - -This isn't legal advice, please consider consulting a lawyer and see the full -license for all details. diff --git a/extensions/vscode/media/Lexend/static/Lexend-Black.ttf b/extensions/vscode/media/Lexend/static/Lexend-Black.ttf deleted file mode 100644 index 2fea087c2..000000000 Binary files a/extensions/vscode/media/Lexend/static/Lexend-Black.ttf and /dev/null differ diff --git a/extensions/vscode/media/Lexend/static/Lexend-Bold.ttf b/extensions/vscode/media/Lexend/static/Lexend-Bold.ttf deleted file mode 100644 index 95884f6e5..000000000 Binary files a/extensions/vscode/media/Lexend/static/Lexend-Bold.ttf and /dev/null differ diff --git a/extensions/vscode/media/Lexend/static/Lexend-ExtraBold.ttf b/extensions/vscode/media/Lexend/static/Lexend-ExtraBold.ttf deleted file mode 100644 index 02f84ed31..000000000 Binary files a/extensions/vscode/media/Lexend/static/Lexend-ExtraBold.ttf and /dev/null differ diff --git a/extensions/vscode/media/Lexend/static/Lexend-ExtraLight.ttf b/extensions/vscode/media/Lexend/static/Lexend-ExtraLight.ttf deleted file mode 100644 index 20e7068d0..000000000 Binary files a/extensions/vscode/media/Lexend/static/Lexend-ExtraLight.ttf and /dev/null differ diff --git a/extensions/vscode/media/Lexend/static/Lexend-Light.ttf b/extensions/vscode/media/Lexend/static/Lexend-Light.ttf deleted file mode 100644 index fb6d097ce..000000000 Binary files a/extensions/vscode/media/Lexend/static/Lexend-Light.ttf and /dev/null differ diff --git a/extensions/vscode/media/Lexend/static/Lexend-Medium.ttf b/extensions/vscode/media/Lexend/static/Lexend-Medium.ttf deleted file mode 100644 index d91a86735..000000000 Binary files a/extensions/vscode/media/Lexend/static/Lexend-Medium.ttf and /dev/null differ diff --git a/extensions/vscode/media/Lexend/static/Lexend-Regular.ttf b/extensions/vscode/media/Lexend/static/Lexend-Regular.ttf deleted file mode 100644 index b423d3ab7..000000000 Binary files a/extensions/vscode/media/Lexend/static/Lexend-Regular.ttf and /dev/null differ diff --git a/extensions/vscode/media/Lexend/static/Lexend-SemiBold.ttf b/extensions/vscode/media/Lexend/static/Lexend-SemiBold.ttf deleted file mode 100644 index 9dcb82141..000000000 Binary files a/extensions/vscode/media/Lexend/static/Lexend-SemiBold.ttf and /dev/null differ diff --git a/extensions/vscode/media/Lexend/static/Lexend-Thin.ttf b/extensions/vscode/media/Lexend/static/Lexend-Thin.ttf deleted file mode 100644 index 0d7df8813..000000000 Binary files a/extensions/vscode/media/Lexend/static/Lexend-Thin.ttf and /dev/null differ diff --git a/extensions/vscode/src/debugPanel.ts b/extensions/vscode/src/debugPanel.ts index bb00e42ed..95d7180af 100644 --- a/extensions/vscode/src/debugPanel.ts +++ b/extensions/vscode/src/debugPanel.ts @@ -786,11 +786,6 @@ export function getSidebarContent( - - - - - Continue diff --git a/gui/src/components/index.ts b/gui/src/components/index.ts index 7b43e9647..911407755 100644 --- a/gui/src/components/index.ts +++ b/gui/src/components/index.ts @@ -80,7 +80,6 @@ export function parseColorForHex(colorVar: string): string { colorVar ); if (value.startsWith("#")) { - console.log("value", value); return value.slice(0, 7); } diff --git a/gui/src/components/mainInput/ContinueButton.tsx b/gui/src/components/mainInput/ContinueButton.tsx index 98b44e12d..e865f7df6 100644 --- a/gui/src/components/mainInput/ContinueButton.tsx +++ b/gui/src/components/mainInput/ContinueButton.tsx @@ -1,10 +1,7 @@ -import styled from "styled-components"; -import { Button, vscBackground } from ".."; import { PlayIcon, StopIcon } from "@heroicons/react/24/outline"; -import { useSelector } from "react-redux"; -import { RootStore } from "../../redux/store"; import { useEffect, useState } from "react"; -import { getPlatform } from "../../util"; +import styled from "styled-components"; +import { Button } from ".."; const StyledButton = styled(Button)<{ color?: string | null; @@ -72,7 +69,7 @@ function ContinueButton(props: { color={buttonColor as any} hidden={props.hidden} style={{ fontSize: "10px" }} - className="m-auto press-start-2p" + className="m-auto" onClick={props.disabled ? undefined : props.onClick} isDisabled={props.disabled} > diff --git a/gui/src/hooks/useSubmenuContextProviders.tsx b/gui/src/hooks/useSubmenuContextProviders.tsx index d7f5d8cab..c059f6ee2 100644 --- a/gui/src/hooks/useSubmenuContextProviders.tsx +++ b/gui/src/hooks/useSubmenuContextProviders.tsx @@ -69,7 +69,6 @@ function useSubmenuContextProviders() { } setLoaded(true); contextProviderDescriptions.forEach(async (description) => { - console.log("Loading submenu provider", description.title); const minisearch = new MiniSearch({ fields: ["title"], storeFields: ["id", "title", "description"], diff --git a/gui/src/index.css b/gui/src/index.css index 37ace642a..8511531f3 100644 --- a/gui/src/index.css +++ b/gui/src/index.css @@ -41,10 +41,6 @@ body { height: 100%; } -.press-start-2p { - font-family: "Press Start 2P", sans-serif; -} - a:focus { outline: none; } diff --git a/gui/src/util/modelData.ts b/gui/src/util/modelData.ts index 67416d363..934ccc849 100644 --- a/gui/src/util/modelData.ts +++ b/gui/src/util/modelData.ts @@ -193,12 +193,30 @@ const codeLlamaInstruct: ModelPackage = { model: "codellama-34b", title: "CodeLlama-34b", }, + "70b": { + model: "codellama-70b", + title: "Codellama-70b", + }, }, }, ], providerOptions: ["ollama", "lmstudio", "together", "llamacpp", "replicate"], }; +const codellama70bTrial: ModelPackage = { + title: "Codellama 70b (Free Trial)", + description: + "The best code model from Meta, fine-tuned for code generation and conversation", + refUrl: "", + params: { + title: "CodeLlama-70b", + model: "codellama-70b", + contextLength: 4096, + }, + icon: "meta.png", + providerOptions: ["freetrial"], +}; + const llama2Chat: ModelPackage = { title: "Llama2 Chat", description: "The latest Llama model from Meta, fine-tuned for chat", @@ -293,8 +311,8 @@ const mistral: ModelPackage = { description: "The number of parameters in the model", options: { "7b": { - model: "wizardcoder-7b", - title: "WizardCoder-7b", + model: "mistral-7b", + title: "Mistral-7b", }, "8x7b (MoE)": { model: "mistral-8x7b", @@ -520,6 +538,7 @@ export const MODEL_INFO: ModelPackage[] = [ gemini, claude2, mistral, + codellama70bTrial, codeLlamaInstruct, llama2Chat, wizardCoder, @@ -803,6 +822,7 @@ After it's up and running, you can start using Continue.`, icon: "openai.png", tags: [ModelProviderTag.Free], packages: [ + codellama70bTrial, { ...gpt4, title: "GPT-4 (trial)" }, { ...gpt35turbo, title: "GPT-3.5-Turbo (trial)" }, { ...gpt4vision, title: "GPT-4 Vision (trial)" },