Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ import { deliveryTargetFromCommand, replyTextFromResult } from './agent-delivery
// (the canonical Bot Mode command shape) and the reply extraction.
describe('delivery command detection', () => {
it('matches the canonical delivery command', () => {
const cmd =
'hermes -p turqoise chat --in ~ -c "Bot Chat" -Q -q "Message from 🤖 Hermes (@hermes): hi there"'
const cmd = 'hermes -p turqoise chat --in ~ -c "Bot Chat" -Q -q "Message from 🤖 Hermes (@hermes): hi there"'

expect(deliveryTargetFromCommand(cmd)).toBe('turqoise')
})

it('matches with a cd prefix and timeout wrapper', () => {
const cmd =
'cd ~ && timeout 240 hermes -p mr-tester chat --in "~" -Q -q "Message from 🤖 Hermes: hello"'
const cmd = 'cd ~ && timeout 240 hermes -p mr-tester chat --in "~" -Q -q "Message from 🤖 Hermes: hello"'

expect(deliveryTargetFromCommand(cmd)).toBe('mr-tester')
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { type ToolCallMessagePartProps } from '@assistant-ui/react'
import { type FC, useEffect, useState } from 'react'

import {
AGENT_MESSAGE_RE,
agentAvatarCache,
resolveAgentAvatar
} from '@/components/assistant-ui/thread/user-message'
import { AGENT_MESSAGE_RE, agentAvatarCache, resolveAgentAvatar } from '@/components/assistant-ui/thread/user-message'

// Sender-side inter-agent delivery: `hermes -p <agent> chat … -q "Message
// from 🤖 <sender>…"` run through the terminal tool IS the messaging
Expand Down