Skip to content

Commit 04c08c7

Browse files
sestinjPatrick-ErichsenpriyashpatildevbyjonahYohannZe
authored
* 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]>
1 parent 23ba0fa commit 04c08c7

File tree

127 files changed

+2543
-1793
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+2543
-1793
lines changed

.changes/header.tpl.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# Changelog
21
All notable changes to this project will be documented in this file.
32

43
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

.changie.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,3 @@ projects:
3333
- label: extensions/vscode
3434
key: extensions/vscode
3535
changelog: extensions/vscode/CHANGELOG.md
36-
37-
- label: docs
38-
key: docs
39-
changelog: docs/CHANGELOG.md # for releasing documents independently

.github/ISSUE_TEMPLATE/bug_report.yml

+8
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,23 @@ body:
2121
attributes:
2222
label: Relevant environment info
2323
description: |
24+
Feel free to omit any info that is not relevant to your issue.
25+
2426
- **OS**: e.g. macOS 14.2.1
2527
- **Continue**: e.g. v0.9.4
2628
- **IDE**: e.g. VSCode 1.85.1
2729
- Include also your LLM Model if it is relevant to your issue
2830
- **Model**: e.g. Ollama v0.1.19
31+
- The contents of your config.json file (e.g. `~/.continue/config.json` on macOS)
2932
value: |
3033
- OS:
3134
- Continue:
3235
- IDE:
36+
- Model:
37+
- config.json:
38+
```json
39+
40+
```
3341
render: Markdown
3442
validations:
3543
required: false

.github/pull_request_template.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@
66

77
- [ ] The base branch of this PR is `dev`, rather than `main`
88
- [ ] The relevant docs, if any, have been updated or created
9+
10+
## Screenshots
11+
12+
If your updates include visual changes, please share screenshots below.

.github/workflows/ts-check.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,19 @@ jobs:
7272
- name: tsc core
7373
run: |
7474
cd core
75-
npx tsc
75+
npx tsc --noEmit
7676
7777
- name: tsc extensions/vscode
7878
run: |
7979
cd extensions/vscode
80-
npx tsc
80+
npx tsc --noEmit
8181
8282
- name: tsc binary
8383
run: |
8484
cd binary
85-
npx tsc
85+
npx tsc --noEmit
8686
8787
- name: tsc gui
8888
run: |
8989
cd gui
90-
npx tsc
90+
npx tsc --noEmit

