|
|
@@ -1,7 +1,7 @@
|
|
|
import { describe, expect, it } from 'vitest'
|
|
|
import { zstdCompressSync } from 'node:zlib'
|
|
|
import type { SessionEvent } from '@deepseek-ai/dsh-session'
|
|
|
-import { CallId, type StreamChunk } from '@deepseek-ai/dsh-llm'
|
|
|
+import { ToolCallId, type StreamChunk } from '@deepseek-ai/dsh-llm'
|
|
|
import {
|
|
|
decodeStorageRecord,
|
|
|
MAX_PACKED_DATA_BYTES,
|
|
|
@@ -85,10 +85,10 @@ describe('SQLite compression', () => {
|
|
|
const events = [
|
|
|
...[0, 1, 2].map(seq => event(seq, seq, { type: 'reasoning-delta', index: 1, text: `${seq}` })),
|
|
|
...[3, 4, 5].map(seq => event(seq, seq, {
|
|
|
- type: 'tool-call-delta', index: 2, id: CallId('named'), name: 'write', argumentsDelta: `${seq}`,
|
|
|
+ type: 'tool-call-delta', index: 2, id: ToolCallId('named'), name: 'write', argumentsDelta: `${seq}`,
|
|
|
})),
|
|
|
...[6, 7, 8].map(seq => event(seq, seq, {
|
|
|
- type: 'tool-call-delta', index: 3, id: CallId('unnamed'), argumentsDelta: `${seq}`,
|
|
|
+ type: 'tool-call-delta', index: 3, id: ToolCallId('unnamed'), argumentsDelta: `${seq}`,
|
|
|
})),
|
|
|
]
|
|
|
const records = packChunkRuns(events)
|
|
|
@@ -128,7 +128,7 @@ describe('SQLite compression', () => {
|
|
|
event(2, Number.MAX_SAFE_INTEGER, { type: 'text-delta', index: 0, text: 'c' }),
|
|
|
]
|
|
|
const toolName = [0, 1, 2].map(seq => event(seq, seq, {
|
|
|
- type: 'tool-call-delta', index: 0, id: CallId('id'),
|
|
|
+ type: 'tool-call-delta', index: 0, id: ToolCallId('id'),
|
|
|
...seq === 2 ? {} : { name: 'write' }, argumentsDelta: 'x',
|
|
|
}))
|
|
|
for (const events of [gap, step, block, unsafeTime, toolName]) {
|