Skip to content

feat: perform FTS on file paths #1825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
ec2aa19
Dev (#1740)
sestinj Jul 16, 2024
75973ca
update jetbrains build
sestinj Jul 16, 2024
82ac619
jetbrains build update
sestinj Jul 16, 2024
c4a8d4f
test: add myers diff tests (#1754)
Patrick-Erichsen Jul 16, 2024
f2a04ef
feat: enhance help center (#1755)
Patrick-Erichsen Jul 17, 2024
c9635de
feat: add azure provider config (#1764)
Patrick-Erichsen Jul 17, 2024
06c84c0
autocomplete reload fix
sestinj Jul 17, 2024
2fb4c8c
logout of control plane
sestinj Jul 17, 2024
1ad3b60
Update QuickEditQuickPick.ts (#1772)
Patrick-Erichsen Jul 18, 2024
d51d33c
pass refreshed access token to continue-proxy model
sestinj Jul 18, 2024
1f62c32
test: add dir read check for walkDir (#1773)
Patrick-Erichsen Jul 18, 2024
d9952fb
gpt-4o-mini
sestinj Jul 18, 2024
99947c7
Merge branch 'dev' of https://github.com/continuedev/continue into dev
sestinj Jul 18, 2024
3371e12
gpt-4o-mini
sestinj Jul 19, 2024
f5d687f
gpt4omini to ui selector
sestinj Jul 19, 2024
6e8fc12
fix: layout alignment (#1779)
priyashpatil Jul 19, 2024
0d632ea
fix: delete old docs index on force re-index (#1778)
priyashpatil Jul 19, 2024
6275a95
add "Codebase Force Re-Index" command (#1757)
priyashpatil Jul 19, 2024
a3c4200
Add `HuggingFaceTEIReranker` (#1711)
LLukas22 Jul 19, 2024
fab48e9
Merge branch 'preview' into dev
sestinj Jul 19, 2024
9e4a350
update package.json version
sestinj Jul 19, 2024
ef5c6af
update config schemas
sestinj Jul 19, 2024
62fa541
Dev (#1780)
sestinj Jul 19, 2024
5399cc2
skip test failing only due to type error
sestinj Jul 19, 2024
ff8be81
Merge branch 'preview' into dev
sestinj Jul 19, 2024
11a5f78
fix tests (#1781)
sestinj Jul 19, 2024
6824497
fix: convert `walkDir` to an async generator (#1783)
Patrick-Erichsen Jul 19, 2024
87f11a8
chore: bump VS Code ext version
Patrick-Erichsen Jul 19, 2024
7df690a
Dev (#1784)
Patrick-Erichsen Jul 19, 2024
e58fddc
test: skip failing tests
Patrick-Erichsen Jul 19, 2024
60f7138
fix completions support in ContinueProxy
sestinj Jul 19, 2024
fa8eaa2
add test for walkDir
sestinj Jul 19, 2024
ce7b118
Merge branch 'dev' of https://github.com/continuedev/continue into dev
sestinj Jul 19, 2024
07d6511
IAnalyticsProvider
sestinj Jul 19, 2024
d9f0c4f
feat: crawl `.mdx` docs
Patrick-Erichsen Jul 19, 2024
a894dd8
update workspaces on session info change
sestinj Jul 19, 2024
c3fcb89
rename from profile to workspace (user-facing)
sestinj Jul 19, 2024
38d98e4
Merge branch 'dev' of https://github.com/continuedev/continue into dev
sestinj Jul 20, 2024
27772b9
update config schema files
sestinj Jul 20, 2024
8478af6
feat: improve chat thread ui for better readability (#1786)
priyashpatil Jul 22, 2024
8d83472
add "language" template variable for autocomplete
sestinj Jul 22, 2024
423a816
Merge branch 'dev' of https://github.com/continuedev/continue into dev
sestinj Jul 22, 2024
570afb8
Enable debug logs (#1800)
joshvera Jul 22, 2024
447e1e6
Refresh index fixes (#1795)
joshvera Jul 22, 2024
5fc8c14
docs: change page heading to model providers (#1684)
priyashpatil Jul 22, 2024
e0079a4
feat: allow JetBrains users to index docs (#1797)
Patrick-Erichsen Jul 22, 2024
a758d75
Index on file change (#1785)
joshvera Jul 22, 2024
b26bde7
Add Pause Codebase On Start setting (#1788)
joshvera Jul 22, 2024
b065333
Un-shadow file context provider (#1801)
pzaback Jul 22, 2024
2185344
chore: add telemetry to alt-enter (#1805)
Patrick-Erichsen Jul 22, 2024
7004694
Set the indexProgress indicator to paused on startup if pauseCodebase…
joshvera Jul 22, 2024
fe4a987
Fix Input Toolbar layout (#1792)
joshvera Jul 22, 2024
087ec6c
Add a Delete Message button to the StepContainer (#1790)
joshvera Jul 22, 2024
0fa0c3b
Simplify walkDir(...) and improve performance by roughly 10x in large…
spew Jul 23, 2024
b46706a
modified assistant indicator in UI
sestinj Jul 23, 2024
3fe16e4
update package.json version
sestinj Jul 23, 2024
8fe87af
Merge branch 'preview' into dev
sestinj Jul 23, 2024
82db97e
Dev (#1807)
sestinj Jul 23, 2024
bccbff2
feat: add Llama 3.1 8B to cloudflare provider options (#1811)
deloreyj Jul 23, 2024
be1fc90
increase gemini pro contextLength (#1809)
pzaback Jul 23, 2024
be035fd
fix indentation (#1808)
pzaback Jul 23, 2024
37b8bee
Llama 3.1 405b model selection (#1813)
sestinj Jul 23, 2024
66d1b79
fix walkDir tests on windows
sestinj Jul 23, 2024
f64f6b7
Merge branch 'dev' of https://github.com/continuedev/continue into dev
sestinj Jul 23, 2024
d80837a
Merge branch 'preview' into dev
sestinj Jul 23, 2024
dafd2c4
chore: add docs as top level config (#1816)
Patrick-Erichsen Jul 23, 2024
7b86678
feat: make @codebase a hardcoded ctx provider (#1818)
Patrick-Erichsen Jul 23, 2024
3c61b6e
docs schema
sestinj Jul 24, 2024
4d09b49
Nate/dev (#1819)
sestinj Jul 24, 2024
58a7ee8
update package.json version
sestinj Jul 24, 2024
900ec56
feat: perform FTS on file paths
Patrick-Erichsen Jul 24, 2024
c9655a3
code cleanup
Patrick-Erichsen Jul 24, 2024
d6c2e36
Add CodeGeeX4 code completion support (#1815)
ekatiyar Jul 24, 2024
8a4d57f
manually stop at stop tokens for all providers
sestinj Jul 24, 2024
d53326c
Merge branch 'dev' of https://github.com/continuedev/continue into dev
sestinj Jul 24, 2024
e35ecbc
add test cases and pipeline
Patrick-Erichsen Jul 24, 2024
7478625
Merge branch 'dev' into pe/match-file-paths-in-search
Patrick-Erichsen Jul 24, 2024
0fb978b
Merge pull request #1 from Patrick-Erichsen/pe/nate-eval-dev-merge
Patrick-Erichsen Jul 24, 2024
8eb685a
merge dev updates
Patrick-Erichsen Jul 24, 2024
28973c5
Update index.ts
Patrick-Erichsen Jul 24, 2024
f8aee83
add tests
Patrick-Erichsen Jul 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/jetbrains-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ jobs:
id: artifact
shell: bash
run: |
cd ${{ github.workspace }}/extensions/intellij/build/distributions
cd ../../extensions/intellij/build/distributions
FILENAME=`ls *.zip`
unzip "$FILENAME" -d content

echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT
echo "filename=${FILENAME%.????}" >> $GITHUB_OUTPUT

# Store already-built plugin as an artifact for downloading
- name: Upload artifact
Expand Down
5 changes: 4 additions & 1 deletion binary/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions core/autocomplete/completionProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import AutocompleteLruCache from "./cache.js";
import {
noFirstCharNewline,
onlyWhitespaceAfterEndOfLine,
stopAtStopTokens,
} from "./charStream.js";
import {
constructAutocompletePrompt,
Expand Down Expand Up @@ -582,6 +583,7 @@ export class CompletionProvider {
suffix,
filename,
reponame,
language: lang.name,
});
} else {
// Let the template function format snippets
Expand Down Expand Up @@ -662,6 +664,7 @@ export class CompletionProvider {
lang.endOfLine,
fullStop,
);
charGenerator = stopAtStopTokens(charGenerator, stop);
charGenerator = this.bracketMatchingService.stopOnUnmatchedClosingBracket(
charGenerator,
prefix,
Expand Down
24 changes: 24 additions & 0 deletions core/autocomplete/languages.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { LineFilter } from "./lineStream.js";

export interface AutocompleteLanguageInfo {
name: string;
topLevelKeywords: string[];
singleLineComment: string;
endOfLine: string[];
Expand All @@ -14,13 +15,15 @@ export interface AutocompleteLanguageInfo {

// TypeScript
export const Typescript = {
name: "TypeScript",
topLevelKeywords: ["function", "class", "module", "export", "import"],
singleLineComment: "//",
endOfLine: [";"],
};

// Python
export const Python = {
name: "Python",
// """"#" is for .ipynb files, where we add '"""' surrounding markdown blocks.
// This stops the model from trying to complete the start of a new markdown block
topLevelKeywords: ["def", "class", '"""#'],
Expand All @@ -30,55 +33,63 @@ export const Python = {

// Java
export const Java = {
name: "Java",
topLevelKeywords: ["class", "function"],
singleLineComment: "//",
endOfLine: [";"],
};

// C++
export const Cpp = {
name: "C++",
topLevelKeywords: ["class", "namespace", "template"],
singleLineComment: "//",
endOfLine: [";"],
};

// C#
export const CSharp = {
name: "C#",
topLevelKeywords: ["class", "namespace", "void"],
singleLineComment: "//",
endOfLine: [";"],
};

// C
export const C = {
name: "C",
topLevelKeywords: ["if", "else", "while", "for", "switch", "case"],
singleLineComment: "//",
endOfLine: [";"],
};

// Scala
export const Scala = {
name: "Scala",
topLevelKeywords: ["def", "val", "var", "class", "object", "trait"],
singleLineComment: "//",
endOfLine: [";"],
};

// Go
export const Go = {
name: "Go",
topLevelKeywords: ["func", "package", "import", "type"],
singleLineComment: "//",
endOfLine: [],
};

// Rust
export const Rust = {
name: "Rust",
topLevelKeywords: ["fn", "mod", "pub", "struct", "enum", "trait"],
singleLineComment: "//",
endOfLine: [";"],
};

// Haskell
export const Haskell = {
name: "Haskell",
topLevelKeywords: [
"data",
"type",
Expand All @@ -95,48 +106,55 @@ export const Haskell = {

// PHP
export const PHP = {
name: "PHP",
topLevelKeywords: ["function", "class", "namespace", "use"],
singleLineComment: "//",
endOfLine: [";"],
};

// Ruby on Rails
export const RubyOnRails = {
name: "Ruby on Rails",
topLevelKeywords: ["def", "class", "module"],
singleLineComment: "#",
endOfLine: [],
};

// Swift
export const Swift = {
name: "Swift",
topLevelKeywords: ["func", "class", "struct", "import"],
singleLineComment: "//",
endOfLine: [";"],
};

// Kotlin
export const Kotlin = {
name: "Kotlin",
topLevelKeywords: ["fun", "class", "package", "import"],
singleLineComment: "//",
endOfLine: [";"],
};

// Ruby
export const Ruby = {
name: "Ruby",
topLevelKeywords: ["class", "module", "def"],
singleLineComment: "#",
endOfLine: [],
};

// Clojure
export const Clojure = {
name: "Clojure",
topLevelKeywords: ["def", "fn", "let", "do", "if", "defn", "ns", "defmacro"],
singleLineComment: ";",
endOfLine: [],
};

// Julia
export const Julia = {
name: "Julia",
topLevelKeywords: [
"function",
"macro",
Expand All @@ -155,6 +173,7 @@ export const Julia = {

// F#
export const FSharp = {
name: "F#",
topLevelKeywords: [
"let",
"type",
Expand All @@ -173,6 +192,7 @@ export const FSharp = {

// R
export const R = {
name: "R",
topLevelKeywords: [
"function",
"if",
Expand All @@ -189,13 +209,15 @@ export const R = {

// Dart
export const Dart = {
name: "Dart",
topLevelKeywords: ["class", "import", "void", "enum"],
singleLineComment: "//",
endOfLine: [";"],
};

// Solidity
export const Solidity = {
name: "Solidity",
topLevelKeywords: [
"contract",
"event",
Expand All @@ -218,6 +240,7 @@ export const Solidity = {

// YAML
export const YAML: AutocompleteLanguageInfo = {
name: "YAML",
topLevelKeywords: [],
singleLineComment: "#",
endOfLine: [],
Expand Down Expand Up @@ -258,6 +281,7 @@ export const YAML: AutocompleteLanguageInfo = {
};

export const Markdown: AutocompleteLanguageInfo = {
name: "Markdown",
topLevelKeywords: [],
singleLineComment: "",
endOfLine: [],
Expand Down
12 changes: 5 additions & 7 deletions core/autocomplete/retrieval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@ export async function fullTextRetrieve(
const searchStrings = prefix.split("\n").slice(-3);
const results: Chunk[] = [];
searchStrings.forEach(async (searchString) => {
const chunks = await index.retrieve(
[indexTag],
searchString,
3,
undefined,
undefined,
);
const chunks = await index.retrieve({
tags: [indexTag],
text: searchString,
n: 3,
});
results.push(...chunks);
});
return results;
Expand Down
35 changes: 32 additions & 3 deletions core/autocomplete/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,34 @@ const deepseekFimTemplate: AutocompleteTemplate = {
},
};

const deepseekFimTemplateWrongPipeChar: AutocompleteTemplate = {
template: "<|fim▁begin|>{{{prefix}}}<|fim▁hole|>{{{suffix}}}<|fim▁end|>",
completionOptions: { stop: ["<|fim▁begin|>", "<|fim▁hole|>", "<|fim▁end|>"] },
// https://github.com/THUDM/CodeGeeX4/blob/main/guides/Infilling_guideline.md
const codegeexFimTemplate: AutocompleteTemplate = {
template: (
prefix: string,
suffix: string,
filepath: string,
reponame: string,
snippets: AutocompleteSnippet[],
): string => {
const relativePaths = shortestRelativePaths([
...snippets.map((snippet) => snippet.filepath),
filepath,
]);
const baseTemplate = `###PATH:${relativePaths[relativePaths.length - 1]}\n###LANGUAGE:\n###MODE:\n<|code_suffix|>${suffix}<|code_prefix|>${prefix}<|code_middle|>`;
if (snippets.length == 0)
{
return baseTemplate;
}
const references =
`###REFERENCE:\n${snippets
.map((snippet, i) => `###PATH:${relativePaths[i]}\n${snippet.contents}\n`)
.join("###REFERENCE:\n")}`;
const prompt = `${references}\n${baseTemplate}`;
return prompt;
},
completionOptions: {
stop: ["<|code_suffix|>", "<|code_prefix|>", "<|code_middle|>"],
},
};

const gptAutocompleteTemplate: AutocompleteTemplate = {
Expand Down Expand Up @@ -307,6 +332,10 @@ export function getTemplateForModel(model: string): AutocompleteTemplate {
return deepseekFimTemplate;
}

if (lowerCaseModel.includes("codegeex")) {
return codegeexFimTemplate;
}

if (
lowerCaseModel.includes("gpt") ||
lowerCaseModel.includes("davinci-002") ||
Expand Down
Loading