Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
9afc7cb
Initial plan for issue
Copilot May 26, 2025
63743dd
Implement TaskService with required interfaces and singleton pattern
Copilot May 26, 2025
c4ca34e
Convert task states to enum and document default task state
Copilot May 28, 2025
968697e
Merge branch 'main' into copilot/fix-110
tnaum-ms May 28, 2025
78c6e35
Implement pause and resume functionality for tasks
Copilot May 28, 2025
be75142
fix: formatting issues `prettier-fix`
tnaum-ms Jun 5, 2025
e24811e
Update src/services/taskService.ts
tnaum-ms Jun 5, 2025
d54901e
Update src/services/taskService.ts
tnaum-ms Jun 5, 2025
fdeacca
Update src/services/taskService.ts
tnaum-ms Jun 5, 2025
b6eb47c
Implement core Task Engine for long-running operations (#119)
tnaum-ms Jun 5, 2025
b8075cb
fix: formatting with `prettier-fix`
tnaum-ms Jun 5, 2025
e17d37e
Merge branch 'main' into dev/copy-and-paste/main
tnaum-ms Jun 6, 2025
da7f205
Merge branch 'main' into feature/copy-and-paste
tnaum-ms Jun 6, 2025
52a7720
added copy/paste commands to package.json
tnaum-ms Jun 10, 2025
e75da9b
Merge branch 'next' into feature/copy-and-paste
tnaum-ms Jun 10, 2025
59a970b
Merge branch 'feature/copy-and-paste' into dev/xingfan/111-copy-and-p…
tnaum-ms Jun 10, 2025
33f7d40
feat: basic copy+paste UX for experimenting
tnaum-ms Jun 10, 2025
aca6916
fix: updated eslint config to exclude the `api/dist` folder
tnaum-ms Jun 10, 2025
eab7593
Apply suggestions from code review
tnaum-ms Jun 10, 2025
30d5a72
Merge branch 'copilot/fix-130' of https://github.com/microsoft/vscode…
xingfan-git Jun 11, 2025
a4df3f6
Merge branch 'next' of https://github.com/microsoft/vscode-documentdb…
xingfan-git Jun 13, 2025
30342f2
Merge branch 'next' into feature/copy-and-paste
tnaum-ms Jun 16, 2025
52eec8d
draft copy paste task
xingfan-git Jun 16, 2025
9f2adb0
wip: working on experimental Task to improvie the API
tnaum-ms Jun 17, 2025
3efb7fd
wip: task services
tnaum-ms Jun 17, 2025
de227ba
wip: better task API
tnaum-ms Jun 17, 2025
49926d0
wip: clean task API
tnaum-ms Jun 17, 2025
bb17082
feat: failures on DummyTask added
tnaum-ms Jun 17, 2025
906464d
chore: DummyTask -> DemoTask
tnaum-ms Jun 17, 2025
852f894
feat: tasks creators don't need to generate `taskId` anymore
tnaum-ms Jun 18, 2025
bc0aaf9
feat: copilot instructions tweak (tests)
tnaum-ms Jun 18, 2025
5d7ba8d
feat: taskService, correct "task stopped" notification
tnaum-ms Jun 18, 2025
2969d9f
feat: added basic task service tests
tnaum-ms Jun 18, 2025
e2efae4
chore: minor tweak to the demo task
tnaum-ms Jun 18, 2025
c41401b
feat: improving Task API (#180)
tnaum-ms Jun 18, 2025
e28bc9a
feat: first iteration of the task reporting service
tnaum-ms Jun 18, 2025
8bc37a8
feat: better 'stopping' handling
tnaum-ms Jun 18, 2025
55dc7f6
feat: better 'stopping' handling around initialization
tnaum-ms Jun 18, 2025
7b255cd
Feature: Copy-and-Paste: 5. Implement Progress Monitoring and Abort O…
tnaum-ms Jun 18, 2025
3a737fb
Revert "draft copy paste task"
xingfan-git Jun 19, 2025
1e76085
merge feature/copy-and-paste branch to pull changes for task progress
xingfan-git Jun 19, 2025
95ee9da
draft version for copy paste collection task
xingfan-git Jun 30, 2025
fbf169a
refine insert result parsing
xingfan-git Jul 12, 2025
c1e8552
two strategies
xingfan-git Jul 12, 2025
b721aaf
l10n
xingfan-git Jul 12, 2025
2458adc
overwrite
xingfan-git Jul 15, 2025
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
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ function processData(data: unknown): string | undefined {

### Testing Structure

- Keep tests in the same directory structure as the code they test.
- Keep tests in the same directory as the code they test.
- Test business logic in services; mock dependencies using `jest.mock()` for unit tests.
- Use descriptive test names that explain the expected behavior.
- Group related tests with `describe` blocks.
Expand Down
59 changes: 58 additions & 1 deletion l10n/bundle.l10n.json

Large diffs are not rendered by default.

136 changes: 76 additions & 60 deletions package-lock.json

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

36 changes: 33 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@
"@types/uuid": "^10.0.0",
"@types/vscode": "1.90.0",
"@types/vscode-webview": "^1.57.5",
"@typescript-eslint/eslint-plugin": "^8.26.0",
"@typescript-eslint/parser": "^8.26.0",
"@typescript-eslint/eslint-plugin": "^8.32.1",
"@typescript-eslint/parser": "^8.32.1",
"@vscode/l10n-dev": "^0.0.35",
"@vscode/test-cli": "^0.0.10",
"@vscode/test-electron": "^2.4.1",
Expand Down Expand Up @@ -141,7 +141,7 @@
"terser-webpack-plugin": "^5.3.13",
"ts-jest": "^29.2.6",
"ts-node": "^10.9.2",
"typescript": "^5.8.2",
"typescript": "^5.8.3",
"webpack": "~5.95.0",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-cli": "^6.0.1",
Expand Down Expand Up @@ -315,6 +315,12 @@
"title": "Refresh",
"icon": "$(refresh)"
},
{
"//": "[Testing] Start Demo Task",
"category": "DocumentDB",
"command": "vscode-documentdb.command.testing.startDemoTask",
"title": "Start Demo Task"
},
{
"//": "[DiscoveryView] Enable Registry",
"category": "DocumentDB",
Expand Down Expand Up @@ -446,6 +452,18 @@
"category": "DocumentDB",
"command": "vscode-documentdb.command.containerView.open",
"title": "Open Collection"
},
{
"//": "Copy Collection",
"category": "DocumentDB",
"command": "vscode-documentdb.command.copyCollection",
"title": "Copy Collection…"
},
{
"//": "Paste Collection",
"category": "DocumentDB",
"command": "vscode-documentdb.command.pasteCollection",
"title": "Paste Collection…"
}
],
"submenus": [
Expand Down Expand Up @@ -684,6 +702,18 @@
"command": "vscode-documentdb.command.refresh",
"when": "view =~ /discoveryView/ && viewItem =~ /\\benableRefreshCommand\\b/i",
"group": "zheLastGroup@1"
},
{
"//": "[Collection] Copy Collection",
"command": "vscode-documentdb.command.copyCollection",
"when": "view =~ /connectionsView|discoveryView/ && viewItem =~ /treeitem[.]collection(?![a-z.\\/])/i && viewItem =~ /experience[.](mongocluster|mongodb)/i",
"group": "A@2"
},
{
"//": "[Collection] Paste Collection",
"command": "vscode-documentdb.command.pasteCollection",
"when": "view =~ /connectionsView|discoveryView/ && viewItem =~ /treeitem[.]collection(?![a-z.\\/])/i && viewItem =~ /experience[.](mongocluster|mongodb)/i",
"group": "A@2"
}
],
"explorer/context": [],
Expand Down
25 changes: 25 additions & 0 deletions src/commands/copyCollection/copyCollection.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { type IActionContext } from '@microsoft/vscode-azext-utils';
import * as vscode from 'vscode';
import { ext } from '../../extensionVariables';
import { type CollectionItem } from '../../tree/documentdb/CollectionItem';

export async function copyCollection(_context: IActionContext, node: CollectionItem): Promise<void> {
if (!node) {
throw new Error(vscode.l10n.t('No node selected.'));
}
// Store the node in extension variables
ext.copiedCollectionNode = node;

// Show confirmation message
const collectionName = node.collectionInfo.name;
const databaseName = node.databaseInfo.name;

void vscode.window.showInformationMessage(
vscode.l10n.t('Collection "{0}" from database "{1}" has been marked for copy.', collectionName, databaseName),
);
}
Loading