vscode-terminal-mcp 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/extension.js +21 -0
  2. package/package.json +1 -1
package/dist/extension.js CHANGED
@@ -5942,6 +5942,8 @@ var TerminalSession = class {
5942
5942
  shellExecutionDisposable = null;
5943
5943
  isActive = true;
5944
5944
  lastCommandAt;
5945
+ shellReady;
5946
+ resolveShellReady;
5945
5947
  constructor(config, maxOutputLines) {
5946
5948
  this.sessionId = generateSessionId();
5947
5949
  this.name = config.name;
@@ -5957,9 +5959,27 @@ var TerminalSession = class {
5957
5959
  if (config.shell) {
5958
5960
  terminalOptions.shellPath = config.shell;
5959
5961
  }
5962
+ this.shellReady = new Promise((resolve) => {
5963
+ this.resolveShellReady = resolve;
5964
+ });
5960
5965
  this.terminal = vscode2.window.createTerminal(terminalOptions);
5961
5966
  this.terminal.show(true);
5962
5967
  this.setupShellIntegrationCapture();
5968
+ if (vscode2.window.onDidChangeTerminalShellIntegration) {
5969
+ const disposable = vscode2.window.onDidChangeTerminalShellIntegration((e) => {
5970
+ if (e.terminal === this.terminal) {
5971
+ disposable.dispose();
5972
+ log(`Shell integration ready for session ${this.sessionId}`);
5973
+ this.resolveShellReady();
5974
+ }
5975
+ });
5976
+ setTimeout(() => {
5977
+ disposable.dispose();
5978
+ this.resolveShellReady();
5979
+ }, 3e3);
5980
+ } else {
5981
+ setTimeout(() => this.resolveShellReady(), 1500);
5982
+ }
5963
5983
  log(`Session ${this.sessionId} created: ${config.name} (cwd: ${this.cwd})`);
5964
5984
  }
5965
5985
  setupShellIntegrationCapture() {
@@ -6002,6 +6022,7 @@ var TerminalSession = class {
6002
6022
  * Execute a command in this terminal session.
6003
6023
  */
6004
6024
  async execute(command, timeoutMs, waitForCompletion) {
6025
+ await this.shellReady;
6005
6026
  const commandId = generateCommandId();
6006
6027
  const startedAt = Date.now();
6007
6028
  this.lastCommandAt = startedAt;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "vscode-terminal-mcp",
3
3
  "displayName": "Terminal MCP Server",
4
4
  "description": "MCP server that provides visible terminal sessions in VSCode for Claude Code and subagents",
5
- "version": "0.1.2",
5
+ "version": "0.1.3",
6
6
  "publisher": "sirlordt",
7
7
  "license": "MIT",
8
8
  "author": "sirlordt",