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
7 changes: 3 additions & 4 deletions packages/rangelink-vscode-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Forgiving filename navigation** - Links with bare filenames (no directory path) now navigate when exactly one matching file exists in the workspace (#342)
- Covers links generated by AI tools that omit directory prefixes (e.g., `RangeLinkNavigationHandler.ts#L10`)
- When the filename is ambiguous (multiple matches) or not found, the existing "Cannot find file" warning is shown
- **Claude Code cold-start re-focus loop** - Adds configurable `coldStartDelayMs` and `coldRefocusIntervalMs` settings under `rangelink.destinations.claudeCode.*` to ensure the chat panel is ready before the first paste dispatch after binding.

<!-- TODO: #366 unhide when bookmarks graduate from beta — re-add these entries to the sections above
- R-M menu: add "List Bookmarks / Manage Bookmarks" bullet
Expand All @@ -124,10 +125,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Save Selection as Bookmark (R-B-S)** - `Cmd+R Cmd+B Cmd+S` (Mac) / `Ctrl+R Ctrl+B Ctrl+S` (Win/Linux)
- Save current selection as a reusable bookmark with custom label
- Also available via Command Palette and editor context menu (right-click)
- **List Bookmarks (R-B-L)** - `Cmd+R Cmd+B Cmd+L` (Mac) / `Ctrl+R Ctrl+B Ctrl+L` (Win/Linux)
- Select a bookmark to paste its link to bound destination (or clipboard if unbound)
- Manage bookmarks via the gear icon action in the bookmark list
-->
- **List Bookmarks (R-B-L)** - `Cmd+R Cmd+B Cmd+L` (Mac) / `Ctrl+R Ctrl+B Ctrl+L` (Win/Linux) - Select a bookmark to paste its link to bound destination (or clipboard if unbound) - Manage bookmarks via the gear icon action in the bookmark list
-->

### Changed

Expand Down
7 changes: 7 additions & 0 deletions packages/rangelink-vscode-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,13 @@ Set the navigation settings to `false` for a quieter workflow. Navigation itself

When you have more terminals than this threshold, the destination picker shows a "More terminals..." option instead of listing all terminals individually.

### Claude Code Settings <sup>Unreleased</sup>

| Setting | Default | Description |
| --------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------ |
| `rangelink.destinations.claudeCode.coldStartDelayMs` | `1500` | Total duration (ms) of the cold-start re-focus window for Claude Code |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Incorrect default value documented for coldStartDelayMs.

The table shows 1500 as the default for rangelink.destinations.claudeCode.coldStartDelayMs, but the PR objectives specify the default should be 2500. This discrepancy will mislead users about the actual default behavior.

Per PR objectives: "rangelink.destinations.claudeCode.coldStartDelayMs — default 2500 (range 500–15000)"

🔧 Proposed fix
 | Setting                                                   | Default | Description                                                                          |
 | --------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------ |
-| `rangelink.destinations.claudeCode.coldStartDelayMs`      | `1500`  | Total duration (ms) of the cold-start re-focus window for Claude Code                |
+| `rangelink.destinations.claudeCode.coldStartDelayMs`      | `2500`  | Total duration (ms) of the cold-start re-focus window for Claude Code                |
 | `rangelink.destinations.claudeCode.coldRefocusIntervalMs` | `300`   | Interval (ms) between successive focus-command re-sends during the cold-start window |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| `rangelink.destinations.claudeCode.coldStartDelayMs` | `1500` | Total duration (ms) of the cold-start re-focus window for Claude Code |
| `rangelink.destinations.claudeCode.coldStartDelayMs` | `2500` | Total duration (ms) of the cold-start re-focus window for Claude Code |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/rangelink-vscode-extension/README.md` at line 498, The README
documents the wrong default for
rangelink.destinations.claudeCode.coldStartDelayMs (shows 1500 but should be
2500); update the table entry for
`rangelink.destinations.claudeCode.coldStartDelayMs` to show the correct default
value `2500` and ensure the accompanying range text remains `500–15000` so the
documentation matches the PR objectives.

| `rangelink.destinations.claudeCode.coldRefocusIntervalMs` | `300` | Interval (ms) between successive focus-command re-sends during the cold-start window |

### Delimiter Settings

| Setting | Default | Description |
Expand Down
16 changes: 16 additions & 0 deletions packages/rangelink-vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,22 @@
"description": "Delimiter used between start and end positions (e.g., - in #L10-L20)",
"pattern": "^[^0-9]+$"
},
"rangelink.destinations.claudeCode.coldStartDelayMs": {
"type": "number",
"default": 1500,
"minimum": 500,
"maximum": 15000,
"description": "Total duration (ms) of the cold-start re-focus window for Claude Code. During this window, focus commands are re-sent at the coldRefocusIntervalMs cadence to ensure the chat panel is ready before paste dispatch.",
"title": "Claude Code Cold Start Delay"
},
"rangelink.destinations.claudeCode.coldRefocusIntervalMs": {
"type": "number",
"default": 300,
"minimum": 100,
"maximum": 5000,
"description": "Interval (ms) between successive focus-command re-sends during the Claude Code cold-start window.",
"title": "Claude Code Cold Re-focus Interval"
},
"rangelink.features.bookmarks.enabled": {
"type": "boolean",
"default": false,
Expand Down
36 changes: 36 additions & 0 deletions packages/rangelink-vscode-extension/qa/qa-test-cases-v1.1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3141,6 +3141,42 @@ test_cases:
command_to_run: 'pnpm test:release:with-extensions --grep "claude-code-005"'
automated: assisted

- id: claude-code-006
labels:
- requires-extensions
- cold-start
feature: 'Built-in AI Assistants'
scenario: 'Cold-start default settings produce a valid ColdRefocusConfig where totalMs > intervalMs'
preconditions:
- 'Claude Code extension (anthropic.claude-code) is installed and active'
- 'VS Code is running with the standard test:release:with-extensions configuration'
steps:
- 'Read the rangelink.destinations.claudeCode.coldStartDelayMs and coldRefocusIntervalMs defaults from VS Code configuration'
- 'Confirm coldStartDelayMs > coldRefocusIntervalMs'
expected_result: 'Default settings produce a valid ColdRefocusConfig. coldStartDelayMs is greater than coldRefocusIntervalMs.'
command_to_run: 'pnpm test:release:with-extensions --grep "claude-code-006"'
automated: true

- id: claude-code-007
labels:
- requires-extensions
- cold-start
- validation
feature: 'Built-in AI Assistants'
scenario: 'Cold-start validation rejects invalid config (totalMs <= intervalMs) and falls back to defaults with a warning'
preconditions:
- 'Claude Code extension (anthropic.claude-code) is installed and active'
- 'VS Code is running with the standard test:release:with-extensions configuration'
steps:
- 'Set rangelink.destinations.claudeCode.coldStartDelayMs to 100 and coldRefocusIntervalMs to 400 (invalid: delay <= interval)'
- 'Bind to Claude Code Chat to trigger getColdRefocus validation'
- 'Confirm a warning log is emitted about invalid cold-start config'
- 'Confirm the fallback defaults from coldStartDelayMs / coldRefocusIntervalMs are used instead of the invalid values'
- 'Restore original configuration values'
expected_result: 'Invalid config is rejected. Warning is logged. Defaults from coldStartDelayMs / coldRefocusIntervalMs are used as fallback.'
command_to_run: 'pnpm test:release:with-extensions --grep "claude-code-007"'
automated: true

- id: cursor-ai-003
labels:
- clipboard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ export const clearEditorSelection = async (): Promise<void> => {
}
};

export const openUntitledDoc = async (options?: {
content?: string;
language?: string;
viewColumn?: vscode.ViewColumn;
}): Promise<vscode.TextDocument> => {
const {
content = '',
language = 'plaintext',
viewColumn = vscode.ViewColumn.One,
} = options ?? {};
const doc = await vscode.workspace.openTextDocument({ content, language });
await vscode.window.showTextDocument(doc, viewColumn);
await settle();
return doc;
};

export const selectAll = (editor: vscode.TextEditor): void => {
const lastLine = editor.document.lineCount - 1;
const lastChar = editor.document.lineAt(lastLine).text.length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ export {
CLIPBOARD_SENTINEL,
writeClipboardSentinel,
} from './clipboardHelpers';
export { clearEditorSelection, selectAll, waitForActiveEditor } from './editorHelpers';
export {
clearEditorSelection,
openUntitledDoc,
selectAll,
waitForActiveEditor,
} from './editorHelpers';
export {
cleanupFiles,
closeAllEditors,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import assert from 'node:assert';

import * as vscode from 'vscode';

import { CMD_UNBIND_DESTINATION } from '../../constants/commandIds';

import { closeAllEditors } from './fileHelpers';
import { getLogCapture } from './getLogCapture';
import { createLogger } from './logHelpers';
import { resetRangelinkSettings } from './settingsHelpers';
import { activateExtension, settle } from './testEnv';
Expand All @@ -12,11 +19,19 @@ export const standardSuite = (name: string, fn: (log: (msg: string) => void) =>
});

setup(async () => {
assert.ok(
getLogCapture().isCapturing,
'RANGELINK_CAPTURE_LOGS must be true for toast assertions',
);
await resetRangelinkSettings(log);
await vscode.commands.executeCommand(CMD_UNBIND_DESTINATION);
await closeAllEditors();
await settle();
});

suiteTeardown(async () => {
await vscode.commands.executeCommand(CMD_UNBIND_DESTINATION);
await settle();
await closeAllEditors();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ standardSuite('R-D Bind to Destination', (log) => {
const tmpFileUris: vscode.Uri[] = [];

teardown(async () => {
await vscode.commands.executeCommand('rangelink.unbindDestination');
for (const t of terminals) {
t.dispose();
}
terminals.length = 0;
await closeAllEditors();
cleanupFiles(tmpFileUris);
tmpFileUris.length = 0;
await settle();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ import {
CMD_BIND_TO_CLAUDE_CODE,
CMD_BIND_TO_DESTINATION,
CMD_COPY_LINK_RELATIVE,
CMD_UNBIND_DESTINATION,
CMD_JUMP_TO_DESTINATION,
} from '../../constants/commandIds';
import { CLAUDE_CODE_EXTENSION_ID } from '../../utils/aiAssistants/isClaudeCodeAvailable';
import {
activateExtension,
assertStatusBarMsgLogged,
cleanupFiles,
closeAllEditors,
createLogger,
createWorkspaceFile,
extractQuickPickItemsLogged,
getLogCapture,
Expand All @@ -30,17 +27,10 @@ const AI_ASSISTANTS_GROUP_LABEL = 'AI Assistants';
const CLAUDE_CODE_DISPLAY_NAME = 'Claude Code Chat';
const CLAUDE_CODE_BIND_STATUS_BAR_MESSAGE = '✓ RangeLink bound to Claude Code Chat';

suite('Built-in AI Assistants', () => {
const log = createLogger('builtInAiAssistants');
standardSuite('Built-in AI Assistants', (log) => {
const tmpFileUris: vscode.Uri[] = [];

suiteSetup(async () => {
await activateExtension();
});

teardown(async () => {
await vscode.commands.executeCommand(CMD_UNBIND_DESTINATION);
await closeAllEditors();
cleanupFiles(tmpFileUris);
tmpFileUris.length = 0;
await settle();
Expand Down Expand Up @@ -194,7 +184,10 @@ suite('Built-in AI Assistants', () => {
'Human reported the cold-send RangeLink did not appear in Claude Code chat',
);

// Select lines 3-4 for warm send
// Select lines 3-4 for warm send. Re-focus the editor first — the cold
// verdict dialog stole focus and the editor must be active for the send
// command to see the selection.
await vscode.window.showTextDocument(doc);
editor.selection = new vscode.Selection(2, 0, 3, 6);
await settle();

Expand Down Expand Up @@ -309,4 +302,65 @@ standardSuite('Built-in AI Assistants — Destination Picker', (log) => {

log('✓ github-copilot-chat-001 — log confirms "GitHub Copilot Chat" appears in R-D picker');
});

test('claude-code-006: Cold-start default settings produce correct ColdRefocusConfig', async function (this: MochaContext) {
const config = vscode.workspace.getConfiguration('rangelink.destinations.claudeCode');
const totalMs = config.get<number>('coldStartDelayMs', 1500);
const intervalMs = config.get<number>('coldRefocusIntervalMs', 300);

assert.strictEqual(totalMs, 1500, 'Expected default coldStartDelayMs to be 1500');
assert.strictEqual(intervalMs, 300, 'Expected default coldRefocusIntervalMs to be 300');
assert.ok(
Comment on lines +308 to +313
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Default-value assertions look stale and should come from shared defaults constants.

This test currently hardcodes coldStartDelayMs as 1500, but this PR’s objective defines 2500. Hardcoded values here can silently drift from the real contract; import and assert against shared defaults instead.

Proposed fix
+import {
+  CLAUDE_CODE_COLD_START_DELAY_MS,
+  CLAUDE_CODE_COLD_REFOCUS_INTERVAL_MS,
+} from '../../constants/settingDefaults';
...
-    const totalMs = config.get<number>('coldStartDelayMs', 1500);
-    const intervalMs = config.get<number>('coldRefocusIntervalMs', 300);
+    const totalMs = config.get<number>('coldStartDelayMs', CLAUDE_CODE_COLD_START_DELAY_MS);
+    const intervalMs = config.get<number>(
+      'coldRefocusIntervalMs',
+      CLAUDE_CODE_COLD_REFOCUS_INTERVAL_MS,
+    );

-    assert.strictEqual(totalMs, 1500, 'Expected default coldStartDelayMs to be 1500');
-    assert.strictEqual(intervalMs, 300, 'Expected default coldRefocusIntervalMs to be 300');
+    assert.strictEqual(
+      totalMs,
+      CLAUDE_CODE_COLD_START_DELAY_MS,
+      `Expected default coldStartDelayMs to be ${CLAUDE_CODE_COLD_START_DELAY_MS}`,
+    );
+    assert.strictEqual(
+      intervalMs,
+      CLAUDE_CODE_COLD_REFOCUS_INTERVAL_MS,
+      `Expected default coldRefocusIntervalMs to be ${CLAUDE_CODE_COLD_REFOCUS_INTERVAL_MS}`,
+    );

As per coding guidelines, "Define named constants for all numeric literals with semantic meaning using SCREAMING_SNAKE_CASE".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/rangelink-vscode-extension/src/__integration-tests__/suite/builtInAiAssistants.test.ts`
around lines 318 - 323, The test hardcodes numeric defaults (1500 and 300) for
coldStartDelayMs and coldRefocusIntervalMs; import the shared default constants
from the project's defaults/constants module and replace the literal assertions
so totalMs and intervalMs are asserted against those constants (e.g., the
exported default for coldStartDelayMs and coldRefocusIntervalMs) instead of
1500/300; update the test variables totalMs and intervalMs assertions to use the
imported constants and remove the magic numbers.

totalMs > intervalMs,
`Expected coldStartDelayMs (${totalMs}) > coldRefocusIntervalMs (${intervalMs})`,
);

