Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): keep Claude CLI alive across Stop #8997

ClosedTONiiV(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/8997/headopened View on GitHub

Showing 3 changed files with 112 additions and 8 deletions (loading 2).

x
0 of 3 viewed, 3 left
112 additions and 8 deletionsapps/server/src/provider/Layers/ClaudeAdapter.test.tsModified
View file
@@ -54,11 +54,16 @@
private done = false;
private failure: unknown | undefined;
​
+ public readonly interruptCalls: Array<void> = [];
+ public readonly stopTaskCalls: Array<string> = [];
public readonly setModelCalls: Array<string | undefined> = [];
public readonly setPermissionModeCalls: Array<string> = [];
public readonly setMaxThinkingTokensCalls: Array<number | null> = [];
public closeCalls = 0;
public closeError: unknown | undefined;
+ public stopTask: ((taskId: string) => Promise<void>) | undefined = async (taskId: string) => {
+ this.stopTaskCalls.push(taskId);
+ };
​
emit(message: SDKMessage): void {
if (this.done) {
@@ -94,6 +99,10 @@
​
+ readonly interrupt = async (): Promise<void> => {
+ this.interruptCalls.push(undefined);
+ };
+​
readonly setModel = async (model?: string): Promise<void> => {
this.setModelCalls.push(model);