@hanzo/app 0.2.24 → 0.2.25

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 CHANGED
@@ -90,6 +90,8 @@ import { dragWindow, toggleWindowMaximize, WindowControls } from './WindowContro
90
90
  const Studio = lazy(() => import('@hanzo/studio').then((m) => ({ default: m.Studio })));
91
91
  /** Tabs, the same way: the terminals on the reader's machines (Terminals.tsx). */
92
92
  const Terminals = lazy(() => import('./Terminals.js'));
93
+ /** Betas, fetched when opening /beta in the app. */
94
+ const Betas = lazy(() => import('./Betas.js').then((m) => ({ default: m.BetasPane })));
93
95
  /** `/` is Chat on a new conversation. */
94
96
  const HOME = { mode: 'chat', thread: null };
95
97
  /** The bar's height, px: the reference window's title bar. */
@@ -269,5 +271,5 @@ function Window({ bar }) {
269
271
  };
270
272
  return (_jsx(AiProvider, { client: client ?? undefined, children: _jsx(HostProvider, { host: host, children: _jsx(PrefsProvider, { children: _jsxs(YStack, { ref: windowRef, "data-slot": "window", ...(bar ? floor : null), flex: 1, minW: 0, height: bar ? '100%' : '100dvh', overflow: "hidden", rounded: bar ? '$3' : undefined, "$max-md": { position: 'fixed', t: TOP, l: 0, r: 0, height: HEIGHT, ...{ overflow: 'clip' } }, children: [bar ? (_jsxs(XStack, { "data-slot": "title-bar", height: BAR, shrink: 0, items: "center", gap: 2, pl: (bar.inset ?? 0) + 6, pr: "$2", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, ...bar.drag, children: [_jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(Toggle, { open: !closed, onPress: flip }) }), _jsx(XStack, { $md: { display: 'none' }, children: _jsx(Toggle, { open: drawer.state === 'open', onPress: drawer.open, label: t('Open sidebar') }) }), _jsx(Mark, { label: t('Back'), "data-slot": "back", onPress: () => router.back(), children: _jsx(ArrowLeft, { size: 18, "aria-hidden": true, "data-i18n-mirror": true }) }), _jsx(Mark, { label: t('Forward'), "data-slot": "forward", onPress: () => router.forward(), children: _jsx(ArrowRight, { size: 18, "aria-hidden": true, "data-i18n-mirror": true }) }), _jsx(XStack, { flex: 1, self: "stretch", ...bar.drag }), bar.controls !== undefined ? (bar.controls) : !bar.inset ? (_jsx(WindowControls, {})) : null] })) : null, _jsxs(XStack, { ref: drawer.pane, "data-room": "", "data-app": mode, "data-slot": "frame", ...(bar ? null : floor), ...(drawer.slide ? RAISED : null),
271
273
  // inline-style: the slide, a transform with no logical form whose sign and distance the drawer writes on the element itself, a drag every frame (Drawer.tsx).
272
- style: drawer.slide ?? undefined, flex: 1, minW: 0, minH: 0, paddingInlineEnd: "var(--pane-gap)", pb: "var(--pane-gap)", pt: 0, "$max-md": { p: 0 }, children: [drawer.slide ? _jsx(Lift, {}) : null, _jsx(YStack, { height: "100%", "$max-md": { display: 'none' }, children: _jsx(Rail, { host: host, mode: mode, at: where, open: !closed, toggle: bar ? undefined : flip, onChat: toChat, onDev: toDev, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }) }), closed || mode === 'tabs' ? null : (_jsx(YStack, { "$max-md": { display: 'none' }, children: _jsx(Column, { host: host, mode: mode, thread: thread, go: move, onShut: () => setClosed(true), onSeek: seek, onBack: back, places: sidebar }) })), _jsxs(YStack, { "data-slot": "stage", flex: 1, minW: 0, minH: 0, marginInlineStart: closed || mode === 'tabs' ? 0 : 'var(--pane-gap)', "$max-md": { marginInlineStart: 0, pb: FOOT }, children: [bar ? null : _jsx(Top, { 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, minW: 0, minH: 0, children: mode === 'chat' ? (_jsx(Paned, { 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 }) }) }) })) : (_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: _jsx(Column, { host: host, mode: mode, thread: thread, go: move, onShut: shut, onSeek: seek, onBack: back, drawer: true, places: sidebar, rail: _jsx(Rail, { host: host, mode: mode, at: where, open: true, rows: true, onChat: toChat, onDev: toDev, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }), foot: _jsx(Foot, { host: host, onChat: fresh, onOrg: org }) }) })), finding ? _jsx(Palette, { go: move, onClose: found, mode: mode, host: host }) : null, learning ? _jsx(Learning, { open: true, onClose: () => setLearning(false) }) : null] }) }) }) }));
274
+ style: drawer.slide ?? undefined, flex: 1, minW: 0, minH: 0, paddingInlineEnd: "var(--pane-gap)", pb: "var(--pane-gap)", pt: 0, "$max-md": { p: 0 }, children: [drawer.slide ? _jsx(Lift, {}) : null, _jsx(YStack, { height: "100%", "$max-md": { display: 'none' }, children: _jsx(Rail, { host: host, mode: mode, at: where, open: !closed, toggle: bar ? undefined : flip, onChat: toChat, onDev: toDev, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }) }), closed || mode === 'tabs' ? null : (_jsx(YStack, { "$max-md": { display: 'none' }, children: _jsx(Column, { host: host, mode: mode, thread: thread, go: move, onShut: () => setClosed(true), onSeek: seek, onBack: back, places: sidebar }) })), _jsxs(YStack, { "data-slot": "stage", flex: 1, minW: 0, minH: 0, marginInlineStart: closed || mode === 'tabs' ? 0 : 'var(--pane-gap)', "$max-md": { marginInlineStart: 0, pb: FOOT }, children: [bar ? null : _jsx(Top, { 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, minW: 0, minH: 0, children: mode === 'chat' ? (_jsx(Paned, { 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 }) }) }) })) : mode === 'beta' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "scroll", flex: 1, minW: 0, minH: 0, p: "$4", $md: { p: '$6' }, children: _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: _jsx(Column, { host: host, mode: mode, thread: thread, go: move, onShut: shut, onSeek: seek, onBack: back, drawer: true, places: sidebar, rail: _jsx(Rail, { host: host, mode: mode, at: where, open: true, rows: true, onChat: toChat, onDev: toDev, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }), foot: _jsx(Foot, { host: host, onChat: fresh, onOrg: org }) }) })), finding ? _jsx(Palette, { go: move, onClose: found, mode: mode, host: host }) : null, learning ? _jsx(Learning, { open: true, onClose: () => setLearning(false) }) : null] }) }) }) }));
273
275
  }
