From 4b1a30e3300d5d16ee6d54f9e1a8e2e67ed27654 Mon Sep 17 00:00:00 2001 From: Alexander Brown Date: Thu, 22 Jan 2026 16:10:54 -0800 Subject: [PATCH] Updates: Model Management (#8248) ## Summary Model management improvements: refactored tag API, enhanced UX for trigger phrases and editing. ## Changes ### API Refactor - Add `addAssetTags` (POST) and `removeAssetTags` (DELETE) endpoints in assetService - `updateAssetTags` now computes diff and calls remove/add serially - Add `TagsOperationResult` schema; cache syncs with server response ### UX Improvements - **Trigger phrases**: click to copy individual phrases, copy-all button in header - **Display name**: show edit icon on hover instead of relying on double-click - **Model type**: show plain text when immutable instead of disabled select - **Tags input**: only show edit icon on hover - **Field labels**: updated styling to use muted foreground color - **Optimistic update** for model type selection --------- Co-authored-by: Amp Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: GitHub Action --- src/components/ui/button/button.variants.ts | 3 +- src/components/ui/tags-input/TagsInput.vue | 2 +- src/locales/en/main.json | 2 + .../components/modelInfo/ModelInfoField.vue | 7 +- .../modelInfo/ModelInfoPanel.test.ts | 8 +- .../components/modelInfo/ModelInfoPanel.vue | 84 +++++++++++++++---- src/platform/assets/schemas/assetSchema.ts | 10 +++ src/platform/assets/services/assetService.ts | 68 ++++++++++++++- src/stores/assetsStore.ts | 62 +++++++++++--- 9 files changed, 210 insertions(+), 36 deletions(-) diff --git a/src/components/ui/button/button.variants.ts b/src/components/ui/button/button.variants.ts index 768332325..faf9a4444 100644 --- a/src/components/ui/button/button.variants.ts +++ b/src/components/ui/button/button.variants.ts @@ -26,7 +26,8 @@ export const buttonVariants = cva({ md: 'h-8 rounded-lg p-2 text-xs', lg: 'h-10 rounded-lg px-4 py-2 text-sm', icon: 'size-8', - 'icon-sm': 'size-5 p-0' + 'icon-sm': 'size-5 p-0', + unset: '' } }, diff --git a/src/components/ui/tags-input/TagsInput.vue b/src/components/ui/tags-input/TagsInput.vue index f4a3fa001..c07dcdf7f 100644 --- a/src/components/ui/tags-input/TagsInput.vue +++ b/src/components/ui/tags-input/TagsInput.vue @@ -71,7 +71,7 @@ onClickOutside(rootEl, () => {