mirror of
https://github.com/stablyai/orca.git
synced 2026-09-28 16:02:45 +00:00
test(native-chat): model dismissal inputs on the live / grammar
The trigger-key swap cases still used `$:4` keys. editReplacesTriggerToken is sigil-agnostic so they passed, but they modelled an input the composer can no longer produce.
This commit is contained in:
@@ -521,13 +521,13 @@ describe('native skill and command picker', () => {
|
||||
|
||||
it('treats a one-edit token swap as a new trigger occurrence', () => {
|
||||
expect(editReplacesTriggerToken('/foo', '/bar', '/:0')).toBe(true)
|
||||
expect(editReplacesTriggerToken('use $foo', 'use $bar', '$:4')).toBe(true)
|
||||
expect(editReplacesTriggerToken('use /foo', 'use /bar', '/:4')).toBe(true)
|
||||
})
|
||||
|
||||
it('keeps suppression while typing or deleting inside the dismissed token', () => {
|
||||
expect(editReplacesTriggerToken('/foo', '/food', '/:0')).toBe(false)
|
||||
expect(editReplacesTriggerToken('/food', '/foo', '/:0')).toBe(false)
|
||||
expect(editReplacesTriggerToken('use $foo now', 'ran $foo now', '$:4')).toBe(false)
|
||||
expect(editReplacesTriggerToken('use /foo now', 'ran /foo now', '/:4')).toBe(false)
|
||||
})
|
||||
|
||||
it('suppresses only the dismissed trigger occurrence', () => {
|
||||
|
||||
Reference in New Issue
Block a user