package/dist/Betas.d.ts CHANGED
@@ -19,3 +19,7 @@ export declare function BetasDialog({ open, onOpenChange, go }: {
19
19
  onOpenChange: (open: boolean) => void;
20
20
  go?: (href: string) => void;
21
21
  }): import("react").JSX.Element;
22
+ /** The Betas view rendered inside the app's main pane under /beta. */
23
+ export declare function BetasPane({ go }: {
24
+ go?: (href: string) => void;
25
+ }): import("react").JSX.Element;
package/dist/Betas.js CHANGED
@@ -16,7 +16,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
16
  // Signed out, still loading, or on any error nothing is open: a flags outage
17
17
  // cannot leak an unfinished app.
18
18
  import { useCallback, useEffect, useState, useSyncExternalStore } from 'react';
19
- import { ArrowUpRight, Compass } from 'lucide-react';
19
+ import { ArrowUpRight, Compass, FlaskConical } from 'lucide-react';
20
20
  import { phrase } from '@hanzo/i18n';
21
21
  import { useI18n } from '@hanzo/i18n/react';
22
22
  import { useIam } from '@hanzo/iam/react';
@@ -141,3 +141,8 @@ export function BetasDialog({ open, onOpenChange, go }) {
141
141
  const { t } = useI18n();
142
142
  return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { maxW: 520, rounded: "$6", gap: "$3", children: [_jsx(DialogTitle, { children: t('Betas') }), _jsx(Text, { fontSize: "$2", color: "$color11", children: t('Apps we have not opened to everyone yet. Ask for the ones you want and we will let you in.') }), _jsx(YStack, { maxH: "60vh", overflowY: "auto", overflowX: "hidden", paddingInlineEnd: "$2", children: _jsx(BetasList, { go: go }) }), _jsxs(XStack, { items: "center", justify: "space-between", pt: "$3", borderTopWidth: 1, borderColor: "$borderColor", flexWrap: "wrap", gap: "$2", children: [_jsx(Text, { fontSize: "$2", color: "$color11", children: t('Looking for community plugins and MCP tools?') }), _jsx(Button, { size: "sm", variant: "outline", rounded: 999, onPress: () => window.open('https://hanzo.market', '_blank', 'noopener,noreferrer'), children: _jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Compass, { size: 14, "aria-hidden": true }), _jsx(Text, { fontSize: "$2", children: t('Explore on hanzo.market') }), _jsx(ArrowUpRight, { size: 13, "aria-hidden": true })] }) })] })] }) }));
