From 772d06e217de81828874070b74577e24e02c8479 Mon Sep 17 00:00:00 2001 From: Nate Sesti <33237525+sestinj@users.noreply.github.com> Date: Tue, 2 Jul 2024 19:29:29 -0700 Subject: [PATCH 001/122] Preview (#1644) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add Msty provider * fix: add Msty logo * Update docs/docs/walkthroughs/codellama.md Co-authored-by: tgaff * Update docs/static/schemas/config.json Co-authored-by: tgaff * Update docs/static/schemas/config.json Co-authored-by: tgaff * Update gui/src/util/modelData.ts Co-authored-by: tgaff * CON-991-a accept/reject all working here * CON-991-a: Everything working * Testing completed * Add setting to pause Continue, when laptop do not connected to AC * 🔋 Workaround for full battery The `systeminformation` can return false for `BatteryData.acConnected` and `BatteryData.isCharging`, when battery charged to 100% * update main.yaml * better refactoring and error handling for indexing * update jetbrains build scripts * update package.json version * update version * run on macos-latest * button to skip onboarding * docs about rerankers [skip ci] * fileExists in IDE protocol * fixed source retrial when only a line instead of a scope is given (#1545) * ignoreFocusOut on input box * fix: preserve indentation in code blocks (#1554) * fix: autocomplete label after selecting a query type context provider (#1562) * fix: autocomplete label after selecting a query type context * fix: resolved issue causing unintentional changes to editor * Add support for Azure OpenAI Endpoint in OpenAIEmbeddingProvider (#1517) * add method_declaration for java * ✏️ fix typo * update docs with VSCode API example (#1476) * add vscode api docs * update func ref * fix typo * update config_schema * merge pause with new quick pick * dev (#1542) * docs: add docs and schema for "OS" provider (#1536) * ignore .env * fix(gui): ctx rendering w/ renderInlineAs: "" (#1541) * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * fix codeqwen autocomplete leading space * add voyage rerank-1 * feat: `--noEmit` for tsc checks in CI (#1559) * docs: update CustomContextProvider docs (#1557) * add stop tokens to qwen prompt * update docs to reflect 3.5 sonnet being best * docs: comment out unused providers (#1561) * import Handlebars * feat: toast notification for config updates (#1560) * feat: toast notification for config updates * feat: only trigger toast on config.json save * displayRawMarkdown option * feat: open pane on install (#1564) * feat: open pane on activation * comment out testing code * update to reflect 16 stop words limit for deepseek * feat: only trigger config update toast in vscode (#1571) * docs(prompt-files): fix typos + clarify (#1575) * doc: prompt file typo + clarifications * fix: add back correct docs * chore: add telemetry for pageviews (#1576) * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * docs(telemetry): add pageviews to tracking list (#1581) * Add reranker configuration options to codebase embedding docs (#1584) - Introduce reranker concept - List available reranker options - Provide configuration instructions - Update keywords to include "reranker" * chore: update pr template with screenshots (#1590) * Refactor ConfirmationDialog to use SecondaryButton for cancel action (#1586) * Added instructions for running docs server locally (#1578) - Added NPM script method - Added VS Code task method - Update contributing guidelines * Update branch policy (#1577) - Change PR target to `dev` branch - Update `CONTRIBUTING.md` instructions * Consolidate example configurations into the main configuration guide (#1579) - Moved examples to configuration.md - Deleted the separate examples.md file - Updated sidebar order and links - Improved readability and structure in configuration.md * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * Update completionProvider.ts (warning tab-autocomplete models) (#1566) * feat: enhanced IndexingProgressBar with blinking dot feature - Integrated BlinkingDot component - Added STATUS_COLORS for various states - Replaced CircleDiv with BlinkingDot in UI - Updated status messages and layout * small UI tweaks * feat(gui): enhance ModelCard, ModelProviderTag, and Toggle components (#1595) - add styling and adjustments to ModelCard - update ModelProviderTag font size - remove box shadow from Toggle component - tweak icon styles in ModelCard - improve alignment and spacing * media query * feat: add best experience onboarding * fix: file rename * stop movement on button hover by keeping same border thickness * fix mistake in setting cursor: pointer * fix when free trial option is shown * Support Node.js versions below 20 for streaming response handling (#1591) - Add fallback for Node < 20 - Implement toAsyncIterable for streaming - Use TextDecoder for manual decoding - Maintain existing streaming for Node 20+ * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * fix hasPassedFTL * fix /edit cancellation from UI * feat: add `applyCodeBlock` experimental prop (#1601) * feat: add new model styling improvements (#1609) * feat: add new model styling improvements * better gap size * feat: update bug_report.yml (#1610) * chore: update bug_report.yml * typo fix * feat: add labels to "Add docs" dialog (#1612) * feat: add labels to "Add docs" dialog * remove autofocus * don't double load config * small fixes * speed up directory traversal, and use correct native path module * option not to show config update toast * merge air-gapped and recommended setup pages * chore: add telemetry for full screen toggle (#1618) * Fix headings in codebase-embeddings.md (#1617) * mention jetbrains * docs: update changie (#1619) * feat: updated changie config * hide toc and autogenerate * Update changelog.mdx * link to deeper explanation of embeddings models * ensure target="_blank" for all links in sidebar * fix gif links in intellij README.md * don't require rust in dependency installation * chore: fix padding on gh button (#1620) * chore: adjust button padding * Update tasks.json * escape colons in diff path * smoother lancedb indexing reporting * smooth progress updates for indexing * fix tsc err * rerank-lite-1 --------- Co-authored-by: Patrick Erichsen Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> Co-authored-by: Jonah Wagner Co-authored-by: YohannZe <99359799+YohannZe@users.noreply.github.com> Co-authored-by: Dan Dascalescu * update package.json version * Dev (#1627) * docs: add docs and schema for "OS" provider (#1536) * ignore .env * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * add voyage rerank-1 * import Handlebars * feat: open pane on install (#1564) * feat: open pane on activation * comment out testing code * chore: add telemetry for pageviews (#1576) * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * small UI tweaks * media query * feat: add best experience onboarding * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * chore: add telemetry for full screen toggle (#1618) * rerank-lite-1 * remove doccs * basic tests for VS Code extension * improved testing of VS Code extension * manually implement stop tokens for hf inference api * chore: onboarding metrics (#1626) * fix: pageview tracking * feat: add onboarding telemetry * create single `onboardingStatus` type * improved var naming * remove console logs * fix windows performance issue * rename vscodeExtension.ts * migration of onboarding variables --------- Co-authored-by: Patrick Erichsen Co-authored-by: Jonah Wagner * Dev (#1629) * docs: add docs and schema for "OS" provider (#1536) * ignore .env * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * add voyage rerank-1 * import Handlebars * feat: open pane on install (#1564) * feat: open pane on activation * comment out testing code * chore: add telemetry for pageviews (#1576) * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * small UI tweaks * media query * feat: add best experience onboarding * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * chore: add telemetry for full screen toggle (#1618) * rerank-lite-1 * remove doccs * basic tests for VS Code extension * improved testing of VS Code extension * manually implement stop tokens for hf inference api * chore: onboarding metrics (#1626) * fix: pageview tracking * feat: add onboarding telemetry * create single `onboardingStatus` type * improved var naming * remove console logs * fix windows performance issue * rename vscodeExtension.ts * migration of onboarding variables * "stash" instead of "delete" in indexing progress * fix preview.yaml * also fix main.yaml --------- Co-authored-by: Patrick Erichsen Co-authored-by: Jonah Wagner * skip tests on linux * upgrade package.json version * skip new tests for now * Dev (#1643) * docs: add docs and schema for "OS" provider (#1536) * ignore .env * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * add voyage rerank-1 * import Handlebars * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * small UI tweaks * media query * feat: add best experience onboarding * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * chore: add telemetry for full screen toggle (#1618) * rerank-lite-1 * basic tests for VS Code extension * chore: onboarding metrics (#1626) * fix: pageview tracking * feat: add onboarding telemetry * create single `onboardingStatus` type * improved var naming * remove console logs * fix double adding of context providers * fix cross-platform build validation * Update troubleshooting.md (#1637) * add back skip onboarding button * fix free trial embeddings error * Nate/indexing fixes (#1642) * fix pausing of indexing * don't send empty array to openai embeddings * catch embeddings errors without stopping entire indexing process * update version --------- Co-authored-by: Patrick Erichsen Co-authored-by: Jonah Wagner * changelog (#1645) * docs: add docs and schema for "OS" provider (#1536) * ignore .env * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * add voyage rerank-1 * import Handlebars * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * small UI tweaks * media query * feat: add best experience onboarding * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * chore: add telemetry for full screen toggle (#1618) * rerank-lite-1 * basic tests for VS Code extension * chore: onboarding metrics (#1626) * fix: pageview tracking * feat: add onboarding telemetry * create single `onboardingStatus` type * improved var naming * remove console logs * fix double adding of context providers * fix cross-platform build validation * Update troubleshooting.md (#1637) * add back skip onboarding button * fix free trial embeddings error * Nate/indexing fixes (#1642) * fix pausing of indexing * don't send empty array to openai embeddings * catch embeddings errors without stopping entire indexing process * update version * changelog --------- Co-authored-by: Patrick Erichsen Co-authored-by: Jonah Wagner * update version --------- Co-authored-by: Ashok Gelal Co-authored-by: Ashok Gelal <401055+ashokgelal@users.noreply.github.com> Co-authored-by: tgaff Co-authored-by: Justin Milner Co-authored-by: SR_team Co-authored-by: null Co-authored-by: Jonah Wagner Co-authored-by: Andrij David Co-authored-by: Adam Shedivy <50843283+ajshedivy@users.noreply.github.com> Co-authored-by: Patrick Erichsen Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> Co-authored-by: YohannZe <99359799+YohannZe@users.noreply.github.com> Co-authored-by: Dan Dascalescu --- core/util/filesystem.ts | 10 ++++++ core/util/treeSitter.ts | 8 +++-- extensions/vscode/.continueignore | 2 +- extensions/vscode/package.json | 5 +++ extensions/vscode/src/commands.ts | 5 ++- .../vscode/src/extension/VsCodeExtension.ts | 1 - gui/src/components/loaders/BlinkingDot.tsx | 34 +++++++++++++++++++ 7 files changed, 57 insertions(+), 8 deletions(-) create mode 100644 gui/src/components/loaders/BlinkingDot.tsx diff --git a/core/util/filesystem.ts b/core/util/filesystem.ts index b9d35cdb9..87d36ea0a 100644 --- a/core/util/filesystem.ts +++ b/core/util/filesystem.ts @@ -25,6 +25,16 @@ class FileSystemIde implements IDE { return Promise.resolve(fs.existsSync(filepath)); } + gotoDefinition(location: Location): Promise { + throw new Error("Method not implemented."); + } + onDidChangeActiveTextEditor(callback: (filepath: string) => void): void { + throw new Error("Method not implemented."); + } + fileExists(filepath: string): Promise { + return Promise.resolve(fs.existsSync(filepath)); + } + gotoDefinition(location: Location): Promise { throw new Error("Method not implemented."); } diff --git a/core/util/treeSitter.ts b/core/util/treeSitter.ts index cff56a21c..428c90d94 100644 --- a/core/util/treeSitter.ts +++ b/core/util/treeSitter.ts @@ -111,8 +111,8 @@ export async function getLanguageForFile( } let language = nameToLanguage.get(languageName); if (!language) { - language = await loadLanguageForFileExt(extension); - nameToLanguage.set(languageName, language); + language = await loadLanguageForFileExt(extension); + nameToLanguage.set(languageName, language); } return language; } catch (e) { @@ -152,7 +152,9 @@ export async function getQueryForFile( return query; } -async function loadLanguageForFileExt(fileExtension: string): Promise { +async function loadLanguageForFileExt( + fileExtension: string, +): Promise { const wasmPath = path.join( __dirname, ...(process.env.NODE_ENV === "test" diff --git a/extensions/vscode/.continueignore b/extensions/vscode/.continueignore index 2a5d96ea4..7f9f9b9cd 100644 --- a/extensions/vscode/.continueignore +++ b/extensions/vscode/.continueignore @@ -3,4 +3,4 @@ media models/**/* builtin-themes/ **/textmate-syntaxes/ -**/*.scm \ No newline at end of file +**/*.scm diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 6a742115e..0e9ce7968 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -94,6 +94,11 @@ "default": false, "markdownDescription": "Pause Continue's tab autocomplete feature when your battery is low." }, + "continue.pauseTabAutocompleteOnBattery": { + "type": "boolean", + "default": false, + "markdownDescription": "Pause Continue's tab autocomplete feature when your battery is low." + }, "continue.remoteConfigServerUrl": { "type": "string", "default": null, diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index 226f5ed4e..f2cb1e80b 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -91,7 +91,6 @@ async function addHighlightedCodeToContext( if (selection.isEmpty) { return; } - // adjust starting position to include indentation const start = new vscode.Position(selection.start.line, 0); const range = new vscode.Range(start, selection.end); @@ -588,8 +587,8 @@ const commandsMap: ( currentStatus === StatusBarStatus.Paused ? StatusBarStatus.Enabled : currentStatus === StatusBarStatus.Disabled - ? StatusBarStatus.Paused - : StatusBarStatus.Disabled; + ? StatusBarStatus.Paused + : StatusBarStatus.Disabled; } else { // Toggle between Disabled and Enabled targetStatus = diff --git a/extensions/vscode/src/extension/VsCodeExtension.ts b/extensions/vscode/src/extension/VsCodeExtension.ts index 557f6b17d..c25ff36be 100644 --- a/extensions/vscode/src/extension/VsCodeExtension.ts +++ b/extensions/vscode/src/extension/VsCodeExtension.ts @@ -25,7 +25,6 @@ import { Battery } from "../util/battery"; import { TabAutocompleteModel } from "../util/loadAutocompleteModel"; import type { VsCodeWebviewProtocol } from "../webviewProtocol"; import { VsCodeMessenger } from "./VsCodeMessenger"; -import { CONTINUE_WORKSPACE_KEY } from "../util/workspaceConfig"; export class VsCodeExtension { // Currently some of these are public so they can be used in testing (test/test-suites) diff --git a/gui/src/components/loaders/BlinkingDot.tsx b/gui/src/components/loaders/BlinkingDot.tsx new file mode 100644 index 000000000..db8feb5a5 --- /dev/null +++ b/gui/src/components/loaders/BlinkingDot.tsx @@ -0,0 +1,34 @@ +import styled, { css, keyframes } from "styled-components"; + +const DEFAULT_DIAMETER = 6; + +const blink = keyframes` + 0%, 100% { + transform: scale(1); + opacity: 1; + } + 50% { + opacity: 0.25; + } +`; + +const blinkAnimation = css` + animation: ${blink} 3s infinite; +`; + +const BlinkingDot = styled.div<{ + color: string; + diameter?: number; + shouldBlink?: boolean; +}>` + background-color: ${(props) => props.color}; + box-shadow: 0px 0px 2px 1px ${(props) => props.color}; + width: ${(props) => props.diameter ?? DEFAULT_DIAMETER}px; + height: ${(props) => props.diameter ?? DEFAULT_DIAMETER}px; + border-radius: 50%; + border: 1px solid rgba(255, 255, 255, 0.75); + margin: 0 2px; + ${(props) => (props.shouldBlink ?? false) && blinkAnimation}; +`; + +export default BlinkingDot; From 4870887de5331cfd82a40e0678db94b6004f6dd9 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 2 Jul 2024 19:30:34 -0700 Subject: [PATCH 002/122] =?UTF-8?q?=F0=9F=94=96=20update=20package.json=20?= =?UTF-8?q?version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 0e9ce7968..f9864c60f 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.9.178", + "version": "0.8.41", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From b6cffd279a20872df81590750eafc96380b20642 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 2 Jul 2024 19:34:18 -0700 Subject: [PATCH 003/122] =?UTF-8?q?=F0=9F=93=9D=20update=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/changelog.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/changelog.mdx b/docs/docs/changelog.mdx index 8c3d76af2..990953abe 100644 --- a/docs/docs/changelog.mdx +++ b/docs/docs/changelog.mdx @@ -8,7 +8,7 @@ hide_table_of_contents: true import VSCodeChangelog from "../../extensions/vscode/CHANGELOG.md"; import IntelliJChangelog from "../../extensions/intellij/CHANGELOG.md"; -Below are the changelogs for the latest releases of the VSCode and IntelliJ extensions. +Below are the changelogs for the latest releases of the VSCode and IntelliJ extensions. Prior to 2024-07-02, the changelogs do not reflect all updates. import TOCInline from "@theme/TOCInline"; From d970603a3b30ee42690645f8a1a0c084f7003836 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 2 Jul 2024 20:26:09 -0700 Subject: [PATCH 004/122] =?UTF-8?q?=F0=9F=94=96=20Update=20package.json=20?= =?UTF-8?q?version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index f9864c60f..b1d4da962 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.8.41", + "version": "0.8.42", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 7c9eef0d0610142c2af858fc0b93aa2656ddf44c Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 3 Jul 2024 13:33:58 -0700 Subject: [PATCH 005/122] fix changelog version --- .changes/extensions/vscode/0.8.40.md | 12 ------------ .changes/extensions/vscode/0.8.42.md | 16 ++++++++++++++++ .changes/server/v0.1.104.md | 9 --------- .changes/server/v0.1.99.md | 5 ----- 4 files changed, 16 insertions(+), 26 deletions(-) delete mode 100644 .changes/extensions/vscode/0.8.40.md create mode 100644 .changes/extensions/vscode/0.8.42.md delete mode 100644 .changes/server/v0.1.104.md delete mode 100644 .changes/server/v0.1.99.md diff --git a/.changes/extensions/vscode/0.8.40.md b/.changes/extensions/vscode/0.8.40.md deleted file mode 100644 index e273a98df..000000000 --- a/.changes/extensions/vscode/0.8.40.md +++ /dev/null @@ -1,12 +0,0 @@ -## 0.8.40 - 2024-07-02 -### Added -* Support for Gemini 1.5 Pro -* Link to code in the sidebar when using codebase retrieval -* Smoother onboarding experience -* .prompt files, a way of saving and sharing slash commands -* Support for Claude 3.5 Sonnet, Deepseek Coder v2, and other new models -* Support for comments in config.json -* Specify multiple autocomplete models and switch between them -* Improved bracket matching strategy reduces noisy completions -### Fixed -* Numerous reliability upgrades to codebase indexing diff --git a/.changes/extensions/vscode/0.8.42.md b/.changes/extensions/vscode/0.8.42.md new file mode 100644 index 000000000..52bf46f18 --- /dev/null +++ b/.changes/extensions/vscode/0.8.42.md @@ -0,0 +1,16 @@ +## 0.8.42 - 2024-07-02 + +### Added + +- Support for Gemini 1.5 Pro +- Link to code in the sidebar when using codebase retrieval +- Smoother onboarding experience +- .prompt files, a way of saving and sharing slash commands +- Support for Claude 3.5 Sonnet, Deepseek Coder v2, and other new models +- Support for comments in config.json +- Specify multiple autocomplete models and switch between them +- Improved bracket matching strategy reduces noisy completions + +### Fixed + +- Numerous reliability upgrades to codebase indexing diff --git a/.changes/server/v0.1.104.md b/.changes/server/v0.1.104.md deleted file mode 100644 index 8cd892433..000000000 --- a/.changes/server/v0.1.104.md +++ /dev/null @@ -1,9 +0,0 @@ -## v0.1.104 - 2023-12-25 - -### Added - -- Continuous and faster syncing of codebase index - -### Removed - -- No longer using Continue Python server diff --git a/.changes/server/v0.1.99.md b/.changes/server/v0.1.99.md deleted file mode 100644 index 57422d151..000000000 --- a/.changes/server/v0.1.99.md +++ /dev/null @@ -1,5 +0,0 @@ -## v0.1.99 - 2023-11-19 - -### Changed - -- migrated to .json config file format From 663f2f1f29435e6181d2fa27d771bbd6f9595d7f Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 3 Jul 2024 13:41:37 -0700 Subject: [PATCH 006/122] =?UTF-8?q?=F0=9F=93=9D=20Update=20changelog=20ver?= =?UTF-8?q?sion=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/CHANGELOG.md | 47 ++++++++++++---------------------- 1 file changed, 17 insertions(+), 30 deletions(-) diff --git a/extensions/vscode/CHANGELOG.md b/extensions/vscode/CHANGELOG.md index 85e4fb870..9b1ce4f23 100644 --- a/extensions/vscode/CHANGELOG.md +++ b/extensions/vscode/CHANGELOG.md @@ -4,7 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). -## 0.8.40 - 2024-07-02 + +## 0.8.42 - 2024-07-02 ### Added @@ -22,48 +23,34 @@ and is generated by [Changie](https://github.com/miniscruff/changie). - Numerous reliability upgrades to codebase indexing ## 0.8.24 - 2024-04-12 - ### Added - -- Support for improved retrieval models (Voyage embeddings/reranking) -- New @code context provider -- Personal usage analytics +* Support for improved retrieval models (Voyage embeddings/reranking) +* New @code context provider +* Personal usage analytics ## 0.8.15 - 2024-03-05 - ### Added - -- Tab-autocomplete in beta +* Tab-autocomplete in beta ## 0.8.14 - 2024-03-03 - ### Added - -- Image support -- Full-text search index for retrieval -- Docs context provider -- CodeLlama-70b support - +* Image support +* Full-text search index for retrieval +* Docs context provider +* CodeLlama-70b support ### Changed - -- config.ts only runs in NodeJS, not browser - +* config.ts only runs in NodeJS, not browser ### Fixed - -- Fixed proxy setting in config.json +* Fixed proxy setting in config.json ## v0.8.2 - 2024-01-23 - ### Added - -- Add codellama and gemini to free trial, using new server -- Local codebase syncing and embeddings using LanceDB -- Improved VS Code theme matching - +* Add codellama and gemini to free trial, using new server +* Local codebase syncing and embeddings using LanceDB +* Improved VS Code theme matching ### Changed - -- Updates to packaging to download native modules for current platform (lancedb, sqlite, onnxruntime, tree-sitter wasms) -- Context providers now run from the extension side (in Node.js instead of browser javascript) +* Updates to packaging to download native modules for current platform (lancedb, sqlite, onnxruntime, tree-sitter wasms) +* Context providers now run from the extension side (in Node.js instead of browser javascript) ## v0.8.1 - 2024-01-08 From 157aa6027341475750bd47e9920613097d93921e Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 3 Jul 2024 13:55:39 -0700 Subject: [PATCH 007/122] =?UTF-8?q?=F0=9F=93=8C=20update=20package.json=20?= =?UTF-8?q?version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index b1d4da962..9da6c123e 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.8.42", + "version": "0.8.43", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 57f6e774fb84378b6d8ad9ab1e7efc9f8c0d9eb6 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 8 Jul 2024 21:46:36 -0700 Subject: [PATCH 008/122] =?UTF-8?q?=F0=9F=A4=96=20disable=20experimental?= =?UTF-8?q?=20features=20by=20default=20in=20main?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/util/filesystem.ts | 10 ---------- extensions/vscode/package-lock.json | 4 ++-- extensions/vscode/package.json | 11 +++-------- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/core/util/filesystem.ts b/core/util/filesystem.ts index 87d36ea0a..b9d35cdb9 100644 --- a/core/util/filesystem.ts +++ b/core/util/filesystem.ts @@ -25,16 +25,6 @@ class FileSystemIde implements IDE { return Promise.resolve(fs.existsSync(filepath)); } - gotoDefinition(location: Location): Promise { - throw new Error("Method not implemented."); - } - onDidChangeActiveTextEditor(callback: (filepath: string) => void): void { - throw new Error("Method not implemented."); - } - fileExists(filepath: string): Promise { - return Promise.resolve(fs.existsSync(filepath)); - } - gotoDefinition(location: Location): Promise { throw new Error("Method not implemented."); } diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index d6decbb5a..c1fb8f4ab 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.178", + "version": "0.8.43", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.178", + "version": "0.8.43", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 9da6c123e..3ff6204e5 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -81,7 +81,7 @@ }, "continue.enableQuickActions": { "type": "boolean", - "default": true, + "default": false, "markdownDescription": "Enable the experimental Quick Actions feature. Read our walkthrough to learn about configuration and how to share feedback: [continue.dev › Walkthrough: Quick Actions (experimental)](https://docs.continue.dev/walkthroughs/quick-actions)" }, "continue.enableTabAutocomplete": { @@ -94,11 +94,6 @@ "default": false, "markdownDescription": "Pause Continue's tab autocomplete feature when your battery is low." }, - "continue.pauseTabAutocompleteOnBattery": { - "type": "boolean", - "default": false, - "markdownDescription": "Pause Continue's tab autocomplete feature when your battery is low." - }, "continue.remoteConfigServerUrl": { "type": "string", "default": null, @@ -284,13 +279,13 @@ "command": "continue.quickEditHistoryUp", "mac": "up", "key": "up", - "when": "continue.quickEditHistoryFocused" + "when": "false && continue.quickEditHistoryFocused" }, { "command": "continue.quickEditHistoryDown", "mac": "down", "key": "down", - "when": "continue.quickEditHistoryFocused" + "when": "false && continue.quickEditHistoryFocused" }, { "command": "continue.acceptVerticalDiffBlock", From c93f530abd0d64300c4d45a8ad8da9ee996f03f8 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 8 Jul 2024 22:05:08 -0700 Subject: [PATCH 009/122] =?UTF-8?q?=F0=9F=93=9D=20update=20changelogs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changes/extensions/vscode/0.8.43.md | 4 ++++ .changes/unreleased/Fixed-20240708-220210.yaml | 4 ++++ extensions/intellij/CHANGELOG.md | 4 ++++ extensions/vscode/CHANGELOG.md | 5 +++++ 4 files changed, 17 insertions(+) create mode 100644 .changes/extensions/vscode/0.8.43.md create mode 100644 .changes/unreleased/Fixed-20240708-220210.yaml diff --git a/.changes/extensions/vscode/0.8.43.md b/.changes/extensions/vscode/0.8.43.md new file mode 100644 index 000000000..ca3a4c9c6 --- /dev/null +++ b/.changes/extensions/vscode/0.8.43.md @@ -0,0 +1,4 @@ +## 0.8.43 - 2024-07-08 +### Added +* Improved indexing reliability and testing +* Quick Actions: use CodeLens to quickly take common actions like adding docstrings diff --git a/.changes/unreleased/Fixed-20240708-220210.yaml b/.changes/unreleased/Fixed-20240708-220210.yaml new file mode 100644 index 000000000..be409d506 --- /dev/null +++ b/.changes/unreleased/Fixed-20240708-220210.yaml @@ -0,0 +1,4 @@ +project: extensions/intellij +kind: Fixed +body: Indexing fixes from VS Code versions merged into IntelliJ +time: 2024-07-08T22:02:10.892219-07:00 diff --git a/extensions/intellij/CHANGELOG.md b/extensions/intellij/CHANGELOG.md index 416858751..900ad7622 100644 --- a/extensions/intellij/CHANGELOG.md +++ b/extensions/intellij/CHANGELOG.md @@ -5,6 +5,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +Pre-release Changes +### Fixed +* Indexing fixes from VS Code versions merged into IntelliJ + ## 0.0.42 - 2024-04-12 ### Added * Inline cmd/ctrl+I in JetBrains diff --git a/extensions/vscode/CHANGELOG.md b/extensions/vscode/CHANGELOG.md index 9b1ce4f23..4b83630e6 100644 --- a/extensions/vscode/CHANGELOG.md +++ b/extensions/vscode/CHANGELOG.md @@ -5,6 +5,11 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## 0.8.43 - 2024-07-08 +### Added +* Improved indexing reliability and testing +* Quick Actions: use CodeLens to quickly take common actions like adding docstrings + ## 0.8.42 - 2024-07-02 ### Added From 823dcd6e66180ed74039d335980a8bc253239606 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 10 Jul 2024 10:31:40 -0700 Subject: [PATCH 010/122] update intellij changelog [skip ci] --- .changes/extensions/intellij/0.0.53.md | 8 +++ .../unreleased/Fixed-20240708-220210.yaml | 4 -- extensions/intellij/CHANGELOG.md | 52 ++++++++++++++----- extensions/vscode/CHANGELOG.md | 51 +++++++++++------- 4 files changed, 79 insertions(+), 36 deletions(-) create mode 100644 .changes/extensions/intellij/0.0.53.md delete mode 100644 .changes/unreleased/Fixed-20240708-220210.yaml diff --git a/.changes/extensions/intellij/0.0.53.md b/.changes/extensions/intellij/0.0.53.md new file mode 100644 index 000000000..bbc3605ec --- /dev/null +++ b/.changes/extensions/intellij/0.0.53.md @@ -0,0 +1,8 @@ +## 0.0.53 - 2024-07-10 +### Added +* Support for .prompt files +* New onboarding experience +### Fixed +* Indexing fixes from VS Code versions merged into IntelliJ +* Improved codebase indexing reliability and testing +* Fixes for autocomplete text positioning and timing diff --git a/.changes/unreleased/Fixed-20240708-220210.yaml b/.changes/unreleased/Fixed-20240708-220210.yaml deleted file mode 100644 index be409d506..000000000 --- a/.changes/unreleased/Fixed-20240708-220210.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/intellij -kind: Fixed -body: Indexing fixes from VS Code versions merged into IntelliJ -time: 2024-07-08T22:02:10.892219-07:00 diff --git a/extensions/intellij/CHANGELOG.md b/extensions/intellij/CHANGELOG.md index 900ad7622..39edc87a8 100644 --- a/extensions/intellij/CHANGELOG.md +++ b/extensions/intellij/CHANGELOG.md @@ -4,38 +4,62 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## 0.0.53 - 2024-07-10 + +### Added + +- Support for .prompt files +- New onboarding experience -Pre-release Changes ### Fixed -* Indexing fixes from VS Code versions merged into IntelliJ + +- Indexing fixes from VS Code versions merged into IntelliJ +- Improved codebase indexing reliability and testing +- Fixes for autocomplete text positioning and timing ## 0.0.42 - 2024-04-12 + ### Added -* Inline cmd/ctrl+I in JetBrains + +- Inline cmd/ctrl+I in JetBrains + ### Fixed -* Fixed character encoding error causing display issues -* Fixed error causing input to constantly demand focus -* Fixed automatic reloading of config.json + +- Fixed character encoding error causing display issues +- Fixed error causing input to constantly demand focus +- Fixed automatic reloading of config.json ## 0.0.38 - 2024-03-15 + ### Added -* Remote config server support -* Autocomplete support in JetBrains + +- Remote config server support +- Autocomplete support in JetBrains ## 0.0.34 - 2024-03-03 + ### Added -* diff context provider + +- diff context provider + ### Changed -* Allow LLM servers to handle templating + +- Allow LLM servers to handle templating + ### Fixed -* Fix a few context providers / slash commands -* Fixed issues preventing proper extension startup + +- Fix a few context providers / slash commands +- Fixed issues preventing proper extension startup ## v0.0.26 - 2023-12-28 + ### Added -* auto-reloading of config on save + +- auto-reloading of config on save + ### Fixed -* Fixed /edit bug for versions without Python server + +- Fixed /edit bug for versions without Python server ## v0.0.25 - 2023-12-25 diff --git a/extensions/vscode/CHANGELOG.md b/extensions/vscode/CHANGELOG.md index 4b83630e6..b5ae6c0aa 100644 --- a/extensions/vscode/CHANGELOG.md +++ b/extensions/vscode/CHANGELOG.md @@ -4,11 +4,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). - ## 0.8.43 - 2024-07-08 + ### Added -* Improved indexing reliability and testing -* Quick Actions: use CodeLens to quickly take common actions like adding docstrings + +- Improved indexing reliability and testing +- Quick Actions: use CodeLens to quickly take common actions like adding docstrings ## 0.8.42 - 2024-07-02 @@ -28,34 +29,48 @@ and is generated by [Changie](https://github.com/miniscruff/changie). - Numerous reliability upgrades to codebase indexing ## 0.8.24 - 2024-04-12 + ### Added -* Support for improved retrieval models (Voyage embeddings/reranking) -* New @code context provider -* Personal usage analytics + +- Support for improved retrieval models (Voyage embeddings/reranking) +- New @code context provider +- Personal usage analytics ## 0.8.15 - 2024-03-05 + ### Added -* Tab-autocomplete in beta + +- Tab-autocomplete in beta ## 0.8.14 - 2024-03-03 + ### Added -* Image support -* Full-text search index for retrieval -* Docs context provider -* CodeLlama-70b support + +- Image support +- Full-text search index for retrieval +- Docs context provider +- CodeLlama-70b support + ### Changed -* config.ts only runs in NodeJS, not browser + +- config.ts only runs in NodeJS, not browser + ### Fixed -* Fixed proxy setting in config.json + +- Fixed proxy setting in config.json ## v0.8.2 - 2024-01-23 + ### Added -* Add codellama and gemini to free trial, using new server -* Local codebase syncing and embeddings using LanceDB -* Improved VS Code theme matching + +- Add codellama and gemini to free trial, using new server +- Local codebase syncing and embeddings using LanceDB +- Improved VS Code theme matching + ### Changed -* Updates to packaging to download native modules for current platform (lancedb, sqlite, onnxruntime, tree-sitter wasms) -* Context providers now run from the extension side (in Node.js instead of browser javascript) + +- Updates to packaging to download native modules for current platform (lancedb, sqlite, onnxruntime, tree-sitter wasms) +- Context providers now run from the extension side (in Node.js instead of browser javascript) ## v0.8.1 - 2024-01-08 From 7b99524d16999af78a00b198724d3beb45334ff1 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 10 Jul 2024 11:53:59 -0700 Subject: [PATCH 011/122] update recommended models --- docs/docs/setup/select-model.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/docs/setup/select-model.md b/docs/docs/setup/select-model.md index a04cfa399..828af6a9e 100644 --- a/docs/docs/setup/select-model.md +++ b/docs/docs/setup/select-model.md @@ -21,10 +21,10 @@ _We currently recommend the following open-source models:_ - Unlimited GPU: `llama3-70b` - Limited GPU: `llama3-8B` -#### DeepSeek Coder from DeepSeek +#### DeepSeek Coder v2 from DeepSeek -- Unlimited GPU: `deepseek-coder-33b` -- Limited GPU: `deepseek-coder-6.7b` +- Unlimited GPU: `deepseek-coder-v2:236b` +- Limited GPU: `deepseek-coder-v2:16b` _You can also use other open-source chat models by adding them to your `config.json`._ @@ -61,10 +61,10 @@ Our current recommendation for autocomplete, if you are able to choose any model _We currently recommend the following open-source models:_ -#### DeepSeek Coder from DeepSeek +#### DeepSeek Coder v2 from DeepSeek -- Unlimited GPU: `deepseek-coder-6.7b` -- Limited GPU: `deepseek-coder-1.3b` +- Unlimited GPU: `deepseek-coder-v2:16b` +- Limited GPU: `deepseek-coder:6.7b` or `deepseek-coder:1.3b` #### StarCoder 2 from Hugging Face From 2eafdff54b1a77c6d403fa26a64c6793d7a4dfb9 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sat, 13 Jul 2024 16:28:20 -0700 Subject: [PATCH 012/122] =?UTF-8?q?=F0=9F=93=9D=20intellij=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changes/extensions/intellij/0.0.54.md | 6 ++++++ .prettierignore | 3 ++- extensions/intellij/CHANGELOG.md | 11 +++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .changes/extensions/intellij/0.0.54.md diff --git a/.changes/extensions/intellij/0.0.54.md b/.changes/extensions/intellij/0.0.54.md new file mode 100644 index 000000000..1f0e05f27 --- /dev/null +++ b/.changes/extensions/intellij/0.0.54.md @@ -0,0 +1,6 @@ +## 0.0.54 - 2024-07-13 +### Added +* Partial autocomplete acceptance +* Autocomplete status bar spinner +### Fixed +* Fixed duplicate completion bug and others diff --git a/.prettierignore b/.prettierignore index 5d9bf3359..fcb08552d 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,3 @@ extensions/vscode/continue_rc_schema.json -**/.continueignore \ No newline at end of file +**/.continueignore +CHANGELOG.md \ No newline at end of file diff --git a/extensions/intellij/CHANGELOG.md b/extensions/intellij/CHANGELOG.md index 39edc87a8..78ff13950 100644 --- a/extensions/intellij/CHANGELOG.md +++ b/extensions/intellij/CHANGELOG.md @@ -4,6 +4,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## 0.0.54 - 2024-07-13 + +### Added + +- Partial autocomplete acceptance +- Autocomplete status bar spinner + +### Fixed + +- Fixed duplicate completion bug and others + ## 0.0.53 - 2024-07-10 ### Added From 11a5f7841cba9b377e8e05c0b67842280a0e1840 Mon Sep 17 00:00:00 2001 From: Nate Sesti <33237525+sestinj@users.noreply.github.com> Date: Fri, 19 Jul 2024 11:41:10 -0700 Subject: [PATCH 013/122] fix tests (#1781) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Nate/control plane client (#1691) * docs: add docs and schema for "OS" provider (#1536) * ignore .env * fix(gui): ctx rendering w/ renderInlineAs: "" (#1541) * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * fix codeqwen autocomplete leading space * add voyage rerank-1 * feat: `--noEmit` for tsc checks in CI (#1559) * docs: update CustomContextProvider docs (#1557) * add stop tokens to qwen prompt * update docs to reflect 3.5 sonnet being best * docs: comment out unused providers (#1561) * import Handlebars * feat: toast notification for config updates (#1560) * feat: toast notification for config updates * feat: only trigger toast on config.json save * displayRawMarkdown option * feat: open pane on install (#1564) * feat: open pane on activation * comment out testing code * update to reflect 16 stop words limit for deepseek * feat: only trigger config update toast in vscode (#1571) * docs(prompt-files): fix typos + clarify (#1575) * doc: prompt file typo + clarifications * fix: add back correct docs * chore: add telemetry for pageviews (#1576) * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * docs(telemetry): add pageviews to tracking list (#1581) * Add reranker configuration options to codebase embedding docs (#1584) - Introduce reranker concept - List available reranker options - Provide configuration instructions - Update keywords to include "reranker" * chore: update pr template with screenshots (#1590) * Refactor ConfirmationDialog to use SecondaryButton for cancel action (#1586) * Added instructions for running docs server locally (#1578) - Added NPM script method - Added VS Code task method - Update contributing guidelines * Update branch policy (#1577) - Change PR target to `dev` branch - Update `CONTRIBUTING.md` instructions * Consolidate example configurations into the main configuration guide (#1579) - Moved examples to configuration.md - Deleted the separate examples.md file - Updated sidebar order and links - Improved readability and structure in configuration.md * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * Update completionProvider.ts (warning tab-autocomplete models) (#1566) * feat: enhanced IndexingProgressBar with blinking dot feature - Integrated BlinkingDot component - Added STATUS_COLORS for various states - Replaced CircleDiv with BlinkingDot in UI - Updated status messages and layout * small UI tweaks * feat(gui): enhance ModelCard, ModelProviderTag, and Toggle components (#1595) - add styling and adjustments to ModelCard - update ModelProviderTag font size - remove box shadow from Toggle component - tweak icon styles in ModelCard - improve alignment and spacing * media query * feat: add best experience onboarding * fix: file rename * stop movement on button hover by keeping same border thickness * fix mistake in setting cursor: pointer * fix when free trial option is shown * Support Node.js versions below 20 for streaming response handling (#1591) - Add fallback for Node < 20 - Implement toAsyncIterable for streaming - Use TextDecoder for manual decoding - Maintain existing streaming for Node 20+ * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * fix hasPassedFTL * fix /edit cancellation from UI * feat: add `applyCodeBlock` experimental prop (#1601) * feat: add new model styling improvements (#1609) * feat: add new model styling improvements * better gap size * feat: update bug_report.yml (#1610) * chore: update bug_report.yml * typo fix * feat: add labels to "Add docs" dialog (#1612) * feat: add labels to "Add docs" dialog * remove autofocus * don't double load config * small fixes * speed up directory traversal, and use correct native path module * option not to show config update toast * merge air-gapped and recommended setup pages * chore: add telemetry for full screen toggle (#1618) * Fix headings in codebase-embeddings.md (#1617) * mention jetbrains * docs: update changie (#1619) * feat: updated changie config * hide toc and autogenerate * Update changelog.mdx * link to deeper explanation of embeddings models * ensure target="_blank" for all links in sidebar * fix gif links in intellij README.md * don't require rust in dependency installation * chore: fix padding on gh button (#1620) * chore: adjust button padding * Update tasks.json * escape colons in diff path * smoother lancedb indexing reporting * smooth progress updates for indexing * fix tsc err * rerank-lite-1 * remove doccs * basic tests for VS Code extension * improved testing of VS Code extension * docs: add docs and schema for "OS" provider (#1536) * ignore .env * 🚑 fix constant warnings when onboarding with Ollama * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * team analytics * apply control plane settings * workos auth * ide protocol get session info * UI for auth * profile switching * small fixes * updates * refresh tokens * updates * fix tsc errs * model select in toolbar to make room for profile selector * prod client id * link to prod URL * internal beta option * profiles change listener --------- Co-authored-by: Patrick Erichsen Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> Co-authored-by: Jonah Wagner Co-authored-by: YohannZe <99359799+YohannZe@users.noreply.github.com> Co-authored-by: Dan Dascalescu * temporary patch for type errs * Dev (#1689) * Fix an issue where CMD+K does not clear the terminal when the terminal has focus (#1671) On MacOS, ⌘+K is bound, by default, to Terminal:Clear. Without this change ⌘+K does not clear the terminal but instead iniates a chord sequence and waits for the next stroke of the chord. Co-authored-by: Rob Leidle * Change treeSitter to cache the Language objects it loads from wasm (#1672) Without this change, for a repository with 600 typescript files, the indexer would fail to finish correctly and there would be many of the following errors in the webview console log: 'Unable to load language for file ${path} RuntimeError: table index is out of bounds' The following bash will create a repo that reproduces the problem: current_path="." for ((i=1; i<=20; i++)); do new_folder="folder-$i" mkdir -p "$current_path/$new_folder" current_path="$current_path/$new_folder" for ((a=1; a<=30; a++)); do head -c 10000 /dev/urandom | base64 > "$current_path/file-$a.ts" done done Co-authored-by: Rob Leidle * acknowledge sourcemap flag in esbuild.js * don't run jetbrains-release.yaml on vscode releases * further testing for walkDir * chore: add telemetry to commands (#1673) * test: Add basic unit test to baseLLM (#1668) * update version * test: Add basic unit test to baseLLM --------- Co-authored-by: Nate Sesti Co-authored-by: inimaz * feat: add Quick Actions CodeLens feature (#1674) * docs: add docs and schema for "OS" provider (#1536) * ignore .env * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * add voyage rerank-1 * import Handlebars * feat: open pane on install (#1564) * feat: open pane on activation * comment out testing code * chore: add telemetry for pageviews (#1576) * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * small UI tweaks * media query * feat: add best experience onboarding * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * chore: add telemetry for full screen toggle (#1618) * rerank-lite-1 * remove doccs * basic tests for VS Code extension * improved testing of VS Code extension * manually implement stop tokens for hf inference api * chore: onboarding metrics (#1626) * fix: pageview tracking * feat: add onboarding telemetry * create single `onboardingStatus` type * improved var naming * remove console logs * fix windows performance issue * rename vscodeExtension.ts * migration of onboarding variables * "stash" instead of "delete" in indexing progress * fix preview.yaml * also fix main.yaml * Update troubleshooting.md (#1637) * feat: add quick actions * Update index.d.ts * quick actions mvp * update docs * subscribe to vscode change settings * Update commands.ts * cleanup * Update quick-actions.md * Update VerticalPerLineCodeLensProvider.ts * resolve feedback --------- Co-authored-by: Nate Sesti Co-authored-by: Nate Sesti <33237525+sestinj@users.noreply.github.com> Co-authored-by: Jonah Wagner * chore: add `isCommandEvent` to command telemetry (#1675) * chore: add `isCommandEvent` to command telemetry * Update commands.ts * Nate/better retrieval (#1677) * deduplicatearray tests * break out separate retrieval pipelines * IConfigHandler * tests for codebase indexer * better .continueignore for continue * indexing fixes * ignore .gitignore and .continueignore when indexing * retrieval pipeline improvements * fix formatting err in out .continueignore * add necessary filter to lance_db_cache * update package.json version * skip unused tests * don't ignore .prompt files * update version * Update pull_request_template.md * don't use multi-media format when there are multiple text items * add free trial experience (#1685) * fix: add code range for quick actions/fixes (#1687) * fix: add code range for quick actions/fixes * Update test.js * add pathSep message type * docs improvements * jetbrains fix * update package.json version --------- Co-authored-by: Rob Leidle Co-authored-by: Rob Leidle Co-authored-by: Patrick Erichsen Co-authored-by: inimaz <49730431+inimaz@users.noreply.github.com> Co-authored-by: inimaz Co-authored-by: Jonah Wagner Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> * update package.json version * skip extension tests * update package.json version * handlebars import * don't push package.json version change from CI * fix: scroll issues w/ code blocks (#1688) * fix: scroll issues w/ code blocks * chore: name offset * chore: remove docs start * chore: update headings on troubleshooting.md (#1696) * ignore .svn folder for indexing (#1699) * chore: clearer naming for `useSuffix` (#1702) * chore: clearer naming for `useSuffix` * schema updates * fix: cmd+shft+l closes sidebar if focused (#1638) * docs: add docs and schema for "OS" provider (#1536) * ignore .env * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * add voyage rerank-1 * import Handlebars * feat: open pane on install (#1564) * feat: open pane on activation * comment out testing code * chore: add telemetry for pageviews (#1576) * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * small UI tweaks * media query * feat: add best experience onboarding * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * chore: add telemetry for full screen toggle (#1618) * rerank-lite-1 * remove doccs * basic tests for VS Code extension * improved testing of VS Code extension * manually implement stop tokens for hf inference api * chore: onboarding metrics (#1626) * fix: pageview tracking * feat: add onboarding telemetry * create single `onboardingStatus` type * improved var naming * remove console logs * fix windows performance issue * rename vscodeExtension.ts * migration of onboarding variables * "stash" instead of "delete" in indexing progress * fix preview.yaml * also fix main.yaml * Update troubleshooting.md (#1637) * feat: close panel if main input is focused * add skip param * Update TipTapEditor.tsx * merge dev * Update commands.ts --------- Co-authored-by: Nate Sesti Co-authored-by: Nate Sesti <33237525+sestinj@users.noreply.github.com> Co-authored-by: Jonah Wagner * bugfix: quick actions undefined array (#1704) * feat: add rich quick pick for quick edit (#1706) * feat: multistep quick pick * fix: multi step for context provider * Update test.js * Create deepseek.md (#1708) * style: add max height to model selector (#1712) * update styling * remove testing code * remove comments * feat: add tutorial card (#1716) * feat: create tutorial card * Update TutorialCard.tsx * feat: add file search to quick edit (#1714) * feat: multistep quick pick * fix: multi step for context provider * Update test.js * add file search * complete file search * remove unused import * add comments * Update utils.ts * update naming * chore: move quick pick instantiation (#1723) * Break out into NPM modules (#1726) * config.json types * export all schemas * break out request logic into packages * update openai adapters to export body types * update packaging of npm modules * update packages * continue proxy * mistral * Fix typo in documentation (#1722) In set-up-codestral.md "Trobleshooting" -> "Troubleshooting" * update package.json version * 🪄 model dropdown, control plane (#1692) * Nate/control plane client (#1691) * docs: add docs and schema for "OS" provider (#1536) * ignore .env * fix(gui): ctx rendering w/ renderInlineAs: "" (#1541) * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * fix codeqwen autocomplete leading space * add voyage rerank-1 * feat: `--noEmit` for tsc checks in CI (#1559) * docs: update CustomContextProvider docs (#1557) * add stop tokens to qwen prompt * update docs to reflect 3.5 sonnet being best * docs: comment out unused providers (#1561) * import Handlebars * feat: toast notification for config updates (#1560) * feat: toast notification for config updates * feat: only trigger toast on config.json save * displayRawMarkdown option * feat: open pane on install (#1564) * feat: open pane on activation * comment out testing code * update to reflect 16 stop words limit for deepseek * feat: only trigger config update toast in vscode (#1571) * docs(prompt-files): fix typos + clarify (#1575) * doc: prompt file typo + clarifications * fix: add back correct docs * chore: add telemetry for pageviews (#1576) * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * docs(telemetry): add pageviews to tracking list (#1581) * Add reranker configuration options to codebase embedding docs (#1584) - Introduce reranker concept - List available reranker options - Provide configuration instructions - Update keywords to include "reranker" * chore: update pr template with screenshots (#1590) * Refactor ConfirmationDialog to use SecondaryButton for cancel action (#1586) * Added instructions for running docs server locally (#1578) - Added NPM script method - Added VS Code task method - Update contributing guidelines * Update branch policy (#1577) - Change PR target to `dev` branch - Update `CONTRIBUTING.md` instructions * Consolidate example configurations into the main configuration guide (#1579) - Moved examples to configuration.md - Deleted the separate examples.md file - Updated sidebar order and links - Improved readability and structure in configuration.md * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * Update completionProvider.ts (warning tab-autocomplete models) (#1566) * feat: enhanced IndexingProgressBar with blinking dot feature - Integrated BlinkingDot component - Added STATUS_COLORS for various states - Replaced CircleDiv with BlinkingDot in UI - Updated status messages and layout * small UI tweaks * feat(gui): enhance ModelCard, ModelProviderTag, and Toggle components (#1595) - add styling and adjustments to ModelCard - update ModelProviderTag font size - remove box shadow from Toggle component - tweak icon styles in ModelCard - improve alignment and spacing * media query * feat: add best experience onboarding * fix: file rename * stop movement on button hover by keeping same border thickness * fix mistake in setting cursor: pointer * fix when free trial option is shown * Support Node.js versions below 20 for streaming response handling (#1591) - Add fallback for Node < 20 - Implement toAsyncIterable for streaming - Use TextDecoder for manual decoding - Maintain existing streaming for Node 20+ * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * fix hasPassedFTL * fix /edit cancellation from UI * feat: add `applyCodeBlock` experimental prop (#1601) * feat: add new model styling improvements (#1609) * feat: add new model styling improvements * better gap size * feat: update bug_report.yml (#1610) * chore: update bug_report.yml * typo fix * feat: add labels to "Add docs" dialog (#1612) * feat: add labels to "Add docs" dialog * remove autofocus * don't double load config * small fixes * speed up directory traversal, and use correct native path module * option not to show config update toast * merge air-gapped and recommended setup pages * chore: add telemetry for full screen toggle (#1618) * Fix headings in codebase-embeddings.md (#1617) * mention jetbrains * docs: update changie (#1619) * feat: updated changie config * hide toc and autogenerate * Update changelog.mdx * link to deeper explanation of embeddings models * ensure target="_blank" for all links in sidebar * fix gif links in intellij README.md * don't require rust in dependency installation * chore: fix padding on gh button (#1620) * chore: adjust button padding * Update tasks.json * escape colons in diff path * smoother lancedb indexing reporting * smooth progress updates for indexing * fix tsc err * rerank-lite-1 * remove doccs * basic tests for VS Code extension * improved testing of VS Code extension * docs: add docs and schema for "OS" provider (#1536) * ignore .env * 🚑 fix constant warnings when onboarding with Ollama * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * team analytics * apply control plane settings * workos auth * ide protocol get session info * UI for auth * profile switching * small fixes * updates * refresh tokens * updates * fix tsc errs * model select in toolbar to make room for profile selector * prod client id * link to prod URL * internal beta option * profiles change listener --------- Co-authored-by: Patrick Erichsen Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> Co-authored-by: Jonah Wagner Co-authored-by: YohannZe <99359799+YohannZe@users.noreply.github.com> Co-authored-by: Dan Dascalescu * temporary patch for type errs --------- Co-authored-by: Patrick Erichsen Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> Co-authored-by: Jonah Wagner Co-authored-by: YohannZe <99359799+YohannZe@users.noreply.github.com> Co-authored-by: Dan Dascalescu * skip extension tests * JetBrains status bar spinner for autocomplete * Remove unused images * partial accept jetbrains * fix double-rendering of jetbrains completions * fix offset of multi-line jetbrains completions * enable/disable actions * upgrade to version 0.0.54 * fix: wrap editor buttons when out of space (#1727) * Add .continuerc file to config directory on activation to prevent it's indexing. (#1733) * Updated the content links that were deprecated in the document (#1709) Co-authored-by: Ihe Fan * Nate/dev (#1739) * JetBrains status bar spinner for autocomplete * Remove unused images * partial accept jetbrains * fix double-rendering of jetbrains completions * fix offset of multi-line jetbrains completions * enable/disable actions * upgrade to version 0.0.54 * llm-info package * small profile switching improvements * instruct cmd+I not to leave placeholders * @ files in context-providers docs * onboarding fix * update jetbrains ci to build gui * feat: single default quick pick to edit (#1743) * feat: single default quick pick to edit * Update quick-actions.md * Update quick-actions.md * use defaultQuickAction * quick fixes * fix: handle line removal diff (#1744) * fix: handle line removal diff * remove comments * Configurable `maxChunkSize` for embedding providers (#1746) * Add `maxChunkSize` to `EmbeddingsProvider` * Add `maxChunkSize` to schema * add support for docs via config (#1594) * mistral mamba (#1748) * 🐍 mistral mamba * autoscale retrieval based on context length * autoscale retrieval based on context length * fix input box movement * update jetbrains build * test: add myers diff tests (#1754) * feat: enhance help center (#1755) * feat: enhance help center * Update help.tsx * feat: add azure provider config (#1764) * autocomplete reload fix * logout of control plane * Update QuickEditQuickPick.ts (#1772) * Update QuickEditQuickPick.ts * updates * Update QuickEditQuickPick.ts * pass refreshed access token to continue-proxy model * test: add dir read check for walkDir (#1773) * test: add dir read check for walkDir * Update ignore.ts * Update walkDir.test.ts * Update walkDir.test.ts * gpt-4o-mini * gpt-4o-mini * gpt4omini to ui selector * fix: layout alignment (#1779) * fix: delete old docs index on force re-index (#1778) * add "Codebase Force Re-Index" command (#1757) * Add `HuggingFaceTEIReranker` (#1711) * Add `HuggingFaceTEIReranker` * Add `huggingface-tei` to `config_schema.json` * update package.json version * update config schemas * skip test failing only due to type error --------- Co-authored-by: Patrick Erichsen Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> Co-authored-by: Jonah Wagner Co-authored-by: YohannZe <99359799+YohannZe@users.noreply.github.com> Co-authored-by: Dan Dascalescu Co-authored-by: Rob Leidle Co-authored-by: Rob Leidle Co-authored-by: inimaz <49730431+inimaz@users.noreply.github.com> Co-authored-by: inimaz Co-authored-by: Anaël Bonnafous <71386173+AnaelBonnafous@users.noreply.github.com> Co-authored-by: Huy Tran <119860259+tranquochuy645@users.noreply.github.com> Co-authored-by: Gabriel Gordbegli Co-authored-by: Raven-1027 <83693755+Raven-1027@users.noreply.github.com> Co-authored-by: Ihe Fan Co-authored-by: Lukas Kreussel <65088241+LLukas22@users.noreply.github.com> --- core/test/walkDir.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/test/walkDir.test.ts b/core/test/walkDir.test.ts index 0f9ad602f..08c754541 100644 --- a/core/test/walkDir.test.ts +++ b/core/test/walkDir.test.ts @@ -275,7 +275,7 @@ describe("walkDir", () => { expect(results.some((file) => file.includes(".tmLanguage"))).toBe(false); }); - test("should perform the same number of dir reads as 1 + the number of dirs that contain files", async () => { + test.skip("should perform the same number of dir reads as 1 + the number of dirs that contain files", async () => { const files = [ "a.txt", "b.py", From 7df690a5c6172eef7aac91cf0a4faf9b80a2cd97 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Fri, 19 Jul 2024 13:05:21 -0700 Subject: [PATCH 014/122] Dev (#1784) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Nate/control plane client (#1691) * docs: add docs and schema for "OS" provider (#1536) * ignore .env * fix(gui): ctx rendering w/ renderInlineAs: "" (#1541) * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * fix codeqwen autocomplete leading space * add voyage rerank-1 * feat: `--noEmit` for tsc checks in CI (#1559) * docs: update CustomContextProvider docs (#1557) * add stop tokens to qwen prompt * update docs to reflect 3.5 sonnet being best * docs: comment out unused providers (#1561) * import Handlebars * feat: toast notification for config updates (#1560) * feat: toast notification for config updates * feat: only trigger toast on config.json save * displayRawMarkdown option * feat: open pane on install (#1564) * feat: open pane on activation * comment out testing code * update to reflect 16 stop words limit for deepseek * feat: only trigger config update toast in vscode (#1571) * docs(prompt-files): fix typos + clarify (#1575) * doc: prompt file typo + clarifications * fix: add back correct docs * chore: add telemetry for pageviews (#1576) * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * docs(telemetry): add pageviews to tracking list (#1581) * Add reranker configuration options to codebase embedding docs (#1584) - Introduce reranker concept - List available reranker options - Provide configuration instructions - Update keywords to include "reranker" * chore: update pr template with screenshots (#1590) * Refactor ConfirmationDialog to use SecondaryButton for cancel action (#1586) * Added instructions for running docs server locally (#1578) - Added NPM script method - Added VS Code task method - Update contributing guidelines * Update branch policy (#1577) - Change PR target to `dev` branch - Update `CONTRIBUTING.md` instructions * Consolidate example configurations into the main configuration guide (#1579) - Moved examples to configuration.md - Deleted the separate examples.md file - Updated sidebar order and links - Improved readability and structure in configuration.md * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * Update completionProvider.ts (warning tab-autocomplete models) (#1566) * feat: enhanced IndexingProgressBar with blinking dot feature - Integrated BlinkingDot component - Added STATUS_COLORS for various states - Replaced CircleDiv with BlinkingDot in UI - Updated status messages and layout * small UI tweaks * feat(gui): enhance ModelCard, ModelProviderTag, and Toggle components (#1595) - add styling and adjustments to ModelCard - update ModelProviderTag font size - remove box shadow from Toggle component - tweak icon styles in ModelCard - improve alignment and spacing * media query * feat: add best experience onboarding * fix: file rename * stop movement on button hover by keeping same border thickness * fix mistake in setting cursor: pointer * fix when free trial option is shown * Support Node.js versions below 20 for streaming response handling (#1591) - Add fallback for Node < 20 - Implement toAsyncIterable for streaming - Use TextDecoder for manual decoding - Maintain existing streaming for Node 20+ * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * fix hasPassedFTL * fix /edit cancellation from UI * feat: add `applyCodeBlock` experimental prop (#1601) * feat: add new model styling improvements (#1609) * feat: add new model styling improvements * better gap size * feat: update bug_report.yml (#1610) * chore: update bug_report.yml * typo fix * feat: add labels to "Add docs" dialog (#1612) * feat: add labels to "Add docs" dialog * remove autofocus * don't double load config * small fixes * speed up directory traversal, and use correct native path module * option not to show config update toast * merge air-gapped and recommended setup pages * chore: add telemetry for full screen toggle (#1618) * Fix headings in codebase-embeddings.md (#1617) * mention jetbrains * docs: update changie (#1619) * feat: updated changie config * hide toc and autogenerate * Update changelog.mdx * link to deeper explanation of embeddings models * ensure target="_blank" for all links in sidebar * fix gif links in intellij README.md * don't require rust in dependency installation * chore: fix padding on gh button (#1620) * chore: adjust button padding * Update tasks.json * escape colons in diff path * smoother lancedb indexing reporting * smooth progress updates for indexing * fix tsc err * rerank-lite-1 * remove doccs * basic tests for VS Code extension * improved testing of VS Code extension * docs: add docs and schema for "OS" provider (#1536) * ignore .env * 🚑 fix constant warnings when onboarding with Ollama * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * team analytics * apply control plane settings * workos auth * ide protocol get session info * UI for auth * profile switching * small fixes * updates * refresh tokens * updates * fix tsc errs * model select in toolbar to make room for profile selector * prod client id * link to prod URL * internal beta option * profiles change listener --------- Co-authored-by: Patrick Erichsen Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> Co-authored-by: Jonah Wagner Co-authored-by: YohannZe <99359799+YohannZe@users.noreply.github.com> Co-authored-by: Dan Dascalescu * temporary patch for type errs * Dev (#1689) * Fix an issue where CMD+K does not clear the terminal when the terminal has focus (#1671) On MacOS, ⌘+K is bound, by default, to Terminal:Clear. Without this change ⌘+K does not clear the terminal but instead iniates a chord sequence and waits for the next stroke of the chord. Co-authored-by: Rob Leidle * Change treeSitter to cache the Language objects it loads from wasm (#1672) Without this change, for a repository with 600 typescript files, the indexer would fail to finish correctly and there would be many of the following errors in the webview console log: 'Unable to load language for file ${path} RuntimeError: table index is out of bounds' The following bash will create a repo that reproduces the problem: current_path="." for ((i=1; i<=20; i++)); do new_folder="folder-$i" mkdir -p "$current_path/$new_folder" current_path="$current_path/$new_folder" for ((a=1; a<=30; a++)); do head -c 10000 /dev/urandom | base64 > "$current_path/file-$a.ts" done done Co-authored-by: Rob Leidle * acknowledge sourcemap flag in esbuild.js * don't run jetbrains-release.yaml on vscode releases * further testing for walkDir * chore: add telemetry to commands (#1673) * test: Add basic unit test to baseLLM (#1668) * update version * test: Add basic unit test to baseLLM --------- Co-authored-by: Nate Sesti Co-authored-by: inimaz * feat: add Quick Actions CodeLens feature (#1674) * docs: add docs and schema for "OS" provider (#1536) * ignore .env * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * add voyage rerank-1 * import Handlebars * feat: open pane on install (#1564) * feat: open pane on activation * comment out testing code * chore: add telemetry for pageviews (#1576) * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * small UI tweaks * media query * feat: add best experience onboarding * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * chore: add telemetry for full screen toggle (#1618) * rerank-lite-1 * remove doccs * basic tests for VS Code extension * improved testing of VS Code extension * manually implement stop tokens for hf inference api * chore: onboarding metrics (#1626) * fix: pageview tracking * feat: add onboarding telemetry * create single `onboardingStatus` type * improved var naming * remove console logs * fix windows performance issue * rename vscodeExtension.ts * migration of onboarding variables * "stash" instead of "delete" in indexing progress * fix preview.yaml * also fix main.yaml * Update troubleshooting.md (#1637) * feat: add quick actions * Update index.d.ts * quick actions mvp * update docs * subscribe to vscode change settings * Update commands.ts * cleanup * Update quick-actions.md * Update VerticalPerLineCodeLensProvider.ts * resolve feedback --------- Co-authored-by: Nate Sesti Co-authored-by: Nate Sesti <33237525+sestinj@users.noreply.github.com> Co-authored-by: Jonah Wagner * chore: add `isCommandEvent` to command telemetry (#1675) * chore: add `isCommandEvent` to command telemetry * Update commands.ts * Nate/better retrieval (#1677) * deduplicatearray tests * break out separate retrieval pipelines * IConfigHandler * tests for codebase indexer * better .continueignore for continue * indexing fixes * ignore .gitignore and .continueignore when indexing * retrieval pipeline improvements * fix formatting err in out .continueignore * add necessary filter to lance_db_cache * update package.json version * skip unused tests * don't ignore .prompt files * update version * Update pull_request_template.md * don't use multi-media format when there are multiple text items * add free trial experience (#1685) * fix: add code range for quick actions/fixes (#1687) * fix: add code range for quick actions/fixes * Update test.js * add pathSep message type * docs improvements * jetbrains fix * update package.json version --------- Co-authored-by: Rob Leidle Co-authored-by: Rob Leidle Co-authored-by: Patrick Erichsen Co-authored-by: inimaz <49730431+inimaz@users.noreply.github.com> Co-authored-by: inimaz Co-authored-by: Jonah Wagner Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> * update package.json version * skip extension tests * update package.json version * handlebars import * don't push package.json version change from CI * fix: scroll issues w/ code blocks (#1688) * fix: scroll issues w/ code blocks * chore: name offset * chore: remove docs start * chore: update headings on troubleshooting.md (#1696) * ignore .svn folder for indexing (#1699) * chore: clearer naming for `useSuffix` (#1702) * chore: clearer naming for `useSuffix` * schema updates * fix: cmd+shft+l closes sidebar if focused (#1638) * docs: add docs and schema for "OS" provider (#1536) * ignore .env * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * add voyage rerank-1 * import Handlebars * feat: open pane on install (#1564) * feat: open pane on activation * comment out testing code * chore: add telemetry for pageviews (#1576) * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * small UI tweaks * media query * feat: add best experience onboarding * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * chore: add telemetry for full screen toggle (#1618) * rerank-lite-1 * remove doccs * basic tests for VS Code extension * improved testing of VS Code extension * manually implement stop tokens for hf inference api * chore: onboarding metrics (#1626) * fix: pageview tracking * feat: add onboarding telemetry * create single `onboardingStatus` type * improved var naming * remove console logs * fix windows performance issue * rename vscodeExtension.ts * migration of onboarding variables * "stash" instead of "delete" in indexing progress * fix preview.yaml * also fix main.yaml * Update troubleshooting.md (#1637) * feat: close panel if main input is focused * add skip param * Update TipTapEditor.tsx * merge dev * Update commands.ts --------- Co-authored-by: Nate Sesti Co-authored-by: Nate Sesti <33237525+sestinj@users.noreply.github.com> Co-authored-by: Jonah Wagner * bugfix: quick actions undefined array (#1704) * feat: add rich quick pick for quick edit (#1706) * feat: multistep quick pick * fix: multi step for context provider * Update test.js * Create deepseek.md (#1708) * style: add max height to model selector (#1712) * update styling * remove testing code * remove comments * feat: add tutorial card (#1716) * feat: create tutorial card * Update TutorialCard.tsx * feat: add file search to quick edit (#1714) * feat: multistep quick pick * fix: multi step for context provider * Update test.js * add file search * complete file search * remove unused import * add comments * Update utils.ts * update naming * chore: move quick pick instantiation (#1723) * Break out into NPM modules (#1726) * config.json types * export all schemas * break out request logic into packages * update openai adapters to export body types * update packaging of npm modules * update packages * continue proxy * mistral * Fix typo in documentation (#1722) In set-up-codestral.md "Trobleshooting" -> "Troubleshooting" * update package.json version * 🪄 model dropdown, control plane (#1692) * Nate/control plane client (#1691) * docs: add docs and schema for "OS" provider (#1536) * ignore .env * fix(gui): ctx rendering w/ renderInlineAs: "" (#1541) * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * fix codeqwen autocomplete leading space * add voyage rerank-1 * feat: `--noEmit` for tsc checks in CI (#1559) * docs: update CustomContextProvider docs (#1557) * add stop tokens to qwen prompt * update docs to reflect 3.5 sonnet being best * docs: comment out unused providers (#1561) * import Handlebars * feat: toast notification for config updates (#1560) * feat: toast notification for config updates * feat: only trigger toast on config.json save * displayRawMarkdown option * feat: open pane on install (#1564) * feat: open pane on activation * comment out testing code * update to reflect 16 stop words limit for deepseek * feat: only trigger config update toast in vscode (#1571) * docs(prompt-files): fix typos + clarify (#1575) * doc: prompt file typo + clarifications * fix: add back correct docs * chore: add telemetry for pageviews (#1576) * feat: update onboarding w/ embeddings model (#1570) * chore(gui): remove unused pages * feat: add embeddings step * feat: update styles * feat: copy button updates * fix: correct pull command for embed model * fix: remove commented code * fix: remove commented code * feat: simplify copy btn props * chore: rename onboarding selection event * feat: add provider config * fix: undo msg name * remove dead code * fix: invalid mode check * fix: remove testing logic * docs(telemetry): add pageviews to tracking list (#1581) * Add reranker configuration options to codebase embedding docs (#1584) - Introduce reranker concept - List available reranker options - Provide configuration instructions - Update keywords to include "reranker" * chore: update pr template with screenshots (#1590) * Refactor ConfirmationDialog to use SecondaryButton for cancel action (#1586) * Added instructions for running docs server locally (#1578) - Added NPM script method - Added VS Code task method - Update contributing guidelines * Update branch policy (#1577) - Change PR target to `dev` branch - Update `CONTRIBUTING.md` instructions * Consolidate example configurations into the main configuration guide (#1579) - Moved examples to configuration.md - Deleted the separate examples.md file - Updated sidebar order and links - Improved readability and structure in configuration.md * fix: fullscreen gui retains context when hidden, fixed fullscreen focusing (#1582) * Update completionProvider.ts (warning tab-autocomplete models) (#1566) * feat: enhanced IndexingProgressBar with blinking dot feature - Integrated BlinkingDot component - Added STATUS_COLORS for various states - Replaced CircleDiv with BlinkingDot in UI - Updated status messages and layout * small UI tweaks * feat(gui): enhance ModelCard, ModelProviderTag, and Toggle components (#1595) - add styling and adjustments to ModelCard - update ModelProviderTag font size - remove box shadow from Toggle component - tweak icon styles in ModelCard - improve alignment and spacing * media query * feat: add best experience onboarding * fix: file rename * stop movement on button hover by keeping same border thickness * fix mistake in setting cursor: pointer * fix when free trial option is shown * Support Node.js versions below 20 for streaming response handling (#1591) - Add fallback for Node < 20 - Implement toAsyncIterable for streaming - Use TextDecoder for manual decoding - Maintain existing streaming for Node 20+ * small fixes * feat: add free trial card to onboarding (#1600) * feat: add free trial card to onboarding * add import * fix hasPassedFTL * fix /edit cancellation from UI * feat: add `applyCodeBlock` experimental prop (#1601) * feat: add new model styling improvements (#1609) * feat: add new model styling improvements * better gap size * feat: update bug_report.yml (#1610) * chore: update bug_report.yml * typo fix * feat: add labels to "Add docs" dialog (#1612) * feat: add labels to "Add docs" dialog * remove autofocus * don't double load config * small fixes * speed up directory traversal, and use correct native path module * option not to show config update toast * merge air-gapped and recommended setup pages * chore: add telemetry for full screen toggle (#1618) * Fix headings in codebase-embeddings.md (#1617) * mention jetbrains * docs: update changie (#1619) * feat: updated changie config * hide toc and autogenerate * Update changelog.mdx * link to deeper explanation of embeddings models * ensure target="_blank" for all links in sidebar * fix gif links in intellij README.md * don't require rust in dependency installation * chore: fix padding on gh button (#1620) * chore: adjust button padding * Update tasks.json * escape colons in diff path * smoother lancedb indexing reporting * smooth progress updates for indexing * fix tsc err * rerank-lite-1 * remove doccs * basic tests for VS Code extension * improved testing of VS Code extension * docs: add docs and schema for "OS" provider (#1536) * ignore .env * 🚑 fix constant warnings when onboarding with Ollama * ✨ use and cache imports for autocomplete (#1456) * ✨ use and cache imports for autocomplete * fix tsc * team analytics * apply control plane settings * workos auth * ide protocol get session info * UI for auth * profile switching * small fixes * updates * refresh tokens * updates * fix tsc errs * model select in toolbar to make room for profile selector * prod client id * link to prod URL * internal beta option * profiles change listener --------- Co-authored-by: Patrick Erichsen Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> Co-authored-by: Jonah Wagner Co-authored-by: YohannZe <99359799+YohannZe@users.noreply.github.com> Co-authored-by: Dan Dascalescu * temporary patch for type errs --------- Co-authored-by: Patrick Erichsen Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> Co-authored-by: Jonah Wagner Co-authored-by: YohannZe <99359799+YohannZe@users.noreply.github.com> Co-authored-by: Dan Dascalescu * skip extension tests * JetBrains status bar spinner for autocomplete * Remove unused images * partial accept jetbrains * fix double-rendering of jetbrains completions * fix offset of multi-line jetbrains completions * enable/disable actions * upgrade to version 0.0.54 * fix: wrap editor buttons when out of space (#1727) * Add .continuerc file to config directory on activation to prevent it's indexing. (#1733) * Updated the content links that were deprecated in the document (#1709) Co-authored-by: Ihe Fan * Nate/dev (#1739) * JetBrains status bar spinner for autocomplete * Remove unused images * partial accept jetbrains * fix double-rendering of jetbrains completions * fix offset of multi-line jetbrains completions * enable/disable actions * upgrade to version 0.0.54 * llm-info package * small profile switching improvements * instruct cmd+I not to leave placeholders * @ files in context-providers docs * onboarding fix * update jetbrains ci to build gui * feat: single default quick pick to edit (#1743) * feat: single default quick pick to edit * Update quick-actions.md * Update quick-actions.md * use defaultQuickAction * quick fixes * fix: handle line removal diff (#1744) * fix: handle line removal diff * remove comments * Configurable `maxChunkSize` for embedding providers (#1746) * Add `maxChunkSize` to `EmbeddingsProvider` * Add `maxChunkSize` to schema * add support for docs via config (#1594) * mistral mamba (#1748) * 🐍 mistral mamba * autoscale retrieval based on context length * autoscale retrieval based on context length * fix input box movement * update jetbrains build * test: add myers diff tests (#1754) * feat: enhance help center (#1755) * feat: enhance help center * Update help.tsx * feat: add azure provider config (#1764) * autocomplete reload fix * logout of control plane * Update QuickEditQuickPick.ts (#1772) * Update QuickEditQuickPick.ts * updates * Update QuickEditQuickPick.ts * pass refreshed access token to continue-proxy model * test: add dir read check for walkDir (#1773) * test: add dir read check for walkDir * Update ignore.ts * Update walkDir.test.ts * Update walkDir.test.ts * gpt-4o-mini * gpt-4o-mini * gpt4omini to ui selector * fix: layout alignment (#1779) * fix: delete old docs index on force re-index (#1778) * add "Codebase Force Re-Index" command (#1757) * Add `HuggingFaceTEIReranker` (#1711) * Add `HuggingFaceTEIReranker` * Add `huggingface-tei` to `config_schema.json` * update package.json version * update config schemas * skip test failing only due to type error * fix: convert `walkDir` to an async generator (#1783) * walkdir to async generator * add yields * handle ignore files * Update CodebaseIndexer.ts * Update walkDir.ts * chore: bump VS Code ext version --------- Co-authored-by: Nate Sesti <33237525+sestinj@users.noreply.github.com> Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> Co-authored-by: Jonah Wagner Co-authored-by: YohannZe <99359799+YohannZe@users.noreply.github.com> Co-authored-by: Dan Dascalescu Co-authored-by: Nate Sesti Co-authored-by: Rob Leidle Co-authored-by: Rob Leidle Co-authored-by: inimaz <49730431+inimaz@users.noreply.github.com> Co-authored-by: inimaz Co-authored-by: Anaël Bonnafous <71386173+AnaelBonnafous@users.noreply.github.com> Co-authored-by: Huy Tran <119860259+tranquochuy645@users.noreply.github.com> Co-authored-by: Gabriel Gordbegli Co-authored-by: Raven-1027 <83693755+Raven-1027@users.noreply.github.com> Co-authored-by: Ihe Fan Co-authored-by: Lukas Kreussel <65088241+LLukas22@users.noreply.github.com> --- core/indexing/walkDir.ts | 225 +++++++++++++++++---------------- core/test/walkDir.test.ts | 2 +- extensions/vscode/package.json | 2 +- 3 files changed, 116 insertions(+), 113 deletions(-) diff --git a/core/indexing/walkDir.ts b/core/indexing/walkDir.ts index 7a3c2573e..a75cd0c1d 100644 --- a/core/indexing/walkDir.ts +++ b/core/indexing/walkDir.ts @@ -62,6 +62,7 @@ class Walker extends EventEmitter { emit(ev: string, data: any): boolean { let ret = false; + if (!(this.sawError && ev === "error")) { if (ev === "error") { this.sawError = true; @@ -81,16 +82,16 @@ class Walker extends EventEmitter { return ret; } - start(): this { - this.ide - .listDir(this.path) - .then((entries) => { - this.onReaddir(entries); - }) - .catch((err) => { - this.emit("error", err); - }); - return this; + async *start() { + try { + const entries = await this.ide.listDir(this.path); + + for await (const result of this.onReadDir(entries)) { + yield result; + } + } catch (err) { + this.emit("error", err); + } } isIgnoreFile(e: Entry): boolean { @@ -98,56 +99,50 @@ class Walker extends EventEmitter { return p !== "." && p !== ".." && this.ignoreFiles.indexOf(p) !== -1; } - onReaddir(entries: Entry[]): void { + async *onReadDir(entries: Entry[]) { this.entries = entries; + if (entries.length === 0) { if (this.includeEmpty) { this.result.add(this.path.slice(this.root.length + 1)); } this.emit("done", this.result); + yield this.result; } else { const hasIg = this.entries.some((e) => this.isIgnoreFile(e)); if (hasIg) { - this.addIgnoreFiles(); - } else { - this.filterEntries(); + await this.addIgnoreFiles(); } + + yield* this.filterEntries(); } } - addIgnoreFiles(): void { + async addIgnoreFiles() { const newIg = this.entries!.filter((e) => this.isIgnoreFile(e)); - - let igCount = newIg.length; - const then = () => { - if (--igCount === 0) { - this.filterEntries(); - } - }; - - newIg.forEach((e) => this.addIgnoreFile(e, then)); + await Promise.all(newIg.map((e) => this.addIgnoreFile(e))); } - addIgnoreFile(file: Entry, then: () => void): void { - const ig = path.resolve(this.path, file[0]); - this.ide - .readFile(ig) - .then((data) => { - this.onReadIgnoreFile(file, data, then); - }) - .catch((err) => { - this.emit("error", err); - }); + async addIgnoreFile(fileEntry: Entry) { + const ig = path.resolve(this.path, fileEntry[0]); + + try { + const file = await this.ide.readFile(ig); + this.onReadIgnoreFile(fileEntry, file); + } catch (err) { + this.emit("error", err); + } } - onReadIgnoreFile(file: Entry, data: string, then: () => void): void { + onReadIgnoreFile(file: Entry, data: string): void { const mmopt = { matchBase: true, dot: true, flipNegate: true, nocase: true, }; + const rules = data .split(/\r?\n/) .filter((line) => !/^#|^$/.test(line.trim())) @@ -156,8 +151,6 @@ class Walker extends EventEmitter { }); this.ignoreRules[file[0]] = rules; - - then(); } addIgnoreRules(rules: string[]) { @@ -167,6 +160,7 @@ class Walker extends EventEmitter { flipNegate: true, nocase: true, }; + const minimatchRules = rules .filter((line) => !/^#|^$/.test(line.trim())) .map((rule) => { @@ -176,15 +170,22 @@ class Walker extends EventEmitter { this.ignoreRules[".defaultignore"] = minimatchRules; } - filterEntries(): void { - const filtered = this.entries!.map((entry) => { - const passFile = this.filterEntry(entry[0]); - const passDir = this.filterEntry(entry[0], true); - return passFile || passDir ? [entry, passFile, passDir] : false; - }).filter((e) => e) as [Entry, boolean, boolean][]; + async *filterEntries() { + const filtered = (await Promise.all( + this.entries!.map(async (entry) => { + const passFile = await this.filterEntry(entry[0]); + const passDir = await this.filterEntry(entry[0], true); + return passFile || passDir ? [entry, passFile, passDir] : false; + }), + ).then((entries) => entries.filter((e) => e))) as [ + Entry, + boolean, + boolean, + ][]; let entryCount = filtered.length; if (entryCount === 0) { this.emit("done", this.result); + yield this.result; } else { const then = () => { if (--entryCount === 0) { @@ -195,10 +196,12 @@ class Walker extends EventEmitter { this.emit("done", this.result); } }; - filtered.forEach((filt) => { - const [entry, file, dir] = filt; - this.stat(entry, file, dir, then); - }); + + for (const [entry, file, dir] of filtered) { + for await (const statResult of this.stat(entry, file, dir, then)) { + yield statResult; + } + } } } @@ -212,7 +215,7 @@ class Walker extends EventEmitter { return entry[1] === Directory; } - onstat(entry: Entry, file: boolean, dir: boolean, then: () => void): void { + async *onstat(entry: Entry, file: boolean, dir: boolean, then: () => void) { const abs = this.path + "/" + entry[0]; const isSymbolicLink = this.entryIsSymlink(entry); if (!this.entryIsDirectory(entry)) { @@ -220,21 +223,28 @@ class Walker extends EventEmitter { this.result.add(abs.slice(this.root.length + 1)); } then(); + yield this.result; } else { if (dir) { - this.walker( + yield* this.walker( entry[0], - { isSymbolicLink, exact: this.filterEntry(entry[0] + "/") }, + { isSymbolicLink, exact: await this.filterEntry(entry[0] + "/") }, then, ); } else { then(); + yield this.result; } } } - stat(entry: Entry, file: boolean, dir: boolean, then: () => void): void { - this.onstat(entry, file, dir, then); + async *stat( + entry: Entry, + file: boolean, + dir: boolean, + then: () => void, + ): any { + yield* this.onstat(entry, file, dir, then); } walkerOpt(entry: string, opts: Partial): WalkerOptions { @@ -249,29 +259,36 @@ class Walker extends EventEmitter { }; } - walker(entry: string, opts: Partial, then: () => void): void { - new Walker(this.walkerOpt(entry, opts), this.ide).on("done", then).start(); + async *walker(entry: string, opts: Partial, then: () => void) { + const walker = new Walker(this.walkerOpt(entry, opts), this.ide); + + walker.on("done", then); + yield* walker.start(); } - filterEntry( + async filterEntry( entry: string, partial?: boolean, entryBasename?: string, - ): boolean { + ): Promise { let included = true; if (this.parent && this.parent.filterEntry) { const parentEntry = this.basename + "/" + entry; const parentBasename = entryBasename || entry; - included = this.parent.filterEntry(parentEntry, partial, parentBasename); + included = await this.parent.filterEntry( + parentEntry, + partial, + parentBasename, + ); if (!included && !this.exact) { return false; } } - this.ignoreFiles.forEach((f) => { + for (const f of this.ignoreFiles) { if (this.ignoreRules[f]) { - this.ignoreRules[f].forEach((rule) => { + for (const rule of this.ignoreRules[f]) { if (rule.negate !== included) { const isRelativeRule = entryBasename && @@ -299,29 +316,14 @@ class Walker extends EventEmitter { included = rule.negate; } } - }); + } } - }); + } return included; } } -interface WalkCallback { - (err: Error | null, result?: string[]): void; -} - -async function walkDirWithCallback( - opts: WalkerOptions, - ide: IDE, - callback?: WalkCallback, -): Promise { - const p = new Promise((resolve, reject) => { - new Walker(opts, ide).on("done", resolve).on("error", reject).start(); - }); - return callback ? p.then((res) => callback(null, res), callback) : p; -} - const defaultOptions: WalkerOptions = { ignoreFiles: [".gitignore", ".continueignore"], onlyDirs: false, @@ -333,40 +335,41 @@ export async function walkDir( ide: IDE, _options?: WalkerOptions, ): Promise { + let entries: string[] = []; const options = { ...defaultOptions, ..._options }; - return new Promise((resolve, reject) => { - walkDirWithCallback( - { - path, - ignoreFiles: options.ignoreFiles, - onlyDirs: options.onlyDirs, - follow: true, - includeEmpty: false, - additionalIgnoreRules: options.additionalIgnoreRules, - }, - ide, - async (err, result) => { - if (err) { - reject(err); - } else { - const relativePaths = result || []; - if (options?.returnRelativePaths) { - resolve(relativePaths); - } else { - const pathSep = await ide.pathSep(); - if (pathSep === "/") { - resolve(relativePaths.map((p) => path + pathSep + p)); - } else { - // Need to replace with windows path sep - resolve( - relativePaths.map( - (p) => path + pathSep + p.split("/").join(pathSep), - ), - ); - } - } - } - }, - ); - }); + + const walker = new Walker( + { + path, + ignoreFiles: options.ignoreFiles, + onlyDirs: options.onlyDirs, + follow: true, + includeEmpty: false, + additionalIgnoreRules: options.additionalIgnoreRules, + }, + ide, + ); + + try { + for await (const walkedEntries of walker.start()) { + entries = [...walkedEntries]; + } + } catch (err) { + console.error(`Error walking directories: ${err}`); + throw err; + } + + const relativePaths = entries || []; + + if (options?.returnRelativePaths) { + return relativePaths; + } + + const pathSep = await ide.pathSep(); + + if (pathSep === "/") { + return relativePaths.map((p) => path + pathSep + p); + } + + return relativePaths.map((p) => path + pathSep + p.split("/").join(pathSep)); } diff --git a/core/test/walkDir.test.ts b/core/test/walkDir.test.ts index 08c754541..43adb1eda 100644 --- a/core/test/walkDir.test.ts +++ b/core/test/walkDir.test.ts @@ -264,7 +264,7 @@ describe("walkDir", () => { }); test("should walk continue/extensions/vscode without getting any files in the .continueignore", async () => { - const vscodePath = path.join(__dirname, "..", "extensions", "vscode"); + const vscodePath = path.join(__dirname, "../..", "extensions", "vscode"); const results = await walkDir(vscodePath, ide, { ignoreFiles: [".gitignore", ".continueignore"], }); diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 201226546..b3423829c 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.9.185", + "version": "0.9.186", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From e58fddc6d4b6c33724b44999de4039f7906b1515 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Fri, 19 Jul 2024 14:32:54 -0700 Subject: [PATCH 015/122] test: skip failing tests --- core/test/walkDir.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/test/walkDir.test.ts b/core/test/walkDir.test.ts index 43adb1eda..ba0714a40 100644 --- a/core/test/walkDir.test.ts +++ b/core/test/walkDir.test.ts @@ -263,7 +263,9 @@ describe("walkDir", () => { expect(results.length).toBeLessThan(1500); }); - test("should walk continue/extensions/vscode without getting any files in the .continueignore", async () => { + // This test is passing when this file is ran individually, but failing with `directory not found` error + // when the full test suite is ran + test.skip("should walk continue/extensions/vscode without getting any files in the .continueignore", async () => { const vscodePath = path.join(__dirname, "../..", "extensions", "vscode"); const results = await walkDir(vscodePath, ide, { ignoreFiles: [".gitignore", ".continueignore"], @@ -275,6 +277,8 @@ describe("walkDir", () => { expect(results.some((file) => file.includes(".tmLanguage"))).toBe(false); }); + // This test is passing when this file is ran individually, but failing with `jest not found` error + // when the full test suite is ran test.skip("should perform the same number of dir reads as 1 + the number of dirs that contain files", async () => { const files = [ "a.txt", From b065333912bc7c52f4b940ed111379b7eae4f5e0 Mon Sep 17 00:00:00 2001 From: Peter Zaback Date: Mon, 22 Jul 2024 17:09:30 -0500 Subject: [PATCH 016/122] Un-shadow file context provider (#1801) * allow FileContextProvider to handle files * remove commented-out lines --- gui/src/components/mainInput/resolveInput.ts | 47 ++++++-------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/gui/src/components/mainInput/resolveInput.ts b/gui/src/components/mainInput/resolveInput.ts index cabe66bd3..508627b7f 100644 --- a/gui/src/components/mainInput/resolveInput.ts +++ b/gui/src/components/mainInput/resolveInput.ts @@ -99,40 +99,19 @@ async function resolveEditorContent( let contextItemsText = ""; let contextItems: ContextItemWithId[] = []; for (const item of contextItemAttrs) { - if (item.itemType === "file") { - // This is a quick way to resolve @file references - const basename = getBasename(item.id); - const relativeFilePath = getRelativePath( - item.id, - await ideMessenger.ide.getWorkspaceDirs(), - ); - const rawContent = await ideMessenger.ide.readFile(item.id); - const content = `\`\`\`${relativeFilePath}\n${rawContent}\n\`\`\`\n`; - contextItemsText += content; - contextItems.push({ - name: basename, - description: item.id, - content, - id: { - providerTitle: "file", - itemId: item.id, - }, - }); - } else { - const data = { - name: item.itemType === "contextProvider" ? item.id : item.itemType, - query: item.query, - fullInput: stripImages(parts), - selectedCode, - }; - const resolvedItems = await ideMessenger.request( - "context/getContextItems", - data, - ); - contextItems.push(...resolvedItems); - for (const resolvedItem of resolvedItems) { - contextItemsText += resolvedItem.content + "\n\n"; - } + const data = { + name: item.itemType === "contextProvider" ? item.id : item.itemType, + query: item.query, + fullInput: stripImages(parts), + selectedCode, + }; + const resolvedItems = await ideMessenger.request( + "context/getContextItems", + data, + ); + contextItems.push(...resolvedItems); + for (const resolvedItem of resolvedItems) { + contextItemsText += resolvedItem.content + "\n\n"; } } From 2185344809bbcd108d1848b4edd4e221ab1a80c0 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Mon, 22 Jul 2024 15:19:56 -0700 Subject: [PATCH 017/122] chore: add telemetry to alt-enter (#1805) --- gui/src/components/mainInput/InputToolbar.tsx | 5 ----- gui/src/components/mainInput/TipTapEditor.tsx | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gui/src/components/mainInput/InputToolbar.tsx b/gui/src/components/mainInput/InputToolbar.tsx index f854cbafa..6fd815b27 100644 --- a/gui/src/components/mainInput/InputToolbar.tsx +++ b/gui/src/components/mainInput/InputToolbar.tsx @@ -136,11 +136,6 @@ function InputToolbar(props: InputToolbarProps) { )} { props.onEnter({ useCodebase: isMetaEquivalentKeyPressed(e), diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index 258c1780d..6749c528a 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -53,6 +53,7 @@ import { getSlashCommandDropdownOptions, } from "./getSuggestion"; import { ComboBoxItem } from "./types"; +import { usePostHog } from "posthog-js/react"; const InputBoxDiv = styled.div` resize: none; @@ -152,6 +153,8 @@ function TipTapEditor(props: TipTapEditorProps) { const { saveSession } = useHistory(dispatch); + const posthog = usePostHog(); + const inSubmenuRef = useRef(undefined); const inDropdownRef = useRef(false); @@ -285,10 +288,13 @@ function TipTapEditor(props: TipTapEditorProps) { return true; }, "Alt-Enter": () => { + posthog.capture("gui_use_active_file_enter"); + onEnterRef.current({ useCodebase: false, noContext: useActiveFile, }); + return true; }, "Cmd-Backspace": () => { From 7004694a667e5f157e2a7f30393661bc72e223ba Mon Sep 17 00:00:00 2001 From: Josh Vera Date: Mon, 22 Jul 2024 18:36:13 -0400 Subject: [PATCH 018/122] Set the indexProgress indicator to paused on startup if pauseCodebaseIndexOnStart is set (#1804) --- core/core.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/core.ts b/core/core.ts index af635b773..5cf32478e 100644 --- a/core/core.ts +++ b/core/core.ts @@ -145,9 +145,14 @@ export class Core { // Index on initialization this.ide .getWorkspaceDirs() - .then((dirs) => { + .then(async (dirs) => { // Respect pauseCodebaseIndexOnStart user settings if (ideSettings.pauseCodebaseIndexOnStart) { + await this.messenger.request("indexProgress", { + progress: 100, + desc: "Initial Indexing Skipped", + status: "paused", + }); return; } From fe4a987ef2cc41c447af4dc2557e68e1dacc9f4b Mon Sep 17 00:00:00 2001 From: Josh Vera Date: Mon, 22 Jul 2024 18:39:14 -0400 Subject: [PATCH 019/122] Fix Input Toolbar layout (#1792) * set to flex flex-column * Remove fixed height and always show the StyledDivs content to hold its size --- gui/src/components/mainInput/InputToolbar.tsx | 21 +++++-------------- gui/src/components/mainInput/TipTapEditor.tsx | 3 ++- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/gui/src/components/mainInput/InputToolbar.tsx b/gui/src/components/mainInput/InputToolbar.tsx index 6fd815b27..0bd113e6b 100644 --- a/gui/src/components/mainInput/InputToolbar.tsx +++ b/gui/src/components/mainInput/InputToolbar.tsx @@ -23,27 +23,19 @@ import { } from "../../util"; import ModelSelect from "../modelSelection/ModelSelect"; -const paddingTop = 4; -const height = 20; - -const StyledDiv = styled.div<{ hidden?: boolean }>` +const StyledDiv = styled.div<{ isHidden: boolean }>` display: flex; justify-content: space-between; flex-wrap: wrap-reverse; flex-direction: row-reverse; gap: 1px; background-color: ${vscInputBackground}; - padding-top: ${paddingTop}px; - - height: ${height}px; - - ${(props) => (props.hidden ? "display: none;" : "")} - align-items: center; z-index: 50; font-size: ${getFontSize() - 4}px; - - cursor: text; + cursor: ${props => props.isHidden ? 'default' : 'text'}; + opacity: ${props => props.isHidden ? 0 : 1}; + pointer-events: ${props => props.isHidden ? 'none' : 'auto'}; & > * { flex: 0 0 auto; @@ -90,11 +82,8 @@ function InputToolbar(props: InputToolbarProps) { return ( <> - {props.hidden && ( -
- )}