.vscode/tasks.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
// To bundle the code the same way we do for publishing
1313
"vscode-extension:esbuild",
1414
// Start the React app that is used in the extension
15-
"gui:dev"
15+
"gui:dev",
16+
// Start the docs site, without opening the browser
17+
"docs:start"
1618
],
1719
"group": {
1820
"kind": "build",
@@ -159,7 +161,7 @@
159161
"label": "docs:start",
160162
"type": "shell",
161163
"command": "npm",
162-
"args": ["run", "start"],
164+
"args": ["run", "start", "--", "--no-open"],
163165
"problemMatcher": [],
164166
"options": {
165167
"cwd": "docs"

CONTRIBUTING.md

+41-6
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,33 @@
22

33
## Table of Contents
44

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

2133
# ❤️ Ways to Contribute
2234

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

5163
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).
5264

65+
### Running the Documentation Server Locally
66+
67+
You can run the documentation server locally using either of the following methods:
68+
69+
#### Method 1: NPM Script
70+
71+
1. Open your terminal and navigate to the root directory of the project.
72+
73+
2. Run the following command to start the documentation server:
74+
```bash
75+
npm run start --prefix docs
76+
```
77+
78+
#### Method 2: VS Code Task
79+
80+
1. Open VS Code in the root directory of the project.
81+
82+
2. Open the VS Code command pallet (`cmd/ctrl+shift+p`) and select `Tasks: Run Task`.
83+
84+
3. Look for the `docs:start` task and select it.
85+
86+
This will start a local server and you can see the documentation rendered in your default browser, typically accessible at `http://localhost:3000`.
87+
5388
## 🧑‍💻 Contributing Code
5489

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

@@ -70,9 +105,9 @@ nvm use
70105

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

73-
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`
108+
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`
74109

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

77112
#### VS Code
78113

binary/src/IpcIde.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import { MessageIde } from "core/util/messageIde";
33

44
export class IpcIde extends MessageIde {
55
constructor(messenger: TODO) {
6-
super(messenger.request.bind(messenger));
6+
super(messenger.request.bind(messenger), messenger.on.bind(messenger));
77
}
88
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import { IDE } from "..";
2+
import { RangeInFileWithContents } from "../commands/util";
3+
import { PrecalculatedLruCache } from "../util/LruCache";
4+
import {
5+
TSQueryType,
6+
getParserForFile,
7+
getQueryForFile,
8+
} from "../util/treeSitter";
9+
10+
interface FileInfo {
11+
imports: { [key: string]: RangeInFileWithContents[] };
12+
}
13+
14+
export class ImportDefinitionsService {
15+
static N = 10;
16+
17+
private cache: PrecalculatedLruCache<FileInfo> =
18+
new PrecalculatedLruCache<FileInfo>(
19+
this._getFileInfo.bind(this),
20+
ImportDefinitionsService.N,
21+
);
22+
23+
constructor(private readonly ide: IDE) {
24+
ide.onDidChangeActiveTextEditor((filepath) => {
25+
this.cache.initKey(filepath);
26+
});
27+
}
28+
29+
get(filepath: string): FileInfo | undefined {
30+
return this.cache.get(filepath);
31+
}
32+
33+
private async _getFileInfo(filepath: string): Promise<FileInfo> {
34+
const parser = await getParserForFile(filepath);
35+
if (!parser) {
36+
return {
37+
imports: {},
38+
};
39+
}
40+
const ast = parser.parse(await this.ide.readFile(filepath), undefined, {
41+
includedRanges: [
42+
{
43+
startIndex: 0,
44+
endIndex: 10_000,
45+
startPosition: { row: 0, column: 0 },
46+
endPosition: { row: 100, column: 0 },
47+
},
48+
],
49+
});
50+
const query = await getQueryForFile(filepath, TSQueryType.Imports);
51+
if (!query) {
52+
return {
53+
imports: {},
54+
};
55+
}
56+
57+
const matches = query?.matches(ast.rootNode);
58+
59+
const fileInfo: FileInfo = {
60+
imports: {},
61+
};
62+
for (const match of matches) {
63+
const startPosition = match.captures[0].node.startPosition;
64+
const defs = await this.ide.gotoDefinition({
65+
filepath,
66+
position: {
67+
line: startPosition.row,
68+
character: startPosition.column,
69+
},
70+
});
71+
fileInfo.imports[match.captures[0].node.text] = await Promise.all(
72+
defs.map(async (def) => ({
73+
...def,
74+
contents: await this.ide.readRangeInFile(def.filepath, def.range),
75+
})),
76+
);
77+
}
78+
79+
return fileInfo;
80+
}
81+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { IDE, Location } from "..";
2+
import { LANGUAGES } from "./languages";
3+
import { getSymbolsForSnippet } from "./ranking";
4+
5+
interface FileInfo {
6+
filepath: string;
7+
}
8+
9+
export class NearbyDefinitionsService {
10+
static N = 10;
11+
12+
constructor(private readonly ide: IDE) {}
13+
14+
async getDefinitionsForLine(filepath: string, line: number) {
15+
const lineContent = await this.ide.readRangeInFile(filepath, {
16+
start: {
17+
line,
18+
character: 0,
19+
},
20+
end: {
21+
line: line + 1,
22+
character: 0,
23+
},
24+
});
25+
26+
// Remove keywords
27+
const lang = LANGUAGES[filepath.split(".").slice(-1)[0]];
28+
const symbols = Array.from(getSymbolsForSnippet(lineContent))
29+
.filter((s) => s.length > 0)
30+
.filter((s) => !(lang && lang?.stopWords?.includes(s)));
31+
32+
return Promise.all(
33+
symbols.map((s) => {
34+
const character = lineContent.indexOf(s);
35+
const pos: Location = {
36+
filepath,
37+
position: {
38+
line,
39+
character,
40+
},
41+
};
42+
}),
43+
);
44+
}
45+
}

0 commit comments

Comments
 (0)