143
143
  }
144
+ /** The Betas view rendered inside the app's main pane under /beta. */
145
+ export function BetasPane({ go }) {
146
+ const { t } = useI18n();
147
+ return (_jsxs(YStack, { flex: 1, minH: 0, maxW: 900, mx: "auto", width: "100%", gap: "$5", pb: "$8", children: [_jsxs(YStack, { gap: "$1.5", pt: "$2", children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(FlaskConical, { size: 22, color: "var(--primary)", "aria-hidden": true }), _jsx(Text, { fontSize: "$6", fontWeight: "600", color: "$color12", children: t('Ecosystem Betas & Early Access') })] }), _jsx(Text, { fontSize: "$3", color: "$color11", lineHeight: "$5", children: t('Preview upcoming releases, manage early access requests for your account, and explore models and developer tools.') })] }), _jsx(YStack, { rounded: "$4", borderWidth: 1, borderColor: "$borderColor", bg: "$background", p: "$4", $md: { p: '$6' }, gap: "$4", children: _jsx(BetasList, { go: go }) })] }));
148
+ }
package/dist/Chat.js CHANGED
@@ -57,7 +57,7 @@ import { useHydrated } from "./lib/hydrated.js";
57
57
  import { base, served } from "./lib/ai.js";
58
58
  import { onServed } from "./lib/served.js";
59
59
  import { refused as worded, speech, useDictation, useTalk, useVoice } from "@hanzo/voice";
60
- import { Check, Clock, FileText, Image as ImageMark, Library as LibraryMark, Paperclip, Sparkles, X } from "lucide-react";
60
+ import { Check, Clock, FileText, Image as ImageMark, Library as LibraryMark, Paperclip, Sparkles, X, Zap } from "lucide-react";
61
61
  import { FREE, ENSO } from "./lib/ai.js";
62
62
  import { openThread, useOpen } from "./open.js";
63
63
  import { Beside, Framed } from "./Shell.js";
@@ -1465,7 +1465,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, heading,
1465
1465
  limits,
1466
1466
  onUpgrade: (id) => setAsk({ model: nameOf(id, listed) }),
1467
1467
  voice,
1468
- language: spoken,
1468
+ language: chatPrefs.showLanguage ? spoken : null,
1469
1469
  onLanguage: speakIn,
1470
1470
  talk,
1471
1471
  // While nothing has been said: what is worth doing next.
@@ -1596,7 +1596,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, heading,
1596
1596
  }, mention.state);
