diff --git a/apps/desktop/src/plugins/hermes-bots/plugin.js b/apps/desktop/src/plugins/hermes-bots/plugin.js index 8e6600aa25..b3d7c1d06b 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 25e231aee8..af75b6a7b3 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'