Skip to content
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

Pre-release changes [skip ci] #1931

Merged
merged 37 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
875ab4c
update package.json version
sestinj Jul 9, 2024
ff57b00
🪄 model dropdown, control plane (#1692)
sestinj Jul 9, 2024
1870787
skip extension tests
sestinj Jul 9, 2024
f747fe2
update package.json version
sestinj Jul 9, 2024
3ebd337
handlebars import
sestinj Jul 9, 2024
ed37dcf
cmd+I improvements (#1728)
sestinj Jul 12, 2024
ec2aa19
Dev (#1740)
sestinj Jul 16, 2024
75973ca
update jetbrains build
sestinj Jul 16, 2024
82ac619
jetbrains build update
sestinj Jul 16, 2024
62fa541
Dev (#1780)
sestinj Jul 19, 2024
11a5f78
fix tests (#1781)
sestinj Jul 19, 2024
7df690a
Dev (#1784)
Patrick-Erichsen Jul 19, 2024
e58fddc
test: skip failing tests
Patrick-Erichsen Jul 19, 2024
82db97e
Dev (#1807)
sestinj Jul 23, 2024
805984f
Improved walkDir performance (#1814)
sestinj Jul 23, 2024
9fd9ebf
config loading (#1820)
sestinj Jul 24, 2024
159295f
Improved indexing performance (#1845)
sestinj Jul 26, 2024
b3c484e
proxy updates (#1861)
sestinj Jul 29, 2024
18c4f8e
DeepSeek FIM Support (#1863)
sestinj Jul 29, 2024
9a9d776
update gradle version [skip ci] (#1865)
sestinj Jul 29, 2024
59f54e9
Merge branch 'main' into preview
sestinj Jul 29, 2024
00d19e6
fix: update CodebaseIndexer path (#1870)
alanwu4321 Jul 30, 2024
a5f9a0d
Fix VS Code settings (#1882)
sestinj Aug 1, 2024
579c5cd
Remove .prompts (#1883)
sestinj Aug 1, 2024
21e887d
git rm .prompts
sestinj Aug 1, 2024
eef928f
fix tests (#1884)
sestinj Aug 1, 2024
12205ac
fixes paste bug (#1899)
sestinj Aug 2, 2024
08f3f7b
fix failing test (#1903)
sestinj Aug 2, 2024
b95cfd8
actually skip broken test
sestinj Aug 2, 2024
460b7f7
skip again—succeeding locally
sestinj Aug 2, 2024
03040a0
Pre-release changes (#1927)
sestinj Aug 5, 2024
f733c2e
Pre-release changes (#1928)
sestinj Aug 5, 2024
69808ce
infoPopup (#1929)
sestinj Aug 5, 2024
8387e0e
Preview (#1750)
sestinj Jul 29, 2024
a3486bd
update ci
sestinj Jul 29, 2024
48efe92
Update select-model.md (#1879)
sbalk Aug 2, 2024
886bbaa
Merge branch 'main' into nate/main-rebased
sestinj Aug 5, 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: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,6 @@ Icon?
.continue

# Sandbox env default file
extensions/vscode/manual-testing-sandbox/example.ts
extensions/vscode/manual-testing-sandbox/example.ts

.prompts/
20 changes: 0 additions & 20 deletions .prompts/jest.prompt

This file was deleted.

28 changes: 26 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"CONTINUE_GLOBAL_DIR": "${workspaceFolder}/binary/.continue"
}
},

{
"name": "Debug Jest Tests",
"type": "node",
Expand All @@ -35,6 +34,7 @@
"--config",
"${workspaceRoot}/core/jest.config.js"
],

"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
},
Expand Down Expand Up @@ -113,7 +113,31 @@
],
"cwd": "${workspaceRoot}/core",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
"internalConsoleOptions": "neverOpen",
"env": {
"NODE_OPTIONS": "--experimental-vm-modules",
"CI": "true",
"DEBUG": "jest"
}
},
{
"name": "[openai-adapters] Jest Test Debugger, Current Open File",
"type": "node",
"request": "launch",
"runtimeArgs": [
"--inspect-brk",
"${workspaceRoot}/packages/openai-adapters/node_modules/jest/bin/jest.js",
"--runInBand",
"--config",
"${workspaceRoot}/packages/openai-adapters/jest.config.mjs",
"${relativeFile}"
],
"cwd": "${workspaceRoot}/packages/openai-adapters",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"env": {
"NODE_OPTIONS": "--experimental-vm-modules"
}
}
// {
// "name": "[openai-adapters] Jest Test Debugger, Current Open File",
Expand Down
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
}
},
"search.exclude": {
"./binary": true,
"**/core/vendor/**": true
"**/binary": true,
"**/core/vendor/**": true,
"**/gui/dist": true
}
}
5 changes: 3 additions & 2 deletions binary/package-lock.json

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

2 changes: 1 addition & 1 deletion binary/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "binary",
"version": "1.0.0",
"author": "Continue Dev, Inc",
"description": "",
"main": "out/index.js",
"bin": "out/index.js",
Expand All @@ -26,7 +27,6 @@
"build:dev": "tsc",
"esbuild": "node build.js --esbuild-only"
},
"author": "",
"license": "Apache-2.0",
"devDependencies": {
"@biomejs/biome": "1.6.4",
Expand Down
2 changes: 1 addition & 1 deletion binary/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"module": "commonjs",
"target": "ES2020",
"outDir": "out",
"lib": ["ES2020", "dom", "es6", "es5", "dom.iterable", "scripthost"],
"lib": ["ES2021", "dom", "es6", "es5", "dom.iterable", "scripthost"],
"sourceMap": true,
"rootDirs": ["src", "../core"],
"allowJs": true,
Expand Down
26 changes: 0 additions & 26 deletions biome.json

This file was deleted.

1 change: 0 additions & 1 deletion core/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"plugins": ["@typescript-eslint", "import"],
"rules": {
"quotes": ["warn", "double", {}],
"import/extensions": ["error", "ignorePackages"],
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "warn",
"curly": "warn",
Expand Down
6 changes: 3 additions & 3 deletions core/autocomplete/NearbyDefinitionsService.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { IDE, Location } from "..";
import { LANGUAGES } from "./languages";
import { getSymbolsForSnippet } from "./ranking";
import { IDE, Location } from "../index.js";
import { LANGUAGES } from "./languages.js";
import { getSymbolsForSnippet } from "./ranking.js";

interface FileInfo {
filepath: string;
Expand Down
18 changes: 16 additions & 2 deletions core/autocomplete/completionProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import { getTemplateForModel } from "./templates.js";
import { GeneratorReuseManager } from "./util.js";
// @prettier-ignore
import Handlebars from "handlebars";
import { getConfigJsonPath } from "../util/paths.js";

export interface AutocompleteInput {
completionId: string;
Expand Down Expand Up @@ -249,6 +250,11 @@ export class CompletionProvider {
...config.tabAutocompleteOptions,
};

// Check whether we're in the continue config.json file
if (input.filepath === getConfigJsonPath()) {
return undefined;
}

// Check whether autocomplete is disabled for this file
if (options.disableInFiles) {
// Relative path needed for `ignore`
Expand All @@ -266,7 +272,8 @@ export class CompletionProvider {
filepath = getBasename(filepath);
}

const pattern = ignore().add(options.disableInFiles);
// @ts-ignore
const pattern = ignore.default().add(options.disableInFiles);
if (pattern.ignores(filepath)) {
return undefined;
}
Expand Down Expand Up @@ -586,7 +593,14 @@ export class CompletionProvider {
});
} else {
// Let the template function format snippets
prompt = template(prefix, suffix, filepath, reponame, lang.name, snippets);
prompt = template(
prefix,
suffix,
filepath,
reponame,
lang.name,
snippets,
);
}

// Completion
Expand Down
2 changes: 1 addition & 1 deletion core/autocomplete/languages.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LineFilter } from "./lineStream";
import type { LineFilter } from "./lineStream.js";

export interface AutocompleteLanguageInfo {
name: string;
Expand Down
6 changes: 3 additions & 3 deletions core/autocomplete/postprocessing.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ILLM } from "..";
import { longestCommonSubsequence } from "../util/lcs";
import { lineIsRepeated } from "./lineStream";
import type { ILLM } from "../index.js";
import { longestCommonSubsequence } from "../util/lcs.js";
import { lineIsRepeated } from "./lineStream.js";

function rewritesLineAbove(completion: string, prefix: string): boolean {
const lineAbove = prefix
Expand Down
15 changes: 0 additions & 15 deletions core/biome.json

This file was deleted.

62 changes: 31 additions & 31 deletions core/config/ConfigHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,37 @@ export class ConfigHandler {
private profiles: ProfileLifecycleManager[];
private selectedProfileId: string;

constructor(
private readonly ide: IDE,
private ideSettingsPromise: Promise<IdeSettings>,
private readonly writeLog: (text: string) => Promise<void>,
private controlPlaneClient: ControlPlaneClient,
) {
this.ide = ide;
this.ideSettingsPromise = ideSettingsPromise;
this.writeLog = writeLog;

// Set local profile as default
const localProfileLoader = new LocalProfileLoader(
ide,
ideSettingsPromise,
controlPlaneClient,
writeLog,
);
this.profiles = [new ProfileLifecycleManager(localProfileLoader)];
this.selectedProfileId = localProfileLoader.profileId;

// Always load local profile immediately in case control plane doesn't load
try {
this.loadConfig();
} catch (e) {
console.error("Failed to load config: ", e);
}

// Load control plane profiles
this.fetchControlPlaneProfiles();
}

// This will be the local profile
private get fallbackProfile() {
return this.profiles[0];
Expand Down Expand Up @@ -163,37 +194,6 @@ export class ConfigHandler {
});
}

constructor(
private readonly ide: IDE,
private ideSettingsPromise: Promise<IdeSettings>,
private readonly writeLog: (text: string) => Promise<void>,
private controlPlaneClient: ControlPlaneClient,
) {
this.ide = ide;
this.ideSettingsPromise = ideSettingsPromise;
this.writeLog = writeLog;

// Set local profile as default
const localProfileLoader = new LocalProfileLoader(
ide,
ideSettingsPromise,
controlPlaneClient,
writeLog,
);
this.profiles = [new ProfileLifecycleManager(localProfileLoader)];
this.selectedProfileId = localProfileLoader.profileId;

// Always load local profile immediately in case control plane doesn't load
try {
this.loadConfig();
} catch (e) {
console.error("Failed to load config: ", e);
}

// Load control plane profiles
this.fetchControlPlaneProfiles();
}

async setSelectedProfile(profileId: string) {
this.selectedProfileId = profileId;
const newConfig = await this.loadConfig();
Expand Down
10 changes: 5 additions & 5 deletions core/config/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import CustomLLMClass from "../llm/llms/CustomLLM.js";
import FreeTrial from "../llm/llms/FreeTrial.js";
import { llmFromDescription } from "../llm/llms/index.js";

import { execSync } from "child_process";
import CodebaseContextProvider from "../context/providers/CodebaseContextProvider.js";
import ContinueProxyContextProvider from "../context/providers/ContinueProxyContextProvider.js";
import { fetchwithRequestOptions } from "../util/fetchWithOptions.js";
Expand All @@ -62,8 +63,6 @@ import {
slashCommandFromPromptFile,
} from "./promptFile.js";

const { execSync } = require("child_process");

function resolveSerializedConfig(filepath: string): SerializedContinueConfig {
let content = fs.readFileSync(filepath, "utf8");
const config = JSONC.parse(content) as unknown as SerializedContinueConfig;
Expand Down Expand Up @@ -465,6 +464,7 @@ function finalToBrowserConfig(
systemMessage: m.systemMessage,
requestOptions: m.requestOptions,
promptTemplates: m.promptTemplates as any,
capabilities: m.capabilities,
})),
systemMessage: final.systemMessage,
completionOptions: final.completionOptions,
Expand Down Expand Up @@ -534,7 +534,7 @@ async function buildConfigTs() {
);
} else {
// Dynamic import esbuild so potentially disastrous errors can be caught
const esbuild = require("esbuild");
const esbuild = await import("esbuild");

await esbuild.build({
entryPoints: [getConfigTsPath()],
Expand Down Expand Up @@ -586,7 +586,7 @@ async function loadFullConfigNode(
try {
// Try config.ts first
const configJsPath = getConfigJsPath();
const module = await require(configJsPath);
const module = await import(configJsPath);
delete require.cache[require.resolve(configJsPath)];
if (!module.modifyConfig) {
throw new Error("config.ts does not export a modifyConfig function.");
Expand All @@ -603,7 +603,7 @@ async function loadFullConfigNode(
const configJsPathForRemote = getConfigJsPathForRemote(
ideSettings.remoteConfigServerUrl,
);
const module = await require(configJsPathForRemote);
const module = await import(configJsPathForRemote);
delete require.cache[require.resolve(configJsPathForRemote)];
if (!module.modifyConfig) {
throw new Error("config.ts does not export a modifyConfig function.");
Expand Down
Loading
Loading