Skip to content

Auto-translate natural language prompts to DSL via vtk-mcp - #40

Merged
vicentebolea merged 1 commit into
masterfrom
feat/dsl-translation
Aug 14, 2026
Merged

Auto-translate natural language prompts to DSL via vtk-mcp#40
vicentebolea merged 1 commit into
masterfrom
feat/dsl-translation

Conversation

@vicentebolea

@vicentebolea vicentebolea commented Jun 4, 2026

Copy link
Copy Markdown
Member

Summary

  • Auto-translate natural language prompts to the VTK pipeline DSL via vtk-mcp before code generation (--dsl-translation/--no-dsl-translation to opt out, CLI + UI)
  • --debug flag dumps the full LLM conversation to stdout
  • Settings dialog shows live vtk-mcp connectivity status
  • Update curated Anthropic models to claude-opus-5/claude-sonnet-5; mark them temperature-unsupported (API rejects the parameter)
  • Fix generated code escaping the app's embedded render view: patch vtkRenderWindow/vtkRenderWindowInteractor/vtkRenderer across vtk, vtkmodules.vtkRenderingCore, and vtkmodules.all so self-constructed instances stay bound to the app's shared scene instead of opening a native window or rendering into a disconnected renderer; inject the shared interactor alongside renderer/render_window

Why

DSL input hits the vtk-mcp index more precisely than natural language and cuts hallucinated class/method names. The render-window fix closes a real bug: LLM code trained on vtkmodules-style examples was escaping the embedded view (native popup) or silently drawing into a renderer the app never displays.

Dependencies

Test plan

  • Existing tests pass
  • Manually verified DSL translation, --debug dump, vtk-mcp connectivity indicator
  • Reproduced and fixed the render-escape bug with the exact reported generated script

@vicentebolea
vicentebolea force-pushed the feat/dsl-translation branch 2 times, most recently from 41640ea to 5704e59 Compare July 10, 2026 02:20
@vicentebolea
vicentebolea force-pushed the feat/dsl-translation branch from 5704e59 to e836f1d Compare July 28, 2026 02:25
@vicentebolea
vicentebolea force-pushed the feat/dsl-translation branch 2 times, most recently from d49e359 to 5990db0 Compare August 13, 2026 01:57
@jlee-kitware

Copy link
Copy Markdown
Collaborator

once we fix the merge issues i can review and put this one to bed.

When a vtk-mcp server is available, the client now calls
is_dsl_prompt() before code generation; if the input is plain natural
language it calls translate_prompt_to_dsl() to convert it to the
structured VTK pipeline DSL before RAG retrieval and generation.

VTKMCPClient.translate_prompt() accepts optional model, base_url, and
api_key overrides so callers can direct the translation to a specific
model or Ollama endpoint without changing server config.
@vicentebolea
vicentebolea merged commit 24db851 into master Aug 14, 2026
11 checks passed
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