enricoros / big-AGI

Generative AI suite powered by state-of-the-art models and providing advanced AI/AGI functions. It features AI personas, AGI functions, multi-model chats, text-to-image, voice, response streaming, code highlighting and execution, PDF import, presets for developers, much more. Deploy on-prem or in the cloud.
https://big-agi.com
MIT License
4.42k stars 1.01k forks source link

[BUG] Dark-mode doesn't properly work for graphs #520

Closed Yardanico closed 2 weeks ago

Yardanico commented 2 weeks ago

Description

Thanks a lot for the frontend! I really like it and I think it'll the frontend I'll be use for my personal usage in the future. In the past I've tried Koala (BetterGPT fork), LobeChat, LibreChat, and some others.

Here's about the small bug itself:

If you use the diagram tool or ask the LLM to draw a diagram right in the chat, with dark mode you won't be able to see some of the diagram features.

Here's an example diagram:

@startuml
node "TypeScript Framework" as ts

node "C++ Engine Kernel" as cpp
node "TS Engine Kernel" as tsk

node "Native Platforms\niOS, Android, Mac, Windows, etc." as native
node "Web Platforms" as web  
node "Mini-Game Platforms" as minigame

ts --> cpp
ts --> tsk
cpp --> native
tsk --> web
tsk --> minigame
@enduml

I think there are two solutions for this problem - either find/create and use PlantUML/Mermaid dark themes, or always force light mode for diagrams (or via a toggle)

Device and browser

Arch Linux, latest Brave Browser, user-agent "Mozilla/5.0 (X11; U; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.6295.214 Safari/537.36", same happens on Android 14 with Chrome.

Screenshots and more

Dark: image image

Light: image image

Willingness to Contribute

enricoros commented 2 weeks ago

Thanks. This code is SVG, produced by the PlantUML rendering service (plantUML.com). I'll look into fixing this by having a lighter background (on charts only) when in Dark mode.

enricoros commented 2 weeks ago

This is how a diagram in PlantUML or MermaidJS will look like now. image

This is deployed to main which will become the next stable release within a week. You can either build and run it today from main, or wait until it's out.

enricoros commented 2 weeks ago

Thanks a bunch for providing the details.

Yardanico commented 2 weeks ago

Thanks a lot for a quick fix!