Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

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

Showing 2 changed files with 84 additions and 6 deletions.

x
0 of 2 viewed, 2 left
68 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 DateTime from "effect/DateTime";
@@ -147,6 +148,7 @@
​
async function createHarness(input: {
readonly readModel: ReturnType<typeof makeReadModel>;
+ readonly activeSessions?: ReadonlyArray<ProviderSession>;
readonly stopSessionImplementation?: (input: {
readonly threadId: ThreadId;
}) => ReturnType<ProviderServiceShape["stopSession"]>;
@@ -169,7 +171,7 @@
respondToRequest: () => unsupported(),
respondToUserInput: () => unsupported(),
stopSession,
- listSessions: () => Effect.succeed([]),
+ listSessions: () => Effect.succeed(input.activeSessions ?? []),
getCapabilities: () => Effect.succeed({ sessionModelSwitch: "in-session" }),
assertConversationRollbackSupported: () => unsupported(),
getInstanceInfo: (instanceId) => {
@@ -247,7 +249,7 @@
session: {