Skip to content

Commit

Permalink
0.0.7 Added custom.showInputBox
Browse files Browse the repository at this point in the history
  • Loading branch information
Darien Pardinas Diaz committed Jul 29, 2024
1 parent 0b95cdd commit 760e416
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [0.0.7]

- Added `custom.showInputBox` to show input box dialog to collect a input string from the user

## [0.0.6]

- Added `custom.getExtensionInfo` to get specific information about an extension by passing the extension ID as parameter. Use `custom.listInstalledExtensions`to list all installed extensions.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ As the extension progresses, I plan to add more _special_ commands (i.e. command
- `custom.startDebugSession`: allows you to invoke `vscode.debug.startDebugging()` API by passing the workspace folder and a name or definition of a debug configuration as it would be set in `launch.json`
- `custom.runInTerminal`: allows you to invoke commands the currently active integrated terminal
- `custom.showQuickPick`: show quick pick dialog to collect selection from the user
- `custom.showInputBox`: show input box dialog to collect a input string from the user
- `custom.showInformationMessage`, `custom.showWarningMessage` and `custom.showErrorMessage`: show message dialogs to the user and let them click on a button
- `custom.listInstalledExtensions`: get the list of installed extension IDs
- `custom.getExtensionInfo`: get details of an installed extension by passing the extension ID
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "This extension allows you to remotely control Visual Studio Code via a REST endpoint, taking automation to the next level.",
"publisher": "dpar39",
"license": "MIT",
"version": "0.0.6",
"version": "0.0.7",
"engines": {
"vscode": "^1.55.0"
},
Expand Down
4 changes: 4 additions & 0 deletions src/services/requestProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ export async function processRemoteControlRequest(requestObject: ControlRequest)
return await quickPick(args[0]);
}

if (command === "custom.showInputBox") {
return await vscode.window.showInputBox(args[0]);
}

if (command === "custom.goToFileLineCharacter") {
const filePath = args[0];
let uri = null;
Expand Down
13 changes: 13 additions & 0 deletions src/test/workspace1/samples.http
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,16 @@ content-type: application/json
"command": "workbench.action.reloadWindow",
"args": []
}

### Show input box and collect response
POST {{endpoint}} HTTP/1.1
content-type: application/json

{
"command": "custom.showInputBox",
"args": [{
"title": "Collect user info",
"value": "replace me please",
"placeHolder": "Enter some text here"
}]
}

0 comments on commit 760e416

Please sign in to comment.