The open-source AI receptionist for businesses. Answers every call, books the appointment and hands over to a person when needed. You own the code and the data.
TypeScript ai-receptionistanswering-serviceappointment-bookinglivekitlocal-firstmcpopen-sourceself-hostedsiptelephonytypescriptvoice-agentvoice-ai
import { describe, expect, it } from 'vitest'
import { chordTarget } from './chords.ts'
const all = { instanceAdmin: true, review: true, assign: true }
const member = { instanceAdmin: false, review: false, assign: false }
describe('G chords', () => {
it('G S opens Settings, G T the team in Workspace settings', () => {
expect(chordTarget('s', member)).toEqual({ kind: 'page', route: 'settings' })
expect(chordTarget('t', member)).toEqual({ kind: 'page', route: 'workspace', section: 'team' })
})
it('keeps the other pages and views', () => {
expect(chordTarget('a', member)).toEqual({ kind: 'page', route: 'assistant' })
expect(chordTarget('c', member)).toEqual({ kind: 'page', route: 'contacts' })
expect(chordTarget('n', member)).toEqual({ kind: 'page', route: 'insights' })
expect(chordTarget('o', member)).toEqual({ kind: 'page', route: 'integrations' })
expect(chordTarget('i', member)).toEqual({ kind: 'tab', tab: 'you' })
expect(chordTarget('e', member)).toEqual({ kind: 'tab', tab: 'done' })
expect(chordTarget('h', member)).toEqual({ kind: 'tab', tab: 'reminders' })
})
it('offers Server admin, How <assistant> did and the assignee views only to who can use them', () => {
expect(chordTarget('d', all)).toEqual({ kind: 'page', route: 'admin' })
expect(chordTarget('d', member)).toBeNull()
// G R: the open questions, now the first rows of Business info's questions and answers (LIN-797).
expect(chordTarget('r', all)).toEqual({ kind: 'page', route: 'assistant', section: 'business' })
expect(chordTarget('r', member)).toBeNull()
expect(chordTarget('m', all)).toEqual({ kind: 'tab', tab: 'mine' })
expect(chordTarget('u', all)).toEqual({ kind: 'tab', tab: 'unassigned' })
expect(chordTarget('m', member)).toBeNull()
expect(chordTarget('u', member)).toBeNull()
})
it('does nothing for other keys and inherited names', () => {
for (const key of ['x', 'z', 'constructor', 'toString', '']) expect(chordTarget(key, all)).toBeNull()
})
})