@hanzo/app 0.2.13 → 0.2.15

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/Chat.js CHANGED
@@ -511,7 +511,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, heading,
511
511
  const { limits, notice, reload: reread } = useLimits(!anonymous, org(), (id) => nameOf(id, catalog.current));
512
512
  const mind = useMind(target, anonymous ? "free" : limits?.plan);
513
513
  catalog.current = mind.models;
514
- const [chatPrefs] = useChatPreferences();
514
+ const [chatPrefs, setChatPrefs] = useChatPreferences();
515
515
  const ai = useAi();
516
516
  // In the app's frame the composer floats on the pane as a pane of its own.
517
517
  const framed = useContext(Framed);
@@ -744,7 +744,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, heading,
744
744
  // before the model is asked and asks without them, so a question about the
745
745
  // world, in any language, is answered from what the web says now and streams.
746
746
  params: {
747
- reasoning_effort: mind.effort || 'auto',
747
+ reasoning_effort: chatPrefs.effort || 'high',
748
748
  ...(!anonymous && house(rowOf(model)?.family) ? { tools: WEB } : {}),
749
749
  },
750
750
  ...(open ? { thread: open } : {}),
@@ -1500,8 +1500,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, heading,
1500
1500
  .filter((l) => !l.review || l.code === locale)
1501
1501
  .map((l) => ({
1502
1502
  key: l.code,
1503
- label: l.name,
1504
- description: l.englishName !== l.name ? l.englishName : undefined,
1503
+ label: l.englishName !== l.name ? `${l.name} (${l.englishName})` : l.name,
1505
1504
  icon: l.code === locale ? _jsx(Check, { size: 14, "aria-hidden": true }) : undefined,
1506
1505
  onSelect: () => void setLocale(l.code),
1507
1506
  })) }), open ? _jsx(Share, { thread: open }) : null, mine ? (_jsx(ConversationMenu, { threads: alone, active: open, onSchedule: anonymous ? undefined : () => setPlan(lastAsked()), children: _jsx(XStack, { children: _jsx(ThreadMore, { t: mine }) }) })) : null, _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(Beside, { 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(ChatSurface, { ...chat, messages: shown, send: guarded,
@@ -1586,7 +1585,12 @@ function Thread({ placeholder = message(), initial, anonymous = false, heading,
1586
1585
  }, mention.state);
1587
1586
  return {
1588
1587
  ...basePrompt,
1589
- send: (_jsxs(XStack, { items: "center", gap: "$1.5", shrink: 0, children: [_jsx(ThinkingEffort, { effort: mind.effort || 'auto', onChange: (eff) => mind.pace(eff), disabled: chat.streaming || talk.open }), basePrompt.send] })),
1588
+ send: (_jsxs(XStack, { items: "center", gap: "$1.5", shrink: 0, children: [_jsx(ThinkingEffort, { effort: chatPrefs.effort || 'high', onChange: (eff) => {
1589
+ setChatPrefs({ effort: eff });
1590
+ if (eff === 'low' || eff === 'medium' || eff === 'high') {
1591
+ mind.pace(eff);
1592
+ }
1593
+ }, disabled: chat.streaming || talk.open }), basePrompt.send] })),
1590
1594
  };
1591
1595
  })() }), _jsx(AgentMaker, {}), carry.dialog, _jsx(Upgrade, { ask: ask, onClose: () => setAsk(null) })] }));
1592
1596
  }
package/dist/Chrome.js CHANGED
@@ -1,14 +1,14 @@
1
1
  'use client';
2
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useI18n } from '@hanzo/i18n/react';
4
4
  import { useIam } from '@hanzo/iam/react';
5
5
  import { Text, View, XStack, YStack } from '@hanzo/gui';
