@dbx-tools/ui-mastra 0.3.2 → 0.3.3
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/package.json +7 -7
- package/src/react/chat-view.tsx +12 -9
package/package.json
CHANGED
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
"shiki": "^3.0.0",
|
|
27
27
|
"sql-formatter": "^15.6.9",
|
|
28
28
|
"streamdown": "^2.5.0",
|
|
29
|
-
"@dbx-tools/shared-
|
|
30
|
-
"@dbx-tools/shared-
|
|
31
|
-
"@dbx-tools/
|
|
32
|
-
"@dbx-tools/shared-
|
|
33
|
-
"@dbx-tools/
|
|
34
|
-
"@dbx-tools/ui-branding": "0.3.
|
|
29
|
+
"@dbx-tools/shared-genie": "0.3.3",
|
|
30
|
+
"@dbx-tools/shared-core": "0.3.3",
|
|
31
|
+
"@dbx-tools/shared-mastra": "0.3.3",
|
|
32
|
+
"@dbx-tools/shared-model": "0.3.3",
|
|
33
|
+
"@dbx-tools/ui-appkit": "0.3.3",
|
|
34
|
+
"@dbx-tools/ui-branding": "0.3.3"
|
|
35
35
|
},
|
|
36
36
|
"main": "index.ts",
|
|
37
37
|
"license": "UNLICENSED",
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"version": "0.3.
|
|
41
|
+
"version": "0.3.3",
|
|
42
42
|
"types": "index.ts",
|
|
43
43
|
"type": "module",
|
|
44
44
|
"exports": {
|
package/src/react/chat-view.tsx
CHANGED
|
@@ -292,16 +292,19 @@ export const ChatView = ({
|
|
|
292
292
|
if (!name) return undefined;
|
|
293
293
|
return models?.find((m) => m.name === name)?.displayName || name;
|
|
294
294
|
};
|
|
295
|
-
// The
|
|
296
|
-
//
|
|
297
|
-
//
|
|
298
|
-
const defaultOptionLabel = (
|
|
299
|
-
const named = modelLabel(defaultModelName);
|
|
300
|
-
return named ? `Server default (${named})` : "Server default";
|
|
301
|
-
})();
|
|
295
|
+
// The default option shows the server's fallback model by name when known
|
|
296
|
+
// (from `defaultModelName`), else a neutral "Default" - no "server default"
|
|
297
|
+
// phrasing either way.
|
|
298
|
+
const defaultOptionLabel = modelLabel(defaultModelName) ?? "Default";
|
|
302
299
|
// Label the current model by its human-readable name when a model is
|
|
303
|
-
// pinned, else the default-option label
|
|
300
|
+
// pinned, else the default-option label.
|
|
304
301
|
const currentModelLabel = modelLabel(model) || defaultOptionLabel;
|
|
302
|
+
// Picker entries sorted by their human-readable label (case-insensitive).
|
|
303
|
+
const sortedModels = [...(models ?? [])].sort((a, b) =>
|
|
304
|
+
(a.displayName || a.name).localeCompare(b.displayName || b.name, undefined, {
|
|
305
|
+
sensitivity: "base",
|
|
306
|
+
}),
|
|
307
|
+
);
|
|
305
308
|
const showClear = Boolean(onClear);
|
|
306
309
|
const showExport = Boolean(onExportConversation);
|
|
307
310
|
// The conversation sidebar turns on once the host wires both the
|
|
@@ -698,7 +701,7 @@ export const ChatView = ({
|
|
|
698
701
|
<SelectItem value={DEFAULT_MODEL_VALUE}>
|
|
699
702
|
{defaultOptionLabel}
|
|
700
703
|
</SelectItem>
|
|
701
|
-
{
|
|
704
|
+
{sortedModels.map((m) => (
|
|
702
705
|
<SelectItem key={m.name} value={m.name}>
|
|
703
706
|
{m.displayName || m.name}
|
|
704
707
|
</SelectItem>
|