estruyf / vscode-front-matter

Front Matter is a CMS running straight in Visual Studio Code. Can be used with static site generators like Hugo, Jekyll, Hexo, NextJs, Gatsby, and many more...
https://frontmatter.codes
MIT License
1.93k stars 73 forks source link

Issue: AI respect limits of fields when auto generate test for description, title, etc. #847

Open aavdberg opened 5 days ago

aavdberg commented 5 days ago

Describe the bug When i use AI to generate a description in the meta-data is generates a very long text that is longer then allowed/recommended

To Reproduce Steps to reproduce the behavior:

  1. Go to post
  2. Click on Copilot icon at description
  3. See error

Expected behavior respect the field limit when generating a text with AI

Screenshots image

Device:

Additional context Add any other context about the problem here.

estruyf commented 5 days ago

The title and description fields limit can be set with the corresponding frontMatter.taxonomy.seoTitleLength and frontMatter.taxonomy.seoDescriptionLength settings.

These settings are also used for generating the tilte(s) and description.

Source: https://github.com/estruyf/vscode-front-matter/blob/d240e8fdc867589af8b4a0e2c3fe04f2d5e1ee65/src/services/Copilot.ts

AI could in some cases generate longer titles/descriptions. It is best to verify what is provided by AI.