@gui-chat-plugin/switch-role
v0.2.1
Published
Switch role plugin for GUIChat
Readme
@gui-chat-plugin/switch-role
A switch-role plugin for MulmoChat.
Overview
This plugin allows users to switch between different AI assistant roles/personas during a conversation. Each role can have different system prompts and available plugins.
Installation
yarn add @gui-chat-plugin/switch-roleUsage
Vue Implementation (for MulmoChat)
// In src/tools/index.ts
import SwitchRolePlugin from "@gui-chat-plugin/switch-role/vue";
const pluginList = [
// ... other plugins
SwitchRolePlugin,
];
// In src/main.ts
import "@gui-chat-plugin/switch-role/style.css";Core Only (Framework-agnostic)
import { pluginCore, TOOL_NAME, setRoles, getRoles } from "@gui-chat-plugin/switch-role";Configuring Roles
import { setRoles } from "@gui-chat-plugin/switch-role";
setRoles([
{ id: "assistant", name: "General Assistant" },
{ id: "coder", name: "Coding Expert" },
{ id: "writer", name: "Creative Writer" },
]);Package Exports
| Export | Description |
|--------|-------------|
| @gui-chat-plugin/switch-role | Core (framework-agnostic) |
| @gui-chat-plugin/switch-role/vue | Vue implementation |
| @gui-chat-plugin/switch-role/style.css | Tailwind CSS styles |
Test Prompts
- "Switch to the coding assistant role"
- "Change to the creative writer persona"
- "What roles are available?"
- "Switch role to listener"
Development
yarn install
yarn dev # Start dev server
yarn build # Build
yarn typecheck # Type check
yarn lint # LintLicense
MIT
