fix group chat agent mentions (#1111)
This commit is contained in:
@@ -2,6 +2,7 @@ import { describe, expect, it } from 'vitest'
|
||||
import { countTokens } from '../../packages/server/src/lib/context-compressor'
|
||||
import {
|
||||
estimateGroupHistoryMessageTokens,
|
||||
groupBridgeReasoningDeltaFromEvent,
|
||||
groupContextTokensWithFixedOverhead,
|
||||
} from '../../packages/server/src/services/hermes/group-chat/agent-clients'
|
||||
|
||||
@@ -22,4 +23,19 @@ describe('group chat fixed context cache helpers', () => {
|
||||
expect(groupContextTokensWithFixedOverhead(undefined, [{ content: 'hello' }])).toBeUndefined()
|
||||
expect(groupContextTokensWithFixedOverhead(null, [{ content: 'hello' }])).toBeUndefined()
|
||||
})
|
||||
|
||||
it('keeps spinner thinking events out of persisted group-chat reasoning', () => {
|
||||
expect(groupBridgeReasoningDeltaFromEvent({
|
||||
event: 'thinking.delta',
|
||||
text: '(◕‿◕✿) pondering...',
|
||||
})).toBeNull()
|
||||
expect(groupBridgeReasoningDeltaFromEvent({
|
||||
event: 'reasoning.delta',
|
||||
text: 'real reasoning',
|
||||
})).toBe('real reasoning')
|
||||
expect(groupBridgeReasoningDeltaFromEvent({
|
||||
event: 'reasoning.delta',
|
||||
text: '',
|
||||
})).toBeNull()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user