@hanzo/app 0.2.58 → 0.2.59

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.
Files changed (85) hide show
  1. package/dist/App.js +1 -4
  2. package/dist/Board.js +37 -121
  3. package/dist/Boxes.js +12 -16
  4. package/dist/CalScheduler.js +40 -81
  5. package/dist/Chat.js +84 -78
  6. package/dist/Chrome.d.ts +2 -14
  7. package/dist/Chrome.js +7 -44
  8. package/dist/Column.js +6 -2
  9. package/dist/Contents.d.ts +1 -1
  10. package/dist/Contents.js +2 -1
  11. package/dist/Drive.js +100 -121
  12. package/dist/Inbox.js +7 -7
  13. package/dist/Market.js +10 -15
  14. package/dist/Meet.js +48 -78
  15. package/dist/Orgs.js +10 -9
  16. package/dist/Palette.d.ts +1 -1
  17. package/dist/Palette.js +2 -1
  18. package/dist/Rail.js +3 -3
  19. package/dist/Schedule.js +11 -15
  20. package/dist/Settings.d.ts +1 -1
  21. package/dist/SettingsPane.js +2 -2
  22. package/dist/Shared.js +11 -16
  23. package/dist/Shell.js +1 -1
  24. package/dist/Talk.js +4 -4
  25. package/dist/Terminals.js +1 -3
  26. package/dist/Top.js +1 -1
  27. package/dist/Usage.js +3 -3
  28. package/dist/WindowControls.js +3 -5
  29. package/dist/Work.js +28 -51
  30. package/dist/bots/Bots.js +73 -129
  31. package/dist/bots/runtime.js +41 -103
  32. package/dist/cast.d.ts +1 -1
  33. package/dist/cast.js +1 -1
  34. package/dist/failure.d.ts +1 -1
  35. package/dist/failure.js +1 -1
  36. package/dist/ground.d.ts +14 -0
  37. package/dist/ground.js +14 -0
  38. package/dist/lib/limits.d.ts +1 -1
  39. package/dist/lib/limits.js +1 -1
  40. package/dist/lib/org.d.ts +3 -3
  41. package/dist/lib/org.js +5 -4
  42. package/dist/lib/orgname.d.ts +1 -1
  43. package/dist/lib/orgname.js +1 -1
  44. package/dist/lib/pay.d.ts +2 -6
  45. package/dist/lib/pay.js +2 -15
  46. package/dist/lib/plans.d.ts +1 -1
  47. package/dist/lib/plans.js +1 -1
  48. package/dist/lib/tier.d.ts +2 -2
  49. package/dist/lib/tier.js +6 -6
  50. package/dist/look.js +8 -10
  51. package/dist/recent.d.ts +1 -1
  52. package/dist/recent.js +2 -1
  53. package/dist/say.d.ts +4 -0
  54. package/dist/say.js +7 -0
  55. package/dist/thread.js +1 -1
  56. package/package.json +3 -3
  57. package/assets/memoji/art.svg +0 -22
  58. package/assets/memoji/cyber.svg +0 -22
  59. package/assets/memoji/data.svg +0 -22
  60. package/assets/memoji/des.svg +0 -22
  61. package/assets/memoji/dev.svg +0 -22
  62. package/assets/memoji/doc.svg +0 -22
  63. package/assets/memoji/edu.svg +0 -22
  64. package/assets/memoji/fin.svg +0 -22
  65. package/assets/memoji/gov.svg +0 -22
  66. package/assets/memoji/huma.svg +0 -22
  67. package/assets/memoji/lang.svg +0 -22
  68. package/assets/memoji/law.svg +0 -22
  69. package/assets/memoji/mana.svg +0 -22
  70. package/assets/memoji/mark.svg +0 -22
  71. package/assets/memoji/mu.svg +0 -22
  72. package/assets/memoji/opera.svg +0 -22
  73. package/assets/memoji/rev.svg +0 -22
  74. package/assets/memoji/sal.svg +0 -22
  75. package/assets/memoji/sci.svg +0 -22
  76. package/assets/memoji/su.svg +0 -22
  77. package/assets/memoji/vi.svg +0 -22
  78. package/dist/TeamPreview.d.ts +0 -9
  79. package/dist/TeamPreview.js +0 -305
  80. package/dist/TeamStory.d.ts +0 -49
  81. package/dist/TeamStory.js +0 -67
  82. package/dist/preview.d.ts +0 -84
  83. package/dist/preview.js +0 -120
  84. package/dist/workday.d.ts +0 -247
  85. package/dist/workday.js +0 -642
@@ -2,127 +2,97 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useState, useEffect } from 'react';
4
4
  import { Calendar as CalendarIcon, Plus, Bot, Video, ExternalLink, Zap, Trash2, X, } from 'lucide-react';
5
- import { phrase } from '@hanzo/i18n';
6
5
  import { Text, View, XStack, YStack } from '@hanzo/gui';
7
6
  import { Button } from '@hanzo/ui';
8
- import { useI18n } from '@hanzo/i18n/react';
9
7
  const DEFAULT_EVENTS = [
10
8
  {
11
9
  id: 'evt-1',
12
- title: phrase('Daily Morning AI Intelligence Digest'),
10
+ title: 'Daily Morning AI Intelligence Digest',
13
11
  type: 'bot_automation',
14
12
  date: '2026-09-04',
15
13
  time: '09:00',
16
- duration: phrase('15m'),
14
+ duration: '15m',
17
15
  botName: 'Chief',
18
16
  cronPattern: '0 9 * * 1-5',
19
- description: phrase('Scrape breaking frontier AI papers, benchmark shifts, and repo PRs into team Slack.'),
17
+ description: 'Scrape breaking frontier AI papers, benchmark shifts, and repo PRs into team Slack.',
20
18
  status: 'scheduled',
21
19
  },
22
20
  {
23
21
  id: 'evt-2',
24
- title: phrase('Platform Architecture & Inference Sync'),
22
+ title: 'Platform Architecture & Inference Sync',
25
23
  type: 'meeting',
26
24
  date: '2026-09-04',
27
25
  time: '18:00',
28
- duration: phrase('45m'),
26
+ duration: '45m',
29
27
  meetUrl: 'https://meet.hanzo.ai/platform-architecture',
30
28
  botName: 'Hanzo Coder (Bot Co-pilot)',
31
- description: phrase('Sync on port 9005 drive server performance and ingress routing.'),
29
+ description: 'Sync on port 9005 drive server performance and ingress routing.',
32
30
  status: 'scheduled',
33
31
  },
34
32
  {
35
33
  id: 'evt-3',
36
- title: phrase('Autonomous Outbound Prospecting Run'),
34
+ title: 'Autonomous Outbound Prospecting Run',
37
35
  type: 'bot_automation',
38
36
  date: '2026-09-04',
39
37
  time: '11:00',
40
- duration: phrase('60m'),
38
+ duration: '60m',
41
39
  botName: 'Sales Outbound',
42
40
  cronPattern: '0 11 * * 1-5',
43
- description: phrase('Extract 50 lookalike enterprise leads and prepare personalized drafts.'),
41
+ description: 'Extract 50 lookalike enterprise leads and prepare personalized drafts.',
44
42
  status: 'scheduled',
45
43
  },
46
44
  {
47
45
  id: 'evt-4',
48
- title: phrase('Hourly GitHub PR & Typecheck Review'),
46
+ title: 'Hourly GitHub PR & Typecheck Review',
49
47
  type: 'agent_query',
50
48
  date: '2026-09-04',
51
49
  time: '14:00',
52
- duration: phrase('20m'),
50
+ duration: '20m',
53
51
  botName: 'Hanzo Coder',
54
52
  cronPattern: '0 * * * *',
55
- description: phrase('Verify type safety and lint across all open PRs in hanzoai organization.'),
53
+ description: 'Verify type safety and lint across all open PRs in hanzoai organization.',
56
54
  status: 'scheduled',
57
55
  },
58
56
  {
59
57
  id: 'evt-5',
60
- title: phrase('Research Review'),
58
+ title: 'Research Review',
61
59
  type: 'meeting',
62
60
  date: '2026-09-04',
63
61
  time: '20:00',
64
- duration: phrase('60m'),
62
+ duration: '60m',
65
63
  meetUrl: 'https://meet.hanzo.ai/research-review',
66
64
  botName: 'Hanzo Researcher',
67
- description: phrase('Review datasets and proofs for the week’s research runs.'),
65
+ description: 'Review datasets and proofs for the week’s research runs.',
68
66
  status: 'scheduled',
69
67
  },
70
68
  ];
