airloom 0.1.23 → 0.1.26

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/dist/index.js CHANGED
@@ -1044,6 +1044,10 @@ function fixSpawnHelperPermissions() {
1044
1044
  }
1045
1045
  }
1046
1046
  fixSpawnHelperPermissions();
1047
+ var OSC_COLOR_RE = /(?:\x1b\])?\d+(?:;\d+)?;rgb:[0-9a-f]{2,4}(?:\/[0-9a-f]{2,4}){2}(?:\x1b\\|\x07)?/gi;
1048
+ function stripOscColorResponses(data) {
1049
+ return data.replace(OSC_COLOR_RE, "");
1050
+ }
1047
1051
  function resolveExecutable2(command, envPath = process.env.PATH ?? "") {
1048
1052
  if (!command) return null;
1049
1053
  if (isAbsolute2(command) && existsSync2(command)) return command;
@@ -1236,13 +1240,17 @@ var TerminalSession = class {
1236
1240
  }
1237
1241
  writeInput(message) {
1238
1242
  if (!this.pty) return;
1243
+ const data = stripOscColorResponses(message.data);
1244
+ if (!data) return;
1239
1245
  this.batcher?.noteInput();
1240
- this.pty.write(message.data);
1246
+ this.pty.write(data);
1241
1247
  }
1242
1248
  writeRawInput(data) {
1243
1249
  if (!this.pty) return;
1250
+ const cleaned = stripOscColorResponses(data);
1251
+ if (!cleaned) return;
1244
1252
  this.batcher?.noteInput();
1245
- this.pty.write(data);
1253
+ this.pty.write(cleaned);
1246
1254
  }
1247
1255
  resize(message) {
1248
1256
  this.cols = Math.max(20, Math.floor(message.cols || this.cols));
@@ -1 +1 @@
1
- import{g as c}from"./index-DFxK5hoA.js";function f(t,i){for(var o=0;o<i.length;o++){const e=i[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(e,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var n,a;function b(){return a||(a=1,n=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}),n}var u=b();const w=c(u),p=f({__proto__:null,default:w},[u]);export{p as b};
1
+ import{g as c}from"./index-B8POXsBS.js";function f(t,i){for(var o=0;o<i.length;o++){const e=i[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(e,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var n,a;function b(){return a||(a=1,n=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}),n}var u=b();const w=c(u),p=f({__proto__:null,default:w},[u]);export{p as b};