A switch-role plugin for MulmoChat.
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.
yarn add @gui-chat-plugin/switch-role// 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";import { pluginCore, TOOL_NAME, setRoles, getRoles } from "@gui-chat-plugin/switch-role";import { setRoles } from "@gui-chat-plugin/switch-role";
setRoles([
{ id: "assistant", name: "General Assistant" },
{ id: "coder", name: "Coding Expert" },
{ id: "writer", name: "Creative Writer" },
]);| 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 |
- "Switch to the coding assistant role"
- "Change to the creative writer persona"
- "What roles are available?"
- "Switch role to listener"
yarn install
yarn dev # Start dev server
yarn build # Build
yarn typecheck # Type check
yarn lint # LintMIT