- Create extension for generating dynamic chat bubble images via markdown - Add function that AI models can call to generate properly formatted markdown links - Implement URL encoding for text parameters - Add configurable settings for image service URL and bubble styles - Include test functionality to preview generated bubble markdown 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1.4 KiB
1.4 KiB
SillyBubble - Dynamic Chat Bubble Extension
Extension Purpose
- Creates dynamic chat bubble images from AI-provided text
- Uses a tool function called by the AI to generate markdown image links
- Properly URL-encodes the text parameter in the image URL
Build & Test Commands
- Extension Installation: Place in
extensions/
directory of SillyTavern - No build process needed - extension is JavaScript-based
- Test in SillyTavern by verifying:
- Tool registration with the AI
- Proper URL encoding of parameters
- Markdown image rendering in chat
Code Style Guidelines
Structure
- Extension name: "SillyBubble"
- Key files:
index.js
(tool registration),manifest.json
,style.css
Tool Implementation
- Register tool function
generateChatBubbleImage
for AI function calling - Function should accept text input and return formatted markdown
- Use
encodeURIComponent()
for proper URL parameter encoding - Return format:

JavaScript Patterns
- Use async/await for asynchronous operations
- Rely on jQuery for DOM manipulation
- Import required functions from SillyTavern's extensions.js
- Register event handlers in jQuery ready function
Extension Settings
- Store settings in
extension_settings[extensionName]
- Allow configuration of image service URL
- Support style parameters (e.g., bubble style, colors)