6
- import { Avatar, Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from '@hanzo/ui';
6
+ import { Avatar, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from '@hanzo/ui';
7
7
  import { HanzoWordmark } from '@hanzogui/shell';
8
8
  import { rememberDestination } from './lib/destination.js';
9
9
  import { named } from './lib/session.js';
10
10
  import { useSignOut } from './lib/signout.js';
11
- import { brand } from './where.js';
11
+ import { brand, site } from './where.js';
12
12
  import { dragWindow, toggleWindowMaximize, WindowControls } from './WindowControls.js';
13
13
  /** The bar's height under the notch: hanzo.ai's masthead's. */
14
14
  const HEIGHT = 60;
@@ -30,9 +30,9 @@ export function Chrome({ back }) {
30
30
  };
31
31
  const out = () => void signOut();
32
32
  const signed = isAuthenticated && Boolean(who);
33
- return (_jsxs(XStack, { render: "header", "data-slot": "masthead", "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, position: "sticky", t: 0, z: "var(--z-header)", shrink: 0, boxSizing: "content-box", height: HEIGHT, pt: NOTCH, px: "var(--page-gutter, 20px)", gap: 12, items: "center", bg: "var(--background)", borderBottomWidth: 1, borderColor: "var(--border)", children: [_jsx(Text, { render: _jsx("a", { href: "/", "aria-label": t('{brand} home', { brand: brand() }), "data-tauri-drag-region": "deep", onClick: (e) => {
33
+ return (_jsxs(XStack, { render: "header", "data-slot": "masthead", "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, position: "sticky", t: 0, z: "var(--z-header)", shrink: 0, boxSizing: "content-box", height: HEIGHT, pt: NOTCH, px: 20, gap: 12, items: "center", bg: "var(--background)", borderBottomWidth: 1, borderColor: "var(--border)", children: [_jsx(Text, { render: _jsx("a", { href: "/", "aria-label": t('{brand} home', { brand: brand() }), "data-tauri-drag-region": "deep", onClick: (e) => {
34
34
  if (typeof document !== 'undefined' && document.documentElement.getAttribute('data-desktop') === 'true') {
35
35
  e.preventDefault();
36
36
  }
37
- } }), display: "flex", items: "center", shrink: 0, color: "var(--foreground)", textDecorationLine: "none", "data-tauri-drag-region": "deep", children: _jsx(HanzoWordmark, { label: brand(), size: 22, "data-tauri-drag-region": "deep" }) }), back, _jsx(View, { flex: 1, "data-tauri-drag-region": "deep" }), signed ? (_jsxs(_Fragment, { children: [_jsxs(XStack, { render: "section", "aria-label": t('Account'), items: "center", gap: 12, minW: 0, "$max-md": { display: 'none' }, children: [_jsx(Avatar, { src: avatar || null, name: who, alt: "" }), _jsxs(YStack, { minW: 0, gap: 2, children: [_jsx(Text, { fontSize: "$3", fontWeight: "500", color: "$ink", numberOfLines: 1, children: who }), name && email ? (_jsx(Text, { fontSize: "$2", color: "$soft", numberOfLines: 1, children: email })) : null] }), _jsx(Button, { variant: "ghost", size: "sm", onClick: other, children: t('Use another account') }), _jsx(Button, { variant: "ghost", size: "sm", onClick: out, children: t('Log out') })] }), _jsx(View, { display: "none", "$max-md": { display: 'flex' }, children: _jsxs(DropdownMenu, { placement: dir === 'rtl' ? 'bottom-start' : 'bottom-end', offset: 8, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(XStack, { render: "button", "aria-label": t('Account: {name}', { name: who }), width: 40, height: 40, rounded: 999, items: "center", justify: "center", borderWidth: 0, bg: "transparent", hoverStyle: { bg: '$hover' }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' }, cursor: "pointer", children: _jsx(Avatar, { src: avatar || null, name: who, alt: "" }) }) }), _jsxs(DropdownMenuContent, { minW: 240, maxW: "calc(100vw - 16px)", "aria-labelledby": undefined, "aria-label": t('Account'), children: [_jsx(DropdownMenuLabel, { children: _jsxs(YStack, { minW: 0, gap: 2, children: [_jsx(Text, { fontSize: "$3", fontWeight: "500", color: "$ink", numberOfLines: 1, children: who }), name && email ? (_jsx(Text, { fontSize: "$2", color: "$soft", numberOfLines: 1, children: email })) : null] }) }), _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuItem, { onSelect: other, children: _jsx(Text, { fontSize: "$3", color: "$ink", children: t('Use another account') }) }), _jsx(DropdownMenuItem, { onSelect: out, children: _jsx(Text, { fontSize: "$3", color: "$ink", children: t('Log out') }) })] })] }) })] })) : null, _jsx(WindowControls, {})] }));
37
+ } }), display: "flex", items: "center", shrink: 0, color: "var(--foreground)", textDecorationLine: "none", "data-tauri-drag-region": "deep", children: _jsx(HanzoWordmark, { label: brand(), size: 22, "data-tauri-drag-region": "deep" }) }), back, _jsx(View, { flex: 1, "data-tauri-drag-region": "deep" }), signed ? (_jsx(View, { render: "section", "aria-label": t('Account'), display: "flex", children: _jsxs(DropdownMenu, { placement: dir === 'rtl' ? 'bottom-start' : 'bottom-end', offset: 8, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(XStack, { render: "button", "aria-label": t('Account: {name}', { name: who }), width: 40, height: 40, rounded: 999, items: "center", justify: "center", borderWidth: 0, bg: "transparent", hoverStyle: { bg: '$hover' }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' }, cursor: "pointer", children: _jsx(Avatar, { src: avatar || null, name: who, alt: "" }) }) }), _jsxs(DropdownMenuContent, { minW: 240, maxW: "calc(100vw - 16px)", "aria-labelledby": undefined, "aria-label": t('Account'), children: [_jsx(DropdownMenuLabel, { children: _jsxs(YStack, { minW: 0, gap: 2, children: [_jsx(Text, { fontSize: "$3", fontWeight: "500", color: "$ink", numberOfLines: 1, children: who }), name && email ? (_jsx(Text, { fontSize: "$2", color: "$soft", numberOfLines: 1, children: email })) : null] }) }), _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuItem, { onSelect: () => window.location.assign(site('/support')), children: _jsx(Text, { fontSize: "$3", color: "$ink", children: t('Help') }) }), _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuItem, { onSelect: other, children: _jsx(Text, { fontSize: "$3", color: "$ink", children: t('Use another account') }) }), _jsx(DropdownMenuItem, { onSelect: out, children: _jsx(Text, { fontSize: "$3", color: "$ink", children: t('Log out') }) })] })] }) })) : null, _jsx(WindowControls, {})] }));
38
38
  }
package/dist/Drive.js CHANGED
@@ -153,14 +153,14 @@ export function Drive() {
153
153
  const fileInputRef = useRef(null);
154
154
  const folderInputRef = useRef(null);
155
155
  const dragCounter = useRef(0);
156
- // PROJECTS are the org's own, from the platform. `/v1/projects` answers every
156
+ // PROJECTS are the org's own, from the platform. `/v1/project` answers every
157
157
  // project this org owns; nothing stands in for it when it answers nothing.
158
158
  useEffect(() => {
159
159
  if (!ready || !client)
160
160
  return;
161
161
  let live = true;
162
162
  client.http
163
- .json({ path: '/v1/projects' })
163
+ .json({ path: '/v1/project' })
164
164
  .then((ps) => live && setProjects(Array.isArray(ps) ? ps : []))
165
165
  .catch(() => live && setProjects([]));
166
166
  return () => {
package/dist/Me.js CHANGED
@@ -148,6 +148,7 @@ export function Me({ host, narrow = false, above = false, onOrg, }) {
148
148
  const [open, setOpen] = useState(false);
149
149
  const [account, setAccount] = useState(false);
150
150
  const [lang, setLang] = useState(false);
151
+ const [langQuery, setLangQuery] = useState('');
151
152
  const [help, setHelp] = useState(false);
152
153
  const [creating, setCreating] = useState(false);
153
154
  const [keys, setKeys] = useState(false);
@@ -220,9 +221,21 @@ export function Me({ host, narrow = false, above = false, onOrg, }) {
220
221
  $touchable: narrow ? { width: 44, minH: 44 } : undefined, px: narrow ? 0 : '$2', gap: "$2.5", rounded: narrow ? 999 : '$5', items: "center", justify: narrow ? 'center' : 'flex-start', hoverStyle: { bg: '$hover' }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' }, cursor: "pointer", children: [_jsx(Face, { host: host, size: narrow ? 26 : 32 }), narrow ? null : (_jsxs(_Fragment, { children: [_jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(SizableText, { size: "$3", fontWeight: "600", color: "$ink", numberOfLines: 1, text: "start", children: who }), working ? (_jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 1, text: "start", children: working })) : null] }), isFree ? (_jsx(Button, { size: "xs", variant: "outline", "data-slot": "me-upgrade", px: "$2", py: "$0.5", rounded: "$3", onPress: (e) => {
221
222
  e?.stopPropagation?.();
222
223
  getPro();
223
- }, cursor: "pointer", children: t('Upgrade plan') })) : null, _jsx(ChevronsUpDown, { size: 14, "aria-hidden": true, opacity: 0.6 })] }))] }) }), _jsxs(DropdownMenuContent, { minW: 260, maxW: "calc(100vw - 16px)", "aria-labelledby": undefined, "aria-label": t('Account'), onCloseAutoFocus: back, children: [_jsxs(DropdownMenuSub, { open: account, onOpenChange: setAccount, children: [_jsxs(DropdownMenuSubTrigger, { minH: 48, gap: "$2.5", children: [_jsx(Face, { host: host, size: 28 }), _jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(SizableText, { size: "$2", fontWeight: "600", color: "$ink", numberOfLines: 1, children: who }), _jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 1, children: host.person.email || working })] })] }), account ? (_jsxs(DropdownMenuSubContent, { minW: 260, maxW: "calc(100vw - 16px)", pointerEvents: "auto", children: [_jsx(Meter, { read: read, onPlans: () => leave('here'), onBilling: () => (setOpen(false), showSettings('billing')) }), _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuLabel, { children: t('Organizations') }), all.map((o) => (_jsx(DropdownMenuItem, { onSelect: () => o.name !== current && onOrg(o.name), children: _jsx(Line, { icon: _jsx(Mark, { org: o }), sub: [o.personal ? t('Personal') : said(o.role, t), planFor(o) || (isFree && o.personal ? t('Free') : '')].filter(Boolean).join(' - '), trail: o.name === current ? _jsx(Check, { size: 16, "aria-label": t('Current') }) : null, children: o.display }) }, o.name))), _jsx(DropdownMenuItem, { onSelect: () => setCreating(true), children: _jsx(Line, { icon: _jsx(Plus, { size: 16, "aria-hidden": true }), children: t('Create organization') }) }), _jsx(DropdownMenuItem, { onSelect: () => out(site(settings('organization'))), children: _jsx(Line, { icon: _jsx(Settings, { size: 16, "aria-hidden": true }), children: t('Organization settings') }) }), where().team ? null : here && !here.personal ? (_jsx(DropdownMenuItem, { onSelect: () => out(`${ENTRY}&org=${encodeURIComponent(here.name)}`), children: _jsx(Line, { icon: _jsx(Users, { size: 16, "aria-hidden": true }), trail: _jsx(ArrowUpRight, { size: 14, "aria-hidden": true, opacity: 0.6 }), children: t('Open in Hanzo Team') }) })) : (_jsx(DropdownMenuItem, { onSelect: () => setCreating(true), children: _jsx(Line, { icon: _jsx(Users, { size: 16, "aria-hidden": true }), children: t('Create a team') }) })), superAdmin() ? (_jsx(DropdownMenuItem, { onSelect: choose, children: _jsx(Line, { icon: _jsx(Building2, { size: 16, "aria-hidden": true }), children: t('All organizations') }) })) : null] })) : null] }), team ? (_jsx(DropdownMenuItem, { "data-slot": "me-team", onSelect: () => team.name !== current && onOrg(team.name), children: _jsx(Line, { icon: _jsx(Mark, { org: team }), trail: team.name === current ? _jsx(Check, { size: 16, "aria-label": t('Current') }) : null, children: t('{org} · {plan}', { org: team.display, plan: teamPlan || t('No plan') }) }) })) : null, personal ? (_jsx(DropdownMenuItem, { "data-slot": "me-personal", onSelect: () => personal.name !== current && onOrg(personal.name), actionsVisibility: "always", actions: ownPlan ? undefined : (_jsx(Button, { size: "xs", variant: "outline", onPress: getPro, children: t('Upgrade plan') })), children: _jsx(Line, { icon: _jsx(CircleUserRound, { size: 16, "aria-hidden": true }), trail: personal.name === current ? _jsx(Check, { size: 16, "aria-label": t('Current') }) : null, children: t('Personal · {plan}', { plan: ownPlan || t('No plan') }) }) })) : null, _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuItem, { onSelect: () => leave('here'), children: _jsx(Line, { icon: _jsx(Sparkles, { size: 16, "aria-hidden": true }), children: t(plans) }) }), _jsx(DropdownMenuItem, { onSelect: () => showSettings('general'), children: _jsx(Line, { icon: _jsx(Palette, { size: 16, "aria-hidden": true }), children: t('Personalization') }) }), _jsx(DropdownMenuItem, { onSelect: () => showSettings('account'), children: _jsx(Line, { icon: _jsx(CircleUserRound, { size: 16, "aria-hidden": true }), children: t('Profile') }) }), _jsx(DropdownMenuItem, { "aria-keyshortcuts": "Control+, Meta+,", onSelect: () => showSettings('general'), children: _jsx(Line, { icon: _jsx(Settings, { size: 16, "aria-hidden": true }), trail: _jsx(DropdownMenuShortcut, { "aria-hidden": true, children: _jsx("bdi", { dir: "ltr", children: apple ? '⌘,' : 'Ctrl+,' }) }), children: t('Settings') }) }), _jsx(DropdownMenuItem, { onSelect: () => window.location.assign(site('/beta')), children: _jsx(Line, { icon: _jsx(FlaskConical, { size: 16, "aria-hidden": true }), children: t('Beta') }) }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuSub, { open: lang, onOpenChange: setLang, children: [_jsx(DropdownMenuSubTrigger, { children: _jsx(Line, { icon: _jsx(Languages, { size: 16, "aria-hidden": true }), children: t('Language') }) }), lang ? (_jsx(DropdownMenuSubContent, { minW: 220, maxW: "calc(100vw - 16px)", pointerEvents: "auto", children: locales
224
- .filter((l) => !l.review || l.code === locale)
225
- .map((l) => (_jsx(DropdownMenuItem, { onSelect: () => void setLocale(l.code), children: _jsx(Line, { sub: l.englishName !== l.name ? l.englishName : undefined, trail: l.code === locale ? _jsx(Check, { size: 16, "aria-label": t('Current') }) : null, children: l.name }) }, l.code))) })) : null] }), _jsxs(DropdownMenuSub, { open: help, onOpenChange: setHelp, children: [_jsx(DropdownMenuSubTrigger, { children: _jsx(Line, { icon: _jsx(LifeBuoy, { size: 16, "aria-hidden": true }), children: t('Help') }) }), help ? (_jsxs(DropdownMenuSubContent, { minW: 240, maxW: "calc(100vw - 16px)", pointerEvents: "auto", children: [pages().map((p) => (_jsx(DropdownMenuItem, { onSelect: () => out(p.href), children: _jsx(Line, { icon: ICONS[p.key], trail: p.key === 'help' ? _jsx(ArrowUpRight, { size: 14, "aria-hidden": true, opacity: 0.6 }) : null, children: t(p.label) }) }, p.key))), _jsx(DropdownMenuItem, { "aria-keyshortcuts": "Control+/ Meta+/", onSelect: () => setKeys(true), children: _jsx(Line, { icon: _jsx(Keyboard, { size: 16, "aria-hidden": true }), trail: _jsx(DropdownMenuShortcut, { "aria-hidden": true, children: _jsx("bdi", { dir: "ltr", children: apple ? '⌘/' : 'Ctrl+/' }) }), children: t('Keyboard shortcuts') }) }), _jsx(DropdownMenuSeparator, {}), legal().map((p) => (_jsx(DropdownMenuItem, { onSelect: () => out(p.href), children: _jsx(Line, { icon: ICONS[p.key], children: t(p.label) }) }, p.key)))] })) : null] }), host.signOut ? (_jsx(DropdownMenuItem, { onSelect: () => host.signOut?.(), children: _jsx(Line, { icon: _jsx(LogOut, { size: 16, "aria-hidden": true, "data-i18n-mirror": true }), children: t('Log out') }) })) : null] })] }), _jsx(Create, { open: creating, onOpenChange: setCreating }), _jsx(Shortcuts, { open: keys, onOpenChange: setKeys, apple: apple })] }));
224
+ }, cursor: "pointer", children: t('Upgrade plan') })) : null, _jsx(ChevronsUpDown, { size: 14, "aria-hidden": true, opacity: 0.6 })] }))] }) }), _jsxs(DropdownMenuContent, { minW: 260, maxW: "calc(100vw - 16px)", "aria-labelledby": undefined, "aria-label": t('Account'), onCloseAutoFocus: back, children: [_jsxs(DropdownMenuSub, { open: account, onOpenChange: setAccount, children: [_jsxs(DropdownMenuSubTrigger, { minH: 48, gap: "$2.5", children: [_jsx(Face, { host: host, size: 28 }), _jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(SizableText, { size: "$2", fontWeight: "600", color: "$ink", numberOfLines: 1, children: who }), _jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 1, children: host.person.email || working })] })] }), account ? (_jsxs(DropdownMenuSubContent, { minW: 260, maxW: "calc(100vw - 16px)", pointerEvents: "auto", children: [_jsx(Meter, { read: read, onPlans: () => leave('here'), onBilling: () => (setOpen(false), showSettings('billing')) }), _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuLabel, { children: t('Organizations') }), all.map((o) => (_jsx(DropdownMenuItem, { onSelect: () => o.name !== current && onOrg(o.name), children: _jsx(Line, { icon: _jsx(Mark, { org: o }), sub: [o.personal ? t('Personal') : said(o.role, t), planFor(o) || (isFree && o.personal ? t('Free') : '')].filter(Boolean).join(' - '), trail: o.name === current ? _jsx(Check, { size: 16, "aria-label": t('Current') }) : null, children: o.display }) }, o.name))), _jsx(DropdownMenuItem, { onSelect: () => setCreating(true), children: _jsx(Line, { icon: _jsx(Plus, { size: 16, "aria-hidden": true }), children: t('Create organization') }) }), _jsx(DropdownMenuItem, { onSelect: () => out(site(settings('organization'))), children: _jsx(Line, { icon: _jsx(Settings, { size: 16, "aria-hidden": true }), children: t('Organization settings') }) }), where().team ? null : here && !here.personal ? (_jsx(DropdownMenuItem, { onSelect: () => out(`${ENTRY}&org=${encodeURIComponent(here.name)}`), children: _jsx(Line, { icon: _jsx(Users, { size: 16, "aria-hidden": true }), trail: _jsx(ArrowUpRight, { size: 14, "aria-hidden": true, opacity: 0.6 }), children: t('Open in Hanzo Team') }) })) : (_jsx(DropdownMenuItem, { onSelect: () => setCreating(true), children: _jsx(Line, { icon: _jsx(Users, { size: 16, "aria-hidden": true }), children: t('Create a team') }) })), superAdmin() ? (_jsx(DropdownMenuItem, { onSelect: choose, children: _jsx(Line, { icon: _jsx(Building2, { size: 16, "aria-hidden": true }), children: t('All organizations') }) })) : null] })) : null] }), team ? (_jsx(DropdownMenuItem, { "data-slot": "me-team", onSelect: () => team.name !== current && onOrg(team.name), children: _jsx(Line, { icon: _jsx(Mark, { org: team }), trail: team.name === current ? _jsx(Check, { size: 16, "aria-label": t('Current') }) : null, children: t('{org} · {plan}', { org: team.display, plan: teamPlan || t('No plan') }) }) })) : null, personal ? (_jsx(DropdownMenuItem, { "data-slot": "me-personal", onSelect: () => personal.name !== current && onOrg(personal.name), actionsVisibility: "always", actions: ownPlan ? undefined : (_jsx(Button, { size: "xs", variant: "outline", onPress: getPro, children: t('Upgrade plan') })), children: _jsx(Line, { icon: _jsx(CircleUserRound, { size: 16, "aria-hidden": true }), trail: personal.name === current ? _jsx(Check, { size: 16, "aria-label": t('Current') }) : null, children: t('Personal · {plan}', { plan: ownPlan || t('No plan') }) }) })) : null, _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuItem, { onSelect: () => leave('here'), children: _jsx(Line, { icon: _jsx(Sparkles, { size: 16, "aria-hidden": true }), children: t(plans) }) }), _jsx(DropdownMenuItem, { onSelect: () => showSettings('general'), children: _jsx(Line, { icon: _jsx(Palette, { size: 16, "aria-hidden": true }), children: t('Personalization') }) }), _jsx(DropdownMenuItem, { onSelect: () => showSettings('account'), children: _jsx(Line, { icon: _jsx(CircleUserRound, { size: 16, "aria-hidden": true }), children: t('Profile') }) }), _jsx(DropdownMenuItem, { "aria-keyshortcuts": "Control+, Meta+,", onSelect: () => showSettings('general'), children: _jsx(Line, { icon: _jsx(Settings, { size: 16, "aria-hidden": true }), trail: _jsx(DropdownMenuShortcut, { "aria-hidden": true, children: _jsx("bdi", { dir: "ltr", children: apple ? '⌘,' : 'Ctrl+,' }) }), children: t('Settings') }) }), _jsx(DropdownMenuItem, { onSelect: () => window.location.assign(site('/beta')), children: _jsx(Line, { icon: _jsx(FlaskConical, { size: 16, "aria-hidden": true }), children: t('Beta') }) }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuSub, { open: lang, onOpenChange: (next) => {
225
+ setLang(next);
226
+ if (!next)
227
+ setLangQuery('');
228
+ }, children: [_jsx(DropdownMenuSubTrigger, { children: _jsx(Line, { icon: _jsx(Languages, { size: 16, "aria-hidden": true }), children: t('Language') }) }), lang ? (_jsxs(DropdownMenuSubContent, { minW: 220, maxW: 260, pointerEvents: "auto", children: [_jsx(XStack, { px: "$2", pt: "$1.5", pb: "$1", children: _jsx(SizableText, { render: _jsx("input", { type: "search", value: langQuery, onChange: (e) => setLangQuery(e.target.value), onKeyDown: (e) => e.stopPropagation(), placeholder: t('Search language...'), "aria-label": t('Search language') }), width: "100%", height: 30, px: "$2.5", rounded: "$2", borderWidth: 1, borderColor: "$borderColor", bg: "$background", color: "$ink", size: "$2" }) }), _jsx(YStack, { maxH: 260, overflowY: "auto", children: locales
229
+ .filter((l) => !l.review || l.code === locale)
230
+ .filter((l) => {
231
+ const q = langQuery.trim().toLowerCase();
232
+ if (!q)
233
+ return true;
234
+ return (l.name.toLowerCase().includes(q) ||
235
+ l.englishName.toLowerCase().includes(q) ||
236
+ l.code.toLowerCase().includes(q));
237
+ })
238
+ .map((l) => (_jsx(DropdownMenuItem, { onSelect: () => void setLocale(l.code), children: _jsx(Line, { trail: l.code === locale ? _jsx(Check, { size: 16, "aria-label": t('Current') }) : null, children: l.englishName !== l.name ? `${l.name} (${l.englishName})` : l.name }) }, l.code))) })] })) : null] }), _jsxs(DropdownMenuSub, { open: help, onOpenChange: setHelp, children: [_jsx(DropdownMenuSubTrigger, { children: _jsx(Line, { icon: _jsx(LifeBuoy, { size: 16, "aria-hidden": true }), children: t('Help') }) }), help ? (_jsxs(DropdownMenuSubContent, { minW: 240, maxW: "calc(100vw - 16px)", pointerEvents: "auto", children: [pages().map((p) => (_jsx(DropdownMenuItem, { onSelect: () => out(p.href), children: _jsx(Line, { icon: ICONS[p.key], trail: p.key === 'help' ? _jsx(ArrowUpRight, { size: 14, "aria-hidden": true, opacity: 0.6 }) : null, children: t(p.label) }) }, p.key))), _jsx(DropdownMenuItem, { "aria-keyshortcuts": "Control+/ Meta+/", onSelect: () => setKeys(true), children: _jsx(Line, { icon: _jsx(Keyboard, { size: 16, "aria-hidden": true }), trail: _jsx(DropdownMenuShortcut, { "aria-hidden": true, children: _jsx("bdi", { dir: "ltr", children: apple ? '⌘/' : 'Ctrl+/' }) }), children: t('Keyboard shortcuts') }) }), _jsx(DropdownMenuSeparator, {}), legal().map((p) => (_jsx(DropdownMenuItem, { onSelect: () => out(p.href), children: _jsx(Line, { icon: ICONS[p.key], children: t(p.label) }) }, p.key)))] })) : null] }), host.signOut ? (_jsx(DropdownMenuItem, { onSelect: () => host.signOut?.(), children: _jsx(Line, { icon: _jsx(LogOut, { size: 16, "aria-hidden": true, "data-i18n-mirror": true }), children: t('Log out') }) })) : null] })] }), _jsx(Create, { open: creating, onOpenChange: setCreating }), _jsx(Shortcuts, { open: keys, onOpenChange: setKeys, apple: apple })] }));
226
239
  }
