Import the client, server, skills, tests, and build scripts as the starting point for the rebuild, then trim the surfaces this project does not ship: Electron desktop packaging, the marketing website, and the ESP32 firmware tree. CI keeps the web build, e2e, lockfile, release, and Docker workflows. Rename the package and CLI entry points to hermes-ui, drop the prepare hook so npm ci no longer triggers a build, and drop the removed tsconfig and nodemon references. Rewrite AGENTS.md, ARCHITECTURE.md, DEVELOPMENT.md, and the READMEs so the documented package map and hard rules match this repository. reference_code/ is ignored: it is a read-only snapshot, not an input to the build.
35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { buildMentionOptions } from '@/components/hermes/group-chat/mention-options'
|
|
|
|
describe('group chat mention options', () => {
|
|
const agents = [
|
|
{ name: 'Alice', profile: 'alice-profile' },
|
|
{ name: 'Bob', profile: 'bob-profile' },
|
|
{ name: 'all', profile: 'literal-all-agent' },
|
|
]
|
|
|
|
it('offers @all before agent mentions when the mention query is empty', () => {
|
|
expect(buildMentionOptions(agents, '').map(option => option.key)).toEqual([
|
|
'special:all',
|
|
'agent:Alice',
|
|
'agent:Bob',
|
|
])
|
|
})
|
|
|
|
it('keeps @all reserved when filtering by all and hides a literal all agent', () => {
|
|
expect(buildMentionOptions(agents, 'all')).toEqual([
|
|
{
|
|
key: 'special:all',
|
|
type: 'all',
|
|
name: 'all',
|
|
label: '@all',
|
|
description: 'All agents',
|
|
},
|
|
])
|
|
})
|
|
|
|
it('filters normal agent mentions without showing @all for unrelated queries', () => {
|
|
expect(buildMentionOptions(agents, 'bo').map(option => option.key)).toEqual(['agent:Bob'])
|
|
})
|
|
})
|