Skip to content

feat: add AI suggest button for tags in reuse edit page#884

Open
bolinocroustibat wants to merge 9 commits intomainfrom
suggest-reuse-tags
Open

feat: add AI suggest button for tags in reuse edit page#884
bolinocroustibat wants to merge 9 commits intomainfrom
suggest-reuse-tags

Conversation

@bolinocroustibat
Copy link
Contributor

@bolinocroustibat bolinocroustibat commented Jan 23, 2026

Adds automatic tag suggestions for reuses, matching the dataset feature. Refactors tag generation endpoints to separate dataset and reuse logic.

Changes

  • Added tag suggestion feature for reuses
    • Created generate-reuse-tags.post.ts
    • Implemented handleAutoCompleteTags in DescribeReuse.vue with the same UI/UX as datasets
    • Added validation to require title, description, and type before generating suggestions
    • Updated AI prompts to use the reuse type dynamically
  • Refactored API endpoints to follow a consistent naming pattern that clearly distinguishes between dataset and reuse operations:
    • Renamed generate-tags.post.tsgenerate-dataset-tags.post.ts to avoid confusion
    • Renamed generate-short-description.post.tsgenerate-dataset-short-description.post.ts to avoid confusion

Demo

screenshot 2026-01-27 at 12 33 36

bolinocroustibat added a commit that referenced this pull request Jan 27, 2026
…ailable (#894)

## Add tooltip to explain why tag suggestion button is disabled

Adds a tooltip to the tag suggestion button in DescribeDataset.vue to
explain why it's disabled, matching the behavior of the short
description suggestion button and of
#884.

The tooltip shows:

- Missing fields (title, description) when the button is disabled
- Maximum tags reached message when 5 tags are already present

This improves UX by clarifying why the feature is unavailable.
# Conflicts:
#	components/Reuses/DescribeReuse.vue
@bolinocroustibat bolinocroustibat deleted the suggest-reuse-tags branch February 3, 2026 14:06
@bolinocroustibat bolinocroustibat restored the suggest-reuse-tags branch February 3, 2026 14:08
const hasType = computed(() => form.value.type?.label && form.value.type.label.trim().length > 0)
const hasLessThanMaxTags = computed(() => form.value.tags.length < MAX_TAGS_NB)

const tagsSuggestionDisabledMessage = computed(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to check for something like hasEnoughDescription for the tag suggestion too ? I tried with a really small description and the tags are :

{
  "tags": [
    "je-ne-sais-pas",
    "manque-dinformation",
    "description-floue",
    "idee-abstracte",
    "normes-absentes"
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 👀 Review

Development

Successfully merging this pull request may close these issues.

2 participants