1597
1597
  return {
1598
1598
  ...basePrompt,
1599
- send: (_jsxs(XStack, { items: "center", gap: "$1.5", shrink: 0, children: [_jsx(ThinkingEffort, { effort: chatPrefs.effort || 'high', onChange: (eff) => {
1599
+ send: (_jsxs(XStack, { items: "center", gap: "$1.5", shrink: 0, children: [chatPrefs.showTurboApproval ? (_jsxs(XStack, { items: "center", gap: "$1", px: "$2", py: "$1", rounded: 999, borderWidth: 1, borderColor: "$borderColor", bg: "$background", "aria-label": t("Turbo Approval: {mode}", { mode: chatPrefs.approvalMode }), children: [_jsx(Zap, { size: 12, color: "var(--primary)", "aria-hidden": true }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "$ink", children: chatPrefs.approvalMode === "manual" ? t("Manual") : t("Turbo") })] })) : null, _jsx(ThinkingEffort, { effort: chatPrefs.effort || 'high', onChange: (eff) => {
1600
1600
  setChatPrefs({ effort: eff });
1601
1601
  if (eff === 'low' || eff === 'medium' || eff === 'high') {
1602
1602
  mind.pace(eff);
package/dist/Column.js CHANGED
@@ -127,5 +127,5 @@ export function Column({ host, mode, thread, go, onShut, onSeek, onBack, drawer
127
127
  borderColor: 'var(--border-strong)',
128
128
  bg: 'var(--pane-fill)',
129
129
  }
130
- : HEAD), children: _jsx(Search, { size: drawer ? 18 : 16, "aria-hidden": true }) })] })), mode === 'chat' ? (_jsx(YStack, { role: "list", gap: 2, shrink: 0, children: _jsx(YStack, { role: "listitem", children: _jsx(SidebarItem, { "data-slot": "app-new", ...ROW, active: !thread, bg: "transparent", hoverStyle: { bg: '$hover' }, icon: _jsx(XStack, { width: 20, height: 20, items: "center", justify: "center", shrink: 0, children: _jsx(SquarePen, { size: 16, "aria-hidden": true }) }), onPress: create, ...keys(create), children: _jsx(Text, { fontSize: "$3", color: "$ink", children: t('New chat') }) }) }) })) : (_jsx(YStack, { "data-slot": "app-places", shrink: 0, children: groups.map((g, i) => (_jsxs(YStack, { pt: i ? '$2' : 0, children: [i && g.label ? (_jsx(Text, { id: `${uid}-${g.id}`, paddingInlineStart: "$2", pb: 2, fontSize: "$3", color: "$soft", children: g.label })) : null, _jsx(YStack, { role: "list", "aria-labelledby": i && g.label ? `${uid}-${g.id}` : undefined, "aria-label": i && g.label ? undefined : g.label || (at ? t(TITLE[at]) : g.id), gap: 1, children: g.links.map((link) => (_jsx(YStack, { role: "listitem", children: _jsx(SidebarItem, { ...ROW, ...(link.id === NEW ? { 'data-slot': 'app-new' } : {}), active: link.active, icon: link.id === NEW ? (_jsx(XStack, { width: 20, height: 20, items: "center", justify: "center", shrink: 0, children: _jsx(SquarePen, { size: 16, "aria-hidden": true }) })) : link.icon ? (_jsx(XStack, { width: 20, height: 20, items: "center", justify: "center", shrink: 0, children: link.icon })) : null, onPress: link.onPress, ...keys(() => link.onPress?.()), children: _jsx(Text, { fontSize: "$3", color: link.active ? '$ink' : '$quiet', children: link.label }) }) }, link.id))) })] }, g.id))) })), rail, mode === 'studio' || mode === 'tabs' || at ? null : _jsx(Recents, { host: host, mode: mode, thread: thread, onOpen: open, onNew: create }), at ? null : (_jsxs(YStack, { gap: "$2", pt: "$2", shrink: 0, children: [_jsx(Made, {}), _jsx(Setup, {})] })), free ? (_jsx(YStack, { role: "list", gap: 2, shrink: 0, pt: "$2", children: _jsx(YStack, { role: "listitem", children: _jsx(SidebarItem, { ...ROW, "data-slot": "column-upgrade", icon: _jsx(XStack, { width: 20, height: 20, items: "center", justify: "center", shrink: 0, children: _jsx(Sparkles, { size: 16, "aria-hidden": true, color: "var(--primary)" }) }), onPress: () => window.location.assign(payUrl('/cart', { returnUrl: window.location.href })), ...keys(() => window.location.assign(payUrl('/cart', { returnUrl: window.location.href }))), children: _jsx(Text, { fontSize: "$3", color: "$ink", children: t('Upgrade plan') }) }) }) })) : null, foot] }), drawer ? null : (_jsx(Gutter, { side: dir === 'rtl' ? 'right' : 'left', span: span.span, floor: FLOOR, ceil: CEIL, reset: WIDTH, onSpan: span.move, onKeep: span.keep, onShut: onShut, label: t('Resize sidebar') }))] }));
130
+ : HEAD), children: _jsx(Search, { size: drawer ? 18 : 16, "aria-hidden": true }) })] })), mode === 'chat' ? (_jsx(YStack, { role: "list", gap: 2, shrink: 0, children: _jsx(YStack, { role: "listitem", children: _jsx(SidebarItem, { "data-slot": "app-new", ...ROW, active: !thread, bg: "transparent", hoverStyle: { bg: '$hover' }, icon: _jsx(XStack, { width: 20, height: 20, items: "center", justify: "center", shrink: 0, children: _jsx(SquarePen, { size: 16, "aria-hidden": true }) }), onPress: create, ...keys(create), children: _jsx(Text, { fontSize: "$3", color: "$ink", children: t('New chat') }) }) }) })) : (_jsx(YStack, { "data-slot": "app-places", shrink: 0, children: groups.map((g, i) => (_jsxs(YStack, { pt: i ? '$2' : 0, children: [i && g.label ? (_jsx(Text, { id: `${uid}-${g.id}`, paddingInlineStart: "$2", pb: 2, fontSize: "$3", color: "$soft", children: g.label })) : null, _jsx(YStack, { role: "list", "aria-labelledby": i && g.label ? `${uid}-${g.id}` : undefined, "aria-label": i && g.label ? undefined : g.label || (at ? t(TITLE[at]) : g.id), gap: 1, children: g.links.map((link) => (_jsx(YStack, { role: "listitem", children: _jsx(SidebarItem, { ...ROW, ...(link.id === NEW ? { 'data-slot': 'app-new' } : {}), active: link.active, icon: link.id === NEW ? (_jsx(XStack, { width: 20, height: 20, items: "center", justify: "center", shrink: 0, children: _jsx(SquarePen, { size: 16, "aria-hidden": true }) })) : link.icon ? (_jsx(XStack, { width: 20, height: 20, items: "center", justify: "center", shrink: 0, children: link.icon })) : null, onPress: link.onPress, ...keys(() => link.onPress?.()), children: _jsx(Text, { fontSize: "$3", color: link.active ? '$ink' : '$quiet', children: link.label }) }) }, link.id))) })] }, g.id))) })), rail, mode === 'studio' || mode === 'tabs' || mode === 'beta' || at ? null : _jsx(Recents, { host: host, mode: mode, thread: thread, onOpen: open, onNew: create }), at ? null : (_jsxs(YStack, { gap: "$2", pt: "$2", shrink: 0, children: [_jsx(Made, {}), _jsx(Setup, {})] })), free ? (_jsx(YStack, { role: "list", gap: 2, shrink: 0, pt: "$2", children: _jsx(YStack, { role: "listitem", children: _jsx(SidebarItem, { ...ROW, "data-slot": "column-upgrade", icon: _jsx(XStack, { width: 20, height: 20, items: "center", justify: "center", shrink: 0, children: _jsx(Sparkles, { size: 16, "aria-hidden": true, color: "var(--primary)" }) }), onPress: () => window.location.assign(payUrl('/cart', { returnUrl: window.location.href })), ...keys(() => window.location.assign(payUrl('/cart', { returnUrl: window.location.href }))), children: _jsx(Text, { fontSize: "$3", color: "$ink", children: t('Upgrade plan') }) }) }) })) : null, foot] }), drawer ? null : (_jsx(Gutter, { side: dir === 'rtl' ? 'right' : 'left', span: span.span, floor: FLOOR, ceil: CEIL, reset: WIDTH, onSpan: span.move, onKeep: span.keep, onShut: onShut, label: t('Resize sidebar') }))] }));
131
131
  }
