a2ui-project / a2ui-project/a2ui

[FEATURE]: Additional per-component metadata for each catalog component

Ouverte
#2,368 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
P2 status: first-line-handled
Langage dominant
TypeScript
Étoiles
16.4k
Forks
1.3k
Merge moyen
2 j 13 h
PR mergées (30 j)
134

Description

- [x ] I have searched the existing issues to make sure this feature has not already been requested.

## Is your feature request related to a problem? Please describe.

Currently all metadata about a component must be placed into either the `name` or `description` properties. When richer semantic information is available, it must be jammed into the `description` field with some catalog-dependent and fixed format.

## Describe the Proposed Solution

Add additional optional metadata properties to each component at the `description` level, with known semantics.

Recommendations:

1. Add `usage`: Explicit usage instructions such as `"Use small for lower emphasis, or when space is tight. Use large for higher emphasis, or when number is important. Text label above 999 should cap at \"999+\"."`
1. Add `similar_components`: A map of component names to instructions for selecting the component, e.g. `{ "Chip": "Use for longer labels.", ...}`
1. Update the catalog-to-prompt logic to include these fields.

## Describe Alternatives Considered

Jamming these into the description. Prevents future progressive disclosure opportunities and any optimizations on how to best present these to the agent (because the format in which they are jammed into the description becomes fixed by the catalog owner).

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Look at the component catalog structure, likely in a file like `src/catalog/types.ts` or similar, to understand the existing `name` and `description` properties. Identify where components are defined and where the catalog-to-prompt logic resides. Add the new optional fields (`usage`, `similar_components`) to the component metadata interface and update the prompt generation logic to include them. Test by verifying that a sample component with the new metadata is correctly processed and appears in generated prompts.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
typescript
Domaine
developer-experience, documentation
Type d'issue
Fonctionnalité
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Active
Clarté
Clairement spécifiée
Accessibilité débutants
65/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.