mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 20:14:02 +00:00
Refine topic context and purchase followup guards
This commit is contained in:
17
apps/bot/src/topic-history.test.ts
Normal file
17
apps/bot/src/topic-history.test.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { describe, expect, test } from 'bun:test'
|
||||
|
||||
import { shouldLoadExpandedChatHistory } from './topic-history'
|
||||
|
||||
describe('shouldLoadExpandedChatHistory', () => {
|
||||
test('recognizes broader russian dialogue-memory prompts', () => {
|
||||
expect(shouldLoadExpandedChatHistory('У тебя есть контекст диалога?')).toBe(true)
|
||||
expect(
|
||||
shouldLoadExpandedChatHistory('Это вопрос, что я последнее купил, основываясь на диалоге?')
|
||||
).toBe(true)
|
||||
expect(shouldLoadExpandedChatHistory('Вопрос выше уже есть')).toBe(true)
|
||||
})
|
||||
|
||||
test('stays false for ordinary purchase chatter', () => {
|
||||
expect(shouldLoadExpandedChatHistory('Купил молоко за 6 лари')).toBe(false)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user