@hanzo/build 0.2.125 → 0.2.127
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/lib/api/machines.d.ts +8 -0
- package/lib/api/machines.js +16 -5
- package/lib/api/places.d.ts +12 -4
- package/lib/api/places.js +11 -3
- package/lib/api/work.d.ts +9 -0
- package/lib/api/work.js +44 -3
- package/lib/automations.js +74 -35
- package/lib/awake.d.ts +24 -0
- package/lib/awake.js +68 -0
- package/lib/clipboard.d.ts +2 -0
- package/lib/clipboard.js +10 -0
- package/lib/customize/agents.js +149 -31
- package/lib/customize/connectors.js +91 -34
- package/lib/customize/drafted.js +23 -10
- package/lib/customize/index.js +40 -10
- package/lib/customize/inventory.d.ts +4 -1
- package/lib/customize/inventory.js +66 -17
- package/lib/customize/plugins.js +43 -15
- package/lib/customize/skills.js +87 -23
- package/lib/customize/ui.d.ts +29 -3
- package/lib/customize/ui.js +89 -12
- package/lib/desk.d.ts +1 -1
- package/lib/desk.js +67 -40
- package/lib/dev-mode.d.ts +22 -0
- package/lib/dev-mode.js +80 -0
- package/lib/environment.js +4 -4
- package/lib/forge.js +97 -24
- package/lib/handoff.d.ts +8 -0
- package/lib/handoff.js +22 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/landing.js +100 -25
- package/lib/library.js +108 -39
- package/lib/make.js +3 -2
- package/lib/mind.d.ts +9 -29
- package/lib/mind.js +43 -4
- package/lib/pane.d.ts +13 -0
- package/lib/pane.js +4 -0
- package/lib/panel.d.ts +4 -0
- package/lib/panel.js +49 -46
- package/lib/plans.js +36 -15
- package/lib/project.js +72 -63
- package/lib/reply.d.ts +6 -1
- package/lib/reply.js +19 -9
- package/lib/run.js +23 -41
- package/lib/scheduled.js +36 -16
- package/lib/settings/account.js +2 -1
- package/lib/settings/billing.js +9 -4
- package/lib/settings/credits.d.ts +2 -1
- package/lib/settings/credits.js +2 -2
- package/lib/settings/machines.js +41 -18
- package/lib/settings/notifications.js +2 -1
- package/lib/shelf.d.ts +4 -1
- package/lib/shelf.js +79 -14
- package/lib/suggestions.js +2 -1
- package/lib/summary.js +3 -2
- package/lib/sync.js +3 -3
- package/lib/transcript.js +13 -6
- package/package.json +11 -1
package/lib/forge.js
CHANGED
|
@@ -14,12 +14,14 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
14
14
|
* `target`); a repository's org, name, branch and description, an issue's
|
|
15
15
|
* title, labels and people, and the forge's own refusals are drawn as given.
|
|
16
16
|
*/
|
|
17
|
-
import { SizableText, XStack, YStack } from '@hanzo/gui';
|
|
17
|
+
import { SizableText, useMedia, XStack, YStack } from '@hanzo/gui';
|
|
18
18
|
import { phrase } from '@hanzo/i18n';
|
|
19
19
|
import { useI18n } from '@hanzo/i18n/react';
|
|
20
|
-
import { ArrowRight, Check, ChevronDown, CircleCheck, CircleDot, CircleSlash, ExternalLink, FolderGit2, GitBranch, Github, GitPullRequest, LayoutTemplate, RefreshCw, Trash2, } from '@hanzogui/lucide-icons-2';
|
|
21
|
-
import { Button, Dialog, DialogContent, DialogTitle, DropdownMenu, Input } from '@hanzo/ui';
|
|
20
|
+
import { ArrowRight, Check, ChevronDown, CircleCheck, CircleDot, CircleSlash, Copy, ExternalLink, FolderGit2, GitBranch, Github, GitPullRequest, LayoutTemplate, MoreHorizontal, RefreshCw, Search, SlidersHorizontal, Trash2, X, } from '@hanzogui/lucide-icons-2';
|
|
21
|
+
import { Button, Dialog, DialogContent, DialogTitle, DropdownMenu, Input, Skeleton, toast } from '@hanzo/ui';
|
|
22
22
|
import { useEffect, useMemo, useState } from 'react';
|
|
23
|
+
import { copy as toClipboard } from './clipboard.js';
|
|
24
|
+
import { RING, RING_INSET } from './pane.js';
|
|
23
25
|
import { ago } from './ago.js';
|
|
24
26
|
import { codebases, remove as removeRepo } from './api/codebases.js';
|
|
25
27
|
import { unlink as removeLink } from './api/links.js';
|
|
@@ -28,6 +30,7 @@ import { Scheduled } from './scheduled.js';
|
|
|
28
30
|
import { boards, everything, sources, UNREAD } from './api/work.js';
|
|
29
31
|
import { boardKey, pinRepo, readPending, writePending } from './choice.js';
|
|
30
32
|
import { useKept, useRead } from './data.js';
|
|
33
|
+
import { useDevMode } from './dev-mode.js';
|
|
31
34
|
import { useHost, useTarget } from './host.js';
|
|
32
35
|
import { path } from './route.js';
|
|
33
36
|
import { Customize } from './customize/index.js';
|
|
@@ -147,9 +150,10 @@ function Projects() {
|
|
|
147
150
|
// What each repository is tied to on Hanzo — the links into it, GitHub's names
|
|
148
151
|
// for the copies it made, the projects built from it — read for Remove alone.
|
|
149
152
|
const made = useRead(signed ? () => sources(target) : null, NONE, [target, signed, landed]);
|
|
150
|
-
const [
|
|
153
|
+
const [confirming, setConfirming] = useState(null);
|
|
151
154
|
const [removing, setRemoving] = useState(false);
|
|
152
155
|
const [said, setSaid] = useState('');
|
|
156
|
+
const [saidError, setSaidError] = useState(false);
|
|
153
157
|
// A plan stands on the links, the forge and the projects all having answered:
|
|
154
158
|
// one that missed a link leaves a copy that syncs back, and one that missed a
|
|
155
159
|
// project leaves its site up. GitHub's grants only say which copies GitHub made.
|
|
@@ -166,36 +170,52 @@ function Projects() {
|
|
|
166
170
|
const remove = async (r) => {
|
|
167
171
|
setRemoving(true);
|
|
168
172
|
setSaid('');
|
|
173
|
+
setSaidError(false);
|
|
169
174
|
let at = 0;
|
|
170
175
|
try {
|
|
171
176
|
for (; at < r.steps.length; at++)
|
|
172
177
|
await drop(r.steps[at]);
|
|
173
|
-
|
|
178
|
+
toast.success(t('{repo} is removed from Hanzo.', { repo: r.repo }));
|
|
174
179
|
}
|
|
175
180
|
catch (e) {
|
|
176
181
|
setSaid(stopped(r, at, e.message, t));
|
|
182
|
+
setSaidError(true);
|
|
177
183
|
}
|
|
178
184
|
finally {
|
|
179
185
|
setRemoving(false);
|
|
180
|
-
|
|
186
|
+
setConfirming(null);
|
|
181
187
|
// Read again either way: what went leaves the list, and the next plan names only what is left.
|
|
182
188
|
list.reload();
|
|
183
189
|
made.reload();
|
|
184
190
|
}
|
|
185
191
|
};
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
192
|
+
const copyRepo = (named) => {
|
|
193
|
+
void toClipboard(named).then((ok) => (ok ? toast.success(t('Copied {repo}', { repo: named })) : toast.error(t('Could not copy repository name'))));
|
|
194
|
+
};
|
|
195
|
+
return (_jsxs(YStack, { flex: 1, minH: 0, overflow: "scroll", px: "$6", py: "$6", "$max-md": { px: '$4' }, children: [_jsxs(YStack, { width: "100%", maxW: 1040, mx: "auto", gap: "$4", children: [_jsxs(XStack, { justify: "space-between", items: "flex-start", gap: "$4", flexWrap: "wrap", children: [_jsxs(YStack, { gap: "$1", flex: 1, minW: 240, children: [_jsx(SizableText, { render: "h1", size: "$6", fontWeight: "500", color: "$ink", children: t('Projects') }), _jsx(SizableText, { size: "$2", color: "$soft", children: host.org
|
|
196
|
+
? t('{org}’s projects and linked GitHub repositories. Open one to work on it.', { org: host.org })
|
|
197
|
+
: t('Projects and linked GitHub repositories. Open one to work on it.') })] }), signed ? (_jsxs(XStack, { gap: "$2", items: "center", flexWrap: "wrap", children: [_jsxs(Button, { size: "sm", variant: "outline", onPress: template, children: [_jsx(LayoutTemplate, { size: 14 }), t('Create from template')] }), _jsxs(Button, { size: "sm", variant: none ? 'outline' : 'primary', borderColor: none ? 'var(--border-strong)' : undefined, onPress: link, children: [_jsx(Github, { size: 14 }), t('Link a GitHub repo')] })] })) : null] }), signed ? _jsx(GitHubLink, { onSync: link }) : null, said ? (_jsx(SizableText, { size: "$2", color: saidError ? 'var(--state-error)' : '$soft', role: "status", children: said })) : null, list.error ? (_jsxs(YStack, { borderWidth: 1, borderColor: "$borderColor", rounded: "$4", bg: "$panel", px: "$5", py: "$8", gap: "$3", items: "center", children: [_jsx(SizableText, { size: "$2", color: "var(--state-error)", text: "center", children: list.error.message }), _jsx(Button, { size: "sm", variant: "outline", onPress: list.reload, children: t('Try again') })] })) : !signed ? (_jsxs(YStack, { borderWidth: 1, borderColor: "$borderColor", rounded: "$4", bg: "$panel", px: "$5", py: "$8", gap: "$3", items: "center", children: [_jsx(SizableText, { size: "$2", color: "$soft", text: "center", children: t("Sign in to see this organization's projects.") }), _jsx(Button, { size: "sm", variant: "primary", onPress: () => host.signIn?.(), children: t('Sign in') })] })) : list.loading && list.value.length === 0 && pending.length === 0 ? (_jsxs(YStack, { gap: "$3", "aria-busy": true, children: [_jsx(Note, { children: t('Loading projects…') }), _jsx(YStack, { borderWidth: 1, borderColor: "$borderColor", rounded: "$3", bg: "$panel", overflow: "hidden", children: [0, 1, 2, 3].map((i) => (_jsxs(XStack, { items: "center", gap: "$3", px: "$3", py: "$3", borderTopWidth: i ? 1 : 0, borderColor: "$borderColor", children: [_jsx(Skeleton, { layout: "block", width: 18, height: 18, rounded: "$2", shrink: 0 }), _jsxs(YStack, { flex: 1, gap: "$1.5", children: [_jsx(Skeleton, { layout: "block", width: "38%", height: 14, rounded: "$2" }), _jsx(Skeleton, { layout: "block", width: "56%", height: 12, rounded: "$2" })] }), _jsx(Skeleton, { layout: "block", width: 64, height: 12, rounded: "$2", shrink: 0 })] }, i))) })] })) : none ? (_jsxs(YStack, { gap: "$4", children: [_jsx(YStack, { borderWidth: 1, borderColor: "$borderColor", rounded: "$4", bg: "$panel", px: "$5", py: "$6", gap: "$1.5", items: "center", children: _jsx(SizableText, { size: "$2", color: "$soft", text: "center", maxW: 460, children: t('No projects yet. A project is a repository: link one from GitHub, or start one from a template.') }) }), _jsxs(XStack, { gap: "$3", flexWrap: "wrap", children: [_jsx(Choice, { label: t('Link a GitHub repo'), icon: _jsx(Github, { size: 20 }), says: t('Mirror repositories you already have. They stay in step with GitHub, and their issues can come too.'), onPress: link }), _jsx(Choice, { label: t('Create from template'), icon: _jsx(LayoutTemplate, { size: 20 }), says: t('Start from a finished product — a site, an app, a store — and make it yours.'), onPress: template })] })] })) : (_jsxs(_Fragment, { children: [_jsxs(XStack, { gap: "$2", items: "center", children: [_jsx(YStack, { flex: 1, "$max-md": { display: 'none' } }), _jsx(YStack, { width: 320, minW: 0, shrink: 1, "$max-md": { width: 'auto', flex: 1 }, children: _jsx(Input, { value: q, onChangeText: setQ, placeholder: t('Find a project…'), "aria-label": t('Find a project'), startAdornment: _jsx(Search, { size: 14, color: "$soft" }), endAdornment: q ? (_jsx(XStack, { render: "button", "aria-label": t('Clear search'), onPress: () => setQ(''), minW: 24, minH: 24, items: "center", justify: "center", focusVisibleStyle: RING, children: _jsx(X, { size: 13, color: "$soft" }) })) : undefined, onKeyDown: (e) => {
|
|
198
|
+
if (e.key === 'Escape' && q)
|
|
199
|
+
setQ('');
|
|
200
|
+
} }) })] }), shown.length === 0 ? (_jsxs(YStack, { borderWidth: 1, borderColor: "$borderColor", rounded: "$4", bg: "$panel", px: "$5", py: "$7", gap: "$3", items: "center", children: [_jsx(Note, { children: t('Nothing matches.') }), _jsx(Button, { size: "sm", variant: "outline", onPress: () => setQ(''), children: t('Clear search') })] })) : (_jsxs(YStack, { borderWidth: 1, borderColor: "$borderColor", rounded: "$3", overflow: "hidden", children: [_jsxs(XStack, { px: "$3", py: "$2", gap: "$3", items: "center", bg: "$panel", children: [_jsxs(XStack, { flex: 1, render: "button", "aria-label": t('Sort by name'), items: "center", gap: "$1", onPress: () => setSort('name'), children: [_jsx(SizableText, { size: "$1", color: "$soft", children: t('Name') }), sort === 'name' ? _jsx(ChevronDown, { size: 12 }) : null] }), _jsx(SizableText, { size: "$1", color: "$soft", width: 120, "$max-md": { display: 'none' }, children: t('Branch') }), _jsxs(XStack, { render: "button", "aria-label": t('Sort by last updated'), items: "center", justify: "flex-end", gap: "$1", width: 120, onPress: () => setSort('updated'), children: [_jsx(SizableText, { size: "$1", color: "$soft", children: t('Updated') }), sort === 'updated' ? _jsx(ChevronDown, { size: 12 }) : null] }), _jsx(YStack, { width: 32, shrink: 0 })] }), slice.map((c) => {
|
|
201
|
+
const key = `${c.org}/${c.name}`;
|
|
202
|
+
const named = `${c.org ? `${c.org}/` : ''}${c.name}`;
|
|
203
|
+
const r = plan(c);
|
|
204
|
+
return (_jsx(YStack, { borderTopWidth: 1, borderColor: "$borderColor", children: _jsxs(XStack, { items: "center", gap: "$3", paddingInlineEnd: "$3", hoverStyle: { bg: '$hover' }, children: [_jsxs(XStack, { render: "button", "aria-label": t('Open {repo}', { repo: named }), onPress: () => open(c), "$platform-web": { textAlign: 'start' }, flex: 1, minW: 0, items: "center", gap: "$3", paddingInlineStart: "$3", py: "$2.5", minH: 44, focusVisibleStyle: RING_INSET, children: [_jsx(FolderGit2, { size: 15, color: "$soft" }), _jsxs(YStack, { flex: 1, minW: 0, children: [_jsxs(XStack, { minW: 0, items: "baseline", self: "flex-start", 'data-i18n-ltr': '', children: [c.org ? (_jsx(SizableText, { size: "$2", color: "$soft", numberOfLines: 1, shrink: 0, children: `${c.org}/` })) : null, _jsx(SizableText, { size: "$2", color: "$ink", fontWeight: "500", numberOfLines: 1, shrink: 1, children: c.name })] }), c.description ? (_jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 1, children: c.description })) : null] }), _jsxs(XStack, { width: 120, items: "center", gap: "$1.5", minW: 0, "$max-md": { display: 'none' }, children: [_jsx(GitBranch, { size: 12, color: "$soft" }), _jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 1, children: c.branch })] }), _jsx(SizableText, { size: "$1", color: "$soft", width: 120, text: "end", children: syncing.has(c.name) ? t('Syncing…') : ago(c.updated) })] }), _jsx(XStack, { width: 32, shrink: 0, justify: "center", children: _jsx(DropdownMenu, { trigger: _jsx(XStack, { render: "button", "aria-label": t('Actions for {repo}', { repo: named }), disabled: removing, width: 32, height: 32, items: "center", justify: "center", focusVisibleStyle: RING, children: _jsx(MoreHorizontal, { size: 16, color: "$soft" }) }), items: [
|
|
205
|
+
{ key: 'open', label: t('Open workspace'), icon: _jsx(ArrowRight, { size: 14 }), onSelect: () => open(c) },
|
|
206
|
+
{ key: 'copy', label: t('Copy repository'), icon: _jsx(Copy, { size: 14 }), onSelect: () => copyRepo(named) },
|
|
207
|
+
...(r
|
|
208
|
+
? [
|
|
209
|
+
{ type: 'separator' },
|
|
210
|
+
{ key: 'remove', label: t('Remove from Hanzo'), icon: _jsx(Trash2, { size: 14 }), destructive: true, onSelect: () => setConfirming(r) },
|
|
211
|
+
]
|
|
212
|
+
: []),
|
|
213
|
+
] }) })] }) }, key));
|
|
214
|
+
}), _jsxs(XStack, { px: "$3", py: "$2", justify: "space-between", items: "center", gap: "$2", flexWrap: "wrap", borderTopWidth: 1, borderColor: "$borderColor", children: [_jsx(SizableText, { size: "$1", color: "$soft", fontVariant: ['tabular-nums'], children: t('Showing {from}–{to} of {total}', { from, to, total: shown.length }) }), _jsxs(XStack, { gap: "$3", items: "center", children: [_jsx(XStack, { render: "button", "aria-label": t('Previous page'), disabled: safePage === 0, onPress: () => setPage(safePage - 1), children: _jsx(SizableText, { size: "$1", color: safePage === 0 ? '$soft' : '$ink', children: t('Prev') }) }), _jsx(SizableText, { size: "$1", color: "$soft", fontVariant: ['tabular-nums'], children: `${safePage + 1} / ${pages}` }), _jsx(XStack, { render: "button", "aria-label": t('Next page'), disabled: safePage >= pages - 1, onPress: () => setPage(safePage + 1), children: _jsx(SizableText, { size: "$1", color: safePage >= pages - 1 ? '$soft' : '$ink', children: t('Next') }) })] })] })] }))] }))] }), _jsx(Dialog, { open: confirming !== null, onOpenChange: (o) => !o && !removing && setConfirming(null), children: _jsxs(DialogContent, { maxW: 440, showCloseButton: false, gap: "$3", children: [_jsx(DialogTitle, { children: confirming ? t('Remove {repo}?', { repo: confirming.repo }) : t('Remove project?') }), confirming ? (_jsx(SizableText, { size: "$2", color: "$soft", children: confirming.says })) : null, _jsxs(XStack, { gap: "$2", justify: "flex-end", children: [_jsx(Button, { size: "sm", variant: "ghost", disabled: removing, onPress: () => setConfirming(null), children: t('Cancel') }), _jsx(Button, { size: "sm", variant: "destructive", disabled: removing || !confirming, onPress: () => confirming && void remove(confirming), children: removing ? t('Removing…') : t('Remove') })] })] }) })] }));
|
|
195
215
|
}
|
|
196
216
|
/** One of the two ways in, as a card you press. */
|
|
197
217
|
function Choice({ label, icon, says, onPress }) {
|
|
198
|
-
return (_jsxs(YStack, { render: "button", "aria-label": label, onPress: onPress, flex: 1,
|
|
218
|
+
return (_jsxs(YStack, { render: "button", "aria-label": label, onPress: onPress, flex: 1, flexBasis: 240, minW: 0, gap: "$2", p: "$4", rounded: "$4", borderWidth: 1, borderColor: "$borderColor", bg: "$panel", items: "flex-start", focusVisibleStyle: RING, children: [icon, _jsxs(XStack, { items: "center", gap: "$1.5", children: [_jsx(SizableText, { size: "$4", color: "$ink", fontWeight: "500", children: label }), _jsx(ArrowRight, { size: 14, 'data-i18n-mirror': '' })] }), _jsx(SizableText, { size: "$2", color: "$soft", text: "start", children: says })] }));
|
|
199
219
|
}
|
|
200
220
|
/**
|
|
201
221
|
* The GitHub connection, in one line: who it is connected as and the way to
|
|
@@ -296,7 +316,7 @@ function ref(i) {
|
|
|
296
316
|
return tag.startsWith('#') && at ? `${at}${tag}` : tag;
|
|
297
317
|
}
|
|
298
318
|
/** A dropdown that picks one of `options`, its trigger naming the choice. */
|
|
299
|
-
function Pick({ label, value, options, onPick }) {
|
|
319
|
+
function Pick({ label, value, options, active = false, onPick }) {
|
|
300
320
|
return (_jsx(DropdownMenu, { trigger: _jsxs(XStack, { render: "button", "aria-label": label, items: "center", gap: "$1", px: "$2", py: "$1", rounded: "$2", hoverStyle: { bg: '$hover' }, children: [_jsx(SizableText, { size: "$2", color: "$soft", numberOfLines: 1, children: options[value] }), _jsx(ChevronDown, { size: 12 })] }), items: Object.keys(options).map((k) => ({
|
|
301
321
|
key: k || '*',
|
|
302
322
|
label: options[k],
|
|
@@ -362,13 +382,17 @@ function useOpen(list, work) {
|
|
|
362
382
|
function Which({ issue, list, onPick, onClose }) {
|
|
363
383
|
const { t } = useI18n();
|
|
364
384
|
const [q, setQ] = useState('');
|
|
385
|
+
useEffect(() => {
|
|
386
|
+
if (!issue)
|
|
387
|
+
setQ('');
|
|
388
|
+
}, [issue]);
|
|
365
389
|
const shown = pickProjects(list.filter((p) => p.forge || p.linked), { q }).slice(0, 50);
|
|
366
390
|
const named = issue?.repo || issue?.hint || '';
|
|
367
391
|
return (_jsx(Dialog, { open: issue !== null, onOpenChange: (o) => (o ? null : onClose()), children: _jsxs(DialogContent, { maxW: 480, gap: "$3", children: [_jsx(DialogTitle, { children: t('Which project is this for?') }), _jsx(SizableText, { size: "$2", color: "$soft", children: named
|
|
368
392
|
? t('“{name}” is not one of this organization’s projects. Choose the repository the run works on.', { name: named })
|
|
369
393
|
: issue?.board
|
|
370
394
|
? t('This issue names no repository: it is on the {board} board. Choose the one the run works on.', { board: issue.board })
|
|
371
|
-
: t('This issue names no repository. Choose the one the run works on.') }), _jsx(Input, { value: q, onChangeText: setQ, placeholder: t('Find a project…'), "aria-label": t('Find a project') }), _jsx(YStack, { gap: "$1", maxH: 320, overflow: "scroll", children: shown.length === 0 ? (_jsx(Note, { children: list.length ? t('Nothing matches.') : t('No projects are linked yet.') })) : (shown.map((p) => (_jsx(XStack, { render: "button", "aria-label": t('Work on {repo}', { repo: `${p.owner}/${p.name}` }), onPress: () => onPick(p), px: "$2.5", py: "$2", rounded: "$3", items: "center", justify: "flex-start", hoverStyle: { bg: '$hover' }, children: _jsxs(XStack, { minW: 0, shrink: 1, 'data-i18n-ltr': '', children: [_jsx(SizableText, { size: "$2", color: "$soft", numberOfLines: 1, shrink: 0, children: `${p.owner}/` }), _jsx(SizableText, { size: "$2", color: "$ink", numberOfLines: 1, shrink: 1, children: p.name })] }) }, p.key)))) }), _jsx(XStack, { justify: "flex-end", children: _jsx(Button, { size: "sm", variant: "outline", onPress: onClose, children: t('Cancel') }) })] }) }));
|
|
395
|
+
: t('This issue names no repository. Choose the one the run works on.') }), _jsx(Input, { value: q, onChangeText: setQ, placeholder: t('Find a project…'), "aria-label": t('Find a project'), startAdornment: _jsx(Search, { size: 14, color: "$soft" }) }), _jsx(YStack, { gap: "$1", maxH: 320, overflow: "scroll", children: shown.length === 0 ? (_jsx(Note, { children: list.length ? t('Nothing matches.') : t('No projects are linked yet.') })) : (shown.map((p) => (_jsx(XStack, { render: "button", "aria-label": t('Work on {repo}', { repo: `${p.owner}/${p.name}` }), onPress: () => onPick(p), px: "$2.5", py: "$2", rounded: "$3", items: "center", justify: "flex-start", hoverStyle: { bg: '$hover' }, children: _jsxs(XStack, { minW: 0, shrink: 1, 'data-i18n-ltr': '', children: [_jsx(SizableText, { size: "$2", color: "$soft", numberOfLines: 1, shrink: 0, children: `${p.owner}/` }), _jsx(SizableText, { size: "$2", color: "$ink", numberOfLines: 1, shrink: 1, children: p.name })] }) }, p.key)))) }), _jsx(XStack, { justify: "flex-end", children: _jsx(Button, { size: "sm", variant: "outline", onPress: onClose, children: t('Cancel') }) })] }) }));
|
|
372
396
|
}
|
|
373
397
|
/**
|
|
374
398
|
* Every project's issues, read the way GitHub reads them: open or closed, one
|
|
@@ -381,6 +405,10 @@ function Issues() {
|
|
|
381
405
|
const host = useHost();
|
|
382
406
|
const target = useTarget();
|
|
383
407
|
const { t } = useI18n();
|
|
408
|
+
const media = useMedia();
|
|
409
|
+
const wideNav = Boolean(media.md);
|
|
410
|
+
const wideFilters = Boolean(media.sm);
|
|
411
|
+
const [devMode] = useDevMode();
|
|
384
412
|
const signed = Boolean(host.person);
|
|
385
413
|
const [board, setBoard] = useKept(boardKey(host.org), '');
|
|
386
414
|
const [state, setState] = useState('open');
|
|
@@ -390,6 +418,8 @@ function Issues() {
|
|
|
390
418
|
const [label, setLabel] = useState('');
|
|
391
419
|
const [assignee, setAssignee] = useState('');
|
|
392
420
|
const [q, setQ] = useState('');
|
|
421
|
+
const [moreBoards, setMoreBoards] = useState(false);
|
|
422
|
+
const [showFilters, setShowFilters] = useState(false);
|
|
393
423
|
const [pulled, setPulled] = useState(0);
|
|
394
424
|
const [busy, setBusy] = useState(false);
|
|
395
425
|
const [said, setSaid] = useState(null);
|
|
@@ -421,6 +451,20 @@ function Issues() {
|
|
|
421
451
|
const rows = [...column.values()].sort((a, b) => a.name.localeCompare(b.name));
|
|
422
452
|
const current = board ? column.get(board.toLowerCase()) : undefined;
|
|
423
453
|
const title = current?.name ?? board;
|
|
454
|
+
// Progressive disclosure: cap visible project filters to 6 on desktop (4 on compact screens), keeping the selected project visible.
|
|
455
|
+
const allBoardChips = [{ key: '', name: t('All projects'), open: work.filter((i) => !closed(i)).length }, ...rows];
|
|
456
|
+
const boardCap = wideNav ? 6 : 4;
|
|
457
|
+
const boardOverflow = allBoardChips.length > boardCap;
|
|
458
|
+
const visibleBoards = !moreBoards && boardOverflow
|
|
459
|
+
? (() => {
|
|
460
|
+
const base = allBoardChips.slice(0, boardCap);
|
|
461
|
+
if (base.some((b) => b.key.toLowerCase() === board.toLowerCase()))
|
|
462
|
+
return base;
|
|
463
|
+
const active = allBoardChips.find((b) => b.key.toLowerCase() === board.toLowerCase());
|
|
464
|
+
return active ? [...base.slice(0, Math.max(1, boardCap - 1)), active] : base;
|
|
465
|
+
})()
|
|
466
|
+
: allBoardChips;
|
|
467
|
+
const hiddenBoardCount = allBoardChips.length - visibleBoards.length;
|
|
424
468
|
const inBoard = work.filter((i) => !board || inProject(i, board));
|
|
425
469
|
const { labels, assignees } = facets(inBoard);
|
|
426
470
|
const scoped = inBoard
|
|
@@ -438,7 +482,15 @@ function Issues() {
|
|
|
438
482
|
return ms(a.created) - ms(b.created);
|
|
439
483
|
return ms(b.created) - ms(a.created);
|
|
440
484
|
});
|
|
441
|
-
const
|
|
485
|
+
const secondaryFilterCount = (label ? 1 : 0) + (assignee ? 1 : 0) + (origin !== 'all' ? 1 : 0);
|
|
486
|
+
const narrowed = q.trim() !== '' || kind !== 'all' || secondaryFilterCount > 0;
|
|
487
|
+
const clearFilters = () => {
|
|
488
|
+
setQ('');
|
|
489
|
+
setKind('all');
|
|
490
|
+
setOrigin('all');
|
|
491
|
+
setLabel('');
|
|
492
|
+
setAssignee('');
|
|
493
|
+
};
|
|
442
494
|
const pull = async () => {
|
|
443
495
|
setBusy(true);
|
|
444
496
|
setSaid(null);
|
|
@@ -471,16 +523,22 @@ function Issues() {
|
|
|
471
523
|
setSaid({ text: e.message });
|
|
472
524
|
}
|
|
473
525
|
};
|
|
526
|
+
const copyRef = (named) => {
|
|
527
|
+
void toClipboard(named).then((ok) => (ok ? toast.success(t('Copied {ref}', { ref: named })) : toast.error(t('Could not copy reference'))));
|
|
528
|
+
};
|
|
474
529
|
const chip = (key, name, count) => {
|
|
475
530
|
const on = key.toLowerCase() === board.toLowerCase();
|
|
476
|
-
return (_jsxs(XStack, { render: "button", "aria-label": key ? t('Show {project}', { project: name }) : t('Show every project'), "aria-pressed": on, onPress: () => setBoard(key), items: "center", gap: "$2", px: "$2.5", py: "$1.5", rounded: "$3",
|
|
531
|
+
return (_jsxs(XStack, { render: "button", "aria-label": key ? t('Show {project}', { project: name }) : t('Show every project'), "aria-pressed": on, onPress: () => setBoard(key), items: "center", gap: "$2", px: "$2.5", py: "$1.5", minH: 32, rounded: "$3", shrink: 0, focusVisibleStyle: RING, children: [_jsx(SizableText, { flex: 1, size: "$2", color: on ? '$ink' : '$soft', numberOfLines: 1, text: "start", children: name }), count ? (_jsx(SizableText, { size: "$1", color: "$soft", fontVariant: ['tabular-nums'], children: count })) : null] }, key || '*'));
|
|
477
532
|
};
|
|
478
533
|
return (_jsxs(YStack, { flex: 1, minH: 0, overflow: "scroll", px: "$6", py: "$6", "$max-md": { px: '$4' }, children: [_jsxs(YStack, { width: "100%", maxW: 1120, mx: "auto", gap: "$4", children: [_jsxs(XStack, { justify: "space-between", items: "flex-start", gap: "$4", flexWrap: "wrap", children: [_jsxs(YStack, { gap: "$1", flex: 1, minW: 240, children: [_jsx(SizableText, { render: "h1", size: "$6", fontWeight: "500", color: "$ink", children: board ? t('Issues · {project}', { project: title }) : t('Issues') }), _jsx(SizableText, { size: "$2", color: "$soft", children: board
|
|
479
534
|
? t('Work on {project}. Choosing an issue starts the next run on its own repository.', { project: title })
|
|
480
|
-
: t('Work across every project. Choosing an issue starts the next run on its own repository.') })] }), _jsxs(Button, { size: "sm", variant: "outline", disabled: !signed || busy, onPress: () => void pull(), children: [_jsx(Github, { size: 14 }), busy ? t('Syncing…') : board ? t('Sync {project} from GitHub', { project: title }) : t('Sync all from GitHub')] })] }), said ? (_jsxs(XStack, { items: "center", gap: "$3", flexWrap: "wrap", children: [_jsx(Note, { children: said.text }), said.connect ? (_jsxs(Button, { size: "sm", variant: "primary", onPress: () => void link(), children: [_jsx(Github, { size: 14 }), t('Connect GitHub')] })) : null] })) : null, _jsxs(XStack, { gap: "$5", items: "flex-start", "$max-md": { flexDirection: 'column', gap: '$3' }, children: [_jsxs(YStack, { render: "nav", "aria-label": t('Projects'), width: 220, shrink: 0, gap: "$0.5",
|
|
535
|
+
: t('Work across every project. Choosing an issue starts the next run on its own repository.') })] }), _jsxs(Button, { size: "sm", variant: "outline", disabled: !signed || busy, onPress: () => void pull(), children: [_jsx(Github, { size: 14 }), busy ? t('Syncing…') : board ? t('Sync {project} from GitHub', { project: title }) : t('Sync all from GitHub')] })] }), said ? (_jsxs(XStack, { items: "center", gap: "$3", flexWrap: "wrap", children: [_jsx(Note, { children: said.text }), said.connect ? (_jsxs(Button, { size: "sm", variant: "primary", onPress: () => void link(), children: [_jsx(Github, { size: 14 }), t('Connect GitHub')] })) : null] })) : null, _jsxs(XStack, { gap: "$5", items: "flex-start", "$max-md": { flexDirection: 'column', gap: '$3' }, children: [_jsxs(YStack, { render: "nav", "aria-label": t('Projects'), width: 220, shrink: 0, gap: "$0.5", children: [_jsx(SizableText, { size: "$1", color: "$soft", px: "$2.5", pb: "$1", "$max-md": { display: 'none' }, children: t('Projects') }), visibleBoards.map((p) => chip(p.key, p.name, p.open)), boardOverflow ? (_jsx(XStack, { render: "button", "aria-expanded": moreBoards, "aria-label": moreBoards ? t('Show fewer projects') : t('Show {n} more projects', { n: hiddenBoardCount }), onPress: () => setMoreBoards((v) => !v), items: "center", px: "$2.5", py: "$1.5", minH: 32, shrink: 0, focusVisibleStyle: RING, children: _jsx(SizableText, { size: "$1", fontWeight: "500", color: "$ink", children: moreBoards ? t('Show less') : t('+{n} more', { n: hiddenBoardCount }) }) })) : null] }), _jsxs(YStack, { flex: 1, minW: 0, gap: "$3", width: "100%", "$max-md": { flexBasis: 'auto', grow: 0, minW: 0, width: '100%' }, "$max-sm": { flexBasis: 'auto', grow: 0, minW: 0, width: '100%' }, children: [_jsx(Input, { value: q, onChangeText: setQ, placeholder: t('Search issues'), "aria-label": t('Search issues'), disabled: !signed, startAdornment: _jsx(Search, { size: 14, color: "$soft" }), endAdornment: q ? (_jsx(XStack, { render: "button", "aria-label": t('Clear search'), onPress: () => setQ(''), minW: 24, minH: 24, items: "center", justify: "center", focusVisibleStyle: RING, children: _jsx(X, { size: 13, color: "$soft" }) })) : undefined, onKeyDown: (e) => {
|
|
536
|
+
if (e.key === 'Escape' && q)
|
|
537
|
+
setQ('');
|
|
538
|
+
} }), list.error ? (_jsxs(YStack, { borderWidth: 1, borderColor: "$borderColor", rounded: "$4", bg: "$panel", px: "$5", py: "$8", gap: "$3", items: "center", children: [_jsx(SizableText, { size: "$2", color: "var(--state-error)", text: "center", children: list.error.message }), _jsx(Button, { size: "sm", variant: "outline", onPress: list.reload, children: t('Try again') })] })) : !signed ? (_jsxs(YStack, { borderWidth: 1, borderColor: "$borderColor", rounded: "$4", bg: "$panel", px: "$5", py: "$8", gap: "$3", items: "center", children: [_jsx(SizableText, { size: "$2", color: "$soft", text: "center", children: t("Sign in to see this organization's issues.") }), _jsx(Button, { size: "sm", variant: "primary", onPress: () => host.signIn?.(), children: t('Sign in') })] })) : list.loading && list.value.length === 0 ? (_jsxs(YStack, { gap: "$3", "aria-busy": true, children: [_jsx(Note, { children: t('Loading issues…') }), _jsx(YStack, { borderWidth: 1, borderColor: "$borderColor", rounded: "$3", bg: "$panel", overflow: "hidden", children: [0, 1, 2, 3, 4].map((i) => (_jsxs(XStack, { items: "center", gap: "$3", px: "$3", py: "$3", borderTopWidth: i ? 1 : 0, borderColor: "$borderColor", children: [_jsx(Skeleton, { layout: "block", width: 16, height: 16, rounded: 999, shrink: 0 }), _jsxs(YStack, { flex: 1, gap: "$1.5", children: [_jsx(Skeleton, { layout: "block", width: "54%", height: 14, rounded: "$2" }), _jsx(Skeleton, { layout: "block", width: "36%", height: 12, rounded: "$2" })] })] }, i))) })] })) : (_jsxs(YStack, { borderWidth: 1, borderColor: "$borderColor", rounded: "$3", overflow: "hidden", children: [_jsxs(XStack, { px: "$3", py: "$2", gap: "$3", items: "center", bg: "$panel", flexWrap: "wrap", children: [_jsxs(XStack, { gap: "$3", items: "center", flex: 1, minW: 0, children: [_jsxs(XStack, { render: "button", "aria-label": t('Open issues'), "aria-pressed": state === 'open', items: "center", gap: "$1.5", onPress: () => setState('open'), children: [_jsx(CircleDot, { size: 14, color: state === 'open' ? '$ink' : '$soft' }), _jsx(SizableText, { size: "$2", color: state === 'open' ? '$ink' : '$soft', fontWeight: state === 'open' ? '500' : '400', fontVariant: ['tabular-nums'], children: t('{n} open', { n: opened.length }) })] }), _jsxs(XStack, { render: "button", "aria-label": t('Closed issues'), "aria-pressed": state === 'closed', items: "center", gap: "$1.5", onPress: () => setState('closed'), children: [_jsx(Check, { size: 14, color: state === 'closed' ? '$ink' : '$soft' }), _jsx(SizableText, { size: "$2", color: state === 'closed' ? '$ink' : '$soft', fontWeight: state === 'closed' ? '500' : '400', fontVariant: ['tabular-nums'], children: t('{n} closed', { n: shut.length }) })] })] }), _jsx(XStack, { flex: 1, "$max-sm": { display: 'none' } }), _jsxs(XStack, { gap: "$1", rowGap: "$1", items: "center", flexWrap: "wrap", shrink: 1, minW: 0, children: [wideFilters || showFilters ? (_jsxs(_Fragment, { children: [_jsx(Pick, { label: t('Label'), value: label, active: Boolean(label), options: menu(t('Any label'), labels), onPick: setLabel }), _jsx(Pick, { label: t('Assignee'), value: assignee, active: Boolean(assignee), options: menu(t('Anyone'), assignees), onPick: setAssignee })] })) : null, _jsx(Pick, { label: t('Kind'), value: kind, active: kind !== 'all', options: { all: t(KINDS.all), issue: t(KINDS.issue), pr: t(KINDS.pr) }, onPick: setKind }), wideFilters || showFilters ? (_jsx(Pick, { label: t('Source'), value: origin, active: origin !== 'all', options: { ...ORIGINS, all: t(ORIGINS.all) }, onPick: setOrigin })) : null, _jsx(Pick, { label: t('Sort'), value: order, active: order !== 'newest', options: { newest: t(ORDERS.newest), oldest: t(ORDERS.oldest), updated: t(ORDERS.updated) }, onPick: setOrder }), !wideFilters ? (_jsxs(XStack, { render: "button", "aria-expanded": showFilters, "aria-label": showFilters ? t('Hide filters') : t('More filters'), onPress: () => setShowFilters((v) => !v), items: "center", gap: "$1.5", px: "$2", py: "$1", minH: 44, focusVisibleStyle: RING, children: [_jsx(SlidersHorizontal, { size: 13, color: showFilters || secondaryFilterCount ? '$ink' : '$soft' }), _jsx(SizableText, { size: "$2", color: showFilters || secondaryFilterCount ? '$ink' : '$soft', children: secondaryFilterCount ? t('Filters ({n})', { n: secondaryFilterCount }) : t('Filters') })] })) : null] })] }), shown.length === 0 ? (_jsxs(YStack, { px: "$3", py: "$6", gap: "$3", items: "center", borderTopWidth: 1, borderColor: "$borderColor", children: [_jsx(Note, { children: state === 'open' ? (narrowed ? t('No open issues match.') : t('Nothing open.')) : t('Nothing closed.') }), narrowed ? (_jsx(Button, { size: "sm", variant: "outline", onPress: clearFilters, children: t('Clear filters') })) : list.value.length === 0 ? (_jsxs(XStack, { gap: "$2", flexWrap: "wrap", justify: "center", children: [_jsxs(Button, { size: "sm", variant: "outline", disabled: busy, onPress: () => void pull(), children: [_jsx(Github, { size: 14 }), t('Sync from GitHub')] }), _jsx(Button, { size: "sm", onPress: () => host.go(''), children: t('Start a new run') })] })) : null] })) : (shown.map((i) => {
|
|
481
539
|
const named = ref(i);
|
|
482
|
-
return (_jsxs(XStack, { items: "center", gap: "$
|
|
483
|
-
named || (i.pull ? t('pr') : i.kind),
|
|
540
|
+
return (_jsxs(XStack, { items: "center", gap: "$1.5", paddingInlineEnd: "$2.5", borderTopWidth: 1, borderColor: "$borderColor", hoverStyle: { bg: '$hover' }, children: [_jsxs(XStack, { render: "button", "aria-label": t('Build {issue}', { issue: named || i.title }), onPress: () => open(i), disabled: finding === i.key && i.key !== '', flex: 1, minW: 0, items: "flex-start", gap: "$3", paddingInlineStart: "$3", py: "$2.5", minH: 44, "$platform-web": { textAlign: 'start' }, focusVisibleStyle: RING_INSET, children: [_jsx(YStack, { pt: 2, children: _jsx(Mark, { i: i }) }), _jsxs(YStack, { flex: 1, minW: 0, gap: "$1", items: "flex-start", children: [_jsxs(XStack, { gap: "$2", items: "center", flexWrap: "wrap", maxW: "100%", children: [_jsx(SizableText, { size: "$3", color: "$ink", fontWeight: "500", numberOfLines: 1, shrink: 1, children: i.title }), STATUS[i.status] && !closed(i) && i.status !== 'todo' ? _jsx(Tag, { children: t(STATUS[i.status]) }) : null, !STATUS[i.status] ? _jsx(Tag, { children: i.status }) : null, i.priority !== 'none' && i.priority ? _jsx(Tag, { children: i.priority }) : null, i.labels.slice(0, 4).map((l) => (_jsx(Tag, { children: l }, l)))] }), _jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 1, children: [
|
|
541
|
+
named || (i.pull ? (devMode ? t('pr') : t('Pull request')) : i.kind),
|
|
484
542
|
!board && projectOf(i) && !named.startsWith(projectOf(i)) ? projectOf(i) : '',
|
|
485
543
|
i.created ? t('opened {when}', { when: ago(i.created) }) : '',
|
|
486
544
|
i.assignees.length ? t('assigned to {people}', { people: i.assignees.join(', ') }) : '',
|
|
@@ -488,6 +546,21 @@ function Issues() {
|
|
|
488
546
|
finding === i.key && i.key !== '' ? t('opening…') : '',
|
|
489
547
|
]
|
|
490
548
|
.filter(Boolean)
|
|
491
|
-
.join(' · ') })] })] }), i.url ? (_jsx(Out, { href: i.url, label: fromGitHub(i) ? t('Open {issue} on GitHub', { issue: named || i.title }) : t('Open {issue}
|
|
549
|
+
.join(' · ') })] })] }), i.url ? (_jsx(Out, { href: i.url, label: fromGitHub(i) ? t('Open {issue} on GitHub', { issue: named || i.title }) : t('Open {issue} in project', { issue: named || i.title }), children: _jsx(XStack, { width: 32, height: 32, $touchable: { minW: 44, minH: 44 }, "$max-sm": { minW: 44, minH: 44 }, items: "center", justify: "center", rounded: "$2", hoverStyle: { bg: '$raised' }, children: _jsx(ExternalLink, { size: 14, color: "$soft" }) }) })) : null, _jsx(DropdownMenu, { trigger: _jsx(XStack, { render: "button", "aria-label": t('Actions for {issue}', { issue: named || i.title }), width: 32, height: 32, items: "center", justify: "center", focusVisibleStyle: RING, children: _jsx(MoreHorizontal, { size: 16, color: "$soft" }) }), items: [
|
|
550
|
+
{ key: 'work', label: t('Work on this issue'), icon: _jsx(ArrowRight, { size: 14 }), onSelect: () => open(i) },
|
|
551
|
+
...(named
|
|
552
|
+
? [{ key: 'copy', label: t('Copy reference'), icon: _jsx(Copy, { size: 14 }), onSelect: () => copyRef(named) }]
|
|
553
|
+
: []),
|
|
554
|
+
...(i.url
|
|
555
|
+
? [
|
|
556
|
+
{
|
|
557
|
+
key: 'external',
|
|
558
|
+
label: fromGitHub(i) ? t('Open on GitHub') : t('Open in project'),
|
|
559
|
+
icon: _jsx(ExternalLink, { size: 14 }),
|
|
560
|
+
onSelect: () => window.open(i.url, '_blank', 'noopener,noreferrer'),
|
|
561
|
+
},
|
|
562
|
+
]
|
|
563
|
+
: []),
|
|
564
|
+
] })] }, i.key || `${i.board}:${i.title}`));
|
|
492
565
|
}))] }))] })] })] }), dialog] }));
|
|
493
566
|
}
|
package/lib/handoff.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What Chat's "Open in Dev" leaves in this tab's session storage for the New
|
|
3
|
+
* page to pick up: a prompt, and optionally some code to run it on. One key, one
|
|
4
|
+
* reader, so Chat and Dev cannot drift apart.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DEV_HANDOFF = "hanzo.handoff.dev";
|
|
7
|
+
/** The draft the handoff makes, or '' for none; the handoff is consumed either way. */
|
|
8
|
+
export declare function takeHandoff(store: Pick<Storage, 'getItem' | 'removeItem'>): string;
|
package/lib/handoff.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What Chat's "Open in Dev" leaves in this tab's session storage for the New
|
|
3
|
+
* page to pick up: a prompt, and optionally some code to run it on. One key, one
|
|
4
|
+
* reader, so Chat and Dev cannot drift apart.
|
|
5
|
+
*/
|
|
6
|
+
export const DEV_HANDOFF = 'hanzo.handoff.dev';
|
|
7
|
+
/** The draft the handoff makes, or '' for none; the handoff is consumed either way. */
|
|
8
|
+
export function takeHandoff(store) {
|
|
9
|
+
try {
|
|
10
|
+
const raw = store.getItem(DEV_HANDOFF);
|
|
11
|
+
if (!raw)
|
|
12
|
+
return '';
|
|
13
|
+
store.removeItem(DEV_HANDOFF);
|
|
14
|
+
const h = JSON.parse(raw);
|
|
15
|
+
const text = (v) => (typeof v === 'string' ? v.trim() : '');
|
|
16
|
+
const code = text(h.code);
|
|
17
|
+
return [text(h.prompt), code && `\`\`\`${text(h.language)}\n${code}\n\`\`\``].filter(Boolean).join('\n\n');
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
}
|
package/lib/index.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export { href, parse, path, PLACES, route, SESSION, SLUG, type Route, type Scree
|
|
|
53
53
|
* @hanzo/ui/chat's, for Chat and Dev alike.
|
|
54
54
|
*/
|
|
55
55
|
export { catalog, EFFORTS, FIRST, grants, isFree, keep, kept, level, nameOf, pacing, useCatalog, useChoice, useMind, type Choice, type Effort, type Mind } from './mind.ts';
|
|
56
|
+
export { DEV_HANDOFF, takeHandoff } from './handoff.ts';
|
|
56
57
|
export { useEar } from './voice.ts';
|
|
57
58
|
export { BARE, CHAT_MODES, DEV_MODES, gearOf, MODES, useGear, useLanguage, type Gear, type GearState, type Mode as GearMode } from './gear.ts';
|
|
58
59
|
export { useCarry, type Carry } from './carry.tsx';
|
package/lib/index.js
CHANGED
|
@@ -48,6 +48,7 @@ export { href, parse, path, PLACES, route, SESSION, SLUG } from './route.js';
|
|
|
48
48
|
* @hanzo/ui/chat's, for Chat and Dev alike.
|
|
49
49
|
*/
|
|
50
50
|
export { catalog, EFFORTS, FIRST, grants, isFree, keep, kept, level, nameOf, pacing, useCatalog, useChoice, useMind } from './mind.js';
|
|
51
|
+
export { DEV_HANDOFF, takeHandoff } from './handoff.js';
|
|
51
52
|
export { useEar } from './voice.js';
|
|
52
53
|
export { BARE, CHAT_MODES, DEV_MODES, gearOf, MODES, useGear, useLanguage } from './gear.js';
|
|
53
54
|
export { useCarry } from './carry.js';
|