71
69
  /** The public booking pages, one card each on the Booker tab. */
72
70
  const BOOKINGS = [
73
71
  {
74
- title: phrase('Quick Sync'),
75
- duration: phrase('15m'),
72
+ title: 'Quick Sync',
73
+ duration: '15m',
76
74
  slug: '15min',
77
- description: phrase('Fast 15-minute alignment or triage call on Hanzo Meet.'),
75
+ description: 'Fast 15-minute alignment or triage call on Hanzo Meet.',
78
76
  },
79
77
  {
80
- title: phrase('Technical Deep Dive'),
81
- duration: phrase('30m'),
78
+ title: 'Technical Deep Dive',
79
+ duration: '30m',
82
80
  slug: '30min',
83
- description: phrase('In-depth architectural review, bug diagnosis, or sprint planning.'),
81
+ description: 'In-depth architectural review, bug diagnosis, or sprint planning.',
84
82
  },
85
83
  {
86
- title: phrase('AI Pair Programming'),
87
- duration: phrase('45m'),
84
+ title: 'AI Pair Programming',
85
+ duration: '45m',
88
86
  slug: 'pair-ai',
89
- description: phrase('Interactive coding session with Hanzo Coder assisting in the terminal.'),
87
+ description: 'Interactive coding session with Hanzo Coder assisting in the terminal.',
90
88
  },
91
89
  {
92
- title: phrase('Executive & Strategy Sync'),
93
- duration: phrase('60m'),
90
+ title: 'Executive & Strategy Sync',
91
+ duration: '60m',
94
92
  slug: '60min',
95
- description: phrase('Quarterly roadmap sync, partnerships, and leadership decision forum.'),
93
+ description: 'Quarterly roadmap sync, partnerships, and leadership decision forum.',
96
94
  },
97
95
  ];
98
- /** Demo titles and descriptions. A reader's own event is drawn as they wrote it. */
99
- const AUTHORED = new Set(DEFAULT_EVENTS.flatMap((event) => [event.title, event.description].filter((line) => Boolean(line))));
100
- const TYPE_LABEL = {
101
- meeting: phrase('meeting'),
102
- bot_automation: phrase('bot automation'),
103
- agent_query: phrase('agent query'),
104
- };
105
- /** A bot's label. Names stay as written; a role this screen authors is translated. */
106
- function botLabel(name, t) {
107
- switch (name) {
108
- case 'Sales Outbound':
109
- return t('Sales Outbound');
110
- case 'Inbox Manager':
111
- return t('Inbox Manager');
112
- case 'Account Manager':
113
- return t('Account Manager');
114
- case 'Talent Scout':
115
- return t('Talent Scout');
116
- case 'Expense Manager':
117
- return t('Expense Manager');
118
- case 'Offsite crew':
119
- return t('Offsite crew');
120
- case 'Hanzo Coder (Bot Co-pilot)':
121
- return t('{name} (Bot Co-pilot)', { name: 'Hanzo Coder' });
122
- default:
123
- return name;
124
- }
125
- }
126
96
  /** design's smallest rung (`--text-floor`, 10px), below gui's `$1`; gui's font size takes a rung or a number. */
127
97
  const FLOOR = 10;
128
98
  const MODAL = 'var(--z-modal)';
