ework-daemon 0.4.50 → 0.4.51
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/package.json
CHANGED
|
@@ -99,14 +99,8 @@ export class PiBackend implements RuntimeBackend {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
async sessionExists(sessionId: string): Promise<boolean> {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
try {
|
|
105
|
-
const files = readdirSync(sessionDir);
|
|
106
|
-
return files.some((f) => f.includes(sessionId) && f.endsWith(".jsonl"));
|
|
107
|
-
} catch {
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
102
|
+
if (!sessionId) return false;
|
|
103
|
+
return this.findSessionFile(sessionId) !== null;
|
|
110
104
|
}
|
|
111
105
|
|
|
112
106
|
async getSessionOutputTokens(sessionId: string | undefined): Promise<SessionOutputResult> {
|