log('✓ Default cold-start config produces valid ColdRefocusConfig');
});

test('claude-code-007: Cold-start validation rejects invalid config and falls back to defaults', async function (this: MochaContext) {
if (!vscode.extensions.getExtension(CLAUDE_CODE_EXTENSION_ID)) {
log('Skipping claude-code-007 — Claude Code extension not installed in this test config');
this.skip();
}

const config = vscode.workspace.getConfiguration('rangelink.destinations.claudeCode');

// Set delay <= interval so the validation rejects it (by default, delay >
// interval so the config is valid; flipping that relationship makes it invalid).
const INVALID_DELAY_MS = 100;
const INVALID_INTERVAL_MS = 400;
await config.update('coldStartDelayMs', INVALID_DELAY_MS, vscode.ConfigurationTarget.Workspace);
await config.update(
'coldRefocusIntervalMs',
INVALID_INTERVAL_MS,
vscode.ConfigurationTarget.Workspace,
);
await settle();

const logCapture = getLogCapture();
logCapture.mark('before-cc-007');

// Validation lives inside getColdRefocus, which is a thunk only invoked
// during focus() — not at bind() time. CMD_JUMP_TO_DESTINATION triggers
// focusBoundDestination() → focus() → getColdRefocus() → validation warning.
await vscode.commands.executeCommand(CMD_BIND_TO_CLAUDE_CODE);
await settle();

await vscode.commands.executeCommand(CMD_JUMP_TO_DESTINATION);
await settle();

const lines = logCapture.getLinesSince('before-cc-007');
const warningLog = lines.find(
(line) =>
line.includes('coldStartDelayMs must be greater than coldRefocusIntervalMs') &&
line.includes('using defaults'),
);
assert.ok(
warningLog,
'Expected validation warning log with "using defaults" when coldStartDelayMs <= coldRefocusIntervalMs',
);

log('✓ claude-code-007 — invalid config triggers fallback to defaults');
});
Comment on lines +321 to +365
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Verify the actual fallback values, not just the warning log.

