Repository navigation
Closed
Copy link
Description
Task Summary
Feature Summary
The HuggingFace inference operator (#5041) is being landed as a sequence of focused PRs. The previous PR (#5314) registered custom formly field type components for the task selector, model browser, and audio upload — but they are not yet wired into the property editor. This issue activates those components and adds task-aware field visibility.
Concretely, landing this would enable:
- Remapping
modelIdto thehuggingfaceformly type, rendering the task dropdown and model browser in the property editor - Remapping
imageInputtohuggingface-image-uploadandaudioInputtohuggingface-audio-upload - Hiding the raw
taskschema field (selection is handled by the HuggingFace component) - Showing/hiding
promptColumn,imageInput,audioInput,systemPrompt,maxNewTokens,temperature,contextColumn,candidateLabels,sentencesColumnbased on the selected task - Custom validators for conditionally-required fields (e.g., image upload required for image tasks unless an input column is selected)
- A task preview card showing media type, input/output flow, and description per task
Proposed Solution or Design
Modify:
| File | Change |
|---|---|
operator-property-edit-frame.component.ts |
Remap modelId, imageInput, audioInput to custom formly types; hide task field; add formly expression functions for field visibility based on task; add task preview metadata map and getter; add custom validators for conditionally-required fields |
operator-property-edit-frame.component.html |
Add task preview card with ngSwitch for video/image/audio/text media types |
operator-property-edit-frame.component.scss |
Styles for the task preview card layout |
operator-property-edit-frame.component.spec.ts |
Tests for task preview resolution (text, image, audio, video, unknown, empty task) |
mock-operator-metadata.data.ts |
Add mockHuggingFaceSchema with all HF fields for test harness |
mock-workflow-data.ts |
Add mockHuggingFacePredicate operator predicate for tests |
Design constraints:
- Field visibility uses formly
expressions.hidefunctions that read the current task from the form control or model — not static configuration. - Custom validators (e.g.,
requiredImageInput,requiredPromptColumn) must returntrue(valid) when the field is not applicable to the current task. - The
taskfield is hidden withhide: truesince the HuggingFace component manages task selection — the raw text input must not be visible. - Task preview metadata is a static map keyed by task string — unknown tasks get a generic fallback card.
References:
- Parent issue: Add Hugging Face inference operator #5041
- Stacked on: Add HuggingFace task selector, model browser, and audio upload components #5314 — this PR branches off the task selector and audio upload PR; it wires those registered components into the property editor so they become visible to the user.
Impact / Priority
(P2) Medium — this is the PR that makes the HuggingFace operator's custom UI visible in the property editor. Does not affect existing operators.
Affected Area
Frontend (Angular) — workspace property editor component.
Task Type
- Refactor / Cleanup
- DevOps / Deployment / CI
- Testing / QA
- Documentation
- Performance
- Other
Activity
ELin2025 commentedon Jun 2, 2026
/take
ELin2025 commentedon Jun 2, 2026
/parent-issue #5041
feat(frontend): add task-aware field visibility and preview to Huggin…