feat(vla-manager): add template design assistant - #90
Open
MYRhouma wants to merge 4 commits into
Open
Conversation
MYRhouma
force-pushed
the
feat/vla-template-assistant
branch
from
September 8, 2026 01:39
0888b8e to
33a3dea
Compare
MYRhouma
marked this pull request as ready for review
September 8, 2026 17:42
There was a problem hiding this comment.
🟡 Changes recommended
There are validated, user-facing failure modes (conversation length mismatch and insufficient API conversation validation) and a misleading upstream HTTP error message that should be addressed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds an optional “template design assistant” feature to VLA Manager, wiring a new API endpoint and a frontend drawer workflow that lets users request an AI-generated template draft, review it, and explicitly apply it to the editor.
Changes:
- Adds
POST /assistant/templateto the VLA Manager API, including assistant client logic, config, validation, tests, and OpenAPI documentation. - Introduces a new frontend
TemplateAssistantdrawer component and “apply proposal” flow in the template editor. - Updates local/dev configuration and tests to support the assistant and frontend-side proposal application.
File summaries
| File | Description |
|---|---|
| vla-manager/src/components/TemplateEditor.vue | Adds assistant entry point and applies proposals into the editor form. |
| vla-manager/src/components/TemplateAssistant.vue | New assistant drawer UI, conversation display, and proposal apply action. |
| vla-manager/src/api/assistant.js | Adds assistant API call + proposal-application helper + error messaging helper. |
| vla-manager/package.json | Switches frontend package to ESM (type: module). |
| vla-manager-api/tests/test_assistant_routes.py | Adds API tests for assistant success, validation, and failure cases. |
| vla-manager-api/src/vla_manager_api/main.py | Registers the assistant router. |
| vla-manager-api/src/vla_manager_api/config.py | Adds assistant service configuration fields. |
| vla-manager-api/src/vla_manager_api/assistant.py | Implements assistant prompt/context builder + HTTP client + response parsing/validation. |
| vla-manager-api/src/vla_manager_api/assistant_routes.py | Adds /assistant/template endpoint and request/response models. |
| vla-manager-api/README.md | Documents new assistant endpoint and configuration. |
| test/template-assistant.test.mjs | Adds node tests for proposal application and error message formatting. |
| test-env/README.md | Documents enabling the assistant in the compose stack. |
| test-env/compose.yml | Wires assistant-related env vars into the API service container. |
| docs/spec/vla-manager-api.yaml | Adds OpenAPI paths/schemas for the assistant endpoint. |
Review details
- Files reviewed: 14/14 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
+84
to
+90
| try: | ||
| with urlopen(request, timeout=cfg.ai_timeout_seconds) as response: | ||
| payload = json.loads(response.read()) | ||
| except (HTTPError, URLError, TimeoutError, OSError) as exc: | ||
| raise AssistantUnavailable( | ||
| "The template assistant could not be reached." | ||
| ) from exc |
Comment on lines
+25
to
+39
| class AssistantRequest(BaseModel): | ||
| model_config = _CAMEL_OPEN | ||
|
|
||
| message: str = Field(min_length=1, max_length=4000) | ||
| conversation: list[dict[str, str]] = Field(default_factory=list, max_length=20) | ||
| current_template: dict[str, Any] | None = None | ||
|
|
||
| @field_validator("message") | ||
| @classmethod | ||
| def message_must_contain_text(cls, value: str) -> str: | ||
| value = value.strip() | ||
| if not value: | ||
| raise ValueError("Message must contain text") | ||
| return value | ||
|
|
Comment on lines
+77
to
+81
| const response = await askTemplateAssistant({ | ||
| message, | ||
| conversation: messages.value.slice(0, -1), | ||
| currentTemplate: clone(props.template) | ||
| }) |
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 an optional VLA template design assistant to the VLA Manager. A user can describe a requirement in natural language, review a structured draft, and apply it to the existing editor. Saving and validation remain explicit user actions.
The assistant call is made by the VLA Manager API through a configurable OpenAI-compatible service. The browser never receives the API key. The endpoint validates the returned proposal against the existing TemplateNew schema and reports unavailable or malformed model responses clearly.
Included
This PR is stacked on the dashboard work in PR #88.
Checks
CC @bzp99