feat: improve VLA template AI assistant - #91
Merged
Merged
Conversation
MYRhouma
marked this pull request as ready for review
September 8, 2026 17:42
There was a problem hiding this comment.
🟡 Changes recommended
The frontend currently includes local message id fields in the assistant conversation payload, which can break upstream provider APIs expecting { role, content }-only message objects.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR expands the VLA template assistant to support multiple AI providers (OpenAI-compatible, Gemini compatibility endpoint, and Anthropic Messages API) while improving the frontend assistant drawer UX and stabilising template-variable row identity during edits.
Changes:
- Add provider selection + defaults on the API side (Gemini/OpenAI-compatible/Anthropic) and strengthen assistant prompt/response validation.
- Redesign the assistant drawer into a compact “review workspace” with draft details, syntax-coloured JSON, and passing vs failing example grouping.
- Preserve variable-row identity in the template editor by introducing stable per-variable keys and schema helper utilities.
File summaries
| File | Description |
|---|---|
| vla-manager/src/components/TemplateEditor.vue | Switch variable rows to stable keys and move schema mutations into helper functions. |
| vla-manager/src/components/TemplateAssistant.vue | Major UI/UX refresh for the assistant drawer; adds progressive reveal and structured proposal rendering. |
| vla-manager/src/components/AssistantJson.vue | New component to render syntax-coloured JSON tokens. |
| vla-manager/src/api/templateVariables.js | New helper utilities for updating/renaming/removing variables + stable key store. |
| vla-manager/src/api/assistantPresentation.js | New helpers for example normalisation, JSON tokenisation, and assistant text chunking. |
| vla-manager-api/tests/test_assistant_routes.py | Adds tests for provider defaults/headers and validates SCHEMA implementation content is real JSON. |
| vla-manager-api/src/vla_manager_api/config.py | Introduces ai_provider config enum and keeps assistant credentials server-side. |
| vla-manager-api/src/vla_manager_api/assistant.py | Implements provider routing (OpenAI-compatible vs Anthropic), defaults, and extra validation for SCHEMA implementations. |
| vla-manager-api/README.md | Documents provider configuration and example environment settings. |
| test/template-assistant.test.mjs | Adds unit tests for new frontend helper utilities (variables, examples, tokenisation, chunking). |
| test-env/README.md | Updates local stack docs for the new provider configuration. |
| test-env/compose.yml | Adds VLA_MANAGER_AI_PROVIDER wiring to the API container environment. |
Review details
- Files reviewed: 12/12 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
264
to
268
| const response = await askTemplateAssistant({ | ||
| message, | ||
| conversation: messages.value.slice(0, -1), | ||
| currentTemplate: clone(props.template) | ||
| }) |
Comment on lines
+229
to
+232
| function revealAssistantMessage (message, content) { | ||
| stopReveal() | ||
| const chunks = assistantTextChunks(content) | ||
| return new Promise(resolve => { |
Comment on lines
+203
to
+206
| function labelFor (value) { | ||
| if (!value) return 'Not specified' | ||
| return String(value).toLowerCase().split('_').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ') | ||
| } |
bzp99
added this pull request to stack #94
September 17, 2026 23:10
bzp99
force-pushed
the
feat/vla-assistant-providers
branch
from
September 20, 2026 20:08
5b5570e to
cc3f5e3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds configurable Gemini, OpenAI-compatible, and Anthropic providers to the VLA template assistant while keeping provider keys on the server.
The assistant drawer is a compact review workspace with restrained styling, a small generation indicator, clearer conversation states, structured draft details, syntax-coloured JSON, and separate passing and failing examples. The VLA Manager variable editor now keeps stable row identities while names are edited, so typing and deleting characters does not lose focus or change sibling variables. Drafts remain review-only and are never saved automatically.
Checks
CC @bzp99