@gui-chat-plugin/text-response
v0.1.1
Published
Text Response plugin for GUI Chat - Markdown rendering with role-based styling
Readme
@gui-chat-plugin/text-response
Text Response plugin for GUI Chat applications. Provides markdown rendering with role-based styling for displaying text content from assistants, users, and systems.
Features
- 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
Installation
yarn add @gui-chat-plugin/text-responseUsage
Vue Integration
// 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";Core-only Usage
import { executeTextResponse, TOOL_DEFINITION } from "@gui-chat-plugin/text-response";
// Execute the tool
const result = await executeTextResponse(context, {
text: "Hello, **world**!",
role: "assistant",
});API
TextResponseData
interface TextResponseData {
text: string;
role?: "assistant" | "system" | "user";
transportKind?: string;
}Tool Arguments
| 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 |
Development
# Install dependencies
yarn install
# Run demo
yarn dev
# Build
yarn build
# Lint
yarn lintTest Prompts
Try 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"
License
MIT