The test asserts that a validation warning is logged but doesn't verify that the fallback values are actually used. The test name claims the config "falls back to defaults," but the test only checks for the warning.

Additional concerns
  1. Unclear CMD_JUMP_TO_DESTINATION purpose: The PR objectives state validation happens at bind time, but the test executes CMD_JUMP_TO_DESTINATION after binding. What is this command verifying? If it's unnecessary, remove it; if it's validating that the destination works with fallback values, add an assertion explaining that.

  2. Magic numbers: The invalid config values 100 and 400 are hardcoded. Consider defining them as constants with descriptive names (e.g., INVALID_DELAY_MS, INVALID_INTERVAL_MS) or add an inline comment explaining why these specific values make the config invalid.

💚 Proposed enhancement

After the bind command, retrieve the actual configuration values that were applied and assert they match the expected defaults:

 await vscode.commands.executeCommand(CMD_BIND_TO_CLAUDE_CODE);
 await settle();

+// Verify fallback values were applied
+const configAfterBind = vscode.workspace.getConfiguration('rangelink.destinations.claudeCode');
+const actualTotalMs = configAfterBind.get<number>('coldStartDelayMs', 1500);
+const actualIntervalMs = configAfterBind.get<number>('coldRefocusIntervalMs', 300);
+assert.strictEqual(actualTotalMs, 1500, 'Expected fallback to default coldStartDelayMs');
+assert.strictEqual(actualIntervalMs, 300, 'Expected fallback to default coldRefocusIntervalMs');
+
-await vscode.commands.executeCommand(CMD_JUMP_TO_DESTINATION);
-await settle();
-
 const lines = logCapture.getLinesSince('before-cc-007');
 const warningLog = lines.find((line) =>
   line.includes('coldStartDelayMs must be greater than coldRefocusIntervalMs'),
 );

