[PR #21272] [CLOSED] enh.: Allow to disable icon inversion #49052

Closed
opened 2026-04-30 01:22:40 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/21272
Author: @Classic298
Created: 2/9/2026
Status: Closed

Base: devHead: patch-4


📝 Commits (4)

  • 2f0784f Update ResponseMessage.svelte
  • 7a1afdd Update ResponseMessage.svelte
  • a51431e Update ResponseMessage.svelte
  • 3790084 Update ResponseMessage.svelte

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 src/lib/components/chat/Messages/ResponseMessage.svelte (+3 -1)

📄 Description

Problem

Icons were being inverted in dark mode based on whether the string svg
appeared anywhere in the icon URL. This caused PNG icons to randomly
get inverted if their base64 encoding happened to contain "svg" by coincidence.

Solution

  • Added configurable icon_dark_invert frontmatter property for actions
  • Changed logic to:
    1. Use explicit icon_dark_invert: true/false if defined in docstring
    2. Fall back to checking actual MIME type (startsWith('data:image/svg'))
      instead of .includes('svg')

Usage

"""
title: Export to PDF
icon_url: data:image/png;base64,...
icon_dark_invert: false
"""

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/21272 **Author:** [@Classic298](https://github.com/Classic298) **Created:** 2/9/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `patch-4` --- ### 📝 Commits (4) - [`2f0784f`](https://github.com/open-webui/open-webui/commit/2f0784f8f151a3f094ba2cd9ab686254b47f0f00) Update ResponseMessage.svelte - [`7a1afdd`](https://github.com/open-webui/open-webui/commit/7a1afdde95e5e8887c9fbe4d9a290092238ef033) Update ResponseMessage.svelte - [`a51431e`](https://github.com/open-webui/open-webui/commit/a51431e0fb09d275dc2b1e8871c9ad8338a79b6e) Update ResponseMessage.svelte - [`3790084`](https://github.com/open-webui/open-webui/commit/37900845c637f7efcb6f0ecede519474796499b4) Update ResponseMessage.svelte ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/Messages/ResponseMessage.svelte` (+3 -1) </details> ### 📄 Description ### Problem Icons were being inverted in dark mode based on whether the string `svg` appeared *anywhere* in the icon URL. This caused PNG icons to randomly get inverted if their base64 encoding happened to contain "svg" by coincidence. ### Solution - Added configurable `icon_dark_invert` frontmatter property for actions - Changed logic to: 1. Use explicit `icon_dark_invert: true/false` if defined in docstring 2. Fall back to checking actual MIME type (`startsWith('data:image/svg')`) instead of `.includes('svg')` ### Usage ```python """ title: Export to PDF icon_url: data:image/png;base64,... icon_dark_invert: false """ ``` ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-30 01:22:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#49052