@@ -140,7 +110,6 @@ const FIELD = {
140
110
  /** A dialog label. */
141
111
  const LABEL = { render: 'label', fontSize: '$1', color: '$soft', mb: 4, display: 'block' };
142
112
  export function CalScheduler() {
143
- const { t, locale } = useI18n();
144
113
  const [events, setEvents] = useState(() => {
145
114
  if (typeof window !== 'undefined') {
146
115
  try {
@@ -208,30 +177,20 @@ export function CalScheduler() {
208
177
  const handleDeleteEvent = (id) => {
209
178
  setEvents((prev) => prev.filter((e) => e.id !== id));
210
179
  };
211
- return (_jsxs(YStack, { width: "100%", height: "100%", bg: "$background", overflowX: "auto", overflowY: "auto", children: [_jsxs(XStack, { minH: 56, px: 24, py: 8, gap: 10, flexWrap: "wrap", bg: "$panel", borderBottomWidth: 1, borderBottomColor: "$borderColor", items: "center", justify: "space-between", children: [_jsxs(XStack, { items: "center", gap: 12, shrink: 1, minW: "auto", children: [_jsx(XStack, { width: 32, height: 32, rounded: 8, bg: "$raised", items: "center", justify: "center", shrink: 1, minW: "auto", children: _jsx(CalendarIcon, { size: 18, color: "var(--foreground)" }) }), _jsxs(YStack, { shrink: 1, minW: "auto", children: [_jsxs(XStack, { items: "center", gap: 8, children: [_jsx(Text, { fontSize: "$4", fontWeight: "700", color: "$ink", children: t('Hanzo Calendar & Scheduler') }), _jsx(Text, { fontSize: FLOOR, fontWeight: "700", bg: "$hover", color: "$soft", borderWidth: 1, borderColor: "$borderColor", px: 6, py: 1, rounded: 4, children: "cal.hanzo.ai" })] }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Full unified scheduler across meetings, bot routines, automated crons, and query triggers') })] })] }), _jsxs(XStack, { items: "center", gap: 10, shrink: 1, minW: "auto", flexWrap: "wrap", children: [_jsx(XStack, { items: "center", gap: 2, bg: "$hover", rounded: 8, p: 2, borderWidth: 1, borderColor: "$borderColor", shrink: 1, minW: "auto", children: [
212
- { id: 'scheduler', label: t('Master Schedule') },
213
- { id: 'automations', label: t('Bot Crons') },
214
- { id: 'booker', label: t('Public Booker') },
215
- ].map((tab) => (_jsx(Button, { size: "sm", variant: activeTab === tab.id ? 'primary' : 'ghost', ...(activeTab === tab.id ? null : { color: '$soft' }), "aria-pressed": activeTab === tab.id, onClick: () => setActiveTab(tab.id), children: tab.label }, tab.id))) }), _jsxs(Button, { variant: "primary", size: "sm", onClick: () => setShowModal(true), children: [_jsx(Plus, { size: 14 }), t('Schedule Event / Routine')] })] })] }), activeTab === 'booker' ? (_jsxs(YStack, { flex: 1, p: 28, overflowY: "auto", gap: 20, children: [_jsxs(YStack, { gap: 4, children: [_jsx(Text, { fontSize: "$7", fontWeight: "800", color: "$ink", children: t('Public Booking Pages') }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('Shareable links powered by the Cal.com fork at {link}. Allows teammates, clients, and automated agents to book dedicated time slots.', {
216
- link: (_jsx(Text, { render: _jsx("a", { href: "https://cal.hanzo.ai", target: "_blank", rel: "noopener noreferrer" }), color: "$ink", textDecorationLine: "underline", children: "cal.hanzo.ai" })),
217
- }) })] }), _jsx(View, { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(300px, 1fr))", gap: 16, children: BOOKINGS.map((card) => (_jsxs(YStack, { bg: "$panel", borderWidth: 1, borderColor: "$borderColor", rounded: 10, p: 18, gap: 12, children: [_jsxs(XStack, { items: "center", justify: "space-between", children: [_jsx(Text, { fontSize: "$4", fontWeight: "700", color: "$ink", children: t(card.title) }), _jsx(Text, { fontSize: "$1", fontWeight: "700", bg: "$hover", px: 8, py: 2, rounded: 4, color: "$soft", children: t(card.duration) })] }), _jsx(Text, { fontSize: "$2", color: "$soft", lineHeight: "$2", children: t(card.description) }), _jsxs(Text, { px: 10, py: 8, bg: "$sunken", rounded: 6, fontSize: "$1", fontFamily: "$mono", color: "$soft", children: ["https://cal.hanzo.ai/alex/", card.slug] }), _jsxs(XStack, { gap: 8, mt: 4, children: [_jsx(Button, { size: "sm", flex: 1, onClick: () => {
180
+ return (_jsxs(YStack, { width: "100%", height: "100%", bg: "$background", overflowX: "auto", overflowY: "auto", children: [_jsxs(XStack, { minH: 56, px: 24, py: 8, gap: 10, flexWrap: "wrap", bg: "$panel", borderBottomWidth: 1, borderBottomColor: "$borderColor", items: "center", justify: "space-between", children: [_jsxs(XStack, { items: "center", gap: 12, shrink: 1, minW: "auto", children: [_jsx(XStack, { width: 32, height: 32, rounded: 8, bg: "$raised", items: "center", justify: "center", shrink: 1, minW: "auto", children: _jsx(CalendarIcon, { size: 18, color: "var(--foreground)" }) }), _jsxs(YStack, { shrink: 1, minW: "auto", children: [_jsxs(XStack, { items: "center", gap: 8, children: [_jsx(Text, { fontSize: "$4", fontWeight: "700", color: "$ink", children: "Hanzo Calendar & Scheduler" }), _jsx(Text, { fontSize: FLOOR, fontWeight: "700", bg: "$hover", color: "$soft", borderWidth: 1, borderColor: "$borderColor", px: 6, py: 1, rounded: 4, children: "cal.hanzo.ai" })] }), _jsx(Text, { fontSize: "$1", color: "$soft", children: "Full unified scheduler across meetings, bot routines, automated crons, and query triggers" })] })] }), _jsxs(XStack, { items: "center", gap: 10, shrink: 1, minW: "auto", flexWrap: "wrap", children: [_jsx(XStack, { items: "center", gap: 2, bg: "$hover", rounded: 8, p: 2, borderWidth: 1, borderColor: "$borderColor", shrink: 1, minW: "auto", children: [
181
+ { id: 'scheduler', label: 'Master Schedule' },
182
+ { id: 'automations', label: 'Bot Crons' },
183
+ { id: 'booker', label: 'Public Booker' },
184
+ ].map((tab) => (_jsx(Button, { size: "sm", variant: activeTab === tab.id ? 'primary' : 'ghost', ...(activeTab === tab.id ? null : { color: '$soft' }), "aria-pressed": activeTab === tab.id, onClick: () => setActiveTab(tab.id), children: tab.label }, tab.id))) }), _jsxs(Button, { variant: "primary", size: "sm", onClick: () => setShowModal(true), children: [_jsx(Plus, { size: 14 }), "Schedule Event / Routine"] })] })] }), activeTab === 'booker' ? (_jsxs(YStack, { flex: 1, p: 28, overflowY: "auto", gap: 20, children: [_jsxs(YStack, { gap: 4, children: [_jsx(Text, { fontSize: "$7", fontWeight: "800", color: "$ink", children: "Public Booking Pages" }), _jsxs(Text, { fontSize: "$2", color: "$soft", children: ["Shareable links powered by the Cal.com fork at ", _jsx(Text, { render: _jsx("a", { href: "https://cal.hanzo.ai", target: "_blank", rel: "noopener noreferrer" }), color: "$ink", textDecorationLine: "underline", children: "cal.hanzo.ai" }), ". Allows teammates, clients, and automated agents to book dedicated time slots."] })] }), _jsx(View, { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(300px, 1fr))", gap: 16, children: BOOKINGS.map((card) => (_jsxs(YStack, { bg: "$panel", borderWidth: 1, borderColor: "$borderColor", rounded: 10, p: 18, gap: 12, children: [_jsxs(XStack, { items: "center", justify: "space-between", children: [_jsx(Text, { fontSize: "$4", fontWeight: "700", color: "$ink", children: card.title }), _jsx(Text, { fontSize: "$1", fontWeight: "700", bg: "$hover", px: 8, py: 2, rounded: 4, color: "$soft", children: card.duration })] }), _jsx(Text, { fontSize: "$2", color: "$soft", lineHeight: "$2", children: card.description }), _jsxs(Text, { px: 10, py: 8, bg: "$sunken", rounded: 6, fontSize: "$1", fontFamily: "$mono", color: "$soft", children: ["https://cal.hanzo.ai/alex/", card.slug] }), _jsxs(XStack, { gap: 8, mt: 4, children: [_jsx(Button, { size: "sm", flex: 1, onClick: () => {
218
185
  navigator.clipboard.writeText(`https://cal.hanzo.ai/alex/${card.slug}`);
219
- }, children: t('Copy Link') }), _jsx(Button, { asChild: true, variant: "primary", size: "sm", children: _jsxs("a", { href: `https://cal.hanzo.ai/alex/${card.slug}`, target: "_blank", rel: "noopener noreferrer", children: [t('Open'), _jsx(ExternalLink, { size: 12 })] }) })] })] }, card.slug))) })] })) : (_jsxs(YStack, { flex: 1, overflow: "hidden", children: [_jsxs(XStack, { px: 24, py: 12, bg: "$panel", borderBottomWidth: 1, borderBottomColor: "$borderColor", items: "center", justify: "space-between", flexWrap: "wrap", gap: 8, children: [_jsxs(XStack, { items: "center", gap: 8, shrink: 1, minW: "auto", flexWrap: "wrap", children: [_jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$soft", children: t('Filter:') }), [
220
- { id: 'all', label: t('All Items') },
221
- { id: 'meeting', label: t('Human Meetings'), icon: Video },
222
- { id: 'bot_automation', label: t('Bot Routines'), icon: Bot },
223
- { id: 'agent_query', label: t('Agent Queries'), icon: Zap },
224
- ].map((f) => (_jsxs(Button, { size: "sm", variant: filterType === f.id ? 'secondary' : 'ghost', color: filterType === f.id ? '$ink' : '$soft', "aria-pressed": filterType === f.id, onClick: () => setFilterType(f.id), children: ['icon' in f ? _jsx(f.icon, { size: 13, "aria-hidden": true }) : null, f.label] }, f.id)))] }), _jsx(Text, { fontSize: "$1", color: "$faint", children: t('Showing {count} scheduled events & routines', {
225
- count: filteredEvents.length.toLocaleString(locale),
226
- }) })] }), _jsx(YStack, { flex: 1, overflowY: "auto", px: 24, py: 20, gap: 10, children: filteredEvents.map((evt) => {
186
+ }, children: "Copy Link" }), _jsx(Button, { asChild: true, variant: "primary", size: "sm", children: _jsxs("a", { href: `https://cal.hanzo.ai/alex/${card.slug}`, target: "_blank", rel: "noopener noreferrer", children: ["Open", _jsx(ExternalLink, { size: 12 })] }) })] })] }, card.slug))) })] })) : (_jsxs(YStack, { flex: 1, overflow: "hidden", children: [_jsxs(XStack, { px: 24, py: 12, bg: "$panel", borderBottomWidth: 1, borderBottomColor: "$borderColor", items: "center", justify: "space-between", flexWrap: "wrap", gap: 8, children: [_jsxs(XStack, { items: "center", gap: 8, shrink: 1, minW: "auto", flexWrap: "wrap", children: [_jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$soft", children: "Filter:" }), [
187
+ { id: 'all', label: 'All Items' },
188
+ { id: 'meeting', label: 'Human Meetings', icon: Video },
189
+ { id: 'bot_automation', label: 'Bot Routines', icon: Bot },
190
+ { id: 'agent_query', label: 'Agent Queries', icon: Zap },
191
+ ].map((f) => (_jsxs(Button, { size: "sm", variant: filterType === f.id ? 'secondary' : 'ghost', color: filterType === f.id ? '$ink' : '$soft', "aria-pressed": filterType === f.id, onClick: () => setFilterType(f.id), children: ['icon' in f ? _jsx(f.icon, { size: 13, "aria-hidden": true }) : null, f.label] }, f.id)))] }), _jsxs(Text, { fontSize: "$1", color: "$faint", children: ["Showing ", filteredEvents.length, " scheduled events & routines"] })] }), _jsx(YStack, { flex: 1, overflowY: "auto", px: 24, py: 20, gap: 10, children: filteredEvents.map((evt) => {
227
192
  const isMeeting = evt.type === 'meeting';
228
193
  const isAutomation = evt.type === 'bot_automation';
229
- return (_jsxs(XStack, { bg: "$panel", borderWidth: 1, borderColor: "$borderColor", rounded: 10, px: 20, py: 16, items: "center", justify: "space-between", flexWrap: "wrap", gap: 16, children: [_jsxs(XStack, { items: "center", gap: 16, minW: 180, shrink: 1, children: [_jsx(XStack, { width: 40, height: 40, rounded: 8, bg: "$raised", items: "center", justify: "center", children: isMeeting ? _jsx(Video, { size: 20, color: "var(--foreground)" }) : isAutomation ? _jsx(Bot, { size: 20, color: "var(--foreground)" }) : _jsx(Zap, { size: 20, color: "var(--foreground)" }) }), _jsxs(YStack, { shrink: 1, minW: "auto", children: [_jsx(Text, { fontSize: "$3", fontWeight: "700", color: "$ink", children: evt.time }), _jsx(Text, { fontSize: "$1", color: "$faint", children: t('{date} · {duration}', { date: evt.date, duration: t(evt.duration) }) })] })] }), _jsxs(View, { flex: 1, minW: 240, display: "block", children: [_jsxs(XStack, { items: "center", gap: 8, mb: 2, children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", children: AUTHORED.has(evt.title) ? t(evt.title) : evt.title }), _jsx(Text, { fontSize: FLOOR, fontWeight: "700", bg: "$hover", color: "$soft", px: 6, py: 1, rounded: 4, textTransform: "uppercase", children: t(TYPE_LABEL[evt.type]) })] }), _jsx(Text, { display: "block", fontSize: "$2", color: "$soft", mb: 4, children: evt.description && AUTHORED.has(evt.description) ? t(evt.description) : evt.description }), _jsxs(XStack, { items: "center", gap: 12, children: [evt.botName ? (_jsx(Text, { fontSize: "$1", color: "$faint", children: t('Bot: {name}', {
230
- name: (_jsx(Text, { render: "strong", fontSize: "$1", color: "$quiet", children: botLabel(evt.botName, t) })),
231
- }) })) : null, evt.cronPattern ? (_jsx(Text, { fontSize: "$1", color: "$faint", children: t('Cron: {pattern}', {
232
- pattern: (_jsx(Text, { render: "code", color: "$ink", children: evt.cronPattern })),
233
- }) })) : null, evt.meetUrl ? (_jsx(Text, { fontSize: "$1", color: "$faint", children: t('Link: {url}', {
234
- url: (_jsx(Text, { render: "code", color: "$ink", children: evt.meetUrl })),
235
- }) })) : null] })] }), _jsxs(XStack, { items: "center", gap: 8, shrink: 1, minW: "auto", children: [isMeeting ? (_jsx(Button, { asChild: true, variant: "primary", size: "sm", children: _jsxs("a", { href: "/meet", children: [_jsx(Video, { size: 13 }), t('Join /meet')] }) })) : (_jsx(Button, { asChild: true, variant: "primary", size: "sm", children: _jsxs("a", { href: "/bots", children: [_jsx(Bot, { size: 13 }), t('View /bots')] }) })), _jsx(Button, { variant: "ghost", size: "icon-sm", color: "$soft", onClick: () => handleDeleteEvent(evt.id), "aria-label": t('Remove schedule'), title: t('Remove schedule'), children: _jsx(Trash2, { size: 14 }) })] })] }, evt.id));
236
- }) })] })), showModal ? (_jsx(XStack, { position: "fixed", inset: 0, bg: "var(--surface-scrim)", backdropFilter: "blur(8px)", items: "center", justify: "center", z: MODAL, children: _jsxs(YStack, { width: "100%", maxW: 460, bg: "var(--popover)", borderWidth: 1, borderColor: "var(--border-control)", rounded: 12, p: 24, gap: 16, boxShadow: "var(--shadow-floating)", children: [_jsxs(XStack, { items: "center", justify: "space-between", children: [_jsx(Text, { fontSize: "$4", fontWeight: "700", color: "$ink", children: t('Schedule Event or Bot Routine') }), _jsx(Button, { type: "button", variant: "ghost", size: "icon-sm", mr: -8, onClick: () => setShowModal(false), "aria-label": t('Close'), children: _jsx(X, { size: 16, "aria-hidden": true }) })] }), _jsxs(YStack, { render: "form", onSubmit: handleCreateEvent, gap: 12, children: [_jsxs(View, { display: "block", children: [_jsx(Text, { ...LABEL, children: t('Title') }), _jsx(Text, { render: _jsx("input", { type: "text", value: newEvent.title, onChange: (e) => setNewEvent({ ...newEvent, title: e.target.value }), placeholder: t('e.g. Daily Security Audit / Team Sync'), required: true }), ...FIELD, px: 12 })] }), _jsxs(View, { display: "block", children: [_jsx(Text, { ...LABEL, children: t('Schedule Type') }), _jsxs(Text, { render: _jsx("select", { value: newEvent.type, onChange: (e) => setNewEvent({ ...newEvent, type: e.target.value }) }), ...FIELD, px: 12, children: [_jsx("option", { value: "bot_automation", children: t('Automated Bot Cron Routine') }), _jsx("option", { value: "meeting", children: t('Human Video Meeting (/meet)') }), _jsx("option", { value: "agent_query", children: t('Recurring Agent Query') })] })] }), _jsxs(View, { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 10, children: [_jsxs(View, { display: "block", children: [_jsx(Text, { ...LABEL, children: t('Date') }), _jsx(Text, { render: _jsx("input", { type: "date", value: newEvent.date, onChange: (e) => setNewEvent({ ...newEvent, date: e.target.value }) }), ...FIELD, px: 8 })] }), _jsxs(View, { display: "block", children: [_jsx(Text, { ...LABEL, children: t('Time') }), _jsx(Text, { render: _jsx("input", { type: "time", value: newEvent.time, onChange: (e) => setNewEvent({ ...newEvent, time: e.target.value }) }), ...FIELD, px: 8 })] })] }), _jsxs(View, { display: "block", children: [_jsx(Text, { ...LABEL, children: t('Assigned Bot') }), _jsxs(Text, { render: _jsx("select", { value: newEvent.botName, onChange: (e) => setNewEvent({ ...newEvent, botName: e.target.value }) }), ...FIELD, px: 12, children: [_jsx("option", { value: "Chief", children: "Chief" }), _jsx("option", { value: "Sales Outbound", children: t('Sales Outbound') }), _jsx("option", { value: "Inbox Manager", children: t('Inbox Manager') }), _jsx("option", { value: "Account Manager", children: t('Account Manager') }), _jsx("option", { value: "Talent Scout", children: t('Talent Scout') }), _jsx("option", { value: "Expense Manager", children: t('Expense Manager') }), _jsx("option", { value: "Offsite crew", children: t('Offsite crew') })] })] }), _jsxs(View, { display: "block", children: [_jsx(Text, { ...LABEL, children: t('Description / Instruction') }), _jsx(Text, { render: _jsx("textarea", { value: newEvent.description, onChange: (e) => setNewEvent({ ...newEvent, description: e.target.value }), placeholder: t('Details or cron automation prompt...'), rows: 3 }), ...FIELD, px: 12, "$platform-web": { resize: 'none' } })] }), _jsxs(XStack, { justify: "flex-end", gap: 8, mt: 8, children: [_jsx(Button, { type: "button", onClick: () => setShowModal(false), children: t('Cancel') }), _jsx(Button, { type: "submit", variant: "primary", children: t('Save Schedule') })] })] })] }) })) : null] }));
194
+ return (_jsxs(XStack, { bg: "$panel", borderWidth: 1, borderColor: "$borderColor", rounded: 10, px: 20, py: 16, items: "center", justify: "space-between", flexWrap: "wrap", gap: 16, children: [_jsxs(XStack, { items: "center", gap: 16, minW: 180, shrink: 1, children: [_jsx(XStack, { width: 40, height: 40, rounded: 8, bg: "$raised", items: "center", justify: "center", children: isMeeting ? _jsx(Video, { size: 20, color: "var(--foreground)" }) : isAutomation ? _jsx(Bot, { size: 20, color: "var(--foreground)" }) : _jsx(Zap, { size: 20, color: "var(--foreground)" }) }), _jsxs(YStack, { shrink: 1, minW: "auto", children: [_jsx(Text, { fontSize: "$3", fontWeight: "700", color: "$ink", children: evt.time }), _jsxs(Text, { fontSize: "$1", color: "$faint", children: [evt.date, " \u00B7 ", evt.duration] })] })] }), _jsxs(View, { flex: 1, minW: 240, display: "block", children: [_jsxs(XStack, { items: "center", gap: 8, mb: 2, children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", children: evt.title }), _jsx(Text, { fontSize: FLOOR, fontWeight: "700", bg: "$hover", color: "$soft", px: 6, py: 1, rounded: 4, textTransform: "uppercase", children: evt.type.replace('_', ' ') })] }), _jsx(Text, { display: "block", fontSize: "$2", color: "$soft", mb: 4, children: evt.description }), _jsxs(XStack, { items: "center", gap: 12, children: [evt.botName ? _jsxs(Text, { fontSize: "$1", color: "$faint", children: ["Bot: ", _jsx(Text, { render: "strong", fontSize: "$1", color: "$quiet", children: evt.botName })] }) : null, evt.cronPattern ? _jsxs(Text, { fontSize: "$1", color: "$faint", children: ["Cron: ", _jsx(Text, { render: "code", color: "$ink", children: evt.cronPattern })] }) : null, evt.meetUrl ? _jsxs(Text, { fontSize: "$1", color: "$faint", children: ["Link: ", _jsx(Text, { render: "code", color: "$ink", children: evt.meetUrl })] }) : null] })] }), _jsxs(XStack, { items: "center", gap: 8, shrink: 1, minW: "auto", children: [isMeeting ? (_jsx(Button, { asChild: true, variant: "primary", size: "sm", children: _jsxs("a", { href: "/meet", children: [_jsx(Video, { size: 13 }), "Join /meet"] }) })) : (_jsx(Button, { asChild: true, variant: "primary", size: "sm", children: _jsxs("a", { href: "/bots", children: [_jsx(Bot, { size: 13 }), "View /bots"] }) })), _jsx(Button, { variant: "ghost", size: "icon-sm", color: "$soft", onClick: () => handleDeleteEvent(evt.id), "aria-label": "Remove schedule", title: "Remove schedule", children: _jsx(Trash2, { size: 14 }) })] })] }, evt.id));
195
+ }) })] })), showModal ? (_jsx(XStack, { position: "fixed", inset: 0, bg: "var(--surface-scrim)", backdropFilter: "blur(8px)", items: "center", justify: "center", z: MODAL, children: _jsxs(YStack, { width: "100%", maxW: 460, bg: "var(--popover)", borderWidth: 1, borderColor: "var(--border-control)", rounded: 12, p: 24, gap: 16, boxShadow: "var(--shadow-floating)", children: [_jsxs(XStack, { items: "center", justify: "space-between", children: [_jsx(Text, { fontSize: "$4", fontWeight: "700", color: "$ink", children: "Schedule Event or Bot Routine" }), _jsx(Button, { type: "button", variant: "ghost", size: "icon-sm", mr: -8, onClick: () => setShowModal(false), "aria-label": "Close", children: _jsx(X, { size: 16, "aria-hidden": true }) })] }), _jsxs(YStack, { render: "form", onSubmit: handleCreateEvent, gap: 12, children: [_jsxs(View, { display: "block", children: [_jsx(Text, { ...LABEL, children: "Title" }), _jsx(Text, { render: _jsx("input", { type: "text", value: newEvent.title, onChange: (e) => setNewEvent({ ...newEvent, title: e.target.value }), placeholder: "e.g. Daily Security Audit / Team Sync", required: true }), ...FIELD, px: 12 })] }), _jsxs(View, { display: "block", children: [_jsx(Text, { ...LABEL, children: "Schedule Type" }), _jsxs(Text, { render: _jsx("select", { value: newEvent.type, onChange: (e) => setNewEvent({ ...newEvent, type: e.target.value }) }), ...FIELD, px: 12, children: [_jsx("option", { value: "bot_automation", children: "Automated Bot Cron Routine" }), _jsx("option", { value: "meeting", children: "Human Video Meeting (/meet)" }), _jsx("option", { value: "agent_query", children: "Recurring Agent Query" })] })] }), _jsxs(View, { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 10, children: [_jsxs(View, { display: "block", children: [_jsx(Text, { ...LABEL, children: "Date" }), _jsx(Text, { render: _jsx("input", { type: "date", value: newEvent.date, onChange: (e) => setNewEvent({ ...newEvent, date: e.target.value }) }), ...FIELD, px: 8 })] }), _jsxs(View, { display: "block", children: [_jsx(Text, { ...LABEL, children: "Time" }), _jsx(Text, { render: _jsx("input", { type: "time", value: newEvent.time, onChange: (e) => setNewEvent({ ...newEvent, time: e.target.value }) }), ...FIELD, px: 8 })] })] }), _jsxs(View, { display: "block", children: [_jsx(Text, { ...LABEL, children: "Assigned Bot" }), _jsxs(Text, { render: _jsx("select", { value: newEvent.botName, onChange: (e) => setNewEvent({ ...newEvent, botName: e.target.value }) }), ...FIELD, px: 12, children: [_jsx("option", { value: "Chief", children: "Chief" }), _jsx("option", { value: "Sales Outbound", children: "Sales Outbound" }), _jsx("option", { value: "Inbox Manager", children: "Inbox Manager" }), _jsx("option", { value: "Account Manager", children: "Account Manager" }), _jsx("option", { value: "Talent Scout", children: "Talent Scout" }), _jsx("option", { value: "Expense Manager", children: "Expense Manager" }), _jsx("option", { value: "Offsite crew", children: "Offsite crew" })] })] }), _jsxs(View, { display: "block", children: [_jsx(Text, { ...LABEL, children: "Description / Instruction" }), _jsx(Text, { render: _jsx("textarea", { value: newEvent.description, onChange: (e) => setNewEvent({ ...newEvent, description: e.target.value }), placeholder: "Details or cron automation prompt...", rows: 3 }), ...FIELD, px: 12, "$platform-web": { resize: 'none' } })] }), _jsxs(XStack, { justify: "flex-end", gap: 8, mt: 8, children: [_jsx(Button, { type: "button", onClick: () => setShowModal(false), children: "Cancel" }), _jsx(Button, { type: "submit", variant: "primary", children: "Save Schedule" })] })] })] }) })) : null] }));
237
196
  }