227
240
  /** The app's keys (help.ts `KEYS`), one row each, spelled for this platform. */
228
241
  function Shortcuts({ open, onOpenChange, apple }) {
package/dist/Orgs.js CHANGED
@@ -176,7 +176,7 @@ export function Orgs({ children, front = false, forward, signup = false, }) {
176
176
  if (!slug)
177
177
  return;
178
178
  client.http
179
- .json({ method: 'POST', path: '/v1/projects/fork', body: { slug } })
179
+ .json({ method: 'POST', path: '/v1/project/fork', body: { slug } })
180
180
  .then((made) => {
181
181
  if (made?.id)
182
182
  window.location.assign(dev());
@@ -866,7 +866,7 @@ function Plan({ org, members, onSwitch, outage, onRetry, seats: wanted = 1, setu
866
866
  // catalog row and can rise after the first paint.
867
867
  const [asked, setSeats] = useState(wanted);
868
868
  const seats = Math.max(floor, asked);
869
- const [term, setTerm] = useState('month');
869
+ const [term, setTerm] = useState('year');
870
870
  const monthly = (plan && charge(plan, 'month')) ?? 0;
871
871
  const yearly = plan ? charge(plan, 'year') : null;
872
872
  const each = term === 'year' && yearly ? yearly : monthly;
package/dist/Palette.js CHANGED
@@ -23,7 +23,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
23
  // here as the reader types: the conversations store (hanzoai/agent) answers its
24
24
  // whole list and searches nothing, titles or words, so a title is all there is
25
25
  // to find a chat by. The chats are the sidebar's last read (thread.tsx
26
- // `useThreadList`), drawn at once; the projects (`/v1/projects`), the active
26
+ // `useThreadList`), drawn at once; the projects (`/v1/project`), the active
27
27
  // skills (`/v1/tool/skills?activated=true`), the connectors
28
28
  // (`/v1/tool/mcp/servers`) and the agents (crew.tsx) arrive while the reader
29
29
  // types, and a read the palette closes on is aborted.
@@ -164,7 +164,7 @@ function useRead(path, shape) {
164
164
  const obj = (v) => (v && typeof v === 'object' ? v : {});
165
165
  const str = (v) => (typeof v === 'string' ? v : '');
166
166
  const list = (v) => (Array.isArray(v) ? v : []);
167
- /** `/v1/projects`: a project by its slug, found by its name, slug and repository. */
167
+ /** `/v1/project`: a project by its slug, found by its name, slug and repository. */
168
168
  /**
169
169
  * The builder as a frame without it holds it (hanzo.team's Shell): nobody signed
170
170
  * in to it, so `useSessions` reads no runs. The hook reads `api`, `token`, `org`
@@ -191,7 +191,7 @@ export function Palette({ onClose, go, actions: frame = [], mode = 'chat', host,
191
191
  const [keys, setKeys] = useState(false);
192
192
  const { threads } = useThreadList();
193
193
  const { agents } = useCrew();
194
- const repos = useRead('/v1/projects', projects);
194
+ const repos = useRead('/v1/project', projects);
195
195
  const known = useRead('/v1/tool/skills?activated=true', skills);
196
196
  const plugged = useRead('/v1/tool/mcp/servers', connectors);
197
197
  const signOut = useSignOut();
@@ -45,7 +45,7 @@ export declare function useSections({ at, said, held, deck, onCreate }: {
45
45
  onCreate: () => void;
46
46
  }): Section[];
47
47
  /**
48
- * The organization's sites, as an empty tab suggests them: `GET /v1/projects`,
48
+ * The organization's sites, as an empty tab suggests them: `GET /v1/project`,
49
49
  * every row with a live address. Read once a conversation; nothing on a refusal.
50
50
  */
51
51
  export declare function useSites(): {
package/dist/RightPane.js CHANGED
@@ -223,7 +223,7 @@ export function useSections({ at, said, held, deck, onCreate }) {
223
223
  }, [at, made, took, done, deck, ai, onCreate, t]);
224
224
  }
225
225
  /**
226
- * The organization's sites, as an empty tab suggests them: `GET /v1/projects`,
226
+ * The organization's sites, as an empty tab suggests them: `GET /v1/project`,
227
227
  * every row with a live address. Read once a conversation; nothing on a refusal.
228
228
  */
229
229
  export function useSites() {
@@ -232,7 +232,7 @@ export function useSites() {
232
232
  const [rows, setRows] = useState([]);
233
233
  useEffect(() => {
234
234
  const stop = new AbortController();
235
- fetch(`${api()}/v1/projects`, { headers: scope(), signal: stop.signal })
235
+ fetch(`${api()}/v1/project`, { headers: scope(), signal: stop.signal })
236
236
  .then((r) => (r.ok ? r.json() : null))
237
237
  .then((body) => {
238
238
  if (stop.signal.aborted)
@@ -85,9 +85,14 @@ function Model() {
85
85
  const { isAuthenticated } = useIam();
86
86
  const { tier } = useTier(isAuthenticated, org());
87
87
  const paid = Boolean(tier?.plan && tier.plan !== 'free');
88
- return (_jsxs(YStack, { gap: "$5", maxW: 540, children: [_jsxs(YStack, { gap: "$2", children: [_jsx(Text, { fontSize: "$4", fontWeight: "600", color: "$ink", children: t('Default model') }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('Used for new chats and runs. An agent with its own model keeps that choice.') }), _jsx(XStack, { self: "flex-start", pt: "$1", children: _jsx(ModelPicker, { models: models, scope: "chat", value: choice.model, onChange: (id) => choose({ model: id }), size: "sm" }) })] }), _jsx(Separator, {}), _jsxs(YStack, { gap: "$2", children: [_jsx(Text, { fontSize: "$4", fontWeight: "600", color: "$ink", children: t('Default reasoning effort') }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('Sets how deeply models think before answering. Defaults to Auto across all plans.') }), _jsx(XStack, { gap: "$2", pt: "$1", flexWrap: "wrap", children: EFFORT_STEPS.map((step) => {
89
- const active = (choice.effort || 'auto') === step.id;
90
- return (_jsx(Box, { render: _jsx("button", { type: "button" }), ...tap, onClick: () => choose({ effort: step.id }), ...CHOICE, bg: active ? 'var(--edge, var(--white-14))' : 'transparent', borderColor: active ? 'var(--borderColor, var(--white-22))' : 'var(--white-08)', py: 6, px: 12, children: _jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Text, { fontSize: "$2", fontWeight: active ? '600' : '400', color: active ? '$ink' : '$soft', children: step.label }), active ? _jsx(Check, { size: 12, color: "var(--primary)", "aria-hidden": true }) : null] }) }, step.id));
88
+ return (_jsxs(YStack, { gap: "$5", maxW: 540, children: [_jsxs(YStack, { gap: "$2", children: [_jsx(Text, { fontSize: "$4", fontWeight: "600", color: "$ink", children: t('Default model') }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('Used for new chats and runs. An agent with its own model keeps that choice.') }), _jsx(XStack, { self: "flex-start", pt: "$1", children: _jsx(ModelPicker, { models: models, scope: "chat", value: choice.model, onChange: (id) => choose({ model: id }), size: "sm" }) })] }), _jsx(Separator, {}), _jsxs(YStack, { gap: "$2", children: [_jsx(Text, { fontSize: "$4", fontWeight: "600", color: "$ink", children: t('Default reasoning effort') }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('Sets how deeply models think before answering. Defaults to High across all plans.') }), _jsx(XStack, { gap: "$2", pt: "$1", flexWrap: "wrap", children: EFFORT_STEPS.map((step) => {
89
+ const active = (chatPrefs.effort || 'high') === step.id;
90
+ return (_jsx(Box, { render: _jsx("button", { type: "button" }), ...tap, onClick: () => {
91
+ setChatPrefs({ effort: step.id });
92
+ if (step.id === 'low' || step.id === 'medium' || step.id === 'high') {
93
+ choose({ effort: step.id });
94
+ }
95
+ }, ...CHOICE, bg: active ? 'var(--edge, var(--white-14))' : 'transparent', borderColor: active ? 'var(--borderColor, var(--white-22))' : 'var(--white-08)', py: 6, px: 12, children: _jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Text, { fontSize: "$2", fontWeight: active ? '600' : '400', color: active ? '$ink' : '$soft', children: step.label }), active ? _jsx(Check, { size: 12, color: "var(--primary)", "aria-hidden": true }) : null] }) }, step.id));
91
96
  }) })] }), _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] })] }));
92
97
  }
93
98
  /**
package/dist/Shell.js CHANGED
@@ -490,7 +490,7 @@ function Projects({ filter, onPick, }) {
490
490
  let live = true;
491
491
  setWrong(null);
492
492
  client.http
493
- .json({ path: "/v1/projects" })
493
+ .json({ path: "/v1/project" })
494
494
  .then((found) => live && setRows(Array.isArray(found) ? found : []))
495
495
  .catch((e) => {
496
496
  if (!live)
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- export type EffortLevel = 'auto' | 'low' | 'medium' | 'high';
2
+ export type EffortLevel = 'auto' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
3
+ export declare const DEFAULT_EFFORT: EffortLevel;
3
4
  export interface EffortStep {
4
5
  id: EffortLevel;
5
6
  label: string;
@@ -15,6 +16,6 @@ export interface ThinkingEffortProps {
15
16
  * Native iOS widget-style Thinking effort selector matching standard Safari mobile symmetry:
16
17
  * - Subtle pill button: "Thinking effort ⌄"
17
18
  * - Segmented slider popover with discrete stop dots and smooth active fill
18
- * - Default level: "auto" across all plans
19
+ * - Default level: "high" across all plans
19
20
  */
20
21
  export declare function ThinkingEffort({ effort, onChange, disabled }: ThinkingEffortProps): React.JSX.Element;
@@ -4,25 +4,29 @@ import { useRef, useState } from 'react';
4
4
  import { Box, Popover, PopoverContent, PopoverTrigger, Text, XStack, YStack } from '@hanzo/ui';
5
5
  import { ChevronDown, ChevronRight } from 'lucide-react';
6
6
  import { useI18n } from '@hanzo/i18n/react';
7
+ export const DEFAULT_EFFORT = 'high';
7
8
  export const EFFORT_STEPS = [
8
9
  { id: 'auto', label: 'Auto', note: 'Adaptive reasoning based on task complexity' },
9
10
  { id: 'low', label: 'Low', note: 'A quick pass with minimal thinking' },
10
11
  { id: 'medium', label: 'Medium', note: 'Thinks before answering' },
11
- { id: 'high', label: 'High', note: 'Slow and deep reasoning for hard problems' },
12
+ { id: 'high', label: 'High', note: 'Deep reasoning for complex problems' },
13
+ { id: 'xhigh', label: 'XHigh', note: 'Extended multi-step reasoning for hard tasks' },
14
+ { id: 'max', label: 'Max', note: 'Maximum compute and exhaustive verification' },
12
15
  ];
13
16
  /**
14
17
  * Native iOS widget-style Thinking effort selector matching standard Safari mobile symmetry:
15
18
  * - Subtle pill button: "Thinking effort ⌄"
16
19
  * - Segmented slider popover with discrete stop dots and smooth active fill
17
- * - Default level: "auto" across all plans
20
+ * - Default level: "high" across all plans
18
21
  */
19
- export function ThinkingEffort({ effort = 'auto', onChange, disabled = false }) {
22
+ export function ThinkingEffort({ effort = DEFAULT_EFFORT, onChange, disabled = false }) {
20
23
  const { t } = useI18n();
21
24
  const [open, setOpen] = useState(false);
22
25
  const [dragging, setDragging] = useState(false);
23
26
  const trackRef = useRef(null);
24
- const activeIndex = Math.max(0, EFFORT_STEPS.findIndex((s) => s.id === effort));
25
- const current = EFFORT_STEPS[activeIndex] ?? EFFORT_STEPS[0];
27
+ const foundIndex = EFFORT_STEPS.findIndex((s) => s.id === effort);
28
+ const activeIndex = foundIndex >= 0 ? foundIndex : EFFORT_STEPS.findIndex((s) => s.id === DEFAULT_EFFORT);
29
+ const current = EFFORT_STEPS[activeIndex] ?? EFFORT_STEPS[3];
26
30
  const updateFromPosition = (clientX) => {
27
31
  if (!trackRef.current)
28
32
  return;
@@ -61,7 +65,13 @@ export function ThinkingEffort({ effort = 'auto', onChange, disabled = false })
61
65
  e.preventDefault();
62
66
  setOpen(true);
63
67
  }
64
- }, children: [_jsx(Text, { fontSize: "$2", fontWeight: "500", color: "$ink", children: t('Thinking effort') }), _jsx(ChevronDown, { size: 12, color: "var(--soft, var(--muted-foreground))", "aria-hidden": true })] }) }), _jsx(PopoverContent, { solid: true, align: "end", p: "$3", width: 240, rounded: "$4", bg: "var(--pane-fill, var(--surface-card))", borderWidth: 1, borderColor: "var(--pane-edge, var(--white-15))", boxShadow: "var(--shadow-sheet-1)", backdropFilter: "var(--pane-blur, blur(24px) saturate(190%))", children: _jsxs(YStack, { gap: "$3", "data-slot": "thinking-effort-card", role: "dialog", "aria-label": t('Thinking effort'), children: [_jsxs(XStack, { items: "center", justify: "center", gap: "$1", cursor: "pointer", onClick: () => { }, children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", children: current.label }), _jsx(ChevronRight, { size: 14, color: "var(--soft, var(--muted-foreground))", "aria-hidden": true })] }), _jsxs(Box, { ref: trackRef, "data-slot": "thinking-slider-track", role: "slider", "aria-valuemin": 0, "aria-valuemax": 3, "aria-valuenow": activeIndex, "aria-valuetext": current.label, position: "relative", width: "100%", height: 28, rounded: 9999, bg: "var(--edge, var(--white-14))", cursor: "pointer", onPointerDown: handlePointerDown, onPointerMove: handlePointerMove, onPointerUp: handlePointerUp, onPointerCancel: () => setDragging(false),
68
+ }, children: [_jsx(Text, { fontSize: "$2", fontWeight: "500", color: "$ink", children: t('Thinking effort') }), _jsx(ChevronDown, { size: 12, color: "var(--soft, var(--muted-foreground))", "aria-hidden": true })] }) }), _jsx(PopoverContent, { solid: true, align: "end", p: "$3", width: 240, rounded: "$4", bg: "var(--pane-fill, var(--surface-card))", borderWidth: 1, borderColor: "var(--pane-edge, var(--white-15))", boxShadow: "var(--shadow-sheet-1)", backdropFilter: "var(--pane-blur, blur(24px) saturate(190%))", children: _jsxs(YStack, { gap: "$3", "data-slot": "thinking-effort-card", role: "dialog", "aria-label": t('Thinking effort'), children: [_jsxs(XStack, { items: "center", justify: "center", gap: "$1", cursor: "pointer", onClick: () => {
69
+ if (disabled)
70
+ return;
71
+ const next = EFFORT_STEPS[(activeIndex + 1) % EFFORT_STEPS.length];
72
+ if (next)
73
+ onChange(next.id);
74
+ }, children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", children: current.label }), _jsx(ChevronRight, { size: 14, color: "var(--soft, var(--muted-foreground))", "aria-hidden": true })] }), _jsxs(Box, { ref: trackRef, "data-slot": "thinking-slider-track", role: "slider", "aria-valuemin": 0, "aria-valuemax": EFFORT_STEPS.length - 1, "aria-valuenow": activeIndex, "aria-valuetext": current.label, position: "relative", width: "100%", height: 28, rounded: 9999, bg: "var(--edge, var(--white-14))", cursor: "pointer", onPointerDown: handlePointerDown, onPointerMove: handlePointerMove, onPointerUp: handlePointerUp, onPointerCancel: () => setDragging(false),
65
75
  // inline-style: touch-action for discrete slider gestures
66
76
  style: { touchAction: 'none' }, children: [_jsx(Box, { position: "absolute", insetInlineStart: 0, t: 0, b: 0, rounded: 9999, bg: "var(--accent, var(--primary))",
67
77
  // inline-style: dynamic percentage width of active effort slider fill
package/dist/bots/api.js CHANGED
@@ -69,7 +69,7 @@ export const tools = (c) => rpc(c, 'tools/list').then((r) => r.tools ?? []);
69
69
  export const call = (c, name, op, input = {}) => rpc(c, 'tools/call', { name, arguments: { op, input } }).then((r) => (r.content ?? []).map((p) => p.text ?? '').join('\n'));
70
70
  /** Starts one autonomous coding run against a repo in the caller's org. */
71
71
  export const workOn = (c, params) => c.http.json({ method: 'POST', path: '/v1/agents/coding', body: params });
72
- export const projects = (c, signal) => c.http.json({ path: '/v1/projects', signal });
72
+ export const projects = (c, signal) => c.http.json({ path: '/v1/project', signal });
73
73
  export const secrets = (c, path, signal) => c.http.collection('secrets', { path: '/v1/kms/secrets', query: { path }, signal });
74
74
  export const connectors = (c, signal) => c.http.collection('connectors', { path: '/v1/integrations/connectors', signal });
75
75
  export const grant = (c, id, kind) => c.http.json({ method: 'POST', path: `/v1/sandbox/${encodeURIComponent(id)}/${kind}/ticket` });
@@ -1,6 +1,8 @@
1
+ import { type EffortLevel } from '../ThinkingEffort.js';
1
2
  export interface ChatPreferences {
2
3
  showModelSelector: boolean;
3
4
  allowThirdPartyModels: boolean;
5
+ effort: EffortLevel;
4
6
  }
5
7
  export declare function getChatPreferences(): ChatPreferences;
6
8
  export declare function setChatPreferences(patch: Partial<ChatPreferences>): ChatPreferences;
@@ -4,12 +4,17 @@
4
4
  * - allowThirdPartyModels: whether 3rd-party models (OpenAI, Anthropic, etc.) are enabled via pre-paid credit (default: false)
5
5
  */
6
6
  import { useEffect, useState } from 'react';
7
+ import { DEFAULT_EFFORT, EFFORT_STEPS } from '../ThinkingEffort.js';
7
8
  const STORAGE_KEY = 'hanzo.chat.preferences';
8
9
  const EVENT_NAME = 'hanzo:chat:preferences';
9
10
  const DEFAULT_PREFERENCES = {
10
11
  showModelSelector: false,
11
12
  allowThirdPartyModels: false,
13
+ effort: DEFAULT_EFFORT,
12
14
  };
15
+ function validEffort(v) {
16
+ return EFFORT_STEPS.some((s) => s.id === v) ? v : DEFAULT_EFFORT;
17
+ }
13
18
  export function getChatPreferences() {
14
19
  if (typeof window === 'undefined')
15
20
  return DEFAULT_PREFERENCES;
@@ -21,6 +26,7 @@ export function getChatPreferences() {
21
26
  return {
22
27
  showModelSelector: Boolean(parsed.showModelSelector),
23
28
  allowThirdPartyModels: Boolean(parsed.allowThirdPartyModels),
29
+ effort: validEffort(parsed.effort),
24
30
  };
25
31
  }
26
32
  catch {
package/dist/lib/home.js CHANGED
@@ -38,7 +38,7 @@ import { settings } from './host.js';
38
38
  export const invite = () => site(settings('members'));
39
39
  /** The org's projects, newest first. */
40
40
  export async function projects(client, signal) {
41
- const rows = await client.http.json({ path: '/v1/projects', signal });
41
+ const rows = await client.http.json({ path: '/v1/project', signal });
42
42
  if (!Array.isArray(rows))
43
43
  return [];
44
44
  return [...rows].sort((a, b) => (b.updatedAt ?? 0) - (a.updatedAt ?? 0));
package/dist/lib/todo.js CHANGED
@@ -189,7 +189,7 @@ export async function projects(client, signal) {
189
189
  .catch(() => null),
190
190
  client.http
191
191
  .json({
192
- path: '/v1/projects',
192
+ path: '/v1/project',
193
193
  signal,
194
194
  })
195
195
  .catch(() => null),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/app",
3
- "version": "0.2.13",
3
+ "version": "0.2.15",
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",