mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-03 05:00:25 +00:00
fix(sessions): clear stale contextTokens on model switch (#38044)
Merged via squash.
Prepared head SHA: bac2df4b7f
Co-authored-by: yuweuii <82372187+yuweuii@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { ChildProcess } from "node:child_process";
|
||||
import { EventEmitter } from "node:events";
|
||||
import { PassThrough } from "node:stream";
|
||||
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const { spawnWithFallbackMock, killProcessTreeMock } = vi.hoisted(() => ({
|
||||
spawnWithFallbackMock: vi.fn(),
|
||||
@@ -58,6 +58,10 @@ describe("createChildAdapter", () => {
|
||||
beforeEach(() => {
|
||||
spawnWithFallbackMock.mockClear();
|
||||
killProcessTreeMock.mockClear();
|
||||
delete process.env.OPENCLAW_SERVICE_MARKER;
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
if (originalServiceMarker === undefined) {
|
||||
delete process.env.OPENCLAW_SERVICE_MARKER;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user