agent-sh 0.14.3 → 0.14.4

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.
@@ -8,6 +8,7 @@ declare module "../core/event-bus.js" {
8
8
  "shell:command-done": {
9
9
  command: string;
10
10
  output: string;
11
+ outputRaw: string;
11
12
  cwd: string;
12
13
  exitCode: number | null;
13
14
  };
@@ -95,11 +95,12 @@ export class OutputParser {
95
95
  }
96
96
  if (this.lastCommand) {
97
97
  const raw = this.cleanOutput(this.currentOutputCapture);
98
- const output = stripAnsi(raw).trim();
99
- const cleaned = this.removeEchoedCommand(output, this.lastCommand);
98
+ const output = this.removeEchoedCommand(stripAnsi(raw).trim(), this.lastCommand);
99
+ const outputRaw = this.removeEchoedCommand(raw.trim(), this.lastCommand);
100
100
  this.bus.emit("shell:command-done", {
101
101
  command: this.lastCommand,
102
- output: cleaned,
102
+ output,
103
+ outputRaw,
103
104
  cwd: this.cwd,
104
105
  exitCode: null,
105
106
  });
@@ -128,7 +129,7 @@ export class OutputParser {
128
129
  }
129
130
  removeEchoedCommand(output, command) {
130
131
  const lines = output.split("\n");
131
- if (lines.length > 0 && lines[0].includes(command.slice(0, 20))) {
132
+ if (lines.length > 0 && stripAnsi(lines[0]).includes(command.slice(0, 20))) {
132
133
  return lines.slice(1).join("\n").trim();
133
134
  }
134
135
  return output;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-sh",
3
- "version": "0.14.3",
3
+ "version": "0.14.4",
4
4
  "description": "A shell-first terminal where AI is one keystroke away",
5
5
  "type": "module",
6
6
  "workspaces": [