Import AITURK IDE 1.0.0-beta.1 from Hermes 63279301; preserve MIT license
This commit is contained in:
commit
03634b1ca3
11340 files changed
+3442369
No files matched your search
@@ -0,0 +1,29 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { appendTranscriptMessage } from './messages.js'
|
||||
|
||||
describe('appendTranscriptMessage', () => {
|
||||
it('merges adjacent tool-only shelves into one transcript row', () => {
|
||||
const out = appendTranscriptMessage([{ kind: 'trail', role: 'system', text: '', tools: ['Terminal("one") ✓'] }], {
|
||||
kind: 'trail',
|
||||
role: 'system',
|
||||
text: '',
|
||||
tools: ['Terminal("two") ✓']
|
||||
})
|
||||
|
||||
expect(out).toEqual([
|
||||
{ kind: 'trail', role: 'system', text: '', tools: ['Terminal("one") ✓', 'Terminal("two") ✓'] }
|
||||
])
|
||||
})
|
||||
|
||||
it('merges tool shelves into the nearest thinking shelf', () => {
|
||||
const out = appendTranscriptMessage(
|
||||
[{ kind: 'trail', role: 'system', text: '', thinking: 'plan', tools: ['Terminal("one") ✓'] }],
|
||||
{ kind: 'trail', role: 'system', text: '', tools: ['Terminal("two") ✓'] }
|
||||
)
|
||||
|
||||
expect(out).toEqual([
|
||||
{ kind: 'trail', role: 'system', text: '', thinking: 'plan', tools: ['Terminal("one") ✓', 'Terminal("two") ✓'] }
|
||||
])
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user