{"id":44608263,"url":"https://github.com/sauravbhattacharya001/agenticchat","last_synced_at":"2026-04-02T20:54:15.454Z","repository":{"id":306176969,"uuid":"1025267012","full_name":"sauravbhattacharya001/agenticchat","owner":"sauravbhattacharya001","description":"Turn natural language into executable code — right in your browser. Lightweight AI chat powered by GPT-4o with sandboxed JavaScript execution.","archived":false,"fork":false,"pushed_at":"2026-03-27T00:49:05.000Z","size":9730,"stargazers_count":1,"open_issues_count":46,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-27T00:49:42.281Z","etag":null,"topics":["agentic","ai","browser","chatbot","code-execution","code-generation","developer-tools","generative-ai","gpt-4o","html5","javascript","llm","natural-language-processing","openai","sandbox","web-app"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sauravbhattacharya001.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-24T02:16:20.000Z","updated_at":"2026-03-26T19:52:28.000Z","dependencies_parsed_at":"2025-07-24T05:45:58.727Z","dependency_job_id":"a663cb6f-a36c-4ef1-83da-c648503fef09","html_url":"https://github.com/sauravbhattacharya001/agenticchat","commit_stats":null,"previous_names":["sauravbhattacharya001/agenticchat"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/sauravbhattacharya001/agenticchat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sauravbhattacharya001%2Fagenticchat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sauravbhattacharya001%2Fagenticchat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sauravbhattacharya001%2Fagenticchat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sauravbhattacharya001%2Fagenticchat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sauravbhattacharya001","download_url":"https://codeload.github.com/sauravbhattacharya001/agenticchat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sauravbhattacharya001%2Fagenticchat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31316008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic","ai","browser","chatbot","code-execution","code-generation","developer-tools","generative-ai","gpt-4o","html5","javascript","llm","natural-language-processing","openai","sandbox","web-app"],"created_at":"2026-02-14T11:25:54.739Z","updated_at":"2026-04-02T20:54:15.441Z","avatar_url":"https://github.com/sauravbhattacharya001.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# 🤖 Agentic Chat\n\n**Turn natural language into executable code — right in your browser.**\n\n[![Azure Static Web Apps CI/CD](https://github.com/sauravbhattacharya001/agenticchat/actions/workflows/azure-static-web-apps-gray-forest-0f6217910.yml/badge.svg)](https://github.com/sauravbhattacharya001/agenticchat/actions/workflows/azure-static-web-apps-gray-forest-0f6217910.yml)\n[![CodeQL](https://github.com/sauravbhattacharya001/agenticchat/actions/workflows/codeql.yml/badge.svg)](https://github.com/sauravbhattacharya001/agenticchat/actions/workflows/codeql.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/sauravbhattacharya001/agenticchat/blob/main/LICENSE)\n[![HTML5](https://img.shields.io/badge/HTML5-E34F26?logo=html5\u0026logoColor=white)](#tech-stack)\n[![JavaScript](https://img.shields.io/badge/JavaScript-F7DF1E?logo=javascript\u0026logoColor=black)](#tech-stack)\n[![OpenAI](https://img.shields.io/badge/Powered%20by-GPT--4o-412991?logo=openai\u0026logoColor=white)](https://platform.openai.com/)\n[![GitHub repo size](https://img.shields.io/github/repo-size/sauravbhattacharya001/agenticchat)](https://github.com/sauravbhattacharya001/agenticchat)\n[![GitHub last commit](https://img.shields.io/github/last-commit/sauravbhattacharya001/agenticchat)](https://github.com/sauravbhattacharya001/agenticchat/commits/main)\n[![codecov](https://codecov.io/gh/sauravbhattacharya001/agenticchat/graph/badge.svg)](https://codecov.io/gh/sauravbhattacharya001/agenticchat)\n\nA lightweight, zero-dependency chat interface that sends your prompts to GPT-4o, extracts the JavaScript it writes, and executes it in a sandboxed iframe — all from a single HTML file.\n\n[**Live Demo**](https://sauravbhattacharya001.github.io/agenticchat/) · [**Report Bug**](https://github.com/sauravbhattacharya001/agenticchat/issues) · [**Request Feature**](https://github.com/sauravbhattacharya001/agenticchat/issues)\n\n\u003c/div\u003e\n\n---\n\n## ✨ Features\n\n### Core\n- **Natural Language → Code** — Ask a question or describe a task in plain English; GPT-4o returns JavaScript that gets executed automatically\n- **Sandboxed Execution** — Generated code runs in an `\u003ciframe sandbox=\"allow-scripts\"\u003e` with no access to the parent page's DOM, cookies, localStorage, or variables\n- **Content Security Policy** — The sandbox iframe enforces `default-src 'none'; connect-src https:` so code can call external APIs but nothing else\n- **Nonce Validation** — Each execution gets a `crypto.randomUUID()` nonce to prevent stale or replayed postMessage events\n- **Multi-Model Support** — Switch between GPT-4o, GPT-4o-mini, GPT-4-turbo, and more via the model selector\n- **API Key Management** — Detects `YOUR_API_KEY` placeholders in generated code and prompts for credentials per domain; keys are cached per session\n\n### Conversation Management\n- **Conversation History** — Maintains a sliding window of up to 20 message pairs with automatic trimming and token-count warnings\n- **Multi-Session** — Create, switch between, rename, and delete multiple conversation sessions with auto-save\n- **Cross-Tab Sync** — Detects concurrent edits across browser tabs via BroadcastChannel\n- **Conversation Fork** — Branch conversations from any message into new sessions\n- **Chapters** — Insert named section dividers with a table-of-contents sidebar\n- **Tags** — Colored tag labels on sessions with filtering and management\n- **Auto-Tagger** — Heuristic topic detection and automatic tag suggestions\n\n### Search \u0026 Navigation\n- **Message Search** — Full-text search across conversation messages with highlighting\n- **Global Session Search** — Search across all saved sessions at once\n- **Conversation Timeline** — Visual minimap sidebar for conversation navigation\n- **Bookmarks \u0026 Pinning** — Bookmark messages for quick reference; pin important ones to a floating bar\n- **Slash Commands** — `/`-triggered command dropdown with autocomplete and keyboard navigation\n\n### Productivity\n- **Prompt Templates** — Built-in library of categorized prompt templates with search filtering\n- **Snippet Library** — Save, tag, search, rename, and re-run generated code snippets\n- **Quick Replies** — Contextual follow-up suggestion chips after AI responses\n- **Formatting Toolbar** — Markdown formatting buttons above the chat input\n- **Scratchpad** — Persistent notepad panel with copy/insert/download actions\n- **Input History** — Navigate previous prompts with ↑/↓ arrow keys\n- **File Drop Zone** — Drag-and-drop file inclusion (text-based files, 100 KB limit)\n- **Focus Mode** — Distraction-free zen mode (Ctrl+Shift+F)\n\n### Analysis \u0026 Insights\n- **Chat Stats** — Conversation analytics: word counts, code blocks, response timing\n- **Cost Dashboard** — Persistent API spend tracker with budget alerts and daily chart\n- **Message Diff** — Compare any two messages with visual line-level diff\n- **Conversation Summarizer** — Heuristic summary with topics, decisions, and action items\n- **Response Time Badge** — Per-response latency indicator\n\n### Personalization\n- **Persona Presets** — Switchable system prompt presets with custom persona support\n- **Theme Manager** — Dark/light theme with OS preference detection\n- **Keyboard Shortcuts** — Global shortcuts with help modal\n- **Voice Input** — Browser speech recognition with language selection\n- **Read Aloud** — Text-to-speech for messages with voice/speed controls\n\n### Data\n- **Message Annotations** — Private notes/annotations on messages with labels\n- **Message Reactions** — Per-message emoji reactions with persistent counts\n- **Data Backup** — Full backup/restore for all 21 data keys (export/import/selective/merge)\n- **Zero Dependencies** — Single HTML file + CSS + JS. No build tools, no npm, no bundler. Just open and go.\n- **Input Guardrails** — Character limit (50K chars), token estimate warnings (~80K threshold), real-time counter\n\n### AI \u0026 Reliability\n- **Response Rating** — Thumbs up/down ratings on AI responses with model satisfaction dashboard\n- **Smart Retry** — Automatic retry with exponential backoff for transient API failures\n- **Message Editor** — Edit and resend user messages (truncates history and reloads into input)\n- **Message Translator** — Inline message translation to 20+ languages via OpenAI API\n- **Conversation Merge** — Combine 2+ sessions into one merged conversation with chronological interleaving\n- **Conversation Replay** — Message-by-message playback with transport controls (play/pause/speed)\n- **Prompt Library** — User-created prompt snippets with folders, search, usage tracking, import/export\n- **Usage Heatmap** — GitHub-style 7x24 activity heatmap across all sessions\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- A modern web browser (Chrome, Firefox, Safari, Edge)\n- An [OpenAI API key](https://platform.openai.com/api-keys) with GPT-4o access\n\n### Usage\n\n1. **Open** `index.html` in your browser — or visit the [live demo](https://sauravbhattacharya001.github.io/agenticchat/)\n2. **Paste** your OpenAI API key into the key field (stored in memory only, never persisted)\n3. **Type** a question or task and press **Enter**\n4. **Watch** the generated code and its output appear in the console area\n\n```text\n\u003e \"What's the current UTC time?\"\n→ GPT-4o generates: return new Date().toUTCString();\n→ Output: Fri, 14 Feb 2026 10:00:00 GMT\n\n\u003e \"Fetch the top Hacker News story\"\n→ GPT-4o generates fetch() code targeting the HN API\n→ Output: { title: \"...\", url: \"...\" }\n```\n\n## 🏗️ How It Works\n\n```\nUser Prompt  →  GPT-4o (system prompt: reply with JS only)\n                    ↓\n             Markdown response with ```js code block\n                    ↓\n             Regex extraction of JavaScript\n                    ↓\n             Sandboxed iframe execution\n                    ↓\n             postMessage with nonce-validated result\n                    ↓\n             Display output in console area\n```\n\n1. A **system prompt** instructs GPT-4o to respond exclusively with JavaScript in a fenced code block\n2. The app **extracts** the code using regex and delivers it to a sandboxed iframe via `postMessage` (not template interpolation — preventing script-tag injection)\n3. The iframe **executes** the code with `new Function()` inside an async wrapper\n4. Results are **returned** via `postMessage` with origin validation (`'null'` for sandboxed iframes) and nonce matching\n\n### Modules\n\nThe codebase is organized into **49** IIFE modules in `app.js`, each using the revealing-module pattern:\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eCore (7 modules)\u003c/strong\u003e\u003c/summary\u003e\n\n| Module | Purpose |\n|--------|---------|\n| `SafeStorage` | Safe localStorage wrapper for restricted-storage environments |\n| `ChatConfig` | Frozen constants — model list, pricing, token limits, system prompt |\n| `ConversationManager` | Message history with sliding window trimming and token estimation |\n| `SandboxRunner` | Iframe sandbox lifecycle, execution, timeout, cancellation |\n| `ApiKeyManager` | OpenAI + per-service key storage, substitution, validation |\n| `UIController` | All DOM manipulation — button states, modals, output |\n| `ChatController` | Orchestrates send flow: input → API → code extraction → sandbox |\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eFeatures (42 modules)\u003c/strong\u003e\u003c/summary\u003e\n\n| Module | Purpose |\n|--------|---------|\n| `PromptTemplates` | Categorized prompt library with search and one-click insert |\n| `HistoryPanel` | Slide-out conversation history with Markdown/JSON export/import |\n| `SnippetLibrary` | Persistent code snippet storage with tagging and search |\n| `MessageSearch` | Full-text search across conversation messages |\n| `ChatBookmarks` | Bookmark individual messages for quick reference |\n| `SlashCommands` | Slash-command dropdown with autocomplete and keyboard nav |\n| `MessageReactions` | Per-message emoji reactions with persistent counts |\n| `KeyboardShortcuts` | Global keyboard shortcuts with help modal |\n| `VoiceInput` | Browser speech recognition with language selection |\n| `ThemeManager` | Dark/light theme with OS preference detection |\n| `SessionManager` | Multi-session persistence with auto-save and quota management |\n| `CrossTabSync` | Multi-tab conflict detection via storage events + BroadcastChannel |\n| `ChatStats` | Conversation analytics (word counts, code blocks, timing) |\n| `CostDashboard` | Persistent API spend tracker with budget alerts and daily chart |\n| `PersonaPresets` | Switchable system prompt presets with custom persona support |\n| `ModelSelector` | Model picker with localStorage persistence |\n| `FileDropZone` | Drag-and-drop file inclusion (text-based files, 100 KB limit) |\n| `FocusMode` | Distraction-free zen mode (Ctrl+Shift+F) |\n| `InputHistory` | Navigate previous prompts with ↑/↓ arrow keys |\n| `Scratchpad` | Persistent notepad panel with copy/insert/download actions |\n| `ResponseTimeBadge` | Response time indicator below token usage area |\n| `ConversationFork` | Branch conversations from any message into new sessions |\n| `QuickReplies` | Contextual follow-up suggestion chips after AI responses |\n| `MessagePinning` | Pin important messages to a floating quick-jump bar |\n| `ReadAloud` | Text-to-speech for messages with voice/speed controls |\n| `MessageDiff` | Compare any two messages with visual line-level diff |\n| `ConversationTimeline` | Visual minimap sidebar for conversation navigation |\n| `ConversationSummarizer` | Heuristic conversation summary with topics and action items |\n| `MessageAnnotations` | Private notes/annotations on messages with labels |\n| `ConversationChapters` | Named section dividers with TOC navigation |\n| `ConversationTags` | Colored tag labels on sessions with filtering and management |\n| `FormattingToolbar` | Markdown formatting buttons above chat input |\n| `GlobalSessionSearch` | Full-text search across all saved sessions |\n| `AutoTagger` | Heuristic topic detection and automatic tag suggestions |\n| `DataBackup` | Full backup/restore for all user data (21 keys, export/import) |\n| `ResponseRating` | Thumbs up/down ratings on AI responses with model satisfaction dashboard |\n| `ConversationMerge` | Combine 2+ sessions into one merged conversation (chronological interleave) |\n| `ConversationReplay` | Message-by-message playback with transport controls |\n| `PromptLibrary` | User-created prompt snippets with folders, search, usage tracking, import/export |\n| `MessageTranslator` | Inline message translation to 20+ languages via OpenAI API |\n| `MessageEditor` | Edit and resend user messages (truncate history + reload into input) |\n| `SmartRetry` | Automatic retry with exponential backoff for transient API failures |\n| `UsageHeatmap` | GitHub-style 7x24 activity heatmap across all sessions |\n| `SmartPaste` | Intelligent paste formatting — auto-detects JSON, code, CSV, SQL, URLs, stack traces |\n\n\u003c/details\u003e\n\n## 🔒 Security Model\n\nThe app executes AI-generated code, so security is a first-class concern:\n\n| Layer | Protection |\n|-------|-----------|\n| **Iframe Sandbox** | `sandbox=\"allow-scripts\"` — no DOM access, no cookies, no localStorage, no same-origin |\n| **CSP** | `default-src 'none'; connect-src https:` — only outbound HTTPS allowed |\n| **Origin Check** | postMessage validated against `'null'` origin (sandboxed iframe) |\n| **Nonce** | `crypto.randomUUID()` ties each execution to its result, preventing replay |\n| **Code Delivery** | Code sent via postMessage, not embedded in HTML (prevents `\u003c/script\u003e` injection) |\n| **API Key Isolation** | OpenAI key stored in parent JS variable only — never exposed to sandbox |\n\n### ⚠️ Known Limitations\n\n- **Outbound HTTPS is allowed** — The sandbox CSP includes `connect-src https:` so LLM-generated code can call external APIs. This is required for the core use case but means sandbox code can make network requests.\n- **Service API keys are injectable** — When you provide a third-party API key (e.g., weather API), it's injected into sandbox code. A prompt injection attack could theoretically exfiltrate it. Your OpenAI key is safe (parent page only).\n\n## 🛠️ Tech Stack\n\n| Component | Technology |\n|-----------|-----------|\n| **Frontend** | Vanilla HTML5 + CSS + JavaScript (single file) |\n| **AI Model** | OpenAI GPT-4o via REST API |\n| **Sandbox** | HTML5 iframe sandbox with CSP |\n| **Hosting** | GitHub Pages |\n| **CI/CD** | GitHub Actions |\n| **Security** | CodeQL analysis |\n\n## 📁 Project Structure\n\n```\nagenticchat/\n├── index.html              # Single-page UI with CSP headers\n├── app.js                  # All application logic (48 modular IIFEs)\n├── style.css               # Responsive dark-theme styling\n├── package.json            # npm metadata + test scripts\n├── jest.config.js          # Jest test configuration\n├── Dockerfile              # Multi-stage container build\n├── CONTRIBUTING.md         # Contribution guidelines\n├── LICENSE                 # MIT License\n├── README.md               # This file\n├── docs/\n│   └── index.html          # API reference \u0026 architecture docs (GitHub Pages)\n├── tests/\n│   ├── setup.js                  # DOM mocking \u0026 app.js loader for jsdom\n│   ├── app.test.js               # Core module tests (800+)\n│   ├── annotations.test.js       # MessageAnnotations tests\n│   ├── auto-tagger.test.js       # AutoTagger tests\n│   ├── chapters.test.js          # ConversationChapters tests\n│   ├── conversation-merge.test.js # ConversationMerge tests\n│   ├── conversation-replay.test.js # ConversationReplay tests\n│   ├── conversation-tags.test.js # ConversationTags tests\n│   ├── cost-dashboard.test.js    # CostDashboard tests\n│   ├── data-backup.test.js       # DataBackup tests\n│   ├── formatting-toolbar.test.js # FormattingToolbar tests\n│   ├── message-editor.test.js    # MessageEditor tests\n│   ├── message-translator.test.js # MessageTranslator tests\n│   ├── messagediff.test.js       # MessageDiff tests\n│   ├── model-compare.test.js     # ModelCompare tests\n│   ├── modules.test.js           # Module existence/integration tests\n│   ├── pinning.test.js           # MessagePinning tests\n│   ├── prompt-library.test.js    # PromptLibrary tests\n│   ├── readaloud.test.js         # ReadAloud tests\n│   ├── response-rating.test.js   # ResponseRating tests\n│   ├── smart-retry.test.js       # SmartRetry tests\n│   ├── summarizer.test.js        # ConversationSummarizer tests\n│   ├── timeline.test.js          # ConversationTimeline tests\n│   └── usageHeatmap.test.js      # UsageHeatmap tests\n└── .github/\n    ├── copilot-instructions.md    # Copilot coding agent context\n    ├── copilot-setup-steps.yml    # Copilot agent setup workflow\n    ├── dependabot.yml             # Automated dependency updates\n    ├── labeler.yml                # Auto-label configuration\n    ├── PULL_REQUEST_TEMPLATE.md   # PR template\n    ├── ISSUE_TEMPLATE/\n    │   ├── bug_report.yml         # Bug report form\n    │   ├── feature_request.yml    # Feature request form\n    │   └── config.yml             # Issue template config\n    └── workflows/\n        ├── ci.yml                 # Build + test + lint\n        ├── codeql.yml             # CodeQL security scanning\n        ├── docker.yml             # Docker build \u0026 push\n        ├── labeler.yml            # Auto-labeler workflow\n        ├── pages.yml              # GitHub Pages deployment\n        ├── publish.yml            # npm package publishing\n        └── stale.yml              # Stale issue/PR management\n```\n\n## 🌐 Browser Compatibility\n\n| Browser | Version | Status | Notes |\n|---------|---------|--------|-------|\n| Chrome | 90+ | ✅ Full | Recommended — best sandbox + speech API support |\n| Firefox | 88+ | ✅ Full | Voice input requires `media.navigator.enabled` |\n| Safari | 15+ | ✅ Full | Minor speech recognition differences |\n| Edge | 90+ | ✅ Full | Chromium-based, same as Chrome |\n| Opera | 76+ | ✅ Full | Chromium-based |\n| Mobile Chrome | 90+ | ⚠️ Partial | Voice input may require user gesture; layout adapts |\n| Mobile Safari | 15+ | ⚠️ Partial | `sandbox` iframe works but some CSP edge cases exist |\n\n**Requirements:** All browsers must support `crypto.randomUUID()` (HTTPS or localhost only), `iframe sandbox`, and `BroadcastChannel`. No polyfills needed for modern browsers.\n\n## ❓ Troubleshooting\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\"Failed to fetch\" or network errors when sending prompts\u003c/strong\u003e\u003c/summary\u003e\n\n- Verify your OpenAI API key is valid and has GPT-4o access\n- Check that your API key has sufficient credits/quota\n- Ensure you're not behind a corporate proxy that blocks `api.openai.com`\n- Try switching to a different model (e.g., GPT-4o-mini) in the model selector\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eGenerated code doesn't execute / \"Sandbox error\"\u003c/strong\u003e\u003c/summary\u003e\n\n- The sandbox iframe blocks DOM access by design — code that references `document`, `window.location`, or `localStorage` will fail\n- Code can only make outbound HTTPS requests (`connect-src https:`)\n- Check the browser console for CSP violation messages\n- If you see timeout errors, the generated code may be stuck in an infinite loop\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eVoice input not working\u003c/strong\u003e\u003c/summary\u003e\n\n- Speech recognition requires HTTPS (or localhost) — it won't work over plain HTTP\n- Firefox: ensure `media.navigator.enabled` is `true` in `about:config`\n- Safari: grant microphone permission when prompted\n- Some browsers require a user gesture (click) to activate the microphone\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eData lost between sessions\u003c/strong\u003e\u003c/summary\u003e\n\n- All data is stored in `localStorage` — clearing browser data will erase it\n- Use the **Data Backup** feature (Settings → Backup) to export your data regularly\n- `localStorage` has a ~5 MB limit per origin — the quota indicator in Settings shows usage\n- Cross-tab sync uses `BroadcastChannel`; if you edit in two tabs simultaneously, the last write wins\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eCost dashboard shows unexpected charges\u003c/strong\u003e\u003c/summary\u003e\n\n- The cost tracker estimates based on token counts and published OpenAI pricing\n- Actual billing may differ slightly due to system prompt tokens and retry attempts\n- Reset the tracker via Settings → Cost Dashboard → Reset\n- Set a budget alert threshold to get warnings before hitting your limit\n\n\u003c/details\u003e\n\n## 🤝 Contributing\n\nContributions are welcome! Here's how:\n\n1. **Fork** the repository\n2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)\n3. **Commit** your changes (`git commit -m 'feat: add amazing feature'`)\n4. **Push** to your branch (`git push origin feature/amazing-feature`)\n5. **Open** a Pull Request\n\n### Guidelines\n\n- This is a **single-file app** — keep it that way unless there's a compelling reason to split\n- All 49 modules live in `app.js` as revealing-module IIFEs\n- Security is paramount — any change that touches the sandbox must be reviewed carefully\n- Test with various prompt types before submitting (simple questions, API calls, error cases)\n\n## 📄 License\n\nDistributed under the MIT License. See [`LICENSE`](LICENSE) for details.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Built by [Saurav Bhattacharya](https://github.com/sauravbhattacharya001)**\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsauravbhattacharya001%2Fagenticchat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsauravbhattacharya001%2Fagenticchat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsauravbhattacharya001%2Fagenticchat/lists"}