Skip to content
Closed
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
8 changes: 7 additions & 1 deletion apps/desktop/src/plugins/hermes-bots/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5665,6 +5665,12 @@ async function openRosterBot(bot) {
}

function displayName(bot, meta) {
// Defensive: callers have historically passed {name: <object>} here (e.g.
// wrapping a roster owner object instead of its .name); a non-string name
// must degrade to '' rather than TypeError mid-render.
if (bot && typeof bot.name !== 'string') {
bot = { ...bot, name: typeof bot.name === 'object' && bot.name !== null ? String(bot.name?.name ?? '') : '' }
}
// A configured alias route claiming this row overrides source-derived
// identity: the friendly alias name must survive hosted-session
// activation and Cloud-only rosters (#89131).
Expand Down Expand Up @@ -10870,7 +10876,7 @@ function CreateRoutineDialog({ bot, open, onClose }) {
'Send results to',
pickerSelect(target, setTarget, [
{ id: 'history', label: 'Run history only' },
{ id: 'bot-chat', label: `${displayName({ name: bot }, $botMeta.get()[bot])}\u2019s chat (bot responds)` }
{ id: 'bot-chat', label: `${displayName(typeof bot === 'string' ? { name: bot } : bot, botRosterMeta(bot, $botMeta.get()))}\u2019s chat (bot responds)` }
])
),
jsxs('label', {
Expand Down