Skip to content

feat: improve VLA template AI assistant - #91

Merged
bzp99 merged 4 commits into
feat/vla-template-assistantfrom
feat/vla-assistant-providers
Sep 20, 2026
Merged

bzp99 merged 4 commits into
feat/vla-template-assistantfrom
feat/vla-assistant-providers

Conversation

@MYRhouma

@MYRhouma MYRhouma commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

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

  • VLA Manager API: 47 tests passed
  • Frontend tests: 19 passed
  • VLA Manager production build passed
  • Docker Compose stack healthy
  • Live Gemini request returned a valid structured template with two passing and two failing examples

CC @bzp99

@MYRhouma MYRhouma changed the title feat(api): support Gemini and Anthropic assistants feat: improve VLA template AI assistant Sep 8, 2026
@MYRhouma
MYRhouma marked this pull request as ready for review September 8, 2026 17:42
Copilot AI lite review requested due to automatic review settings September 8, 2026 17:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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
bzp99 added this pull request to stack #94 September 17, 2026 23:10
@bzp99
bzp99 force-pushed the feat/vla-assistant-providers branch from 5b5570e to cc3f5e3 Compare September 20, 2026 20:08
@bzp99
bzp99 merged commit cc3f5e3 into yassine-refactor Sep 20, 2026
9 checks passed
@bzp99
bzp99 deleted the feat/vla-assistant-providers branch September 20, 2026 20:54
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.

3 participants