Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* docs: add docs and schema for "OS" provider (continuedev#1536)

* ignore .env

* fix(gui): ctx rendering w/ renderInlineAs: "" (continuedev#1541)

* ✨ use and cache imports for autocomplete (continuedev#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 (continuedev#1559)

* docs: update CustomContextProvider docs (continuedev#1557)

* add stop tokens to qwen prompt

* update docs to reflect 3.5 sonnet being best

* docs: comment out unused providers (continuedev#1561)

* import Handlebars

* feat: toast notification for config updates (continuedev#1560)

* feat: toast notification for config updates

* feat: only trigger toast on config.json save

* displayRawMarkdown option

* feat: open pane on install (continuedev#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 (continuedev#1571)

* docs(prompt-files): fix typos + clarify (continuedev#1575)

* doc: prompt file typo + clarifications

* fix: add back correct docs

* chore: add telemetry for pageviews (continuedev#1576)

* feat: update onboarding w/ embeddings model (continuedev#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 (continuedev#1581)

* Add reranker configuration options to codebase embedding docs (continuedev#1584)

- Introduce reranker concept
- List available reranker options
- Provide configuration instructions
- Update keywords to include "reranker"

* chore: update pr template with screenshots (continuedev#1590)

* Refactor ConfirmationDialog to use SecondaryButton for cancel action (continuedev#1586)

* Added instructions for running docs server locally (continuedev#1578)

- Added NPM script method
- Added VS Code task method
- Update contributing guidelines

* Update branch policy (continuedev#1577)

- Change PR target to `dev` branch
- Update `CONTRIBUTING.md` instructions

* Consolidate example configurations into the main configuration guide (continuedev#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 (continuedev#1582)

* Update completionProvider.ts (warning tab-autocomplete models) (continuedev#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 (continuedev#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 (continuedev#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 (continuedev#1600)

* feat: add free trial card to onboarding

* add import

* fix hasPassedFTL

* fix /edit cancellation from UI

* feat: add `applyCodeBlock` experimental prop (continuedev#1601)

* feat: add new model styling improvements (continuedev#1609)

* feat: add new model styling improvements

* better gap size

* feat: update bug_report.yml (continuedev#1610)

* chore: update bug_report.yml

* typo fix

* feat: add labels to "Add docs" dialog (continuedev#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 (continuedev#1618)

* Fix headings in codebase-embeddings.md (continuedev#1617)

* mention jetbrains

* docs: update changie  (continuedev#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 (continuedev#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 <[email protected]>
Co-authored-by: Priyash <[email protected]>
Co-authored-by: Jonah Wagner <[email protected]>
Co-authored-by: YohannZe <[email protected]>
Co-authored-by: Dan Dascalescu <[email protected]>
  • Loading branch information
6 people authored Jun 28, 2024
1 parent 23ba0fa commit 04c08c7
Show file tree
Hide file tree
Showing 127 changed files with 2,543 additions and 1,793 deletions.
1 change: 0 additions & 1 deletion .changes/header.tpl.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
Expand Down
4 changes: 0 additions & 4 deletions .changie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,3 @@ projects:
- label: extensions/vscode
key: extensions/vscode
changelog: extensions/vscode/CHANGELOG.md

- label: docs
key: docs
changelog: docs/CHANGELOG.md # for releasing documents independently
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,23 @@ body:
attributes:
label: Relevant environment info
description: |
Feel free to omit any info that is not relevant to your issue.
- **OS**: e.g. macOS 14.2.1
- **Continue**: e.g. v0.9.4
- **IDE**: e.g. VSCode 1.85.1
- Include also your LLM Model if it is relevant to your issue
- **Model**: e.g. Ollama v0.1.19
- The contents of your config.json file (e.g. `~/.continue/config.json` on macOS)
value: |
- OS:
- Continue:
- IDE:
- Model:
- config.json:
```json
```
render: Markdown
validations:
required: false
Expand Down
4 changes: 4 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@

- [ ] The base branch of this PR is `dev`, rather than `main`
- [ ] The relevant docs, if any, have been updated or created

## Screenshots

If your updates include visual changes, please share screenshots below.
8 changes: 4 additions & 4 deletions .github/workflows/ts-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,19 @@ jobs:
- name: tsc core
run: |
cd core
npx tsc
npx tsc --noEmit
- name: tsc extensions/vscode
run: |
cd extensions/vscode
npx tsc
npx tsc --noEmit
- name: tsc binary
run: |
cd binary
npx tsc
npx tsc --noEmit
- name: tsc gui
run: |
cd gui
npx tsc
npx tsc --noEmit
6 changes: 4 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
// To bundle the code the same way we do for publishing
"vscode-extension:esbuild",
// Start the React app that is used in the extension
"gui:dev"
"gui:dev",
// Start the docs site, without opening the browser
"docs:start"
],
"group": {
"kind": "build",
Expand Down Expand Up @@ -159,7 +161,7 @@
"label": "docs:start",
"type": "shell",
"command": "npm",
"args": ["run", "start"],
"args": ["run", "start", "--", "--no-open"],
"problemMatcher": [],
"options": {
"cwd": "docs"
Expand Down
47 changes: 41 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,33 @@

## Table of Contents

- [Contributing to Continue](#contributing-to-continue)
- [Table of Contents](#table-of-contents)
- [❤️ Ways to Contribute](#️-ways-to-contribute)
- [👋 Continue Contribution Ideas](#-continue-contribution-ideas)
- [🐛 Report Bugs](#-report-bugs)
- [✨ Suggest Enhancements](#-suggest-enhancements)
- [📖 Updating / Improving Documentation](#-updating--improving-documentation)
- [Running the Documentation Server Locally](#running-the-documentation-server-locally)
- [Method 1: NPM Script](#method-1-npm-script)
- [Method 2: VS Code Task](#method-2-vs-code-task)
- [🧑‍💻 Contributing Code](#-contributing-code)
- [Environment Setup](#environment-setup)
- [Pre-requisites](#pre-requisites)
- [Fork the Continue Repository with All Branches](#fork-the-continue-repository-with-all-branches)
- [VS Code](#vs-code)
- [Debugging](#debugging)
- [JetBrains](#jetbrains)
- [Debugging](#debugging-1)
- [Formatting](#formatting)
- [Writing Slash Commands](#writing-slash-commands)
- [Writing Context Providers](#writing-context-providers)
- [Adding an LLM Provider](#adding-an-llm-provider)
- [Adding Models](#adding-models)
- [Adding Pre-indexed Documentation](#adding-pre-indexed-documentation)
- [📐 Continue Architecture](#-continue-architecture)
- [Continue VS Code Extension](#continue-vs-code-extension)
- [Continue JetBrains Extension](#continue-jetbrains-extension)
- [📐 Continue Architecture](#-continue-architecture)
- [Continue VS Code Extension](#continue-vs-code-extension)
- [Continue JetBrains Extension](#continue-jetbrains-extension)

# ❤️ Ways to Contribute

Expand Down Expand Up @@ -50,9 +62,32 @@ Continue is quickly adding features, and we'd love to hear which are the most im

Continue is continuously improving, but a feature isn't complete until it is reflected in the documentation! If you see something out-of-date or missing, you can help by clicking "Edit this page" at the bottom of any page on [docs.continue.dev](https://docs.continue.dev).

### Running the Documentation Server Locally

You can run the documentation server locally using either of the following methods:

#### Method 1: NPM Script

1. Open your terminal and navigate to the root directory of the project.

2. Run the following command to start the documentation server:
```bash
npm run start --prefix docs
```

#### Method 2: VS Code Task

1. Open VS Code in the root directory of the project.

2. Open the VS Code command pallet (`cmd/ctrl+shift+p`) and select `Tasks: Run Task`.

3. Look for the `docs:start` task and select it.

This will start a local server and you can see the documentation rendered in your default browser, typically accessible at `http://localhost:3000`.

## 🧑‍💻 Contributing Code

> Please make PRs to the `preview` branch. We use this to first test changes in a pre-release version of the extension.
> Please make PRs to the `dev` branch. We use this to first test changes in a pre-release version of the extension.
### Environment Setup

Expand All @@ -70,9 +105,9 @@ nvm use

2. Clone your forked repository to your local machine. Use: `git clone https://github.com/YOUR_USERNAME/continue.git`

3. Navigate to the cloned directory and switch to the **preview** branch. Execute: `git checkout preview`, then create your feature/fix branch from there, like so: `git checkout -b 123-my-feature-branch`
3. Navigate to the cloned directory and switch to the **dev** branch. Execute: `git checkout dev`, then create your feature/fix branch from there, like so: `git checkout -b 123-my-feature-branch`

4. When you're ready to submit your changes, send your pull request specifically to the **preview** branch.
4. When you're ready to submit your changes, send your pull request specifically to the **dev** branch.

#### VS Code

Expand Down
2 changes: 1 addition & 1 deletion binary/src/IpcIde.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { MessageIde } from "core/util/messageIde";

export class IpcIde extends MessageIde {
constructor(messenger: TODO) {
super(messenger.request.bind(messenger));
super(messenger.request.bind(messenger), messenger.on.bind(messenger));
}
}
81 changes: 81 additions & 0 deletions core/autocomplete/ImportDefinitionsService.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import { IDE } from "..";
import { RangeInFileWithContents } from "../commands/util";
import { PrecalculatedLruCache } from "../util/LruCache";
import {
TSQueryType,
getParserForFile,
getQueryForFile,
} from "../util/treeSitter";

interface FileInfo {
imports: { [key: string]: RangeInFileWithContents[] };
}

export class ImportDefinitionsService {
static N = 10;

private cache: PrecalculatedLruCache<FileInfo> =
new PrecalculatedLruCache<FileInfo>(
this._getFileInfo.bind(this),
ImportDefinitionsService.N,
);

constructor(private readonly ide: IDE) {
ide.onDidChangeActiveTextEditor((filepath) => {
this.cache.initKey(filepath);
});
}

get(filepath: string): FileInfo | undefined {
return this.cache.get(filepath);
}

private async _getFileInfo(filepath: string): Promise<FileInfo> {
const parser = await getParserForFile(filepath);
if (!parser) {
return {
imports: {},
};
}
const ast = parser.parse(await this.ide.readFile(filepath), undefined, {
includedRanges: [
{
startIndex: 0,
endIndex: 10_000,
startPosition: { row: 0, column: 0 },
endPosition: { row: 100, column: 0 },
},
],
});
const query = await getQueryForFile(filepath, TSQueryType.Imports);
if (!query) {
return {
imports: {},
};
}

const matches = query?.matches(ast.rootNode);

const fileInfo: FileInfo = {
imports: {},
};
for (const match of matches) {
const startPosition = match.captures[0].node.startPosition;
const defs = await this.ide.gotoDefinition({
filepath,
position: {
line: startPosition.row,
character: startPosition.column,
},
});
fileInfo.imports[match.captures[0].node.text] = await Promise.all(
defs.map(async (def) => ({
...def,
contents: await this.ide.readRangeInFile(def.filepath, def.range),
})),
);
}

return fileInfo;
}
}
45 changes: 45 additions & 0 deletions core/autocomplete/NearbyDefinitionsService.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { IDE, Location } from "..";
import { LANGUAGES } from "./languages";
import { getSymbolsForSnippet } from "./ranking";

interface FileInfo {
filepath: string;
}

export class NearbyDefinitionsService {
static N = 10;

constructor(private readonly ide: IDE) {}

async getDefinitionsForLine(filepath: string, line: number) {
const lineContent = await this.ide.readRangeInFile(filepath, {
start: {
line,
character: 0,
},
end: {
line: line + 1,
character: 0,
},
});

// Remove keywords
const lang = LANGUAGES[filepath.split(".").slice(-1)[0]];
const symbols = Array.from(getSymbolsForSnippet(lineContent))
.filter((s) => s.length > 0)
.filter((s) => !(lang && lang?.stopWords?.includes(s)));

return Promise.all(
symbols.map((s) => {
const character = lineContent.indexOf(s);
const pos: Location = {
filepath,
position: {
line,
character,
},
};
}),
);
}
}
Loading

0 comments on commit 04c08c7

Please sign in to comment.