@noldova/terminal 0.0.8 → 0.0.9

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.
package/module.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "id": "terminal",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "displayName": "Terminal",
5
5
  "description": "Runs shells in terminal panes, and lets AI agents run commands in them through permission requests.",
6
6
  "parts": ["runtime", "window"],
7
7
  "pseudoTerminals": true,
8
8
  "dependencies": {},
9
- "noldovaDesktop": ">=0.0.17 <0.1.0",
9
+ "noldovaDesktop": ">=0.0.20 <0.1.0",
10
10
  "contributes": {
11
11
  "methods": [
12
12
  "terminal.shells", "terminal.open", "terminal.close", "terminal.restart", "terminal.sessions", "terminal.attach", "terminal.input", "terminal.resize",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noldova/terminal",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "The terminal module for apps on Noldova Desktop: terminal panes over real shells, and agent tools that run commands through permission requests.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -37,18 +37,18 @@
37
37
  "registry": "https://registry.npmjs.org/"
38
38
  },
39
39
  "dependencies": {
40
- "@noldova/terminal.protocol": "0.0.8",
41
- "@noldova/terminal.window": "0.0.8",
40
+ "@noldova/terminal.protocol": "0.0.9",
41
+ "@noldova/terminal.window": "0.0.9",
42
42
  "@xterm/addon-serialize": "0.14.0",
43
43
  "@xterm/headless": "6.0.0",
44
44
  "node-pty": "1.2.0-beta.15"
45
45
  },
46
46
  "peerDependencies": {
47
- "@noldova/desktop.protocol": ">=0.0.17 <0.1.0",
48
- "@noldova/desktop.runtime": ">=0.0.17 <0.1.0",
49
- "@noldova/context.core": ">=0.0.12 <0.1.0",
50
- "@noldova/context.exceptions": ">=0.0.12 <0.1.0",
51
- "@noldova/context.json": ">=0.0.12 <0.1.0"
47
+ "@noldova/desktop.protocol": ">=0.0.20 <0.1.0",
48
+ "@noldova/desktop.runtime": ">=0.0.20 <0.1.0",
49
+ "@noldova/context.core": ">=0.0.18 <0.1.0",
50
+ "@noldova/context.exceptions": ">=0.0.18 <0.1.0",
51
+ "@noldova/context.json": ">=0.0.18 <0.1.0"
52
52
  },
53
- "gitHead": "6f07ee91e7a7874b8c5564180f3c4aef8686984a"
53
+ "gitHead": "cde694a6a42430b8318658b77276c7ac6082a615"
54
54
  }
@@ -44,10 +44,7 @@ export class DeferredPtyProcess {
44
44
  resize(columns, rows) {
45
45
  this.columns = columns;
46
46
  this.rows = rows;
47
- if (Object.isUndefined(this.process))
48
- this.start();
49
- else
50
- this.process.resize(columns, rows);
47
+ this.process?.resize(columns, rows);
51
48
  }
52
49
  pause() {
53
50
  this.isPaused = true;
@@ -971,8 +971,8 @@ export class TerminalHost {
971
971
  }
972
972
  resize(params, client) {
973
973
  const terminal = this.findHosted(params.sessionId, client);
974
- if (!terminal.session.resize(params.size))
975
- terminal.deferredShell?.start();
974
+ terminal.session.resize(params.size);
975
+ terminal.deferredShell?.start();
976
976
  terminal.isSized = true;
977
977
  terminal.session.changes.notify();
978
978
  }
@@ -180,12 +180,11 @@ export class TerminalSession {
180
180
  }
181
181
  resize(size) {
182
182
  if (size.equals(this.size))
183
- return false;
183
+ return;
184
184
  this.size = size;
185
185
  this.terminal.resize(size);
186
186
  this.watchResize();
187
187
  this.mirror.resize(size);
188
- return true;
189
188
  }
190
189
  async attachAsync(paneId, commands) {
191
190
  const snapshot = await this.mirror.snapshotAsync();
@@ -372,7 +371,7 @@ export class TerminalSession {
372
371
  this.changes.notify();
373
372
  }
374
373
  redraw() {
375
- if (this.size.rows < 2)
374
+ if (this.size.rows < 2 || Object.isNull(this.terminal.pid))
376
375
  return;
377
376
  this.terminal.resize(new TerminalSize(this.size.columns, this.size.rows - 1));
378
377
  this.terminal.resize(this.size);