package/dist/Rail.js CHANGED
@@ -109,7 +109,7 @@ export function Rail({ host, mode, at, open, toggle, rows = false, onChat, onDev
109
109
  { key: 'team', label: 'Team', icon: _jsx(Users, { size: 16, "aria-hidden": true }), onSelect: () => out(WORKSPACE) },
110
110
  ...granted.map((b) => ({ key: `beta-${b.id}`, label: b.name, icon: _jsx(Sparkles, { size: 16, "aria-hidden": true }), onSelect: () => out(b.href) })),
111
111
  { type: 'separator', key: 'betas-rule' },
112
- { key: 'betas', label: t('Betas'), icon: _jsx(FlaskConical, { size: 16, "aria-hidden": true }), onSelect: () => window.location.assign('/beta') },
112
+ { key: 'betas', label: t('Betas'), icon: _jsx(FlaskConical, { size: 16, "aria-hidden": true }), onSelect: () => go('/beta') },
113
113
  { key: 'market', label: t('Explore on hanzo.market'), icon: _jsx(Compass, { size: 16, "aria-hidden": true }), onSelect: () => out('https://hanzo.market') },
114
114
  ]
115
115
  : []),
@@ -117,7 +117,7 @@ export function Rail({ host, mode, at, open, toggle, rows = false, onChat, onDev
117
117
  const betasDialog = _jsx(BetasDialog, { open: betas, onOpenChange: setBetas, go: out });
118
118
  if (rows)
119
119
  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 }) }) }), _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] }));
