Skip to content

Conversation

@jasonacox
Copy link
Owner

This pull request introduces significant enhancements to the chatbot's image editing capabilities, markdown rendering in the chat UI, static asset management, and third-party license documentation. The main updates include support for image editing workflows, comprehensive markdown and code block rendering with syntax highlighting, local serving of all static assets for air-gapped deployments, and improved third-party license attribution.

Image Editing and Generation Improvements

  • Added support for sending images along with prompts to SwarmUI (image+prompt / img2img), with internal handling of initimage and maskimage as data-URLs. Introduced a new /image edit {prompt} command for explicit image editing, requiring an uploaded image and using a configurable noise/strength parameter (IMAGE_EDIT_NOISE). The backend now passes image data and edit parameters to generators and exposes IMAGE_EDIT_NOISE in the status page. [1] [2] [3] [4]

Markdown and Code Rendering Enhancements

  • Integrated marked.js for full GitHub-flavored markdown rendering in chat responses, including support for headers, tables, lists, code blocks, and more. Added real-time streaming markdown rendering with debounced updates, language-aware code block copy buttons, a raw/rendered toggle, and optimized styling for tables and lists. Added syntax highlighting for code blocks using Prism.js with support for Python, JavaScript, and HTML. [1] [2]

Static Asset and UI Improvements

  • All frontend libraries (marked.js, Prism.js, Socket.IO) are now served locally from the /static/ directory to enable air-gapped deployments. Introduced a consolidated static file serving route with MIME type detection, and added a custom SVG favicon. [1] [2] [3]

Documentation and Licensing

  • Added a comprehensive THIRD-PARTY-LICENSES.md file listing all third-party frontend and backend libraries with their licenses and usage. Updated the chatbot README with a credits section and references to license details. [1] [2] [3]

General Updates

  • Bumped the version to v0.16.5 and updated release notes to document all new features and improvements. [1] [2] [3]

References:
[1] [2] [3] [4] [5] [6] [7] [8] [9]

- Introduced Prism.js library for enhanced syntax highlighting of code blocks.
- Added specific language support for Python and JavaScript.
- Included CSS styles for code highlighting.
- Updated HTML template to link Prism.js and its CSS.
- Adjusted styles for code blocks and text elements for better readability.
- Implemented syntax highlighting on dynamically generated code blocks in the AI response.
Copilot AI review requested due to automatic review settings November 19, 2025 06:56
Copilot finished reviewing on behalf of jasonacox November 19, 2025 06:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request introduces comprehensive enhancements to the chatbot application with a focus on markdown rendering, code syntax highlighting, image editing capabilities, and improved static asset management for air-gapped deployments.

Key Changes

Markdown & Code Rendering

  • Integrated marked.js for full GitHub-flavored markdown support with streaming rendering
  • Added Prism.js syntax highlighting for Python, JavaScript, and HTML
  • Implemented raw/rendered toggle and language-aware code copy buttons

Image Editing

  • Added support for image+prompt (img2img) workflows in SwarmUI
  • New /image edit command with configurable noise/strength parameter
  • Enhanced backend to pass init images and masks as data URLs

Static Assets & Infrastructure

  • All frontend libraries now served locally from /static/ directory
  • Consolidated static file serving with MIME type detection
  • Added custom SVG favicon and third-party license documentation

Reviewed Changes

Copilot reviewed 9 out of 16 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
chatbot/app/templates/index.html Markdown rendering, code highlighting, toggle functionality, and streaming improvements
chatbot/app/static/socket.io.js Local Socket.IO client library (v4.0.1) for air-gapped support
chatbot/app/static/prism*.js/css Prism.js syntax highlighting library and language modules
chatbot/app/static/favicon.svg Custom SVG favicon for browser tab display
chatbot/app/image/swarmui_generator.py Image editing support with init/mask image handling
chatbot/app/core/config.py Version bump to v0.16.5 and IMAGE_EDIT_NOISE configuration
chatbot/app/api/routes.py Static file serving, favicon route, and image edit command implementation
chatbot/THIRD-PARTY-LICENSES.md Comprehensive third-party license attribution
chatbot/RELEASE.md, RELEASE.md, README.md Documentation updates for new features

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jasonacox jasonacox merged commit 69bebbe into main Nov 20, 2025
7 checks passed
@jasonacox jasonacox deleted the v0.16.5 branch November 20, 2025 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants