claude-yes 1.15.1 → 1.16.1
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/README.md +8 -7
- package/dist/cli.js +11 -7
- package/dist/cli.js.map +170 -0
- package/dist/index.js +11 -7
- package/dist/index.js.map +128 -0
- package/index.ts +15 -11
- package/package.json +40 -40
package/dist/index.js
CHANGED
|
@@ -5091,12 +5091,13 @@ import { writeFile } from "fs/promises";
|
|
|
5091
5091
|
import path2 from "path";
|
|
5092
5092
|
import { mkdir } from "fs/promises";
|
|
5093
5093
|
async function claudeYes({
|
|
5094
|
-
continueOnCrash,
|
|
5095
|
-
exitOnIdle,
|
|
5096
5094
|
claudeArgs = [],
|
|
5095
|
+
continueOnCrash,
|
|
5097
5096
|
cwd = process.cwd(),
|
|
5098
|
-
|
|
5097
|
+
env = process.env,
|
|
5098
|
+
exitOnIdle,
|
|
5099
5099
|
logFile,
|
|
5100
|
+
removeControlCharactersFromStdout = false,
|
|
5100
5101
|
verbose = false
|
|
5101
5102
|
} = {}) {
|
|
5102
5103
|
if (verbose) {
|
|
@@ -5118,13 +5119,13 @@ async function claudeYes({
|
|
|
5118
5119
|
let errorNoConversation = false;
|
|
5119
5120
|
const shellOutputStream = new TransformStream;
|
|
5120
5121
|
const outputWriter = shellOutputStream.writable.getWriter();
|
|
5121
|
-
const pty =
|
|
5122
|
+
const pty = process.versions.bun ? await import("bun-pty") : await import("node-pty");
|
|
5122
5123
|
let shell = pty.spawn("claude", claudeArgs, {
|
|
5123
5124
|
name: "xterm-color",
|
|
5124
5125
|
cols: process.stdout.columns - PREFIXLENGTH,
|
|
5125
5126
|
rows: process.stdout.rows,
|
|
5126
5127
|
cwd,
|
|
5127
|
-
env
|
|
5128
|
+
env
|
|
5128
5129
|
});
|
|
5129
5130
|
let pendingExitCode = Promise.withResolvers();
|
|
5130
5131
|
async function onData(data) {
|
|
@@ -5138,12 +5139,12 @@ async function claudeYes({
|
|
|
5138
5139
|
return pendingExitCode.resolve(exitCode2);
|
|
5139
5140
|
}
|
|
5140
5141
|
console.log("Claude crashed, restarting...");
|
|
5141
|
-
shell = pty.spawn("claude", ["continue", "
|
|
5142
|
+
shell = pty.spawn("claude", ["--continue", "continue"], {
|
|
5142
5143
|
name: "xterm-color",
|
|
5143
5144
|
cols: process.stdout.columns - PREFIXLENGTH,
|
|
5144
5145
|
rows: process.stdout.rows,
|
|
5145
5146
|
cwd,
|
|
5146
|
-
env
|
|
5147
|
+
env
|
|
5147
5148
|
});
|
|
5148
5149
|
shell.onData(onData);
|
|
5149
5150
|
shell.onExit(onExit);
|
|
@@ -5218,3 +5219,6 @@ export {
|
|
|
5218
5219
|
removeControlCharacters,
|
|
5219
5220
|
claudeYes as default
|
|
5220
5221
|
};
|
|
5222
|
+
|
|
5223
|
+
//# debugId=3F612601EADFF57764756E2164756E21
|
|
5224
|
+
//# sourceMappingURL=index.js.map
|