AlphaAlphaancestorThe component's LimeWebComponentContext at the time of gathering.
The LimeWebComponentContext injected into the component by
the framework. Describes the component's own limetype/id and,
via the parent chain, its ancestors in the UI hierarchy.
The ancestor chain may be incomplete, so do not rely on it to reach every record above the component.
import { LimeWebComponentContext } from '@limetech/lime-web-components';
const ancestorContext: LimeWebComponentContext = {
limetype: 'company',
id: 3184,
};
import { LimeWebComponentContext } from '@limetech/lime-web-components';
const ancestorContext: LimeWebComponentContext = {
limetype: 'deal',
id: 2045,
// The deal list the component is nested in. It has no id of its own, and
// the company the list belongs to is not part of the chain.
parent: {
limetype: 'deal',
id: null,
},
};
Optional AlphadataStructured data about the current state.
This data will be serialized and included in the AI prompt context. Keep the data focused and relevant to avoid filling the context window with noise.
import { AIContextContribution } from '@limetech/lime-web-components';
const contribution: AIContextContribution = {
data: {
currentObject: {
limetype: 'deal',
id: 123,
descriptive: 'Acme Corp - Enterprise License',
},
availableRelations: ['company', 'person', 'activity'],
},
};
Optional AlphapurposeDescribes the purpose of this component and what it shows.
Use this to help the AI understand what the component is for, how users interact with it, and what the data represents. This is typically hardcoded by component developers.
Do NOT use this to restate structured data in natural language. The AI can read the data directly.
import { AIContextContribution } from '@limetech/lime-web-components';
// Good. Explains what the component is and what clicking it does.
const infoTile: AIContextContribution = {
purpose:
'Shows a single aggregated value from a filter. ' +
'Clicking navigates to the explorer with that filter applied.',
};
// Good. Explains how to read the data and how users change it.
const pipeline: AIContextContribution = {
purpose:
'Displays deals in a pipeline view grouped by stage. ' +
'Users drag deals between columns to change their stage.',
};
// Bad. This restates structured data, so it belongs in `data` instead.
const dealCard: AIContextContribution = {
purpose: 'The user is viewing deal 123.',
};
AlphatypeThe provider's contextType label.
Identifies the kind of context this contribution represents
(e.g. 'current-user', 'table-view', 'explorer-view').
Copied from the provider by the registry at gather time.
A fully enriched context contribution ready for the AI.
This is the "output" of context gathering — includes the provider's contribution plus UI context information added by the registry.