120
- return (_jsxs(YStack, { "data-slot": "rail", render: "nav", "aria-label": t('Products'), width: RAIL, flex: 1, pt: 4, pb: 4, gap: 4, shrink: 0, items: "center", 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 }) }), _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: false, onPress: () => window.location.assign('/beta'), "data-slot": "rail-betas", children: _jsx(FlaskConical, { size: 18, "aria-hidden": true }) }), betasDialog, rest.length ? (_jsx(DropdownMenu
120
+ return (_jsxs(YStack, { "data-slot": "rail", render: "nav", "aria-label": t('Products'), width: RAIL, flex: 1, pt: 4, pb: 4, gap: 4, shrink: 0, items: "center", 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 }) }), _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
121
121
  // Toward the content: right of the rail, left of it right to left.
122
122
  , {
123
123
  // Toward the content: right of the rail, left of it right to left.
@@ -99,7 +99,7 @@ function Model() {
99
99
  ].map((opt) => {
100
100
  const active = (chatPrefs.approvalMode || 'auto') === opt.id;
101
101
  return (_jsxs(Box, { render: _jsx("button", { type: "button" }), ...tap, onClick: () => setChatPrefs({ approvalMode: opt.id }), ...CHOICE, flex: 1, p: 10, bg: active ? 'var(--edge, var(--white-14))' : 'transparent', borderColor: active ? 'var(--borderColor, var(--white-22))' : 'var(--white-08)', children: [_jsxs(XStack, { items: "center", justify: "space-between", children: [_jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", children: opt.label }), active ? _jsx(Check, { size: 12, color: "var(--primary)", "aria-hidden": true }) : null] }), _jsx(Text, { fontSize: "$1", color: "$soft", children: opt.desc })] }, opt.id));
102
- }) })] }), _jsx(Separator, {}), _jsxs(YStack, { gap: "$3", children: [_jsx(XStack, { items: "center", justify: "space-between", children: _jsxs(YStack, { gap: "$0.5", children: [_jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Text, { fontSize: "$4", fontWeight: "600", color: "$ink", children: t('Advanced composer controls') }), !paid ? (_jsxs(XStack, { items: "center", gap: "$1", px: "$2", py: "$0.5", rounded: 9999, bg: "var(--edge, var(--white-10))", children: [_jsx(Lock, { size: 11, color: "$soft", "aria-hidden": true }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "$soft", children: t('Paid plan') })] })) : null] }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('Customize composer controls and third-party model access.') })] }) }), _jsx(YStack, { p: "$3", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", gap: "$2", children: _jsxs(XStack, { items: "center", justify: "space-between", children: [_jsxs(YStack, { flex: 1, pr: "$2", children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", children: t('Show model selector in composer') }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('By default, chat composers simplify controls to reasoning effort only. Enable this to pick models on the fly in the composer.') })] }), _jsx(Button, { size: "sm", variant: chatPrefs.showModelSelector ? 'default' : 'outline', disabled: !paid, onClick: () => paid && setChatPrefs({ showModelSelector: !chatPrefs.showModelSelector }), children: chatPrefs.showModelSelector ? t('Enabled') : t('Disabled') })] }) }), _jsx(YStack, { p: "$3", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", gap: "$2", children: _jsxs(XStack, { items: "center", justify: "space-between", children: [_jsxs(YStack, { flex: 1, pr: "$2", children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", children: t('Enable third-party models') }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('Third-party models (OpenAI, Anthropic, Google, DeepSeek) are billed from your pre-paid credit topup. First-party models (Enso, Zen, Kai) are covered by your plan.') })] }), _jsx(Button, { size: "sm", variant: chatPrefs.allowThirdPartyModels ? 'default' : 'outline', disabled: !paid, onClick: () => paid && setChatPrefs({ allowThirdPartyModels: !chatPrefs.allowThirdPartyModels }), children: chatPrefs.allowThirdPartyModels ? t('Enabled') : t('Disabled') })] }) }), !paid ? (_jsx(XStack, { pt: "$1", children: _jsxs(Button, { size: "sm", variant: "outline", onClick: () => window.location.assign(site('/pricing')), children: [_jsx(Sparkles, { size: 14, color: "var(--primary)", "aria-hidden": true }), t('Upgrade to unlock advanced model controls')] }) })) : null] })] }));
102
+ }) })] }), _jsx(Separator, {}), _jsxs(YStack, { gap: "$3", children: [_jsx(XStack, { items: "center", justify: "space-between", children: _jsxs(YStack, { gap: "$0.5", children: [_jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Text, { fontSize: "$4", fontWeight: "600", color: "$ink", children: t('Advanced composer controls') }), !paid ? (_jsxs(XStack, { items: "center", gap: "$1", px: "$2", py: "$0.5", rounded: 9999, bg: "var(--edge, var(--white-10))", children: [_jsx(Lock, { size: 11, color: "$soft", "aria-hidden": true }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "$soft", children: t('Paid plan') })] })) : null] }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('Customize composer controls and third-party model access.') })] }) }), _jsx(YStack, { p: "$3", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", gap: "$2", children: _jsxs(XStack, { items: "center", justify: "space-between", children: [_jsxs(YStack, { flex: 1, pr: "$2", children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", children: t('Show model selector in composer') }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('By default, chat composers simplify controls to reasoning effort only. Enable this to pick models on the fly in the composer.') })] }), _jsx(Button, { size: "sm", variant: chatPrefs.showModelSelector ? 'default' : 'outline', disabled: !paid, onClick: () => paid && setChatPrefs({ showModelSelector: !chatPrefs.showModelSelector }), children: chatPrefs.showModelSelector ? t('Enabled') : t('Disabled') })] }) }), _jsx(YStack, { p: "$3", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", gap: "$2", children: _jsxs(XStack, { items: "center", justify: "space-between", children: [_jsxs(YStack, { flex: 1, pr: "$2", children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", children: t('Enable third-party models') }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('Third-party models (OpenAI, Anthropic, Google, DeepSeek) are billed from your pre-paid credit topup. First-party models (Enso, Zen, Kai) are covered by your plan.') })] }), _jsx(Button, { size: "sm", variant: chatPrefs.allowThirdPartyModels ? 'default' : 'outline', disabled: !paid, onClick: () => paid && setChatPrefs({ allowThirdPartyModels: !chatPrefs.allowThirdPartyModels }), children: chatPrefs.allowThirdPartyModels ? t('Enabled') : t('Disabled') })] }) }), _jsx(YStack, { p: "$3", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", gap: "$2", children: _jsxs(XStack, { items: "center", justify: "space-between", children: [_jsxs(YStack, { flex: 1, pr: "$2", children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", children: t('Show language selector beside +') }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('Display the dictation language indicator next to the + context button on the composer row.') })] }), _jsx(Button, { size: "sm", variant: chatPrefs.showLanguage ? 'default' : 'outline', onClick: () => setChatPrefs({ showLanguage: !chatPrefs.showLanguage }), children: chatPrefs.showLanguage ? t('Enabled') : t('Disabled') })] }) }), _jsx(YStack, { p: "$3", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", gap: "$2", children: _jsxs(XStack, { items: "center", justify: "space-between", children: [_jsxs(YStack, { flex: 1, pr: "$2", children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", children: t('Show turbo approval indicator') }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('Display the turbo / manual approval badge next to the thinking effort and send controls.') })] }), _jsx(Button, { size: "sm", variant: chatPrefs.showTurboApproval ? 'default' : 'outline', onClick: () => setChatPrefs({ showTurboApproval: !chatPrefs.showTurboApproval }), children: chatPrefs.showTurboApproval ? t('Enabled') : t('Disabled') })] }) }), !paid ? (_jsx(XStack, { pt: "$1", children: _jsxs(Button, { size: "sm", variant: "outline", onClick: () => window.location.assign(site('/pricing')), children: [_jsx(Sparkles, { size: 14, color: "var(--primary)", "aria-hidden": true }), t('Upgrade to unlock advanced model controls')] }) })) : null] })] }));
103
103
  }
