@hanzo/app 0.3.3 → 0.3.5
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/App.js +1 -1
- package/dist/Chat.js +81 -76
- package/dist/Gate.js +11 -21
- package/dist/Rail.js +3 -3
- package/dist/Sidebar.js +6 -2
- package/dist/ground.d.ts +16 -2
- package/dist/ground.js +16 -2
- package/dist/lib/session.d.ts +3 -5
- package/dist/lib/session.js +3 -6
- package/package.json +1 -1
package/dist/App.js
CHANGED
|
@@ -280,5 +280,5 @@ function Window({ bar, betas }) {
|
|
|
280
280
|
// scrolls inside, collapsed to its border (Projects drew blank). The rest of the row
|
|
281
281
|
// beside the rail and the sidebar, never width 100%: a View does not shrink, so at the
|
|
282
282
|
// row's full width again the pane stood past the window's edge.
|
|
283
|
-
flex: 1, minW: 0, minH: 0, marginInlineStart: closed || alone ? 0 : 'var(--pane-gap)', "$max-md": { marginInlineStart: 0, pb: `max(var(--pane-gap), ${FOOT})` }, children: [bar ? null : _jsx(Bar, { host: host, mode: mode, places: sidebar, open: drawer.state !== 'shut', go: move, onMenu: drawer.open, onChat: toChat, onDev: toDev }), _jsx(XStack, { "data-slot": "panes", flex: 1, display: "grid", gridTemplateColumns: "minmax(0, 1fr)", gridTemplateRows: "minmax(0, 1fr)", minW: 0, minH: 0, children: mode === 'chat' ? (_jsx(Split, { framed: true, children: _jsx(Chat, {}) })) : mode === 'tabs' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: _jsx(Suspense, { fallback: null, children: _jsx(Terminals, {}) }) })) : mode === 'studio' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: _jsx(YStack, { flex: 1, minH: 0, height: "100%", children: _jsx(Suspense, { fallback: null, children: _jsx(Studio, { host: maker, rail: false }) }) }) })) : at.mode === 'hosted' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: _jsx(Suspense, { fallback: null, children: _jsx(Hosted, { id: at.id, go: move }) }) })) : mode === 'beta' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflowY: "auto", overflowX: "hidden", flex: 1, minW: 0, minH: 0, p: "$4", $md: { p: '$6' }, children: betas ?? (_jsx(Suspense, { fallback: null, children: _jsx(Betas, { go: move }) })) })) : (_jsx(YStack, { render: "main", "data-slot": "pane", ...(run ? null : { ...pane(), overflow: 'hidden' }), flex: 1, minW: 0, minH: 0, children: plans ? null : _jsx(Builder, { host: host, rail: false }) })) })] })] }), drawer.state === 'shut' ? null : (_jsx(Layer, { drawer: drawer, top: bar ? BAR : 0, children: _jsxs(XStack, { flex: 1, minH: 0, children: [_jsx(YStack, { "data-slot": "drawer-rail", shrink: 0, pt: "$2", children: _jsx(Rail, { host: host, mode: mode, at: where, inside: inside, open: true, onChat: toChat, onDev: toDev, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }) }), _jsx(YStack, { flex: 1, minW: 0, children: _jsx(Sidebar, { host: host, mode: mode, thread: thread, go: move, onShut: shut, onSeek: seek, onBack: back, drawer: true, places: sidebar }) })] }) })), finding ? _jsx(Search, { go: move, onClose: found, mode: mode, host: host }) : null, learning ? _jsx(Learning, { open: true, onClose: () => setLearning(false) }) : null] }) }) }) }) }));
|
|
283
|
+
flex: 1, minW: 0, minH: 0, marginInlineStart: closed || alone ? 0 : 'var(--pane-gap)', "$max-md": { marginInlineStart: 0, pb: `max(var(--pane-gap), ${FOOT})` }, children: [bar ? null : _jsx(Bar, { host: host, mode: mode, places: sidebar, open: drawer.state !== 'shut', go: move, onMenu: drawer.open, onChat: toChat, onDev: toDev }), _jsx(XStack, { "data-slot": "panes", flex: 1, display: "grid", gridTemplateAreas: '"pane side"', gridTemplateColumns: "minmax(0, 1fr) auto", gridTemplateRows: "minmax(0, 1fr)", minW: 0, minH: 0, children: mode === 'chat' ? (_jsx(Split, { framed: true, children: _jsx(Chat, {}) })) : mode === 'tabs' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: _jsx(Suspense, { fallback: null, children: _jsx(Terminals, {}) }) })) : mode === 'studio' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: _jsx(YStack, { flex: 1, minH: 0, height: "100%", children: _jsx(Suspense, { fallback: null, children: _jsx(Studio, { host: maker, rail: false }) }) }) })) : at.mode === 'hosted' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: _jsx(Suspense, { fallback: null, children: _jsx(Hosted, { id: at.id, go: move }) }) })) : mode === 'beta' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflowY: "auto", overflowX: "hidden", flex: 1, minW: 0, minH: 0, p: "$4", $md: { p: '$6' }, children: betas ?? (_jsx(Suspense, { fallback: null, children: _jsx(Betas, { go: move }) })) })) : (_jsx(YStack, { render: "main", "data-slot": "pane", ...(run ? null : { ...pane(), overflow: 'hidden' }), flex: 1, minW: 0, minH: 0, children: plans ? null : _jsx(Builder, { host: host, rail: false }) })) })] })] }), drawer.state === 'shut' ? null : (_jsx(Layer, { drawer: drawer, top: bar ? BAR : 0, children: _jsxs(XStack, { flex: 1, minH: 0, children: [_jsx(YStack, { "data-slot": "drawer-rail", shrink: 0, pt: "$2", children: _jsx(Rail, { host: host, mode: mode, at: where, inside: inside, open: true, onChat: toChat, onDev: toDev, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }) }), _jsx(YStack, { flex: 1, minW: 0, children: _jsx(Sidebar, { host: host, mode: mode, thread: thread, go: move, onShut: shut, onSeek: seek, onBack: back, drawer: true, places: sidebar }) })] }) })), finding ? _jsx(Search, { go: move, onClose: found, mode: mode, host: host }) : null, learning ? _jsx(Learning, { open: true, onClose: () => setLearning(false) }) : null] }) }) }) }) }));
|
|
284
284
|
}
|
package/dist/Chat.js
CHANGED
|
@@ -41,7 +41,7 @@ import { Face, brief as castBrief, join, roleOf, castTurn, roster as rosterLine,
|
|
|
41
41
|
import { cleanForSpeech, speakAgent } from "./speech.js";
|
|
42
42
|
import { AgentMaker, HOUSE, useAgentShelf, useCrew } from "./crew.js";
|
|
43
43
|
import { called } from "./team.js";
|
|
44
|
-
import { Anchor, Box, Button,
|
|
44
|
+
import { Anchor, Box, Button, Text, Tooltip, TooltipContent, TooltipTrigger, View, XStack, YStack } from "@hanzo/ui";
|
|
45
45
|
import { useMedia } from "@hanzo/gui";
|
|
46
46
|
import { given, tidy } from "./lib/title.js";
|
|
47
47
|
import { useIam, useIamToken } from "@hanzo/iam/react";
|
|
@@ -73,7 +73,7 @@ import { enter, LOGIN } from './lib/destination.js';
|
|
|
73
73
|
import { first } from './lib/first.js';
|
|
74
74
|
import { BAD } from "./lib/mix.js";
|
|
75
75
|
import { brand } from './where.js';
|
|
76
|
-
import { BAND } from './ground.js';
|
|
76
|
+
import { BAND, HEAD, TOUCH_HEAD, inPane } from './ground.js';
|
|
77
77
|
import { UsageControl } from './Usage.js';
|
|
78
78
|
import { shared, useChatPreferences } from './lib/chatPreferences.js';
|
|
79
79
|
import { handleHint } from './hint.js';
|
|
@@ -1491,7 +1491,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, heading,
|
|
|
1491
1491
|
: undefined
|
|
1492
1492
|
: undefined,
|
|
1493
1493
|
};
|
|
1494
|
-
return (_jsxs(YStack, {
|
|
1494
|
+
return (_jsxs(YStack, { width: "100%", height: "100%", minH: 0, position: "relative", "data-slot": "conversation",
|
|
1495
1495
|
// A LINK IN AN ANSWER OPENS IN A TAB beside the conversation when the tab
|
|
1496
1496
|
// can show it — a site or preview we host — and in a browser tab of its
|
|
1497
1497
|
// own otherwise, as a modified click always does.
|
|
@@ -1533,77 +1533,82 @@ function Thread({ placeholder = message(), initial, anonymous = false, heading,
|
|
|
1533
1533
|
}, children: [_jsx(Schedule, { open: plan !== null, onOpenChange: (open) => {
|
|
1534
1534
|
if (!open)
|
|
1535
1535
|
setPlan(null);
|
|
1536
|
-
}, prompt: plan ?? "", model: model, models: models.map((m) => ({ id: m.id, name: nameOf(m.id, listed) })) }), dragging ? (_jsx(YStack, { "aria-hidden": true, position: "absolute", t: 0, r: 0, b: 0, l: 0, z: 10, items: "center", justify: "center", bg: "var(--surface-scrim)", borderWidth: 2, borderStyle: "dashed", borderColor: "$borderColor", rounded: "var(--pane-round)", pointerEvents: "none", children: _jsxs(XStack, { items: "center", gap: "$2", px: "$4", py: "$2.5", rounded: "$10", bg: "$background", borderWidth: 1, borderColor: "$borderColor", children: [_jsx(Paperclip, { size: 15, "aria-hidden": true }), _jsx(Text, { fontSize: "$4", color: "$ink", children: t("Drop files to attach") })] }) })) : null, _jsxs(XStack, { "data-slot": "conversation-head",
|
|
1537
|
-
//
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
//
|
|
1590
|
-
//
|
|
1591
|
-
|
|
1592
|
-
const
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1536
|
+
}, prompt: plan ?? "", model: model, models: models.map((m) => ({ id: m.id, name: nameOf(m.id, listed) })) }), dragging ? (_jsx(YStack, { "aria-hidden": true, position: "absolute", t: 0, r: 0, b: 0, l: 0, z: 10, items: "center", justify: "center", bg: "var(--surface-scrim)", borderWidth: 2, borderStyle: "dashed", borderColor: "$borderColor", rounded: "var(--pane-round)", pointerEvents: "none", children: _jsxs(XStack, { items: "center", gap: "$2", px: "$4", py: "$2.5", rounded: "$10", bg: "$background", borderWidth: 1, borderColor: "$borderColor", children: [_jsx(Paperclip, { size: 15, "aria-hidden": true }), _jsx(Text, { fontSize: "$4", color: "$ink", children: t("Drop files to attach") })] }) })) : null, _jsxs(XStack, { "data-slot": "conversation-head",
|
|
1537
|
+
// On the rail's line from a tablet up (HEAD, less the pane's edge); a phone's own bar is BAND.
|
|
1538
|
+
height: BAND, $md: { height: inPane(HEAD) }, $touchable: { height: inPane(TOUCH_HEAD) }, display: "grid", gridTemplateColumns: "minmax(0, 1fr) auto", items: "center", gap: "$3", paddingInlineStart: "$4", paddingInlineEnd: "$2", shrink: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, "$max-md": !mine && !cast.length ? { display: 'none' } : undefined, children: [_jsxs(XStack, { items: "center", gap: "$2", minW: 0, children: [mine ? (_jsx(Text, { fontSize: 15, lineHeight: 20, color: "$ink", numberOfLines: 1, shrink: 1, minW: 0, children: tidy(mine.title) })) : null, cast.length ? (_jsx(XStack, { role: "list", "aria-label": t("Agents in this chat"), items: "center", gap: "$1.5", minW: 0, overflowX: "auto", "$platform-web": { scrollbarWidth: "none" }, children: cast.map((name) => (_jsxs(XStack, { role: "listitem", items: "center", gap: "$1.5", paddingInlineStart: "$1", paddingInlineEnd: "$0.5", py: "$0.5", rounded: 999, borderWidth: 1, borderColor: "$borderColor", shrink: 0, children: [_jsx(Face, { src: faces[name]?.avatar ?? (name === withWhom ? portrait : undefined), emoji: faces[name]?.emoji ?? (name === withWhom ? persona?.emoji : undefined), name: name, size: 22 }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$color", numberOfLines: 1, display: "none", $sm: { display: "flex" }, children: name }), _jsx(Box, { render: "button", onClick: () => openAgent(name), "aria-label": t("Remove {name} from this chat", { name }), title: t("Remove {name}", { name }), width: 24, height: 24, rounded: 999, items: "center", justify: "center", hoverStyle: { bg: "$hover" }, children: _jsx(X, { size: 13, "aria-hidden": true, color: "var(--soft, var(--muted-foreground))" }) })] }, name))) })) : null] }), _jsxs(XStack, { "data-slot": "conversation-controls", "data-tauri-drag-region": "false", items: "center", gap: 4, shrink: 0, children: [free ? (_jsxs(Button, { size: "xs", variant: "outline", "data-slot": "header-upgrade", gap: "$1.5", px: "$2.5", py: "$1", rounded: "$4", cursor: "pointer", hoverStyle: { bg: 'var(--white-10)' }, onPress: () => window.location.assign(payUrl('/cart', { org: org(), returnUrl: window.location.href })), "aria-label": t("Upgrade plan"), children: [_jsx(Sparkles, { size: 13, color: "var(--primary)", "aria-hidden": true }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "$ink", children: t("Upgrade plan") })] })) : null, open ? _jsx(Share, { thread: open }) : null, said.length > 0 ? (_jsx(ConversationMenu, { threads: currentThreadMap, active: open || currentThread.id, onSchedule: anonymous || forgetful ? undefined : () => setPlan(lastAsked()), children: _jsx(XStack, { children: _jsx(ThreadMore, { t: currentThread }) }) })) : (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(XStack, { render: "button", "data-slot": "header-private-chat", "aria-label": t("Private chat"), "aria-pressed": forgetful, width: 32, height: 32, items: "center", justify: "center", rounded: "$3", bg: "transparent", cursor: "pointer", hoverStyle: { bg: "$hover" }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: "var(--ring)" }, onPress: () => setForgetful(!forgetful), children: _jsx(Ghost, { size: 16, strokeWidth: 1.75, color: forgetful ? "var(--foreground)" : "var(--muted-foreground)", fill: forgetful ? "currentColor" : "none", "aria-hidden": true }) }) }), _jsx(TooltipContent, { children: forgetful ? t("Private chat is on: this conversation is not saved") : t("Private chat") })] })), _jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(Summary, { sections: sections, onOpen: () => setPanel(true), label: t("Summary") }) }), _jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(PanelToggle, { open: panel, onToggle: () => setPanel(!panel) }) })] })] }), wide && aside !== null ? (_jsx(Side, { children: _jsx(Panel, { side: deck, kinds: NONE, onHide: () => setPanel(false), label: t("Tabs"), ...browsing }) })) : null, !wide && panel ? _jsx(Panel, { side: deck, kinds: NONE, sheet: true, onHide: () => setPanel(false), label: t("Tabs"), ...browsing }) : null, _jsx(YStack, { "data-slot": "talk", flex: 1, minH: 0, children: _jsx(ChatSurface, { ...chat, messages: shown, send: guarded,
|
|
1539
|
+
// WHILE NOTHING HAS BEEN SAID, from a tablet up, the opening and the
|
|
1540
|
+
// composer are one pair centred in the pane (`center`: rows `1fr auto auto
|
|
1541
|
+
// 1fr`), so the heading reads close above the field and nothing stands at
|
|
1542
|
+
// the window's foot (owner, 2026-10-30). A phone keeps the composer at the
|
|
1543
|
+
// foot, over the keyboard, from the first moment; once a turn exists every
|
|
1544
|
+
// width does, and the transcript scrolls under it.
|
|
1545
|
+
center: media.md,
|
|
1546
|
+
// AS IT WAS WRITTEN. The package renders a turn's words plainly and
|
|
1547
|
+
// says so — it ships no markdown pipeline because the plugin set is the
|
|
1548
|
+
// surface's to choose — so an answer arrived here reading "```ts" with
|
|
1549
|
+
// the backticks on screen. `Prose` is the site's one renderer, reading
|
|
1550
|
+
// with the same `marked` the legal pages parse with and drawing every
|
|
1551
|
+
// token in gui elements, and the shared view draws through it too.
|
|
1552
|
+
body: (turn) => {
|
|
1553
|
+
if (String(turn.id).startsWith(`${FAILED}:`)) {
|
|
1554
|
+
const question = shown.find((one) => one.id === String(turn.id).slice(FAILED.length + 1));
|
|
1555
|
+
return question ? failure(question) : null;
|
|
1556
|
+
}
|
|
1557
|
+
// A QUESTION THAT CARRIED PICTURES draws them beside its words.
|
|
1558
|
+
if (turn.role === "user" && Array.isArray(turn.content)) {
|
|
1559
|
+
const parts = partsOf(turn.content);
|
|
1560
|
+
const asked = parts.flatMap((p) => (p.type === "text" ? [p.text] : [])).join("\n");
|
|
1561
|
+
return (_jsxs(YStack, { gap: "$1", children: [_jsx(Parts, { parts: parts, prose: (text) => _jsx(Prose, { text: text }) }), !anonymous && asked ? _jsx(Plan, { onPress: () => setPlan(asked) }) : null] }));
|
|
1562
|
+
}
|
|
1563
|
+
const said = typeof turn.content === "string" ? turn.content : "";
|
|
1564
|
+
// A QUESTION THAT CARRIED FILES draws its words and the files' chips;
|
|
1565
|
+
// the passages it handed the model are the model's to read, not ours.
|
|
1566
|
+
if (turn.role === "user" && said) {
|
|
1567
|
+
const read = told(said);
|
|
1568
|
+
if (read.carried)
|
|
1569
|
+
return (_jsxs(YStack, { gap: "$1", children: [_jsx(Carried, { text: read.text, attached: read.carried.attached, reused: read.carried.reused, onOpen: openFile, onSave: anonymous ? undefined : (url, id, f) => keepOne(url, id, f.name, f.type) }), !anonymous && read.text ? _jsx(Plan, { onPress: () => setPlan(read.text) }) : null] }));
|
|
1570
|
+
}
|
|
1571
|
+
// WHILE THE ANSWER HAS NO WORDS YET: who is answering (the agents the
|
|
1572
|
+
// question addresses, or the whole cast when it names nobody), and the
|
|
1573
|
+
// model's reasoning as it streams (`reasoning` on the turn), dimmed and
|
|
1574
|
+
// cut to its last lines.
|
|
1575
|
+
const thought = turn.role === "assistant" && !said && chat.streaming ? (turn.reasoning ?? "").trim() : "";
|
|
1576
|
+
if (turn.role === "assistant" && !said && chat.streaming && (cast.length || thought)) {
|
|
1577
|
+
const q = [...shown].reverse().find((one) => one.role === "user");
|
|
1578
|
+
const whom = cast.length ? addressed(words(q?.content), cast) : [];
|
|
1579
|
+
return (_jsxs(YStack, { gap: "$1", "data-slot": "thinking", children: [_jsx(Text, { fontSize: "$2", color: "$soft", children: whom.length
|
|
1580
|
+
? whom.length > 1
|
|
1581
|
+
? thought
|
|
1582
|
+
? t("{names} are thinking…", { names: join(whom, t) })
|
|
1583
|
+
: t("{names} are answering…", { names: join(whom, t) })
|
|
1584
|
+
: thought
|
|
1585
|
+
? t("{names} is thinking…", { names: join(whom, t) })
|
|
1586
|
+
: t("{names} is answering…", { names: join(whom, t) })
|
|
1587
|
+
: t("Thinking…") }), thought ? (_jsx(Text, { fontSize: "$2", color: "$soft", opacity: 0.72, "data-slot": "thought", children: thought.length > THOUGHT ? `…${thought.slice(-THOUGHT).replace(/^\S*\s/, "")}` : thought })) : null] }));
|
|
1588
|
+
}
|
|
1589
|
+
// A CAST'S ANSWER IS SEVERAL PEOPLE'S. Each opens a line with their
|
|
1590
|
+
// name, as the brief asks, so each is drawn under their own face and
|
|
1591
|
+
// read in their own voice. A reply that names nobody is drawn whole.
|
|
1592
|
+
const parts = turn.role === "assistant" ? speakers(said, known) : null;
|
|
1593
|
+
if (parts && parts.some((part) => part.who)) {
|
|
1594
|
+
// Asked and silent: an agent the question addressed who has no part
|
|
1595
|
+
// in this reply.
|
|
1596
|
+
const at = shown.findIndex((one) => one.id === turn.id);
|
|
1597
|
+
const q = shown.slice(0, at).reverse().find((one) => one.role === "user");
|
|
1598
|
+
const silent = cast.length > 1 && !(chat.streaming && at === shown.length - 1)
|
|
1599
|
+
? addressed(words(q?.content), cast).filter((name) => !parts.some((part) => part.who?.toLowerCase() === name.toLowerCase()))
|
|
1600
|
+
: [];
|
|
1601
|
+
return (_jsxs(YStack, { gap: "$3", children: [parts.map((part, i) => (_jsxs(YStack, { gap: "$1", children: [part.who ? (_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Face, { src: faces[part.who]?.avatar, emoji: faces[part.who]?.emoji, name: part.who, size: 20 }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", children: part.who })] })) : null, _jsx(Prose, { text: part.text }), part.text ? _jsx(Reply, { text: part.text, listen: listen(part.who ?? withWhom ?? undefined), onOpen: opener(part.text) }) : null] }, i))), silent.length ? (_jsx(Text, { fontSize: "$2", color: "$soft", children: t("No answer from {names} in this reply.", { names: join(silent, t) }) })) : null, byline(turn.id)] }));
|
|
1602
|
+
}
|
|
1603
|
+
return (_jsxs(YStack, { gap: "$1", children: [_jsx(Prose, { text: said }), turn.role === "assistant" && said ? _jsx(Reply, { text: said, listen: listen(withWhom ?? undefined), onOpen: opener(said) }) : null, turn.role === "assistant" && said ? byline(turn.id) : null, turn.role === "user" && said && !anonymous ? _jsx(Plan, { onPress: () => setPlan(said) }) : null] }));
|
|
1604
|
+
},
|
|
1605
|
+
// The page's ONE heading, and it belongs to the empty transcript rather
|
|
1606
|
+
// than to a signed-out branch — the branch is gone, and the heading went
|
|
1607
|
+
// with it when it did. `Ask` passes its own, because the page embedding
|
|
1608
|
+
// it already has an `<h1>` and a second is the defect that took the
|
|
1609
|
+
// landings off /chat and /dev.
|
|
1610
|
+
empty: heading === null ? undefined : (_jsxs(YStack, { "data-slot": "opening", items: "center", justify: "flex-end", width: "100%", height: "100%", pt: "$6", pb: "$2", children: [cast.length > 1 ? (_jsx(XStack, { items: "center", justify: "center", mb: "$4", children: cast.map((name, i) => (_jsx(Box, { marginInlineStart: i ? -16 : 0, rounded: 40, borderWidth: 2, borderColor: "$background", z: cast.length - i, children: _jsx(Face, { src: faces[name]?.avatar, emoji: faces[name]?.emoji, name: name, size: 72 }) }, name))) })) : portrait ? (_jsx(Box, { width: 160, height: 160, rounded: 24, overflow: "hidden", borderWidth: 2, borderColor: "var(--white-15)", boxShadow: "0 10px 24px color-mix(in srgb, var(--pure-black) 70%, transparent)", mb: "$4", bg: "var(--neutral-900)", children: _jsx(View, { render: _jsx("img", { src: portrait, alt: withWhom }), width: "100%", height: "100%", objectFit: "cover" }) })) : null, cast.length === 1 && !portrait ? (_jsx(Box, { mb: "$3", children: _jsx(Face, { emoji: mate?.emoji ?? persona?.emoji, name: withWhom, size: 72 }) })) : null, _jsx(Text, { render: "h1", fontSize: "$7", lineHeight: "$7", fontWeight: "700", color: "$ink", text: "center", mb: "$1", children: join(cast, t) || heading || (firstName ? t("What’s up, {name}?", { name: firstName }) : t("What’s up?")) }), cast.length === 1 && (mate?.description ?? persona?.description) ? (_jsx(Text, { fontSize: "$3", color: "$soft", text: "center", maxW: 500, mb: "$4", lineHeight: "$4", children: mate?.description ?? persona?.description })) : null] })),
|
|
1611
|
+
// The transcript reads at the same measure. `Thread` defaults to 768
|
|
1612
|
+
// itself; handing it the column here is what lets Width reach it.
|
|
1613
|
+
column: { maxW: MEASURE }, composer: composer }) }), _jsx(AgentMaker, {}), carry.dialog, _jsx(Upgrade, { ask: ask, onClose: () => setAsk(null) })] }));
|
|
1609
1614
|
}
|
package/dist/Gate.js
CHANGED
|
@@ -44,7 +44,7 @@ import { useHostname } from './lib/hostname.js';
|
|
|
44
44
|
import { useHydrated } from './lib/hydrated.js';
|
|
45
45
|
import { api } from './lib/api.js';
|
|
46
46
|
import { usePersonal, useTier } from './lib/tier.js';
|
|
47
|
-
import { CHOOSE, ORG,
|
|
47
|
+
import { CHOOSE, ORG, assumed, bearer, hasSession, org, orgs as claimed, pick, renew, role, scope, superAdmin, support } from './lib/session.js';
|
|
48
48
|
import { matches, refusal, slugify } from './lib/orgname.js';
|
|
49
49
|
import { team as workspace } from './lib/host.js';
|
|
50
50
|
import { checkoutUrl, money } from './lib/pay.js';
|
|
@@ -85,7 +85,6 @@ export function Gate({ children, front = false, forward, signup = false, }) {
|
|
|
85
85
|
window.removeEventListener('storage', on);
|
|
86
86
|
};
|
|
87
87
|
}, [accessToken]);
|
|
88
|
-
const [picked, setPicked] = useState(false);
|
|
89
88
|
// The team being set up in this page. Once its name is taken the setup owns
|
|
90
89
|
// the screen until checkout, whatever `Gate` reads of the new organization.
|
|
91
90
|
const [founding, setFounding] = useState(null);
|
|
@@ -106,14 +105,6 @@ export function Gate({ children, front = false, forward, signup = false, }) {
|
|
|
106
105
|
const supporting = Boolean(current) && assumed() === current;
|
|
107
106
|
const open = !asks || live || supporting;
|
|
108
107
|
const { client } = useAi();
|
|
109
|
-
useEffect(() => {
|
|
110
|
-
try {
|
|
111
|
-
setPicked(Boolean(localStorage.getItem(PICKED)));
|
|
112
|
-
}
|
|
113
|
-
catch {
|
|
114
|
-
setPicked(true);
|
|
115
|
-
}
|
|
116
|
-
}, [accessToken]);
|
|
117
108
|
// Back from checkout: the plan may be live now.
|
|
118
109
|
useEffect(() => {
|
|
119
110
|
const back = () => {
|
|
@@ -136,7 +127,6 @@ export function Gate({ children, front = false, forward, signup = false, }) {
|
|
|
136
127
|
}, []);
|
|
137
128
|
const choose = useCallback((o) => {
|
|
138
129
|
pick(o);
|
|
139
|
-
setPicked(true);
|
|
140
130
|
setChoosing(false);
|
|
141
131
|
}, []);
|
|
142
132
|
// The organization a link arrives for. hanzo.ai opens the workspace at
|
|
@@ -155,11 +145,6 @@ export function Gate({ children, front = false, forward, signup = false, }) {
|
|
|
155
145
|
if (members.includes(asked))
|
|
156
146
|
choose(asked);
|
|
157
147
|
}, [door, hydrated, isLoading, isAuthenticated, members, choose]);
|
|
158
|
-
// One organization is not a choice.
|
|
159
|
-
useEffect(() => {
|
|
160
|
-
if (members.length === 1 && !picked)
|
|
161
|
-
choose(members[0]);
|
|
162
|
-
}, [members, picked, choose]);
|
|
163
148
|
// The template chosen at creation, set up once the organization opens.
|
|
164
149
|
useEffect(() => {
|
|
165
150
|
if (!open || !client)
|
|
@@ -213,11 +198,17 @@ export function Gate({ children, front = false, forward, signup = false, }) {
|
|
|
213
198
|
return _jsx(Landing, { member: true });
|
|
214
199
|
return door ? _jsx(Start, { onFounded: setFounding, first: true }) : _jsx(Create, {});
|
|
215
200
|
}
|
|
216
|
-
|
|
201
|
+
// The organization this browser works in is the choice (session.ts `org`: the
|
|
202
|
+
// SDK's selection when the token names it, else the person's only one). Only a
|
|
203
|
+
// browser working in none of the person's is asked, so a sign-in goes straight
|
|
204
|
+
// to the app in the organization the person last worked in, and the account
|
|
205
|
+
// menu switches it (`choosing`).
|
|
206
|
+
if (!current)
|
|
217
207
|
return _jsx(Pick, { members: members, current: current, onPick: choose });
|
|
218
|
-
// Asked for over an open app, the app keeps its place under the chooser and closing it goes back
|
|
208
|
+
// Asked for over an open app, the app keeps its place under the chooser and closing it goes back;
|
|
209
|
+
// asked for from a plan's page (`swap`), the chooser stands alone, since that app is not open.
|
|
219
210
|
if (choosing)
|
|
220
|
-
return _jsxs(_Fragment, { children: [_jsx(Held, { veiled: true, children: children }), _jsx(Pick, { members: members, current: current, onPick: choose, onClose: () => setChoosing(false) })] });
|
|
211
|
+
return _jsxs(_Fragment, { children: [open ? _jsx(Held, { veiled: true, children: children }) : null, _jsx(Pick, { members: members, current: current, onPick: choose, onClose: () => setChoosing(false) })] });
|
|
221
212
|
if (open)
|
|
222
213
|
return forward ? _jsx(Forward, { to: forward }) : _jsx(_Fragment, { children: _jsx(Held, { veiled: false, children: children }) });
|
|
223
214
|
// IN THE WORKSPACE NOTHING OPENS WITHOUT A LIVE PLAN. Every branch here
|
|
@@ -230,7 +221,7 @@ export function Gate({ children, front = false, forward, signup = false, }) {
|
|
|
230
221
|
return _jsxs(_Fragment, { children: [_jsx(Held, { veiled: true, children: children }), _jsx(Veil, {})] });
|
|
231
222
|
if (free && personal === null)
|
|
232
223
|
return _jsxs(_Fragment, { children: [_jsx(Held, { veiled: true, children: children }), _jsx(Veil, {})] });
|
|
233
|
-
const swap = () =>
|
|
224
|
+
const swap = () => setChoosing(true);
|
|
234
225
|
if (door) {
|
|
235
226
|
// A billing OUTAGE is ours; the plan is still the condition.
|
|
236
227
|
if (!tier)
|
|
@@ -449,7 +440,6 @@ function CreateDialog({ onClose }) {
|
|
|
449
440
|
try {
|
|
450
441
|
if (template)
|
|
451
442
|
localStorage.setItem(SETUP, template);
|
|
452
|
-
localStorage.setItem(PICKED, '1');
|
|
453
443
|
}
|
|
454
444
|
catch {
|
|
455
445
|
/* the next load re-derives both */
|
package/dist/Rail.js
CHANGED
|
@@ -45,7 +45,7 @@ import { out } from './help.js';
|
|
|
45
45
|
import { BETAS } from './lib/betas.js';
|
|
46
46
|
import { HOSTED_APPS } from './lib/hosted.js';
|
|
47
47
|
import { Account } from './Account.js';
|
|
48
|
-
import {
|
|
48
|
+
import { HEAD, TOUCH_HEAD } from './ground.js';
|
|
49
49
|
import { app, hosted, WORKSPACE } from './lib/host.js';
|
|
50
50
|
/** The rail's width, px. */
|
|
51
51
|
export const RAIL = 44;
|
|
@@ -125,8 +125,8 @@ export function Rail({ host, mode, at, open, toggle, inside = null, rows = false
|
|
|
125
125
|
if (rows)
|
|
126
126
|
return (_jsxs(YStack, { "data-slot": "places", render: "nav", "aria-label": t('Products'), pt: "$2", shrink: 0, children: [_jsxs(YStack, { role: "list", gap: 2, children: [_jsx(YStack, { role: "listitem", children: _jsx(Row, { label: "Studio", on: mode === 'studio', onPress: onStudio, "data-slot": "place-studio", icon: _jsx(WandSparkles, { size: 16, "aria-hidden": true }) }) }), _jsx(YStack, { role: "listitem", children: _jsx(Row, { label: "Tabs", on: mode === 'tabs', onPress: onTabs, "data-slot": "place-tabs", icon: _jsx(SquareTerminal, { size: 16, "aria-hidden": true }) }) }), apps.map((a) => (_jsx(YStack, { role: "listitem", children: _jsx(Row, { label: a.name, on: inside === a.id, onPress: () => go(hosted(a.id)), "data-slot": `place-app-${a.id}`, icon: _jsx(a.icon, { size: 16, "aria-hidden": true }) }) }, a.id))), _jsx(YStack, { role: "listitem", children: _jsx(DropdownMenu, { placement: "bottom-start", minWidth: 220, trigger: _jsx(Row, { label: t('More'), "data-slot": "place-more", "aria-haspopup": "menu", icon: _jsx(Ellipsis, { size: 16, "aria-hidden": true }) }), items: rest }) })] }), betasDialog] }));
|
|
127
127
|
return (_jsxs(YStack, { "data-slot": "rail", render: "nav", "aria-label": t('Products'), width: RAIL, flex: 1,
|
|
128
|
-
// The first mark
|
|
129
|
-
pt: (
|
|
128
|
+
// The first mark stands at the pane's top edge, one head row high (HEAD), the account on the sidebar's foot (Sidebar's `pb`).
|
|
129
|
+
pt: (HEAD - MARK) / 2, pb: "$2", gap: 4, shrink: 0, items: "center", $touchable: { pt: (TOUCH_HEAD - TOUCH) / 2 }, children: [toggle ? (_jsx(YStack, { pb: 4, children: _jsx(Toggle, { open: open, onPress: toggle }) })) : null, _jsx(Mark, { label: t('Chat'), on: mode === 'chat', onPress: onChat, "data-slot": "rail-chat", children: _jsx(MessageSquare, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: "Dev", on: mode === 'dev' && !here, onPress: onDev, "data-slot": "rail-dev", children: _jsx(Code2, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: "Studio", on: mode === 'studio', onPress: onStudio, "data-slot": "rail-studio", children: _jsx(WandSparkles, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: "Tabs", on: mode === 'tabs', onPress: onTabs, "data-slot": "rail-tabs", children: _jsx(SquareTerminal, { size: 18, "aria-hidden": true }) }), apps.map((a) => (_jsx(Mark, { label: a.name, on: inside === a.id, onPress: () => go(hosted(a.id)), "data-slot": `rail-app-${a.id}`, children: _jsx(a.icon, { size: 18, "aria-hidden": true }) }, a.id))), _jsx(Mark, { label: t('Library'), on: here === 'library', onPress: to(RAISED.library), "data-slot": "rail-library", children: _jsx(Library, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: t('Scheduled tasks'), on: here === 'scheduled', onPress: to(RAISED.scheduled), "data-slot": "rail-scheduled", children: _jsx(Clock, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: t('Customize'), on: here === 'customize', onPress: to(RAISED.customize), "data-slot": "rail-customize", children: _jsx(Puzzle, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: t('Betas'), on: mode === 'beta', onPress: () => go('/beta'), "data-slot": "rail-betas", children: _jsx(FlaskConical, { size: 18, "aria-hidden": true }) }), betasDialog, rest.length ? (_jsx(DropdownMenu
|
|
130
130
|
// Toward the content: right of the rail, left of it right to left.
|
|
131
131
|
, {
|
|
132
132
|
// Toward the content: right of the rail, left of it right to left.
|
package/dist/Sidebar.js
CHANGED
|
@@ -47,7 +47,7 @@ import { talk } from './lib/host.js';
|
|
|
47
47
|
import { payUrl } from './lib/pay.js';
|
|
48
48
|
import { brand, wordmark } from './where.js';
|
|
49
49
|
import { dragWindow, toggleWindowMaximize } from './WindowControls.js';
|
|
50
|
-
import { BAND } from './ground.js';
|
|
50
|
+
import { BAND, HEAD as LINE, TOUCH_HEAD } from './ground.js';
|
|
51
51
|
/** The sidebar fills the column. Its `width` is typed in px alone, though its frame takes any gui size — the type is
|
|
52
52
|
* @hanzo/ui's to widen. */
|
|
53
53
|
const FILL = { width: '100%' };
|
|
@@ -119,7 +119,11 @@ export function Sidebar({ host, mode, thread, go, onShut, onSeek, onBack, drawer
|
|
|
119
119
|
};
|
|
120
120
|
return (_jsxs(YStack, { "data-slot": "app-column", ref: drawer ? undefined : span.ref, ...(drawer ? null : span.props), position: "relative", flex: drawer ? 1 : undefined, shrink: drawer ? 1 : 0, minW: 0, height: "100%", width: drawer ? undefined : 'var(--span)', children: [_jsxs(Base, { "data-slot": "app-rail", role: "navigation", "aria-label": brand(), bg: "transparent", borderWidth: 0, ...FILL, px: "$2", pt: drawer ? 'var(--pane-gap)' : 0,
|
|
121
121
|
// In the drawer the menu's own foot padding is the gap; its foot row stands on it.
|
|
122
|
-
pb: drawer ? 0 : '$2', gap: "$0", children: [at ? (_jsxs(XStack, { "data-slot": "app-head", items: "center", gap: "$1", paddingInlineStart: 2, paddingInlineEnd: 2,
|
|
122
|
+
pb: drawer ? 0 : '$2', gap: "$0", children: [at ? (_jsxs(XStack, { "data-slot": "app-head", items: "center", gap: "$1", paddingInlineStart: 2, paddingInlineEnd: 2,
|
|
123
|
+
// The phone's drawer lines up with its bar (BAND); beside the rail, with the rail's first mark (ground.ts HEAD).
|
|
124
|
+
height: drawer ? BAND : LINE, $touchable: drawer ? undefined : { height: TOUCH_HEAD }, shrink: 0, minW: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, children: [_jsx(SidebarIconButton, { label: t('Back'), "data-slot": "place-back", "data-tauri-drag-region": "false", onPress: onBack, ...HEAD, children: _jsx(ArrowLeft, { size: 16, "aria-hidden": true, "data-i18n-mirror": true }) }), _jsx(Text, { flex: 1, minW: 0, fontSize: 18, lineHeight: 24, fontWeight: "600", color: "$ink", numberOfLines: 1, "data-slot": "place-name", children: t(TITLE[at]) })] })) : (_jsxs(XStack, { "data-slot": "app-head", items: "center", gap: "$1", paddingInlineStart: "$2", paddingInlineEnd: 2,
|
|
125
|
+
// The phone's drawer lines up with its bar (BAND); beside the rail, with the rail's first mark (ground.ts HEAD).
|
|
126
|
+
height: drawer ? BAND : LINE, $touchable: drawer ? undefined : { height: TOUCH_HEAD }, shrink: 0, minW: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, children: [_jsx(Text, { flex: 1, minW: 0, fontSize: drawer ? 20 : 18, lineHeight: 24, fontWeight: drawer ? '700' : '600', color: "$ink", numberOfLines: 1, children: wordmark(mode) }), drawer ? null : _jsx(Activity, { host: host }), _jsx(SidebarIconButton, { label: t('Search'), "data-tauri-drag-region": "false", onPress: onSeek, "aria-haspopup": "dialog", ...(drawer
|
|
123
127
|
? {
|
|
124
128
|
width: 40,
|
|
125
129
|
height: 40,
|
package/dist/ground.d.ts
CHANGED
|
@@ -21,10 +21,24 @@ export declare const pane: (fill?: string) => {
|
|
|
21
21
|
readonly boxShadow: 'var(--shadow-sheet-1)';
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
24
|
+
* A phone's head row, px: its bar and the drawer's title row are this high and
|
|
25
|
+
* stand on one line, so the marks in them share a centerline.
|
|
26
26
|
*/
|
|
27
27
|
export declare const BAND = 52;
|
|
28
|
+
/**
|
|
29
|
+
* The head row from a tablet up, px: one rail mark high (Rail `MARK`), so the
|
|
30
|
+
* rail's first mark stands at the pane's top edge and the sidebar's title row
|
|
31
|
+
* and the pane's head share its centre (owner, 2026-10-30: "align sidebar icons
|
|
32
|
+
* top, left, right"). A thumb's mark is 44 on a touch screen, and the rows grow
|
|
33
|
+
* with it (`TOUCH_HEAD`).
|
|
34
|
+
*/
|
|
35
|
+
export declare const HEAD = 36;
|
|
36
|
+
export declare const TOUCH_HEAD = 44;
|
|
37
|
+
/**
|
|
38
|
+
* A row INSIDE a pane is 2px shorter than the row it lines up with: the pane's
|
|
39
|
+
* 1px top edge sets its content 1px down, so its centre stays on the line.
|
|
40
|
+
*/
|
|
41
|
+
export declare const inPane: (row: number) => number;
|
|
28
42
|
/**
|
|
29
43
|
* THE FLOOR under the app's frame (app/_web.tsx, components/settings/Frame.tsx):
|
|
30
44
|
* design's top light falling off down the window over the faint lamps of
|
package/dist/ground.js
CHANGED
|
@@ -21,10 +21,24 @@ export const pane = (fill = 'var(--pane-fill)') => ({
|
|
|
21
21
|
boxShadow: 'var(--shadow-sheet-1)',
|
|
22
22
|
});
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
24
|
+
* A phone's head row, px: its bar and the drawer's title row are this high and
|
|
25
|
+
* stand on one line, so the marks in them share a centerline.
|
|
26
26
|
*/
|
|
27
27
|
export const BAND = 52;
|
|
28
|
+
/**
|
|
29
|
+
* The head row from a tablet up, px: one rail mark high (Rail `MARK`), so the
|
|
30
|
+
* rail's first mark stands at the pane's top edge and the sidebar's title row
|
|
31
|
+
* and the pane's head share its centre (owner, 2026-10-30: "align sidebar icons
|
|
32
|
+
* top, left, right"). A thumb's mark is 44 on a touch screen, and the rows grow
|
|
33
|
+
* with it (`TOUCH_HEAD`).
|
|
34
|
+
*/
|
|
35
|
+
export const HEAD = 36;
|
|
36
|
+
export const TOUCH_HEAD = 44;
|
|
37
|
+
/**
|
|
38
|
+
* A row INSIDE a pane is 2px shorter than the row it lines up with: the pane's
|
|
39
|
+
* 1px top edge sets its content 1px down, so its centre stays on the line.
|
|
40
|
+
*/
|
|
41
|
+
export const inPane = (row) => row - 2;
|
|
28
42
|
/**
|
|
29
43
|
* THE FLOOR under the app's frame (app/_web.tsx, components/settings/Frame.tsx):
|
|
30
44
|
* design's top light falling off down the window over the faint lamps of
|
package/dist/lib/session.d.ts
CHANGED
|
@@ -182,12 +182,10 @@ export declare function scope(): Record<string, string>;
|
|
|
182
182
|
export declare function renew(): void;
|
|
183
183
|
/** Fired on `window` when the organization this browser works in changes. */
|
|
184
184
|
export declare const ORG = "hanzo:org";
|
|
185
|
-
/** This person picked an organization in this browser. `own()` clears it with the person. */
|
|
186
|
-
export declare const PICKED = "hanzo:org:picked";
|
|
187
185
|
/**
|
|
188
|
-
* Work in this organization from now on: the SDK's selection,
|
|
189
|
-
*
|
|
190
|
-
*
|
|
186
|
+
* Work in this organization from now on: the SDK's selection, announced. A choice
|
|
187
|
+
* made anywhere (the shell's gate, the app's account menu) is the one `org()`
|
|
188
|
+
* answers, so the gate does not ask for it again.
|
|
191
189
|
*/
|
|
192
190
|
export declare function pick(o: string): void;
|
|
193
191
|
/** Fired on `window` to open the organization chooser over the shell. */
|
package/dist/lib/session.js
CHANGED
|
@@ -453,17 +453,14 @@ export function renew() {
|
|
|
453
453
|
}
|
|
454
454
|
/** Fired on `window` when the organization this browser works in changes. */
|
|
455
455
|
export const ORG = 'hanzo:org';
|
|
456
|
-
/** This person picked an organization in this browser. `own()` clears it with the person. */
|
|
457
|
-
export const PICKED = 'hanzo:org:picked';
|
|
458
456
|
/**
|
|
459
|
-
* Work in this organization from now on: the SDK's selection,
|
|
460
|
-
*
|
|
461
|
-
*
|
|
457
|
+
* Work in this organization from now on: the SDK's selection, announced. A choice
|
|
458
|
+
* made anywhere (the shell's gate, the app's account menu) is the one `org()`
|
|
459
|
+
* answers, so the gate does not ask for it again.
|
|
462
460
|
*/
|
|
463
461
|
export function pick(o) {
|
|
464
462
|
try {
|
|
465
463
|
window.localStorage.setItem(`${PREFIX}current_org`, o);
|
|
466
|
-
window.localStorage.setItem(PICKED, '1');
|
|
467
464
|
}
|
|
468
465
|
catch {
|
|
469
466
|
/* the choice lives only in this page */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/app",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Hanzo's app: the shell and its apps (Home, Chat, Inbox, Contacts, Meet, Calendar, Drive, Board, Work, Bots), once, for every Hanzo surface.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|