package/dist/Chat.js CHANGED
@@ -28,9 +28,10 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
28
28
  // belongs in the thread where the reader can see it, not in a caption that
29
29
  // pre-emptively refuses on the gateway's behalf.
30
30
  import { useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
31
- import { english, isolate, phrase } from "@hanzo/i18n";
31
+ import { isolate, phrase } from "@hanzo/i18n";
32
32
  import { useI18n } from "@hanzo/i18n/react";
33
33
  import { billed, detail, familyOf, planRequired, plainly, refused } from "./failure.js";
34
+ import { english } from "./say.js";
34
35
  import { Prose } from "./Prose.js";
35
36
  import { useAgent, useAi, useChat, } from "@hanzo/ai/react";
36
37
  import { Chat as ChatSurface, EFFORTS, Failure, MEASURE, Parts, useFamilies, words } from "@hanzo/ui/chat";
@@ -41,7 +42,7 @@ import { Face, brief as roomBrief, join, roleOf, roomTurn, roster as rosterLine,
41
42
  import { cleanForSpeech, speakAgent } from "./speech.js";
42
43
  import { AgentMaker, HOUSE, useAgentShelf, useCrew } from "./crew.js";
43
44
  import { called } from "./team.js";
44
- import { Anchor, Box, Button, Switch, Text, View, XStack, YStack } from "@hanzo/ui";
45
+ import { Anchor, Box, Button, Text, Tooltip, TooltipContent, TooltipTrigger, View, XStack, YStack } from "@hanzo/ui";
45
46
  import { useMedia } from "@hanzo/gui";
46
47
  import { given, tidy } from "./lib/title.js";
47
48
  import { useIam, useIamToken } from "@hanzo/iam/react";
@@ -73,7 +74,7 @@ import { enter, LOGIN } from './lib/destination.js';
73
74
  import { first } from './lib/first.js';
74
75
  import { BAD } from "./lib/mix.js";
75
76
  import { brand } from './where.js';
76
- import { BAND } from './ground.js';
77
+ import { BAND, HEAD, TOUCH_HEAD, inPane } from './ground.js';
77
78
  import { UsageControl } from './Usage.js';
78
79
  import { shared, useChatPreferences } from './lib/chatPreferences.js';
79
80
  import { handleHint } from './hint.js';
@@ -776,7 +777,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, heading,
776
777
  // `kept` changing: when the reader opens another Recent, `open` moves first and
777
778
  // `kept` follows it a render later (the hook takes `thread` in an effect), and
778
779
  // reopening the stale `kept` then sent the two chasing each other until React
779
- // stopped the page (React error 185).
780
+ // stopped the page (#185).
780
781
  const minted = useRef(kept);
781
782
  useEffect(() => {
782
783
  if (kept === minted.current)
@@ -1491,7 +1492,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, heading,
1491
1492
  : undefined
1492
1493
  : undefined,
1493
1494
  };
1494
- return (_jsxs(YStack, { display: "grid", gridTemplateRows: "auto minmax(0, 1fr)", width: "100%", height: "100%", minH: 0, position: "relative", "data-slot": "chat-room",
1495
+ return (_jsxs(YStack, { flex: 1, minH: 0, width: "100%", position: "relative", "data-slot": "chat-room",
1495
1496
  // A LINK IN AN ANSWER OPENS IN A TAB beside the conversation when the tab
1496
1497
  // can show it — a site or preview we host — and in a browser tab of its
1497
1498
  // own otherwise, as a modified click always does.
@@ -1533,77 +1534,82 @@ function Thread({ placeholder = message(), initial, anonymous = false, heading,
1533
1534
  }, children: [_jsx(Schedule, { open: plan !== null, onOpenChange: (open) => {
1534
1535
  if (!open)
1535
1536
  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", height: BAND, 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 && !room.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, room.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: room.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(XStack, { render: "button", "data-slot": "header-private-chat", "aria-label": t("Private chat mode"), "aria-pressed": forgetful, ...{ title: forgetful ? t("Private chat enabled: messages will not be saved") : t("Private chat: forgetful mode") }, items: "center", gap: "$1.5", px: "$2", py: "$1", height: 28, rounded: "$3", cursor: "pointer", borderWidth: 1, borderColor: forgetful ? 'var(--primary)' : '$borderColor', bg: forgetful ? 'var(--primary-10, var(--white-10))' : 'transparent', hoverStyle: { bg: forgetful ? 'var(--primary-15, var(--white-15))' : '$hover' }, onPress: () => setForgetful(!forgetful), children: [_jsx(Ghost, { size: 13, strokeWidth: 1.75, color: forgetful ? 'var(--primary)' : 'var(--soft, var(--muted-foreground))', "aria-hidden": true }), _jsx(Text, { fontSize: "$1", fontWeight: forgetful ? '600' : '500', color: forgetful ? 'var(--primary)' : '$soft', children: t("Private") }), _jsx(Switch, { size: "sm", checked: forgetful, pointerEvents: "none" })] })), _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,
1537
- // THE COMPOSER IS FIXED TO THE FOOT, on a laptop and on a phone, empty or
1538
- // not: while nothing has been said the opening (the heading) stands at the
1539
- // foot of the height above it; once a turn exists the transcript scrolls
1540
- // under it. Over the keyboard, from the first moment.
1541
- // AS IT WAS WRITTEN. The package renders a turn's words plainly and
1542
- // says so — it ships no markdown pipeline because the plugin set is the
1543
- // surface's to choose — so an answer arrived here reading "```ts" with
1544
- // the backticks on screen. `Prose` is the site's one renderer, reading
1545
- // with the same `marked` the legal pages parse with and drawing every
1546
- // token in gui elements, and the shared view draws through it too.
1547
- body: (turn) => {
1548
- if (String(turn.id).startsWith(`${FAILED}:`)) {
1549
- const question = shown.find((one) => one.id === String(turn.id).slice(FAILED.length + 1));
1550
- return question ? failure(question) : null;
1551
- }
1552
- // A QUESTION THAT CARRIED PICTURES draws them beside its words.
1553
- if (turn.role === "user" && Array.isArray(turn.content)) {
1554
- const parts = partsOf(turn.content);
1555
- const asked = parts.flatMap((p) => (p.type === "text" ? [p.text] : [])).join("\n");
1556
- return (_jsxs(YStack, { gap: "$1", children: [_jsx(Parts, { parts: parts, prose: (text) => _jsx(Prose, { text: text }) }), !anonymous && asked ? _jsx(Plan, { onPress: () => setPlan(asked) }) : null] }));
1557
- }
1558
- const said = typeof turn.content === "string" ? turn.content : "";
1559
- // A QUESTION THAT CARRIED FILES draws its words and the files' chips;
1560
- // the passages it handed the model are the model's to read, not ours.
1561
- if (turn.role === "user" && said) {
1562
- const read = told(said);
1563
- if (read.carried)
1564
- 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] }));
1565
- }
1566
- // WHILE THE ANSWER HAS NO WORDS YET: who is answering (the agents the
1567
- // question addresses, or the whole room when it names nobody), and the
1568
- // model's reasoning as it streams (`reasoning` on the turn), dimmed and
1569
- // cut to its last lines.
1570
- const thought = turn.role === "assistant" && !said && chat.streaming ? (turn.reasoning ?? "").trim() : "";
1571
- if (turn.role === "assistant" && !said && chat.streaming && (room.length || thought)) {
1572
- const q = [...shown].reverse().find((one) => one.role === "user");
1573
- const whom = room.length ? addressed(words(q?.content), room) : [];
1574
- return (_jsxs(YStack, { gap: "$1", "data-slot": "thinking", children: [_jsx(Text, { fontSize: "$2", color: "$soft", children: whom.length
1575
- ? whom.length > 1
1576
- ? thought
1577
- ? t("{names} are thinking…", { names: join(whom, t) })
1578
- : t("{names} are answering…", { names: join(whom, t) })
1579
- : thought
1580
- ? t("{names} is thinking…", { names: join(whom, t) })
1581
- : t("{names} is answering…", { names: join(whom, t) })
1582
- : 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] }));
1583
- }
1584
- // A ROOM'S ANSWER IS SEVERAL PEOPLE'S. Each opens a line with their
1585
- // name, as the brief asks, so each is drawn under their own face and
1586
- // read in their own voice. A reply that names nobody is drawn whole.
1587
- const parts = turn.role === "assistant" ? speakers(said, known) : null;
1588
- if (parts && parts.some((part) => part.who)) {
1589
- // Asked and silent: an agent the question addressed who has no part
1590
- // in this reply.
1591
- const at = shown.findIndex((one) => one.id === turn.id);
1592
- const q = shown.slice(0, at).reverse().find((one) => one.role === "user");
1593
- const silent = room.length > 1 && !(chat.streaming && at === shown.length - 1)
1594
- ? addressed(words(q?.content), room).filter((name) => !parts.some((part) => part.who?.toLowerCase() === name.toLowerCase()))
1595
- : [];
1596
- 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)] }));
1597
- }
1598
- 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] }));
1599
- },
1600
- // The page's ONE heading, and it belongs to the empty transcript rather
1601
- // than to a signed-out branch — the branch is gone, and the heading went
1602
- // with it when it did. `Ask` passes its own, because the page embedding
1603
- // it already has an `<h1>` and a second is the defect that took the
1604
- // landings off /chat and /dev.
1605
- empty: heading === null ? undefined : (_jsxs(YStack, { "data-slot": "opening", display: "grid", gridTemplateRows: "1fr auto", items: "center", width: "100%", height: "100%", pt: "$6", pb: "$2", children: [room.length > 1 ? (_jsx(XStack, { items: "center", justify: "center", mb: "$4", children: room.map((name, i) => (_jsx(Box, { marginInlineStart: i ? -16 : 0, rounded: 40, borderWidth: 2, borderColor: "$background", z: room.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, room.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(room, t) || heading || (firstName ? t("What’s up, {name}?", { name: firstName }) : t("What’s up?")) }), room.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] })),
1606
- // The transcript reads at the same measure. `Thread` defaults to 768
1607
- // itself; handing it the column here is what lets Width reach it.
1608
- column: { maxW: MEASURE }, composer: composer }), _jsx(AgentMaker, {}), carry.dialog, _jsx(Upgrade, { ask: ask, onClose: () => setAsk(null) })] }));
1537
+ }, 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",
1538
+ // On the rail's line from a tablet up (HEAD, less the pane's edge); a phone's own bar is BAND.
1539
+ height: BAND, $md: { height: inPane(HEAD) }, $touchable: { height: inPane(TOUCH_HEAD) }, items: "center", justify: "space-between", gap: "$3", paddingInlineStart: "$4", paddingInlineEnd: "$2", shrink: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, "$max-md": !mine && !room.length ? { display: 'none' } : undefined, children: [_jsxs(XStack, { items: "center", gap: "$2", minW: 0, flex: 1, children: [mine ? (_jsx(Text, { fontSize: 15, lineHeight: 20, color: "$ink", numberOfLines: 1, shrink: 1, minW: 0, children: tidy(mine.title) })) : null, room.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: room.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(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(YStack, { "data-slot": "talk", flex: 1, minH: 0, children: _jsx(ChatSurface, { ...chat, messages: shown, send: guarded,
1540
+ // WHILE NOTHING HAS BEEN SAID, from a tablet up, the opening and the
1541
+ // composer are one pair centred in the pane (`center`: rows `1fr auto auto
1542
+ // 1fr`), so the heading reads close above the field and nothing stands at
1543
+ // the window's foot (owner, 2026-10-30). A phone keeps the composer at the
1544
+ // foot, over the keyboard, from the first moment; once a turn exists every
1545
+ // width does, and the transcript scrolls under it.
1546
+ center: media.md,
1547
+ // AS IT WAS WRITTEN. The package renders a turn's words plainly and
1548
+ // says so — it ships no markdown pipeline because the plugin set is the
1549
+ // surface's to choose — so an answer arrived here reading "```ts" with
1550
+ // the backticks on screen. `Prose` is the site's one renderer, reading
1551
+ // with the same `marked` the legal pages parse with and drawing every
1552
+ // token in gui elements, and the shared view draws through it too.
1553
+ body: (turn) => {
1554
+ if (String(turn.id).startsWith(`${FAILED}:`)) {
1555
+ const question = shown.find((one) => one.id === String(turn.id).slice(FAILED.length + 1));
1556
+ return question ? failure(question) : null;
1557
+ }
1558
+ // A QUESTION THAT CARRIED PICTURES draws them beside its words.
1559
+ if (turn.role === "user" && Array.isArray(turn.content)) {
1560
+ const parts = partsOf(turn.content);
1561
+ const asked = parts.flatMap((p) => (p.type === "text" ? [p.text] : [])).join("\n");
1562
+ return (_jsxs(YStack, { gap: "$1", children: [_jsx(Parts, { parts: parts, prose: (text) => _jsx(Prose, { text: text }) }), !anonymous && asked ? _jsx(Plan, { onPress: () => setPlan(asked) }) : null] }));
1563
+ }
1564
+ const said = typeof turn.content === "string" ? turn.content : "";
1565
+ // A QUESTION THAT CARRIED FILES draws its words and the files' chips;
1566
+ // the passages it handed the model are the model's to read, not ours.
1567
+ if (turn.role === "user" && said) {
1568
+ const read = told(said);
1569
+ if (read.carried)
1570
+ 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] }));
1571
+ }
1572
+ // WHILE THE ANSWER HAS NO WORDS YET: who is answering (the agents the
1573
+ // question addresses, or the whole room when it names nobody), and the
1574
+ // model's reasoning as it streams (`reasoning` on the turn), dimmed and
1575
+ // cut to its last lines.
1576
+ const thought = turn.role === "assistant" && !said && chat.streaming ? (turn.reasoning ?? "").trim() : "";
1577
+ if (turn.role === "assistant" && !said && chat.streaming && (room.length || thought)) {
1578
+ const q = [...shown].reverse().find((one) => one.role === "user");
1579
+ const whom = room.length ? addressed(words(q?.content), room) : [];
1580
+ return (_jsxs(YStack, { gap: "$1", "data-slot": "thinking", children: [_jsx(Text, { fontSize: "$2", color: "$soft", children: whom.length
1581
+ ? whom.length > 1
1582
+ ? thought
1583
+ ? t("{names} are thinking…", { names: join(whom, t) })
1584
+ : t("{names} are answering…", { names: join(whom, t) })
1585
+ : thought
1586
+ ? t("{names} is thinking…", { names: join(whom, t) })
1587
+ : t("{names} is answering…", { names: join(whom, t) })
1588
+ : 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] }));
1589
+ }
1590
+ // A ROOM'S ANSWER IS SEVERAL PEOPLE'S. Each opens a line with their
1591
+ // name, as the brief asks, so each is drawn under their own face and
1592
+ // read in their own voice. A reply that names nobody is drawn whole.
1593
+ const parts = turn.role === "assistant" ? speakers(said, known) : null;
1594
+ if (parts && parts.some((part) => part.who)) {
1595
+ // Asked and silent: an agent the question addressed who has no part
1596
+ // in this reply.
1597
+ const at = shown.findIndex((one) => one.id === turn.id);
1598
+ const q = shown.slice(0, at).reverse().find((one) => one.role === "user");
1599
+ const silent = room.length > 1 && !(chat.streaming && at === shown.length - 1)
1600
+ ? addressed(words(q?.content), room).filter((name) => !parts.some((part) => part.who?.toLowerCase() === name.toLowerCase()))
1601
+ : [];
1602
+ 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)] }));
1603
+ }
1604
+ 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] }));
1605
+ },
1606
+ // The page's ONE heading, and it belongs to the empty transcript rather
1607
+ // than to a signed-out branch — the branch is gone, and the heading went
1608
+ // with it when it did. `Ask` passes its own, because the page embedding
1609
+ // it already has an `<h1>` and a second is the defect that took the
1610
+ // landings off /chat and /dev.
1611
+ empty: heading === null ? undefined : (_jsxs(YStack, { "data-slot": "opening", items: "center", justify: "flex-end", width: "100%", height: "100%", pt: "$6", pb: "$2", children: [room.length > 1 ? (_jsx(XStack, { items: "center", justify: "center", mb: "$4", children: room.map((name, i) => (_jsx(Box, { marginInlineStart: i ? -16 : 0, rounded: 40, borderWidth: 2, borderColor: "$background", z: room.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, room.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(room, t) || heading || (firstName ? t("What’s up, {name}?", { name: firstName }) : t("What’s up?")) }), room.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] })),
1612
+ // The transcript reads at the same measure. `Thread` defaults to 768
1613
+ // itself; handing it the column here is what lets Width reach it.
1614
+ column: { maxW: MEASURE }, composer: composer }) }), _jsx(AgentMaker, {}), carry.dialog, _jsx(Upgrade, { ask: ask, onClose: () => setAsk(null) })] }));
1609
1615
  }