104
104
  /**
105
105
  * WHAT THE GATEWAY SERVES, read from the same `/v1/models` the rooms read.
@@ -5,6 +5,8 @@ export interface ChatPreferences {
5
5
  allowThirdPartyModels: boolean;
6
6
  effort: EffortLevel;
7
7
  approvalMode: ApprovalMode;
8
+ showLanguage?: boolean;
9
+ showTurboApproval?: boolean;
8
10
  effortVersion?: number;
9
11
  }
10
12
  export declare function getChatPreferences(): ChatPreferences;
@@ -15,6 +15,8 @@ const DEFAULT_PREFERENCES = {
15
15
  allowThirdPartyModels: false,
16
16
  effort: DEFAULT_EFFORT,
17
17
  approvalMode: 'auto',
18
+ showLanguage: false,
19
+ showTurboApproval: false,
18
20
  effortVersion: EFFORT_SCHEMA_VERSION,
19
21
  };
20
22
  function validEffort(v) {
@@ -46,6 +48,8 @@ export function getChatPreferences() {
46
48
  allowThirdPartyModels: Boolean(parsed.allowThirdPartyModels),
47
49
  effort: migratedEffort,
48
50
  approvalMode: validApprovalMode(parsed.approvalMode, autonomy),
51
+ showLanguage: Boolean(parsed.showLanguage),
52
+ showTurboApproval: Boolean(parsed.showTurboApproval),
49
53
  effortVersion: EFFORT_SCHEMA_VERSION,
50
54
  };
51
55
  }
@@ -58,6 +58,10 @@ export declare const STUDIO = "/studio";
58
58
  * (@hanzo/tabs `Workspace`), drawn in the app at hanzo.ai/tabs.
59
59
  */
