opencode-translate 0.0.6 → 0.0.7
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 +1 -1
- package/src/activation.ts +10 -0
package/package.json
CHANGED
package/src/activation.ts
CHANGED
|
@@ -227,6 +227,16 @@ async function resolveSessionState(
|
|
|
227
227
|
directory: string | undefined,
|
|
228
228
|
sessionID: string,
|
|
229
229
|
): Promise<ResolvedSessionState> {
|
|
230
|
+
const cached = sessionStateCache.get(sessionID)
|
|
231
|
+
if (cached !== undefined) {
|
|
232
|
+
return {
|
|
233
|
+
sessionActive: Boolean(cached),
|
|
234
|
+
canActivate: false,
|
|
235
|
+
state: cached ?? undefined,
|
|
236
|
+
storedMessages: [],
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
230
240
|
const session = unwrapData(
|
|
231
241
|
await client.session.get({
|
|
232
242
|
path: { id: sessionID },
|