Skip to content

The agent that grows with you

fix(desktop): route Bot Mode group-chat Markdown through the plugin SDK

Teknium577f5cf207c3
diff --git a/apps/desktop/src/plugins/hermes-bots/plugin.js b/apps/desktop/src/plugins/hermes-bots/plugin.js
index 8e6600aa25d..b3d7c1d06bf 100644
--- a/apps/desktop/src/plugins/hermes-bots/plugin.js
+++ b/apps/desktop/src/plugins/hermes-bots/plugin.js
@@ -16,7 +16,6 @@
*/
import * as sdk from '@hermes/plugin-sdk'
-import { Streamdown } from 'streamdown'
import {
atom,
Button,
@@ -68,6 +67,7 @@ import { jsx, jsxs } from 'react/jsx-runtime'
const { McpTab, ToolsetConfigPanel } = sdk
// Keep optional exports feature-detected; test harnesses may strip the SDK namespace.
const SkillsView = typeof sdk === 'undefined' ? undefined : sdk.SkillsView
+const Streamdown = typeof sdk === 'undefined' ? undefined : sdk.Streamdown
const ID = 'hermes-bots'
const ROSTER_KEY = [ID, 'roster']
@@ -6492,8 +6492,8 @@ function GroupChatWorkspace({ group, members }) {
]
}),
jsx('div', {
- className: 'text-xs text-(--ui-text-secondary) [&_p]:mb-1 [&_p:last-child]:mb-0',
- children: jsx(Streamdown, { children: entry.text })
+ className: 'text-xs text-(--ui-text-secondary) [&_p]:mb-1 [&_p:last-child]:mb-0',
+ children: Streamdown ? jsx(Streamdown, { children: entry.text }) : entry.text
})
]
}, `${entry.at}:${index}`)
diff --git a/apps/desktop/src/sdk/index.ts b/apps/desktop/src/sdk/index.ts
index 25e231aee80..af75b6a7b36 100644
--- a/apps/desktop/src/sdk/index.ts
+++ b/apps/desktop/src/sdk/index.ts
@@ -633,3 +633,6 @@ export { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
/** Plugin-local reactive state (share between a trigger and its panel, poll
* loops, cross-component signals) — the same primitive `host.state` uses. */
export { atom, computed } from 'nanostores'
+/** Markdown renderer (same pipeline core chat surfaces use) so plugins render
+ * message text as a preview instead of raw Markdown source. */
+export { Streamdown } from 'streamdown'