@hanzo/build 0.2.16 → 0.2.18
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/codebases.d.ts +1 -1
- package/lib/api/codebases.js +3 -3
- package/lib/api/harness.d.ts +7 -0
- package/lib/api/harness.js +34 -6
- package/lib/api/sessions.d.ts +2 -2
- package/lib/api/sessions.js +1 -1
- package/lib/api/turn.js +37 -16
- package/lib/ask.js +2 -2
- package/lib/builder.js +36 -4
- package/lib/choice.js +2 -2
- package/lib/customize/agents.js +4 -4
- package/lib/customize/connectors.js +7 -8
- package/lib/customize/index.js +3 -2
- package/lib/customize/plugins.js +3 -3
- package/lib/customize/skills.js +4 -4
- package/lib/customize/ui.d.ts +6 -2
- package/lib/customize/ui.js +9 -3
- package/lib/data.js +17 -15
- package/lib/desk.d.ts +4 -4
- package/lib/desk.js +6 -4
- package/lib/door.js +1 -1
- package/lib/environment.js +3 -3
- package/lib/find.js +2 -2
- package/lib/forge.js +6 -14
- package/lib/git.js +1 -1
- package/lib/host.d.ts +2 -0
- package/lib/landing.js +25 -16
- package/lib/markdown.js +6 -4
- package/lib/pitch.d.ts +4 -0
- package/lib/pitch.js +39 -0
- package/lib/plans.js +10 -9
- package/lib/project.js +20 -21
- package/lib/prose.js +1 -1
- package/lib/publish.js +9 -8
- package/lib/run.js +72 -45
- package/lib/settings/account.js +7 -5
- package/lib/settings/billing.js +11 -20
- package/lib/settings/capabilities.js +1 -1
- package/lib/settings/card.js +2 -2
- package/lib/settings/code.js +6 -3
- package/lib/settings/general.js +6 -5
- package/lib/settings/index.js +2 -3
- package/lib/settings/integrations.js +2 -2
- package/lib/settings/keys.js +8 -9
- package/lib/settings/machines.js +5 -9
- package/lib/settings/members.js +3 -2
- package/lib/settings/memory.js +1 -1
- package/lib/settings/notifications.js +1 -1
- package/lib/settings/privacy.js +2 -2
- package/lib/settings/usage.js +8 -9
- package/lib/shelf.js +5 -9
- package/lib/sync.js +2 -5
- package/lib/tools.js +2 -3
- package/lib/transcript.d.ts +5 -2
- package/lib/transcript.js +21 -3
- package/lib/visit.d.ts +31 -0
- package/lib/visit.js +53 -0
- package/lib/voice.js +3 -5
- package/package.json +1 -1
package/lib/voice.js
CHANGED
|
@@ -24,10 +24,8 @@ export function spoken() {
|
|
|
24
24
|
const nav = typeof navigator !== 'undefined' ? navigator.language.split('-')[0] : 'en';
|
|
25
25
|
return LANGUAGES.some((l) => l.id === nav) ? nav : 'en';
|
|
26
26
|
}
|
|
27
|
-
/** Whether this browser can record the microphone at all. */
|
|
27
|
+
/** Whether this browser can record the microphone at all. A page that is not a secure context has no media devices. */
|
|
28
28
|
function recordable() {
|
|
29
|
-
if (typeof window === 'undefined' || typeof navigator === 'undefined')
|
|
30
|
-
return false;
|
|
31
29
|
return typeof window.MediaRecorder === 'function' && Boolean(navigator.mediaDevices?.getUserMedia);
|
|
32
30
|
}
|
|
33
31
|
export function useDictation(t, onText, onNote) {
|
|
@@ -42,7 +40,7 @@ export function useDictation(t, onText, onNote) {
|
|
|
42
40
|
// The person's saved language (Settings → General), else this browser's, else English.
|
|
43
41
|
const kept = usePrefs();
|
|
44
42
|
const language = LANGUAGES.some((l) => l.id === kept.prefs.language) ? kept.prefs.language : spoken();
|
|
45
|
-
const setLanguage = useCallback((id) => kept.save({ language: id }).catch((e) => note.current(e
|
|
43
|
+
const setLanguage = useCallback((id) => kept.save({ language: id }).catch((e) => note.current(e.message)), [kept]);
|
|
46
44
|
const ear = useMemo(() => speech({ baseUrl: t.api, token: t.token, ear: 'whisper' }), [t]);
|
|
47
45
|
useEffect(() => setAble(recordable()), []);
|
|
48
46
|
const toggle = useCallback(async () => {
|
|
@@ -80,7 +78,7 @@ export function useDictation(t, onText, onNote) {
|
|
|
80
78
|
if (words)
|
|
81
79
|
said.current(words);
|
|
82
80
|
})
|
|
83
|
-
.catch((e) => note.current(e
|
|
81
|
+
.catch((e) => note.current(e.message))
|
|
84
82
|
.finally(() => setBusy(false));
|
|
85
83
|
};
|
|
86
84
|
rec.current = r;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/build",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"description": "Hanzo Build — say what you want, watch it built, deployed and running. The builder as a page (hanzo.build) and as a component (hanzo.ai/dev).",
|