(Note: Replace 1500 and 300 with the shared constants once you address the claude-code-006 comment.)

As per coding guidelines (qa-test-cases-v1.1.0.yaml), claude-code-007 should "bind to Claude Code, assert a warning log, and assert fallback to defaults."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/rangelink-vscode-extension/src/__integration-tests__/suite/builtInAiAssistants.test.ts`
around lines 321 - 353, The test claude-code-007 currently only checks for a
validation warning but must also verify that fallback defaults are applied:
after executing CMD_BIND_TO_CLAUDE_CODE, read
vscode.workspace.getConfiguration('rangelink.destinations.claudeCode') and
assert the effective coldStartDelayMs and coldRefocusIntervalMs equal the
expected defaults (use the shared/default constants or 1500 and 300 as
suggested); if CMD_JUMP_TO_DESTINATION is unnecessary for validation, remove it,
otherwise add an explicit assertion that the destination action uses the
fallback values; also replace magic numbers 100/400 with descriptive constants
(e.g., INVALID_DELAY_MS, INVALID_INTERVAL_MS) or an inline comment.

});
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import * as vscode from 'vscode';

import {
CMD_BIND_TO_TEXT_EDITOR_HERE,
CMD_BIND_TO_TERMINAL_HERE,
CMD_COPY_LINK_RELATIVE,
CMD_PASTE_CURRENT_FILE_PATH_RELATIVE,
CMD_TERMINAL_PASTE_SELECTED_TEXT,
CMD_UNBIND_DESTINATION,
} from '../../constants/commandIds';
import { VSCODE_CMD_TERMINAL_SELECT_ALL } from '../../constants/vscodeCommandIds';
import {
Expand All @@ -16,7 +16,6 @@ import {
assertTerminalBufferContains,
type CapturingTerminal,
cleanupFiles,
closeAllEditors,
CLIPBOARD_SENTINEL,
createAndBindCapturingTerminal,
createTerminal,
Expand Down Expand Up @@ -52,17 +51,14 @@ standardSuite('Clipboard Preservation', (_log) => {
});

setup(async () => {
capturing.terminal.show(true);
await vscode.commands.executeCommand(CMD_BIND_TO_TERMINAL_HERE);
await settle();
editor = await vscode.window.showTextDocument(editor.document);
await writeClipboardSentinel();
editor.selection = new vscode.Selection(new vscode.Position(0, 0), new vscode.Position(0, 7));
});

teardown(async () => {
await vscode.workspace
.getConfiguration('rangelink')
.update('clipboard.preserve', undefined, vscode.ConfigurationTarget.Global);
});

test('clipboard-preservation-003: R-F with preserve=always restores clipboard to sentinel after send', async () => {
await vscode.workspace
.getConfiguration('rangelink')
Expand Down Expand Up @@ -123,10 +119,8 @@ standardSuite('Clipboard Preservation — Assisted', (log) => {
const tmpTerminals: vscode.Terminal[] = [];

teardown(async () => {
await vscode.commands.executeCommand(CMD_UNBIND_DESTINATION);
await vscode.commands.executeCommand('dummyAi.clearAll');
for (const t of tmpTerminals.splice(0)) t.dispose();
await closeAllEditors();
cleanupFiles(tmpFileUris);
tmpFileUris.splice(0);
await settle();
Expand Down Expand Up @@ -301,8 +295,6 @@ standardSuite('Clipboard Preservation — Assisted', (log) => {
});

test('clipboard-preservation-009: always mode — dismissed picker leaves clipboard unchanged', async () => {
await vscode.commands.executeCommand(CMD_UNBIND_DESTINATION);

const lines = Array.from({ length: 5 }, (_, i) => `line ${i + 1}`);
const fileUri = createWorkspaceFile('cbp-009', lines.join('\n') + '\n');
tmpFileUris.push(fileUri);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import * as path from 'node:path';

import * as vscode from 'vscode';

import { CMD_UNBIND_DESTINATION } from '../../constants/commandIds';
import {
assertClipboardWriteLogged,
assertFilePathLogged,
Expand All @@ -12,7 +11,6 @@ import {
assertStatusBarMsgLogged,
assertTerminalBufferContains,
cleanupFiles,
closeAllEditors,
createAndBindCapturingTerminal,
createAndOpenFile,
getLogCapture,
Expand Down Expand Up @@ -57,12 +55,10 @@ standardSuite('Context Menus — Editor Content', (log) => {
});

teardown(async () => {
await vscode.commands.executeCommand(CMD_UNBIND_DESTINATION);
for (const t of terminals) {
t.dispose();
}
terminals.length = 0;
await closeAllEditors();
cleanupFiles(tmpFileUris);
tmpFileUris.length = 0;
await settle();
Expand Down
Loading
Loading