@clawos-dev/clawd 0.2.138 → 0.2.139
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/cli.cjs +10 -10
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -31945,7 +31945,7 @@ function applyCommand(state, command, deps) {
|
|
|
31945
31945
|
next.nextSeq = 0;
|
|
31946
31946
|
next.turnOpen = false;
|
|
31947
31947
|
next.status = "running";
|
|
31948
|
-
if (deps.mode === "tui") {
|
|
31948
|
+
if (deps.mode === "tui" && (next.file.tool ?? "claude") === "claude") {
|
|
31949
31949
|
next.readyForSend = false;
|
|
31950
31950
|
}
|
|
31951
31951
|
effects.push({ kind: "spawn", ctx: buildSpawnContext(next, deps) });
|
|
@@ -31968,7 +31968,7 @@ function applyCommand(state, command, deps) {
|
|
|
31968
31968
|
const procAliveBefore = state.procAlive;
|
|
31969
31969
|
const readyBefore = state.readyForSend;
|
|
31970
31970
|
const queueBefore = state.pendingSend.length;
|
|
31971
|
-
if (deps.mode === "tui") {
|
|
31971
|
+
if (deps.mode === "tui" && (next.file.tool ?? "claude") === "claude") {
|
|
31972
31972
|
pushed.state.pendingSend.push(command.text);
|
|
31973
31973
|
effects.push(...tryFlushPending(pushed.state, deps));
|
|
31974
31974
|
} else {
|
|
@@ -32021,7 +32021,7 @@ function applyCommand(state, command, deps) {
|
|
|
32021
32021
|
next.nextSeq = 0;
|
|
32022
32022
|
next.turnOpen = false;
|
|
32023
32023
|
next.status = "running";
|
|
32024
|
-
if (deps.mode === "tui") {
|
|
32024
|
+
if (deps.mode === "tui" && (next.file.tool ?? "claude") === "claude") {
|
|
32025
32025
|
next.readyForSend = false;
|
|
32026
32026
|
}
|
|
32027
32027
|
effects.push({ kind: "spawn", ctx: buildSpawnContext(next, deps) });
|
|
@@ -33306,7 +33306,7 @@ var SessionManager = class {
|
|
|
33306
33306
|
// send / ready-detected 分支走暂存队列还是直写
|
|
33307
33307
|
mode: this.deps.mode
|
|
33308
33308
|
});
|
|
33309
|
-
if (this.deps.mode === "tui" && !file.toolSessionId) {
|
|
33309
|
+
if (this.deps.mode === "tui" && (file.tool ?? "claude") === "claude" && !file.toolSessionId) {
|
|
33310
33310
|
const newTsid = v4_default();
|
|
33311
33311
|
this.deps.logger?.debug("tui mode: backfilling missing toolSessionId", {
|
|
33312
33312
|
sessionId: file.sessionId,
|
|
@@ -33323,7 +33323,7 @@ var SessionManager = class {
|
|
|
33323
33323
|
});
|
|
33324
33324
|
}
|
|
33325
33325
|
}
|
|
33326
|
-
if (this.deps.mode === "tui" && this.attachedObserver && file.toolSessionId) {
|
|
33326
|
+
if (this.deps.mode === "tui" && (file.tool ?? "claude") === "claude" && this.attachedObserver && file.toolSessionId) {
|
|
33327
33327
|
try {
|
|
33328
33328
|
const ret = this.attachedObserver.start({
|
|
33329
33329
|
sessionId: file.sessionId,
|
|
@@ -33343,7 +33343,7 @@ var SessionManager = class {
|
|
|
33343
33343
|
error: err.message
|
|
33344
33344
|
});
|
|
33345
33345
|
}
|
|
33346
|
-
} else if (this.deps.mode === "tui") {
|
|
33346
|
+
} else if (this.deps.mode === "tui" && (file.tool ?? "claude") === "claude") {
|
|
33347
33347
|
this.deps.logger?.warn("tui mode but observer not auto-attached", {
|
|
33348
33348
|
sessionId: file.sessionId,
|
|
33349
33349
|
hasObserver: !!this.attachedObserver,
|
|
@@ -33419,7 +33419,7 @@ var SessionManager = class {
|
|
|
33419
33419
|
const tool = args.tool ?? "claude";
|
|
33420
33420
|
this.deps.getAdapter(tool);
|
|
33421
33421
|
const iso = nowIso2(this.deps);
|
|
33422
|
-
const toolSessionId = this.deps.mode === "tui" ? v4_default() : void 0;
|
|
33422
|
+
const toolSessionId = this.deps.mode === "tui" && tool === "claude" ? v4_default() : void 0;
|
|
33423
33423
|
const file = {
|
|
33424
33424
|
sessionId: newSessionId(),
|
|
33425
33425
|
cwd,
|
|
@@ -33766,8 +33766,8 @@ var SessionManager = class {
|
|
|
33766
33766
|
return { response: normalized, broadcast };
|
|
33767
33767
|
}
|
|
33768
33768
|
newSession(args) {
|
|
33769
|
-
this.getFile(args.sessionId);
|
|
33770
|
-
const nextToolSessionId = this.deps.mode === "tui" ? v4_default() : void 0;
|
|
33769
|
+
const existingFile = this.getFile(args.sessionId);
|
|
33770
|
+
const nextToolSessionId = this.deps.mode === "tui" && (existingFile.tool ?? "claude") === "claude" ? v4_default() : void 0;
|
|
33771
33771
|
const runner = this.runners.get(args.sessionId);
|
|
33772
33772
|
if (runner) {
|
|
33773
33773
|
const { value, broadcast } = this.withCollector(() => {
|
|
@@ -34043,7 +34043,7 @@ var SessionManager = class {
|
|
|
34043
34043
|
);
|
|
34044
34044
|
}
|
|
34045
34045
|
const runner = this.ensureRunnerForScope(file, args.scope);
|
|
34046
|
-
const nextToolSessionId = this.deps.mode === "tui" ? v4_default() : void 0;
|
|
34046
|
+
const nextToolSessionId = this.deps.mode === "tui" && (file.tool ?? "claude") === "claude" ? v4_default() : void 0;
|
|
34047
34047
|
const { broadcast } = this.withCollector(() => {
|
|
34048
34048
|
runner.input({
|
|
34049
34049
|
kind: "command",
|