@hanzo/app 0.2.58 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/dist/{Me.d.ts → Account.d.ts} +1 -1
- package/dist/{Me.js → Account.js} +3 -3
- package/dist/App.d.ts +2 -2
- package/dist/App.js +16 -16
- package/dist/{Top.d.ts → Bar.d.ts} +1 -1
- package/dist/{Top.js → Bar.js} +3 -3
- package/dist/Betas.js +1 -1
- package/dist/Board.js +4 -4
- package/dist/Chat.d.ts +4 -4
- package/dist/Chat.js +96 -96
- package/dist/Contacts.js +17 -15
- package/dist/Directory.js +7 -21
- package/dist/Drive.js +6 -6
- package/dist/{Orgs.d.ts → Gate.d.ts} +1 -1
- package/dist/{Orgs.js → Gate.js} +32 -32
- package/dist/{Chrome.d.ts → Header.d.ts} +1 -1
- package/dist/{Chrome.js → Header.js} +1 -1
- package/dist/Home.d.ts +3 -3
- package/dist/Home.js +30 -30
- package/dist/Inbox.js +29 -33
- package/dist/Meet.js +22 -22
- package/dist/Rail.js +6 -6
- package/dist/RightPane.js +2 -2
- package/dist/{Palette.d.ts → Search.d.ts} +1 -1
- package/dist/{Palette.js → Search.js} +1 -1
- package/dist/Settings.d.ts +3 -3
- package/dist/Settings.js +5 -5
- package/dist/SettingsPane.d.ts +2 -2
- package/dist/SettingsPane.js +5 -5
- package/dist/Setup.js +2 -2
- package/dist/Shell.d.ts +22 -31
- package/dist/Shell.js +167 -114
- package/dist/{Column.d.ts → Sidebar.d.ts} +1 -1
- package/dist/{Column.js → Sidebar.js} +5 -5
- package/dist/Support.js +2 -2
- package/dist/Talk.d.ts +3 -3
- package/dist/Talk.js +18 -18
- package/dist/TeamPreview.js +26 -26
- package/dist/TeamStory.js +1 -1
- package/dist/Usage.js +2 -2
- package/dist/Work.js +2 -2
- package/dist/bots/Bots.js +2 -2
- package/dist/bots/Lights.d.ts +1 -1
- package/dist/bots/Lights.js +1 -1
- package/dist/bots/api.d.ts +8 -7
- package/dist/bots/api.js +4 -4
- package/dist/bots/ink.js +3 -3
- package/dist/bots/kit.d.ts +2 -2
- package/dist/bots/kit.js +4 -4
- package/dist/bots/runtime.js +12 -12
- package/dist/cast.d.ts +14 -14
- package/dist/cast.js +12 -12
- package/dist/channels.d.ts +132 -0
- package/dist/{rooms.js → channels.js} +56 -55
- package/dist/conversations.d.ts +8 -8
- package/dist/conversations.js +18 -17
- package/dist/crew.d.ts +1 -1
- package/dist/crew.js +12 -12
- package/dist/dev.js +6 -6
- package/dist/failure.d.ts +2 -2
- package/dist/failure.js +6 -6
- package/dist/ground.d.ts +1 -1
- package/dist/ground.js +1 -1
- package/dist/help.d.ts +1 -1
- package/dist/help.js +2 -2
- package/dist/hint.d.ts +1 -1
- package/dist/hint.js +1 -1
- package/dist/host.d.ts +15 -15
- package/dist/host.js +13 -13
- package/dist/index.d.ts +5 -5
- package/dist/index.js +4 -4
- package/dist/lib/ai.js +1 -1
- package/dist/lib/api.d.ts +1 -1
- package/dist/lib/api.js +1 -1
- package/dist/lib/destination.d.ts +3 -3
- package/dist/lib/destination.js +3 -3
- package/dist/lib/home.d.ts +2 -2
- package/dist/lib/home.js +2 -2
- package/dist/lib/host.d.ts +17 -16
- package/dist/lib/host.js +19 -18
- package/dist/lib/hostname.d.ts +1 -1
- package/dist/lib/hostname.js +1 -1
- package/dist/lib/list.d.ts +1 -1
- package/dist/lib/list.js +1 -1
- package/dist/lib/models.js +1 -1
- package/dist/lib/org.d.ts +1 -1
- package/dist/lib/org.js +1 -1
- package/dist/lib/orgname.d.ts +1 -1
- package/dist/lib/orgname.js +1 -1
- package/dist/lib/session.d.ts +4 -4
- package/dist/lib/session.js +6 -6
- package/dist/lib/tier.d.ts +4 -4
- package/dist/lib/tier.js +5 -5
- package/dist/lib/tiers.d.ts +1 -1
- package/dist/lib/tiers.js +10 -10
- package/dist/lib/web.d.ts +1 -1
- package/dist/lib/web.js +1 -1
- package/dist/network.d.ts +18 -18
- package/dist/network.js +28 -28
- package/dist/open.d.ts +24 -22
- package/dist/open.js +19 -19
- package/dist/pane.d.ts +6 -6
- package/dist/pane.js +10 -10
- package/dist/roster.d.ts +2 -2
- package/dist/roster.js +1 -1
- package/dist/seek.js +1 -1
- package/dist/slide.d.ts +1 -1
- package/dist/slide.js +1 -1
- package/dist/span.js +1 -1
- package/dist/stars.d.ts +4 -4
- package/dist/stars.js +8 -10
- package/dist/tabs.d.ts +1 -1
- package/dist/tabs.js +1 -1
- package/dist/team.js +1 -1
- package/dist/thread.d.ts +3 -3
- package/dist/thread.js +4 -4
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +1 -1
- package/dist/where.d.ts +7 -7
- package/dist/where.js +2 -2
- package/dist/workday.d.ts +26 -26
- package/dist/workday.js +187 -187
- package/package.json +3 -3
- package/dist/Room.d.ts +0 -8
- package/dist/Room.js +0 -51
- package/dist/rooms.d.ts +0 -131
- /package/dist/lib/{rooms.json → routes.json} +0 -0
package/dist/Inbox.js
CHANGED
|
@@ -9,28 +9,24 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
9
9
|
// Two columns is how every mail client has answered this, and the reason is the
|
|
10
10
|
// same here.
|
|
11
11
|
//
|
|
12
|
-
// ONE READING, MANY TRANSPORTS. `
|
|
12
|
+
// ONE READING, MANY TRANSPORTS. `transport` is measured by the server, so the
|
|
13
13
|
// mark beside each face is a fact about the message. Nothing here enumerates
|
|
14
14
|
// the networks; `network.tsx` names the ones it can draw and falls back for the
|
|
15
15
|
// rest, so a fifth transport appears the day the platform reports one.
|
|
16
16
|
//
|
|
17
|
-
// IT HOLDS WHAT OTHER NETWORKS CARRY IN, and only that. The
|
|
17
|
+
// IT HOLDS WHAT OTHER NETWORKS CARRY IN, and only that. The channels this org
|
|
18
18
|
// talks in are places on this platform, read and answered on /home
|
|
19
|
-
// (`
|
|
19
|
+
// (`channels.ts`); an arrival is a thread you REPLY to on the transport it came
|
|
20
20
|
// in on, and `conversations.ts` keys the two apart so one selection slot never
|
|
21
21
|
// holds two id spaces.
|
|
22
22
|
//
|
|
23
|
-
// IT IS TWO-WAY
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
// envelope's outbound projection spelled in its own description. So the reply
|
|
28
|
-
// goes through `client.http` here rather than through a client method that does
|
|
29
|
-
// not exist yet; when the SDK gains one, this call site is the only thing that
|
|
30
|
-
// moves.
|
|
23
|
+
// IT IS TWO-WAY. The platform publishes `POST /v1/transport/{transport}/send`
|
|
24
|
+
// (HIP-1066), and `@hanzo/ai`'s transports client has no send method, so the
|
|
25
|
+
// reply goes through `client.http` here; when the SDK gains one, this call site
|
|
26
|
+
// is the only thing that moves.
|
|
31
27
|
//
|
|
32
28
|
// A reply box that cannot reply is still worse than none, which is why this one
|
|
33
|
-
// is drawn only where there is a
|
|
29
|
+
// is drawn only where there is a channel id to address.
|
|
34
30
|
import { useCallback, useMemo, useRef, useState } from 'react';
|
|
35
31
|
import { useI18n } from '@hanzo/i18n/react';
|
|
36
32
|
import { ChannelHeader } from '@hanzo/ui/agents';
|
|
@@ -42,7 +38,7 @@ import { useAi } from './lib/ai.js';
|
|
|
42
38
|
import { useOpen } from './open.js';
|
|
43
39
|
import { Face } from './cast.js';
|
|
44
40
|
import { plainly } from './failure.js';
|
|
45
|
-
import { Network, of,
|
|
41
|
+
import { channelName, Network, of, speaker } from './network.js';
|
|
46
42
|
import { conversationOf, useConversations, } from './conversations.js';
|
|
47
43
|
import { Directory } from './Directory.js';
|
|
48
44
|
import { BAD } from './lib/mix.js';
|
|
@@ -74,8 +70,8 @@ function stamp(seconds, locale) {
|
|
|
74
70
|
* everybody, so it told nobody apart while looking like somebody's initials.
|
|
75
71
|
* A disc with nothing to say says '?', which is what it means.
|
|
76
72
|
*/
|
|
77
|
-
function Sender({
|
|
78
|
-
return (_jsxs(YStack, { width: size, height: size, shrink: 0, position: "relative", children: [_jsx(Face, { size: size }), _jsx(YStack, { position: "absolute", b: -2, insetInlineEnd: -2, children: _jsx(Network, {
|
|
73
|
+
function Sender({ transport, size = 36 }) {
|
|
74
|
+
return (_jsxs(YStack, { width: size, height: size, shrink: 0, position: "relative", children: [_jsx(Face, { size: size }), _jsx(YStack, { position: "absolute", b: -2, insetInlineEnd: -2, children: _jsx(Network, { transport: transport, size: Math.round(size * 0.46) }) })] }));
|
|
79
75
|
}
|
|
80
76
|
/** Where a network is connected. Opens My Channels modal. */
|
|
81
77
|
function Connect() {
|
|
@@ -88,12 +84,12 @@ function Empty({ children, offer }) {
|
|
|
88
84
|
return (_jsxs(YStack, { flex: 1, items: "center", justify: "center", p: "$6", gap: "$3", children: [_jsx(Text, { render: "h1", fontSize: "$4", fontWeight: "600", color: "$ink", children: t('Inbox') }), _jsx(Text, { fontSize: "$3", color: "$soft", text: "center", maxW: 420, children: children }), offer ? _jsx(Connect, {}) : null] }));
|
|
89
85
|
}
|
|
90
86
|
/** The list, which stays on screen while you read down it. */
|
|
91
|
-
function Arrivals({
|
|
87
|
+
function Arrivals({ conversations, open, onPick, }) {
|
|
92
88
|
const { t, locale } = useI18n();
|
|
93
|
-
return (_jsxs(YStack, { flex: 1, minH: 0, children: [_jsxs(XStack, { height: 48, shrink: 0, items: "center", px: "$3", gap: "$2", borderBottomWidth: 1, borderColor: "$borderColor", children: [_jsx(Text, { flex: 1, fontSize: "$3", fontWeight: "600", color: "$ink", children: t('Inbox') }), _jsx(Connect, {})] }), _jsx(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", children:
|
|
89
|
+
return (_jsxs(YStack, { flex: 1, minH: 0, children: [_jsxs(XStack, { height: 48, shrink: 0, items: "center", px: "$3", gap: "$2", borderBottomWidth: 1, borderColor: "$borderColor", children: [_jsx(Text, { flex: 1, fontSize: "$3", fontWeight: "600", color: "$ink", children: t('Inbox') }), _jsx(Connect, {})] }), _jsx(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", children: conversations.map((one) => (_jsx(Box, { render: "button", onClick: () => onPick(one.key), "aria-current": one.key === open, display: "block", width: "100%", cursor: "pointer", borderBottomWidth: 1, borderColor: "var(--borderColor, var(--white-08))", bg: one.key === open ? 'var(--raised, var(--white-06))' : 'transparent', hoverStyle: { bg: '$hover' }, children: _jsxs(XStack, { gap: "$3", items: "center", p: "$3", children: [_jsx(Sender, { transport: one.transport }), _jsxs(YStack, { flex: 1, minW: 0, gap: "$1", items: "flex-start", children: [_jsxs(XStack, { width: "100%", items: "baseline", gap: "$2", children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", numberOfLines: 1, flex: 1, text: "start", children: one.title }), one.lastAt ? (_jsx(Text, { fontSize: "$1", color: "$soft", children: _jsx("bdi", { children: stamp(one.lastAt / 1000, locale) }) })) : null] }), one.preview ? (_jsx(Text, { fontSize: "$2", color: "$soft", numberOfLines: 1, children: one.preview })) : null] })] }) }, one.key))) })] }));
|
|
94
90
|
}
|
|
95
91
|
/** What is open, beside the list rather than instead of it. */
|
|
96
|
-
function Reading({
|
|
92
|
+
function Reading({ channel, reload, }) {
|
|
97
93
|
const { t, locale } = useI18n();
|
|
98
94
|
const { client } = useAi();
|
|
99
95
|
const [draft, setDraft] = useState('');
|
|
@@ -102,13 +98,13 @@ function Reading({ room, reload, }) {
|
|
|
102
98
|
/**
|
|
103
99
|
* Say it back, on the transport it arrived on.
|
|
104
100
|
*
|
|
105
|
-
* IDENTITY IS NOT A FIELD: the
|
|
106
|
-
* the caller's validated org, and the route refuses a body carrying `sender
|
|
107
|
-
*
|
|
108
|
-
*
|
|
101
|
+
* IDENTITY IS NOT A FIELD: the transport is the path segment and the sender is
|
|
102
|
+
* the caller's validated org, and the route refuses a body carrying `sender`
|
|
103
|
+
* or `account` with a 400 rather than dropping it quietly. So the body is the
|
|
104
|
+
* channel and the words, and nothing else.
|
|
109
105
|
*
|
|
110
|
-
* The
|
|
111
|
-
* platform words them — a
|
|
106
|
+
* The channel's own refusals are the reader's situation and are shown as the
|
|
107
|
+
* platform words them — a channel this org has not bound is 403, and one whose
|
|
112
108
|
* route the bot has never learned is 409, which means somebody has to message
|
|
113
109
|
* it there first. `plainly` keeps those and answers for the estate's own.
|
|
114
110
|
*
|
|
@@ -118,15 +114,15 @@ function Reading({ room, reload, }) {
|
|
|
118
114
|
*/
|
|
119
115
|
const send = useCallback(async () => {
|
|
120
116
|
const text = draft.trim();
|
|
121
|
-
if (!client || !text || sending || !
|
|
117
|
+
if (!client || !text || sending || !channel.channelId)
|
|
122
118
|
return;
|
|
123
119
|
setSending(true);
|
|
124
120
|
setFailed(null);
|
|
125
121
|
try {
|
|
126
122
|
await client.http.json({
|
|
127
123
|
method: 'POST',
|
|
128
|
-
path: `/v1/
|
|
129
|
-
body: {
|
|
124
|
+
path: `/v1/transport/${encodeURIComponent(channel.transport)}/send`,
|
|
125
|
+
body: { channel: { id: channel.channelId }, text },
|
|
130
126
|
});
|
|
131
127
|
setDraft('');
|
|
132
128
|
reload();
|
|
@@ -137,10 +133,10 @@ function Reading({ room, reload, }) {
|
|
|
137
133
|
finally {
|
|
138
134
|
setSending(false);
|
|
139
135
|
}
|
|
140
|
-
}, [client, draft, sending,
|
|
141
|
-
return (_jsxs(YStack, { flex: 1, minH: 0, children: [_jsx(ChannelHeader, { name:
|
|
136
|
+
}, [client, draft, sending, channel.transport, channel.channelId, reload, t]);
|
|
137
|
+
return (_jsxs(YStack, { flex: 1, minH: 0, children: [_jsx(ChannelHeader, { name: channelName(channel), children: _jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(Network, { transport: channel.transport, size: 14 }), _jsx(Text, { fontSize: "$2", color: "$soft", children: of(channel.transport).name })] }) }), _jsx(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", p: "$4", gap: "$3", children: [...channel.messages]
|
|
142
138
|
.sort((a, b) => a.createdAt - b.createdAt)
|
|
143
|
-
.map((message) => (_jsxs(XStack, { gap: "$3", items: "flex-start", children: [_jsx(Sender, {
|
|
139
|
+
.map((message) => (_jsxs(XStack, { gap: "$3", items: "flex-start", children: [_jsx(Sender, { transport: channel.transport, size: 32 }), _jsxs(YStack, { flex: 1, minW: 0, gap: "$1", children: [_jsxs(XStack, { gap: "$2", items: "baseline", children: [_jsx(Text, { fontSize: "$3", fontWeight: "500", color: "$ink", children: speaker(channel.transport, message.sender) }), _jsx(Text, { fontSize: "$1", color: "$soft", children: _jsx("bdi", { children: when(message.createdAt, locale) }) })] }), _jsx(Text, { fontSize: "$3", color: "$ink", children: message.text })] })] }, message.id))) }), _jsx(YStack, { p: "$3", gap: "$2", borderTopWidth: 1, borderColor: "$borderColor", children: channel.channelId ? (_jsxs(_Fragment, { children: [_jsx(Composer, { value: draft, onChange: setDraft, onSend: () => void send(), busy: sending, placeholder: t('Reply on {network}', { network: of(channel.transport).name }), label: t('Reply on {network}', { network: of(channel.transport).name }) }), failed ? (_jsx(Text, { fontSize: "$2", color: BAD, children: failed })) : null] })) : (_jsx(Text, { fontSize: "$2", color: "$soft", children: t('This message names no channel to answer in.') })) })] }));
|
|
144
140
|
}
|
|
145
141
|
function InboxGrip({ span, onSpan, }) {
|
|
146
142
|
const { t, dir } = useI18n();
|
|
@@ -165,7 +161,7 @@ function InboxGrip({ span, onSpan, }) {
|
|
|
165
161
|
}
|
|
166
162
|
function ReadingInbox() {
|
|
167
163
|
const { t } = useI18n();
|
|
168
|
-
const {
|
|
164
|
+
const { channel, openChannel } = useOpen();
|
|
169
165
|
const { conversations, loading, reload } = useConversations();
|
|
170
166
|
const [listSpan, setListSpan] = useState(() => {
|
|
171
167
|
if (typeof window === 'undefined')
|
|
@@ -178,13 +174,13 @@ function ReadingInbox() {
|
|
|
178
174
|
return 320;
|
|
179
175
|
}
|
|
180
176
|
});
|
|
181
|
-
const open = useMemo(() => conversationOf(conversations,
|
|
177
|
+
const open = useMemo(() => conversationOf(conversations, channel), [conversations, channel]);
|
|
182
178
|
if (loading && conversations.length === 0)
|
|
183
179
|
return _jsx(Empty, { children: t('Reading your messages.') });
|
|
184
180
|
if (conversations.length === 0) {
|
|
185
181
|
return (_jsx(Empty, { offer: true, children: t('Nothing has arrived yet. Connect an app and the messages it carries land here — mail, chat, and the networks your work already happens on.') }));
|
|
186
182
|
}
|
|
187
|
-
return (_jsxs(XStack, { flex: 1, minH: 0, position: "relative", children: [_jsxs(YStack, { display: open ? 'none' : 'flex', $md: { display: 'flex', width: listSpan, shrink: 0, borderInlineEndWidth: 1 }, flex: 1, minH: 0, borderColor: "$borderColor", position: "relative", children: [_jsx(Arrivals, {
|
|
183
|
+
return (_jsxs(XStack, { flex: 1, minH: 0, position: "relative", children: [_jsxs(YStack, { display: open ? 'none' : 'flex', $md: { display: 'flex', width: listSpan, shrink: 0, borderInlineEndWidth: 1 }, flex: 1, minH: 0, borderColor: "$borderColor", position: "relative", children: [_jsx(Arrivals, { conversations: conversations, open: channel, onPick: openChannel }), _jsx(InboxGrip, { span: listSpan, onSpan: setListSpan })] }), open ? (_jsx(YStack, { flex: 1, minW: 0, minH: 0, children: _jsx(Reading, { channel: open.arrival, reload: reload }) })) : (_jsx(YStack, { display: "none", $md: { display: 'flex' }, flex: 1, minW: 0, children: _jsx(Empty, { children: t('Pick a conversation to read it.') }) }))] }));
|
|
188
184
|
}
|
|
189
185
|
/**
|
|
190
186
|
* The pane, and the session its reads need.
|
package/dist/Meet.js
CHANGED
|
@@ -41,7 +41,7 @@ const DEFAULT_MEETINGS = [
|
|
|
41
41
|
{
|
|
42
42
|
id: 'meet-1',
|
|
43
43
|
title: phrase('AI Platform Architecture & LLM Inference Sync'),
|
|
44
|
-
|
|
44
|
+
call: 'platform-architecture',
|
|
45
45
|
time: '18:00 - 18:45',
|
|
46
46
|
date: phrase('Today'),
|
|
47
47
|
duration: '45m',
|
|
@@ -55,7 +55,7 @@ const DEFAULT_MEETINGS = [
|
|
|
55
55
|
{
|
|
56
56
|
id: 'meet-2',
|
|
57
57
|
title: phrase('Research Review'),
|
|
58
|
-
|
|
58
|
+
call: 'research-review',
|
|
59
59
|
time: '20:00 - 21:00',
|
|
60
60
|
date: phrase('Today'),
|
|
61
61
|
duration: '60m',
|
|
@@ -68,7 +68,7 @@ const DEFAULT_MEETINGS = [
|
|
|
68
68
|
{
|
|
69
69
|
id: 'meet-3',
|
|
70
70
|
title: phrase('Security & Compliance Sync'),
|
|
71
|
-
|
|
71
|
+
call: 'security-sync',
|
|
72
72
|
time: '11:00 - 11:30',
|
|
73
73
|
date: phrase('Tomorrow'),
|
|
74
74
|
duration: '30m',
|
|
@@ -115,8 +115,8 @@ async function generateAgentMeetingResponse(prompt, agentName, token, t) {
|
|
|
115
115
|
const FLOOR = 10;
|
|
116
116
|
export function Meet() {
|
|
117
117
|
const { t, locale } = useI18n();
|
|
118
|
-
const [
|
|
119
|
-
const [
|
|
118
|
+
const [activeCall, setActiveCall] = useState(null);
|
|
119
|
+
const [callInput, setCallInput] = useState('');
|
|
120
120
|
const [copied, setCopied] = useState(false);
|
|
121
121
|
const [cameraOn, setCameraOn] = useState(true);
|
|
122
122
|
const [micOn, setMicOn] = useState(true);
|
|
@@ -139,7 +139,7 @@ export function Meet() {
|
|
|
139
139
|
const videoRef = useRef(null);
|
|
140
140
|
const localStreamRef = useRef(null);
|
|
141
141
|
useEffect(() => {
|
|
142
|
-
if (
|
|
142
|
+
if (activeCall) {
|
|
143
143
|
if (localStreamRef.current) {
|
|
144
144
|
localStreamRef.current.getTracks().forEach((t) => t.stop());
|
|
145
145
|
localStreamRef.current = null;
|
|
@@ -171,7 +171,7 @@ export function Meet() {
|
|
|
171
171
|
localStreamRef.current.getTracks().forEach((t) => t.stop());
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
|
-
}, [cameraOn,
|
|
174
|
+
}, [cameraOn, activeCall]);
|
|
175
175
|
// Stop speech when meeting closes
|
|
176
176
|
useEffect(() => {
|
|
177
177
|
return () => {
|
|
@@ -180,19 +180,19 @@ export function Meet() {
|
|
|
180
180
|
}, []);
|
|
181
181
|
const startInstantMeeting = () => {
|
|
182
182
|
const randomId = `hanzo-${Math.random().toString(36).slice(2, 8)}`;
|
|
183
|
-
|
|
183
|
+
setActiveCall(randomId);
|
|
184
184
|
};
|
|
185
185
|
const joinCustomMeeting = () => {
|
|
186
|
-
if (!
|
|
186
|
+
if (!callInput.trim())
|
|
187
187
|
return;
|
|
188
|
-
let clean =
|
|
188
|
+
let clean = callInput.trim();
|
|
189
189
|
if (clean.includes('meet.hanzo.ai/')) {
|
|
190
190
|
clean = clean.split('meet.hanzo.ai/')[1].split('?')[0].split('#')[0];
|
|
191
191
|
}
|
|
192
|
-
|
|
192
|
+
setActiveCall(clean);
|
|
193
193
|
};
|
|
194
|
-
const handleCopyLink = (
|
|
195
|
-
const link = `https://meet.hanzo.ai/${
|
|
194
|
+
const handleCopyLink = (call) => {
|
|
195
|
+
const link = `https://meet.hanzo.ai/${call}`;
|
|
196
196
|
navigator.clipboard.writeText(link);
|
|
197
197
|
setCopied(true);
|
|
198
198
|
setTimeout(() => setCopied(false), 2000);
|
|
@@ -285,16 +285,16 @@ export function Meet() {
|
|
|
285
285
|
const handleReadBriefing = () => {
|
|
286
286
|
if (!liveNotes.length)
|
|
287
287
|
return;
|
|
288
|
-
const
|
|
289
|
-
toggle(t('Briefing for {
|
|
288
|
+
const call = activeCall || t('this call');
|
|
289
|
+
toggle(t('Briefing for {call}. {notes}', { call, notes: liveNotes.join('. ') }), activeCoPilotAgent);
|
|
290
290
|
};
|
|
291
291
|
// What the hands-free control says: why it cannot run, or that Hanzo's speech
|
|
292
292
|
// refused and the browser stood in (or could not) — never silence.
|
|
293
293
|
const handsFreeNote = handsFree.reason ?? (handsFree.refusal ? refused(handsFree.refusal) : null);
|
|
294
|
-
return (_jsxs(YStack, { width: "100%", height: "100%", bg: "$background", overflowX: "auto", overflowY: "auto", children: [_jsxs(XStack, { minH: 56, px: 20, 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(Video, { 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 Meet" }), _jsx(Text, { fontSize: FLOOR, fontWeight: "700", bg: "$hover", color: "$soft", borderWidth: 1, borderColor: "$borderColor", px: 6, py: 1, rounded: 4, children: t('LIVE · {site}', { site: 'meet.hanzo.ai' }) })] }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Native WebRTC video conferencing with AI meeting bot transcription & voice') })] })] }),
|
|
294
|
+
return (_jsxs(YStack, { width: "100%", height: "100%", bg: "$background", overflowX: "auto", overflowY: "auto", children: [_jsxs(XStack, { minH: 56, px: 20, 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(Video, { 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 Meet" }), _jsx(Text, { fontSize: FLOOR, fontWeight: "700", bg: "$hover", color: "$soft", borderWidth: 1, borderColor: "$borderColor", px: 6, py: 1, rounded: 4, children: t('LIVE · {site}', { site: 'meet.hanzo.ai' }) })] }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Native WebRTC video conferencing with AI meeting bot transcription & voice') })] })] }), activeCall ? (_jsxs(XStack, { items: "center", gap: 8, shrink: 1, minW: "auto", flexWrap: "wrap", children: [_jsx(XStack, { bg: "$hover", rounded: 8, p: 2, gap: 2, borderWidth: 1, borderColor: "$borderColor", shrink: 1, minW: "auto", children: [
|
|
295
295
|
['iframe', t('SFU Stage'), Tv],
|
|
296
296
|
['grid', t('Agent Grid'), LayoutGrid],
|
|
297
|
-
].map(([view, label, Icon]) => (_jsxs(Button, { size: "sm", variant: meetingView === view ? 'primary' : 'ghost', ...(meetingView === view ? null : { color: '$soft' }), "aria-pressed": meetingView === view, onClick: () => setMeetingView(view), children: [_jsx(Icon, { size: 12 }), label] }, view))) }), botAssisting ? (_jsx(View, { display: "none", "$max-md": { display: 'flex' }, children: _jsxs(Button, { size: "sm", variant: copilot ? 'secondary' : 'default', onClick: () => setCopilot((v) => !v), "aria-label": t('Co-pilot'), "aria-expanded": copilot, "aria-controls": "meet-copilot", children: [_jsx(Bot, { size: 13 }), t('Co-pilot')] }) })) : null, _jsxs(Button, { size: "sm", onClick: () => handleCopyLink(
|
|
297
|
+
].map(([view, label, Icon]) => (_jsxs(Button, { size: "sm", variant: meetingView === view ? 'primary' : 'ghost', ...(meetingView === view ? null : { color: '$soft' }), "aria-pressed": meetingView === view, onClick: () => setMeetingView(view), children: [_jsx(Icon, { size: 12 }), label] }, view))) }), botAssisting ? (_jsx(View, { display: "none", "$max-md": { display: 'flex' }, children: _jsxs(Button, { size: "sm", variant: copilot ? 'secondary' : 'default', onClick: () => setCopilot((v) => !v), "aria-label": t('Co-pilot'), "aria-expanded": copilot, "aria-controls": "meet-copilot", children: [_jsx(Bot, { size: 13 }), t('Co-pilot')] }) })) : null, _jsxs(Button, { size: "sm", onClick: () => handleCopyLink(activeCall), children: [copied ? _jsx(Check, { size: 13 }) : _jsx(Copy, { size: 13 }), t(copied ? 'Link Copied' : 'Copy meeting link')] }), _jsxs(Button, { size: "sm", variant: "destructive", onClick: () => {
|
|
298
298
|
stopAgentSpeech();
|
|
299
299
|
// Leaving the call hangs up the hands-free conversation and
|
|
300
300
|
// settles the transcript with it.
|
|
@@ -302,8 +302,8 @@ export function Meet() {
|
|
|
302
302
|
handsFree.toggle();
|
|
303
303
|
if (transcriber.open)
|
|
304
304
|
transcriber.toggle();
|
|
305
|
-
|
|
306
|
-
}, children: [_jsx(PhoneOff, { size: 14 }), t('Leave Call')] })] })) : (_jsx(XStack, { items: "center", gap: 8, shrink: 1, minW: "auto", children: _jsx(Button, { asChild: true, variant: "linkMuted", size: "sm", px: 0, children: _jsxs("a", { href: "https://meet.hanzo.ai", target: "_blank", rel: "noopener noreferrer", children: ["meet.hanzo.ai", _jsx(ExternalLink, { size: 12 })] }) }) }))] }),
|
|
305
|
+
setActiveCall(null);
|
|
306
|
+
}, children: [_jsx(PhoneOff, { size: 14 }), t('Leave Call')] })] })) : (_jsx(XStack, { items: "center", gap: 8, shrink: 1, minW: "auto", children: _jsx(Button, { asChild: true, variant: "linkMuted", size: "sm", px: 0, children: _jsxs("a", { href: "https://meet.hanzo.ai", target: "_blank", rel: "noopener noreferrer", children: ["meet.hanzo.ai", _jsx(ExternalLink, { size: 12 })] }) }) }))] }), activeCall ? (_jsxs(XStack, { flex: 1, overflow: "hidden", position: "relative", children: [_jsx(XStack, { flex: 1, minW: "auto", position: "relative", bg: "$sunken", children: meetingView === 'iframe' ? (_jsx(View, { render: _jsx("iframe", { src: `https://meet.hanzo.ai/${activeCall}#config.prejoinPageEnabled=false&config.startWithAudioMuted=${!micOn}&config.startWithVideoMuted=${!cameraOn}`, allow: "camera; microphone; display-capture; autoplay; clipboard-write; speaker-selection; screen-wake-lock", title: t('Hanzo Meet: {call}', { call: activeCall }) }), width: "100%", height: "100%", borderWidth: 0, bg: "$sunken" }, "stage")) : (_jsxs(View, { flex: 1, display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(280px, 1fr))", gap: 12, p: 16, overflowY: "auto", bg: "$background", children: [_jsx(YStack, { bg: "$panel", rounded: 12, borderWidth: 1, borderColor: "$borderColor", position: "relative", overflow: "hidden", items: "center", justify: "center", minH: 220, children: _jsxs(YStack, { items: "center", children: [_jsx(YStack, { width: 72, height: 72, rounded: 9999, bg: "$raised", items: "center", justify: "center", mb: 8, children: _jsx(Text, { fontSize: "$8", fontWeight: "700", color: "$ink", children: t('You') }) }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", children: t('{name} (Host)', { name: 'Alex' }) }), _jsx(Text, { fontSize: "$1", color: micOn ? GOOD : '$soft', children: t(micOn ? 'Mic Active' : 'Muted') })] }) }), invitedAgents.map((agentName) => {
|
|
307
307
|
const voice = voiceOf(agentName);
|
|
308
308
|
const isThisSpeaking = (speaking || handsFree.state === 'speaking') && activeCoPilotAgent.toLowerCase() === agentName.toLowerCase();
|
|
309
309
|
return (_jsxs(YStack, { bg: "$panel", rounded: 12, borderWidth: isThisSpeaking ? 2 : 1, borderColor: isThisSpeaking ? 'var(--state-success)' : '$borderColor', position: "relative", overflow: "hidden", items: "center", justify: "center", p: 20, minH: 220, transition: "200ms", children: [_jsxs(View, { position: "relative", mb: 10, children: [_jsx(Face, { name: agentName, size: 72 }), isThisSpeaking ? (_jsx(View, { position: "absolute", b: -4, r: -4, bg: "var(--popover)", borderWidth: 1, borderColor: "var(--state-success)", rounded: 9999, p: 4, children: _jsx(Volume2, { size: 12, color: GOOD }) })) : null] }), _jsx(Text, { fontSize: "$3", fontWeight: "700", color: "$ink", mb: 2, children: agentName }), _jsx(Text, { fontSize: "$1", color: "$soft", mb: 8, children: t('Voice: {voice}', { voice }) }), _jsx(XStack, { items: "center", gap: 6, bg: "$hover", px: 10, py: 4, rounded: 12, children: isThisSpeaking ? (_jsxs(_Fragment, { children: [_jsx(AudioWave, { active: true, color: "var(--state-success)" }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: GOOD, children: t('Speaking in Call') })] })) : (_jsxs(_Fragment, { children: [_jsx(Bot, { size: 11, color: "var(--muted-foreground)" }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "$quiet", children: t('AI Agent · In Call') })] })) })] }, agentName));
|
|
@@ -333,7 +333,7 @@ export function Meet() {
|
|
|
333
333
|
navigator.clipboard.writeText(text);
|
|
334
334
|
}, children: t('Copy Summary') })] })] })) : null] })) : (_jsxs(XStack, { flex: 1, overflow: "hidden", "$max-lg": { flexDirection: 'column', overflowY: 'auto', overflowX: 'hidden' }, children: [_jsxs(YStack, { flex: 1, minW: 0, p: 32, gap: 24, overflowY: "auto", "$max-lg": { p: 16, flexBasis: 'auto', shrink: 0, overflowY: 'visible', overflowX: 'hidden' }, children: [_jsxs(YStack, { gap: 6, children: [_jsx(Text, { fontSize: "$8", fontWeight: "800", color: "$ink", letterSpacing: -0.5, children: t('Secure, High-Definition Video Calls') }), _jsx(Text, { fontSize: "$3", color: "$soft", children: t('Powered by native Hanzo Meet ({link}). Connect with team members, clients, and autonomous AI agents.', {
|
|
335
335
|
link: (_jsx(Text, { render: _jsx("a", { href: "https://meet.hanzo.ai", target: "_blank", rel: "noopener noreferrer" }), color: "$ink", textDecorationLine: "underline", children: "meet.hanzo.ai" })),
|
|
336
|
-
}) })] }), _jsxs(XStack, { gap: 12, flexWrap: "wrap", children: [_jsxs(Button, { variant: "primary", size: "lg", onClick: startInstantMeeting, children: [_jsx(Plus, { size: 16 }), t('Start Instant Meeting')] }), _jsxs(XStack, { items: "center", gap: 6, bg: "$panel", borderWidth: 1, borderColor: "var(--border-control)", rounded: 8, px: 4, height: 42, children: [_jsx(Text, { render: _jsx("input", { type: "text", value:
|
|
336
|
+
}) })] }), _jsxs(XStack, { gap: 12, flexWrap: "wrap", children: [_jsxs(Button, { variant: "primary", size: "lg", onClick: startInstantMeeting, children: [_jsx(Plus, { size: 16 }), t('Start Instant Meeting')] }), _jsxs(XStack, { items: "center", gap: 6, bg: "$panel", borderWidth: 1, borderColor: "var(--border-control)", rounded: 8, px: 4, height: 42, children: [_jsx(Text, { render: _jsx("input", { type: "text", value: callInput, onChange: (e) => setCallInput(e.target.value), onKeyDown: (e) => e.key === 'Enter' && joinCustomMeeting(), placeholder: t('Enter meeting code or link'), "aria-label": t('Meeting code or link') }), bg: "transparent", borderWidth: 0, outlineStyle: "none", color: "$ink", fontSize: "$2", width: 220, px: 8 }), _jsx(Button, { variant: "primary", size: "sm", disabled: !callInput.trim(), onClick: joinCustomMeeting, children: t('Join') })] }), _jsxs(Button, { size: "lg", variant: showAgentPicker ? 'secondary' : 'default', "aria-expanded": showAgentPicker, onClick: () => setShowAgentPicker(!showAgentPicker), children: [_jsx(UserPlus, { size: 14 }), t('Invite Agents ({count})', { count: invitedAgents.length.toLocaleString(locale) })] })] }), showAgentPicker ? (_jsxs(YStack, { bg: "$panel", borderWidth: 1, borderColor: "var(--border-control)", rounded: 12, p: 16, maxW: 560, children: [_jsxs(XStack, { items: "center", justify: "space-between", mb: 12, children: [_jsx(Text, { fontSize: "$2", fontWeight: "700", color: "$ink", children: t('Select AI Agents to Attend Meetings') }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Each agent joins the call with voice synthesis & pair programming') })] }), _jsx(View, { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(220px, 1fr))", gap: 8, children: AVAILABLE_MEETING_AGENTS.map((agent) => {
|
|
337
337
|
const isInvited = invitedAgents.includes(agent.name);
|
|
338
338
|
return (_jsxs(XStack, { onClick: () => toggleAgentInvite(agent.name), items: "center", gap: 10, px: 10, py: 8, rounded: 8, bg: isInvited ? '$raised' : '$hover', borderWidth: 1, borderColor: isInvited ? 'var(--border-selected)' : '$borderColor', cursor: "pointer", transition: "quickest", children: [_jsx(Face, { name: agent.name, size: 32 }), _jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", children: agent.name }), _jsx(Text, { fontSize: 10, color: "$faint", numberOfLines: 1, children: t('{role} · Voice: {voice}', { role: t(agent.role), voice: agent.voice }) })] }), _jsx(View, { width: 16, height: 16, rounded: 4, borderWidth: isInvited ? 0 : 1, borderColor: "var(--border-selected)", bg: isInvited ? 'var(--foreground)' : 'transparent', items: "center", justify: "center", children: isInvited ? _jsx(Check, { size: 11, strokeWidth: 3, color: "var(--background)" }) : null })] }, agent.id));
|
|
339
339
|
}) })] })) : null, _jsxs(YStack, { bg: "$panel", borderWidth: 1, borderColor: "$borderColor", rounded: 12, overflow: "hidden", maxW: 560, children: [_jsxs(XStack, { height: 280, bg: "$sunken", position: "relative", items: "center", justify: "center", children: [cameraOn ? (_jsx(View, { render: _jsx("video", { ref: videoRef, autoPlay: true, playsInline: true, muted: true }), width: "100%", height: "100%", objectFit: "cover" })) : (_jsxs(YStack, { items: "center", gap: 8, children: [_jsx(XStack, { width: 64, height: 64, rounded: 9999, bg: "$raised", items: "center", justify: "center", children: _jsx(VideoOff, { size: 28, color: "var(--muted-foreground)" }) }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('Camera is off') })] })), _jsxs(XStack, { position: "absolute", b: 16, maxW: "calc(100% - 24px)", items: "center", justify: "center", flexWrap: "wrap", gap: 8, bg: "var(--surface-overlay)", backdropFilter: "blur(8px)", px: 12, py: 6, rounded: 24, borderWidth: 1, borderColor: "$borderColor", children: [_jsx(Button, { size: "icon", rounded: 9999, variant: cameraOn ? 'default' : 'destructive', "aria-label": t(cameraOn ? 'Turn Camera Off' : 'Turn Camera On'), title: t(cameraOn ? 'Turn Camera Off' : 'Turn Camera On'), onClick: () => setCameraOn(!cameraOn), children: cameraOn ? _jsx(Video, { size: 16 }) : _jsx(VideoOff, { size: 16 }) }), _jsx(Button, { size: "icon", rounded: 9999, variant: micOn ? 'default' : 'destructive', "aria-label": t(micOn ? 'Mute Mic' : 'Unmute Mic'), title: t(micOn ? 'Mute Mic' : 'Unmute Mic'), onClick: () => setMicOn(!micOn), children: micOn ? _jsx(Mic, { size: 14, strokeWidth: 1.75 }) : _jsx(MicOff, { size: 14, strokeWidth: 1.75 }) }), _jsx(Button, { size: "sm", rounded: 9999, variant: audioTesting ? 'secondary' : 'default', title: t('Test Agent Voice & Audio Output'), onClick: testAudioSpeaker, children: audioTesting ? (_jsxs(_Fragment, { children: [_jsx(AudioWave, { active: true, color: "var(--state-success)" }), t('Testing Audio…')] })) : (_jsxs(_Fragment, { children: [_jsx(Volume2, { size: 12, strokeWidth: 1.75 }), t('Test Audio')] })) }), _jsxs(Button, { size: "sm", rounded: 9999, variant: botAssisting ? 'secondary' : 'default', "aria-pressed": botAssisting, onClick: () => setBotAssisting(!botAssisting), children: [_jsx(Bot, { size: 13 }), t(botAssisting ? 'AI Bot Co-pilot ON' : 'AI Bot OFF')] })] })] }), _jsxs(XStack, { p: 12, items: "center", justify: "space-between", bg: "$panel", children: [_jsx(Text, { fontSize: "$1", color: "$soft", children: t('Readiness: Camera {camera} · Mic {mic} · Audio {audio}', {
|
|
@@ -353,8 +353,8 @@ export function Meet() {
|
|
|
353
353
|
if (m.agents[0])
|
|
354
354
|
setActiveCoPilotAgent(m.agents[0]);
|
|
355
355
|
}
|
|
356
|
-
|
|
357
|
-
}, children: [_jsx(Video, { size: 12 }), t('Join Call')] }), _jsx(Button, { size: "icon-sm", "aria-label": t('Copy invite link'), title: t('Copy invite link'), onClick: () => handleCopyLink(m.
|
|
356
|
+
setActiveCall(m.call);
|
|
357
|
+
}, children: [_jsx(Video, { size: 12 }), t('Join Call')] }), _jsx(Button, { size: "icon-sm", "aria-label": t('Copy invite link'), title: t('Copy invite link'), onClick: () => handleCopyLink(m.call), children: _jsx(Copy, { size: 12 }) })] })] }, m.id))) }), _jsxs(YStack, { mt: "auto", p: 12, bg: "$background", rounded: 8, borderWidth: 1, borderColor: "$borderColor", gap: 6, children: [_jsxs(XStack, { items: "center", gap: 8, children: [_jsx(Calendar, { size: 14, color: "var(--muted-foreground)" }), _jsx(Text, { fontSize: "$2", fontWeight: "700", color: "$ink", children: t('Need to book a slot?') })] }), _jsx(Text, { fontSize: "$1", color: "$soft", children: t('Use the Hanzo Calendar Scheduler to coordinate available times across team members and bots.') }), _jsx(Button, { asChild: true, variant: "link", size: "sm", px: 0, justify: "flex-start", children: _jsxs("a", { href: "/cal", children: [t('Open Calendar Scheduler'), _jsx(ArrowRight, { size: 11 })] }) })] })] })] }))] }));
|
|
358
358
|
}
|
|
359
359
|
/** A note's time, as the reader's clock shows it: 4:22 PM, never "4:22:". */
|
|
360
360
|
function clock(locale) {
|
package/dist/Rail.js
CHANGED
|
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
// and Betas, the list of every app in beta; none of it in Studio), and the
|
|
7
7
|
// account at the foot. It
|
|
8
8
|
// is how the app moves between its products; a phone, which has no rail,
|
|
9
|
-
// switches Chat and Dev in its bar (
|
|
9
|
+
// switches Chat and Dev in its bar (Bar.tsx).
|
|
10
10
|
//
|
|
11
11
|
// Studio is the app's third mode (@hanzo/studio at /studio), each of the three
|
|
12
12
|
// opened where the reader left it.
|
|
@@ -18,7 +18,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
18
18
|
// conversations, Dev its own places (@hanzo/build `own`: New run, Projects,
|
|
19
19
|
// Issues, Templates) and its runs, Studio its own; Library, Scheduled tasks and
|
|
20
20
|
// Customize (@hanzo/build's Artifacts, Automations and Customize) each their
|
|
21
|
-
// own (
|
|
21
|
+
// own (Sidebar.tsx); Settings is the site's pages at /settings, beside the app
|
|
22
22
|
// (lib/host.ts `settings`). Nothing on the rail is listed inside Dev: one level
|
|
23
23
|
// of the app a place, each lit while the reader is on it.
|
|
24
24
|
//
|
|
@@ -31,7 +31,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
31
31
|
// and Forward (App.tsx `bar`), and its rail starts with Chat. A phone has no
|
|
32
32
|
// rail: its menu (Drawer.tsx) lists the places as rows (`rows`) under the mode's
|
|
33
33
|
// own — Studio, Tabs, then More, which Library, Scheduled tasks and Customize
|
|
34
|
-
// lead there. Chat and Dev are the phone's bar's (
|
|
34
|
+
// lead there. Chat and Dev are the phone's bar's (Bar.tsx), and the account is
|
|
35
35
|
// the menu's foot.
|
|
36
36
|
import { useI18n } from '@hanzo/i18n/react';
|
|
37
37
|
import { Clock, Code2, Compass, Ellipsis, FlaskConical, Library, MessageSquare, PanelLeft, Puzzle, Sparkles, SquareTerminal, Users, WandSparkles } from 'lucide-react';
|
|
@@ -44,7 +44,7 @@ import { BetasDialog, useBetas } from './Betas.js';
|
|
|
44
44
|
import { out } from './help.js';
|
|
45
45
|
import { BETAS } from './lib/betas.js';
|
|
46
46
|
import { HOSTED_APPS } from './lib/hosted.js';
|
|
47
|
-
import {
|
|
47
|
+
import { Account } from './Account.js';
|
|
48
48
|
import { BAND } from './ground.js';
|
|
49
49
|
import { app, hosted, WORKSPACE } from './lib/host.js';
|
|
50
50
|
/** The rail's width, px. */
|
|
@@ -125,10 +125,10 @@ export function Rail({ host, mode, at, open, toggle, inside = null, rows = false
|
|
|
125
125
|
if (rows)
|
|
126
126
|
return (_jsxs(YStack, { "data-slot": "places", render: "nav", "aria-label": t('Products'), pt: "$2", shrink: 0, children: [_jsxs(YStack, { role: "list", gap: 2, children: [_jsx(YStack, { role: "listitem", children: _jsx(Row, { label: "Studio", on: mode === 'studio', onPress: onStudio, "data-slot": "place-studio", icon: _jsx(WandSparkles, { size: 16, "aria-hidden": true }) }) }), _jsx(YStack, { role: "listitem", children: _jsx(Row, { label: "Tabs", on: mode === 'tabs', onPress: onTabs, "data-slot": "place-tabs", icon: _jsx(SquareTerminal, { size: 16, "aria-hidden": true }) }) }), apps.map((a) => (_jsx(YStack, { role: "listitem", children: _jsx(Row, { label: a.name, on: inside === a.id, onPress: () => go(hosted(a.id)), "data-slot": `place-app-${a.id}`, icon: _jsx(a.icon, { size: 16, "aria-hidden": true }) }) }, a.id))), _jsx(YStack, { role: "listitem", children: _jsx(DropdownMenu, { placement: "bottom-start", minWidth: 220, trigger: _jsx(Row, { label: t('More'), "data-slot": "place-more", "aria-haspopup": "menu", icon: _jsx(Ellipsis, { size: 16, "aria-hidden": true }) }), items: rest }) })] }), betasDialog] }));
|
|
127
127
|
return (_jsxs(YStack, { "data-slot": "rail", render: "nav", "aria-label": t('Products'), width: RAIL, flex: 1,
|
|
128
|
-
// The first mark centred on the head band beside it (BAND), the account on the sidebar's foot (
|
|
128
|
+
// The first mark centred on the head band beside it (BAND), the account on the sidebar's foot (Sidebar's `pb`).
|
|
129
129
|
pt: (BAND - MARK) / 2, pb: "$2", gap: 4, shrink: 0, items: "center", $touchable: { pt: (BAND - TOUCH) / 2 }, children: [toggle ? (_jsx(YStack, { pb: 4, children: _jsx(Toggle, { open: open, onPress: toggle }) })) : null, _jsx(Mark, { label: t('Chat'), on: mode === 'chat', onPress: onChat, "data-slot": "rail-chat", children: _jsx(MessageSquare, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: "Dev", on: mode === 'dev' && !here, onPress: onDev, "data-slot": "rail-dev", children: _jsx(Code2, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: "Studio", on: mode === 'studio', onPress: onStudio, "data-slot": "rail-studio", children: _jsx(WandSparkles, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: "Tabs", on: mode === 'tabs', onPress: onTabs, "data-slot": "rail-tabs", children: _jsx(SquareTerminal, { size: 18, "aria-hidden": true }) }), apps.map((a) => (_jsx(Mark, { label: a.name, on: inside === a.id, onPress: () => go(hosted(a.id)), "data-slot": `rail-app-${a.id}`, children: _jsx(a.icon, { size: 18, "aria-hidden": true }) }, a.id))), _jsx(Mark, { label: t('Library'), on: here === 'library', onPress: to(RAISED.library), "data-slot": "rail-library", children: _jsx(Library, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: t('Scheduled tasks'), on: here === 'scheduled', onPress: to(RAISED.scheduled), "data-slot": "rail-scheduled", children: _jsx(Clock, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: t('Customize'), on: here === 'customize', onPress: to(RAISED.customize), "data-slot": "rail-customize", children: _jsx(Puzzle, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: t('Betas'), on: mode === 'beta', onPress: () => go('/beta'), "data-slot": "rail-betas", children: _jsx(FlaskConical, { size: 18, "aria-hidden": true }) }), betasDialog, rest.length ? (_jsx(DropdownMenu
|
|
130
130
|
// Toward the content: right of the rail, left of it right to left.
|
|
131
131
|
, {
|
|
132
132
|
// Toward the content: right of the rail, left of it right to left.
|
|
133
|
-
placement: dir === 'rtl' ? 'left-start' : 'right-start', minWidth: 220, trigger: _jsx(XStack, { render: "button", "aria-label": t('More'), ...{ title: t('More') }, "data-slot": "rail-more", width: MARK, height: MARK, rounded: "$4", items: "center", justify: "center", cursor: "pointer", opacity: 0.62, hoverStyle: { bg: '$hover', opacity: 1 }, pressStyle: { bg: '$raised' }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' }, $touchable: { width: 44, height: 44 }, children: _jsx(Ellipsis, { size: 18, "aria-hidden": true }) }), items: rest })) : null, _jsx(YStack, { flex: 1 }), _jsx(
|
|
133
|
+
placement: dir === 'rtl' ? 'left-start' : 'right-start', minWidth: 220, trigger: _jsx(XStack, { render: "button", "aria-label": t('More'), ...{ title: t('More') }, "data-slot": "rail-more", width: MARK, height: MARK, rounded: "$4", items: "center", justify: "center", cursor: "pointer", opacity: 0.62, hoverStyle: { bg: '$hover', opacity: 1 }, pressStyle: { bg: '$raised' }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' }, $touchable: { width: 44, height: 44 }, children: _jsx(Ellipsis, { size: 18, "aria-hidden": true }) }), items: rest })) : null, _jsx(YStack, { flex: 1 }), _jsx(Account, { host: host, narrow: true, onOrg: onOrg })] }));
|
|
134
134
|
}
|
package/dist/RightPane.js
CHANGED
|
@@ -15,7 +15,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
15
15
|
//
|
|
16
16
|
// The panel's tabs, their order and the open one are kept per conversation by
|
|
17
17
|
// @hanzo/build (`useDeck`, scope `chat:<channel>`); the frame owns the column
|
|
18
|
-
// it stands in (`
|
|
18
|
+
// it stands in (`Side` in `Shell.tsx`).
|
|
19
19
|
import { useEffect, useMemo, useState } from 'react';
|
|
20
20
|
import { useI18n } from '@hanzo/i18n/react';
|
|
21
21
|
import { FileCode, Globe, Image as ImageMark, Paperclip, Plus } from 'lucide-react';
|
|
@@ -134,7 +134,7 @@ const Note = ({ children }) => (_jsx(DropdownMenuLabel, { children: _jsx(Text, {
|
|
|
134
134
|
* one write path that turns skills, plugins and connectors into callable tools.
|
|
135
135
|
* Services are `GET /v1/connection/providers`, connected by the
|
|
136
136
|
* device flow their cards declare. One panel, not flyouts: it hangs off the
|
|
137
|
-
* right edge of the window, where a submenu has no
|
|
137
|
+
* right edge of the window, where a submenu has no space to open.
|
|
138
138
|
*/
|
|
139
139
|
function Add({ at }) {
|
|
140
140
|
const { t } = useI18n();
|
|
@@ -27,7 +27,7 @@ export declare function places(host: Host | undefined, go: (address: string) =>
|
|
|
27
27
|
};
|
|
28
28
|
/** The palette's actions, named through `t`; a host that cannot do one (no theme to change, no org to pick) is not offered it. */
|
|
29
29
|
export declare function actions(host: Host | undefined, go: (address: string) => void, signOut: () => void, keys: () => void, t?: Say): Action[];
|
|
30
|
-
export declare function
|
|
30
|
+
export declare function Search({ onClose, go, actions: frame, mode, host, }: {
|
|
31
31
|
onClose: () => void;
|
|
32
32
|
/** Moves the app to one of its addresses (lib/host `talk`, `app`, `studio`). */
|
|
33
33
|
go: (address: string) => void;
|
|
@@ -184,7 +184,7 @@ const connectors = (body) => list(obj(body).servers)
|
|
|
184
184
|
.map(obj)
|
|
185
185
|
.filter((s) => str(s.id))
|
|
186
186
|
.map((s) => ({ id: str(s.id), label: str(s.name) || str(s.id), keywords: [str(s.url)] }));
|
|
187
|
-
export function
|
|
187
|
+
export function Search({ onClose, go, actions: frame = [], mode = 'chat', host, }) {
|
|
188
188
|
const { t, dir } = useI18n();
|
|
189
189
|
const [query, setQuery] = useState('');
|
|
190
190
|
const [keys, setKeys] = useState(false);
|
package/dist/Settings.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export declare const FIRST: string;
|
|
|
26
26
|
* The rail's second level: every settings row, grouped.
|
|
27
27
|
*
|
|
28
28
|
* It renders `SidebarItem` rather than a shape of its own so a settings row and
|
|
29
|
-
*
|
|
29
|
+
* an app's row are the same row — the list under it changes, the column does not.
|
|
30
30
|
*
|
|
31
31
|
* `aria-current="true"` is stated rather than left to `active`, which publishes
|
|
32
32
|
* `page`. A settings row is the current item in a set, not the current page;
|
|
@@ -35,10 +35,10 @@ export declare const FIRST: string;
|
|
|
35
35
|
export declare function SettingsList({ active, filter, onPick, onBack, }: {
|
|
36
36
|
/** The open row's id. */
|
|
37
37
|
active: string;
|
|
38
|
-
/** The rail's own filter, narrowing these rows the way it narrows
|
|
38
|
+
/** The rail's own filter, narrowing these rows the way it narrows an app's list. */
|
|
39
39
|
filter: string;
|
|
40
40
|
/** Chosen. The shell decides what a row with an `href` does. */
|
|
41
41
|
onPick: (row: Row) => void;
|
|
42
|
-
/** Back to the
|
|
42
|
+
/** Back to the shell's own rows. */
|
|
43
43
|
onBack: () => void;
|
|
44
44
|
}): import("react").JSX.Element;
|
package/dist/Settings.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
// Settings: the sidebar's second level, and the pane it opens in the
|
|
3
|
+
// Settings: the sidebar's second level, and the pane it opens in the shell.
|
|
4
4
|
//
|
|
5
5
|
// TWO PARTS, ONE TAXONOMY. `SettingsList` is the rail's list — the shell swaps
|
|
6
6
|
// its own rows for these and back. `SettingsPane` (SettingsPane.tsx) is what
|
|
7
|
-
// fills the
|
|
8
|
-
// the usage panel, the model picker and the catalog, none of which
|
|
7
|
+
// fills the pane while a row is chosen, loaded only then: it carries the plan,
|
|
8
|
+
// the usage panel, the model picker and the catalog, none of which an app's
|
|
9
9
|
// first screen draws. Both read `GROUPS`, so the list can only offer a row the
|
|
10
10
|
// pane can draw.
|
|
11
11
|
//
|
|
12
12
|
// Which row is open is the shell's `showSettings` value and nothing here: a
|
|
13
13
|
// pane deep in the tree asks for Channels through the same store, and the rail
|
|
14
|
-
// and the
|
|
14
|
+
// and the pane read that one answer.
|
|
15
15
|
//
|
|
16
16
|
// Every section that has a screen RENDERS IT HERE. Account, billing and usage
|
|
17
17
|
// are not links out to hanzo.id, billing.hanzo.ai and platform.hanzo.ai, because
|
|
@@ -111,7 +111,7 @@ export const FIRST = ROWS[0].id;
|
|
|
111
111
|
* The rail's second level: every settings row, grouped.
|
|
112
112
|
*
|
|
113
113
|
* It renders `SidebarItem` rather than a shape of its own so a settings row and
|
|
114
|
-
*
|
|
114
|
+
* an app's row are the same row — the list under it changes, the column does not.
|
|
115
115
|
*
|
|
116
116
|
* `aria-current="true"` is stated rather than left to `active`, which publishes
|
|
117
117
|
* `page`. A settings row is the current item in a set, not the current page;
|
package/dist/SettingsPane.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
2
|
+
* The pane, while a settings row is open.
|
|
3
3
|
*
|
|
4
|
-
* It scrolls itself, the way the
|
|
4
|
+
* It scrolls itself, the way the side beside a pane does: `main` gives its
|
|
5
5
|
* child a floor and no overflow, so a pane that did not would push the whole
|
|
6
6
|
* shell down the page.
|
|
7
7
|
*/
|
package/dist/SettingsPane.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
// The
|
|
4
|
-
// holds the rows). Loaded when a row is chosen, never with the
|
|
3
|
+
// The pane while a settings row is open: every section's screen (Settings.tsx
|
|
4
|
+
// holds the rows). Loaded when a row is chosen, never with the shell.
|
|
5
5
|
import { useMemo, useState } from 'react';
|
|
6
6
|
import { phrase } from '@hanzo/i18n';
|
|
7
7
|
import { useI18n } from '@hanzo/i18n/react';
|
|
@@ -34,9 +34,9 @@ import { named, ROWS } from './Settings.js';
|
|
|
34
34
|
* ink are the call site's, because they say which one is chosen. */
|
|
35
35
|
const CHOICE = { rounded: 8, borderWidth: 1, borderStyle: 'solid', cursor: 'pointer' };
|
|
36
36
|
/**
|
|
37
|
-
* The
|
|
37
|
+
* The pane, while a settings row is open.
|
|
38
38
|
*
|
|
39
|
-
* It scrolls itself, the way the
|
|
39
|
+
* It scrolls itself, the way the side beside a pane does: `main` gives its
|
|
40
40
|
* child a floor and no overflow, so a pane that did not would push the whole
|
|
41
41
|
* shell down the page.
|
|
42
42
|
*/
|
|
@@ -104,7 +104,7 @@ function Model() {
|
|
|
104
104
|
}) })] }), _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('Third-party model access, and the language dictation listens in.') })] }) }), _jsx(YStack, { p: "$3", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", gap: "$2", children: _jsxs(XStack, { items: "center", justify: "space-between", children: [_jsxs(YStack, { flex: 1, pr: "$2", children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", children: t('Enable third-party models') }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('Third-party models (OpenAI, Anthropic, Google, DeepSeek) are billed from your pre-paid credit topup. First-party models (Enso, Zen, Kai) are covered by your plan.') })] }), _jsx(Button, { size: "sm", variant: chatPrefs.allowThirdPartyModels ? 'default' : 'outline', disabled: !paid, onClick: () => paid && setChatPrefs({ allowThirdPartyModels: !chatPrefs.allowThirdPartyModels }), children: chatPrefs.allowThirdPartyModels ? t('Enabled') : t('Disabled') })] }) }), _jsx(YStack, { p: "$3", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", gap: "$2", children: _jsxs(XStack, { items: "center", justify: "space-between", children: [_jsxs(YStack, { flex: 1, pr: "$2", children: [_jsx(Text, { fontSize: "$3", fontWeight: "600", color: "$ink", children: t('Show language selector beside +') }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t('Display the dictation language indicator next to the + context button on the composer row.') })] }), _jsx(Button, { size: "sm", variant: chatPrefs.showLanguage ? 'default' : 'outline', onClick: () => setChatPrefs({ showLanguage: !chatPrefs.showLanguage }), children: chatPrefs.showLanguage ? t('Enabled') : t('Disabled') })] }) }), !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] })] }));
|
|
105
105
|
}
|
|
106
106
|
/**
|
|
107
|
-
* WHAT THE GATEWAY SERVES, read from the same `/v1/models` the
|
|
107
|
+
* WHAT THE GATEWAY SERVES, read from the same `/v1/models` the apps read.
|
|
108
108
|
*
|
|
109
109
|
* Counted, never typed: the catalog moves without this file, so a number written
|
|
110
110
|
* here is wrong by the next deploy. An empty answer says the account reaches
|
package/dist/Setup.js
CHANGED
|
@@ -22,7 +22,7 @@ import { useIam } from '@hanzo/iam/react';
|
|
|
22
22
|
import { Check, Maximize2, Plug, Plus, Sparkles, X } from 'lucide-react';
|
|
23
23
|
import { ProviderMark } from './ProviderMark.js';
|
|
24
24
|
import { useBetas } from './Betas.js';
|
|
25
|
-
import {
|
|
25
|
+
import { useHost } from './host.js';
|
|
26
26
|
import { useKept } from './kept.js';
|
|
27
27
|
import { usePref } from './pref.js';
|
|
28
28
|
import { api } from './lib/api.js';
|
|
@@ -48,7 +48,7 @@ export function Setup({ go } = {}) {
|
|
|
48
48
|
const { t } = useI18n();
|
|
49
49
|
const { isAuthenticated, accessToken } = useIam();
|
|
50
50
|
const { open: opens } = useBetas();
|
|
51
|
-
const pathed =
|
|
51
|
+
const pathed = useHost().path !== null;
|
|
52
52
|
const [later, setLater, known] = usePref(LATER_KEY, false);
|
|
53
53
|
const [step, setStep] = usePref(STEP_KEY, 1);
|
|
54
54
|
const [githubDone, setGithubDone] = usePref(GITHUB_KEY, false);
|