dsh-plugin-chat-renderer
消息通讯 活跃维护

dsh-plugin-chat-renderer

Skylarking/dsh-plugin-chat-renderer

作为轻量级聊天渲染插件,可灵活适配不同对话界面需求,支持自定义消息气泡样式、富文本内容渲染,开箱即用无需复杂配置,轻松实现对话内容的多样化展示。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
None
开源协议
1.2 MB
仓库大小
3 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:Skylarking/dsh-plugin-chat-renderer
git clone https://github.com/Skylarking/dsh-plugin-chat-renderer.git
git clone git@github.com:Skylarking/dsh-plugin-chat-renderer.git
README.md main

@skylarking/dsh-chat-renderer

Installable external plugin that enhances DSH chat content. Fenced code blocks marked mermaid render as diagrams inline in the conversation. The browser bundle uses Mermaid's strict security mode and keeps the source visible when a diagram cannot be rendered.

The implementation is intentionally generic: registerCodeRenderer() owns a browser-side registry keyed by fenced-code language. Future versions of this plugin can add image, code-preview, or other block handlers without modifying DSH's conversation package.

Install from the Desktop plugin manager by selecting this directory, or use:

pnpm dsh plugin --profile web add ./plugins/chat-renderer

Then write a message containing:

```mermaid
flowchart LR
  User --> DSH
  DSH --> Cordis


File links and relative file paths rendered as inline code also expose their path as a hover tooltip. Double-clicking either form opens a reversible context menu with copy-path and copy-content actions; URL-backed links additionally offer open, download, and copy-content actions. The menu is implemented entirely in the plugin and is removed together with the plugin; operating-system file actions follow the browser or Desktop host's URL policy.

Disabling or uninstalling the plugin removes its rendered output and restores the original code blocks. The plugin is presentation-only and contributes no model-visible input or durable session event.