Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import type { Capabilities, CommandCapabilityMap } from "@cursorless/common";
import { nodeGetRunMode } from "@cursorless/node-common";
import * as semver from "semver";
import * as vscode from "vscode";

// FIXME: In newer versions of vscode the `editor.action.clipboardCopyAction`
// command appears to be disabled / sandboxed in test mode.
const supportsCopy =
nodeGetRunMode() !== "test" || semver.lt(vscode.version, "1.98.0");

const COMMAND_CAPABILITIES: CommandCapabilityMap = {
clipboardCopy: supportsCopy ? { acceptsLocation: false } : undefined,
clipboardPaste: true,
clipboardCopy: { acceptsLocation: false },
toggleLineComment: { acceptsLocation: false },
indentLine: { acceptsLocation: false },
outdentLine: { acceptsLocation: false },
Expand Down
5 changes: 1 addition & 4 deletions packages/test-harness/src/launchVscodeAndRunTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ export async function launchVscodeAndRunTests(extensionTestsPath: string) {
// we don't have to update the branch protection rules every time we bump
// the legacy VSCode version.

// NB: Because of a CI crashing issue the vscode version is pinned.
// https://github.com/cursorless-dev/cursorless/issues/2878

const vscodeVersion = useLegacyVscode ? "1.82.0" : "1.97.2";
const vscodeVersion = useLegacyVscode ? "1.82.0" : "stable";
const vscodeExecutablePath = await downloadAndUnzipVSCode(vscodeVersion);
const [cli, ...args] =
resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath);
Expand Down
Loading