@ottocode/web-sdk 0.1.249 → 0.1.250
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
CHANGED
|
@@ -5172,13 +5172,6 @@ import {
|
|
|
5172
5172
|
import { ChevronDown, Search } from "lucide-react";
|
|
5173
5173
|
import Fuse2 from "fuse.js";
|
|
5174
5174
|
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
5175
|
-
function formatTokenCount(tokens) {
|
|
5176
|
-
if (tokens >= 1e6)
|
|
5177
|
-
return `${(tokens / 1e6).toFixed(1)}M`;
|
|
5178
|
-
if (tokens >= 1000)
|
|
5179
|
-
return `${Math.round(tokens / 1000)}K`;
|
|
5180
|
-
return String(tokens);
|
|
5181
|
-
}
|
|
5182
5175
|
var UnifiedModelSelector = forwardRef6(function UnifiedModelSelector2({ provider, model, onChange, disabled = false }, ref) {
|
|
5183
5176
|
const { data: allModels } = useAllModels();
|
|
5184
5177
|
const { data: currentProviderModels, isLoading: isCurrentProviderLoading } = useModels(provider);
|
|
@@ -5528,25 +5521,9 @@ var UnifiedModelSelector = forwardRef6(function UnifiedModelSelector2({ provider
|
|
|
5528
5521
|
className: "truncate",
|
|
5529
5522
|
children: modelItem.label
|
|
5530
5523
|
}),
|
|
5531
|
-
(!isAvailable || modelItem.toolCall || modelItem.reasoningText
|
|
5524
|
+
(!isAvailable || modelItem.toolCall || modelItem.reasoningText) && /* @__PURE__ */ jsxs10("div", {
|
|
5532
5525
|
className: "flex gap-1 ml-2 flex-shrink-0",
|
|
5533
5526
|
children: [
|
|
5534
|
-
modelItem.contextWindow && /* @__PURE__ */ jsxs10("span", {
|
|
5535
|
-
className: "text-[10px] px-1.5 py-0.5 bg-blue-600/20 text-blue-400 rounded",
|
|
5536
|
-
children: [
|
|
5537
|
-
formatTokenCount(modelItem.contextWindow),
|
|
5538
|
-
" ",
|
|
5539
|
-
"ctx"
|
|
5540
|
-
]
|
|
5541
|
-
}),
|
|
5542
|
-
modelItem.maxOutputTokens && /* @__PURE__ */ jsxs10("span", {
|
|
5543
|
-
className: "text-[10px] px-1.5 py-0.5 bg-cyan-600/20 text-cyan-400 rounded",
|
|
5544
|
-
children: [
|
|
5545
|
-
formatTokenCount(modelItem.maxOutputTokens),
|
|
5546
|
-
" ",
|
|
5547
|
-
"out"
|
|
5548
|
-
]
|
|
5549
|
-
}),
|
|
5550
5527
|
!isAvailable && /* @__PURE__ */ jsx16("span", {
|
|
5551
5528
|
className: "text-[10px] px-1.5 py-0.5 bg-red-600/20 text-red-400 rounded",
|
|
5552
5529
|
children: "Unavailable"
|
|
@@ -25271,7 +25248,7 @@ var CUSTOM_PROVIDER_COMPATIBILITY_OPTIONS = [
|
|
|
25271
25248
|
{ value: "openrouter", label: "OpenRouter" },
|
|
25272
25249
|
{ value: "ollama", label: "Ollama" }
|
|
25273
25250
|
];
|
|
25274
|
-
function
|
|
25251
|
+
function formatTokenCount(tokens) {
|
|
25275
25252
|
if (tokens >= 1e6)
|
|
25276
25253
|
return `${(tokens / 1e6).toFixed(1)}M`;
|
|
25277
25254
|
if (tokens >= 1000)
|
|
@@ -26272,14 +26249,14 @@ var ProviderSetupStep = memo46(function ProviderSetupStep2({
|
|
|
26272
26249
|
model.contextWindow && /* @__PURE__ */ jsxs91("span", {
|
|
26273
26250
|
className: "text-[10px] px-1.5 py-0.5 bg-blue-600/20 text-blue-400 rounded",
|
|
26274
26251
|
children: [
|
|
26275
|
-
|
|
26252
|
+
formatTokenCount(model.contextWindow),
|
|
26276
26253
|
" ctx"
|
|
26277
26254
|
]
|
|
26278
26255
|
}),
|
|
26279
26256
|
model.maxOutputTokens && /* @__PURE__ */ jsxs91("span", {
|
|
26280
26257
|
className: "text-[10px] px-1.5 py-0.5 bg-cyan-600/20 text-cyan-400 rounded",
|
|
26281
26258
|
children: [
|
|
26282
|
-
|
|
26259
|
+
formatTokenCount(model.maxOutputTokens),
|
|
26283
26260
|
" out"
|
|
26284
26261
|
]
|
|
26285
26262
|
}),
|
|
@@ -28034,4 +28011,4 @@ export {
|
|
|
28034
28011
|
API_BASE_URL
|
|
28035
28012
|
};
|
|
28036
28013
|
|
|
28037
|
-
//# debugId=
|
|
28014
|
+
//# debugId=AFB356A4FAF30FFC64756E2164756E21
|