@pairz/team 1.0.0-rc.81 → 1.0.0-rc.83
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/README.md +9 -4
- package/WORDS.md +23 -2
- package/package.json +2 -2
- package/team/actions/agent.js +12 -4
- package/team/collections/agent.d.ts +70 -15
- package/team/collections/agent.js +29 -7
- package/team/shared/definition.d.ts +15 -0
- package/team/shared/definition.js +17 -1
- package/team/views/web/model-pick.d.ts +10 -1
- package/team/views/web/model-pick.js +4 -2
- package/team/views/web/model-picker.d.ts +31 -5
- package/team/views/web/model-picker.js +74 -30
- package/team/views/web/words.d.ts +1 -1
- package/team/views/web/words.js +7 -0
- package/tiers/actions/choose.d.ts +48 -1
- package/tiers/actions/choose.js +143 -57
- package/tiers/actions/model.js +14 -9
- package/tiers/collections/choice.d.ts +15 -8
- package/tiers/collections/choice.js +22 -12
- package/tiers/collections/template.d.ts +6 -1
- package/tiers/collections/template.js +8 -4
- package/tiers/contract.d.ts +2 -2
- package/tiers/mod.d.ts +17 -9
- package/tiers/mod.js +26 -12
- package/tiers/shared/plans.d.ts +31 -33
- package/tiers/shared/plans.js +39 -54
- package/tiers/shared/shown.d.ts +16 -3
- package/tiers/shared/shown.js +43 -15
- package/tiers/shared/tiers.d.ts +38 -5
- package/tiers/shared/tiers.js +29 -3
- package/tiers/views/web/composer.d.ts +2 -1
- package/tiers/views/web/composer.js +8 -2
- package/tiers/views/web/org.d.ts +46 -11
- package/tiers/views/web/org.js +144 -61
- package/tiers/views/web/say.d.ts +17 -2
- package/tiers/views/web/say.js +17 -2
- package/tiers/views/web/space.d.ts +2 -1
- package/tiers/views/web/space.js +8 -4
- package/tiers/views/web/style.d.ts +1 -1
- package/tiers/views/web/style.js +5 -0
- package/tiers/web.d.ts +6 -5
- package/tiers/web.js +9 -8
package/tiers/views/web/org.js
CHANGED
|
@@ -4,22 +4,27 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
4
4
|
* shell's `orgSettings`, at `/org?tab=models`): how hard they think, then who
|
|
5
5
|
* they are.
|
|
6
6
|
*
|
|
7
|
-
* - **The tiers**, as cards side by side: each its name,
|
|
8
|
-
* what a typical message comes to at this org's prices
|
|
9
|
-
* plan's credits go, and each kind of work's model; the
|
|
10
|
-
* outlined. Owners and admins make one the default in a
|
|
11
|
-
* after), customize one (a dialog: each kind of work's
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* tier
|
|
15
|
-
*
|
|
7
|
+
* - **The tiers**, as cards side by side, in the org's order: each its name,
|
|
8
|
+
* what it's good for, what a typical message comes to at this org's prices
|
|
9
|
+
* and how far the plan's credits go, and each kind of work's model; the
|
|
10
|
+
* org's default outlined. Owners and admins make one the default in a
|
|
11
|
+
* click (Undo right after), customize one (a dialog: each kind of work's
|
|
12
|
+
* models in the order they're tried, any of them first, from every model
|
|
13
|
+
* the org can run, each saying how it's paid for), duplicate one into a
|
|
14
|
+
* new tier, make one from nothing, move one before or after another, take
|
|
15
|
+
* one away or put it back as it was, and say what members can use (all
|
|
16
|
+
* tiers, up to one, or only the default). Where the app has plans, they
|
|
17
|
+
* say whether members' subscriptions are used whenever possible (off: the
|
|
18
|
+
* tier's order, model by model), and each tier's fallbacks on members'
|
|
19
|
+
* subscriptions. On a plan of credits given once, a heavier default says
|
|
20
|
+
* how much faster it spends them.
|
|
16
21
|
* - **The team** (team.tsx): the agents every space starts with.
|
|
17
22
|
*
|
|
18
23
|
* Anyone else reads it, and is told who changes it. Everything shown is a
|
|
19
24
|
* watched read (`modelChoice.offered`), so a change shows at once.
|
|
20
25
|
*/
|
|
21
26
|
import { useEffect, useState } from "react";
|
|
22
|
-
import { Badge, Button, Card, Dialog, EmptyState, Field, Icon, Input, LazyView, Menu, message, Notice, Select, Skeleton, } from "pairz/web";
|
|
27
|
+
import { Badge, Button, Card, Checkbox, Dialog, EmptyState, Field, Icon, Input, LazyView, Menu, message, Notice, Select, Skeleton, } from "pairz/web";
|
|
23
28
|
import { runs } from "pairz/plugins/interfaces/contract";
|
|
24
29
|
import { say } from "./say.js";
|
|
25
30
|
import { STYLE } from "./style.js";
|
|
@@ -37,13 +42,13 @@ export const tiersOrgView = (_, ctx) => {
|
|
|
37
42
|
});
|
|
38
43
|
const org = ctx.hints.org;
|
|
39
44
|
return (_jsxs(_Fragment, { children: [_jsx("style", { href: "tiers-web", precedence: "pairz", children: STYLE }), shown
|
|
40
|
-
? (_jsx(OrgAgents, { shown: shown, team: team?.agents, may: may, org: org?.kind === "personal" ? undefined : org?.name, call: ctx.call }))
|
|
45
|
+
? (_jsx(OrgAgents, { shown: shown, team: team?.agents, may: may, org: org?.kind === "personal" ? undefined : org?.name, personal: org?.kind === "personal", call: ctx.call }))
|
|
41
46
|
: _jsx(Loading, {})] }));
|
|
42
47
|
};
|
|
43
48
|
function Loading() {
|
|
44
49
|
return (_jsxs("div", { className: "tiers", "aria-busy": "true", children: [_jsx(Skeleton, { height: 22, width: "55%" }), _jsx("div", { className: "tiers-cards", children: [0, 1, 2, 3].map((n) => _jsx(Skeleton, { height: 300, radius: "xl" }, n)) }), _jsx(Skeleton, { height: 220, radius: "xl" })] }));
|
|
45
50
|
}
|
|
46
|
-
export function OrgAgents({ shown, team, may, org, call }) {
|
|
51
|
+
export function OrgAgents({ shown, team, may, org, personal, call }) {
|
|
47
52
|
const [busy, setBusy] = useState();
|
|
48
53
|
const [error, setError] = useState();
|
|
49
54
|
const [done, setDone] = useState();
|
|
@@ -81,20 +86,54 @@ export function OrgAgents({ shown, team, may, org, call }) {
|
|
|
81
86
|
tier: before,
|
|
82
87
|
});
|
|
83
88
|
});
|
|
84
|
-
return (_jsxs("div", { className: "tiers", children: [_jsxs("div", { className: "tiers-now", children: [_jsxs("p", { children: [say.nodes(shown.org.tier ? "nowOrg" : "nowPlan", { tier: _jsx("b", { children: title(current) }) }), " ", say("nowMore")] }), may && shown.org.tier && shown.plan && shown.org.tier !== shown.plan
|
|
89
|
+
return (_jsxs("div", { className: "tiers", children: [_jsxs("div", { className: "tiers-now", children: [_jsxs("p", { children: [say.nodes(shown.org.tier ? "nowOrg" : "nowPlan", { tier: _jsx("b", { children: title(current) }) }), " ", shown.org.fixed ? say("capDefaultNote") : say("nowMore")] }), may && shown.org.tier && shown.plan && shown.org.tier !== shown.plan
|
|
85
90
|
? (_jsx(Button, { size: "sm", variant: "ghost", loading: busy === "plan", disabled: !!busy, onClick: () => void choose(null), children: say("backToPlan") }))
|
|
86
91
|
: null] }), done
|
|
87
92
|
? (_jsx(Notice, { tone: "success", role: "status", action: _jsx(Button, { size: "sm", onClick: () => void choose(done.tier, true), disabled: !!busy, children: say("undo") }), children: done.said }))
|
|
88
|
-
: null, error ? _jsx(Notice, { tone: "destructive", role: "alert", children: error }) : null, may ? null : (_jsx(Notice, { tone: "neutral", icon: "lock", children:
|
|
93
|
+
: null, error ? _jsx(Notice, { tone: "destructive", role: "alert", children: error }) : null, may ? null : (_jsx(Notice, { tone: "neutral", icon: "lock", children: shown.org.fixed
|
|
94
|
+
? say("onlyRunnersFixed")
|
|
95
|
+
: org
|
|
96
|
+
? say("onlyRunners", { org })
|
|
97
|
+
: say("onlyRunnersHere") })), _jsxs("ul", { className: "tiers-cards", "aria-label": say("tiersLabel"), children: [shown.tiers.map((tier, i) => (_jsx(TierCard, { tier: tier, shown: shown, current: tier.name === current, may: may, busy: busy, onMove: (by) => void act(tier.name, () => call("tiers.order", { tiers: moved(shown.tiers.map((t) => t.name), i, i + by) })), onChoose: () => void choose(tier.name), onEdit: () => setEditing({ name: tier.name }), onCopy: () => setEditing({ from: tier.name, title: say("copyOf", { tier: tier.title }) }), onRemove: () => void act(tier.name, () => call("tiers.remove", { tier: tier.name })), onRestore: () => void act(tier.name, () => call("tiers.restore", { tier: tier.name })) }, tier.name))), may
|
|
89
98
|
? (_jsx("li", { className: "tier-new", children: _jsxs("button", { type: "button", className: "tier-new-button", onClick: () => setEditing({ from: current, title: "" }), children: [_jsx(Icon, { name: "plus", size: 18 }), _jsx("b", { children: say("newTier") }), _jsx("span", { children: say("newTierAbout") })] }) }))
|
|
90
99
|
: null] }), may && shown.removed.length
|
|
91
100
|
? (_jsxs("p", { className: "tiers-removed", children: [_jsx("span", { children: say("takenAway") }), shown.removed.map((r) => (_jsx(Button, { size: "sm", variant: "ghost", icon: "plus", loading: busy === r.name, onClick: () => void act(r.name, () => call("tiers.restore", { tier: r.name })), children: say("addBackTier", { tier: r.title }) }, r.name)))] }))
|
|
92
|
-
: null, may
|
|
93
|
-
?
|
|
101
|
+
: null, may ? _jsx(MembersUse, { shown: shown, busy: busy, act: act, call: call }) : null, may && shown.org.plansFirst !== undefined
|
|
102
|
+
? _jsx(PlansFirst, { on: shown.org.plansFirst, busy: busy, act: act, call: call })
|
|
94
103
|
: null, _jsx(SpendNote, { shown: shown, tier: current }), _jsx(Team, { shown: shown, team: team, may: may, org: org, tier: current, call: call }), _jsxs("p", { className: "tiers-foot", children: [_jsx(Icon, { name: "info", size: 14 }), _jsxs("span", { children: [shown.per === "message" ? say("footMessage") : say("footReply"), " ", say.nodes("footPrices", { budget: _jsx("a", { href: "/org?tab=billing", children: say("budget") }) })] })] }), editing
|
|
95
|
-
? (_jsx(TierEditor, { shown: shown, team: team, editing: editing, call: call, onClose: () => setEditing(undefined) }))
|
|
104
|
+
? (_jsx(TierEditor, { shown: shown, team: team, editing: editing, members: !personal, call: call, onClose: () => setEditing(undefined) }))
|
|
96
105
|
: null] }));
|
|
97
106
|
}
|
|
107
|
+
/** A list with one entry moved from `from` to `to`. */
|
|
108
|
+
export function moved(list, from, to) {
|
|
109
|
+
const next = [...list];
|
|
110
|
+
const [one] = next.splice(from, 1);
|
|
111
|
+
next.splice(to, 0, one);
|
|
112
|
+
return next;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* What the org's members can use, in one choice: every tier, tiers up to
|
|
116
|
+
* one (in the org's order), or only the org's default (`tiers.cap`).
|
|
117
|
+
*/
|
|
118
|
+
function MembersUse({ shown, busy, act, call }) {
|
|
119
|
+
// Up to the last is every tier.
|
|
120
|
+
const cap = shown.org.cap !== shown.tiers.at(-1)?.name ? shown.org.cap : null;
|
|
121
|
+
const value = shown.org.fixed ? "default" : cap ? `up:${cap}` : "all";
|
|
122
|
+
const set = (next) => act("cap", () => call("tiers.cap", next === "default"
|
|
123
|
+
? { fixed: true }
|
|
124
|
+
: { tier: next.startsWith("up:") ? next.slice(3) : null }));
|
|
125
|
+
return (_jsxs("div", { className: "tiers-cap", children: [_jsx("label", { htmlFor: "tiers-cap", children: say("capLabel") }), _jsxs(Select, { id: "tiers-cap", size: "sm", value: value, disabled: busy === "cap", onChange: (e) => void set(e.target.value), children: [_jsx("option", { value: "all", children: say("capAll") }), shown.tiers.slice(0, -1).map((t) => (_jsx("option", { value: `up:${t.name}`, children: say("capUpTo", { tier: t.title }) }, t.name))), _jsx("option", { value: "default", children: say("capDefault") })] }), _jsx("span", { children: shown.org.fixed ? say("capDefaultNote") : say("capNote") })] }));
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Whether members' subscriptions are used whenever possible
|
|
129
|
+
* (`tiers.plansFirst`): off, the tier's models in order, each on a member's
|
|
130
|
+
* subscription that runs it, else on credits; on, any model their
|
|
131
|
+
* subscriptions run before credits, then the tier's fallbacks, with what
|
|
132
|
+
* that may cost the team.
|
|
133
|
+
*/
|
|
134
|
+
function PlansFirst({ on, busy, act, call }) {
|
|
135
|
+
return (_jsxs("div", { className: "tiers-plans", children: [_jsx(Checkbox, { label: say("plansFirstLabel"), checked: on, disabled: busy === "plansFirst", onChange: (e) => void act("plansFirst", () => call("tiers.plansFirst", { on: e.currentTarget.checked })) }), _jsx("span", { children: on ? say("plansFirstOn") : say("plansFirstOff") }), on ? _jsx(Notice, { tone: "warning", icon: "info", children: say("plansFirstWarning") }) : null] }));
|
|
136
|
+
}
|
|
98
137
|
/**
|
|
99
138
|
* What the tier in use means for the plan's credits, when it's worth saying: a
|
|
100
139
|
* plan of credits given once (a trial's) spent faster than the cheapest tier
|
|
@@ -120,13 +159,30 @@ export function SpendNote({ shown, tier }) {
|
|
|
120
159
|
return (_jsxs(Notice, { tone: "warning", icon: "info", className: "tiers-spend", children: [_jsx("b", { children: say("faster", { tier: using.title, times, cheapest: cheapest.title }) }), " ", goes ? `${say("fasterGoes", { goes })} ` : "", say("changeAnyTime")] }));
|
|
121
160
|
}
|
|
122
161
|
/** A tier: what it's for, what a message comes to, each kind of work's model, and choosing it. */
|
|
123
|
-
export function TierCard({ tier, shown, current, may, busy, onChoose, onEdit, onCopy, onRemove, onRestore }) {
|
|
162
|
+
export function TierCard({ tier, shown, current, may, busy, onChoose, onEdit, onCopy, onMove, onRemove, onRestore }) {
|
|
124
163
|
const price = perReply(tier.price);
|
|
125
164
|
const goes = creditsGo(shown.credits, tier.price, shown.per);
|
|
126
165
|
const kindTitle = (kind) => shown.kinds.find((k) => k.kind === kind)?.title ?? kind;
|
|
166
|
+
const at = shown.tiers.findIndex((t) => t.name === tier.name);
|
|
167
|
+
const before = shown.tiers[at - 1];
|
|
168
|
+
const after = shown.tiers[at + 1];
|
|
127
169
|
const items = [
|
|
128
170
|
{ label: say("customize"), icon: "pencil", onSelect: onEdit },
|
|
129
171
|
{ label: say("duplicate"), icon: "copy", onSelect: onCopy },
|
|
172
|
+
...(onMove && before
|
|
173
|
+
? [{
|
|
174
|
+
label: say("moveBefore", { tier: before.title }),
|
|
175
|
+
icon: "chevron-left",
|
|
176
|
+
onSelect: () => onMove(-1),
|
|
177
|
+
}]
|
|
178
|
+
: []),
|
|
179
|
+
...(onMove && after
|
|
180
|
+
? [{
|
|
181
|
+
label: say("moveAfter", { tier: after.title }),
|
|
182
|
+
icon: "chevron",
|
|
183
|
+
onSelect: () => onMove(1),
|
|
184
|
+
}]
|
|
185
|
+
: []),
|
|
130
186
|
...(tier.changed
|
|
131
187
|
? [{ label: say("backToOriginal"), icon: "restore", onSelect: onRestore }]
|
|
132
188
|
: []),
|
|
@@ -160,16 +216,21 @@ const chainOf = (model) => model ? [model.id, ...(model.fallbacks ?? []).map((f)
|
|
|
160
216
|
/**
|
|
161
217
|
* Customizing a tier, or making one (a dialog): its name and what it's for,
|
|
162
218
|
* then each kind of work, with the agents that do it, its model and what it
|
|
163
|
-
* falls back to (team's picker, `model.pick
|
|
164
|
-
*
|
|
219
|
+
* falls back to (team's picker, `model.pick`, offering every model the org
|
|
220
|
+
* can run, each saying how it's paid for: `members`, for an org of others,
|
|
221
|
+
* that those without a model's plan fall back to the next), and adding a
|
|
222
|
+
* kind of work of the org's own; where the app has plans, the tier's
|
|
223
|
+
* fallbacks on members' subscriptions. Saved at once (`tiers.save`): only
|
|
224
|
+
* what changed.
|
|
165
225
|
*/
|
|
166
|
-
function TierEditor({ shown, team, editing, call, onClose }) {
|
|
226
|
+
export function TierEditor({ shown, team, editing, members, call, onClose }) {
|
|
167
227
|
const tier = editing.name ? shown.tiers.find((t) => t.name === editing.name) : undefined;
|
|
168
228
|
const base = tier ?? shown.tiers.find((t) => t.name === editing.from) ?? shown.tiers[0];
|
|
169
229
|
const making = !tier;
|
|
170
230
|
const [title, setTitle] = useState(tier?.title ?? editing.title ?? "");
|
|
171
231
|
const [description, setDescription] = useState(tier?.description ?? "");
|
|
172
232
|
const [chains, setChains] = useState({});
|
|
233
|
+
const [fallbacks, setFallbacks] = useState();
|
|
173
234
|
const [busy, setBusy] = useState(false);
|
|
174
235
|
const [error, setError] = useState();
|
|
175
236
|
const [adding, setAdding] = useState();
|
|
@@ -182,6 +243,8 @@ function TierEditor({ shown, team, editing, call, onClose }) {
|
|
|
182
243
|
for (const f of k.model.fallbacks ?? [])
|
|
183
244
|
known.set(f.id, f.name);
|
|
184
245
|
}
|
|
246
|
+
for (const f of t.fallbacks ?? [])
|
|
247
|
+
known.set(f.id, f.name);
|
|
185
248
|
}
|
|
186
249
|
const nameOf = (id) => known.get(id) ?? names[id] ?? id.slice(id.indexOf("/") + 1);
|
|
187
250
|
const chainFor = (kind) => chains[kind] ?? chainOf(base?.kinds.find((k) => k.kind === kind)?.model);
|
|
@@ -201,6 +264,7 @@ function TierEditor({ shown, team, editing, call, onClose }) {
|
|
|
201
264
|
? { description: description.trim() }
|
|
202
265
|
: {}),
|
|
203
266
|
...(Object.keys(chains).length ? { kinds: chains } : {}),
|
|
267
|
+
...(fallbacks ? { fallbacks } : {}),
|
|
204
268
|
});
|
|
205
269
|
onClose();
|
|
206
270
|
}
|
|
@@ -233,51 +297,70 @@ function TierEditor({ shown, team, editing, call, onClose }) {
|
|
|
233
297
|
const who = agentsOf(kind.kind);
|
|
234
298
|
return (_jsxs("li", { className: "tiers-kind", children: [_jsxs("div", { className: "tiers-kind-head", children: [_jsx("b", { children: kind.title }), _jsx("span", { children: who.length ? who.join(", ") : say("nobodyYet") }), chains[kind.kind]
|
|
235
299
|
? _jsx(Badge, { variant: "outline", children: say("badgeChanged") })
|
|
236
|
-
: null] }), _jsx(ChainEditor, { chain: chain, nameOf: nameOf, onName: (id, name) => setNames((had) => ({ ...had, [id]: name })), onChange: (next) => set(kind.kind, next) })] }, kind.kind));
|
|
237
|
-
}) }),
|
|
300
|
+
: null] }), _jsx(ChainEditor, { chain: chain, members: members, nameOf: nameOf, onName: (id, name) => setNames((had) => ({ ...had, [id]: name })), onChange: (next) => set(kind.kind, next) })] }, kind.kind));
|
|
301
|
+
}) }), shown.org.plansFirst !== undefined
|
|
302
|
+
? (_jsxs("div", { className: "tiers-kind", children: [_jsxs("div", { className: "tiers-kind-head", children: [_jsx("b", { children: say("planFallbacks") }), fallbacks ? _jsx(Badge, { variant: "outline", children: say("badgeChanged") }) : null] }), _jsx("p", { className: "tiers-kind-about", children: say("planFallbacksAbout") }), _jsx(ModelList, { list: fallbacks ?? base?.fallbacks?.map((f) => f.id) ?? [], from: 0, none: say("noPlanFallback"), add: say("addPlanFallback"), members: members, nameOf: nameOf, onName: (id, name) => setNames((had) => ({ ...had, [id]: name })), onChange: setFallbacks })] }))
|
|
303
|
+
: null, adding
|
|
238
304
|
? (_jsxs("div", { className: "tiers-kind-new", children: [_jsx(Field, { label: say("newKind"), children: (control) => (_jsx(Input, { ...control, value: adding.title, maxLength: 40, placeholder: say("newKindPlaceholder"), autoFocus: true, onChange: (e) => setAdding({ ...adding, title: e.target.value }) })) }), _jsx(Field, { label: say("startsFrom"), children: (control) => (_jsx(Select, { ...control, value: adding.base, onChange: (e) => setAdding({ ...adding, base: e.target.value }), children: appKinds.map((k) => _jsx("option", { value: k.kind, children: k.title }, k.kind)) })) }), _jsxs("div", { className: "tiers-kind-new-end", children: [_jsx(Button, { size: "sm", variant: "ghost", onClick: () => setAdding(undefined), children: say("cancel") }), _jsx(Button, { size: "sm", variant: "secondary", disabled: !adding.title.trim() || busy, onClick: () => void addKind(), children: say("add") })] })] }))
|
|
239
305
|
: (_jsx(Button, { size: "sm", variant: "ghost", icon: "plus", onClick: () => setAdding({ title: "", base: appKinds[0]?.kind ?? "" }), children: say("addKind") }))] }) }));
|
|
240
306
|
}
|
|
307
|
+
/** A picker's hints that hand the model chosen to `onPick`, named until the page shows it. */
|
|
308
|
+
const picking = (members, onName, onPick) => ({
|
|
309
|
+
plans: members ? "members" : "mine",
|
|
310
|
+
onPick: (model) => {
|
|
311
|
+
onName(model, model.slice(model.indexOf("/") + 1));
|
|
312
|
+
onPick(model);
|
|
313
|
+
return Promise.resolve();
|
|
314
|
+
},
|
|
315
|
+
});
|
|
316
|
+
/** The most models a list holds: a chain's, or a tier's fallbacks. */
|
|
317
|
+
const MOST = 8;
|
|
318
|
+
/** A model chain, in the order it's tried: the model (team's picker), then its fallbacks. */
|
|
319
|
+
function ChainEditor({ chain, members, nameOf, onName, onChange }) {
|
|
320
|
+
const [first, ...rest] = chain;
|
|
321
|
+
return (_jsxs("div", { className: "tiers-chain", children: [_jsx(LazyView, { kind: "model.pick", item: { value: first ?? "" }, hints: picking(members, onName, (model) => onChange([model, ...rest.filter((id) => id !== model)])), fallback: _jsx(Skeleton, { height: 54 }) }), _jsx(ModelList, { list: chain, from: 1, head: say("fallbacks"), none: say("noFallback"), add: say("addFallback"), members: members, nameOf: nameOf, onName: onName, onChange: onChange })] }));
|
|
322
|
+
}
|
|
241
323
|
/**
|
|
242
|
-
* A
|
|
243
|
-
*
|
|
324
|
+
* A list's models from `from` on, in the order they're tried, each with Move
|
|
325
|
+
* up (a chain's first fallback up to the model's place: "Try it first"), Move
|
|
326
|
+
* down and Remove, and one more to add (team's picker).
|
|
244
327
|
*/
|
|
245
|
-
function
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
328
|
+
function ModelList({ list, from, head, none, add, members, nameOf, onName, onChange }) {
|
|
329
|
+
const shown = list.slice(from);
|
|
330
|
+
return (_jsxs("div", { className: "tiers-fallbacks", children: [head ? _jsx("p", { className: "tiers-fallbacks-head", children: head }) : null, shown.length
|
|
331
|
+
? (_jsx("ol", { className: "tiers-fallbacks-list", children: shown.map((id, i) => {
|
|
332
|
+
const at = from + i;
|
|
333
|
+
return (_jsxs("li", { children: [_jsxs("span", { className: "tiers-fallback-name", children: [_jsx("b", { children: nameOf(id) }), _jsx("small", { children: providerSaid(id) })] }), _jsx(Menu, { label: say("tierMore", { tier: nameOf(id) }), align: "end", items: [
|
|
334
|
+
...(at > 0
|
|
335
|
+
? [{
|
|
336
|
+
label: at === from ? say("tryFirst") : say("moveUp"),
|
|
337
|
+
onSelect: () => onChange(moved(list, at, at - 1)),
|
|
338
|
+
}]
|
|
339
|
+
: []),
|
|
340
|
+
...(at < list.length - 1
|
|
341
|
+
? [{
|
|
342
|
+
label: say("moveDown"),
|
|
343
|
+
onSelect: () => onChange(moved(list, at, at + 1)),
|
|
344
|
+
}]
|
|
345
|
+
: []),
|
|
346
|
+
{
|
|
347
|
+
label: say("remove"),
|
|
348
|
+
icon: "trash",
|
|
349
|
+
tone: "destructive",
|
|
350
|
+
onSelect: () => onChange(list.filter((_, j) => j !== at)),
|
|
351
|
+
},
|
|
352
|
+
] })] }, `${id}:${at}`));
|
|
353
|
+
}) }))
|
|
354
|
+
: _jsx("p", { className: "tiers-fallbacks-none", children: none }), _jsx(LazyView, { kind: "model.pick", item: { value: "" }, hints: {
|
|
355
|
+
...picking(members, onName, (model) => onChange([
|
|
356
|
+
...list.slice(0, from),
|
|
357
|
+
...shown.filter((id) => id !== model),
|
|
358
|
+
model,
|
|
359
|
+
])),
|
|
360
|
+
look: "link",
|
|
361
|
+
label: add,
|
|
362
|
+
disabled: list.length >= MOST,
|
|
363
|
+
}, fallback: null })] }));
|
|
281
364
|
}
|
|
282
365
|
/** What a model falls back to, each name once: "GPT-6 Luna, Claude Haiku 5.5". */
|
|
283
366
|
export function thenSaid(model) {
|
package/tiers/views/web/say.d.ts
CHANGED
|
@@ -39,14 +39,22 @@ export declare const tiers: {
|
|
|
39
39
|
undo: string;
|
|
40
40
|
onlyRunners: string;
|
|
41
41
|
onlyRunnersHere: string;
|
|
42
|
+
onlyRunnersFixed: string;
|
|
42
43
|
tiersLabel: string;
|
|
43
44
|
newTier: string;
|
|
44
45
|
newTierAbout: string;
|
|
45
46
|
takenAway: string;
|
|
46
47
|
addBackTier: string;
|
|
47
48
|
capLabel: string;
|
|
48
|
-
|
|
49
|
+
capAll: string;
|
|
50
|
+
capUpTo: string;
|
|
51
|
+
capDefault: string;
|
|
49
52
|
capNote: string;
|
|
53
|
+
capDefaultNote: string;
|
|
54
|
+
plansFirstLabel: string;
|
|
55
|
+
plansFirstOff: string;
|
|
56
|
+
plansFirstOn: string;
|
|
57
|
+
plansFirstWarning: string;
|
|
50
58
|
noCredits: string;
|
|
51
59
|
noCreditsMore: string;
|
|
52
60
|
billing: string;
|
|
@@ -60,6 +68,8 @@ export declare const tiers: {
|
|
|
60
68
|
tierMore: string;
|
|
61
69
|
customize: string;
|
|
62
70
|
duplicate: string;
|
|
71
|
+
moveBefore: string;
|
|
72
|
+
moveAfter: string;
|
|
63
73
|
copyOf: string;
|
|
64
74
|
backToOriginal: string;
|
|
65
75
|
deleteTier: string;
|
|
@@ -91,11 +101,16 @@ export declare const tiers: {
|
|
|
91
101
|
add: string;
|
|
92
102
|
addKind: string;
|
|
93
103
|
fallbacks: string;
|
|
104
|
+
tryFirst: string;
|
|
94
105
|
moveUp: string;
|
|
95
106
|
moveDown: string;
|
|
96
107
|
remove: string;
|
|
97
108
|
noFallback: string;
|
|
98
109
|
addFallback: string;
|
|
110
|
+
planFallbacks: string;
|
|
111
|
+
planFallbacksAbout: string;
|
|
112
|
+
noPlanFallback: string;
|
|
113
|
+
addPlanFallback: string;
|
|
99
114
|
teamTitle: string;
|
|
100
115
|
teamAbout: string;
|
|
101
116
|
teamAboutMine: string;
|
|
@@ -134,6 +149,6 @@ export declare const tiers: {
|
|
|
134
149
|
newChatsOn: string;
|
|
135
150
|
newChatsDefault: string;
|
|
136
151
|
};
|
|
137
|
-
export declare const say: import("pairz/web/words").Say<"
|
|
152
|
+
export declare const say: import("pairz/web/words").Say<"add" | "remove" | "name" | "then" | "cancel" | "edit" | "namePlaceholder" | "undo" | "save" | "billing" | "fallbacks" | "planFallbacks" | "budget" | "perMessage" | "perReply" | "messages" | "replies" | "creditsOnce" | "creditsSeat" | "creditsMonth" | "underTenth" | "effortNone" | "effortMinimal" | "effortLow" | "effortMedium" | "effortHigh" | "effortXhigh" | "effortMax" | "effortOther" | "providerChatgpt" | "byThread" | "byPerson" | "bySpace" | "byOrg" | "byPlan" | "emptyTitle" | "emptyBody" | "nowOrg" | "nowPlan" | "nowMore" | "backToPlan" | "doneSaid" | "onlyRunners" | "onlyRunnersHere" | "onlyRunnersFixed" | "tiersLabel" | "newTier" | "newTierAbout" | "takenAway" | "addBackTier" | "capLabel" | "capAll" | "capUpTo" | "capDefault" | "capNote" | "capDefaultNote" | "plansFirstLabel" | "plansFirstOff" | "plansFirstOn" | "plansFirstWarning" | "noCredits" | "noCreditsMore" | "faster" | "fasterGoes" | "changeAnyTime" | "footMessage" | "footReply" | "footPrices" | "tierMore" | "customize" | "duplicate" | "moveBefore" | "moveAfter" | "copyOf" | "backToOriginal" | "deleteTier" | "takeAway" | "badgeDefault" | "badgePlan" | "badgeYours" | "badgeChanged" | "pricedEach" | "tierModels" | "defaultForNew" | "makeDefault" | "newTierTitle" | "customizeTitle" | "newTierStarts" | "customizeAbout" | "createTier" | "forLabel" | "forPlaceholder" | "nobodyYet" | "newKind" | "newKindPlaceholder" | "startsFrom" | "addKind" | "tryFirst" | "moveUp" | "moveDown" | "noFallback" | "addFallback" | "planFallbacksAbout" | "noPlanFallback" | "addPlanFallback" | "teamTitle" | "teamAbout" | "teamAboutMine" | "addAgent" | "removeFromTeam" | "badgeOrgs" | "onTier" | "notOnTeam" | "addBack" | "addAgentTitle" | "addAgentAbout" | "addAgentAboutMine" | "removeTitle" | "removeSaid" | "removeSaidMine" | "removeDeletes" | "removeBack" | "recommended" | "ownersChoose" | "spaceStartsOn" | "spaceChosen" | "spaceAsOrg" | "spaceSwitch" | "spaceManagers" | "spaceSelect" | "asOrg" | "agentLine" | "onPlans" | "pickLabel" | "pickCap" | "backToDefault" | "backToOrgDefault" | "chatRunsOn" | "chatRunsDefault" | "newChatsOn" | "newChatsDefault">;
|
|
138
153
|
/** Every word of tiers' front end, by area (team's WORDS.md lists them). */
|
|
139
154
|
export declare const PHRASES: Record<string, Record<string, Phrase>>;
|
package/tiers/views/web/say.js
CHANGED
|
@@ -37,14 +37,22 @@ export const tiers = {
|
|
|
37
37
|
undo: "Undo",
|
|
38
38
|
onlyRunners: "Only {org}'s owners and admins change these. You can switch a chat's tier as you write.",
|
|
39
39
|
onlyRunnersHere: "Only the org's owners and admins change these. You can switch a chat's tier as you write.",
|
|
40
|
+
onlyRunnersFixed: "Only the org's owners and admins change these, and every chat runs on the default.",
|
|
40
41
|
tiersLabel: "Tiers",
|
|
41
42
|
newTier: "New tier",
|
|
42
43
|
newTierAbout: "Mix models your way: one for deciding, another for checking.",
|
|
43
44
|
takenAway: "Taken away:",
|
|
44
45
|
addBackTier: "Add back {tier}",
|
|
45
|
-
capLabel: "Members can
|
|
46
|
-
|
|
46
|
+
capLabel: "Members can use",
|
|
47
|
+
capAll: "All tiers",
|
|
48
|
+
capUpTo: "Up to {tier}",
|
|
49
|
+
capDefault: "Only the default",
|
|
47
50
|
capNote: "Owners and admins can always use any of them.",
|
|
51
|
+
capDefaultNote: "Every chat runs on the default: nobody switches a chat's or a space's tier.",
|
|
52
|
+
plansFirstLabel: "Use members' subscriptions whenever possible",
|
|
53
|
+
plansFirstOff: "Off: each agent tries its models in the tier's order, on a member's subscription where one runs it, else on credits.",
|
|
54
|
+
plansFirstOn: "On: any of an agent's models a member's subscription runs comes before credits, then the tier's fallbacks on their subscriptions.",
|
|
55
|
+
plansFirstWarning: "Agents may end up on the same model and lose what makes them complementary: one that checks the others' work, for example, does it best on another maker's model.",
|
|
48
56
|
noCredits: "{plan} gives this org no credits.",
|
|
49
57
|
noCreditsMore: "Choose a plan or add credits for your agents to start working.",
|
|
50
58
|
billing: "Billing",
|
|
@@ -59,6 +67,8 @@ export const tiers = {
|
|
|
59
67
|
tierMore: "{tier}: more",
|
|
60
68
|
customize: "Customize…",
|
|
61
69
|
duplicate: "Duplicate…",
|
|
70
|
+
moveBefore: "Move before {tier}",
|
|
71
|
+
moveAfter: "Move after {tier}",
|
|
62
72
|
copyOf: "{tier} copy",
|
|
63
73
|
backToOriginal: "Back to the original",
|
|
64
74
|
deleteTier: "Delete",
|
|
@@ -91,11 +101,16 @@ export const tiers = {
|
|
|
91
101
|
add: "Add",
|
|
92
102
|
addKind: "Add a kind of work",
|
|
93
103
|
fallbacks: "If it fails, then",
|
|
104
|
+
tryFirst: "Try it first",
|
|
94
105
|
moveUp: "Move up",
|
|
95
106
|
moveDown: "Move down",
|
|
96
107
|
remove: "Remove",
|
|
97
108
|
noFallback: "Nothing: if it fails, the reply fails.",
|
|
98
109
|
addFallback: "Add a fallback",
|
|
110
|
+
planFallbacks: "When a member's subscriptions run none of these",
|
|
111
|
+
planFallbacksAbout: "Tried after any agent's models, on members' subscriptions only, never on credits, while subscriptions are used whenever possible. One model per maker covers every subscription.",
|
|
112
|
+
noPlanFallback: "None: the agent's own models on credits.",
|
|
113
|
+
addPlanFallback: "Add a model",
|
|
99
114
|
// The team
|
|
100
115
|
teamTitle: "Your team",
|
|
101
116
|
teamAbout: "Every space in {org} starts with these agents. Each does a kind of work, and the tier gives it its model.",
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* - Above its agents (kind `tiers.space`, item `{ _id }`, the space): the
|
|
5
5
|
* tier new chats here start on, and for its managers a choice of every
|
|
6
6
|
* tier, each with what a typical message comes to, or the org's default
|
|
7
|
-
* again. Anyone still switches a chat's own as they write
|
|
7
|
+
* again. Anyone still switches a chat's own as they write; where the org
|
|
8
|
+
* uses only its default, nobody does, and there's nothing to choose.
|
|
8
9
|
* - On each agent (kind `tiers.agent`, item `{ _id }`, the agent): its model
|
|
9
10
|
* here, its kind of work and the tier ("Claude Haiku 5.5 · Checks · on
|
|
10
11
|
* Everyday"). Models are the tiers', by kind of work: none is picked here.
|
package/tiers/views/web/space.js
CHANGED
|
@@ -5,7 +5,8 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
5
5
|
* - Above its agents (kind `tiers.space`, item `{ _id }`, the space): the
|
|
6
6
|
* tier new chats here start on, and for its managers a choice of every
|
|
7
7
|
* tier, each with what a typical message comes to, or the org's default
|
|
8
|
-
* again. Anyone still switches a chat's own as they write
|
|
8
|
+
* again. Anyone still switches a chat's own as they write; where the org
|
|
9
|
+
* uses only its default, nobody does, and there's nothing to choose.
|
|
9
10
|
* - On each agent (kind `tiers.agent`, item `{ _id }`, the agent): its model
|
|
10
11
|
* here, its kind of work and the tier ("Claude Haiku 5.5 · Checks · on
|
|
11
12
|
* Everyday"). Models are the tiers', by kind of work: none is picked here.
|
|
@@ -32,8 +33,9 @@ export function SpaceTier({ shown, space, manage, call }) {
|
|
|
32
33
|
const [error, setError] = useState();
|
|
33
34
|
const title = (name) => shown.tiers.find((t) => t.name === name)?.title;
|
|
34
35
|
const above = shown.org.tier ?? shown.plan ?? shown.tiers[0]?.name;
|
|
35
|
-
const
|
|
36
|
-
const
|
|
36
|
+
const fixed = shown.org.fixed;
|
|
37
|
+
const here = fixed ? above : shown.space?.tier ?? above;
|
|
38
|
+
const said = shown.space?.tier && !fixed
|
|
37
39
|
? say("spaceChosen", { tier: title(above) ?? "" })
|
|
38
40
|
: say("spaceAsOrg");
|
|
39
41
|
const choose = async (tier) => {
|
|
@@ -49,7 +51,9 @@ export function SpaceTier({ shown, space, manage, call }) {
|
|
|
49
51
|
setBusy(false);
|
|
50
52
|
}
|
|
51
53
|
};
|
|
52
|
-
return (_jsxs("div", { className: "tiers-space", "aria-busy": busy || undefined, children: [_jsx("span", { className: "tiers-space-mark", "aria-hidden": "true", children: _jsx(Icon, { name: "sparkles", size: 16 }) }), _jsxs("div", { className: "tiers-space-text", children: [_jsx("b", { children: say("spaceStartsOn", { tier: title(here) ?? "" }) }),
|
|
54
|
+
return (_jsxs("div", { className: "tiers-space", "aria-busy": busy || undefined, children: [_jsx("span", { className: "tiers-space-mark", "aria-hidden": "true", children: _jsx(Icon, { name: "sparkles", size: 16 }) }), _jsxs("div", { className: "tiers-space-text", children: [_jsx("b", { children: say("spaceStartsOn", { tier: title(here) ?? "" }) }), _jsx("span", { children: fixed
|
|
55
|
+
? _jsxs(_Fragment, { children: [said, " ", say("capDefaultNote")] })
|
|
56
|
+
: _jsxs(_Fragment, { children: [said, " ", say("spaceSwitch"), " ", manage ? "" : say("spaceManagers")] }) })] }), manage && !fixed
|
|
53
57
|
? (_jsxs(Select, { size: "sm", "aria-label": say("spaceSelect"), value: shown.space?.tier ?? "", disabled: busy, onChange: (event) => void choose(event.target.value), children: [_jsx("option", { value: "", children: say("asOrg", { tier: title(above) ?? "" }) }), shown.tiers.map((tier) => {
|
|
54
58
|
const price = perReply(tier.price);
|
|
55
59
|
return (_jsxs("option", { value: tier.name, children: [tier.title, price ? ` · ${price} ${unitSaid(shown.per)}` : ""] }, tier.name));
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* agent's model in rows, the line a space's agents get, and the space's own
|
|
5
5
|
* choice above them. Only layout: the pieces are the toolkit's.
|
|
6
6
|
*/
|
|
7
|
-
export declare const STYLE = "\n.tiers { container: tiers / inline-size; display: grid; gap: 16px; min-width: 0; }\n.tiers-now { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }\n.tiers-now p { margin: 0; color: var(--secondary-foreground); font-size: 14.5px; line-height: 1.5; }\n.tiers-now b { color: var(--foreground); font-weight: 650; }\n.tiers-now .pairz-button { flex: none; }\n\n/* The tiers, as cards */\n.tiers-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(214px, 1fr)); gap: 12px; margin: 0; padding: 0;\n list-style: none; }\n.tier-card { display: grid; grid-template-rows: auto auto auto auto 1fr auto; gap: 10px; min-width: 0; padding: 16px 16px 14px;\n transition: border-color .15s, outline-color .15s; }\n.tier-card[data-current] { border-color: var(--ring); outline: 1px solid var(--ring); outline-offset: -2px; }\n.tier-card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; min-height: 22px; }\n.tier-card h3 { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 660; letter-spacing: -.012em; }\n.tier-card-top .pairz-badge { gap: 4px; }\n.tier-card-for { margin: -4px 0 0; color: var(--secondary-foreground); font-size: 13.5px; line-height: 1.45; }\n.tier-card-price { display: flex; align-items: baseline; gap: 6px; margin: 0; color: var(--muted-foreground); font-size: 12.5px; }\n.tier-card-price b { color: var(--foreground); font-family: var(--font-display); font-size: 21px; font-weight: 660;\n letter-spacing: -.015em; font-variant-numeric: tabular-nums; }\n.tier-card-goes { margin: -6px 0 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.4; }\n.tier-card-goes:empty { margin-top: -10px; }\n.tier-card-agents { display: grid; align-content: start; gap: 7px; margin: 0; padding: 10px 0 2px; border-top: 1px solid var(--border);\n list-style: none; }\n.tier-card-agents li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 13px;\n line-height: 1.35; }\n.tier-who { display: flex; align-items: baseline; gap: 5px; min-width: 0; overflow: hidden; color: var(--muted-foreground);\n white-space: nowrap; text-overflow: ellipsis; }\n.tier-model { display: grid; min-width: 0; color: var(--foreground); font-weight: 560; overflow-wrap: anywhere; }\n.tier-model small { color: var(--muted-foreground); font-size: 12px; font-weight: 450; }\n.tier-card-end { display: grid; margin-top: 2px; }\n.tier-card-using { display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; margin: 0;\n border-radius: var(--radius-md); background: var(--primary-soft); color: var(--primary-text); font-size: 13.5px; font-weight: 600; }\n\n.tier-card-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }\n.tier-card-badges .pairz-badge { gap: 4px; }\n.tier-model small { display: block; }\n.tier-new { display: grid; min-height: 160px; }\n.tier-new-button { display: grid; place-content: center; justify-items: center; gap: 6px; padding: 18px; border: 1.5px dashed var(--border);\n border-radius: var(--radius-xl); background: transparent; color: var(--muted-foreground); font: inherit; text-align: center;\n cursor: pointer; transition: border-color .12s, color .12s; }\n.tier-new-button:hover, .tier-new-button:focus-visible { border-color: var(--ring); color: var(--foreground); }\n.tier-new-button b { color: var(--foreground); font-size: 15px; font-weight: 650; }\n.tier-new-button span { max-width: 22ch; font-size: 12.5px; line-height: 1.45; }\n.tiers-removed { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: -4px 0 0; color: var(--muted-foreground);\n font-size: 13px; }\n.tiers-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--secondary-foreground); font-size: 13.5px; }\n.tiers-cap > .pairz-select { width: auto; min-width: 160px; }\n.tiers-cap span { color: var(--muted-foreground); font-size: 12.5px; }\n\n/* Customizing a tier */\n.tiers-editor { display: grid; gap: 16px; min-width: 0; }\n.tiers-editor-names { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; }\n.tiers-editor-error { margin-inline-end: auto; align-self: center; color: var(--destructive-text, var(--destructive)); font-size: 13px; }\n.tiers-kinds { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }\n.tiers-kind { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); }\n.tiers-kind-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }\n.tiers-kind-head b { font-size: 14.5px; font-weight: 650; }\n.tiers-kind-head span { color: var(--muted-foreground); font-size: 12.5px; }\n.tiers-chain { display: grid; gap: 6px; min-width: 0; }\n.tiers-kind-new { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; padding: 12px 14px;\n border: 1px dashed var(--border); border-radius: var(--radius-lg); }\n.tiers-kind-new-end { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 6px; }\n@container tiers (max-width: 520px) {\n .tiers-editor-names, .tiers-kind-new { grid-template-columns: minmax(0, 1fr); }\n}\n\n/* Beside the send button */\n.tiers-pick { display: inline-flex; flex: 0 1 auto; min-width: 0; max-width: 100%; }\n.tiers-pick .pairz-button { min-width: 0; max-width: 100%; color: var(--muted-foreground); font-weight: 550; }\n.tiers-pick .pairz-button > svg, .tiers-pick .pairz-button > .pairz-icon { flex: none; }\n/* Never wider than the row leaves it: the name shortens with an ellipsis, the send button stays. */\n.tiers-pick-text { display: flex; min-width: 0; overflow: hidden; }\n.tiers-pick-name, .tiers-pick-price { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.tiers-pick-name { flex: 0 1 auto; min-width: 2ch; }\n.tiers-pick-price { flex: 0 100 auto; min-width: 0; }\n/* A narrow composer (a phone, a side panel), by its own width (chat's `chat-box` container): the name only. */\n@container chat-box (max-width: 520px) {\n .tiers-pick-price { display: none; }\n}\n.tiers-remove-said { margin: 0; color: var(--secondary-foreground); font-size: 14px; line-height: 1.5; }\n.tiers-row-kind { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: var(--radius-full);\n background: var(--muted); color: var(--secondary-foreground); font-size: 11.5px; font-weight: 600; }\n\n/* Each agent's model */\n.tiers-agents { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 16px 18px 8px; }\n.tiers-agents-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; }\n.tiers-agents-head h3 { margin: 0; font-size: 15px; font-weight: 650; }\n.tiers-agents-head p { margin: 3px 0 0; color: var(--muted-foreground); font-size: 13px; line-height: 1.45; }\n.tiers-agents-actions { display: flex; flex-wrap: wrap; gap: 6px; }\n.tiers-rows { display: grid; margin: 6px 0 0; padding: 0; list-style: none; }\n.tiers-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 11px 0; }\n.tiers-row + .tiers-row { border-top: 1px solid var(--border); }\n.tiers-row-text { display: grid; gap: 2px; min-width: 0; }\n.tiers-row-name { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 0; font-size: 14px; font-weight: 620; }\n.tiers-row-handle { color: var(--muted-foreground); font-family: var(--font-mono); font-size: 12px; font-weight: 450; }\n.tiers-row-about { margin: 0; overflow: hidden; color: var(--muted-foreground); font-size: 13px; line-height: 1.45;\n text-overflow: ellipsis; white-space: nowrap; }\n.tiers-row-end { display: flex; align-items: center; gap: 6px; }\n.tiers-off { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 4px 0 8px; padding-top: 12px; border-top: 1px solid var(--border); }\n.tiers-off h4 { margin: 0; color: var(--muted-foreground); font-size: 12px; font-weight: 650; letter-spacing: .05em;\n text-transform: uppercase; }\n.tiers-off-row { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--secondary-foreground); font-size: 13.5px; }\n.tiers-off-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.tiers-row-model { margin: 0; color: var(--secondary-foreground); font-size: 13px; line-height: 1.45; }\n.tiers-row-model b { color: var(--foreground); font-weight: 600; }\n.tiers-row-from[data-picked] { color: var(--primary-text); }\n.tiers-row-price { color: var(--muted-foreground); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }\n.tiers-row[data-editing] { grid-template-columns: 32px minmax(0, 1fr) auto; align-items: start; }\n.tiers-row[data-editing] > .pairz-avatar { margin-top: 2px; }\n.tiers-row-pick { display: grid; gap: 6px; min-width: 0; }\n.tiers-row-under { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; color: var(--muted-foreground); font-size: 12.5px; }\n.tiers-back { height: auto; padding: 0; font-size: 12.5px; }\n.tiers-row-then { margin: 1px 0 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }\n.tiers-fallbacks { display: grid; gap: 4px; margin-top: 6px; padding: 8px 10px; border: 1px dashed var(--border);\n border-radius: var(--radius-md); }\n.tiers-fallbacks-head { margin: 0; color: var(--secondary-foreground); font-size: 12.5px; font-weight: 600; }\n.tiers-fallbacks-head span { color: var(--muted-foreground); font-weight: 450; }\n.tiers-fallbacks-list { display: grid; gap: 2px; margin: 0; padding: 0 0 0 18px; font-size: 13px; }\n.tiers-fallbacks-list li { padding-left: 2px; }\n.tiers-fallback-name { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; margin-right: 4px; }\n.tiers-fallback-name b { font-weight: 600; }\n.tiers-fallback-name small { color: var(--muted-foreground); font-size: 12px; }\n.tiers-fallbacks-none { margin: 0; color: var(--muted-foreground); font-size: 12.5px; }\n\n.tiers-foot { display: flex; align-items: flex-start; gap: 7px; margin: 0 2px; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.5; }\n.tiers-foot .pairz-icon { flex: none; margin-top: 2px; }\n.tiers-foot a { color: var(--primary-text); text-underline-offset: 3px; }\n\n/* Choosing a tier when the org is new: one choice, a row each */\n.tiers-setup { container: tiers-setup / inline-size; display: grid; gap: 12px; min-width: 0; }\n.tiers-options { display: grid; gap: 8px; }\n.tiers-option { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: start; gap: 12px; width: 100%;\n padding: 13px 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card);\n color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .12s, background-color .12s; }\n.tiers-option:hover { border-color: var(--ring); }\n.tiers-option:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }\n.tiers-option[data-checked] { border-color: var(--ring); outline: 1px solid var(--ring); outline-offset: -2px;\n background: color-mix(in oklab, var(--primary-soft) 40%, var(--card)); }\n.tiers-option[aria-disabled] { cursor: default; }\n.tiers-option-mark { display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid var(--input);\n border-radius: var(--radius-full); color: var(--primary-foreground); }\n.tiers-option[data-checked] .tiers-option-mark { border-color: var(--primary); background: var(--primary); }\n.tiers-option[aria-busy] .tiers-option-mark { border-color: transparent; color: var(--primary-text); }\n.tiers-option-text { display: grid; gap: 3px; min-width: 0; }\n.tiers-option-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-family: var(--font-display);\n font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }\n.tiers-option-for { color: var(--secondary-foreground); font-size: 13.5px; line-height: 1.45; }\n.tiers-option-goes { color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }\n.tiers-option-price { display: grid; justify-items: end; gap: 1px; min-width: 76px; color: var(--muted-foreground); font-size: 12px;\n white-space: nowrap; }\n.tiers-option-price b { color: var(--foreground); font-family: var(--font-display); font-size: 19px; font-weight: 660;\n letter-spacing: -.015em; font-variant-numeric: tabular-nums; }\n.tiers-option-meter { display: block; width: 64px; height: 4px; margin-top: 6px; border-radius: var(--radius-full);\n background: var(--muted); overflow: hidden; }\n.tiers-option-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }\n@container tiers-setup (max-width: 420px) {\n .tiers-option { grid-template-columns: 22px minmax(0, 1fr); }\n .tiers-option-price { grid-column: 2; justify-items: start; }\n}\n\n/* A space's agents: its choice, and each one's line */\n.tiers-space { container: tiers-space / inline-size; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;\n padding: 12px 12px 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); }\n.tiers-space-mark { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-md);\n background: var(--primary-soft); color: var(--primary-text); }\n.tiers-space-text { flex: 1 1 200px; display: grid; gap: 1px; min-width: 0; }\n.tiers-space-text b { font-size: 14px; font-weight: 620; }\n.tiers-space-text span { color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }\n.tiers-space > .pairz-select { flex: 1 1 210px; max-width: 280px; }\n.tiers-space-error { flex-basis: 100%; margin: 0; color: var(--destructive-text, var(--destructive)); font-size: 12.5px; }\n.tiers-line { min-width: 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }\n.tiers-line b { color: var(--secondary-foreground); font-weight: 600; }\n.tiers-line[data-picked] .tiers-line-from { color: var(--primary-text); }\n\n@container tiers-space (max-width: 480px) {\n .tiers-space > .pairz-select { flex-basis: 100%; max-width: none; }\n}\n@container tiers (max-width: 520px) {\n .tiers-agents { padding: 14px 14px 6px; }\n .tiers-row { grid-template-columns: 32px minmax(0, 1fr); align-items: start; }\n .tiers-row > .pairz-avatar { margin-top: 2px; }\n .tiers-row-price { grid-column: 2; }\n}\n";
|
|
7
|
+
export declare const STYLE = "\n.tiers { container: tiers / inline-size; display: grid; gap: 16px; min-width: 0; }\n.tiers-now { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }\n.tiers-now p { margin: 0; color: var(--secondary-foreground); font-size: 14.5px; line-height: 1.5; }\n.tiers-now b { color: var(--foreground); font-weight: 650; }\n.tiers-now .pairz-button { flex: none; }\n\n/* The tiers, as cards */\n.tiers-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(214px, 1fr)); gap: 12px; margin: 0; padding: 0;\n list-style: none; }\n.tier-card { display: grid; grid-template-rows: auto auto auto auto 1fr auto; gap: 10px; min-width: 0; padding: 16px 16px 14px;\n transition: border-color .15s, outline-color .15s; }\n.tier-card[data-current] { border-color: var(--ring); outline: 1px solid var(--ring); outline-offset: -2px; }\n.tier-card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; min-height: 22px; }\n.tier-card h3 { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 660; letter-spacing: -.012em; }\n.tier-card-top .pairz-badge { gap: 4px; }\n.tier-card-for { margin: -4px 0 0; color: var(--secondary-foreground); font-size: 13.5px; line-height: 1.45; }\n.tier-card-price { display: flex; align-items: baseline; gap: 6px; margin: 0; color: var(--muted-foreground); font-size: 12.5px; }\n.tier-card-price b { color: var(--foreground); font-family: var(--font-display); font-size: 21px; font-weight: 660;\n letter-spacing: -.015em; font-variant-numeric: tabular-nums; }\n.tier-card-goes { margin: -6px 0 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.4; }\n.tier-card-goes:empty { margin-top: -10px; }\n.tier-card-agents { display: grid; align-content: start; gap: 7px; margin: 0; padding: 10px 0 2px; border-top: 1px solid var(--border);\n list-style: none; }\n.tier-card-agents li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 13px;\n line-height: 1.35; }\n.tier-who { display: flex; align-items: baseline; gap: 5px; min-width: 0; overflow: hidden; color: var(--muted-foreground);\n white-space: nowrap; text-overflow: ellipsis; }\n.tier-model { display: grid; min-width: 0; color: var(--foreground); font-weight: 560; overflow-wrap: anywhere; }\n.tier-model small { color: var(--muted-foreground); font-size: 12px; font-weight: 450; }\n.tier-card-end { display: grid; margin-top: 2px; }\n.tier-card-using { display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; margin: 0;\n border-radius: var(--radius-md); background: var(--primary-soft); color: var(--primary-text); font-size: 13.5px; font-weight: 600; }\n\n.tier-card-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }\n.tier-card-badges .pairz-badge { gap: 4px; }\n.tier-model small { display: block; }\n.tier-new { display: grid; min-height: 160px; }\n.tier-new-button { display: grid; place-content: center; justify-items: center; gap: 6px; padding: 18px; border: 1.5px dashed var(--border);\n border-radius: var(--radius-xl); background: transparent; color: var(--muted-foreground); font: inherit; text-align: center;\n cursor: pointer; transition: border-color .12s, color .12s; }\n.tier-new-button:hover, .tier-new-button:focus-visible { border-color: var(--ring); color: var(--foreground); }\n.tier-new-button b { color: var(--foreground); font-size: 15px; font-weight: 650; }\n.tier-new-button span { max-width: 22ch; font-size: 12.5px; line-height: 1.45; }\n.tiers-removed { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: -4px 0 0; color: var(--muted-foreground);\n font-size: 13px; }\n.tiers-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--secondary-foreground); font-size: 13.5px; }\n.tiers-cap > .pairz-select { width: auto; min-width: 160px; }\n.tiers-cap span { color: var(--muted-foreground); font-size: 12.5px; }\n.tiers-plans { display: grid; justify-items: start; gap: 6px; color: var(--secondary-foreground); font-size: 13.5px; }\n.tiers-plans > span { color: var(--muted-foreground); font-size: 12.5px; }\n\n/* Customizing a tier */\n.tiers-editor { display: grid; gap: 16px; min-width: 0; }\n.tiers-editor-names { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; }\n.tiers-editor-error { margin-inline-end: auto; align-self: center; color: var(--destructive-text, var(--destructive)); font-size: 13px; }\n.tiers-kinds { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }\n.tiers-kind { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); }\n.tiers-kind-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }\n.tiers-kind-head b { font-size: 14.5px; font-weight: 650; }\n.tiers-kind-head span { color: var(--muted-foreground); font-size: 12.5px; }\n.tiers-kind-about { margin: 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }\n.tiers-chain { display: grid; gap: 6px; min-width: 0; }\n.tiers-kind-new { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; padding: 12px 14px;\n border: 1px dashed var(--border); border-radius: var(--radius-lg); }\n.tiers-kind-new-end { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 6px; }\n@container tiers (max-width: 520px) {\n .tiers-editor-names, .tiers-kind-new { grid-template-columns: minmax(0, 1fr); }\n}\n\n/* Beside the send button */\n.tiers-pick { display: inline-flex; flex: 0 1 auto; min-width: 0; max-width: 100%; }\n.tiers-pick .pairz-button { min-width: 0; max-width: 100%; color: var(--muted-foreground); font-weight: 550; }\n.tiers-pick .pairz-button > svg, .tiers-pick .pairz-button > .pairz-icon { flex: none; }\n/* Never wider than the row leaves it: the name shortens with an ellipsis, the send button stays. */\n.tiers-pick-text { display: flex; min-width: 0; overflow: hidden; }\n.tiers-pick-name, .tiers-pick-price { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.tiers-pick-name { flex: 0 1 auto; min-width: 2ch; }\n.tiers-pick-price { flex: 0 100 auto; min-width: 0; }\n/* Only the default: said, not a button. */\n.tiers-pick[data-fixed] { align-items: center; padding: 0 8px; color: var(--muted-foreground); font-size: 13px; font-weight: 550; }\n/* A narrow composer (a phone, a side panel), by its own width (chat's `chat-box` container): the name only. */\n@container chat-box (max-width: 520px) {\n .tiers-pick-price { display: none; }\n}\n.tiers-remove-said { margin: 0; color: var(--secondary-foreground); font-size: 14px; line-height: 1.5; }\n.tiers-row-kind { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: var(--radius-full);\n background: var(--muted); color: var(--secondary-foreground); font-size: 11.5px; font-weight: 600; }\n\n/* Each agent's model */\n.tiers-agents { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 16px 18px 8px; }\n.tiers-agents-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; }\n.tiers-agents-head h3 { margin: 0; font-size: 15px; font-weight: 650; }\n.tiers-agents-head p { margin: 3px 0 0; color: var(--muted-foreground); font-size: 13px; line-height: 1.45; }\n.tiers-agents-actions { display: flex; flex-wrap: wrap; gap: 6px; }\n.tiers-rows { display: grid; margin: 6px 0 0; padding: 0; list-style: none; }\n.tiers-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 11px 0; }\n.tiers-row + .tiers-row { border-top: 1px solid var(--border); }\n.tiers-row-text { display: grid; gap: 2px; min-width: 0; }\n.tiers-row-name { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 0; font-size: 14px; font-weight: 620; }\n.tiers-row-handle { color: var(--muted-foreground); font-family: var(--font-mono); font-size: 12px; font-weight: 450; }\n.tiers-row-about { margin: 0; overflow: hidden; color: var(--muted-foreground); font-size: 13px; line-height: 1.45;\n text-overflow: ellipsis; white-space: nowrap; }\n.tiers-row-end { display: flex; align-items: center; gap: 6px; }\n.tiers-off { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 4px 0 8px; padding-top: 12px; border-top: 1px solid var(--border); }\n.tiers-off h4 { margin: 0; color: var(--muted-foreground); font-size: 12px; font-weight: 650; letter-spacing: .05em;\n text-transform: uppercase; }\n.tiers-off-row { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--secondary-foreground); font-size: 13.5px; }\n.tiers-off-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.tiers-row-model { margin: 0; color: var(--secondary-foreground); font-size: 13px; line-height: 1.45; }\n.tiers-row-model b { color: var(--foreground); font-weight: 600; }\n.tiers-row-from[data-picked] { color: var(--primary-text); }\n.tiers-row-price { color: var(--muted-foreground); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }\n.tiers-row[data-editing] { grid-template-columns: 32px minmax(0, 1fr) auto; align-items: start; }\n.tiers-row[data-editing] > .pairz-avatar { margin-top: 2px; }\n.tiers-row-pick { display: grid; gap: 6px; min-width: 0; }\n.tiers-row-under { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; color: var(--muted-foreground); font-size: 12.5px; }\n.tiers-back { height: auto; padding: 0; font-size: 12.5px; }\n.tiers-row-then { margin: 1px 0 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }\n.tiers-fallbacks { display: grid; gap: 4px; margin-top: 6px; padding: 8px 10px; border: 1px dashed var(--border);\n border-radius: var(--radius-md); }\n.tiers-fallbacks-head { margin: 0; color: var(--secondary-foreground); font-size: 12.5px; font-weight: 600; }\n.tiers-fallbacks-head span { color: var(--muted-foreground); font-weight: 450; }\n.tiers-fallbacks-list { display: grid; gap: 2px; margin: 0; padding: 0 0 0 18px; font-size: 13px; }\n.tiers-fallbacks-list li { padding-left: 2px; }\n.tiers-fallback-name { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; margin-right: 4px; }\n.tiers-fallback-name b { font-weight: 600; }\n.tiers-fallback-name small { color: var(--muted-foreground); font-size: 12px; }\n.tiers-fallbacks-none { margin: 0; color: var(--muted-foreground); font-size: 12.5px; }\n\n.tiers-foot { display: flex; align-items: flex-start; gap: 7px; margin: 0 2px; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.5; }\n.tiers-foot .pairz-icon { flex: none; margin-top: 2px; }\n.tiers-foot a { color: var(--primary-text); text-underline-offset: 3px; }\n\n/* Choosing a tier when the org is new: one choice, a row each */\n.tiers-setup { container: tiers-setup / inline-size; display: grid; gap: 12px; min-width: 0; }\n.tiers-options { display: grid; gap: 8px; }\n.tiers-option { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: start; gap: 12px; width: 100%;\n padding: 13px 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card);\n color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .12s, background-color .12s; }\n.tiers-option:hover { border-color: var(--ring); }\n.tiers-option:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }\n.tiers-option[data-checked] { border-color: var(--ring); outline: 1px solid var(--ring); outline-offset: -2px;\n background: color-mix(in oklab, var(--primary-soft) 40%, var(--card)); }\n.tiers-option[aria-disabled] { cursor: default; }\n.tiers-option-mark { display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid var(--input);\n border-radius: var(--radius-full); color: var(--primary-foreground); }\n.tiers-option[data-checked] .tiers-option-mark { border-color: var(--primary); background: var(--primary); }\n.tiers-option[aria-busy] .tiers-option-mark { border-color: transparent; color: var(--primary-text); }\n.tiers-option-text { display: grid; gap: 3px; min-width: 0; }\n.tiers-option-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-family: var(--font-display);\n font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }\n.tiers-option-for { color: var(--secondary-foreground); font-size: 13.5px; line-height: 1.45; }\n.tiers-option-goes { color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }\n.tiers-option-price { display: grid; justify-items: end; gap: 1px; min-width: 76px; color: var(--muted-foreground); font-size: 12px;\n white-space: nowrap; }\n.tiers-option-price b { color: var(--foreground); font-family: var(--font-display); font-size: 19px; font-weight: 660;\n letter-spacing: -.015em; font-variant-numeric: tabular-nums; }\n.tiers-option-meter { display: block; width: 64px; height: 4px; margin-top: 6px; border-radius: var(--radius-full);\n background: var(--muted); overflow: hidden; }\n.tiers-option-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }\n@container tiers-setup (max-width: 420px) {\n .tiers-option { grid-template-columns: 22px minmax(0, 1fr); }\n .tiers-option-price { grid-column: 2; justify-items: start; }\n}\n\n/* A space's agents: its choice, and each one's line */\n.tiers-space { container: tiers-space / inline-size; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;\n padding: 12px 12px 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); }\n.tiers-space-mark { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-md);\n background: var(--primary-soft); color: var(--primary-text); }\n.tiers-space-text { flex: 1 1 200px; display: grid; gap: 1px; min-width: 0; }\n.tiers-space-text b { font-size: 14px; font-weight: 620; }\n.tiers-space-text span { color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }\n.tiers-space > .pairz-select { flex: 1 1 210px; max-width: 280px; }\n.tiers-space-error { flex-basis: 100%; margin: 0; color: var(--destructive-text, var(--destructive)); font-size: 12.5px; }\n.tiers-line { min-width: 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }\n.tiers-line b { color: var(--secondary-foreground); font-weight: 600; }\n.tiers-line[data-picked] .tiers-line-from { color: var(--primary-text); }\n\n@container tiers-space (max-width: 480px) {\n .tiers-space > .pairz-select { flex-basis: 100%; max-width: none; }\n}\n@container tiers (max-width: 520px) {\n .tiers-agents { padding: 14px 14px 6px; }\n .tiers-row { grid-template-columns: 32px minmax(0, 1fr); align-items: start; }\n .tiers-row > .pairz-avatar { margin-top: 2px; }\n .tiers-row-price { grid-column: 2; }\n}\n";
|
package/tiers/views/web/style.js
CHANGED
|
@@ -53,6 +53,8 @@ export const STYLE = `
|
|
|
53
53
|
.tiers-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--secondary-foreground); font-size: 13.5px; }
|
|
54
54
|
.tiers-cap > .pairz-select { width: auto; min-width: 160px; }
|
|
55
55
|
.tiers-cap span { color: var(--muted-foreground); font-size: 12.5px; }
|
|
56
|
+
.tiers-plans { display: grid; justify-items: start; gap: 6px; color: var(--secondary-foreground); font-size: 13.5px; }
|
|
57
|
+
.tiers-plans > span { color: var(--muted-foreground); font-size: 12.5px; }
|
|
56
58
|
|
|
57
59
|
/* Customizing a tier */
|
|
58
60
|
.tiers-editor { display: grid; gap: 16px; min-width: 0; }
|
|
@@ -63,6 +65,7 @@ export const STYLE = `
|
|
|
63
65
|
.tiers-kind-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
|
|
64
66
|
.tiers-kind-head b { font-size: 14.5px; font-weight: 650; }
|
|
65
67
|
.tiers-kind-head span { color: var(--muted-foreground); font-size: 12.5px; }
|
|
68
|
+
.tiers-kind-about { margin: 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }
|
|
66
69
|
.tiers-chain { display: grid; gap: 6px; min-width: 0; }
|
|
67
70
|
.tiers-kind-new { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; padding: 12px 14px;
|
|
68
71
|
border: 1px dashed var(--border); border-radius: var(--radius-lg); }
|
|
@@ -80,6 +83,8 @@ export const STYLE = `
|
|
|
80
83
|
.tiers-pick-name, .tiers-pick-price { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
81
84
|
.tiers-pick-name { flex: 0 1 auto; min-width: 2ch; }
|
|
82
85
|
.tiers-pick-price { flex: 0 100 auto; min-width: 0; }
|
|
86
|
+
/* Only the default: said, not a button. */
|
|
87
|
+
.tiers-pick[data-fixed] { align-items: center; padding: 0 8px; color: var(--muted-foreground); font-size: 13px; font-weight: 550; }
|
|
83
88
|
/* A narrow composer (a phone, a side panel), by its own width (chat's \`chat-box\` container): the name only. */
|
|
84
89
|
@container chat-box (max-width: 520px) {
|
|
85
90
|
.tiers-pick-price { display: none; }
|
package/tiers/web.d.ts
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* - **The org page's Agents section** (the web shell's `orgSettings`, at
|
|
5
5
|
* `/org?tab=models`): the tiers as cards, each with what a typical message
|
|
6
6
|
* comes to and each kind of work's model; making one the default,
|
|
7
|
-
* customizing one (each kind's
|
|
8
|
-
*
|
|
7
|
+
* customizing one (each kind's models, in the order they're tried, any of
|
|
8
|
+
* them first), making new ones, putting them in order, taking them away,
|
|
9
|
+
* what members can use; and the org's team under them.
|
|
9
10
|
* - **Beside the send button** (chat's `composerControls`): the tier a chat
|
|
10
11
|
* runs on, to switch it there, or on home the person's default.
|
|
11
12
|
* - **On a space's Members tab** (spaces' `spaceAgents`): the tier new chats
|
|
@@ -16,10 +17,10 @@
|
|
|
16
17
|
* - **For team's front end** (`agentKinds`): where to read the kinds of work,
|
|
17
18
|
* so making an agent asks for its kind instead of a model.
|
|
18
19
|
* - **For computers' front end** (`planList`): the plans Your AI shows, from
|
|
19
|
-
* `modelChoice.harnesses
|
|
20
|
-
* with `tiers.harnesses`.
|
|
20
|
+
* `modelChoice.harnesses`, in the plans' order.
|
|
21
21
|
*
|
|
22
|
-
* Models are chosen with team's picker (`model.pick
|
|
22
|
+
* Models are chosen with team's picker (`model.pick`, with `plans`: each
|
|
23
|
+
* model saying how it's paid for). Add it beside them:
|
|
23
24
|
*
|
|
24
25
|
* ```ts
|
|
25
26
|
* await web({ plugins: [webShell, chatWeb, spacesWeb, teamWeb, tiersWeb], root });
|