@llmnative/react 1.44.0 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/components/widgets/Chatbot.d.ts +8 -0
- package/llms-full.txt +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { AIModelPricing } from '../../providers/ai/AIProvider';
|
|
3
|
+
import { type BadgeType } from '../ui/Badge';
|
|
3
4
|
import { type EditorCommand } from '../ui/fields/ContextMenu';
|
|
4
5
|
/**
|
|
5
6
|
* Chatbot — l'input/composer AI condiviso, estratto da `Prompt` (CR-071): textarea,
|
|
@@ -46,11 +47,18 @@ export interface ChatbotModelOption {
|
|
|
46
47
|
/** Section the option is listed under (e.g. its provider). When any option has one, the
|
|
47
48
|
* picker renders one sticky header per group, in order of first appearance. */
|
|
48
49
|
group?: string;
|
|
50
|
+
/** A badge on the right of the header of its group (CR-121), e.g. how the group is paid; the
|
|
51
|
+
* first option of a group that has one gives it. */
|
|
52
|
+
groupBadge?: {
|
|
53
|
+
label: string;
|
|
54
|
+
variant?: BadgeType;
|
|
55
|
+
};
|
|
49
56
|
}
|
|
50
57
|
/** Consecutive-or-not options sharing a `group` end up in one section, keeping the order in
|
|
51
58
|
* which each group first appears; options without a group form an unnamed leading section. */
|
|
52
59
|
export declare const groupModelOptions: (options: ChatbotModelOption[]) => Array<{
|
|
53
60
|
group?: string;
|
|
61
|
+
badge?: ChatbotModelOption["groupBadge"];
|
|
54
62
|
options: ChatbotModelOption[];
|
|
55
63
|
}>;
|
|
56
64
|
export declare const isFreeModelOption: (option: ChatbotModelOption) => boolean;
|
package/llms-full.txt
CHANGED
|
@@ -1150,6 +1150,8 @@ const catalog = getAIModelCatalog() // modelli disponibili
|
|
|
1150
1150
|
// non trovato (il modello resta in lista). isFreeAIModel(m) → input e output a 0.
|
|
1151
1151
|
// Il model picker di Prompt/Chatbot mostra "$in / $out", evidenzia i free, segnala i mancanti,
|
|
1152
1152
|
// e raggruppa per provider (ChatbotModelOption.group = providerLabel) con header sticky.
|
|
1153
|
+
// CR-121: il pulsante mostra la `label` del modello scelto (non il suo valore); `groupBadge: { label, variant? }`
|
|
1154
|
+
// su un'opzione mette un Badge a destra nell'header del suo gruppo (es. Abbonamento / A consumo).
|
|
1153
1155
|
|
|
1154
1156
|
// Provider adapter restituito da useAIProvider()
|
|
1155
1157
|
const text = await provider.fetch("Scrivi un titolo per: {keyword}", { keyword: "React" })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llmnative/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.45.0",
|
|
4
4
|
"description": "LLM-native React framework for deterministic UI generation. Data-driven by default, schema-driven optional. Ultra-low token consumption — built for AI agents, not just humans.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|