package/dist/Chrome.d.ts CHANGED
@@ -7,18 +7,7 @@
7
7
  * At the end, once someone is signed in, who it is: the face, the name and the
8
8
  * address, the other accounts signed in on this browser to be one tap away
9
9
  * (lib/accounts), Add account and Log out. Signed out, nothing but the brand. Under gui's `md` the account folds into its face, a menu of the address
10
- * and the same two ways out. A host with an account control of its own hands it
11
- * in as `account`, and the bar draws that in this one's place (null: none).
12
- *
13
- * THE WORDMARK STANDS WHERE THE MARKETING BAR'S DOES: the bar's side is the
14
- * page's gutter (@hanzo/design `--page-gutter`), 60px tall, and the name is a
15
- * pill whose 12px of padding the bar takes back with a -12px start margin, the
16
- * shape hanzo.ai's own bar gives it. So the name's first letter is at the gutter
17
- * on every page of every host, the focused ones and the marketing ones alike.
18
- * Under a pointer or keyboard focus the pill takes the bar's one highlight, the
19
- * `$hover` ground and no outline or border, as every control on hanzo.ai's bar
20
- * does, and an arrow opens before the name: this goes back to the site.
21
- * Keyboard focus keeps its ring as well.
10
+ * and the same two ways out.
22
11
  *
23
12
  * Being another account, and adding one, write this page down first
24
13
  * (destination.ts `rememberDestination`), so the sign-in that follows comes back
@@ -27,7 +16,6 @@
27
16
  * host mounts `IamProvider`.
28
17
  */
29
18
  import { type ReactNode } from 'react';
30
- export declare function Chrome({ back, account }: {
19
+ export declare function Chrome({ back }: {
31
20
  back?: ReactNode;
32
- account?: ReactNode;
33
21
  }): import("react").JSX.Element;