@tangle-network/agent-app 0.45.46 → 0.45.48
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/{DesignCanvas-P2ZVK6FM.js → DesignCanvas-QY2CA5GI.js} +2 -2
- package/dist/{DesignCanvasEditor-DGNCA54P.js → DesignCanvasEditor-CJ7PLX7A.js} +3 -3
- package/dist/{IntakeInterview-3ZIQMZS6.js → IntakeInterview-NJXKH35Q.js} +2 -2
- package/dist/InvitationsPanel-F2VY4TSL.js +9 -0
- package/dist/InviteAcceptPage-UT4452KT.js +7 -0
- package/dist/MembersPanel-N5CBOUXC.js +9 -0
- package/dist/{TimelineEditor-OTNPJ3SN.js → TimelineEditor-IYNKBSUX.js} +2 -2
- package/dist/assistant/index.d.ts +35 -10
- package/dist/assistant/index.js +234 -89
- package/dist/assistant/index.js.map +1 -1
- package/dist/chat-react/index.js +2 -1
- package/dist/chat-react/index.js.map +1 -1
- package/dist/{chunk-IUSO2XRE.js → chunk-5BACNOVR.js} +13 -14
- package/dist/chunk-5BACNOVR.js.map +1 -0
- package/dist/chunk-AULM4X7U.js +77 -0
- package/dist/chunk-AULM4X7U.js.map +1 -0
- package/dist/{chunk-UM6ODCLN.js → chunk-C7AQW6US.js} +346 -249
- package/dist/chunk-C7AQW6US.js.map +1 -0
- package/dist/{chunk-VCPZ3HTN.js → chunk-DB2D2JBQ.js} +51 -27
- package/dist/chunk-DB2D2JBQ.js.map +1 -0
- package/dist/{chunk-TL37E5YY.js → chunk-DS2WE62K.js} +3 -3
- package/dist/{chunk-TL37E5YY.js.map → chunk-DS2WE62K.js.map} +1 -1
- package/dist/{chunk-PE67O2LH.js → chunk-GT4GTRGQ.js} +18 -13
- package/dist/chunk-GT4GTRGQ.js.map +1 -0
- package/dist/{chunk-BT4QFCTB.js → chunk-HSBJB46C.js} +13 -1
- package/dist/chunk-HSBJB46C.js.map +1 -0
- package/dist/{chunk-54FYYXAX.js → chunk-J6OJTFNE.js} +13 -10
- package/dist/chunk-J6OJTFNE.js.map +1 -0
- package/dist/chunk-MLG6XKPV.js +44 -0
- package/dist/chunk-MLG6XKPV.js.map +1 -0
- package/dist/{chunk-F4XLTVQ3.js → chunk-R6KGLGEJ.js} +18 -17
- package/dist/chunk-R6KGLGEJ.js.map +1 -0
- package/dist/{chunk-B62EZF52.js → chunk-RILGAFEL.js} +3 -3
- package/dist/{chunk-65OZT566.js → chunk-T7XPIBCX.js} +16 -14
- package/dist/chunk-T7XPIBCX.js.map +1 -0
- package/dist/{chunk-VOJB7MVG.js → chunk-XPFNEKHS.js} +70 -28
- package/dist/chunk-XPFNEKHS.js.map +1 -0
- package/dist/{chunk-GNPN6ED4.js → chunk-XVRHISF3.js} +127 -165
- package/dist/chunk-XVRHISF3.js.map +1 -0
- package/dist/design-canvas-react/index.js +14 -12
- package/dist/design-canvas-react/index.js.map +1 -1
- package/dist/design-canvas-react/lazy.js +1 -1
- package/dist/intakes-react/index.js +1 -1
- package/dist/intakes-react/lazy.js +1 -1
- package/dist/sequences-react/index.js +2 -2
- package/dist/studio/index.d.ts +13 -1
- package/dist/studio/index.js +13 -1
- package/dist/studio-react/index.js +100 -63
- package/dist/studio-react/index.js.map +1 -1
- package/dist/studio-react/studio.css +0 -56
- package/dist/teams-react/index.js +4 -3
- package/dist/teams-react/lazy.js +3 -3
- package/dist/theme/tokens.css +173 -0
- package/dist/web-react/index.d.ts +15 -11
- package/dist/web-react/index.js +6 -4
- package/dist/work-product-react/index.js +3 -21
- package/dist/work-product-react/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/InvitationsPanel-F56UOQXA.js +0 -8
- package/dist/InviteAcceptPage-P3QJC3C6.js +0 -7
- package/dist/MembersPanel-XNLF3SA4.js +0 -8
- package/dist/chunk-54FYYXAX.js.map +0 -1
- package/dist/chunk-65OZT566.js.map +0 -1
- package/dist/chunk-BT4QFCTB.js.map +0 -1
- package/dist/chunk-F4XLTVQ3.js.map +0 -1
- package/dist/chunk-GNPN6ED4.js.map +0 -1
- package/dist/chunk-IUSO2XRE.js.map +0 -1
- package/dist/chunk-PE67O2LH.js.map +0 -1
- package/dist/chunk-UM6ODCLN.js.map +0 -1
- package/dist/chunk-VCPZ3HTN.js.map +0 -1
- package/dist/chunk-VOJB7MVG.js.map +0 -1
- /package/dist/{DesignCanvas-P2ZVK6FM.js.map → DesignCanvas-QY2CA5GI.js.map} +0 -0
- /package/dist/{DesignCanvasEditor-DGNCA54P.js.map → DesignCanvasEditor-CJ7PLX7A.js.map} +0 -0
- /package/dist/{IntakeInterview-3ZIQMZS6.js.map → IntakeInterview-NJXKH35Q.js.map} +0 -0
- /package/dist/{InvitationsPanel-F56UOQXA.js.map → InvitationsPanel-F2VY4TSL.js.map} +0 -0
- /package/dist/{InviteAcceptPage-P3QJC3C6.js.map → InviteAcceptPage-UT4452KT.js.map} +0 -0
- /package/dist/{MembersPanel-XNLF3SA4.js.map → MembersPanel-N5CBOUXC.js.map} +0 -0
- /package/dist/{TimelineEditor-OTNPJ3SN.js.map → TimelineEditor-IYNKBSUX.js.map} +0 -0
- /package/dist/{chunk-B62EZF52.js.map → chunk-RILGAFEL.js.map} +0 -0
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ProviderLogo
|
|
3
|
+
} from "./chunk-MLG6XKPV.js";
|
|
1
4
|
import {
|
|
2
5
|
ATTACHMENT_ACCEPT,
|
|
3
6
|
ATTACHMENT_MAX_COUNT,
|
|
@@ -15,46 +18,6 @@ import {
|
|
|
15
18
|
snapModelToHarness
|
|
16
19
|
} from "./chunk-TH7L265V.js";
|
|
17
20
|
|
|
18
|
-
// src/web-react/provider-logo.tsx
|
|
19
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
-
var LOGOS = {
|
|
21
|
-
anthropic: { viewBox: "0 0 24 24", fill: "#D97757", paths: ["M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"] },
|
|
22
|
-
google: { viewBox: "0 0 24 24", fill: "#8E75B2", paths: ["M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81"] },
|
|
23
|
-
deepseek: { viewBox: "0 0 24 24", fill: "#4D6BFE", paths: ["M23.748 4.651c-.254-.124-.364.113-.512.233-.051.04-.094.09-.137.137-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.155-.708-.311-.955-.65-.172-.24-.219-.509-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.094.172.187.129.323-.082.28-.18.553-.266.833-.055.179-.137.218-.328.14a5.5 5.5 0 0 1-1.737-1.179c-.857-.828-1.631-1.743-2.597-2.46a12 12 0 0 0-.689-.47c-.985-.957.13-1.743.387-1.836.27-.098.094-.433-.778-.428-.872.003-1.67.295-2.687.685a3 3 0 0 1-.465.136 9.6 9.6 0 0 0-2.883-.101c-1.885.21-3.39 1.1-4.497 2.622C.082 8.776-.231 10.854.152 13.02c.403 2.284 1.568 4.175 3.36 5.653 1.857 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.132-.284 4.994-1.86.47.234.962.328 1.78.398.629.058 1.235-.031 1.705-.129.735-.155.684-.836.418-.961-2.155-1.004-1.682-.595-2.112-.926 1.095-1.295 2.768-3.598 3.284-6.733.05-.346.115-.834.108-1.114-.004-.171.035-.238.23-.257a4.2 4.2 0 0 0 1.545-.475c1.397-.763 1.96-2.016 2.093-3.517.02-.23-.004-.467-.247-.588M11.58 18.168c-2.088-1.642-3.101-2.183-3.52-2.16-.39.024-.32.472-.234.763.09.288.207.487.371.74.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.168-1.361-.801-2.5-1.86-3.301-3.306-.775-1.393-1.225-2.888-1.299-4.482-.02-.385.094-.522.477-.592a4.7 4.7 0 0 1 1.53-.038c2.131.311 3.946 1.264 5.467 2.774.868.86 1.525 1.887 2.202 2.89.72 1.066 1.494 2.082 2.48 2.915.348.291.626.513.892.677-.802.09-2.14.109-3.055-.615zm1.001-6.44a.306.306 0 0 1 .415-.287.3.3 0 0 1 .113.074.3.3 0 0 1 .086.214c0 .17-.136.307-.308.307a.303.303 0 0 1-.306-.307m3.11 1.596c-.2.081-.4.151-.591.16a1.25 1.25 0 0 1-.798-.254c-.274-.23-.47-.358-.551-.758a1.7 1.7 0 0 1 .015-.588c.07-.327-.007-.537-.238-.727-.188-.156-.426-.199-.689-.199a.6.6 0 0 1-.254-.078.253.253 0 0 1-.114-.358 1 1 0 0 1 .192-.21c.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.392.451.462.576.685.915.176.264.336.536.446.848.066.194-.02.353-.25.45"] },
|
|
24
|
-
mistral: { viewBox: "0 0 24 24", fill: "#FA520F", paths: ["M17.143 3.429v3.428h-3.429v3.429h-3.428V6.857H6.857V3.43H3.43v13.714H0v3.428h10.286v-3.428H6.857v-3.429h3.429v3.429h3.429v-3.429h3.428v3.429h-3.428v3.428H24v-3.428h-3.43V3.429z"] },
|
|
25
|
-
xai: { viewBox: "0 0 24 24", fill: "#000000", paths: ["M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"] },
|
|
26
|
-
nvidia: { viewBox: "0 0 24 24", fill: "#76B900", paths: ["M8.948 8.798v-1.43a6.7 6.7 0 0 1 .424-.018c3.922-.124 6.493 3.374 6.493 3.374s-2.774 3.851-5.75 3.851c-.398 0-.787-.062-1.158-.185v-4.346c1.528.185 1.837.857 2.747 2.385l2.04-1.714s-1.492-1.952-4-1.952a6.016 6.016 0 0 0-.796.035m0-4.735v2.138l.424-.027c5.45-.185 9.01 4.47 9.01 4.47s-4.08 4.964-8.33 4.964c-.37 0-.733-.035-1.095-.097v1.325c.3.035.61.062.91.062 3.957 0 6.82-2.023 9.593-4.408.459.371 2.34 1.263 2.73 1.652-2.633 2.208-8.772 3.984-12.253 3.984-.335 0-.653-.018-.971-.053v1.864H24V4.063zm0 10.326v1.131c-3.657-.654-4.673-4.46-4.673-4.46s1.758-1.944 4.673-2.262v1.237H8.94c-1.528-.186-2.73 1.245-2.73 1.245s.68 2.412 2.739 3.11M2.456 10.9s2.164-3.197 6.5-3.533V6.201C4.153 6.59 0 10.653 0 10.653s2.35 6.802 8.948 7.42v-1.237c-4.84-.6-6.492-5.936-6.492-5.936z"] },
|
|
27
|
-
meta: { viewBox: "0 0 24 24", fill: "#0467DF", paths: ["M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z"] },
|
|
28
|
-
moonshotai: { viewBox: "0 0 24 24", fill: "#16191E", paths: ["m1.053 16.91 9.538 2.55a21 20.981 0 0 0 .06 2.031l5.956 1.592a12 11.99 0 0 1-15.554-6.172m-1.02-5.79 11.352 3.035a21 20.981 0 0 0-.469 2.01l10.817 2.89a12 11.99 0 0 1-1.845 2.004L.658 15.918a12 11.99 0 0 1-.625-4.796m1.593-5.146L13.573 9.17a21 20.981 0 0 0-1.01 1.874l11.297 3.02a21 20.981 0 0 1-.67 2.362l-11.55-3.087L.125 10.26a12 11.99 0 0 1 1.499-4.285ZM6.067 1.58l11.285 3.016a21 20.981 0 0 0-1.688 1.719l7.824 2.091a21 20.981 0 0 1 .513 2.664L2.107 5.218a12 11.99 0 0 1 3.96-3.638M21.68 4.866 7.222 1.003A12 11.99 0 0 1 21.68 4.866"] },
|
|
29
|
-
openai: { viewBox: "0 0 256 260", fill: "#10A37F", paths: ["M239.184 106.203a64.72 64.72 0 0 0-5.576-53.103C219.452 28.459 191 15.784 163.213 21.74A65.586 65.586 0 0 0 52.096 45.22a64.72 64.72 0 0 0-43.23 31.36c-14.31 24.602-11.061 55.634 8.033 76.74a64.67 64.67 0 0 0 5.525 53.102c14.174 24.65 42.644 37.324 70.446 31.36a64.72 64.72 0 0 0 48.754 21.744c28.481.025 53.714-18.361 62.414-45.481a64.77 64.77 0 0 0 43.229-31.36c14.137-24.558 10.875-55.423-8.083-76.483m-97.56 136.338a48.4 48.4 0 0 1-31.105-11.255l1.535-.87l51.67-29.825a8.6 8.6 0 0 0 4.247-7.367v-72.85l21.845 12.636c.218.111.37.32.409.563v60.367c-.056 26.818-21.783 48.545-48.601 48.601M37.158 197.93a48.35 48.35 0 0 1-5.781-32.589l1.534.921l51.722 29.826a8.34 8.34 0 0 0 8.441 0l63.181-36.425v25.221a.87.87 0 0 1-.358.665l-52.335 30.184c-23.257 13.398-52.97 5.431-66.404-17.803M23.549 85.38a48.5 48.5 0 0 1 25.58-21.333v61.39a8.29 8.29 0 0 0 4.195 7.316l62.874 36.272l-21.845 12.636a.82.82 0 0 1-.767 0L41.353 151.53c-23.211-13.454-31.171-43.144-17.804-66.405zm179.466 41.695l-63.08-36.63L161.73 77.86a.82.82 0 0 1 .768 0l52.233 30.184a48.6 48.6 0 0 1-7.316 87.635v-61.391a8.54 8.54 0 0 0-4.4-7.213m21.742-32.69l-1.535-.922l-51.619-30.081a8.39 8.39 0 0 0-8.492 0L99.98 99.808V74.587a.72.72 0 0 1 .307-.665l52.233-30.133a48.652 48.652 0 0 1 72.236 50.391zM88.061 139.097l-21.845-12.585a.87.87 0 0 1-.41-.614V65.685a48.652 48.652 0 0 1 79.757-37.346l-1.535.87l-51.67 29.825a8.6 8.6 0 0 0-4.246 7.367zm11.868-25.58L128.067 97.3l28.188 16.218v32.434l-28.086 16.218l-28.188-16.218z"] }
|
|
30
|
-
};
|
|
31
|
-
var ALIASES = {
|
|
32
|
-
moonshot: "moonshotai",
|
|
33
|
-
deepseek_ai: "deepseek",
|
|
34
|
-
"x-ai": "xai",
|
|
35
|
-
"meta-llama": "meta"
|
|
36
|
-
};
|
|
37
|
-
var MONOGRAM = {
|
|
38
|
-
cohere: { bg: "#fae8ff", fg: "#c026d3" },
|
|
39
|
-
groq: { bg: "#fce7f3", fg: "#db2777" },
|
|
40
|
-
cerebras: { bg: "#ccfbf1", fg: "#0d9488" },
|
|
41
|
-
zai: { bg: "#ede9fe", fg: "#7c3aed" },
|
|
42
|
-
"z-ai": { bg: "#ede9fe", fg: "#7c3aed" },
|
|
43
|
-
tuner: { bg: "#dbeafe", fg: "#2563eb" }
|
|
44
|
-
};
|
|
45
|
-
function ProviderLogo({ provider, size = 16 }) {
|
|
46
|
-
const key = ALIASES[provider ?? ""] ?? provider ?? "";
|
|
47
|
-
const logo = LOGOS[key];
|
|
48
|
-
if (logo) {
|
|
49
|
-
return /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: logo.viewBox, role: "img", "aria-label": key, children: logo.paths.map((d, i) => /* @__PURE__ */ jsx("path", { d, fill: logo.fill }, i)) });
|
|
50
|
-
}
|
|
51
|
-
const mono = MONOGRAM[key] ?? { bg: "#f3f4f6", fg: "#6b7280" };
|
|
52
|
-
return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: "0 0 16 16", role: "img", "aria-label": key || "model", children: [
|
|
53
|
-
/* @__PURE__ */ jsx("rect", { width: "16", height: "16", rx: "4", fill: mono.bg }),
|
|
54
|
-
/* @__PURE__ */ jsx("text", { x: "8", y: "11.6", textAnchor: "middle", fill: mono.fg, fontSize: "9", fontWeight: "700", fontFamily: "system-ui, sans-serif", children: (key || "?").charAt(0).toUpperCase() })
|
|
55
|
-
] });
|
|
56
|
-
}
|
|
57
|
-
|
|
58
21
|
// src/web-react/controls.tsx
|
|
59
22
|
import {
|
|
60
23
|
useCallback,
|
|
@@ -66,33 +29,33 @@ import {
|
|
|
66
29
|
useState
|
|
67
30
|
} from "react";
|
|
68
31
|
import { createPortal } from "react-dom";
|
|
69
|
-
import { Fragment, jsx
|
|
32
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
70
33
|
function ChevronDown({ className }) {
|
|
71
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" }) });
|
|
72
35
|
}
|
|
73
36
|
function SearchGlyph({ className }) {
|
|
74
|
-
return /* @__PURE__ */
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ jsxs("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
38
|
+
/* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "8" }),
|
|
39
|
+
/* @__PURE__ */ jsx("path", { d: "m21 21-4.3-4.3" })
|
|
77
40
|
] });
|
|
78
41
|
}
|
|
79
42
|
function SparkleGlyph({ className }) {
|
|
80
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M12 3v3m0 12v3M3 12h3m12 0h3M5.6 5.6l2.1 2.1m8.6 8.6 2.1 2.1m0-12.8-2.1 2.1M7.7 16.3l-2.1 2.1" }) });
|
|
81
44
|
}
|
|
82
45
|
function BrainGlyph({ className }) {
|
|
83
|
-
return /* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ jsxs("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
47
|
+
/* @__PURE__ */ jsx("path", { d: "M12 18V5" }),
|
|
48
|
+
/* @__PURE__ */ jsx("path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4" }),
|
|
49
|
+
/* @__PURE__ */ jsx("path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5" }),
|
|
50
|
+
/* @__PURE__ */ jsx("path", { d: "M17.997 5.125a4 4 0 0 1 2.526 5.77" }),
|
|
51
|
+
/* @__PURE__ */ jsx("path", { d: "M18 18a4 4 0 0 0 2-7.464" }),
|
|
52
|
+
/* @__PURE__ */ jsx("path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517" }),
|
|
53
|
+
/* @__PURE__ */ jsx("path", { d: "M6 18a4 4 0 0 1-2-7.464" }),
|
|
54
|
+
/* @__PURE__ */ jsx("path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77" })
|
|
92
55
|
] });
|
|
93
56
|
}
|
|
94
57
|
function CheckGlyph({ className }) {
|
|
95
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) });
|
|
96
59
|
}
|
|
97
60
|
function usePopover(open, setOpen) {
|
|
98
61
|
const containerRef = useRef(null);
|
|
@@ -204,7 +167,7 @@ function PopoverSurface({
|
|
|
204
167
|
const ownerPath = triggerRef.current?.closest?.(`[${POPOVER_SURFACE_ATTR}]`)?.getAttribute(POPOVER_SURFACE_ATTR);
|
|
205
168
|
const path = ownerPath ? `${ownerPath}${POPOVER_PATH_SEPARATOR}${surfaceId}` : surfaceId;
|
|
206
169
|
return createPortal(
|
|
207
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ jsx(
|
|
208
171
|
"div",
|
|
209
172
|
{
|
|
210
173
|
ref: panelRef,
|
|
@@ -266,7 +229,7 @@ function formatContext(len) {
|
|
|
266
229
|
return `${len} ctx`;
|
|
267
230
|
}
|
|
268
231
|
function SectionHeader({ children }) {
|
|
269
|
-
return /* @__PURE__ */
|
|
232
|
+
return /* @__PURE__ */ jsx("div", { className: "px-3 pb-1 pt-3 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children });
|
|
270
233
|
}
|
|
271
234
|
function ModelRow({
|
|
272
235
|
model,
|
|
@@ -276,19 +239,19 @@ function ModelRow({
|
|
|
276
239
|
}) {
|
|
277
240
|
const price = formatPrice(model.pricing?.prompt);
|
|
278
241
|
const ctx = formatContext(model.contextLength);
|
|
279
|
-
return /* @__PURE__ */
|
|
242
|
+
return /* @__PURE__ */ jsxs(
|
|
280
243
|
"button",
|
|
281
244
|
{
|
|
282
245
|
type: "button",
|
|
283
246
|
onClick: onSelect,
|
|
284
247
|
className: `flex w-full items-center gap-2.5 rounded-md px-3 py-2.5 text-left text-sm transition ${POPOVER_OPTION_FOCUS} ${selected ? "bg-primary/10 font-medium" : "hover:bg-accent"}`,
|
|
285
248
|
children: [
|
|
286
|
-
renderProviderBadge ? renderProviderBadge(model.provider) : /* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
-
!model.supportsTools && /* @__PURE__ */
|
|
289
|
-
/* @__PURE__ */
|
|
290
|
-
ctx && /* @__PURE__ */
|
|
291
|
-
price && /* @__PURE__ */
|
|
249
|
+
renderProviderBadge ? renderProviderBadge(model.provider) : /* @__PURE__ */ jsx(ProviderLogo, { provider: model.provider, size: 16 }),
|
|
250
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: model.name }),
|
|
251
|
+
!model.supportsTools && /* @__PURE__ */ jsx("span", { className: "shrink-0 rounded bg-secondary px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground", children: "no tools" }),
|
|
252
|
+
/* @__PURE__ */ jsxs("span", { className: "ml-auto flex shrink-0 items-center gap-2 text-xs text-muted-foreground", children: [
|
|
253
|
+
ctx && /* @__PURE__ */ jsx("span", { children: ctx }),
|
|
254
|
+
price && /* @__PURE__ */ jsx("span", { children: price })
|
|
292
255
|
] })
|
|
293
256
|
]
|
|
294
257
|
}
|
|
@@ -329,8 +292,8 @@ function ModelPicker({ value, onChange, models, loading, renderProviderBadge, re
|
|
|
329
292
|
setOpen(false);
|
|
330
293
|
setQuery("");
|
|
331
294
|
};
|
|
332
|
-
return /* @__PURE__ */
|
|
333
|
-
/* @__PURE__ */
|
|
295
|
+
return /* @__PURE__ */ jsxs("div", { ref: containerRef, className: "relative inline-flex", children: [
|
|
296
|
+
/* @__PURE__ */ jsxs(
|
|
334
297
|
"button",
|
|
335
298
|
{
|
|
336
299
|
type: "button",
|
|
@@ -339,13 +302,13 @@ function ModelPicker({ value, onChange, models, loading, renderProviderBadge, re
|
|
|
339
302
|
onClick: () => setOpen(!open),
|
|
340
303
|
className: "inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full border border-border bg-card px-3 py-1.5 text-sm font-medium text-foreground transition hover:bg-accent",
|
|
341
304
|
children: [
|
|
342
|
-
selected ? renderProviderBadge ? renderProviderBadge(selected.provider) : /* @__PURE__ */
|
|
343
|
-
/* @__PURE__ */
|
|
344
|
-
/* @__PURE__ */
|
|
305
|
+
selected ? renderProviderBadge ? renderProviderBadge(selected.provider) : /* @__PURE__ */ jsx(ProviderLogo, { provider: selected.provider, size: 16 }) : /* @__PURE__ */ jsx(SparkleGlyph, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
306
|
+
/* @__PURE__ */ jsx("span", { className: "max-w-[160px] truncate", children: selected?.name ?? value }),
|
|
307
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "h-3.5 w-3.5 text-muted-foreground" })
|
|
345
308
|
]
|
|
346
309
|
}
|
|
347
310
|
),
|
|
348
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ jsxs(
|
|
349
312
|
PopoverSurface,
|
|
350
313
|
{
|
|
351
314
|
open,
|
|
@@ -354,9 +317,9 @@ function ModelPicker({ value, onChange, models, loading, renderProviderBadge, re
|
|
|
354
317
|
panelRef,
|
|
355
318
|
className: `flex w-[420px] max-w-[calc(100vw-2rem)] flex-col overflow-hidden rounded-xl border border-card-edge bg-popover ${OVERLAY_SHADOW}`,
|
|
356
319
|
children: [
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
-
/* @__PURE__ */
|
|
359
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ jsx("div", { className: "shrink-0 border-b border-border px-3 py-2", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-strong bg-background px-3 py-2", children: [
|
|
321
|
+
/* @__PURE__ */ jsx(SearchGlyph, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
322
|
+
/* @__PURE__ */ jsx(
|
|
360
323
|
"input",
|
|
361
324
|
{
|
|
362
325
|
ref: inputRef,
|
|
@@ -368,25 +331,25 @@ function ModelPicker({ value, onChange, models, loading, renderProviderBadge, re
|
|
|
368
331
|
}
|
|
369
332
|
)
|
|
370
333
|
] }) }),
|
|
371
|
-
/* @__PURE__ */
|
|
372
|
-
loading && /* @__PURE__ */
|
|
373
|
-
!loading && filtered && /* @__PURE__ */
|
|
374
|
-
filtered.length === 0 && /* @__PURE__ */
|
|
375
|
-
filtered.map((m) => /* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ jsxs("div", { className: "max-h-[400px] min-h-0 overflow-y-auto p-1 pb-2", children: [
|
|
335
|
+
loading && /* @__PURE__ */ jsx("div", { className: "px-3 py-4 text-center text-sm text-muted-foreground", children: "Loading models..." }),
|
|
336
|
+
!loading && filtered && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
337
|
+
filtered.length === 0 && /* @__PURE__ */ jsx("div", { className: "px-3 py-4 text-center text-sm text-muted-foreground", children: "No models match your search" }),
|
|
338
|
+
filtered.map((m) => /* @__PURE__ */ jsx(ModelRow, { model: m, selected: m.id === value, onSelect: () => select(m.id), renderProviderBadge }, m.id))
|
|
376
339
|
] }),
|
|
377
|
-
!loading && !filtered && models.length === 0 && /* @__PURE__ */
|
|
378
|
-
!loading && !filtered && models.length > 0 && /* @__PURE__ */
|
|
379
|
-
priorityGroup && sections.priority.length > 0 && /* @__PURE__ */
|
|
380
|
-
/* @__PURE__ */
|
|
381
|
-
sections.priority.map((m) => /* @__PURE__ */
|
|
340
|
+
!loading && !filtered && models.length === 0 && /* @__PURE__ */ jsx("div", { className: "px-3 py-4 text-center text-sm text-muted-foreground", children: "No models available" }),
|
|
341
|
+
!loading && !filtered && models.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
342
|
+
priorityGroup && sections.priority.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
343
|
+
/* @__PURE__ */ jsx(SectionHeader, { children: priorityGroup.label }),
|
|
344
|
+
sections.priority.map((m) => /* @__PURE__ */ jsx(ModelRow, { model: m, selected: m.id === value, onSelect: () => select(m.id), renderProviderBadge }, m.id))
|
|
382
345
|
] }),
|
|
383
|
-
sections.recommended.length > 0 && /* @__PURE__ */
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
sections.recommended.map((m) => /* @__PURE__ */
|
|
346
|
+
sections.recommended.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
347
|
+
/* @__PURE__ */ jsx(SectionHeader, { children: recommendedLabel }),
|
|
348
|
+
sections.recommended.map((m) => /* @__PURE__ */ jsx(ModelRow, { model: m, selected: m.id === value, onSelect: () => select(m.id), renderProviderBadge }, m.id))
|
|
386
349
|
] }),
|
|
387
|
-
sections.byProvider.map((g) => /* @__PURE__ */
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
g.items.map((m) => /* @__PURE__ */
|
|
350
|
+
sections.byProvider.map((g) => /* @__PURE__ */ jsxs("div", { children: [
|
|
351
|
+
/* @__PURE__ */ jsx(SectionHeader, { children: g.provider }),
|
|
352
|
+
g.items.map((m) => /* @__PURE__ */ jsx(ModelRow, { model: m, selected: m.id === value, onSelect: () => select(m.id), renderProviderBadge }, m.id))
|
|
390
353
|
] }, g.provider))
|
|
391
354
|
] })
|
|
392
355
|
] })
|
|
@@ -435,7 +398,7 @@ function effortMeterFill(levelId, levels = DEFAULT_EFFORT_LEVELS) {
|
|
|
435
398
|
return Math.max(1, Math.floor((index + 1) * EFFORT_METER_SEGMENTS / active.length));
|
|
436
399
|
}
|
|
437
400
|
function EffortMeter({ fill, className }) {
|
|
438
|
-
return /* @__PURE__ */
|
|
401
|
+
return /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: `inline-flex items-center gap-[2px] ${className ?? ""}`, children: Array.from({ length: EFFORT_METER_SEGMENTS }, (_, i) => /* @__PURE__ */ jsx(
|
|
439
402
|
"span",
|
|
440
403
|
{
|
|
441
404
|
className: "h-3 w-[3px] rounded-full bg-current",
|
|
@@ -451,8 +414,8 @@ function EffortPicker({ value, onChange, levels = DEFAULT_EFFORT_LEVELS, label =
|
|
|
451
414
|
const rendered = reconcileEffortLevels(value, levels);
|
|
452
415
|
const isDeclared = (id) => levels.some((l) => l.id === id) && !UNPLACEABLE_LEVEL_IDS.has(id);
|
|
453
416
|
const selected = rendered.find((l) => l.id === value);
|
|
454
|
-
return /* @__PURE__ */
|
|
455
|
-
/* @__PURE__ */
|
|
417
|
+
return /* @__PURE__ */ jsxs("div", { ref: containerRef, className: pickerRootClass(fullWidth), children: [
|
|
418
|
+
/* @__PURE__ */ jsxs(
|
|
456
419
|
"button",
|
|
457
420
|
{
|
|
458
421
|
type: "button",
|
|
@@ -462,20 +425,20 @@ function EffortPicker({ value, onChange, levels = DEFAULT_EFFORT_LEVELS, label =
|
|
|
462
425
|
title: label ? `${label} \u2014 how hard the agent reasons before answering` : "Reasoning effort",
|
|
463
426
|
className: `inline-flex min-h-[36px] shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full border border-border bg-card px-3 py-1.5 text-sm font-medium text-foreground transition hover:bg-accent ${fullWidth ? "w-full" : ""}`,
|
|
464
427
|
children: [
|
|
465
|
-
/* @__PURE__ */
|
|
466
|
-
/* @__PURE__ */
|
|
467
|
-
label ? /* @__PURE__ */
|
|
428
|
+
/* @__PURE__ */ jsx(BrainGlyph, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
429
|
+
/* @__PURE__ */ jsxs("span", { className: fullWidth ? "flex-1 truncate text-left" : void 0, children: [
|
|
430
|
+
label ? /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
|
|
468
431
|
label,
|
|
469
432
|
": "
|
|
470
433
|
] }) : null,
|
|
471
434
|
selected ? selected.label : "\u2014"
|
|
472
435
|
] }),
|
|
473
|
-
selected && isDeclared(selected.id) && /* @__PURE__ */
|
|
474
|
-
/* @__PURE__ */
|
|
436
|
+
selected && isDeclared(selected.id) && /* @__PURE__ */ jsx(EffortMeter, { fill: effortMeterFill(selected.id, levels), className: "shrink-0 text-foreground" }),
|
|
437
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" })
|
|
475
438
|
]
|
|
476
439
|
}
|
|
477
440
|
),
|
|
478
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ jsx(
|
|
479
442
|
PopoverSurface,
|
|
480
443
|
{
|
|
481
444
|
open,
|
|
@@ -485,7 +448,7 @@ function EffortPicker({ value, onChange, levels = DEFAULT_EFFORT_LEVELS, label =
|
|
|
485
448
|
panelRef,
|
|
486
449
|
matchTriggerWidth: fullWidth,
|
|
487
450
|
className: `w-44 overflow-y-auto rounded-xl border border-card-edge bg-popover p-1 ${OVERLAY_SHADOW}`,
|
|
488
|
-
children: rendered.map((l) => /* @__PURE__ */
|
|
451
|
+
children: rendered.map((l) => /* @__PURE__ */ jsxs(
|
|
489
452
|
"button",
|
|
490
453
|
{
|
|
491
454
|
type: "button",
|
|
@@ -497,10 +460,10 @@ function EffortPicker({ value, onChange, levels = DEFAULT_EFFORT_LEVELS, label =
|
|
|
497
460
|
},
|
|
498
461
|
className: `flex min-h-[40px] w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm transition ${POPOVER_OPTION_FOCUS} ${l.id === value ? "bg-primary/10 font-medium" : "hover:bg-accent"}`,
|
|
499
462
|
children: [
|
|
500
|
-
/* @__PURE__ */
|
|
501
|
-
/* @__PURE__ */
|
|
502
|
-
isDeclared(l.id) && /* @__PURE__ */
|
|
503
|
-
l.id === value && /* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ jsx(BrainGlyph, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
464
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: l.label }),
|
|
465
|
+
isDeclared(l.id) && /* @__PURE__ */ jsx(EffortMeter, { fill: effortMeterFill(l.id, levels), className: "ml-auto text-foreground" }),
|
|
466
|
+
l.id === value && /* @__PURE__ */ jsx(CheckGlyph, { className: `${isDeclared(l.id) ? "" : "ml-auto "}h-3.5 w-3.5 shrink-0 text-primary` })
|
|
504
467
|
]
|
|
505
468
|
},
|
|
506
469
|
l.id
|
|
@@ -786,7 +749,7 @@ function useComposerAttachments(options) {
|
|
|
786
749
|
}
|
|
787
750
|
|
|
788
751
|
// src/web-react/harness-glyphs.tsx
|
|
789
|
-
import { jsx as
|
|
752
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
790
753
|
var BRAND_PATHS = {
|
|
791
754
|
opencode: [
|
|
792
755
|
"M16 6H8v12h8V6zm4 16H4V2h16v20z"
|
|
@@ -819,27 +782,27 @@ var BRAND_PATHS = {
|
|
|
819
782
|
]
|
|
820
783
|
};
|
|
821
784
|
function BotGlyph({ className }) {
|
|
822
|
-
return /* @__PURE__ */
|
|
823
|
-
/* @__PURE__ */
|
|
824
|
-
/* @__PURE__ */
|
|
825
|
-
/* @__PURE__ */
|
|
826
|
-
/* @__PURE__ */
|
|
827
|
-
/* @__PURE__ */
|
|
828
|
-
/* @__PURE__ */
|
|
785
|
+
return /* @__PURE__ */ jsxs2("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
786
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 8V4H8" }),
|
|
787
|
+
/* @__PURE__ */ jsx2("rect", { width: "16", height: "12", x: "4", y: "8", rx: "2" }),
|
|
788
|
+
/* @__PURE__ */ jsx2("path", { d: "M2 14h2" }),
|
|
789
|
+
/* @__PURE__ */ jsx2("path", { d: "M20 14h2" }),
|
|
790
|
+
/* @__PURE__ */ jsx2("path", { d: "M15 13v2" }),
|
|
791
|
+
/* @__PURE__ */ jsx2("path", { d: "M9 13v2" })
|
|
829
792
|
] });
|
|
830
793
|
}
|
|
831
794
|
function PlugGlyph({ className }) {
|
|
832
|
-
return /* @__PURE__ */
|
|
833
|
-
/* @__PURE__ */
|
|
834
|
-
/* @__PURE__ */
|
|
835
|
-
/* @__PURE__ */
|
|
836
|
-
/* @__PURE__ */
|
|
795
|
+
return /* @__PURE__ */ jsxs2("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
796
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 22v-5" }),
|
|
797
|
+
/* @__PURE__ */ jsx2("path", { d: "M15 8V2" }),
|
|
798
|
+
/* @__PURE__ */ jsx2("path", { d: "M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z" }),
|
|
799
|
+
/* @__PURE__ */ jsx2("path", { d: "M9 8V2" })
|
|
837
800
|
] });
|
|
838
801
|
}
|
|
839
802
|
function TerminalGlyph({ className }) {
|
|
840
|
-
return /* @__PURE__ */
|
|
841
|
-
/* @__PURE__ */
|
|
842
|
-
/* @__PURE__ */
|
|
803
|
+
return /* @__PURE__ */ jsxs2("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
804
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 19h8" }),
|
|
805
|
+
/* @__PURE__ */ jsx2("path", { d: "m4 17 6-6-6-6" })
|
|
843
806
|
] });
|
|
844
807
|
}
|
|
845
808
|
var FALLBACK_GLYPHS = {
|
|
@@ -850,7 +813,7 @@ var FALLBACK_GLYPHS = {
|
|
|
850
813
|
function HarnessGlyph({ harness, className }) {
|
|
851
814
|
const brand = BRAND_PATHS[harness];
|
|
852
815
|
if (brand) {
|
|
853
|
-
return /* @__PURE__ */
|
|
816
|
+
return /* @__PURE__ */ jsx2(
|
|
854
817
|
"svg",
|
|
855
818
|
{
|
|
856
819
|
className,
|
|
@@ -861,18 +824,18 @@ function HarnessGlyph({ harness, className }) {
|
|
|
861
824
|
role: "img",
|
|
862
825
|
"aria-label": harness,
|
|
863
826
|
"data-glyph": harness,
|
|
864
|
-
children: brand.map((d) => /* @__PURE__ */
|
|
827
|
+
children: brand.map((d) => /* @__PURE__ */ jsx2("path", { d }, d.slice(0, 32)))
|
|
865
828
|
}
|
|
866
829
|
);
|
|
867
830
|
}
|
|
868
831
|
const Fallback = FALLBACK_GLYPHS[harness] ?? BotGlyph;
|
|
869
832
|
const kind = Fallback === BotGlyph ? "bot" : Fallback === PlugGlyph ? "plug" : "terminal";
|
|
870
|
-
return /* @__PURE__ */
|
|
833
|
+
return /* @__PURE__ */ jsx2("span", { role: "img", "aria-label": harness, "data-glyph": kind, className: "inline-flex", children: /* @__PURE__ */ jsx2(Fallback, { className }) });
|
|
871
834
|
}
|
|
872
835
|
|
|
873
836
|
// src/web-react/agent-session-controls.tsx
|
|
874
837
|
import { useId as useId2, useMemo as useMemo3, useRef as useRef3, useState as useState3 } from "react";
|
|
875
|
-
import { Fragment as Fragment2, jsx as
|
|
838
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
876
839
|
var HARNESS_LABELS = {
|
|
877
840
|
opencode: "OpenCode (any model)",
|
|
878
841
|
"claude-code": "Claude Code (Anthropic)",
|
|
@@ -892,18 +855,18 @@ function harnessLabel(h) {
|
|
|
892
855
|
return HARNESS_LABELS[h] ?? h;
|
|
893
856
|
}
|
|
894
857
|
function ChevronDown2({ className }) {
|
|
895
|
-
return /* @__PURE__ */
|
|
858
|
+
return /* @__PURE__ */ jsx3("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx3("path", { d: "m6 9 6 6 6-6" }) });
|
|
896
859
|
}
|
|
897
860
|
function LockGlyph({ className }) {
|
|
898
|
-
return /* @__PURE__ */
|
|
899
|
-
/* @__PURE__ */
|
|
900
|
-
/* @__PURE__ */
|
|
861
|
+
return /* @__PURE__ */ jsxs3("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
862
|
+
/* @__PURE__ */ jsx3("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }),
|
|
863
|
+
/* @__PURE__ */ jsx3("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
|
|
901
864
|
] });
|
|
902
865
|
}
|
|
903
866
|
function GearGlyph({ className }) {
|
|
904
|
-
return /* @__PURE__ */
|
|
905
|
-
/* @__PURE__ */
|
|
906
|
-
/* @__PURE__ */
|
|
867
|
+
return /* @__PURE__ */ jsxs3("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
868
|
+
/* @__PURE__ */ jsx3("circle", { cx: "12", cy: "12", r: "3" }),
|
|
869
|
+
/* @__PURE__ */ jsx3("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z" })
|
|
907
870
|
] });
|
|
908
871
|
}
|
|
909
872
|
var FOCUS_RING = "";
|
|
@@ -924,8 +887,8 @@ function HarnessPicker({
|
|
|
924
887
|
const options = available ?? Object.keys(HARNESS_LABELS);
|
|
925
888
|
const showHint = () => setHintOpen(true);
|
|
926
889
|
const hideHint = () => setHintOpen(false);
|
|
927
|
-
return /* @__PURE__ */
|
|
928
|
-
/* @__PURE__ */
|
|
890
|
+
return /* @__PURE__ */ jsxs3("div", { ref: containerRef, className: pickerRootClass(fullWidth), children: [
|
|
891
|
+
/* @__PURE__ */ jsxs3(
|
|
929
892
|
"button",
|
|
930
893
|
{
|
|
931
894
|
type: "button",
|
|
@@ -943,17 +906,17 @@ function HarnessPicker({
|
|
|
943
906
|
title: "Agent backend",
|
|
944
907
|
className: `inline-flex min-h-[36px] w-full items-center justify-between gap-1.5 rounded-full border border-border bg-card px-3 py-1.5 text-sm font-medium text-foreground transition ${locked ? "cursor-default" : "hover:bg-accent"} ${FOCUS_RING}`,
|
|
945
908
|
children: [
|
|
946
|
-
/* @__PURE__ */
|
|
947
|
-
/* @__PURE__ */
|
|
948
|
-
/* @__PURE__ */
|
|
909
|
+
/* @__PURE__ */ jsxs3("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
910
|
+
/* @__PURE__ */ jsx3(HarnessGlyph, { harness: value, className: "h-4 w-4 shrink-0 text-foreground" }),
|
|
911
|
+
/* @__PURE__ */ jsx3("span", { className: "truncate", children: harnessLabel(value) })
|
|
949
912
|
] }),
|
|
950
|
-
locked ? /* @__PURE__ */
|
|
913
|
+
locked ? /* @__PURE__ */ jsx3(LockGlyph, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ jsx3(ChevronDown2, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" })
|
|
951
914
|
]
|
|
952
915
|
}
|
|
953
916
|
),
|
|
954
|
-
locked && /* @__PURE__ */
|
|
955
|
-
/* @__PURE__ */
|
|
956
|
-
/* @__PURE__ */
|
|
917
|
+
locked && /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
918
|
+
/* @__PURE__ */ jsx3("span", { id: reasonId, className: "sr-only", children: lockReason }),
|
|
919
|
+
/* @__PURE__ */ jsx3(
|
|
957
920
|
PopoverSurface,
|
|
958
921
|
{
|
|
959
922
|
open: hintOpen,
|
|
@@ -962,11 +925,11 @@ function HarnessPicker({
|
|
|
962
925
|
panelRef: hintPanelRef,
|
|
963
926
|
matchTriggerWidth: fullWidth,
|
|
964
927
|
className: `max-w-[248px] rounded-lg border border-card-edge bg-popover px-2.5 py-1.5 text-[11px] leading-snug text-muted-foreground ${OVERLAY_SHADOW}`,
|
|
965
|
-
children: /* @__PURE__ */
|
|
928
|
+
children: /* @__PURE__ */ jsx3("span", { "aria-hidden": true, children: lockReason })
|
|
966
929
|
}
|
|
967
930
|
)
|
|
968
931
|
] }),
|
|
969
|
-
/* @__PURE__ */
|
|
932
|
+
/* @__PURE__ */ jsx3(
|
|
970
933
|
PopoverSurface,
|
|
971
934
|
{
|
|
972
935
|
open: !locked && open,
|
|
@@ -976,7 +939,7 @@ function HarnessPicker({
|
|
|
976
939
|
panelRef,
|
|
977
940
|
matchTriggerWidth: true,
|
|
978
941
|
className: `max-h-64 min-w-[248px] overflow-y-auto rounded-xl border border-card-edge bg-popover p-1 ${OVERLAY_SHADOW}`,
|
|
979
|
-
children: options.map((h) => /* @__PURE__ */
|
|
942
|
+
children: options.map((h) => /* @__PURE__ */ jsxs3(
|
|
980
943
|
"button",
|
|
981
944
|
{
|
|
982
945
|
type: "button",
|
|
@@ -988,9 +951,9 @@ function HarnessPicker({
|
|
|
988
951
|
},
|
|
989
952
|
className: `flex w-full items-center gap-2.5 rounded-md px-3 py-2 text-left text-sm transition ${FOCUS_RING} ${h === value ? "bg-primary/10 font-medium" : "hover:bg-accent"}`,
|
|
990
953
|
children: [
|
|
991
|
-
/* @__PURE__ */
|
|
992
|
-
/* @__PURE__ */
|
|
993
|
-
h === value && /* @__PURE__ */
|
|
954
|
+
/* @__PURE__ */ jsx3(HarnessGlyph, { harness: h, className: "h-4 w-4 shrink-0 text-foreground" }),
|
|
955
|
+
/* @__PURE__ */ jsx3("span", { className: "truncate", children: harnessLabel(h) }),
|
|
956
|
+
h === value && /* @__PURE__ */ jsx3(CheckGlyph, { className: "ml-auto h-3.5 w-3.5 shrink-0 text-primary" })
|
|
994
957
|
]
|
|
995
958
|
},
|
|
996
959
|
h
|
|
@@ -1038,7 +1001,7 @@ function AgentSessionControls(props) {
|
|
|
1038
1001
|
const panelId = useId2();
|
|
1039
1002
|
const selectedModel = models.find((m) => m.id === model);
|
|
1040
1003
|
const showEffort = selectedModel?.supportsReasoning ?? true;
|
|
1041
|
-
const modelPicker = /* @__PURE__ */
|
|
1004
|
+
const modelPicker = /* @__PURE__ */ jsx3(
|
|
1042
1005
|
ModelPicker,
|
|
1043
1006
|
{
|
|
1044
1007
|
value: model,
|
|
@@ -1049,17 +1012,17 @@ function AgentSessionControls(props) {
|
|
|
1049
1012
|
}
|
|
1050
1013
|
);
|
|
1051
1014
|
if (layout === "inline") {
|
|
1052
|
-
return /* @__PURE__ */
|
|
1015
|
+
return /* @__PURE__ */ jsxs3("div", { className: `flex items-center gap-1.5 ${className ?? ""}`, children: [
|
|
1053
1016
|
modelPicker,
|
|
1054
|
-
showHarness && /* @__PURE__ */
|
|
1055
|
-
showEffort && /* @__PURE__ */
|
|
1017
|
+
showHarness && /* @__PURE__ */ jsx3(HarnessPicker, { value: harness, onChange: onHarness, available: availableHarnesses, lockReason: harnessLockReason }),
|
|
1018
|
+
showEffort && /* @__PURE__ */ jsx3(EffortPicker, { value: effort, onChange: onEffortChange, levels: effortLevels })
|
|
1056
1019
|
] });
|
|
1057
1020
|
}
|
|
1058
1021
|
const hasAdvanced = showHarness || showEffort;
|
|
1059
|
-
return /* @__PURE__ */
|
|
1022
|
+
return /* @__PURE__ */ jsxs3("div", { className: `flex items-center gap-1.5 ${className ?? ""}`, children: [
|
|
1060
1023
|
modelPicker,
|
|
1061
|
-
hasAdvanced && /* @__PURE__ */
|
|
1062
|
-
/* @__PURE__ */
|
|
1024
|
+
hasAdvanced && /* @__PURE__ */ jsxs3("div", { ref: popoverRef, className: "relative inline-flex", children: [
|
|
1025
|
+
/* @__PURE__ */ jsx3(
|
|
1063
1026
|
"button",
|
|
1064
1027
|
{
|
|
1065
1028
|
type: "button",
|
|
@@ -1069,10 +1032,10 @@ function AgentSessionControls(props) {
|
|
|
1069
1032
|
title: "Model settings \u2014 pick the agent backend and how hard it thinks",
|
|
1070
1033
|
className: `flex h-8 w-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-muted hover:text-foreground data-[state=open]:bg-muted ${FOCUS_RING}`,
|
|
1071
1034
|
"data-state": open ? "open" : "closed",
|
|
1072
|
-
children: /* @__PURE__ */
|
|
1035
|
+
children: /* @__PURE__ */ jsx3(GearGlyph, { className: "h-4 w-4" })
|
|
1073
1036
|
}
|
|
1074
1037
|
),
|
|
1075
|
-
/* @__PURE__ */
|
|
1038
|
+
/* @__PURE__ */ jsxs3(
|
|
1076
1039
|
PopoverSurface,
|
|
1077
1040
|
{
|
|
1078
1041
|
open,
|
|
@@ -1081,9 +1044,9 @@ function AgentSessionControls(props) {
|
|
|
1081
1044
|
panelRef,
|
|
1082
1045
|
className: `w-72 space-y-3 overflow-y-auto rounded-xl border border-card-edge bg-popover p-3 ${OVERLAY_SHADOW}`,
|
|
1083
1046
|
children: [
|
|
1084
|
-
showHarness && /* @__PURE__ */
|
|
1085
|
-
/* @__PURE__ */
|
|
1086
|
-
/* @__PURE__ */
|
|
1047
|
+
showHarness && /* @__PURE__ */ jsxs3("div", { className: "space-y-1.5", children: [
|
|
1048
|
+
/* @__PURE__ */ jsx3("p", { className: "text-xs font-medium text-foreground", children: "Agent backend" }),
|
|
1049
|
+
/* @__PURE__ */ jsx3(
|
|
1087
1050
|
HarnessPicker,
|
|
1088
1051
|
{
|
|
1089
1052
|
value: harness,
|
|
@@ -1093,12 +1056,12 @@ function AgentSessionControls(props) {
|
|
|
1093
1056
|
lockReason: harnessLockReason
|
|
1094
1057
|
}
|
|
1095
1058
|
),
|
|
1096
|
-
/* @__PURE__ */
|
|
1059
|
+
/* @__PURE__ */ jsx3("p", { className: "text-[11px] leading-snug text-muted-foreground", children: "The engine that runs the agent. Switching it keeps your model choice compatible." })
|
|
1097
1060
|
] }),
|
|
1098
|
-
showEffort && /* @__PURE__ */
|
|
1099
|
-
/* @__PURE__ */
|
|
1100
|
-
/* @__PURE__ */
|
|
1101
|
-
/* @__PURE__ */
|
|
1061
|
+
showEffort && /* @__PURE__ */ jsxs3("div", { className: "space-y-1.5", children: [
|
|
1062
|
+
/* @__PURE__ */ jsx3("p", { className: "text-xs font-medium text-foreground", children: "Thinking" }),
|
|
1063
|
+
/* @__PURE__ */ jsx3(EffortPicker, { value: effort, onChange: onEffortChange, levels: effortLevels, label: "", fullWidth: true }),
|
|
1064
|
+
/* @__PURE__ */ jsx3("p", { className: "text-[11px] leading-snug text-muted-foreground", children: "How hard the agent thinks before answering. Higher is slower but more thorough." })
|
|
1102
1065
|
] })
|
|
1103
1066
|
]
|
|
1104
1067
|
}
|
|
@@ -1108,7 +1071,6 @@ function AgentSessionControls(props) {
|
|
|
1108
1071
|
}
|
|
1109
1072
|
|
|
1110
1073
|
export {
|
|
1111
|
-
ProviderLogo,
|
|
1112
1074
|
ChevronDown,
|
|
1113
1075
|
usePopover,
|
|
1114
1076
|
POPOVER_SURFACE_ATTR,
|
|
@@ -1129,4 +1091,4 @@ export {
|
|
|
1129
1091
|
HarnessGlyph,
|
|
1130
1092
|
AgentSessionControls
|
|
1131
1093
|
};
|
|
1132
|
-
//# sourceMappingURL=chunk-
|
|
1094
|
+
//# sourceMappingURL=chunk-XVRHISF3.js.map
|