File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ import { resolveAgentModelFallbackValues } from "../config/model-input.js";
6060import {
6161 buildGroupDisplayName ,
6262 getSessionStoreCacheVersion ,
63+ isTerminalSessionStatus ,
6364 resolveAllAgentSessionStoreTargetsSync ,
6465 resolveAgentMainSessionKey ,
6566 resolveFreshSessionTotalTokens ,
@@ -107,7 +108,6 @@ import type {
107108 GatewayAgentRow ,
108109 GatewaySessionRow ,
109110 GatewaySessionsDefaults ,
110- SessionRunStatus ,
111111 SessionsListResult ,
112112} from "./session-utils.types.js" ;
113113
@@ -423,10 +423,6 @@ function isFinitePositiveTimestamp(value: unknown): value is number {
423423 return typeof value === "number" && Number . isFinite ( value ) && value > 0 ;
424424}
425425
426- function isTerminalSessionStatus ( status : unknown ) : status is Exclude < SessionRunStatus , "running" > {
427- return status === "done" || status === "failed" || status === "killed" || status === "timeout" ;
428- }
429-
430426function shouldKeepStoreOnlyChildLink ( entry : SessionEntry , now : number ) : boolean {
431427 if ( isTerminalSessionStatus ( entry . status ) || isFinitePositiveTimestamp ( entry . endedAt ) ) {
432428 const endedAt = isFinitePositiveTimestamp ( entry . endedAt ) ? entry . endedAt : entry . updatedAt ;
You can’t perform that action at this time.
0 commit comments