test(session): exercise surface generations directly
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
|||||||
isSurfaceEvent,
|
isSurfaceEvent,
|
||||||
} from '@deepseek-ai/dsh-session'
|
} from '@deepseek-ai/dsh-session'
|
||||||
import { CallId } from '@deepseek-ai/dsh-llm'
|
import { CallId } from '@deepseek-ai/dsh-llm'
|
||||||
|
import { SurfaceManager } from '../src/surface.ts'
|
||||||
|
|
||||||
/** Build a minimal session with turn boundaries and a single user message. */
|
/** Build a minimal session with turn boundaries and a single user message. */
|
||||||
function surfaceSession(): Session {
|
function surfaceSession(): Session {
|
||||||
@@ -189,7 +190,7 @@ describe('SurfaceManager', () => {
|
|||||||
{ seq: 2, start: 0, end: 0, shadowedSeqs: [0] },
|
{ seq: 2, start: 0, end: 0, shadowedSeqs: [0] },
|
||||||
{ seq: 3, start: 2, end: 1, shadowedSeqs: [2, 1] },
|
{ seq: 3, start: 2, end: 1, shadowedSeqs: [2, 1] },
|
||||||
])
|
])
|
||||||
expect(s.surface.contexts).toEqual([
|
expect(new SurfaceManager(s.events).contexts).toEqual([
|
||||||
{ generation: 0, nodes: [0, 1] },
|
{ generation: 0, nodes: [0, 1] },
|
||||||
{
|
{
|
||||||
generation: 1,
|
generation: 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user