@absolutejs/voice 0.0.22-beta.507 → 0.0.22-beta.509
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/angular/index.d.ts +2 -0
- package/dist/angular/index.js +374 -272
- package/dist/angular/voice-live-agent-console.service.d.ts +16 -0
- package/dist/dtmfCollector.d.ts +37 -0
- package/dist/holdAudio.d.ts +23 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +563 -0
- package/dist/postCallSurvey.d.ts +41 -0
- package/dist/promptInjectionGuard.d.ts +30 -0
- package/dist/react/VoiceLiveAgentConsole.d.ts +11 -0
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.js +285 -29
- package/dist/svelte/createVoiceLiveAgentConsole.d.ts +23 -0
- package/dist/svelte/index.d.ts +2 -0
- package/dist/svelte/index.js +291 -180
- package/dist/vue/VoiceLiveAgentConsole.d.ts +50 -0
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.js +250 -32
- package/package.json +1 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type PropType } from "vue";
|
|
2
|
+
import { type LiveAgentConsole } from "../client/liveAgentConsole";
|
|
3
|
+
export declare const VoiceLiveAgentConsole: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
console: {
|
|
5
|
+
default: undefined;
|
|
6
|
+
type: PropType<LiveAgentConsole | undefined>;
|
|
7
|
+
};
|
|
8
|
+
sessionId: {
|
|
9
|
+
default: string;
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
};
|
|
12
|
+
takeoverButtonLabel: {
|
|
13
|
+
default: string;
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
};
|
|
16
|
+
takeoverReason: StringConstructor;
|
|
17
|
+
title: {
|
|
18
|
+
default: string;
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
};
|
|
21
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
takeover: (_reason?: string) => true;
|
|
25
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
26
|
+
console: {
|
|
27
|
+
default: undefined;
|
|
28
|
+
type: PropType<LiveAgentConsole | undefined>;
|
|
29
|
+
};
|
|
30
|
+
sessionId: {
|
|
31
|
+
default: string;
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
};
|
|
34
|
+
takeoverButtonLabel: {
|
|
35
|
+
default: string;
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
};
|
|
38
|
+
takeoverReason: StringConstructor;
|
|
39
|
+
title: {
|
|
40
|
+
default: string;
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
};
|
|
43
|
+
}>> & Readonly<{
|
|
44
|
+
onTakeover?: ((_reason?: string | undefined) => any) | undefined;
|
|
45
|
+
}>, {
|
|
46
|
+
title: string;
|
|
47
|
+
sessionId: string;
|
|
48
|
+
console: LiveAgentConsole | undefined;
|
|
49
|
+
takeoverButtonLabel: string;
|
|
50
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export { useVoiceController } from "./useVoiceController";
|
|
|
34
34
|
export { VoiceWidget } from "./VoiceWidget";
|
|
35
35
|
export { VoiceCallPlayer } from "./VoiceCallPlayer";
|
|
36
36
|
export { VoiceCostDashboard } from "./VoiceCostDashboard";
|
|
37
|
+
export { VoiceLiveAgentConsole } from "./VoiceLiveAgentConsole";
|
|
37
38
|
export { VoiceLiveCallViewer } from "./VoiceLiveCallViewer";
|
|
38
39
|
export { VoiceReplayTimeline } from "./VoiceReplayTimeline";
|
|
39
40
|
export type { VoiceWidgetLabels, VoiceWidgetTheme, } from "./VoiceWidget";
|
package/dist/vue/index.js
CHANGED
|
@@ -12604,7 +12604,7 @@ var VoiceCostDashboard = defineComponent20({
|
|
|
12604
12604
|
};
|
|
12605
12605
|
}
|
|
12606
12606
|
});
|
|
12607
|
-
// src/vue/
|
|
12607
|
+
// src/vue/VoiceLiveAgentConsole.ts
|
|
12608
12608
|
import {
|
|
12609
12609
|
defineComponent as defineComponent21,
|
|
12610
12610
|
h as h21,
|
|
@@ -12720,7 +12720,224 @@ var createLiveCallViewer = (options) => {
|
|
|
12720
12720
|
};
|
|
12721
12721
|
};
|
|
12722
12722
|
|
|
12723
|
+
// src/client/liveAgentConsole.ts
|
|
12724
|
+
var createLiveAgentConsole = (options) => {
|
|
12725
|
+
const viewer = createLiveCallViewer(options);
|
|
12726
|
+
const recentLimit = Math.max(1, options.recentLimit ?? 12);
|
|
12727
|
+
let caller;
|
|
12728
|
+
let hasTakeover = false;
|
|
12729
|
+
let takeoverAt;
|
|
12730
|
+
let takeoverReason;
|
|
12731
|
+
const subscribers = new Set;
|
|
12732
|
+
const buildState = () => {
|
|
12733
|
+
const view = viewer.getState();
|
|
12734
|
+
return {
|
|
12735
|
+
caller,
|
|
12736
|
+
hasTakeover,
|
|
12737
|
+
recentTimeline: view.events.slice(-recentLimit),
|
|
12738
|
+
takeoverAt,
|
|
12739
|
+
takeoverReason,
|
|
12740
|
+
view
|
|
12741
|
+
};
|
|
12742
|
+
};
|
|
12743
|
+
const notify = () => {
|
|
12744
|
+
for (const subscriber of subscribers)
|
|
12745
|
+
subscriber();
|
|
12746
|
+
};
|
|
12747
|
+
const unsubscribeViewer = viewer.subscribe(() => {
|
|
12748
|
+
notify();
|
|
12749
|
+
});
|
|
12750
|
+
if (options.resolveCaller) {
|
|
12751
|
+
Promise.resolve(options.resolveCaller()).then((snapshot) => {
|
|
12752
|
+
caller = snapshot;
|
|
12753
|
+
notify();
|
|
12754
|
+
});
|
|
12755
|
+
}
|
|
12756
|
+
return {
|
|
12757
|
+
getState: buildState,
|
|
12758
|
+
noteAgentAudio: (at) => viewer.noteAgentAudio(at),
|
|
12759
|
+
notePartial: (text, at) => viewer.notePartial(text, at),
|
|
12760
|
+
noteTranscript: (text, at) => viewer.noteTranscript(text, at),
|
|
12761
|
+
releaseTakeover: () => {
|
|
12762
|
+
if (!hasTakeover)
|
|
12763
|
+
return;
|
|
12764
|
+
hasTakeover = false;
|
|
12765
|
+
takeoverAt = undefined;
|
|
12766
|
+
takeoverReason = undefined;
|
|
12767
|
+
viewer.applyControl({ reason: "released", type: "takeover.release" });
|
|
12768
|
+
notify();
|
|
12769
|
+
},
|
|
12770
|
+
setCaller: (snapshot) => {
|
|
12771
|
+
caller = snapshot;
|
|
12772
|
+
notify();
|
|
12773
|
+
},
|
|
12774
|
+
subscribe: (listener) => {
|
|
12775
|
+
subscribers.add(listener);
|
|
12776
|
+
return () => {
|
|
12777
|
+
subscribers.delete(listener);
|
|
12778
|
+
if (subscribers.size === 0)
|
|
12779
|
+
unsubscribeViewer();
|
|
12780
|
+
};
|
|
12781
|
+
},
|
|
12782
|
+
takeover: (reason) => {
|
|
12783
|
+
if (hasTakeover)
|
|
12784
|
+
return;
|
|
12785
|
+
hasTakeover = true;
|
|
12786
|
+
takeoverAt = Date.now();
|
|
12787
|
+
takeoverReason = reason;
|
|
12788
|
+
viewer.applyControl({ reason, type: "takeover.engaged" });
|
|
12789
|
+
notify();
|
|
12790
|
+
},
|
|
12791
|
+
viewer
|
|
12792
|
+
};
|
|
12793
|
+
};
|
|
12794
|
+
|
|
12795
|
+
// src/vue/VoiceLiveAgentConsole.ts
|
|
12796
|
+
var VoiceLiveAgentConsole = defineComponent21({
|
|
12797
|
+
name: "VoiceLiveAgentConsole",
|
|
12798
|
+
props: {
|
|
12799
|
+
console: {
|
|
12800
|
+
default: undefined,
|
|
12801
|
+
type: Object
|
|
12802
|
+
},
|
|
12803
|
+
sessionId: { default: "live", type: String },
|
|
12804
|
+
takeoverButtonLabel: { default: "Take over", type: String },
|
|
12805
|
+
takeoverReason: String,
|
|
12806
|
+
title: { default: "Live agent console", type: String }
|
|
12807
|
+
},
|
|
12808
|
+
emits: { takeover: (_reason) => true },
|
|
12809
|
+
setup(props, { emit }) {
|
|
12810
|
+
const console = props.console ?? createLiveAgentConsole({ sessionId: props.sessionId });
|
|
12811
|
+
const state = shallowRef23(console.getState());
|
|
12812
|
+
const unsubscribe = console.subscribe(() => {
|
|
12813
|
+
state.value = console.getState();
|
|
12814
|
+
});
|
|
12815
|
+
onUnmounted24(() => {
|
|
12816
|
+
unsubscribe();
|
|
12817
|
+
});
|
|
12818
|
+
return () => {
|
|
12819
|
+
const s = state.value;
|
|
12820
|
+
return h21("section", {
|
|
12821
|
+
"aria-label": "voice-live-agent-console",
|
|
12822
|
+
class: "absolute-voice-live-agent-console",
|
|
12823
|
+
"data-takeover": s.hasTakeover ? "true" : "false",
|
|
12824
|
+
style: {
|
|
12825
|
+
background: "#0f172a",
|
|
12826
|
+
borderRadius: "16px",
|
|
12827
|
+
color: "#f8fafc",
|
|
12828
|
+
fontFamily: 'ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
12829
|
+
padding: "20px"
|
|
12830
|
+
}
|
|
12831
|
+
}, [
|
|
12832
|
+
h21("header", {
|
|
12833
|
+
style: {
|
|
12834
|
+
alignItems: "center",
|
|
12835
|
+
display: "flex",
|
|
12836
|
+
gap: "12px",
|
|
12837
|
+
marginBottom: "12px"
|
|
12838
|
+
}
|
|
12839
|
+
}, [
|
|
12840
|
+
h21("strong", { style: { fontSize: "16px" } }, props.title),
|
|
12841
|
+
h21("span", {
|
|
12842
|
+
style: {
|
|
12843
|
+
background: s.hasTakeover ? "rgba(239,68,68,0.18)" : "rgba(59,130,246,0.18)",
|
|
12844
|
+
borderRadius: "999px",
|
|
12845
|
+
fontSize: "11px",
|
|
12846
|
+
padding: "3px 10px",
|
|
12847
|
+
textTransform: "uppercase"
|
|
12848
|
+
}
|
|
12849
|
+
}, s.hasTakeover ? "Human" : "Agent"),
|
|
12850
|
+
h21("span", {
|
|
12851
|
+
style: {
|
|
12852
|
+
fontSize: "13px",
|
|
12853
|
+
marginLeft: "auto",
|
|
12854
|
+
opacity: "0.7"
|
|
12855
|
+
}
|
|
12856
|
+
}, s.view.sessionId)
|
|
12857
|
+
]),
|
|
12858
|
+
s.caller ? h21("div", {
|
|
12859
|
+
style: {
|
|
12860
|
+
background: "rgba(255,255,255,0.06)",
|
|
12861
|
+
borderRadius: "12px",
|
|
12862
|
+
fontSize: "13px",
|
|
12863
|
+
margin: "0 0 12px",
|
|
12864
|
+
padding: "12px"
|
|
12865
|
+
}
|
|
12866
|
+
}, [
|
|
12867
|
+
h21("div", {
|
|
12868
|
+
style: {
|
|
12869
|
+
fontSize: "11px",
|
|
12870
|
+
opacity: "0.7",
|
|
12871
|
+
textTransform: "uppercase"
|
|
12872
|
+
}
|
|
12873
|
+
}, "Caller"),
|
|
12874
|
+
h21("div", { style: { marginTop: "4px" } }, s.caller.summary)
|
|
12875
|
+
]) : null,
|
|
12876
|
+
h21("div", { style: { display: "flex", gap: "10px", marginBottom: "12px" } }, [
|
|
12877
|
+
s.hasTakeover ? h21("button", {
|
|
12878
|
+
onClick: () => console.releaseTakeover(),
|
|
12879
|
+
style: {
|
|
12880
|
+
background: "rgba(255,255,255,0.08)",
|
|
12881
|
+
border: "1px solid rgba(255,255,255,0.18)",
|
|
12882
|
+
borderRadius: "12px",
|
|
12883
|
+
color: "#f8fafc",
|
|
12884
|
+
cursor: "pointer",
|
|
12885
|
+
fontSize: "13px",
|
|
12886
|
+
padding: "8px 14px"
|
|
12887
|
+
},
|
|
12888
|
+
type: "button"
|
|
12889
|
+
}, "Release back to agent") : h21("button", {
|
|
12890
|
+
onClick: () => {
|
|
12891
|
+
console.takeover(props.takeoverReason);
|
|
12892
|
+
emit("takeover", props.takeoverReason);
|
|
12893
|
+
},
|
|
12894
|
+
style: {
|
|
12895
|
+
background: "#ef4444",
|
|
12896
|
+
border: "none",
|
|
12897
|
+
borderRadius: "12px",
|
|
12898
|
+
color: "#f8fafc",
|
|
12899
|
+
cursor: "pointer",
|
|
12900
|
+
fontSize: "13px",
|
|
12901
|
+
padding: "8px 14px"
|
|
12902
|
+
},
|
|
12903
|
+
type: "button"
|
|
12904
|
+
}, props.takeoverButtonLabel)
|
|
12905
|
+
]),
|
|
12906
|
+
h21("ol", {
|
|
12907
|
+
style: {
|
|
12908
|
+
display: "flex",
|
|
12909
|
+
flexDirection: "column",
|
|
12910
|
+
gap: "6px",
|
|
12911
|
+
listStyle: "none",
|
|
12912
|
+
margin: "0",
|
|
12913
|
+
maxHeight: "260px",
|
|
12914
|
+
overflowY: "auto",
|
|
12915
|
+
padding: "0"
|
|
12916
|
+
}
|
|
12917
|
+
}, s.recentTimeline.map((event, index) => h21("li", {
|
|
12918
|
+
key: `${event.at}-${index}`,
|
|
12919
|
+
style: {
|
|
12920
|
+
alignItems: "center",
|
|
12921
|
+
display: "flex",
|
|
12922
|
+
fontSize: "13px",
|
|
12923
|
+
gap: "12px",
|
|
12924
|
+
paddingLeft: "8px"
|
|
12925
|
+
}
|
|
12926
|
+
}, [
|
|
12927
|
+
h21("strong", event.title),
|
|
12928
|
+
event.detail ? h21("span", { style: { opacity: "0.85" } }, event.detail) : null
|
|
12929
|
+
])))
|
|
12930
|
+
]);
|
|
12931
|
+
};
|
|
12932
|
+
}
|
|
12933
|
+
});
|
|
12723
12934
|
// src/vue/VoiceLiveCallViewer.ts
|
|
12935
|
+
import {
|
|
12936
|
+
defineComponent as defineComponent22,
|
|
12937
|
+
h as h22,
|
|
12938
|
+
onUnmounted as onUnmounted25,
|
|
12939
|
+
shallowRef as shallowRef24
|
|
12940
|
+
} from "vue";
|
|
12724
12941
|
var CATEGORY_COLOR = {
|
|
12725
12942
|
agent_audio: "#3b82f6",
|
|
12726
12943
|
agent_text: "#3b82f6",
|
|
@@ -12734,7 +12951,7 @@ var formatRelative = (ms) => {
|
|
|
12734
12951
|
const remaining = seconds % 60;
|
|
12735
12952
|
return `${String(minutes).padStart(2, "0")}:${String(remaining).padStart(2, "0")}`;
|
|
12736
12953
|
};
|
|
12737
|
-
var VoiceLiveCallViewer =
|
|
12954
|
+
var VoiceLiveCallViewer = defineComponent22({
|
|
12738
12955
|
name: "VoiceLiveCallViewer",
|
|
12739
12956
|
props: {
|
|
12740
12957
|
sessionId: { default: "live", type: String },
|
|
@@ -12747,17 +12964,17 @@ var VoiceLiveCallViewer = defineComponent21({
|
|
|
12747
12964
|
setup(props) {
|
|
12748
12965
|
const owned = !props.viewer;
|
|
12749
12966
|
const viewer = props.viewer ?? createLiveCallViewer({ sessionId: props.sessionId });
|
|
12750
|
-
const state =
|
|
12967
|
+
const state = shallowRef24(viewer.getState());
|
|
12751
12968
|
const unsubscribe = viewer.subscribe(() => {
|
|
12752
12969
|
state.value = viewer.getState();
|
|
12753
12970
|
});
|
|
12754
|
-
|
|
12971
|
+
onUnmounted25(() => {
|
|
12755
12972
|
unsubscribe();
|
|
12756
12973
|
});
|
|
12757
12974
|
return () => {
|
|
12758
12975
|
const s = state.value;
|
|
12759
12976
|
const firstAt = s.events[0]?.at ?? Date.now();
|
|
12760
|
-
return
|
|
12977
|
+
return h22("section", {
|
|
12761
12978
|
"aria-label": "voice-live-call-viewer",
|
|
12762
12979
|
class: "absolute-voice-live-call-viewer",
|
|
12763
12980
|
"data-agent-state": s.agentState,
|
|
@@ -12769,7 +12986,7 @@ var VoiceLiveCallViewer = defineComponent21({
|
|
|
12769
12986
|
padding: "20px"
|
|
12770
12987
|
}
|
|
12771
12988
|
}, [
|
|
12772
|
-
|
|
12989
|
+
h22("header", {
|
|
12773
12990
|
style: {
|
|
12774
12991
|
alignItems: "center",
|
|
12775
12992
|
display: "flex",
|
|
@@ -12777,8 +12994,8 @@ var VoiceLiveCallViewer = defineComponent21({
|
|
|
12777
12994
|
marginBottom: "12px"
|
|
12778
12995
|
}
|
|
12779
12996
|
}, [
|
|
12780
|
-
|
|
12781
|
-
|
|
12997
|
+
h22("strong", { style: { fontSize: "16px" } }, props.title),
|
|
12998
|
+
h22("span", {
|
|
12782
12999
|
style: {
|
|
12783
13000
|
background: "rgba(59,130,246,0.18)",
|
|
12784
13001
|
borderRadius: "999px",
|
|
@@ -12787,7 +13004,7 @@ var VoiceLiveCallViewer = defineComponent21({
|
|
|
12787
13004
|
textTransform: "uppercase"
|
|
12788
13005
|
}
|
|
12789
13006
|
}, s.agentState),
|
|
12790
|
-
|
|
13007
|
+
h22("span", {
|
|
12791
13008
|
style: {
|
|
12792
13009
|
fontSize: "13px",
|
|
12793
13010
|
marginLeft: "auto",
|
|
@@ -12795,7 +13012,7 @@ var VoiceLiveCallViewer = defineComponent21({
|
|
|
12795
13012
|
}
|
|
12796
13013
|
}, `${s.sessionId} \xB7 ${formatRelative(s.callDurationMs)}`)
|
|
12797
13014
|
]),
|
|
12798
|
-
s.partialTranscript ?
|
|
13015
|
+
s.partialTranscript ? h22("p", {
|
|
12799
13016
|
style: {
|
|
12800
13017
|
background: "rgba(16,185,129,0.12)",
|
|
12801
13018
|
borderRadius: "12px",
|
|
@@ -12805,7 +13022,7 @@ var VoiceLiveCallViewer = defineComponent21({
|
|
|
12805
13022
|
padding: "10px 12px"
|
|
12806
13023
|
}
|
|
12807
13024
|
}, `\u201C${s.partialTranscript}\u201D`) : null,
|
|
12808
|
-
|
|
13025
|
+
h22("ol", {
|
|
12809
13026
|
style: {
|
|
12810
13027
|
display: "flex",
|
|
12811
13028
|
flexDirection: "column",
|
|
@@ -12816,7 +13033,7 @@ var VoiceLiveCallViewer = defineComponent21({
|
|
|
12816
13033
|
overflowY: "auto",
|
|
12817
13034
|
padding: "0"
|
|
12818
13035
|
}
|
|
12819
|
-
}, s.events.map((event, index) =>
|
|
13036
|
+
}, s.events.map((event, index) => h22("li", {
|
|
12820
13037
|
key: `${event.at}-${index}`,
|
|
12821
13038
|
style: {
|
|
12822
13039
|
alignItems: "center",
|
|
@@ -12827,7 +13044,7 @@ var VoiceLiveCallViewer = defineComponent21({
|
|
|
12827
13044
|
paddingLeft: "12px"
|
|
12828
13045
|
}
|
|
12829
13046
|
}, [
|
|
12830
|
-
|
|
13047
|
+
h22("span", {
|
|
12831
13048
|
style: {
|
|
12832
13049
|
color: "#cbd5e1",
|
|
12833
13050
|
fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
@@ -12835,15 +13052,15 @@ var VoiceLiveCallViewer = defineComponent21({
|
|
|
12835
13052
|
width: "60px"
|
|
12836
13053
|
}
|
|
12837
13054
|
}, formatRelative(event.at - firstAt)),
|
|
12838
|
-
|
|
12839
|
-
event.detail ?
|
|
13055
|
+
h22("strong", { style: { fontSize: "13px" } }, event.title),
|
|
13056
|
+
event.detail ? h22("span", { style: { opacity: "0.85" } }, event.detail) : null
|
|
12840
13057
|
])))
|
|
12841
13058
|
]);
|
|
12842
13059
|
};
|
|
12843
13060
|
}
|
|
12844
13061
|
});
|
|
12845
13062
|
// src/vue/VoiceReplayTimeline.ts
|
|
12846
|
-
import { computed as computed12, defineComponent as
|
|
13063
|
+
import { computed as computed12, defineComponent as defineComponent23, h as h23 } from "vue";
|
|
12847
13064
|
|
|
12848
13065
|
// src/client/replayTimeline.ts
|
|
12849
13066
|
var categorize = (entry) => {
|
|
@@ -12909,7 +13126,7 @@ var formatRelative2 = (ms) => {
|
|
|
12909
13126
|
const remaining = seconds % 60;
|
|
12910
13127
|
return `${String(minutes).padStart(2, "0")}:${String(remaining).padStart(2, "0")}`;
|
|
12911
13128
|
};
|
|
12912
|
-
var VoiceReplayTimeline =
|
|
13129
|
+
var VoiceReplayTimeline = defineComponent23({
|
|
12913
13130
|
name: "VoiceReplayTimeline",
|
|
12914
13131
|
props: {
|
|
12915
13132
|
artifact: {
|
|
@@ -12922,7 +13139,7 @@ var VoiceReplayTimeline = defineComponent22({
|
|
|
12922
13139
|
const report = computed12(() => buildReplayTimelineReport({ artifact: props.artifact }));
|
|
12923
13140
|
return () => {
|
|
12924
13141
|
const r = report.value;
|
|
12925
|
-
return
|
|
13142
|
+
return h23("section", {
|
|
12926
13143
|
"aria-label": "voice-replay-timeline",
|
|
12927
13144
|
class: "absolute-voice-replay-timeline",
|
|
12928
13145
|
style: {
|
|
@@ -12933,7 +13150,7 @@ var VoiceReplayTimeline = defineComponent22({
|
|
|
12933
13150
|
padding: "20px"
|
|
12934
13151
|
}
|
|
12935
13152
|
}, [
|
|
12936
|
-
|
|
13153
|
+
h23("header", {
|
|
12937
13154
|
style: {
|
|
12938
13155
|
alignItems: "baseline",
|
|
12939
13156
|
display: "flex",
|
|
@@ -12941,10 +13158,10 @@ var VoiceReplayTimeline = defineComponent22({
|
|
|
12941
13158
|
marginBottom: "12px"
|
|
12942
13159
|
}
|
|
12943
13160
|
}, [
|
|
12944
|
-
|
|
12945
|
-
|
|
13161
|
+
h23("strong", { style: { fontSize: "16px" } }, props.title ?? r.metadata.title ?? "Replay"),
|
|
13162
|
+
h23("span", { style: { fontSize: "13px", opacity: "0.7" } }, `${r.events.length} events \xB7 ${r.summary.userTurns} user \xB7 ${r.summary.agentTurns} agent \xB7 ${r.summary.toolCalls} tool`)
|
|
12946
13163
|
]),
|
|
12947
|
-
r.events.length === 0 ?
|
|
13164
|
+
r.events.length === 0 ? h23("p", { style: { fontSize: "13px", opacity: "0.7" } }, "No timeline events.") : h23("ol", {
|
|
12948
13165
|
style: {
|
|
12949
13166
|
display: "flex",
|
|
12950
13167
|
flexDirection: "column",
|
|
@@ -12953,7 +13170,7 @@ var VoiceReplayTimeline = defineComponent22({
|
|
|
12953
13170
|
margin: "0",
|
|
12954
13171
|
padding: "0"
|
|
12955
13172
|
}
|
|
12956
|
-
}, r.events.map((event, index) =>
|
|
13173
|
+
}, r.events.map((event, index) => h23("li", {
|
|
12957
13174
|
key: `${event.at}-${index}`,
|
|
12958
13175
|
style: {
|
|
12959
13176
|
alignItems: "center",
|
|
@@ -12964,7 +13181,7 @@ var VoiceReplayTimeline = defineComponent22({
|
|
|
12964
13181
|
paddingLeft: "12px"
|
|
12965
13182
|
}
|
|
12966
13183
|
}, [
|
|
12967
|
-
|
|
13184
|
+
h23("span", {
|
|
12968
13185
|
style: {
|
|
12969
13186
|
color: "#cbd5e1",
|
|
12970
13187
|
fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
@@ -12972,20 +13189,20 @@ var VoiceReplayTimeline = defineComponent22({
|
|
|
12972
13189
|
width: "60px"
|
|
12973
13190
|
}
|
|
12974
13191
|
}, formatRelative2(event.at - r.startedAt)),
|
|
12975
|
-
|
|
12976
|
-
event.detail ?
|
|
13192
|
+
h23("strong", { style: { fontSize: "13px" } }, event.label),
|
|
13193
|
+
event.detail ? h23("span", { style: { opacity: "0.85" } }, event.detail) : null
|
|
12977
13194
|
])))
|
|
12978
13195
|
]);
|
|
12979
13196
|
};
|
|
12980
13197
|
}
|
|
12981
13198
|
});
|
|
12982
13199
|
// src/vue/useVoiceTraceTimeline.ts
|
|
12983
|
-
import { onUnmounted as
|
|
13200
|
+
import { onUnmounted as onUnmounted26, ref as ref20, shallowRef as shallowRef25 } from "vue";
|
|
12984
13201
|
function useVoiceTraceTimeline(path = "/api/voice-traces", options = {}) {
|
|
12985
13202
|
const store = createVoiceTraceTimelineStore(path, options);
|
|
12986
13203
|
const error = ref20(null);
|
|
12987
13204
|
const isLoading = ref20(false);
|
|
12988
|
-
const report =
|
|
13205
|
+
const report = shallowRef25(null);
|
|
12989
13206
|
const updatedAt = ref20(undefined);
|
|
12990
13207
|
const sync = () => {
|
|
12991
13208
|
const snapshot = store.getSnapshot();
|
|
@@ -12997,7 +13214,7 @@ function useVoiceTraceTimeline(path = "/api/voice-traces", options = {}) {
|
|
|
12997
13214
|
const unsubscribe = store.subscribe(sync);
|
|
12998
13215
|
sync();
|
|
12999
13216
|
store.refresh().catch(() => {});
|
|
13000
|
-
|
|
13217
|
+
onUnmounted26(() => {
|
|
13001
13218
|
unsubscribe();
|
|
13002
13219
|
store.close();
|
|
13003
13220
|
});
|
|
@@ -13010,7 +13227,7 @@ function useVoiceTraceTimeline(path = "/api/voice-traces", options = {}) {
|
|
|
13010
13227
|
};
|
|
13011
13228
|
}
|
|
13012
13229
|
// src/vue/useVoiceWorkflowStatus.ts
|
|
13013
|
-
import { onMounted as onMounted11, onUnmounted as
|
|
13230
|
+
import { onMounted as onMounted11, onUnmounted as onUnmounted27, ref as ref21, shallowRef as shallowRef26 } from "vue";
|
|
13014
13231
|
|
|
13015
13232
|
// src/client/workflowStatus.ts
|
|
13016
13233
|
var fetchVoiceWorkflowStatus = async (path = "/evals/scenarios/json", options = {}) => {
|
|
@@ -13096,7 +13313,7 @@ function useVoiceWorkflowStatus(path = "/evals/scenarios/json", options = {}) {
|
|
|
13096
13313
|
const store = createVoiceWorkflowStatusStore(path, options);
|
|
13097
13314
|
const error = ref21(null);
|
|
13098
13315
|
const isLoading = ref21(false);
|
|
13099
|
-
const report =
|
|
13316
|
+
const report = shallowRef26(undefined);
|
|
13100
13317
|
const updatedAt = ref21(undefined);
|
|
13101
13318
|
const sync = () => {
|
|
13102
13319
|
const snapshot = store.getSnapshot();
|
|
@@ -13110,7 +13327,7 @@ function useVoiceWorkflowStatus(path = "/evals/scenarios/json", options = {}) {
|
|
|
13110
13327
|
onMounted11(() => {
|
|
13111
13328
|
store.refresh().catch(() => {});
|
|
13112
13329
|
});
|
|
13113
|
-
|
|
13330
|
+
onUnmounted27(() => {
|
|
13114
13331
|
unsubscribe();
|
|
13115
13332
|
store.close();
|
|
13116
13333
|
});
|
|
@@ -13166,6 +13383,7 @@ export {
|
|
|
13166
13383
|
VoiceOpsStatus,
|
|
13167
13384
|
VoiceOpsActionCenter,
|
|
13168
13385
|
VoiceLiveCallViewer,
|
|
13386
|
+
VoiceLiveAgentConsole,
|
|
13169
13387
|
VoiceDeliveryRuntime,
|
|
13170
13388
|
VoiceCostDashboard,
|
|
13171
13389
|
VoiceCallPlayer,
|