60
60
  export declare const TERMINALS = "/tabs";
61
+ /**
62
+ * Betas: ecosystem betas, early access preview, and waitlist dashboard.
63
+ */
64
+ export declare const BETA = "/beta";
61
65
  /** Studio at an address of its own (@hanzo/studio `route`): '' is New, /studio. */
62
66
  export declare const studio: (at: string) => string;
63
67
  /** Chat on a conversation, or /chat itself for a new one. */
@@ -93,6 +97,8 @@ export type Place = {
93
97
  at: string;
94
98
  } | {
95
99
  mode: 'tabs';
100
+ } | {
101
+ mode: 'beta';
96
102
  };
97
103
  /** The place a path names, or null when it names none of the app's. */
98
104
  export declare function place(pathname: string): Place | null;
package/dist/lib/host.js CHANGED
@@ -61,6 +61,10 @@ export const STUDIO = '/studio';
61
61
  * (@hanzo/tabs `Workspace`), drawn in the app at hanzo.ai/tabs.
62
62
  */
63
63
  export const TERMINALS = '/tabs';
64
+ /**
65
+ * Betas: ecosystem betas, early access preview, and waitlist dashboard.
66
+ */
67
+ export const BETA = '/beta';
64
68
  /** Studio at an address of its own (@hanzo/studio `route`): '' is New, /studio. */
65
69
  export const studio = (at) => (at ? `${STUDIO}/${at.replace(/^\/+/, '')}` : STUDIO);
66
70
  /** Chat on a conversation, or /chat itself for a new one. */
@@ -112,6 +116,8 @@ export function place(pathname) {
112
116
  return { mode: 'studio', at: p.slice(STUDIO.length + 1) };
113
117
  if (p === TERMINALS)
114
118
  return { mode: 'tabs' };
119
+ if (p === BETA)
120
+ return { mode: 'beta' };
115
121
  if (!p.startsWith(`${CHAT}/`))
116
122
  return null;
117
123
  const id = p.slice(CHAT.length + 1);
@@ -135,6 +141,8 @@ export function page(pathname) {
135
141
  return TERMINALS;
136
142
  if (at.mode === 'studio')
137
143
  return STUDIO;
144
+ if (at.mode === 'beta')
145
+ return BETA;
138
146
  const r = route(at.at);
139
147
  if (r.kind === 'run')
140
148
  return `${DEV}/run/:id`;
package/dist/where.d.ts CHANGED
@@ -74,6 +74,6 @@ export declare const where: () => Addresses;
74
74
  /** The product's name, as the host states it. Read at call time, like every address. */
75
75
  export declare const brand: () => string;
76
76
  /** The product's name in each mode of the app: the host's brand in Chat (Hanzo AI, Hanzo Team), Hanzo Dev in Dev. */
77
- export declare const wordmark: (mode: 'chat' | 'dev' | 'studio' | 'tabs') => string;
77
+ export declare const wordmark: (mode: 'chat' | 'dev' | 'studio' | 'tabs' | 'beta') => string;
78
78
  /** A page of the app's own, from wherever the rooms are mounted. */
79
79
  export declare const site: (path: string) => string;
package/dist/where.js CHANGED
@@ -12,6 +12,6 @@ export const where = () => addresses;
12
12
  /** The product's name, as the host states it. Read at call time, like every address. */
13
13
  export const brand = () => addresses.brand ?? 'Hanzo AI';
14
14
  /** The product's name in each mode of the app: the host's brand in Chat (Hanzo AI, Hanzo Team), Hanzo Dev in Dev. */
15
- export const wordmark = (mode) => (mode === 'dev' ? 'Hanzo Dev' : mode === 'studio' ? 'Hanzo Studio' : mode === 'tabs' ? 'Hanzo Tabs' : brand());
15
+ export const wordmark = (mode) => (mode === 'dev' ? 'Hanzo Dev' : mode === 'studio' ? 'Hanzo Studio' : mode === 'tabs' ? 'Hanzo Tabs' : mode === 'beta' ? 'Hanzo Betas' : brand());
16
16
  /** A page of the app's own, from wherever the rooms are mounted. */
17
17
  export const site = (path) => `${addresses.site}${path}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/app",
3
- "version": "0.2.24",
3
+ "version": "0.2.25",
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",