@parallelworks/ui 0.30.0 → 0.31.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.
|
@@ -14,6 +14,13 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
import { createPortal } from "react-dom";
|
|
15
15
|
//#region src/ai/components/ModelSelector.tsx
|
|
16
16
|
var ORG_OWNER = "org";
|
|
17
|
+
/** Who registered a provider: the provider list's owner when the adapter
|
|
18
|
+
* lists providers, otherwise the owner each model carries. Empty means the
|
|
19
|
+
* organization, which is nobody to name. */
|
|
20
|
+
function providerOwner(info, model) {
|
|
21
|
+
if (info) return info.user === ORG_OWNER ? "" : info.user;
|
|
22
|
+
return model?.provider_owner ?? "";
|
|
23
|
+
}
|
|
17
24
|
/** The search field plus the list's max-h-80, so the flip decision matches
|
|
18
25
|
* what renders. */
|
|
19
26
|
var MAX_PANEL_HEIGHT_PX = 380;
|
|
@@ -302,7 +309,8 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
302
309
|
const platform = providerInfo?.platformLabel;
|
|
303
310
|
const platformSuffix = providerInfo && platform && platform.toLowerCase() !== providerName.toLowerCase() ? platform : null;
|
|
304
311
|
const isOwner = providerInfo?.user === currentUser.username;
|
|
305
|
-
const
|
|
312
|
+
const owner = providerOwner(providerInfo, providerModels[0]);
|
|
313
|
+
const headerSuffix = [platformSuffix, owner && owner !== currentUser.username ? strings.modelPicker.sharedBy(owner) : null].filter(Boolean).join(" · ");
|
|
306
314
|
const settingsHref = providerInfo && extraLinks.providerSettings ? extraLinks.providerSettings(providerInfo.user, providerInfo.name) : null;
|
|
307
315
|
const issue = providerIssueFor(providerIssues, providerModels[0]);
|
|
308
316
|
return /* @__PURE__ */ jsxs("div", { children: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parallelworks/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "React UI components: a theme contract, icons, primitives, lists, forms, a job graph, a code editor, a log viewer, a file explorer and an AI chat, each on its own subpath",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|