@kwirthmagnify/kwirth-common-ai 0.5.31 → 0.5.32

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.
Files changed (2) hide show
  1. package/dist/front.js +7 -0
  2. package/package.json +1 -1
package/dist/front.js CHANGED
@@ -85,6 +85,13 @@ const AiConfigLlm = (props) => {
85
85
  const [key, setKey] = (0, react_1.useState)('');
86
86
  const [inputCostPerMillion, setInputCostPerMillion] = (0, react_1.useState)(0);
87
87
  const [outputCostPerMillion, setOutputCostPerMillion] = (0, react_1.useState)(0);
88
+ // Re-sincroniza el estado cuando llegan los modelos async (mismo fix de race que AiConfigProvider): al abrir,
89
+ // el padre monta el diálogo con props.llms vacío y los pide por WS; sin esto, la lista quedaba vacía hasta
90
+ // cerrar/reabrir.
91
+ (0, react_1.useEffect)(() => {
92
+ setLlms(JSON.parse(JSON.stringify(props.llms)));
93
+ setSelectedIndex(null);
94
+ }, [props.llms]);
88
95
  const onLlmSelected = (index) => {
89
96
  var _a, _b;
90
97
  const l = llms[index];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kwirthmagnify/kwirth-common-ai",
3
- "version": "0.5.31",
3
+ "version": "0.5.32",
4
4
  "description": "Shared AI/LLM types and utilities for Kwirth AI plugins",
5
5
  "scripts": {
6
6
  "build": "del .\\dist\\* /s /q 2>nul & tsc",