Switch role plugin for GUIChat
npm install @gui-chat-plugin/switch-role
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.
``bash`
yarn add @gui-chat-plugin/switch-role
`typescript
// 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";
`
`typescript`
import { pluginCore, TOOL_NAME, setRoles, getRoles } from "@gui-chat-plugin/switch-role";
`typescript
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 |
1. "Switch to the coding assistant role"
2. "Change to the creative writer persona"
3. "What roles are available?"
4. "Switch role to listener"
`bash``
yarn install
yarn dev # Start dev server
yarn build # Build
yarn typecheck # Type check
yarn lint # Lint
MIT