Kontent-ai-consulting / kontent-ai-model-accelerator

Tool for importing prepared content models from Kontent.ai’s content model accelerators.
https://kontent.ai/learn/model/content-modeling-accelerators
MIT License
2 stars 0 forks source link

Using contentTypes flag leads to misleading prompts #9

Closed mberry1989 closed 6 months ago

mberry1989 commented 6 months ago

Motivation

When using the --contentTypes= flag to target a specific content type in the model, the prompt suggests that all content types in the model will be imported.

Example command:

kontent-ai-accelerator --action=remoteImport --environmentId=<removedForIssue> --apiKey=<removedForIssue> --model=advanced_product --contentTypes=disclaimer

Terminal output:

_√ Are you sure to import models into Empty Environment environment of project zKDA Test? ... yes Fetch: Downloading template 'advancedproduct' Content Types: Compliance, Video, Product, Disclaimer, Resource, Link, Call to action Snippets: Metadata Taxonomies: Product Type, Persona, Resource Type, Compliance Type, Category, Disclaimer Type √ Continue import with the models above? ... yes

The tool does work in that it only imports the specified type, but the dialogue is confusing.

Proposed solution

Potential solution A: list only the specified content type in the "Content Types:" portion of the prompt.

Potential solution B: change the terminology from "Content Types:" to "All Content Types in Model:" and the confirmation message states: "Continue import with the specified models?"

Enngage commented 6 months ago

Fixes, the message now contains only filtered items that get imported. There is also a validation of whether the object exists or not before proceeding to import.