Skip to content

Broken: Vega chart creation plugin #332

@ModernBlueprints

Description

@ModernBlueprints

Describe the bug

The Vega chart creation plugin is not properly registered in the main plugin system, making it completely non-functional despite existing in the codebase. The plugin implementation exists at vega.ts:8-52 and is configured in default settings at [2](settings.json:432-434), but it's missing from the availablePlugins registry. This causes:

  1. The plugin doesn't appear in Settings → Plugins UI
  2. The plugin doesn't appear in per-LLM tool selection
  3. LLMs cannot call the vega_chart_creation function
  4. Vega charts are never generated, only raw JSON is returned

To Reproduce

  1. Go to 'Settings' → 'Plugins'
  2. Notice that no "Vega" plugin appears in the list (despite existing in codebase)
  3. Go to 'Chat' → Select any LLM → Settings → Plugins Customize
  4. Notice that no "Vega" plugin appears in the list here either
  5. In any chat, prompt an LLM either: A: "Use_ the vega_chart_creation function to create a bar chart" or B: "Create a Vega chart that displays a bar chart showing monthly sales data for the first 6 months of 2024: January: $45,000, February: $52,000, March: $48,000, April: $61,000, May: $58,000, June: $67,000. Generate a visualization so I can see it rendered inline in the chat and test the interactive features like theme switching, code viewing, and download functionality"
  6. See that the LLM returns raw Vega JSON specification instead of calling the plugin function
  • Tested with multiple LLM providers: Grok 4, GPT-4.1, Kimi K2, and Claude Sonnet 4 - all exhibit the same behavior. Vega charts are never generated, only raw JSON is returned.

Expected behavior

  1. IMO, the Vega plugin doesn't need to appear in Witsy's UI under Settings → Plugins. It should be enabled by default (same as mermaid diagrams)
  2. The plugin should however appear in the per-LLM tool selection interfaces (described in step 3. above, under "To Reproduce")
  3. LLMs should be able to call the vega_chart_creation function and render the charts
  4. The plugin should execute vega.ts:44-50 and generate PNG chart images that get embedded in chat responses

Desktop (please complete the following information):

  • OS: macOS Sequoia 15.5
  • Witsy Version: 2.11.2 (1042)

Additional context
As far as I can tell, the root cause is that the Vega plugin is not registered in the availablePlugins object. While the plugin implementation exists and is actually also referenced in the UI settings component SettingsPlugins.vue:64, it's never actually loaded by the plugin system base.ts:402-455.

I think the fix would be to add vega: VegaPlugin to the availablePlugins registry along with the appropriate import statement. This would make the plugin available to both the UI system and the LLM loading mechanisms in base.ts:402-455.

This appears to be an incomplete feature integration where the plugin code was implemented but never properly wired into the main plugin architecture.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is neededlaterWill fix in later releases

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions