Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
537de31
Started implementing groovy remote file source support (DH-20578)
bmingles Dec 16, 2025
be30399
Wired up more Groovy remote file source stuff (DH-20578)
bmingles Feb 20, 2026
c0cc832
Dual language treeview generally working (DH-20578)
bmingles Feb 20, 2026
2856086
Added Workspace folder back to tree (DH-20578)
bmingles Dec 17, 2025
6e0edcd
Groovy file sourcing is working. Added optimization to surpess notifi…
bmingles Dec 18, 2025
f8e20ac
Split out treeitem creation utils (DH-20578)
bmingles Dec 19, 2025
76f522c
Added revealInExplorer command (DH-20578)
bmingles Feb 20, 2026
6e67d2d
Check that JS API from server support remote file source service (DH-…
bmingles Jan 5, 2026
e787041
Fixed tests (DH-20578)
bmingles Jan 5, 2026
d111f2c
1.0.10-remote.0 Dev build (DH-20578)
bmingles Jan 5, 2026
736b768
Latest dev vsix (DH-20578)
bmingles Jan 14, 2026
9784f5f
Added remotefilesource types (DH-20578)
bmingles Jan 28, 2026
cbd61a8
Cleanup after rebase (#DH-20578)
bmingles Mar 2, 2026
8074c96
dev package (#DH-20578)
bmingles Feb 26, 2026
00225f4
groovy-error-hints/task-01: Add parseGroovyServerError function to pa…
bmingles Mar 3, 2026
7f3c4fb
groovy-error-hints/task-02: Add Groovy diagnostics collection to Exte…
bmingles Mar 3, 2026
4c8c64e
groovy-error-hints/task-03: Update DhcService to handle Groovy diagno…
bmingles Mar 3, 2026
53ae547
groovy-error-hints/task-04: Create createGroovyImportErrorHint() in r…
bmingles Mar 3, 2026
dc74fa9
groovy-error-hints/task-05: Update McpServer constructor to accept gr…
bmingles Mar 3, 2026
5045167
groovy-error-hints/task-06: Update runCodeFromUri.ts to handle Groovy…
bmingles Mar 3, 2026
483c736
groovy-error-hints/task-07: Add comprehensive tests for Groovy error …
bmingles Mar 3, 2026
caf3e42
Support groovy in remote file source utils (#DH-20578)
bmingles Mar 11, 2026
902248a
Added is dirty checking for Groovy remote file sourcing (#DH-20578)
bmingles Mar 11, 2026
1e516f9
Latest dev vsix (#DH-20578)
bmingles Mar 11, 2026
d62cf44
Debug logging for adding Groovy remote file sources (#DH-20578)
bmingles Mar 13, 2026
48fde96
Removed incorrectly committed submodule (#DH-20578)
bmingles Apr 7, 2026
8699be1
always clear diagnostics on save (#DH-20578)
bmingles Apr 14, 2026
9df8cbc
reference PR (#DH-20578)
bmingles Apr 14, 2026
26125fd
typo (#DH-20578)
bmingles Apr 14, 2026
0bbca44
comment (#DH-20578)
bmingles Apr 14, 2026
349ee5b
Test cleanup (#DH-20578)
bmingles Apr 14, 2026
09bb62e
cleanup (#DH-20578)
bmingles Apr 14, 2026
a8b9408
Refactored removeRemoteFileSources tests to use nested describe block…
bmingles Apr 15, 2026
b66a32e
consolidated test util (#DH-20578)
bmingles Apr 15, 2026
989fa9b
Split out type and cleaned up comments (#DH-20578)
bmingles Apr 15, 2026
c7c2db6
test cleanup (#DH-20578)
bmingles Apr 15, 2026
3506345
removed consts (#DH-20578)
bmingles Apr 15, 2026
62b2f21
cleanup (#DH-20578)
bmingles Apr 15, 2026
83ed0bf
consolidated tests (#DH-20578)
bmingles Apr 15, 2026
aa50b7e
removed unnecessary uri check (#DH-20578)
bmingles Apr 15, 2026
ba3f16f
simplified tool creation args (#DH-20578)
bmingles Apr 15, 2026
7e2ce10
Fixed a few things that tripped up an agent (#DH-20578)
bmingles Apr 15, 2026
c01bb67
consolidated workspace ignores (#DH-20578)
bmingles Apr 15, 2026
d5101f4
fixed mock (#DH-20578)
bmingles Apr 15, 2026
acbc94e
Tests for supressNotify (#DH-20578)
bmingles Apr 16, 2026
6243418
Fixed compilation error (#DH-20578)
bmingles Apr 16, 2026
a4666cf
Fixed a bug with ancestor marked resolution + added tests (#DH-20578)
bmingles Apr 16, 2026
904d5f8
remoteFileSource tree item tests (#DH-20578)
bmingles Apr 17, 2026
8871977
Updated snapshot (#DH-20578)
bmingles Apr 17, 2026
b17ae50
Addressed code review comments
bmingles Apr 23, 2026
211d2e1
Added a warning for a particular ambiguous e2e test failure
bmingles Apr 27, 2026
d53633b
Increasing e2e timeout (#DH-20578)
bmingles Apr 27, 2026
d11b9fc
trying an older version of VS Code for CI e2e tests
bmingles Apr 27, 2026
04fe8eb
downgrading to fix e2e
bmingles Apr 28, 2026
5a1122a
Reverted non-working e2e ci fixes
bmingles Apr 28, 2026
c160bc9
test: pin e2e CI to ubuntu-22.04 to diagnose failures (#DH-20578)
bmingles Apr 28, 2026
6d1d2f9
revert: restore ubuntu-latest for e2e CI (#DH-20578)
bmingles Apr 28, 2026
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
17 changes: 15 additions & 2 deletions __mocks__/vscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,20 @@ export class DiagnosticCollection
}
}

export class EventEmitter {
fire = vi.fn().mockName('fire');
export class EventEmitter<T> {
listeners = new Set<(...args: any[]) => void>();
event = (listener: (e: T) => any) => {
this.listeners.add(listener);
return () => {
this.listeners.delete(listener);
};
};
fire = vi
.fn()
.mockName('fire')
.mockImplementation((event: T) => {
this.listeners.forEach(listener => listener(event));
});
}

export class MarkdownString {
Expand Down Expand Up @@ -306,6 +318,7 @@ export const workspace = {
.fn()
.mockName('createFileSystemWatcher')
.mockReturnValue({
onDidChange: vi.fn().mockName('onDidChange'),
onDidCreate: vi.fn().mockName('onDidCreate'),
onDidDelete: vi.fn().mockName('onDidDelete'),
}),
Expand Down
16 changes: 15 additions & 1 deletion e2e-testing/src/runner.mts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,21 @@ const isSetup = args.includes('--setup');
const __dirname = import.meta.dirname;
const e2eTestingPath = path.resolve(__dirname, '..');

const storagePath = path.join(e2eTestingPath, '.resources');
const storagePath =
process.env.TEST_RESOURCES ?? path.join(e2eTestingPath, '.resources');

// Warn about Unix socket path length constraints
// Electron/VS Code creates an IPC socket under storagePath/settings/<version>-main.sock
// Unix platforms (macOS, Linux) have varying socket path length limits.
// Storage path length > 70 is conservative to avoid constraints on different OSs.
if (process.platform !== 'win32' && storagePath.length > 70) {
console.warn(
`\nWARNING: Storage path length (${storagePath.length} chars) may hit socket path length ` +
`constraints on some OSs.\n` +
` Path: ${storagePath}\n` +
`If e2e tests fail with connection errors, try setting a shorter TEST_RESOURCES path.\n`
);
}
const extensionsPath = path.join(e2eTestingPath, '.test-extensions');
const testFilesPattern = path.join(e2eTestingPath, 'out', '**', '*.spec.js');
const mochaConfig = path.join(
Expand Down
75 changes: 63 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -326,19 +326,34 @@
"icon": "$(close)"
},
{
"command": "vscode-deephaven.addRemoteFileSource",
"title": "Add to Deephaven remote file sources",
"command": "vscode-deephaven.addGroovyRemoteFileSource",
"title": "Add to Deephaven Groovy remote file sources",
"icon": "$(add)"
},
{
"command": "vscode-deephaven.removeRemoteFileSource",
"title": "Remove from Deephaven remote file sources",
"command": "vscode-deephaven.removeGroovyRemoteFileSource",
"title": "Remove from Deephaven Groovy remote file sources",
"icon": "$(remove)"
},
{
"command": "vscode-deephaven.addPythonRemoteFileSource",
"title": "Add to Deephaven Python remote file sources",
"icon": "$(add)"
},
{
"command": "vscode-deephaven.removePythonRemoteFileSource",
"title": "Remove from Deephaven Python remote file sources",
"icon": "$(remove)"
},
{
"command": "vscode-deephaven.deleteVariable",
"title": "Delete Deephaven Variable",
"icon": "$(trash)"
},
{
"command": "vscode-deephaven.revealInExplorer",
"title": "Reveal in Explorer",
"icon": "$(eye)"
}
],
"icons": {
Expand Down Expand Up @@ -865,16 +880,28 @@
"when": "false"
},
{
"command": "vscode-deephaven.addRemoteFileSource",
"command": "vscode-deephaven.addGroovyRemoteFileSource",
"when": "false"
},
{
"command": "vscode-deephaven.removeRemoteFileSource",
"command": "vscode-deephaven.removeGroovyRemoteFileSource",
"when": "false"
},
{
"command": "vscode-deephaven.addPythonRemoteFileSource",
"when": "false"
},
{
"command": "vscode-deephaven.removePythonRemoteFileSource",
"when": "false"
},
{
"command": "vscode-deephaven.deleteVariable",
"when": "false"
},
{
"command": "vscode-deephaven.revealInExplorer",
"when": "false"
}
],
"editor/context": [
Expand Down Expand Up @@ -903,12 +930,22 @@
],
"explorer/context": [
{
"command": "vscode-deephaven.addRemoteFileSource",
"command": "vscode-deephaven.addGroovyRemoteFileSource",
"group": "deephaven",
"when": "explorerResourceIsFolder"
},
{
"command": "vscode-deephaven.removeRemoteFileSource",
"command": "vscode-deephaven.removeGroovyRemoteFileSource",
"group": "deephaven",
"when": "explorerResourceIsFolder"
},
{
"command": "vscode-deephaven.addPythonRemoteFileSource",
"group": "deephaven",
"when": "explorerResourceIsFolder"
},
{
"command": "vscode-deephaven.removePythonRemoteFileSource",
"group": "deephaven",
"when": "explorerResourceIsFolder"
}
Expand Down Expand Up @@ -999,14 +1036,28 @@
"group": "inline@2"
},
{
"command": "vscode-deephaven.addRemoteFileSource",
"when": "view == vscode-deephaven.view.remoteImportSourceTree && viewItem == canAddRemoteFileSource",
"command": "vscode-deephaven.addGroovyRemoteFileSource",
"when": "view == vscode-deephaven.view.remoteImportSourceTree && viewItem == canAddRemoteFileSource:groovy",
"group": "inline"
},
{
"command": "vscode-deephaven.removeRemoteFileSource",
"when": "view == vscode-deephaven.view.remoteImportSourceTree && viewItem == canRemoveRemoteFileSource",
"command": "vscode-deephaven.removeGroovyRemoteFileSource",
"when": "view == vscode-deephaven.view.remoteImportSourceTree && viewItem == canRemoveRemoteFileSource:groovy",
"group": "inline"
},
{
"command": "vscode-deephaven.addPythonRemoteFileSource",
"when": "view == vscode-deephaven.view.remoteImportSourceTree && viewItem == canAddRemoteFileSource:python",
"group": "inline"
},
{
"command": "vscode-deephaven.removePythonRemoteFileSource",
"when": "view == vscode-deephaven.view.remoteImportSourceTree && viewItem == canRemoveRemoteFileSource:python",
"group": "inline"
},
{
"command": "vscode-deephaven.revealInExplorer",
"when": "view == vscode-deephaven.view.remoteImportSourceTree && viewItem != root && viewItem != languageRoot"
}
]
},
Expand Down
Binary file not shown.
8 changes: 7 additions & 1 deletion skills/deephaven-vscode-using/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,14 @@ Community servers always support panel URLs. Enterprise servers require Grizzly+

### Remote File Sources

Enable server to fetch source files during execution:
Configure which workspace folders the server fetches source files from during execution:

- Add folder URIs as remote sources (`addRemoteFileSources`)
- List current sources (`listRemoteFileSources`)
- Remove sources when done (`removeRemoteFileSources`)

If an import error occurs, follow the hint in the tool response — it will specify how to resolve it.

### Troubleshooting

**MCP Server Not Running:**
Expand Down Expand Up @@ -114,6 +116,10 @@ Server connections are managed through MCP tools. Use `listConnections`, `listSe

All MCP tools are available when the MCP server is enabled via `deephaven.mcp.enabled` setting. If tools aren't available, ensure MCP is enabled (see Troubleshooting).

### Tool Response Hints

Tool responses may include hints that guide next steps. Consider them before deciding how to proceed.

### Variable Management

- Only list panel variables when explicitly asked
Expand Down
45 changes: 37 additions & 8 deletions src/common/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import type {
WorkerURL,
} from '../types';

/** Arguments passed to `ADD_REMOTE_FILE_SOURCE_CMD` handler */
/** Arguments passed to `ADD_GROOVY_REMOTE_FILE_SOURCE_CMD` and `ADD_PYTHON_REMOTE_FILE_SOURCE_CMD` handlers */
export type AddRemoteFileSourceCmdArgs = [
languageId: 'groovy' | 'python',
folderElementOrUri:
| RemoteImportSourceTreeFolderElement
| vscode.Uri
Expand All @@ -37,8 +38,9 @@ export type RefreshVariablePanelsCmdArgs = [
variables: NonEmptyArray<VariableDefintion>,
];

/** Arguments passed to `REMOVE_REMOTE_FILE_SOURCE_CMD` handler */
/** Arguments passed to `REMOVE_GROOVY_REMOTE_FILE_SOURCE_CMD` and `REMOVE_PYTHON_REMOTE_FILE_SOURCE_CMD` handlers */
export type RemoveRemoteFileSourceCmdArgs = [
languageId: 'groovy' | 'python',
folderElementOrUri:
| RemoteImportSourceTreeFolderElement
| vscode.Uri
Expand Down Expand Up @@ -77,6 +79,12 @@ function cmd<T extends string>(cmd: T): `${typeof EXTENSION_ID}.${T}` {
return `${EXTENSION_ID}.${cmd}`;
}

export const ADD_GROOVY_REMOTE_FILE_SOURCE_CMD = cmd(
'addGroovyRemoteFileSource'
);
export const ADD_PYTHON_REMOTE_FILE_SOURCE_CMD = cmd(
'addPythonRemoteFileSource'
);
export const CLEAR_SECRET_STORAGE_CMD = cmd('clearSecretStorage');
export const CLOSE_CREATE_QUERY_VIEW_CMD = cmd('view.createQuery.close');
export const CONNECT_TO_SERVER_CMD = cmd('connectToServer');
Expand Down Expand Up @@ -106,6 +114,13 @@ export const REFRESH_SERVER_CONNECTION_TREE_CMD = cmd(
);
export const REFRESH_PANELS_TREE_CMD = cmd('refreshPanelsTree');
export const REFRESH_VARIABLE_PANELS_CMD = cmd('refreshVariablePanels');
export const REMOVE_GROOVY_REMOTE_FILE_SOURCE_CMD = cmd(
'removeGroovyRemoteFileSource'
);
export const REMOVE_PYTHON_REMOTE_FILE_SOURCE_CMD = cmd(
'removePythonRemoteFileSource'
);
export const REVEAL_IN_EXPLORER_CMD = cmd('revealInExplorer');
export const RUN_CODE_COMMAND = cmd('runCode');
export const RUN_MARKDOWN_CODEBLOCK_CMD = cmd('runMarkdownCodeBlock');
export const RUN_SELECTION_COMMAND = cmd('runSelection');
Expand All @@ -116,17 +131,22 @@ export const SHOW_MCP_QUICK_PICK_CMD = cmd('showMcpQuickPick');
export const START_SERVER_CMD = cmd('startServer');
export const STOP_SERVER_CMD = cmd('stopServer');
export const TOGGLE_MCP_CMD = cmd('toggleMcp');
export const ADD_REMOTE_FILE_SOURCE_CMD = cmd('addRemoteFileSource');
export const REMOVE_REMOTE_FILE_SOURCE_CMD = cmd('removeRemoteFileSource');

/**
* Execute the add remote file source command with type safety.
* @param uris The folder URIs to add as remote file sources.
* @param args The arguments for adding the remote file source, including the language ID and folder URI(s).
* @returns A Thenable that resolves when the command has been executed.
*/
export function execAddRemoteFileSource(
...args: AddRemoteFileSourceCmdArgs
): Thenable<void> {
return vscode.commands.executeCommand(ADD_REMOTE_FILE_SOURCE_CMD, ...args);
const [languageId, ...rest] = args;
return vscode.commands.executeCommand(
languageId === 'groovy'
? ADD_GROOVY_REMOTE_FILE_SOURCE_CMD
: ADD_PYTHON_REMOTE_FILE_SOURCE_CMD,
...rest
);
}

/**
Expand All @@ -153,12 +173,21 @@ export function execOpenVariablePanels(

/**
* Execute the remove remote file source command with type safety.
* @param uris The folder URIs to remove as remote file sources.
* @param args The arguments for removing the remote file source, including the
* language ID and folder URI(s).
* @returns A Thenable that resolves when the command has been executed.
*/
export function execRemoveRemoteFileSource(
...args: RemoveRemoteFileSourceCmdArgs
): Thenable<void> {
return vscode.commands.executeCommand(REMOVE_REMOTE_FILE_SOURCE_CMD, ...args);
const [languageId, ...rest] = args;

return vscode.commands.executeCommand(
languageId === 'groovy'
? REMOVE_GROOVY_REMOTE_FILE_SOURCE_CMD
: REMOVE_PYTHON_REMOTE_FILE_SOURCE_CMD,
...rest
);
}

/**
Expand Down
2 changes: 2 additions & 0 deletions src/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ export const ICON_ID = {
connected: 'vm-connect',
connecting: 'sync~spin',
disconnected: 'plug',
groovy: 'coffee',
Comment thread
bmingles marked this conversation as resolved.
python: 'dh-python',
runAll: 'run-all',
runSelection: 'run',
runningCode: 'sync~spin',
Expand Down
Loading
Loading