SIGN IN SIGN UP
continuedev / continue UNCLAIMED

⏩ Source-controlled AI checks, enforceable in CI. Powered by the open-source Continue CLI

0 0 77 TypeScript
2024-09-01 15:54:16 -07:00
import { SerializedContinueConfig } from "core";
// import Mock from "core/llm/llms/Mock.js";
fix ollama onboarding (#1539) * allow setting apiBase for bedrock provider * ⚡️ better linking * ✨ new prompt file action * ⚡️ strip <COMPLETION> from GPT-4 completion * continue proxy FIM support * warn user if potentially dangerous command is generated * tab autocomplete docs * docs: update PR template (#1531) * chore: add docs to install script (#1533) * fix(extensions): schema for db ctx provider (#1534) * fix(extensions): schema for db ctx provider * fix: invalid enum * prettierignore * docs: add docs and schema for "OS" provider (#1536) * tests (#1501) * 👷 CI for jetbrains * default working dir * changelog * build binaries * binary testing setup * idesettings * core binary testing * run binary tests in ci * remove unused targets * needs build * console.log bin contents * fix ci * fix win32 binary download * test * no linux arm64 * macos latest * macos-12 * binary permissions * upload logs * fix * upload full folder as binary artifact * test * test macos only * set full execute permissions * copy sqlite binary * cd * it worked! * build again in test job * debug * remove timeout * info * log * log2 * more logs * catch * fewer logs * test all platforms * test downloaded artifact * needs build * updates * build * false * release * add tag and upload binaryes * change tag name * proper artifact upload * jest updates * ✅ generate a few unit tests with Continue * fix imports related to IdeSettings * run tsc on PRs * remove shareSession command (unused) * update release process * update plugin version * don't show ghost text when jetbrains completion visible * run jetbrains ci in main * check ts in dev * ignore .env * 🚑 fix constant warnings when onboarding with Ollama --------- Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2024-06-21 11:09:03 -07:00
import { FromIdeProtocol, ToIdeProtocol } from "core/protocol/index.js";
2024-12-05 21:48:06 -08:00
import { IMessenger } from "core/protocol/messenger";
2024-12-24 14:03:23 -05:00
import FileSystemIde from "core/util/filesystem";
fix ollama onboarding (#1539) * allow setting apiBase for bedrock provider * ⚡️ better linking * ✨ new prompt file action * ⚡️ strip <COMPLETION> from GPT-4 completion * continue proxy FIM support * warn user if potentially dangerous command is generated * tab autocomplete docs * docs: update PR template (#1531) * chore: add docs to install script (#1533) * fix(extensions): schema for db ctx provider (#1534) * fix(extensions): schema for db ctx provider * fix: invalid enum * prettierignore * docs: add docs and schema for "OS" provider (#1536) * tests (#1501) * 👷 CI for jetbrains * default working dir * changelog * build binaries * binary testing setup * idesettings * core binary testing * run binary tests in ci * remove unused targets * needs build * console.log bin contents * fix ci * fix win32 binary download * test * no linux arm64 * macos latest * macos-12 * binary permissions * upload logs * fix * upload full folder as binary artifact * test * test macos only * set full execute permissions * copy sqlite binary * cd * it worked! * build again in test job * debug * remove timeout * info * log * log2 * more logs * catch * fewer logs * test all platforms * test downloaded artifact * needs build * updates * build * false * release * add tag and upload binaryes * change tag name * proper artifact upload * jest updates * ✅ generate a few unit tests with Continue * fix imports related to IdeSettings * run tsc on PRs * remove shareSession command (unused) * update release process * update plugin version * don't show ghost text when jetbrains completion visible * run jetbrains ci in main * check ts in dev * ignore .env * 🚑 fix constant warnings when onboarding with Ollama --------- Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2024-06-21 11:09:03 -07:00
import fs from "fs";
2024-09-21 10:55:40 -07:00
import {
ChildProcessWithoutNullStreams,
execSync,
spawn,
} from "node:child_process";
fix ollama onboarding (#1539) * allow setting apiBase for bedrock provider * ⚡️ better linking * ✨ new prompt file action * ⚡️ strip <COMPLETION> from GPT-4 completion * continue proxy FIM support * warn user if potentially dangerous command is generated * tab autocomplete docs * docs: update PR template (#1531) * chore: add docs to install script (#1533) * fix(extensions): schema for db ctx provider (#1534) * fix(extensions): schema for db ctx provider * fix: invalid enum * prettierignore * docs: add docs and schema for "OS" provider (#1536) * tests (#1501) * 👷 CI for jetbrains * default working dir * changelog * build binaries * binary testing setup * idesettings * core binary testing * run binary tests in ci * remove unused targets * needs build * console.log bin contents * fix ci * fix win32 binary download * test * no linux arm64 * macos latest * macos-12 * binary permissions * upload logs * fix * upload full folder as binary artifact * test * test macos only * set full execute permissions * copy sqlite binary * cd * it worked! * build again in test job * debug * remove timeout * info * log * log2 * more logs * catch * fewer logs * test all platforms * test downloaded artifact * needs build * updates * build * false * release * add tag and upload binaryes * change tag name * proper artifact upload * jest updates * ✅ generate a few unit tests with Continue * fix imports related to IdeSettings * run tsc on PRs * remove shareSession command (unused) * update release process * update plugin version * don't show ghost text when jetbrains completion visible * run jetbrains ci in main * check ts in dev * ignore .env * 🚑 fix constant warnings when onboarding with Ollama --------- Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2024-06-21 11:09:03 -07:00
import path from "path";
import {
CoreBinaryMessenger,
CoreBinaryTcpMessenger,
} from "../src/IpcMessenger";
// jest.setTimeout(100_000);
const USE_TCP = false;
function autodetectPlatformAndArch() {
const platform = {
aix: "linux",
darwin: "darwin",
freebsd: "linux",
linux: "linux",
openbsd: "linux",
sunos: "linux",
win32: "win32",
android: "linux",
cygwin: "win32",
netbsd: "linux",
haiku: "linux",
}[process.platform];
const arch = {
arm: "arm64",
arm64: "arm64",
ia32: "x64",
loong64: "arm64",
mips: "arm64",
mipsel: "arm64",
ppc: "x64",
ppc64: "x64",
riscv64: "arm64",
s390: "x64",
s390x: "x64",
x64: "x64",
}[process.arch];
return [platform, arch];
}
const CONTINUE_GLOBAL_DIR = path.join(__dirname, "..", ".continue");
2024-09-01 15:54:16 -07:00
if (fs.existsSync(CONTINUE_GLOBAL_DIR)) {
fs.rmSync(CONTINUE_GLOBAL_DIR, { recursive: true, force: true });
}
fs.mkdirSync(CONTINUE_GLOBAL_DIR);
fix ollama onboarding (#1539) * allow setting apiBase for bedrock provider * ⚡️ better linking * ✨ new prompt file action * ⚡️ strip <COMPLETION> from GPT-4 completion * continue proxy FIM support * warn user if potentially dangerous command is generated * tab autocomplete docs * docs: update PR template (#1531) * chore: add docs to install script (#1533) * fix(extensions): schema for db ctx provider (#1534) * fix(extensions): schema for db ctx provider * fix: invalid enum * prettierignore * docs: add docs and schema for "OS" provider (#1536) * tests (#1501) * 👷 CI for jetbrains * default working dir * changelog * build binaries * binary testing setup * idesettings * core binary testing * run binary tests in ci * remove unused targets * needs build * console.log bin contents * fix ci * fix win32 binary download * test * no linux arm64 * macos latest * macos-12 * binary permissions * upload logs * fix * upload full folder as binary artifact * test * test macos only * set full execute permissions * copy sqlite binary * cd * it worked! * build again in test job * debug * remove timeout * info * log * log2 * more logs * catch * fewer logs * test all platforms * test downloaded artifact * needs build * updates * build * false * release * add tag and upload binaryes * change tag name * proper artifact upload * jest updates * ✅ generate a few unit tests with Continue * fix imports related to IdeSettings * run tsc on PRs * remove shareSession command (unused) * update release process * update plugin version * don't show ghost text when jetbrains completion visible * run jetbrains ci in main * check ts in dev * ignore .env * 🚑 fix constant warnings when onboarding with Ollama --------- Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2024-06-21 11:09:03 -07:00
describe("Test Suite", () => {
let messenger: IMessenger<ToIdeProtocol, FromIdeProtocol>;
let subprocess: ChildProcessWithoutNullStreams;
beforeAll(async () => {
const [platform, arch] = autodetectPlatformAndArch();
2024-09-21 10:55:40 -07:00
const binaryDir = path.join(__dirname, "..", "bin", `${platform}-${arch}`);
const exe = platform === "win32" ? ".exe" : "";
const binaryPath = path.join(binaryDir, `continue-binary${exe}`);
const expectedItems = [
`continue-binary${exe}`,
`esbuild${exe}`,
"index.node",
"package.json",
"build/Release/node_sqlite3.node",
];
expectedItems.forEach((item) => {
expect(fs.existsSync(path.join(binaryDir, item))).toBe(true);
});
// Set execute permissions and remove quarantine attribute if on macOS
if (platform !== "win32") {
try {
fs.chmodSync(binaryPath, 0o755);
console.log("Execute permissions set for the binary");
2024-09-21 15:30:28 -07:00
if (platform === "darwin") {
2024-09-21 10:55:40 -07:00
const indexNodePath = path.join(binaryDir, "index.node");
const filesToUnquarantine = [binaryPath, indexNodePath];
for (const file of filesToUnquarantine) {
try {
execSync(`xattr -d com.apple.quarantine "${file}"`, {
stdio: "ignore",
});
console.log(
`Quarantine attribute removed from ${path.basename(file)}`,
);
} catch (error) {
console.warn(
`Failed to remove quarantine attribute from ${path.basename(file)}:`,
error,
);
}
}
}
} catch (error) {
console.error(
"Error setting permissions or removing quarantine:",
error,
);
}
}
fix ollama onboarding (#1539) * allow setting apiBase for bedrock provider * ⚡️ better linking * ✨ new prompt file action * ⚡️ strip <COMPLETION> from GPT-4 completion * continue proxy FIM support * warn user if potentially dangerous command is generated * tab autocomplete docs * docs: update PR template (#1531) * chore: add docs to install script (#1533) * fix(extensions): schema for db ctx provider (#1534) * fix(extensions): schema for db ctx provider * fix: invalid enum * prettierignore * docs: add docs and schema for "OS" provider (#1536) * tests (#1501) * 👷 CI for jetbrains * default working dir * changelog * build binaries * binary testing setup * idesettings * core binary testing * run binary tests in ci * remove unused targets * needs build * console.log bin contents * fix ci * fix win32 binary download * test * no linux arm64 * macos latest * macos-12 * binary permissions * upload logs * fix * upload full folder as binary artifact * test * test macos only * set full execute permissions * copy sqlite binary * cd * it worked! * build again in test job * debug * remove timeout * info * log * log2 * more logs * catch * fewer logs * test all platforms * test downloaded artifact * needs build * updates * build * false * release * add tag and upload binaryes * change tag name * proper artifact upload * jest updates * ✅ generate a few unit tests with Continue * fix imports related to IdeSettings * run tsc on PRs * remove shareSession command (unused) * update release process * update plugin version * don't show ghost text when jetbrains completion visible * run jetbrains ci in main * check ts in dev * ignore .env * 🚑 fix constant warnings when onboarding with Ollama --------- Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2024-06-21 11:09:03 -07:00
if (USE_TCP) {
messenger = new CoreBinaryTcpMessenger<ToIdeProtocol, FromIdeProtocol>();
} else {
2024-09-21 10:55:40 -07:00
try {
subprocess = spawn(binaryPath, {
env: { ...process.env, CONTINUE_GLOBAL_DIR },
});
2024-09-21 15:30:28 -07:00
console.log("Successfully spawned subprocess");
2024-09-21 10:55:40 -07:00
} catch (error) {
console.error("Error spawning subprocess:", error);
throw error;
}
fix ollama onboarding (#1539) * allow setting apiBase for bedrock provider * ⚡️ better linking * ✨ new prompt file action * ⚡️ strip <COMPLETION> from GPT-4 completion * continue proxy FIM support * warn user if potentially dangerous command is generated * tab autocomplete docs * docs: update PR template (#1531) * chore: add docs to install script (#1533) * fix(extensions): schema for db ctx provider (#1534) * fix(extensions): schema for db ctx provider * fix: invalid enum * prettierignore * docs: add docs and schema for "OS" provider (#1536) * tests (#1501) * 👷 CI for jetbrains * default working dir * changelog * build binaries * binary testing setup * idesettings * core binary testing * run binary tests in ci * remove unused targets * needs build * console.log bin contents * fix ci * fix win32 binary download * test * no linux arm64 * macos latest * macos-12 * binary permissions * upload logs * fix * upload full folder as binary artifact * test * test macos only * set full execute permissions * copy sqlite binary * cd * it worked! * build again in test job * debug * remove timeout * info * log * log2 * more logs * catch * fewer logs * test all platforms * test downloaded artifact * needs build * updates * build * false * release * add tag and upload binaryes * change tag name * proper artifact upload * jest updates * ✅ generate a few unit tests with Continue * fix imports related to IdeSettings * run tsc on PRs * remove shareSession command (unused) * update release process * update plugin version * don't show ghost text when jetbrains completion visible * run jetbrains ci in main * check ts in dev * ignore .env * 🚑 fix constant warnings when onboarding with Ollama --------- Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2024-06-21 11:09:03 -07:00
messenger = new CoreBinaryMessenger<ToIdeProtocol, FromIdeProtocol>(
subprocess,
);
}
const testDir = path.join(__dirname, "..", ".test");
if (!fs.existsSync(testDir)) {
fs.mkdirSync(testDir);
}
const ide = new FileSystemIde(testDir);
2024-12-05 21:48:06 -08:00
// const reverseIde = new ReverseMessageIde(messenger.on.bind(messenger), ide);
fix ollama onboarding (#1539) * allow setting apiBase for bedrock provider * ⚡️ better linking * ✨ new prompt file action * ⚡️ strip <COMPLETION> from GPT-4 completion * continue proxy FIM support * warn user if potentially dangerous command is generated * tab autocomplete docs * docs: update PR template (#1531) * chore: add docs to install script (#1533) * fix(extensions): schema for db ctx provider (#1534) * fix(extensions): schema for db ctx provider * fix: invalid enum * prettierignore * docs: add docs and schema for "OS" provider (#1536) * tests (#1501) * 👷 CI for jetbrains * default working dir * changelog * build binaries * binary testing setup * idesettings * core binary testing * run binary tests in ci * remove unused targets * needs build * console.log bin contents * fix ci * fix win32 binary download * test * no linux arm64 * macos latest * macos-12 * binary permissions * upload logs * fix * upload full folder as binary artifact * test * test macos only * set full execute permissions * copy sqlite binary * cd * it worked! * build again in test job * debug * remove timeout * info * log * log2 * more logs * catch * fewer logs * test all platforms * test downloaded artifact * needs build * updates * build * false * release * add tag and upload binaryes * change tag name * proper artifact upload * jest updates * ✅ generate a few unit tests with Continue * fix imports related to IdeSettings * run tsc on PRs * remove shareSession command (unused) * update release process * update plugin version * don't show ghost text when jetbrains completion visible * run jetbrains ci in main * check ts in dev * ignore .env * 🚑 fix constant warnings when onboarding with Ollama --------- Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2024-06-21 11:09:03 -07:00
// Wait for core to set itself up
await new Promise((resolve) => setTimeout(resolve, 1000));
});
afterAll(async () => {
// Wait for the subprocess to exit
if (USE_TCP) {
(
messenger as CoreBinaryTcpMessenger<ToIdeProtocol, FromIdeProtocol>
).close();
} else {
subprocess.kill();
await new Promise((resolve) => subprocess.on("close", resolve));
await new Promise((resolve) => setTimeout(resolve, 1000));
}
});
it("should respond to ping with pong", async () => {
const resp = await messenger.request("ping", "ping");
expect(resp).toBe("pong");
});
it("should create .continue directory at the specified location with expected files", async () => {
expect(fs.existsSync(CONTINUE_GLOBAL_DIR)).toBe(true);
// Many of the files are only created when trying to load the config
const config = await messenger.request(
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 <patrick.a.erichsen@gmail.com> Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> Co-authored-by: Jonah Wagner <jonahwagner231@gmail.com> Co-authored-by: YohannZe <99359799+YohannZe@users.noreply.github.com> Co-authored-by: Dan Dascalescu <ddascalescu+github@gmail.com>
2024-07-08 21:51:53 -07:00
"config/getSerializedProfileInfo",
fix ollama onboarding (#1539) * allow setting apiBase for bedrock provider * ⚡️ better linking * ✨ new prompt file action * ⚡️ strip <COMPLETION> from GPT-4 completion * continue proxy FIM support * warn user if potentially dangerous command is generated * tab autocomplete docs * docs: update PR template (#1531) * chore: add docs to install script (#1533) * fix(extensions): schema for db ctx provider (#1534) * fix(extensions): schema for db ctx provider * fix: invalid enum * prettierignore * docs: add docs and schema for "OS" provider (#1536) * tests (#1501) * 👷 CI for jetbrains * default working dir * changelog * build binaries * binary testing setup * idesettings * core binary testing * run binary tests in ci * remove unused targets * needs build * console.log bin contents * fix ci * fix win32 binary download * test * no linux arm64 * macos latest * macos-12 * binary permissions * upload logs * fix * upload full folder as binary artifact * test * test macos only * set full execute permissions * copy sqlite binary * cd * it worked! * build again in test job * debug * remove timeout * info * log * log2 * more logs * catch * fewer logs * test all platforms * test downloaded artifact * needs build * updates * build * false * release * add tag and upload binaryes * change tag name * proper artifact upload * jest updates * ✅ generate a few unit tests with Continue * fix imports related to IdeSettings * run tsc on PRs * remove shareSession command (unused) * update release process * update plugin version * don't show ghost text when jetbrains completion visible * run jetbrains ci in main * check ts in dev * ignore .env * 🚑 fix constant warnings when onboarding with Ollama --------- Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2024-06-21 11:09:03 -07:00
undefined,
);
const expectedFiles = [
"config.json",
"config.ts",
"package.json",
"logs/core.log",
"index/autocompleteCache.sqlite",
"types/core/index.d.ts",
];
2024-09-21 11:02:52 -07:00
const missingFiles = expectedFiles.filter((file) => {
fix ollama onboarding (#1539) * allow setting apiBase for bedrock provider * ⚡️ better linking * ✨ new prompt file action * ⚡️ strip <COMPLETION> from GPT-4 completion * continue proxy FIM support * warn user if potentially dangerous command is generated * tab autocomplete docs * docs: update PR template (#1531) * chore: add docs to install script (#1533) * fix(extensions): schema for db ctx provider (#1534) * fix(extensions): schema for db ctx provider * fix: invalid enum * prettierignore * docs: add docs and schema for "OS" provider (#1536) * tests (#1501) * 👷 CI for jetbrains * default working dir * changelog * build binaries * binary testing setup * idesettings * core binary testing * run binary tests in ci * remove unused targets * needs build * console.log bin contents * fix ci * fix win32 binary download * test * no linux arm64 * macos latest * macos-12 * binary permissions * upload logs * fix * upload full folder as binary artifact * test * test macos only * set full execute permissions * copy sqlite binary * cd * it worked! * build again in test job * debug * remove timeout * info * log * log2 * more logs * catch * fewer logs * test all platforms * test downloaded artifact * needs build * updates * build * false * release * add tag and upload binaryes * change tag name * proper artifact upload * jest updates * ✅ generate a few unit tests with Continue * fix imports related to IdeSettings * run tsc on PRs * remove shareSession command (unused) * update release process * update plugin version * don't show ghost text when jetbrains completion visible * run jetbrains ci in main * check ts in dev * ignore .env * 🚑 fix constant warnings when onboarding with Ollama --------- Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2024-06-21 11:09:03 -07:00
const filePath = path.join(CONTINUE_GLOBAL_DIR, file);
2024-09-21 11:02:52 -07:00
return !fs.existsSync(filePath);
});
expect(missingFiles).toEqual([]);
if (missingFiles.length > 0) {
console.log("Missing files:", missingFiles);
fix ollama onboarding (#1539) * allow setting apiBase for bedrock provider * ⚡️ better linking * ✨ new prompt file action * ⚡️ strip <COMPLETION> from GPT-4 completion * continue proxy FIM support * warn user if potentially dangerous command is generated * tab autocomplete docs * docs: update PR template (#1531) * chore: add docs to install script (#1533) * fix(extensions): schema for db ctx provider (#1534) * fix(extensions): schema for db ctx provider * fix: invalid enum * prettierignore * docs: add docs and schema for "OS" provider (#1536) * tests (#1501) * 👷 CI for jetbrains * default working dir * changelog * build binaries * binary testing setup * idesettings * core binary testing * run binary tests in ci * remove unused targets * needs build * console.log bin contents * fix ci * fix win32 binary download * test * no linux arm64 * macos latest * macos-12 * binary permissions * upload logs * fix * upload full folder as binary artifact * test * test macos only * set full execute permissions * copy sqlite binary * cd * it worked! * build again in test job * debug * remove timeout * info * log * log2 * more logs * catch * fewer logs * test all platforms * test downloaded artifact * needs build * updates * build * false * release * add tag and upload binaryes * change tag name * proper artifact upload * jest updates * ✅ generate a few unit tests with Continue * fix imports related to IdeSettings * run tsc on PRs * remove shareSession command (unused) * update release process * update plugin version * don't show ghost text when jetbrains completion visible * run jetbrains ci in main * check ts in dev * ignore .env * 🚑 fix constant warnings when onboarding with Ollama --------- Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2024-06-21 11:09:03 -07:00
}
});
2024-09-01 15:54:16 -07:00
it("should return valid config object", async () => {
2024-12-24 14:03:23 -05:00
const { result } = await messenger.request(
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 <patrick.a.erichsen@gmail.com> Co-authored-by: Priyash <38959321+priyashpatil@users.noreply.github.com> Co-authored-by: Jonah Wagner <jonahwagner231@gmail.com> Co-authored-by: YohannZe <99359799+YohannZe@users.noreply.github.com> Co-authored-by: Dan Dascalescu <ddascalescu+github@gmail.com>
2024-07-08 21:51:53 -07:00
"config/getSerializedProfileInfo",
fix ollama onboarding (#1539) * allow setting apiBase for bedrock provider * ⚡️ better linking * ✨ new prompt file action * ⚡️ strip <COMPLETION> from GPT-4 completion * continue proxy FIM support * warn user if potentially dangerous command is generated * tab autocomplete docs * docs: update PR template (#1531) * chore: add docs to install script (#1533) * fix(extensions): schema for db ctx provider (#1534) * fix(extensions): schema for db ctx provider * fix: invalid enum * prettierignore * docs: add docs and schema for "OS" provider (#1536) * tests (#1501) * 👷 CI for jetbrains * default working dir * changelog * build binaries * binary testing setup * idesettings * core binary testing * run binary tests in ci * remove unused targets * needs build * console.log bin contents * fix ci * fix win32 binary download * test * no linux arm64 * macos latest * macos-12 * binary permissions * upload logs * fix * upload full folder as binary artifact * test * test macos only * set full execute permissions * copy sqlite binary * cd * it worked! * build again in test job * debug * remove timeout * info * log * log2 * more logs * catch * fewer logs * test all platforms * test downloaded artifact * needs build * updates * build * false * release * add tag and upload binaryes * change tag name * proper artifact upload * jest updates * ✅ generate a few unit tests with Continue * fix imports related to IdeSettings * run tsc on PRs * remove shareSession command (unused) * update release process * update plugin version * don't show ghost text when jetbrains completion visible * run jetbrains ci in main * check ts in dev * ignore .env * 🚑 fix constant warnings when onboarding with Ollama --------- Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2024-06-21 11:09:03 -07:00
undefined,
);
2024-12-24 14:03:23 -05:00
const { config } = result;
fix ollama onboarding (#1539) * allow setting apiBase for bedrock provider * ⚡️ better linking * ✨ new prompt file action * ⚡️ strip <COMPLETION> from GPT-4 completion * continue proxy FIM support * warn user if potentially dangerous command is generated * tab autocomplete docs * docs: update PR template (#1531) * chore: add docs to install script (#1533) * fix(extensions): schema for db ctx provider (#1534) * fix(extensions): schema for db ctx provider * fix: invalid enum * prettierignore * docs: add docs and schema for "OS" provider (#1536) * tests (#1501) * 👷 CI for jetbrains * default working dir * changelog * build binaries * binary testing setup * idesettings * core binary testing * run binary tests in ci * remove unused targets * needs build * console.log bin contents * fix ci * fix win32 binary download * test * no linux arm64 * macos latest * macos-12 * binary permissions * upload logs * fix * upload full folder as binary artifact * test * test macos only * set full execute permissions * copy sqlite binary * cd * it worked! * build again in test job * debug * remove timeout * info * log * log2 * more logs * catch * fewer logs * test all platforms * test downloaded artifact * needs build * updates * build * false * release * add tag and upload binaryes * change tag name * proper artifact upload * jest updates * ✅ generate a few unit tests with Continue * fix imports related to IdeSettings * run tsc on PRs * remove shareSession command (unused) * update release process * update plugin version * don't show ghost text when jetbrains completion visible * run jetbrains ci in main * check ts in dev * ignore .env * 🚑 fix constant warnings when onboarding with Ollama --------- Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2024-06-21 11:09:03 -07:00
expect(config).toHaveProperty("models");
expect(config).toHaveProperty("embeddingsProvider");
expect(config).toHaveProperty("contextProviders");
expect(config).toHaveProperty("slashCommands");
});
2024-09-01 15:54:16 -07:00
it("should properly handle history requests", async () => {
const sessionId = "test-session-id";
await messenger.request("history/save", {
history: [],
sessionId,
title: "test-title",
workspaceDirectory: "test-workspace-directory",
});
const sessions = await messenger.request("history/list", {});
expect(sessions.length).toBeGreaterThan(0);
const session = await messenger.request("history/load", {
id: sessionId,
});
expect(session).toHaveProperty("history");
await messenger.request("history/delete", {
id: sessionId,
});
const sessionsAfterDelete = await messenger.request("history/list", {});
expect(sessionsAfterDelete.length).toBe(sessions.length - 1);
});
it("should add and delete a model from config.json", async () => {
const model: SerializedContinueConfig["models"][number] = {
title: "Test Model",
provider: "openai",
model: "gpt-3.5-turbo",
2025-05-25 20:27:23 -07:00
underlyingProviderName: "openai",
2024-09-01 15:54:16 -07:00
};
await messenger.request("config/addModel", {
model,
});
2024-12-24 14:03:23 -05:00
const {
result: { config },
} = await messenger.request("config/getSerializedProfileInfo", undefined);
2025-04-08 19:28:48 -07:00
expect(config!.modelsByRole.chat.some((m) => m.title === model.title)).toBe(
true,
);
2024-09-01 15:54:16 -07:00
await messenger.request("config/deleteModel", { title: model.title });
2024-12-24 14:03:23 -05:00
const {
result: { config: configAfterDelete },
} = await messenger.request("config/getSerializedProfileInfo", undefined);
2025-04-08 19:28:48 -07:00
expect(
configAfterDelete!.modelsByRole.chat.some((m) => m.title === model.title),
).toBe(false);
2024-09-01 15:54:16 -07:00
});
it("should make an LLM completion", async () => {
const model: SerializedContinueConfig["models"][number] = {
title: "Test Model",
provider: "mock",
model: "gpt-3.5-turbo",
2025-05-25 20:27:23 -07:00
underlyingProviderName: "mock",
2024-09-01 15:54:16 -07:00
};
await messenger.request("config/addModel", {
model,
});
const resp = await messenger.request("llm/complete", {
prompt: "Say 'Hello' and nothing else",
completionOptions: {},
title: "Test Model",
});
expect(resp).toBe("Test Completion");
});
fix ollama onboarding (#1539) * allow setting apiBase for bedrock provider * ⚡️ better linking * ✨ new prompt file action * ⚡️ strip <COMPLETION> from GPT-4 completion * continue proxy FIM support * warn user if potentially dangerous command is generated * tab autocomplete docs * docs: update PR template (#1531) * chore: add docs to install script (#1533) * fix(extensions): schema for db ctx provider (#1534) * fix(extensions): schema for db ctx provider * fix: invalid enum * prettierignore * docs: add docs and schema for "OS" provider (#1536) * tests (#1501) * 👷 CI for jetbrains * default working dir * changelog * build binaries * binary testing setup * idesettings * core binary testing * run binary tests in ci * remove unused targets * needs build * console.log bin contents * fix ci * fix win32 binary download * test * no linux arm64 * macos latest * macos-12 * binary permissions * upload logs * fix * upload full folder as binary artifact * test * test macos only * set full execute permissions * copy sqlite binary * cd * it worked! * build again in test job * debug * remove timeout * info * log * log2 * more logs * catch * fewer logs * test all platforms * test downloaded artifact * needs build * updates * build * false * release * add tag and upload binaryes * change tag name * proper artifact upload * jest updates * ✅ generate a few unit tests with Continue * fix imports related to IdeSettings * run tsc on PRs * remove shareSession command (unused) * update release process * update plugin version * don't show ghost text when jetbrains completion visible * run jetbrains ci in main * check ts in dev * ignore .env * 🚑 fix constant warnings when onboarding with Ollama --------- Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2024-06-21 11:09:03 -07:00
});