Package Exports
- @csutil/support-bubble
- @csutil/support-bubble/support-bubble.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@csutil/support-bubble) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
AIsistBubble
Lightweight support bubble that captures browser console logs and forwards user questions, bug reports, and feature requests to ChatGPT—pre‐filled with your repo context and intelligent prompts.
🔗 Live Demo:
https://cs-util-com.github.io/AIsistBubbleJs/
Features
- 📍 Fixed chat bubble in bottom-right corner (blue circle with white chat icon)
- 💬 Small pop-over input for free-text questions, bug reports, or feature requests
- 🐞 Captures all
console.log
,console.warn
,console.error
, andconsole.info
messages - ✂️ Automatic truncation of logs to keep the URI-encoded query ≤ 2 000 characters
- 📄 Intelligently prompts ChatGPT with the current page's URL for context.
- 📧 Customizable bug report email address.
- 🔗 Opens ChatGPT in a new tab with
https://chat.openai.com/?q=<encoded prompt>
- 🚫 No backend, cookies, or localStorage—100% client-side
Installation
Download or clone this repository.
Option A: Use the complete file
- Copy
index.html
to your project. - Customize the
BUG_REPORT_EMAIL
in the<script>
section (see Configuration below)
- Copy
Option B: Embed into your existing HTML
- Copy the support bubble HTML elements (the
<button>
and<div>
withid="support-bubble"
andid="support-popover"
) and the entire<script>
section fromindex.html
into your file. - Ensure your project includes Tailwind CSS:
<script src="https://cdn.tailwindcss.com"></script>
.
- Copy the support bubble HTML elements (the
Usage
Click the blue support bubble in the bottom-right corner.
Type your question, bug report, or feature request into the pop-over textarea.
Click Submit (or press Ctrl/⌘ + Enter).
A new tab opens with ChatGPT, pre-filled with:
- A rules-based prompt for Q&A or bug reports
- Your text
- Captured console log (truncated if needed)
Edit or submit directly in ChatGPT.
Configuration
You can configure the support bubble by setting JavaScript variables inside the <script>
tag in your index.html
.
window.BUG_REPORT_EMAIL
: The email address where users should send bug reports. If not set, the prompt will ask ChatGPT to find a suitable support email.
To set the configuration, add a script tag before the main script tag like this:
<script>
window.BUG_REPORT_EMAIL = "support@example.com"; // TODO: Replace with your support email
</script>
Customization
- Position & Style: modify the Tailwind CSS classes in the HTML elements or add custom CSS
- Log Capture: modify
captureConsole()
to include/exclude methods or filter entries - Truncation Strategy: adjust slice size or add markers in
buildPrompt()
- UI Text: change the
title
,placeholder
, or button label in the HTML
License
See LICENSE