Text Response plugin for GUI Chat applications. Provides markdown rendering with role-based styling for displaying text content from assistants, users, and systems.
- Markdown rendering with GitHub Flavored Markdown support
- Role-based styling (assistant, user, system)
- JSON auto-detection and syntax highlighting
<think>block processing for AI reasoning display- Inline text editing capability
- Transport kind indicator
yarn add @gui-chat-plugin/text-response// In src/tools/index.ts
import TextResponsePlugin from "@gui-chat-plugin/text-response/vue";
const pluginList = [
// ... other plugins
TextResponsePlugin,
];
// In src/main.ts
import "@gui-chat-plugin/text-response/style.css";import { executeTextResponse, TOOL_DEFINITION } from "@gui-chat-plugin/text-response";
// Execute the tool
const result = await executeTextResponse(context, {
text: "Hello, **world**!",
role: "assistant",
});interface TextResponseData {
text: string;
role?: "assistant" | "system" | "user";
transportKind?: string;
}| Argument | Type | Required | Description |
|---|---|---|---|
text |
string | Yes | Plain text or markdown content to display |
role |
"assistant" | "system" | "user" | No | Speaker role for styling |
transportKind |
string | No | Identifier for the transport provider |
# Install dependencies
yarn install
# Run demo
yarn dev
# Build
yarn build
# Lint
yarn lintTry these prompts to test the plugin:
- "Explain the difference between let and const in JavaScript"
- "Write a short poem about programming"
- "List the top 5 programming languages for web development"
MIT