@unctad-ai/voice-agent-ui 1.0.9 → 2.0.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/dist/{VoiceSettingsView-N6AV577N.js → VoiceSettingsView-BJH4O35B.js} +2 -2
- package/dist/{chunk-6VLRVQZ4.js → chunk-DYCX6DNJ.js} +2 -2
- package/dist/index.js +7 -10
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- /package/dist/{VoiceSettingsView-N6AV577N.js.map → VoiceSettingsView-BJH4O35B.js.map} +0 -0
- /package/dist/{chunk-6VLRVQZ4.js.map → chunk-DYCX6DNJ.js.map} +0 -0
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
SliderSetting,
|
|
6
6
|
ToggleSetting,
|
|
7
7
|
VoiceSettingsView
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DYCX6DNJ.js";
|
|
9
9
|
export {
|
|
10
10
|
Divider,
|
|
11
11
|
SelectSetting,
|
|
@@ -14,4 +14,4 @@ export {
|
|
|
14
14
|
ToggleSetting,
|
|
15
15
|
VoiceSettingsView as default
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=VoiceSettingsView-
|
|
17
|
+
//# sourceMappingURL=VoiceSettingsView-BJH4O35B.js.map
|
|
@@ -1185,7 +1185,7 @@ function VoiceSettingsView({ onBack, onVolumeChange }) {
|
|
|
1185
1185
|
] }),
|
|
1186
1186
|
/* @__PURE__ */ jsxs2("div", { style: { paddingTop: 2, paddingBottom: 4, fontSize: 11, color: "#9ca3af" }, children: [
|
|
1187
1187
|
"Kit version: ",
|
|
1188
|
-
/* @__PURE__ */ jsx3("span", { style: { fontWeight: 500, color: "#6b7280" }, children: "
|
|
1188
|
+
/* @__PURE__ */ jsx3("span", { style: { fontWeight: 500, color: "#6b7280" }, children: "2.0.0" })
|
|
1189
1189
|
] })
|
|
1190
1190
|
] })
|
|
1191
1191
|
] })
|
|
@@ -1278,4 +1278,4 @@ export {
|
|
|
1278
1278
|
SettingsSection,
|
|
1279
1279
|
Divider
|
|
1280
1280
|
};
|
|
1281
|
-
//# sourceMappingURL=chunk-
|
|
1281
|
+
//# sourceMappingURL=chunk-DYCX6DNJ.js.map
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
VoiceSettingsProvider,
|
|
9
9
|
VoiceSettingsView,
|
|
10
10
|
useVoiceSettings
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-DYCX6DNJ.js";
|
|
12
12
|
|
|
13
13
|
// src/VoiceAgentProvider.tsx
|
|
14
14
|
import { SiteConfigProvider } from "@unctad-ai/voice-agent-core";
|
|
@@ -37,7 +37,7 @@ import { ChevronDown as ChevronDown2, X, Mic as Mic3, ArrowUp, Keyboard as Keybo
|
|
|
37
37
|
import {
|
|
38
38
|
useVoiceAgent,
|
|
39
39
|
voiceStateToOrbState,
|
|
40
|
-
|
|
40
|
+
checkBackendHealth,
|
|
41
41
|
useSiteConfig as useSiteConfig4,
|
|
42
42
|
RECOVERY_POLL_MS,
|
|
43
43
|
PANEL_WIDTH,
|
|
@@ -1665,7 +1665,7 @@ function PipelineMetricsBar({
|
|
|
1665
1665
|
|
|
1666
1666
|
// src/components/GlassCopilotPanel.tsx
|
|
1667
1667
|
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1668
|
-
var VoiceSettingsView2 = lazy(() => import("./VoiceSettingsView-
|
|
1668
|
+
var VoiceSettingsView2 = lazy(() => import("./VoiceSettingsView-BJH4O35B.js"));
|
|
1669
1669
|
var STATE_LABELS = {
|
|
1670
1670
|
IDLE: "Tap mic to speak",
|
|
1671
1671
|
LISTENING: "Listening...",
|
|
@@ -2341,7 +2341,7 @@ var WiredPanelErrorBoundary = class extends Component2 {
|
|
|
2341
2341
|
console.warn("[GlassCopilotPanel] Voice agent unavailable:", error.message);
|
|
2342
2342
|
}
|
|
2343
2343
|
handleRetry = () => {
|
|
2344
|
-
return
|
|
2344
|
+
return checkBackendHealth().then(({ available }) => {
|
|
2345
2345
|
if (available) this.setState({ hasError: false });
|
|
2346
2346
|
return available;
|
|
2347
2347
|
});
|
|
@@ -2375,10 +2375,7 @@ function WiredPanelInner({
|
|
|
2375
2375
|
const config = useSiteConfig4();
|
|
2376
2376
|
const resolvedPortrait = portraitSrc ?? config.avatarUrl;
|
|
2377
2377
|
const { settings: voiceSettings, volumeRef, speedRef } = useVoiceSettings();
|
|
2378
|
-
const { state, start, stop, messages, isLLMLoading, getAmplitude, analyser, sendTextMessage, voiceError, dismissError,
|
|
2379
|
-
useEffect6(() => {
|
|
2380
|
-
if (sessionEnded) onCollapse();
|
|
2381
|
-
}, [sessionEnded, onCollapse]);
|
|
2378
|
+
const { state, start, stop, messages, isLLMLoading, getAmplitude, analyser, sendTextMessage, voiceError, dismissError, lastTimings, applyVolume, settings } = useVoiceAgent({ settings: voiceSettings, volumeRef, speedRef });
|
|
2382
2379
|
const [toolResult, setToolResult] = useState5(null);
|
|
2383
2380
|
const orbState = voiceStateToOrbState(state);
|
|
2384
2381
|
const [backendDown, setBackendDown] = useState5(false);
|
|
@@ -2386,7 +2383,7 @@ function WiredPanelInner({
|
|
|
2386
2383
|
const pollTimerRef = useRef4(null);
|
|
2387
2384
|
const cancelledRef = useRef4(false);
|
|
2388
2385
|
const runHealthCheck = useCallback3(() => {
|
|
2389
|
-
|
|
2386
|
+
checkBackendHealth().then(({ available }) => {
|
|
2390
2387
|
if (cancelledRef.current) return;
|
|
2391
2388
|
setBackendDown(!available);
|
|
2392
2389
|
if (available) {
|
|
@@ -2484,7 +2481,7 @@ function WiredPanelInner({
|
|
|
2484
2481
|
const handleRetryClick = useCallback3(() => {
|
|
2485
2482
|
if (isRetrying) return;
|
|
2486
2483
|
setIsRetrying(true);
|
|
2487
|
-
|
|
2484
|
+
checkBackendHealth().then(({ available }) => {
|
|
2488
2485
|
if (cancelledRef.current) return;
|
|
2489
2486
|
setIsRetrying(false);
|
|
2490
2487
|
setBackendDown(!available);
|