@siact/sime-x-vue 0.0.13 → 0.0.14

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.
@@ -779,6 +779,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
779
779
  setup(__props) {
780
780
  const props = __props;
781
781
  const commandManager = shallowRef(new CommandManager({ debug: props.debug ?? false }));
782
+ const startListeningRef = shallowRef(async () => {
783
+ });
784
+ const stopListeningRef = shallowRef(async () => {
785
+ });
782
786
  const stopBroadcastRef = shallowRef(async () => {
783
787
  });
784
788
  provide(AiChatbotXKey, {
@@ -786,9 +790,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
786
790
  appId: () => props.appId,
787
791
  appToken: () => props.appToken,
788
792
  agentId: () => props.agentId,
793
+ startListening: () => startListeningRef.value(),
794
+ stopListening: () => stopListeningRef.value(),
789
795
  stopBroadcast: () => stopBroadcastRef.value(),
790
796
  registerVoiceMethods: (methods) => {
791
797
  if (methods.stopBroadcast) stopBroadcastRef.value = methods.stopBroadcast;
798
+ if (methods.start) startListeningRef.value = methods.start;
799
+ if (methods.stop) stopListeningRef.value = methods.stop;
792
800
  },
793
801
  getCommads: async () => commandManager.value.getCommands(),
794
802
  registerCommand: (cmd) => {
@@ -2030,7 +2038,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2030
2038
  const { voiceStatus, transcriptionText, wakeAnimating, isTranscribing } = voice;
2031
2039
  const { isInvoking, currentTextContent, currentToolParts, executingTools, hasAnyContent, toolDisplayName } = agent;
2032
2040
  aiChatbotX?.registerVoiceMethods({
2033
- stopBroadcast: async () => interruptCurrentResponse()
2041
+ stopBroadcast: async () => interruptCurrentResponse(),
2042
+ start: () => toggleVoiceMode(true),
2043
+ stop: () => toggleVoiceMode(false)
2034
2044
  });
2035
2045
  onBeforeUnmount(async () => {
2036
2046
  bubble.destroy();
@@ -2169,7 +2179,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2169
2179
  }
2170
2180
  });
2171
2181
 
2172
- const voiceAssistant = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a88f03ab"]]);
2182
+ const voiceAssistant = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-76f6b7ef"]]);
2173
2183
 
2174
2184
  var clientCommandKey = /* @__PURE__ */ ((clientCommandKey2) => {
2175
2185
  clientCommandKey2["SET_THEME"] = "SiMeAgent_setTheme";