Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): keep Claude messaging sessions alive #14535

ClosedGigioxx(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/14535/headopened View on GitHub

Showing 2 changed files with 158 additions and 6 deletions.

x
0 of 2 viewed, 2 left
127 additions and 6 deletionsapps/server/src/provider/Layers/ProviderSessionReaper.test.tsModified
View file
@@ -5,6 +5,7 @@
TurnId,
ProviderDriverKind,
ProviderInstanceId,
+ type ProviderSession,
} from "@t3tools/contracts";
import * as Clock from "effect/Clock";
import * as Deferred from "effect/Deferred";
@@ -175,6 +176,8 @@
​
async function createHarness(input: {
readonly readModel: ReturnType<typeof makeReadModel>;
+ readonly activeSessions?: ReadonlyArray<ProviderSession>;
+ readonly listSessionsImplementation?: () => ReturnType<ProviderServiceShape["listSessions"]>;
readonly stopSessionImplementation?: (input: {
readonly threadId: ThreadId;
}) => ReturnType<ProviderServiceShape["stopSession"]>;
@@ -197,7 +200,8 @@
respondToRequest: () => unsupported(),
respondToUserInput: () => unsupported(),
stopSession,
- listSessions: () => Effect.succeed([]),
+ listSessions:
+ input.listSessionsImplementation ?? (() => Effect.succeed(input.activeSessions ?? [])),
getCapabilities: () => Effect.succeed({ sessionModelSwitch: "in-session" }),
assertConversationRollbackSupported: () => unsupported(),
getInstanceInfo: (instanceId) => {