@unikode/cli 1.0.8 → 1.0.9
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 +10 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -971,6 +971,9 @@ var SUPPORTED_CHAT_MODELS = [
|
|
|
971
971
|
}
|
|
972
972
|
}
|
|
973
973
|
];
|
|
974
|
+
function findSupportedChatModel(modelId) {
|
|
975
|
+
return SUPPORTED_CHAT_MODELS.find((model) => model.id === modelId);
|
|
976
|
+
}
|
|
974
977
|
var DEFAULT_CHAT_MODEL_ID = "gemini-2.5-flash";
|
|
975
978
|
// ../shared/src/schemas.ts
|
|
976
979
|
import { z } from "zod";
|
|
@@ -1359,14 +1362,19 @@ var ModelsDialogContent = ({ models, onSelectModel }) => {
|
|
|
1359
1362
|
onSelectModel(modelId);
|
|
1360
1363
|
dialog.close();
|
|
1361
1364
|
}, [dialog, onSelectModel]);
|
|
1365
|
+
const getDisplayName = useCallback7((modelId) => {
|
|
1366
|
+
const model = findSupportedChatModel(modelId);
|
|
1367
|
+
const isLocal = model ? model.provider === "local-docker" || model.provider === "local-ollama" : false;
|
|
1368
|
+
return isLocal ? `${modelId} (L)` : modelId;
|
|
1369
|
+
}, []);
|
|
1362
1370
|
return /* @__PURE__ */ jsxDEV10(DialogSearchList, {
|
|
1363
1371
|
items: models,
|
|
1364
1372
|
onSelect: handleSelect,
|
|
1365
|
-
filterFn: (modelId, query) => modelId.toLowerCase().includes(query.toLowerCase()),
|
|
1373
|
+
filterFn: (modelId, query) => getDisplayName(modelId).toLowerCase().includes(query.toLowerCase()),
|
|
1366
1374
|
renderItem: (modelId, isSelected) => /* @__PURE__ */ jsxDEV10("text", {
|
|
1367
1375
|
selectable: false,
|
|
1368
1376
|
fg: isSelected ? "black" : "white",
|
|
1369
|
-
children: modelId
|
|
1377
|
+
children: getDisplayName(modelId)
|
|
1370
1378
|
}, undefined, false, undefined, this),
|
|
1371
1379
|
getKey: (modelId) => modelId,
|
|
1372
1380
|
placeholder: "Search models",
|
package/package.json
CHANGED