@acorex-platform/extension-ai-voice-shell-client 0.0.30 → 0.0.32

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.
@@ -6,7 +6,8 @@ import { AXPKeyboardShortcutRegistry, AXPComponentSlotModule } from '@acorex-pla
6
6
  import { AXPCommandExecutor, provideCommandSetups, AXPCommandService } from '@acorex-platform/framework-client/runtime';
7
7
  import { AXMAiManagementModule, AXPAiChatToolRunContextService, AXPAiPlatformRuntimeContextBuilder, AXPAiManagerService, persistAiChatAttachmentImage, AIMANAGEMENT_CHAT_TRANSCRIBE_SPEECH_COMMAND_KEY, AIMANAGEMENT_CHAT_SYNTHESIZE_SPEECH_COMMAND_KEY, createBrowserPlayableTtsBlobUrl } from '@acorex-platform/module-ai-management-client';
8
8
  import { AXE_AI_VOICE_SHELL_OPEN_COMMAND, AXE_ASSESSMENT_QUESTIONNAIRE_VOICE_CAPABILITY_ID } from '@acorex-platform/extension-ai-voice-shell-client/contracts';
9
- import { AXPKeyboardShortcutPriority, runtimeCommandPayloadData } from '@acorex-platform/framework-shared/core';
9
+ import { AXPKeyboardShortcutPriority, createRandomUuid, runtimeCommandPayloadData } from '@acorex-platform/framework-shared/core';
10
+ import { AXPLayoutThemeService } from '@acorex-platform/framework-client/themes/shared';
10
11
  import * as i1 from '@acorex/components/button';
11
12
  import { AXButtonModule } from '@acorex/components/button';
12
13
  import * as i2 from '@acorex/components/decorators';
@@ -39,6 +40,7 @@ class AXEAiVoiceShellHeaderSlotComponent {
39
40
  this.commandExecutor = inject(AXPCommandExecutor);
40
41
  this.shortcutRegistry = inject(AXPKeyboardShortcutRegistry);
41
42
  this.destroyRef = inject(DestroyRef);
43
+ this.themeStore = inject(AXPLayoutThemeService);
42
44
  //#endregion
43
45
  //#region ----- Computed Properties -----
44
46
  this.shortcutDisplay = this.shortcutRegistry.formatDisplayKeys([AXE_AI_VOICE_SHELL_SHORTCUT]);
@@ -65,11 +67,11 @@ class AXEAiVoiceShellHeaderSlotComponent {
65
67
  await this.commandExecutor.execute(AXE_AI_VOICE_SHELL_OPEN_COMMAND, {});
66
68
  }
67
69
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEAiVoiceShellHeaderSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
68
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: AXEAiVoiceShellHeaderSlotComponent, isStandalone: true, selector: "axe-ai-voice-shell-header-slot", ngImport: i0, template: "<ax-button\n [iconOnly]=\"true\"\n class=\"relative\"\n color=\"primary\"\n [title]=\"\n ('@extensions-ai-voice-shell:header.open-title' | translate: { params: { shortcut: shortcutDisplay } } | async) ??\n ''\n \"\n [attr.aria-label]=\"\n ('@extensions-ai-voice-shell:header.open-title' | translate: { params: { shortcut: shortcutDisplay } } | async) ??\n ''\n \"\n (onClick)=\"openVoiceCommand()\"\n>\n <ax-icon>\n <i class=\"fa-regular fa-microphone\"></i>\n </ax-icon>\n</ax-button>\n", styles: ["axe-ai-voice-shell-header-slot{position:relative}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
70
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: AXEAiVoiceShellHeaderSlotComponent, isStandalone: true, selector: "axe-ai-voice-shell-header-slot", ngImport: i0, template: "<ax-button\n [iconOnly]=\"true\"\n class=\"relative\"\n [color]=\"themeStore.headerButtonColor()\"\n [look]=\"themeStore.headerButtonLook()\"\n [title]=\"\n ('@extensions-ai-voice-shell:header.open-title' | translate: { params: { shortcut: shortcutDisplay } } | async) ??\n ''\n \"\n [attr.aria-label]=\"\n ('@extensions-ai-voice-shell:header.open-title' | translate: { params: { shortcut: shortcutDisplay } } | async) ??\n ''\n \"\n (onClick)=\"openVoiceCommand()\"\n>\n <ax-icon>\n <i class=\"fa-regular fa-microphone\"></i>\n </ax-icon>\n</ax-button>\n", styles: ["axe-ai-voice-shell-header-slot{position:relative}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
69
71
  }
70
72
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEAiVoiceShellHeaderSlotComponent, decorators: [{
71
73
  type: Component,
72
- args: [{ selector: 'axe-ai-voice-shell-header-slot', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXButtonModule, AXDecoratorModule, AXTranslationModule, AsyncPipe], template: "<ax-button\n [iconOnly]=\"true\"\n class=\"relative\"\n color=\"primary\"\n [title]=\"\n ('@extensions-ai-voice-shell:header.open-title' | translate: { params: { shortcut: shortcutDisplay } } | async) ??\n ''\n \"\n [attr.aria-label]=\"\n ('@extensions-ai-voice-shell:header.open-title' | translate: { params: { shortcut: shortcutDisplay } } | async) ??\n ''\n \"\n (onClick)=\"openVoiceCommand()\"\n>\n <ax-icon>\n <i class=\"fa-regular fa-microphone\"></i>\n </ax-icon>\n</ax-button>\n", styles: ["axe-ai-voice-shell-header-slot{position:relative}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
74
+ args: [{ selector: 'axe-ai-voice-shell-header-slot', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXButtonModule, AXDecoratorModule, AXTranslationModule, AsyncPipe], template: "<ax-button\n [iconOnly]=\"true\"\n class=\"relative\"\n [color]=\"themeStore.headerButtonColor()\"\n [look]=\"themeStore.headerButtonLook()\"\n [title]=\"\n ('@extensions-ai-voice-shell:header.open-title' | translate: { params: { shortcut: shortcutDisplay } } | async) ??\n ''\n \"\n [attr.aria-label]=\"\n ('@extensions-ai-voice-shell:header.open-title' | translate: { params: { shortcut: shortcutDisplay } } | async) ??\n ''\n \"\n (onClick)=\"openVoiceCommand()\"\n>\n <ax-icon>\n <i class=\"fa-regular fa-microphone\"></i>\n </ax-icon>\n</ax-button>\n", styles: ["axe-ai-voice-shell-header-slot{position:relative}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
73
75
  }], ctorParameters: () => [] });
74
76
 
75
77
  //#region ----- Imports -----
@@ -246,7 +248,7 @@ class AXPHttpSseVoiceTransport {
246
248
  const agentId = await this.findAgentIdByName(SPEECH_TO_TEXT_AGENT_NAME);
247
249
  const mimeType = audio.type?.trim() || 'audio/webm';
248
250
  const file = new File([audio], `voice-${Date.now()}.webm`, { type: mimeType });
249
- const { fileId } = await persistAiChatAttachmentImage(this.fileStorage, file, globalThis.crypto.randomUUID());
251
+ const { fileId } = await persistAiChatAttachmentImage(this.fileStorage, file, createRandomUuid());
250
252
  const language = options?.language?.trim() ||
251
253
  this.localeToTranscriptionLanguage(await this.resolveUiLocale());
252
254
  this.chatToolRunContext.setContext({
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-extension-ai-voice-shell-client.mjs","sources":["../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-shell-header-slot.component.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-shell-header-slot.component.html","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-shell-search.provider.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/ai-voice-shell-extension.module.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-capability.tokens.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-capability-registry.service.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/transport/http-sse-voice-transport.service.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/browser-speech-synthesis.util.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-command-shell.service.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/commands/open-voice-command-shell.command.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-void-dialog/voice-void-dialog.component.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-void-dialog/voice-void-dialog.component.html","../../../../libs/extensions/ai/voice-shell/client/src/acorex-platform-extension-ai-voice-shell-client.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPKeyboardShortcutPriority } from '@acorex-platform/framework-shared/core';\nimport { AXE_AI_VOICE_SHELL_OPEN_COMMAND } from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { AXPKeyboardShortcutRegistry } from '@acorex-platform/framework-client/core';\nimport { AXPCommandExecutor } from '@acorex-platform/framework-client/runtime';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, DestroyRef, ViewEncapsulation, inject } from '@angular/core';\n\n//#endregion\n\n//#region ----- Constants -----\n\n/** Dedicated chord — Ctrl+K remains global search. */\nexport const AXE_AI_VOICE_SHELL_SHORTCUT = 'ctrl+shift+space';\n\n//#endregion\n\n//#region ----- Component -----\n\n/**\n * Header mic next to the conversation AI robot. Opens the voice command shell.\n */\n@Component({\n selector: 'axe-ai-voice-shell-header-slot',\n templateUrl: './voice-shell-header-slot.component.html',\n styleUrls: ['./voice-shell-header-slot.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AXButtonModule, AXDecoratorModule, AXTranslationModule, AsyncPipe],\n})\nexport class AXEAiVoiceShellHeaderSlotComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly commandExecutor = inject(AXPCommandExecutor);\n private readonly shortcutRegistry = inject(AXPKeyboardShortcutRegistry);\n private readonly destroyRef = inject(DestroyRef);\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly shortcutDisplay = this.shortcutRegistry.formatDisplayKeys([AXE_AI_VOICE_SHELL_SHORTCUT]);\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n this.shortcutRegistry.register({\n owner: this.destroyRef,\n id: 'ai-voice-shell',\n priority: AXPKeyboardShortcutPriority.Global,\n group: '@general:keyboard-shortcuts.groups.global',\n shortcuts: [\n {\n keys: [AXE_AI_VOICE_SHELL_SHORTCUT],\n title: '@general:keyboard-shortcuts.actions.open-voice-command',\n allowInEditableFields: true,\n handler: () => {\n void this.openVoiceCommand();\n },\n },\n ],\n });\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected async openVoiceCommand(): Promise<void> {\n await this.commandExecutor.execute(AXE_AI_VOICE_SHELL_OPEN_COMMAND, {});\n }\n\n //#endregion\n}\n\n//#endregion\n","<ax-button\n [iconOnly]=\"true\"\n class=\"relative\"\n color=\"primary\"\n [title]=\"\n ('@extensions-ai-voice-shell:header.open-title' | translate: { params: { shortcut: shortcutDisplay } } | async) ??\n ''\n \"\n [attr.aria-label]=\"\n ('@extensions-ai-voice-shell:header.open-title' | translate: { params: { shortcut: shortcutDisplay } } | async) ??\n ''\n \"\n (onClick)=\"openVoiceCommand()\"\n>\n <ax-icon>\n <i class=\"fa-regular fa-microphone\"></i>\n </ax-icon>\n</ax-button>\n","//#region ----- Imports -----\n\nimport { Injectable } from '@angular/core';\nimport { AXPSearchCommandProvider, AXPSearchResult } from '@acorex-platform/framework-client/common';\nimport { AXE_AI_VOICE_SHELL_OPEN_COMMAND } from '@acorex-platform/extension-ai-voice-shell-client/contracts';\n\n//#endregion\n\n//#region ----- Search -----\n\n@Injectable()\nexport class AXEAiVoiceShellSearchCommandProvider extends AXPSearchCommandProvider {\n commands: AXPSearchResult[] = [\n {\n id: 'open-voice-command-shell',\n group: 'command',\n title: '@extensions-ai-voice-shell:search.open.title',\n icon: 'fa-light fa-microphone',\n description: '@extensions-ai-voice-shell:search.open.description',\n command: {\n name: AXE_AI_VOICE_SHELL_OPEN_COMMAND,\n },\n },\n ];\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { NgModule } from '@angular/core';\nimport { AXP_SEARCH_PROVIDER } from '@acorex-platform/framework-client/common';\nimport { AXPComponentSlotModule } from '@acorex-platform/framework-client/core';\nimport { provideCommandSetups } from '@acorex-platform/framework-client/runtime';\nimport { AXMAiManagementModule } from '@acorex-platform/module-ai-management-client';\nimport { AXE_AI_VOICE_SHELL_OPEN_COMMAND } from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { AXEAiVoiceShellHeaderSlotComponent } from './voice-shell-header-slot.component';\nimport { AXEAiVoiceShellSearchCommandProvider } from './voice-shell-search.provider';\n\n//#endregion\n\n//#region ----- Module -----\n\n/**\n * Central voice AI command shell (void dialog + capability registry + HTTP/SSE transport).\n * Register next to {@link AXMAiManagementModule}. Domain modules register {@link AXP_VOICE_CAPABILITY_PROVIDER}.\n */\n@NgModule({\n imports: [\n AXMAiManagementModule,\n AXPComponentSlotModule.forChild({\n 'root-header-end': [\n {\n // Immediately after conversation mini-chat (55) so mic + robot sit as one AI cluster.\n priority: 56,\n name: 'ai-voice-shell',\n component: AXEAiVoiceShellHeaderSlotComponent,\n },\n ],\n }),\n ],\n providers: [\n {\n provide: AXP_SEARCH_PROVIDER,\n useClass: AXEAiVoiceShellSearchCommandProvider,\n multi: true,\n },\n provideCommandSetups([\n {\n key: AXE_AI_VOICE_SHELL_OPEN_COMMAND,\n command: () =>\n import('./commands/open-voice-command-shell.command').then((c) => c.AXEAiVoiceShellOpenCommand),\n },\n ]),\n ],\n})\nexport class AXEAiVoiceShellExtensionModule {}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { InjectionToken } from '@angular/core';\nimport type { AXPVoiceCapabilityProvider } from '@acorex-platform/extension-ai-voice-shell-client/contracts';\n\n//#endregion\n\n//#region ----- Tokens -----\n\n/** Multi-provider token for domain voice capabilities (assessment, later others). */\nexport const AXP_VOICE_CAPABILITY_PROVIDER = new InjectionToken<AXPVoiceCapabilityProvider>(\n 'AXP_VOICE_CAPABILITY_PROVIDER',\n);\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { Injectable, inject } from '@angular/core';\nimport type {\n AXPVoiceCapabilityIntent,\n AXPVoiceCapabilityProvider,\n} from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { AXP_VOICE_CAPABILITY_PROVIDER } from './voice-capability.tokens';\n\n//#endregion\n\n//#region ----- Registry -----\n\n/**\n * Discovers module-owned {@link AXPVoiceCapabilityProvider} implementations.\n * The shell never imports domain internals.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXPVoiceCapabilityRegistry {\n //#region ----- Services & Dependencies -----\n\n private readonly providers = inject(AXP_VOICE_CAPABILITY_PROVIDER, { optional: true }) ?? [];\n\n //#endregion\n\n //#region ----- Public API -----\n\n list(): AXPVoiceCapabilityProvider[] {\n const raw = this.providers;\n return Array.isArray(raw) ? raw : raw ? [raw] : [];\n }\n\n getById(id: string): AXPVoiceCapabilityProvider | undefined {\n const trimmed = id.trim();\n if (!trimmed) {\n return undefined;\n }\n return this.list().find((provider) => provider.id === trimmed);\n }\n\n async findForIntent(intent: AXPVoiceCapabilityIntent): Promise<AXPVoiceCapabilityProvider | undefined> {\n for (const provider of this.list()) {\n if (await provider.canHandle(intent)) {\n return provider;\n }\n }\n return undefined;\n }\n\n //#endregion\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { Injectable, inject } from '@angular/core';\nimport {\n AIMANAGEMENT_CHAT_SYNTHESIZE_SPEECH_COMMAND_KEY,\n AIMANAGEMENT_CHAT_TRANSCRIBE_SPEECH_COMMAND_KEY,\n AXPAiChatToolRunContextService,\n AXPAiManagerService,\n AXPAiPlatformRuntimeContextBuilder,\n createBrowserPlayableTtsBlobUrl,\n persistAiChatAttachmentImage,\n} from '@acorex-platform/module-ai-management-client';\nimport { RootConfig } from '@acorex-platform/module-ai-management-client/contracts';\nimport type {\n AXPVoiceInteractionTransport,\n AXPVoiceSttResult,\n AXPVoiceTtsResult,\n} from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport { AXPFileStorageService } from '@acorex-platform/framework-client/common';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { runtimeCommandPayloadData } from '@acorex-platform/framework-shared/core';\nimport { first } from 'lodash';\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst SPEECH_TO_TEXT_AGENT_NAME = 'speech-to-text';\nconst TEXT_TO_SPEECH_AGENT_NAME = 'text-to-speech';\n\n//#endregion\n\n//#region ----- Transport -----\n\n/**\n * v1 interaction transport: existing AI HTTP commands + assist `run` (SSE under the hood).\n */\n@Injectable({ providedIn: 'root' })\nexport class AXPHttpSseVoiceTransport implements AXPVoiceInteractionTransport {\n //#region ----- Services & Dependencies -----\n\n readonly id = 'http-sse';\n\n private readonly commandService = inject(AXPCommandService);\n private readonly fileStorage = inject(AXPFileStorageService);\n private readonly entityService = inject(AXPEntityService);\n private readonly chatToolRunContext = inject(AXPAiChatToolRunContextService);\n private readonly runtimeContextBuilder = inject(AXPAiPlatformRuntimeContextBuilder);\n private readonly aiManager = inject(AXPAiManagerService, { optional: true });\n\n //#endregion\n\n //#region ----- Public API -----\n\n async transcribe(audio: Blob, options?: { language?: string }): Promise<AXPVoiceSttResult> {\n const aiManager = this.requireAiManager();\n const assist = await aiManager.getAssistForChat();\n const assistId = assist.id?.trim();\n if (!assistId) {\n throw new Error('No AI assist is configured for speech transcription.');\n }\n const chatTransport = (await aiManager.getAssistPrimaryChatTransport(assistId)) ?? 'openai';\n const agentId = await this.findAgentIdByName(SPEECH_TO_TEXT_AGENT_NAME);\n const mimeType = audio.type?.trim() || 'audio/webm';\n const file = new File([audio], `voice-${Date.now()}.webm`, { type: mimeType });\n const { fileId } = await persistAiChatAttachmentImage(\n this.fileStorage,\n file,\n globalThis.crypto.randomUUID(),\n );\n const language =\n options?.language?.trim() ||\n this.localeToTranscriptionLanguage(await this.resolveUiLocale());\n\n this.chatToolRunContext.setContext({\n assistId,\n chatTransport,\n ...(agentId ? { agentId } : {}),\n });\n try {\n const result = await this.commandService.execute(AIMANAGEMENT_CHAT_TRANSCRIBE_SPEECH_COMMAND_KEY, {\n fileId,\n assistId,\n ...(agentId ? { agentId } : {}),\n ...(language ? { language } : {}),\n });\n const data = runtimeCommandPayloadData(result) as { text?: string } | undefined;\n const text = typeof data?.text === 'string' ? data.text.trim() : '';\n if (!result?.success || !text) {\n throw new Error(this.commandFailureI18nKey(result, '@extensions-ai-voice-shell:errors.transcribe-failed'));\n }\n return { text };\n } finally {\n this.chatToolRunContext.setContext(null);\n }\n }\n\n async synthesize(text: string): Promise<AXPVoiceTtsResult> {\n const trimmed = text.trim();\n if (!trimmed) {\n return { text: '' };\n }\n const aiManager = this.requireAiManager();\n const assist = await aiManager.getAssistForChat();\n const assistId = assist.id?.trim();\n if (!assistId) {\n throw new Error('No AI assist is configured for speech synthesis.');\n }\n const chatTransport = (await aiManager.getAssistPrimaryChatTransport(assistId)) ?? 'openai';\n const agentId = await this.findAgentIdByName(TEXT_TO_SPEECH_AGENT_NAME);\n\n this.chatToolRunContext.setContext({\n assistId,\n chatTransport,\n ...(agentId ? { agentId } : {}),\n });\n try {\n const result = await this.commandService.executeRemote(AIMANAGEMENT_CHAT_SYNTHESIZE_SPEECH_COMMAND_KEY, {\n text: trimmed,\n assistId,\n ...(agentId ? { agentId } : {}),\n });\n const data = runtimeCommandPayloadData(result) as { fileId?: string; text?: string } | undefined;\n const fileId = typeof data?.fileId === 'string' ? data.fileId.trim() : '';\n if (!result?.success || !fileId) {\n throw new Error(this.commandFailureI18nKey(result, '@extensions-ai-voice-shell:errors.assist-failed'));\n }\n const info = await this.fileStorage.getInfo(fileId);\n const binary = await this.fileStorage.download(fileId);\n const objectUrl = await createBrowserPlayableTtsBlobUrl(\n binary,\n info?.mimeType ?? binary.type,\n info?.name,\n );\n return { fileId, objectUrl, text: typeof data?.text === 'string' ? data.text : trimmed };\n } finally {\n this.chatToolRunContext.setContext(null);\n }\n }\n\n async runAssist(prompt: string, context?: Record<string, unknown>): Promise<{ text: string }> {\n const aiManager = this.requireAiManager();\n const result = await aiManager.run({\n prompt,\n context: {\n systemInstruction:\n 'You are the platform voice command assistant. Prefer AI-compatible tools. Keep spoken replies short. Confirm before destructive or submit actions.',\n structuredContext: context,\n },\n });\n return { text: result.text?.trim() ?? '' };\n }\n\n //#endregion\n\n //#region ----- Private helpers -----\n\n private requireAiManager(): AXPAiManagerService {\n if (!this.aiManager) {\n throw new Error('AI manager service is not available.');\n }\n return this.aiManager;\n }\n\n private async findAgentIdByName(name: string): Promise<string | undefined> {\n const list = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.agent.name)\n .data<string, { id: string }>()\n .query({\n skip: 0,\n take: 1,\n filter: {\n field: 'name',\n operator: { type: 'equal' },\n value: name,\n },\n });\n return first(list.items)?.id;\n }\n\n private async resolveUiLocale(): Promise<string | undefined> {\n const ctx = await this.runtimeContextBuilder.build();\n const locale = ctx['locale'];\n return typeof locale === 'string' && locale.trim() ? locale.trim() : undefined;\n }\n\n private commandFailureI18nKey(\n result: { message?: { text?: unknown } } | null | undefined,\n fallbackKey: string,\n ): string {\n const text = typeof result?.message?.text === 'string' ? result.message.text.trim() : '';\n return text.startsWith('@') ? text : fallbackKey;\n }\n\n private localeToTranscriptionLanguage(locale: string | undefined): string | undefined {\n const primary = locale?.trim().split('-')[0]?.toLowerCase();\n return primary || undefined;\n }\n\n //#endregion\n}\n\n//#endregion\n","//#region ----- Browser speech -----\n\nexport function canUseBrowserSpeechSynthesis(): boolean {\n return typeof window !== 'undefined' && typeof window.speechSynthesis?.speak === 'function';\n}\n\n/** Unlock speech synthesis during a user gesture so later replies can be spoken. */\nexport function primeBrowserSpeechSynthesis(): void {\n if (!canUseBrowserSpeechSynthesis()) {\n return;\n }\n try {\n window.speechSynthesis.cancel();\n const silent = new SpeechSynthesisUtterance(' ');\n silent.volume = 0;\n silent.rate = 10;\n window.speechSynthesis.speak(silent);\n window.speechSynthesis.cancel();\n } catch {\n // Ignore browsers that reject the silent prime utterance.\n }\n}\n\nexport function cancelBrowserSpeechSynthesis(): void {\n if (!canUseBrowserSpeechSynthesis()) {\n return;\n }\n window.speechSynthesis.cancel();\n}\n\nexport function speakWithBrowserSpeechSynthesis(text: string): Promise<boolean> {\n const trimmed = text.trim();\n if (!trimmed || !canUseBrowserSpeechSynthesis()) {\n return Promise.resolve(false);\n }\n\n return new Promise((resolve) => {\n try {\n window.speechSynthesis.cancel();\n const utterance = new SpeechSynthesisUtterance(trimmed);\n const done = (ok: boolean): void => {\n utterance.onend = null;\n utterance.onerror = null;\n resolve(ok);\n };\n utterance.onend = () => done(true);\n utterance.onerror = () => done(false);\n window.speechSynthesis.speak(utterance);\n } catch {\n resolve(false);\n }\n });\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { Injectable, inject, signal } from '@angular/core';\nimport { AXPopupService } from '@acorex/components/popup';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport type {\n AXPVoiceApplyResult,\n AXPVoiceCapabilityProvider,\n AXPVoiceNextPromptResult,\n AXPVoiceShellConfirmRequest,\n AXPVoiceShellMode,\n AXPVoiceShellOpenOptions,\n AXPVoiceShellTranscriptTurn,\n AXPVoiceShellUiState,\n} from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { AXE_ASSESSMENT_QUESTIONNAIRE_VOICE_CAPABILITY_ID } from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { AXPVoiceCapabilityRegistry } from './voice-capability-registry.service';\nimport { AXPHttpSseVoiceTransport } from './transport/http-sse-voice-transport.service';\nimport {\n cancelBrowserSpeechSynthesis,\n speakWithBrowserSpeechSynthesis,\n} from './browser-speech-synthesis.util';\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst INTERVIEW_INTENT_RE =\n /\\b(fill|inspect|inspection|questionnaire|assessment|survey|checklist|فرم|پرسشنامه|بازرسی)\\b/i;\n\n//#endregion\n\n//#region ----- Service -----\n\n/**\n * Session coordinator for the central voice void dialog.\n * Does not import assessment internals — only the capability registry and transport.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXPVoiceCommandShellService {\n //#region ----- Services & Dependencies -----\n\n private readonly popupService = inject(AXPopupService);\n private readonly translation = inject(AXTranslationService);\n private readonly registry = inject(AXPVoiceCapabilityRegistry);\n private readonly transport = inject(AXPHttpSseVoiceTransport);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n readonly uiState = signal<AXPVoiceShellUiState>('idle');\n readonly mode = signal<AXPVoiceShellMode>('command');\n readonly statusText = signal('');\n readonly lastTranscript = signal('');\n readonly lastSpoken = signal('');\n readonly errorMessage = signal('');\n readonly confirmRequest = signal<AXPVoiceShellConfirmRequest | null>(null);\n readonly turns = signal<AXPVoiceShellTranscriptTurn[]>([]);\n readonly interviewProgress = signal<{ answered: number; totalVisible: number } | null>(null);\n\n //#endregion\n\n //#region ----- Session -----\n\n private activeCapability: AXPVoiceCapabilityProvider | null = null;\n private activeSessionId: string | null = null;\n private pendingSpokenConfirm: { kind: 'submit' } | null = null;\n private currentAudio: HTMLAudioElement | null = null;\n private currentObjectUrl: string | null = null;\n private openPromise: Promise<void> | null = null;\n\n //#endregion\n\n //#region ----- Public API -----\n\n async open(options?: AXPVoiceShellOpenOptions): Promise<void> {\n if (this.openPromise) {\n return this.openPromise;\n }\n this.resetSession();\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.idle'));\n const title = await this.translation.translateAsync('@extensions-ai-voice-shell:dialog.title');\n const { AXEAiVoiceVoidDialogComponent } = await import('./voice-void-dialog/voice-void-dialog.component');\n const popupClosed = this.popupService\n .open(AXEAiVoiceVoidDialogComponent, {\n title,\n size: 'sm',\n header: true,\n closeButton: true,\n maximizable: false,\n draggable: true,\n hasBackdrop: true,\n closeOnBackdropClick: true,\n closeOnEscape: true,\n panelClass: ['axe-ai-voice-shell-popup'],\n })\n .then(() => undefined);\n\n this.openPromise = popupClosed.finally(() => {\n this.openPromise = null;\n this.stopPlayback();\n this.resetSession();\n });\n\n if (options?.capabilityId || options?.startInput) {\n void this.beginCapabilitySession(options);\n } else if (options?.initialText?.trim()) {\n void this.handleUserText(options.initialText.trim());\n }\n\n return this.openPromise;\n }\n\n async enterListening(): Promise<void> {\n this.stopPlayback();\n this.uiState.set('listening');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.listening'));\n this.errorMessage.set('');\n }\n\n async cancelListening(): Promise<void> {\n this.uiState.set('idle');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.idle'));\n }\n\n async reportError(key: string, detail?: string): Promise<void> {\n await this.setError(key, detail);\n }\n\n async submitRecording(audio: Blob): Promise<void> {\n this.uiState.set('thinking');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.thinking'));\n try {\n const { text } = await this.transport.transcribe(audio);\n if (!text.trim()) {\n await this.setError('@extensions-ai-voice-shell:errors.empty-transcript');\n return;\n }\n await this.handleUserText(text.trim());\n } catch (err) {\n await this.setError(\n '@extensions-ai-voice-shell:errors.transcribe-failed',\n err instanceof Error ? err.message : undefined,\n );\n }\n }\n\n async handleUserText(text: string): Promise<void> {\n const trimmed = text.trim();\n if (!trimmed) {\n return;\n }\n this.lastTranscript.set(trimmed);\n this.appendTurn('user', trimmed);\n this.uiState.set('thinking');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.thinking'));\n this.errorMessage.set('');\n\n if (this.mode() === 'confirm' && this.pendingSpokenConfirm) {\n await this.handleConfirmUtterance(trimmed);\n return;\n }\n\n if (this.mode() === 'interview' && this.activeCapability && this.activeSessionId) {\n await this.applyInterviewUtterance(trimmed);\n return;\n }\n\n const intent = { text: trimmed };\n const capability =\n this.registry.getById(AXE_ASSESSMENT_QUESTIONNAIRE_VOICE_CAPABILITY_ID) && INTERVIEW_INTENT_RE.test(trimmed)\n ? await this.registry.findForIntent(intent)\n : await this.registry.findForIntent(intent);\n\n if (capability) {\n await this.beginCapabilitySession({ capabilityId: capability.id, startInput: { text: trimmed } });\n return;\n }\n\n await this.runCommandAssist(trimmed);\n }\n\n async confirmYes(): Promise<void> {\n if (this.pendingSpokenConfirm?.kind === 'submit') {\n await this.submitInterview();\n return;\n }\n this.confirmRequest.set(null);\n this.mode.set(this.activeSessionId ? 'interview' : 'command');\n this.uiState.set('idle');\n }\n\n async confirmNo(): Promise<void> {\n this.pendingSpokenConfirm = null;\n this.confirmRequest.set(null);\n if (this.activeSessionId) {\n this.mode.set('interview');\n const stay = await this.translation.translateAsync('@extensions-ai-voice-shell:interview.submit-cancelled');\n await this.speak(stay);\n return;\n }\n this.mode.set('command');\n this.uiState.set('idle');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.idle'));\n }\n\n async saveInterviewDraft(): Promise<void> {\n if (!this.activeCapability?.saveDraft || !this.activeSessionId) {\n return;\n }\n this.uiState.set('thinking');\n try {\n const result = await this.activeCapability.saveDraft(this.activeSessionId);\n const spoken =\n result && typeof result === 'object' && 'spokenMessage' in result && result.spokenMessage\n ? result.spokenMessage\n : await this.translation.translateAsync('@extensions-ai-voice-shell:interview.draft-saved');\n await this.speak(spoken);\n } catch (err) {\n await this.setError(\n '@extensions-ai-voice-shell:errors.save-failed',\n err instanceof Error ? err.message : undefined,\n );\n }\n }\n\n async cancelInterview(): Promise<void> {\n if (this.activeCapability?.cancel && this.activeSessionId) {\n await this.activeCapability.cancel(this.activeSessionId);\n }\n this.resetSession();\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.idle'));\n }\n\n stopPlayback(): void {\n if (this.currentAudio) {\n this.currentAudio.pause();\n this.currentAudio = null;\n }\n if (this.currentObjectUrl) {\n URL.revokeObjectURL(this.currentObjectUrl);\n this.currentObjectUrl = null;\n }\n cancelBrowserSpeechSynthesis();\n }\n\n //#endregion\n\n //#region ----- Interview / command -----\n\n private async beginCapabilitySession(options: AXPVoiceShellOpenOptions): Promise<void> {\n const startInput = options.startInput;\n const startText =\n startInput != null && typeof startInput === 'object' && 'text' in startInput\n ? String((startInput as { text?: unknown }).text ?? '')\n : '';\n const capability = options.capabilityId\n ? this.registry.getById(options.capabilityId)\n : await this.registry.findForIntent({\n text: startText || undefined,\n context:\n startInput != null && typeof startInput === 'object'\n ? (startInput as Record<string, unknown>)\n : undefined,\n });\n if (!capability) {\n await this.setError('@extensions-ai-voice-shell:errors.no-capability');\n return;\n }\n this.uiState.set('thinking');\n try {\n const started = await capability.startSession(options.startInput ?? {});\n this.activeCapability = capability;\n this.activeSessionId = started.sessionId;\n this.mode.set('interview');\n if (started.spokenPrompt) {\n await this.speak(started.spokenPrompt);\n }\n if (capability.nextPrompt) {\n await this.speakNextPrompt();\n }\n } catch (err) {\n await this.setError(\n '@extensions-ai-voice-shell:errors.start-failed',\n err instanceof Error ? err.message : undefined,\n );\n }\n }\n\n private async speakNextPrompt(): Promise<void> {\n if (!this.activeCapability?.nextPrompt || !this.activeSessionId) {\n return;\n }\n const next = await this.activeCapability.nextPrompt(this.activeSessionId);\n await this.handleNextPrompt(next);\n }\n\n private async handleNextPrompt(next: AXPVoiceNextPromptResult): Promise<void> {\n if ('done' in next && next.done) {\n this.interviewProgress.set(null);\n await this.enterSubmitConfirm(next.spokenPrompt);\n return;\n }\n if ('spokenPrompt' in next) {\n if ('progress' in next && next.progress) {\n this.interviewProgress.set(next.progress);\n }\n await this.speak(next.spokenPrompt);\n }\n }\n\n private async applyInterviewUtterance(text: string): Promise<void> {\n if (!this.activeCapability?.applyInput || !this.activeSessionId) {\n return;\n }\n try {\n const result: AXPVoiceApplyResult = await this.activeCapability.applyInput(this.activeSessionId, {\n text,\n });\n if (!result.ok) {\n await this.speak(\n result.spokenMessage ??\n (await this.translation.translateAsync('@extensions-ai-voice-shell:interview.apply-failed')),\n );\n return;\n }\n if (result.next) {\n await this.handleNextPrompt(result.next);\n return;\n }\n await this.speakNextPrompt();\n } catch (err) {\n await this.setError(\n '@extensions-ai-voice-shell:errors.apply-failed',\n err instanceof Error ? err.message : undefined,\n );\n }\n }\n\n private async enterSubmitConfirm(spoken?: string): Promise<void> {\n this.mode.set('confirm');\n this.pendingSpokenConfirm = { kind: 'submit' };\n const prompt =\n spoken?.trim() ||\n (await this.translation.translateAsync('@extensions-ai-voice-shell:interview.submit-confirm'));\n this.confirmRequest.set({\n prompt,\n confirmLabelKey: '@extensions-ai-voice-shell:actions.submit',\n cancelLabelKey: '@extensions-ai-voice-shell:actions.keep-editing',\n });\n await this.speak(prompt);\n }\n\n private async handleConfirmUtterance(text: string): Promise<void> {\n const normalized = text.trim().toLowerCase();\n const yes = /^(yes|y|ok|okay|sure|submit|confirm|بله|آره|باشه|تایید)$/i.test(normalized);\n const no = /^(no|n|cancel|stop|نه|خیر|لغو)$/i.test(normalized);\n if (yes) {\n await this.confirmYes();\n return;\n }\n if (no) {\n await this.confirmNo();\n return;\n }\n await this.speak(await this.translation.translateAsync('@extensions-ai-voice-shell:interview.confirm-repeat'));\n }\n\n private async submitInterview(): Promise<void> {\n if (!this.activeCapability?.submit || !this.activeSessionId) {\n return;\n }\n this.uiState.set('thinking');\n try {\n const result = await this.activeCapability.submit(this.activeSessionId);\n this.pendingSpokenConfirm = null;\n this.confirmRequest.set(null);\n if (!result.ok) {\n const spoken =\n result.spokenMessage ||\n (await this.translation.translateAsync('@extensions-ai-voice-shell:interview.submit-failed'));\n await this.speak(spoken);\n this.mode.set('interview');\n return;\n }\n const spoken =\n result.spokenMessage ||\n (await this.translation.translateAsync('@extensions-ai-voice-shell:interview.submitted'));\n await this.speak(spoken);\n this.resetSession();\n } catch (err) {\n await this.setError(\n '@extensions-ai-voice-shell:errors.submit-failed',\n err instanceof Error ? err.message : undefined,\n );\n }\n }\n\n private async runCommandAssist(text: string): Promise<void> {\n try {\n const { text: reply } = await this.transport.runAssist(text, {\n voiceShell: true,\n mode: 'command',\n });\n const spoken =\n reply.trim() || (await this.translation.translateAsync('@extensions-ai-voice-shell:command.empty-reply'));\n await this.speak(spoken);\n } catch (err) {\n await this.setError(\n '@extensions-ai-voice-shell:errors.assist-failed',\n err instanceof Error ? err.message : undefined,\n );\n }\n }\n\n private async speak(text: string): Promise<void> {\n const trimmed = text.trim();\n if (!trimmed) {\n this.uiState.set('idle');\n return;\n }\n this.lastSpoken.set(trimmed);\n this.appendTurn('assistant', trimmed);\n this.uiState.set('speaking');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.speaking'));\n this.stopPlayback();\n try {\n const tts = await this.transport.synthesize(trimmed);\n if (tts.objectUrl) {\n this.currentObjectUrl = tts.objectUrl;\n const played = await this.playObjectUrl(tts.objectUrl);\n if (played) {\n await this.finishSpeaking();\n return;\n }\n }\n } catch {\n // Fall through to browser speech when server TTS is unavailable.\n }\n await speakWithBrowserSpeechSynthesis(trimmed);\n await this.finishSpeaking();\n }\n\n private async finishSpeaking(): Promise<void> {\n if (this.mode() === 'confirm') {\n this.uiState.set('confirm');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.confirm'));\n return;\n }\n this.uiState.set('idle');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.idle'));\n }\n\n private playObjectUrl(url: string): Promise<boolean> {\n return new Promise((resolve) => {\n const audio = new Audio(url);\n this.currentAudio = audio;\n const finish = (ok: boolean): void => {\n audio.removeEventListener('ended', onEnded);\n audio.removeEventListener('error', onError);\n resolve(ok);\n };\n const onEnded = (): void => finish(true);\n const onError = (): void => finish(false);\n audio.addEventListener('ended', onEnded);\n audio.addEventListener('error', onError);\n void audio.play().catch(() => finish(false));\n });\n }\n\n private async setError(key: string, detail?: string): Promise<void> {\n const messageKey = detail?.startsWith('@') ? detail : key;\n this.errorMessage.set(await this.translation.translateAsync(messageKey));\n this.uiState.set('error');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.error'));\n }\n\n private appendTurn(role: 'user' | 'assistant', text: string): void {\n this.turns.update((current) => [...current, { role, text }]);\n }\n\n private resetSession(): void {\n this.activeCapability = null;\n this.activeSessionId = null;\n this.pendingSpokenConfirm = null;\n this.confirmRequest.set(null);\n this.interviewProgress.set(null);\n this.mode.set('command');\n this.uiState.set('idle');\n this.statusText.set('');\n this.lastTranscript.set('');\n this.lastSpoken.set('');\n this.errorMessage.set('');\n }\n\n //#endregion\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport type { AXPVoiceShellOpenOptions } from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { inject, Injectable } from '@angular/core';\nimport { AXPVoiceCommandShellService } from '../voice-command-shell.service';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport interface AXEAiVoiceShellOpenCommandInput {\n initialText?: string;\n capabilityId?: string;\n caseId?: string;\n sessionId?: string;\n}\n\n//#endregion\n\n//#region ----- Command -----\n\n@Injectable()\nexport class AXEAiVoiceShellOpenCommand implements AXPCommand<AXEAiVoiceShellOpenCommandInput, void> {\n //#region ----- Services & Dependencies -----\n\n private readonly shell = inject(AXPVoiceCommandShellService);\n\n //#endregion\n\n //#region ----- Command execution -----\n\n async execute(input: AXEAiVoiceShellOpenCommandInput): AXPCommandExecuteResultPromise<void> {\n const startInput =\n input?.caseId || input?.sessionId\n ? { caseId: input.caseId, sessionId: input.sessionId }\n : input?.initialText\n ? { text: input.initialText }\n : undefined;\n const options: AXPVoiceShellOpenOptions = {\n initialText: input?.initialText,\n capabilityId: input?.capabilityId,\n startInput,\n };\n await this.shell.open(options);\n return { success: true, kind: 'object', data: undefined };\n }\n\n //#endregion\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule, isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n PLATFORM_ID,\n ViewEncapsulation,\n computed,\n inject,\n} from '@angular/core';\nimport {\n cancelBrowserSpeechSynthesis,\n primeBrowserSpeechSynthesis,\n} from '../browser-speech-synthesis.util';\nimport { AXPVoiceCommandShellService } from '../voice-command-shell.service';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axe-ai-voice-void-dialog',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXTranslationModule],\n templateUrl: './voice-void-dialog.component.html',\n styleUrl: './voice-void-dialog.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXEAiVoiceVoidDialogComponent extends AXBasePageComponent {\n //#region ----- Services & Dependencies -----\n\n readonly shell = inject(AXPVoiceCommandShellService);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly destroyRef = inject(DestroyRef);\n\n //#endregion\n\n //#region ----- State -----\n\n private mediaRecorder?: MediaRecorder;\n private audioChunks: Blob[] = [];\n private activeStream?: MediaStream;\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n readonly orbClass = computed(() => `voice-void-orb voice-void-orb--${this.shell.uiState()}`);\n readonly orbWrapClass = computed(() => `voice-void-orb-wrap voice-void-orb-wrap--${this.shell.uiState()}`);\n readonly canListen = computed(() => {\n const state = this.shell.uiState();\n return state === 'idle' || state === 'error' || state === 'confirm';\n });\n readonly isListening = computed(() => this.shell.uiState() === 'listening');\n readonly isSpeaking = computed(() => this.shell.uiState() === 'speaking');\n readonly showConfirm = computed(() => this.shell.uiState() === 'confirm' && this.shell.confirmRequest() != null);\n readonly progressLabel = computed(() => {\n const progress = this.shell.interviewProgress();\n if (!progress || progress.totalVisible <= 0) {\n return '';\n }\n return `${progress.answered}/${progress.totalVisible}`;\n });\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n this.destroyRef.onDestroy(() => {\n this.stopTracks();\n cancelBrowserSpeechSynthesis();\n });\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n async onMicClick(): Promise<void> {\n if (isPlatformBrowser(this.platformId)) {\n primeBrowserSpeechSynthesis();\n }\n if (this.isListening()) {\n await this.stopAndSubmit();\n return;\n }\n if (!this.canListen()) {\n return;\n }\n await this.startRecording();\n }\n\n async onCancelListen(): Promise<void> {\n this.stopTracks();\n this.audioChunks = [];\n await this.shell.cancelListening();\n }\n\n async onConfirmYes(): Promise<void> {\n await this.shell.confirmYes();\n }\n\n async onConfirmNo(): Promise<void> {\n await this.shell.confirmNo();\n }\n\n async onSaveDraft(): Promise<void> {\n await this.shell.saveInterviewDraft();\n }\n\n async onCancelInterview(): Promise<void> {\n await this.shell.cancelInterview();\n }\n\n //#endregion\n\n //#region ----- Recording -----\n\n private async startRecording(): Promise<void> {\n if (!isPlatformBrowser(this.platformId) || !navigator.mediaDevices?.getUserMedia) {\n await this.shell.reportError('@extensions-ai-voice-shell:errors.mic-unavailable');\n return;\n }\n try {\n const stream = await navigator.mediaDevices.getUserMedia({ audio: true });\n this.activeStream = stream;\n this.audioChunks = [];\n const recorder = new MediaRecorder(stream);\n this.mediaRecorder = recorder;\n recorder.ondataavailable = (event) => {\n if (event.data.size > 0) {\n this.audioChunks.push(event.data);\n }\n };\n recorder.start(250);\n await this.shell.enterListening();\n } catch {\n this.stopTracks();\n await this.shell.reportError('@extensions-ai-voice-shell:errors.mic-denied');\n }\n }\n\n private async stopAndSubmit(): Promise<void> {\n const recorder = this.mediaRecorder;\n if (!recorder || recorder.state !== 'recording') {\n this.stopTracks();\n await this.shell.cancelListening();\n return;\n }\n const blob = await new Promise<Blob | null>((resolve) => {\n recorder.onstop = () => {\n const mime = recorder.mimeType?.trim() || this.audioChunks[0]?.type?.trim() || 'audio/webm';\n const audioBlob = new Blob(this.audioChunks, { type: mime });\n resolve(audioBlob.size > 0 ? audioBlob : null);\n };\n recorder.requestData();\n recorder.stop();\n });\n this.stopTracks();\n if (!blob) {\n await this.shell.cancelListening();\n return;\n }\n await this.shell.submitRecording(blob);\n }\n\n private stopTracks(): void {\n if (this.mediaRecorder?.state === 'recording') {\n this.mediaRecorder.stop();\n }\n this.mediaRecorder = undefined;\n this.activeStream?.getTracks().forEach((track) => track.stop());\n this.activeStream = undefined;\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"voice-void\">\n <div class=\"voice-void-stage\">\n <!-- ----- Listening / thinking / speaking orb ----- -->\n <div [class]=\"orbWrapClass()\">\n <span class=\"voice-void-ring voice-void-ring--1\" aria-hidden=\"true\"></span>\n <span class=\"voice-void-ring voice-void-ring--2\" aria-hidden=\"true\"></span>\n <span class=\"voice-void-ring voice-void-ring--3\" aria-hidden=\"true\"></span>\n <button\n type=\"button\"\n [class]=\"orbClass()\"\n (click)=\"onMicClick()\"\n [disabled]=\"!canListen() && !isListening()\"\n [attr.aria-label]=\"'@extensions-ai-voice-shell:actions.tap-to-talk' | translate | async\"\n >\n @if (isSpeaking()) {\n <!-- ----- AI is speaking ----- -->\n <i class=\"fa-regular fa-volume-high\"></i>\n }\n <!-- ----- Tap-to-talk / user speaking ----- -->\n @else {\n <i class=\"fa-regular fa-microphone\"></i>\n }\n </button>\n @if (isListening() || isSpeaking()) {\n <!-- ----- Waveform bars: user listen vs AI speak ----- -->\n <span class=\"voice-void-eq\" aria-hidden=\"true\">\n <span></span>\n <span></span>\n <span></span>\n <span></span>\n <span></span>\n </span>\n }\n </div>\n\n <p class=\"voice-void-status\">{{ shell.statusText() }}</p>\n\n @if (progressLabel()) {\n <!-- ----- Interview progress counter ----- -->\n <p class=\"voice-void-progress\">{{ progressLabel() }}</p>\n }\n\n @if (shell.lastSpoken()) {\n <!-- ----- Last spoken assistant text ----- -->\n <p class=\"voice-void-spoken\">{{ shell.lastSpoken() }}</p>\n }\n\n @if (shell.lastTranscript()) {\n <!-- ----- Last user transcript ----- -->\n <p class=\"voice-void-transcript\">{{ shell.lastTranscript() }}</p>\n }\n\n @if (shell.errorMessage()) {\n <!-- ----- Spoken / visible error ----- -->\n <p class=\"voice-void-error\">{{ shell.errorMessage() }}</p>\n }\n </div>\n\n @if (showConfirm()) {\n <!-- ----- Confirm chips for submit / destructive actions ----- -->\n <div class=\"voice-void-confirm\">\n <p class=\"voice-void-confirm-prompt\">{{ shell.confirmRequest()?.prompt }}</p>\n <div class=\"voice-void-confirm-actions\">\n <ax-button\n [text]=\"'@extensions-ai-voice-shell:actions.submit' | translate | async\"\n color=\"primary\"\n (onClick)=\"onConfirmYes()\"\n ></ax-button>\n <ax-button\n [text]=\"'@extensions-ai-voice-shell:actions.keep-editing' | translate | async\"\n [look]=\"'ghost'\"\n (onClick)=\"onConfirmNo()\"\n ></ax-button>\n </div>\n </div>\n }\n\n <!-- ----- Secondary interview / listen actions ----- -->\n <div class=\"voice-void-toolbar\">\n @if (isListening()) {\n <!-- ----- Stop listening without sending ----- -->\n <ax-button\n [text]=\"'@extensions-ai-voice-shell:actions.cancel-listen' | translate | async\"\n [look]=\"'ghost'\"\n (onClick)=\"onCancelListen()\"\n ></ax-button>\n }\n <!-- ----- Interview session actions ----- -->\n @if (shell.mode() === 'interview') {\n <!-- ----- Draft save and cancel while filling by voice ----- -->\n <ax-button\n [text]=\"'@extensions-ai-voice-shell:actions.save-draft' | translate | async\"\n [look]=\"'outline'\"\n (onClick)=\"onSaveDraft()\"\n ></ax-button>\n <ax-button\n [text]=\"'@extensions-ai-voice-shell:actions.cancel-interview' | translate | async\"\n [look]=\"'ghost'\"\n (onClick)=\"onCancelInterview()\"\n ></ax-button>\n }\n </div>\n\n <p class=\"voice-void-hint\">{{ '@extensions-ai-voice-shell:dialog.hint' | translate | async }}</p>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAYA;AAEA;AAEA;AACO,MAAM,2BAA2B,GAAG;AAE3C;AAEA;AAEA;;AAEG;MASU,kCAAkC,CAAA;;;AAiB7C,IAAA,WAAA,GAAA;;AAdiB,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC5C,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,2BAA2B,CAAC;AACtD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;;;QAM7B,IAAA,CAAA,eAAe,GAAG,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,2BAA2B,CAAC,CAAC;AAOzG,QAAA,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC;YAC7B,KAAK,EAAE,IAAI,CAAC,UAAU;AACtB,YAAA,EAAE,EAAE,gBAAgB;YACpB,QAAQ,EAAE,2BAA2B,CAAC,MA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,SAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,YAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,mBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,iBAAiB,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAKnE,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBARzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,mBACnB,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,mBAAmB,CAAC,EAAA,aAAA,EAGhE,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,sxHAAA,EAAA,MAAA,EAAA,CAAA,k/KAAA,CAAA,EAAA;;;;;;;;AEhCvC;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-platform-extension-ai-voice-shell-client.mjs","sources":["../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-shell-header-slot.component.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-shell-header-slot.component.html","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-shell-search.provider.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/ai-voice-shell-extension.module.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-capability.tokens.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-capability-registry.service.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/transport/http-sse-voice-transport.service.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/browser-speech-synthesis.util.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-command-shell.service.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/commands/open-voice-command-shell.command.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-void-dialog/voice-void-dialog.component.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-void-dialog/voice-void-dialog.component.html","../../../../libs/extensions/ai/voice-shell/client/src/acorex-platform-extension-ai-voice-shell-client.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPKeyboardShortcutPriority } from '@acorex-platform/framework-shared/core';\nimport { AXE_AI_VOICE_SHELL_OPEN_COMMAND } from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { AXPKeyboardShortcutRegistry } from '@acorex-platform/framework-client/core';\nimport { AXPCommandExecutor } from '@acorex-platform/framework-client/runtime';\nimport { AXPLayoutThemeService } from '@acorex-platform/framework-client/themes/shared';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, DestroyRef, ViewEncapsulation, inject } from '@angular/core';\n\n//#endregion\n\n//#region ----- Constants -----\n\n/** Dedicated chord — Ctrl+K remains global search. */\nexport const AXE_AI_VOICE_SHELL_SHORTCUT = 'ctrl+shift+space';\n\n//#endregion\n\n//#region ----- Component -----\n\n/**\n * Header mic next to the conversation AI robot. Opens the voice command shell.\n */\n@Component({\n selector: 'axe-ai-voice-shell-header-slot',\n templateUrl: './voice-shell-header-slot.component.html',\n styleUrls: ['./voice-shell-header-slot.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AXButtonModule, AXDecoratorModule, AXTranslationModule, AsyncPipe],\n})\nexport class AXEAiVoiceShellHeaderSlotComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly commandExecutor = inject(AXPCommandExecutor);\n private readonly shortcutRegistry = inject(AXPKeyboardShortcutRegistry);\n private readonly destroyRef = inject(DestroyRef);\n protected readonly themeStore = inject(AXPLayoutThemeService);\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly shortcutDisplay = this.shortcutRegistry.formatDisplayKeys([AXE_AI_VOICE_SHELL_SHORTCUT]);\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n this.shortcutRegistry.register({\n owner: this.destroyRef,\n id: 'ai-voice-shell',\n priority: AXPKeyboardShortcutPriority.Global,\n group: '@general:keyboard-shortcuts.groups.global',\n shortcuts: [\n {\n keys: [AXE_AI_VOICE_SHELL_SHORTCUT],\n title: '@general:keyboard-shortcuts.actions.open-voice-command',\n allowInEditableFields: true,\n handler: () => {\n void this.openVoiceCommand();\n },\n },\n ],\n });\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected async openVoiceCommand(): Promise<void> {\n await this.commandExecutor.execute(AXE_AI_VOICE_SHELL_OPEN_COMMAND, {});\n }\n\n //#endregion\n}\n\n//#endregion\n","<ax-button\n [iconOnly]=\"true\"\n class=\"relative\"\n [color]=\"themeStore.headerButtonColor()\"\n [look]=\"themeStore.headerButtonLook()\"\n [title]=\"\n ('@extensions-ai-voice-shell:header.open-title' | translate: { params: { shortcut: shortcutDisplay } } | async) ??\n ''\n \"\n [attr.aria-label]=\"\n ('@extensions-ai-voice-shell:header.open-title' | translate: { params: { shortcut: shortcutDisplay } } | async) ??\n ''\n \"\n (onClick)=\"openVoiceCommand()\"\n>\n <ax-icon>\n <i class=\"fa-regular fa-microphone\"></i>\n </ax-icon>\n</ax-button>\n","//#region ----- Imports -----\n\nimport { Injectable } from '@angular/core';\nimport { AXPSearchCommandProvider, AXPSearchResult } from '@acorex-platform/framework-client/common';\nimport { AXE_AI_VOICE_SHELL_OPEN_COMMAND } from '@acorex-platform/extension-ai-voice-shell-client/contracts';\n\n//#endregion\n\n//#region ----- Search -----\n\n@Injectable()\nexport class AXEAiVoiceShellSearchCommandProvider extends AXPSearchCommandProvider {\n commands: AXPSearchResult[] = [\n {\n id: 'open-voice-command-shell',\n group: 'command',\n title: '@extensions-ai-voice-shell:search.open.title',\n icon: 'fa-light fa-microphone',\n description: '@extensions-ai-voice-shell:search.open.description',\n command: {\n name: AXE_AI_VOICE_SHELL_OPEN_COMMAND,\n },\n },\n ];\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { NgModule } from '@angular/core';\nimport { AXP_SEARCH_PROVIDER } from '@acorex-platform/framework-client/common';\nimport { AXPComponentSlotModule } from '@acorex-platform/framework-client/core';\nimport { provideCommandSetups } from '@acorex-platform/framework-client/runtime';\nimport { AXMAiManagementModule } from '@acorex-platform/module-ai-management-client';\nimport { AXE_AI_VOICE_SHELL_OPEN_COMMAND } from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { AXEAiVoiceShellHeaderSlotComponent } from './voice-shell-header-slot.component';\nimport { AXEAiVoiceShellSearchCommandProvider } from './voice-shell-search.provider';\n\n//#endregion\n\n//#region ----- Module -----\n\n/**\n * Central voice AI command shell (void dialog + capability registry + HTTP/SSE transport).\n * Register next to {@link AXMAiManagementModule}. Domain modules register {@link AXP_VOICE_CAPABILITY_PROVIDER}.\n */\n@NgModule({\n imports: [\n AXMAiManagementModule,\n AXPComponentSlotModule.forChild({\n 'root-header-end': [\n {\n // Immediately after conversation mini-chat (55) so mic + robot sit as one AI cluster.\n priority: 56,\n name: 'ai-voice-shell',\n component: AXEAiVoiceShellHeaderSlotComponent,\n },\n ],\n }),\n ],\n providers: [\n {\n provide: AXP_SEARCH_PROVIDER,\n useClass: AXEAiVoiceShellSearchCommandProvider,\n multi: true,\n },\n provideCommandSetups([\n {\n key: AXE_AI_VOICE_SHELL_OPEN_COMMAND,\n command: () =>\n import('./commands/open-voice-command-shell.command').then((c) => c.AXEAiVoiceShellOpenCommand),\n },\n ]),\n ],\n})\nexport class AXEAiVoiceShellExtensionModule {}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { InjectionToken } from '@angular/core';\nimport type { AXPVoiceCapabilityProvider } from '@acorex-platform/extension-ai-voice-shell-client/contracts';\n\n//#endregion\n\n//#region ----- Tokens -----\n\n/** Multi-provider token for domain voice capabilities (assessment, later others). */\nexport const AXP_VOICE_CAPABILITY_PROVIDER = new InjectionToken<AXPVoiceCapabilityProvider>(\n 'AXP_VOICE_CAPABILITY_PROVIDER',\n);\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { Injectable, inject } from '@angular/core';\nimport type {\n AXPVoiceCapabilityIntent,\n AXPVoiceCapabilityProvider,\n} from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { AXP_VOICE_CAPABILITY_PROVIDER } from './voice-capability.tokens';\n\n//#endregion\n\n//#region ----- Registry -----\n\n/**\n * Discovers module-owned {@link AXPVoiceCapabilityProvider} implementations.\n * The shell never imports domain internals.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXPVoiceCapabilityRegistry {\n //#region ----- Services & Dependencies -----\n\n private readonly providers = inject(AXP_VOICE_CAPABILITY_PROVIDER, { optional: true }) ?? [];\n\n //#endregion\n\n //#region ----- Public API -----\n\n list(): AXPVoiceCapabilityProvider[] {\n const raw = this.providers;\n return Array.isArray(raw) ? raw : raw ? [raw] : [];\n }\n\n getById(id: string): AXPVoiceCapabilityProvider | undefined {\n const trimmed = id.trim();\n if (!trimmed) {\n return undefined;\n }\n return this.list().find((provider) => provider.id === trimmed);\n }\n\n async findForIntent(intent: AXPVoiceCapabilityIntent): Promise<AXPVoiceCapabilityProvider | undefined> {\n for (const provider of this.list()) {\n if (await provider.canHandle(intent)) {\n return provider;\n }\n }\n return undefined;\n }\n\n //#endregion\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { Injectable, inject } from '@angular/core';\nimport {\n AIMANAGEMENT_CHAT_SYNTHESIZE_SPEECH_COMMAND_KEY,\n AIMANAGEMENT_CHAT_TRANSCRIBE_SPEECH_COMMAND_KEY,\n AXPAiChatToolRunContextService,\n AXPAiManagerService,\n AXPAiPlatformRuntimeContextBuilder,\n createBrowserPlayableTtsBlobUrl,\n persistAiChatAttachmentImage,\n} from '@acorex-platform/module-ai-management-client';\nimport { RootConfig } from '@acorex-platform/module-ai-management-client/contracts';\nimport type {\n AXPVoiceInteractionTransport,\n AXPVoiceSttResult,\n AXPVoiceTtsResult,\n} from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport { AXPFileStorageService } from '@acorex-platform/framework-client/common';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { createRandomUuid, runtimeCommandPayloadData } from '@acorex-platform/framework-shared/core';\nimport { first } from 'lodash';\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst SPEECH_TO_TEXT_AGENT_NAME = 'speech-to-text';\nconst TEXT_TO_SPEECH_AGENT_NAME = 'text-to-speech';\n\n//#endregion\n\n//#region ----- Transport -----\n\n/**\n * v1 interaction transport: existing AI HTTP commands + assist `run` (SSE under the hood).\n */\n@Injectable({ providedIn: 'root' })\nexport class AXPHttpSseVoiceTransport implements AXPVoiceInteractionTransport {\n //#region ----- Services & Dependencies -----\n\n readonly id = 'http-sse';\n\n private readonly commandService = inject(AXPCommandService);\n private readonly fileStorage = inject(AXPFileStorageService);\n private readonly entityService = inject(AXPEntityService);\n private readonly chatToolRunContext = inject(AXPAiChatToolRunContextService);\n private readonly runtimeContextBuilder = inject(AXPAiPlatformRuntimeContextBuilder);\n private readonly aiManager = inject(AXPAiManagerService, { optional: true });\n\n //#endregion\n\n //#region ----- Public API -----\n\n async transcribe(audio: Blob, options?: { language?: string }): Promise<AXPVoiceSttResult> {\n const aiManager = this.requireAiManager();\n const assist = await aiManager.getAssistForChat();\n const assistId = assist.id?.trim();\n if (!assistId) {\n throw new Error('No AI assist is configured for speech transcription.');\n }\n const chatTransport = (await aiManager.getAssistPrimaryChatTransport(assistId)) ?? 'openai';\n const agentId = await this.findAgentIdByName(SPEECH_TO_TEXT_AGENT_NAME);\n const mimeType = audio.type?.trim() || 'audio/webm';\n const file = new File([audio], `voice-${Date.now()}.webm`, { type: mimeType });\n const { fileId } = await persistAiChatAttachmentImage(\n this.fileStorage,\n file,\n createRandomUuid(),\n );\n const language =\n options?.language?.trim() ||\n this.localeToTranscriptionLanguage(await this.resolveUiLocale());\n\n this.chatToolRunContext.setContext({\n assistId,\n chatTransport,\n ...(agentId ? { agentId } : {}),\n });\n try {\n const result = await this.commandService.execute(AIMANAGEMENT_CHAT_TRANSCRIBE_SPEECH_COMMAND_KEY, {\n fileId,\n assistId,\n ...(agentId ? { agentId } : {}),\n ...(language ? { language } : {}),\n });\n const data = runtimeCommandPayloadData(result) as { text?: string } | undefined;\n const text = typeof data?.text === 'string' ? data.text.trim() : '';\n if (!result?.success || !text) {\n throw new Error(this.commandFailureI18nKey(result, '@extensions-ai-voice-shell:errors.transcribe-failed'));\n }\n return { text };\n } finally {\n this.chatToolRunContext.setContext(null);\n }\n }\n\n async synthesize(text: string): Promise<AXPVoiceTtsResult> {\n const trimmed = text.trim();\n if (!trimmed) {\n return { text: '' };\n }\n const aiManager = this.requireAiManager();\n const assist = await aiManager.getAssistForChat();\n const assistId = assist.id?.trim();\n if (!assistId) {\n throw new Error('No AI assist is configured for speech synthesis.');\n }\n const chatTransport = (await aiManager.getAssistPrimaryChatTransport(assistId)) ?? 'openai';\n const agentId = await this.findAgentIdByName(TEXT_TO_SPEECH_AGENT_NAME);\n\n this.chatToolRunContext.setContext({\n assistId,\n chatTransport,\n ...(agentId ? { agentId } : {}),\n });\n try {\n const result = await this.commandService.executeRemote(AIMANAGEMENT_CHAT_SYNTHESIZE_SPEECH_COMMAND_KEY, {\n text: trimmed,\n assistId,\n ...(agentId ? { agentId } : {}),\n });\n const data = runtimeCommandPayloadData(result) as { fileId?: string; text?: string } | undefined;\n const fileId = typeof data?.fileId === 'string' ? data.fileId.trim() : '';\n if (!result?.success || !fileId) {\n throw new Error(this.commandFailureI18nKey(result, '@extensions-ai-voice-shell:errors.assist-failed'));\n }\n const info = await this.fileStorage.getInfo(fileId);\n const binary = await this.fileStorage.download(fileId);\n const objectUrl = await createBrowserPlayableTtsBlobUrl(\n binary,\n info?.mimeType ?? binary.type,\n info?.name,\n );\n return { fileId, objectUrl, text: typeof data?.text === 'string' ? data.text : trimmed };\n } finally {\n this.chatToolRunContext.setContext(null);\n }\n }\n\n async runAssist(prompt: string, context?: Record<string, unknown>): Promise<{ text: string }> {\n const aiManager = this.requireAiManager();\n const result = await aiManager.run({\n prompt,\n context: {\n systemInstruction:\n 'You are the platform voice command assistant. Prefer AI-compatible tools. Keep spoken replies short. Confirm before destructive or submit actions.',\n structuredContext: context,\n },\n });\n return { text: result.text?.trim() ?? '' };\n }\n\n //#endregion\n\n //#region ----- Private helpers -----\n\n private requireAiManager(): AXPAiManagerService {\n if (!this.aiManager) {\n throw new Error('AI manager service is not available.');\n }\n return this.aiManager;\n }\n\n private async findAgentIdByName(name: string): Promise<string | undefined> {\n const list = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.agent.name)\n .data<string, { id: string }>()\n .query({\n skip: 0,\n take: 1,\n filter: {\n field: 'name',\n operator: { type: 'equal' },\n value: name,\n },\n });\n return first(list.items)?.id;\n }\n\n private async resolveUiLocale(): Promise<string | undefined> {\n const ctx = await this.runtimeContextBuilder.build();\n const locale = ctx['locale'];\n return typeof locale === 'string' && locale.trim() ? locale.trim() : undefined;\n }\n\n private commandFailureI18nKey(\n result: { message?: { text?: unknown } } | null | undefined,\n fallbackKey: string,\n ): string {\n const text = typeof result?.message?.text === 'string' ? result.message.text.trim() : '';\n return text.startsWith('@') ? text : fallbackKey;\n }\n\n private localeToTranscriptionLanguage(locale: string | undefined): string | undefined {\n const primary = locale?.trim().split('-')[0]?.toLowerCase();\n return primary || undefined;\n }\n\n //#endregion\n}\n\n//#endregion\n","//#region ----- Browser speech -----\n\nexport function canUseBrowserSpeechSynthesis(): boolean {\n return typeof window !== 'undefined' && typeof window.speechSynthesis?.speak === 'function';\n}\n\n/** Unlock speech synthesis during a user gesture so later replies can be spoken. */\nexport function primeBrowserSpeechSynthesis(): void {\n if (!canUseBrowserSpeechSynthesis()) {\n return;\n }\n try {\n window.speechSynthesis.cancel();\n const silent = new SpeechSynthesisUtterance(' ');\n silent.volume = 0;\n silent.rate = 10;\n window.speechSynthesis.speak(silent);\n window.speechSynthesis.cancel();\n } catch {\n // Ignore browsers that reject the silent prime utterance.\n }\n}\n\nexport function cancelBrowserSpeechSynthesis(): void {\n if (!canUseBrowserSpeechSynthesis()) {\n return;\n }\n window.speechSynthesis.cancel();\n}\n\nexport function speakWithBrowserSpeechSynthesis(text: string): Promise<boolean> {\n const trimmed = text.trim();\n if (!trimmed || !canUseBrowserSpeechSynthesis()) {\n return Promise.resolve(false);\n }\n\n return new Promise((resolve) => {\n try {\n window.speechSynthesis.cancel();\n const utterance = new SpeechSynthesisUtterance(trimmed);\n const done = (ok: boolean): void => {\n utterance.onend = null;\n utterance.onerror = null;\n resolve(ok);\n };\n utterance.onend = () => done(true);\n utterance.onerror = () => done(false);\n window.speechSynthesis.speak(utterance);\n } catch {\n resolve(false);\n }\n });\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { Injectable, inject, signal } from '@angular/core';\nimport { AXPopupService } from '@acorex/components/popup';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport type {\n AXPVoiceApplyResult,\n AXPVoiceCapabilityProvider,\n AXPVoiceNextPromptResult,\n AXPVoiceShellConfirmRequest,\n AXPVoiceShellMode,\n AXPVoiceShellOpenOptions,\n AXPVoiceShellTranscriptTurn,\n AXPVoiceShellUiState,\n} from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { AXE_ASSESSMENT_QUESTIONNAIRE_VOICE_CAPABILITY_ID } from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { AXPVoiceCapabilityRegistry } from './voice-capability-registry.service';\nimport { AXPHttpSseVoiceTransport } from './transport/http-sse-voice-transport.service';\nimport {\n cancelBrowserSpeechSynthesis,\n speakWithBrowserSpeechSynthesis,\n} from './browser-speech-synthesis.util';\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst INTERVIEW_INTENT_RE =\n /\\b(fill|inspect|inspection|questionnaire|assessment|survey|checklist|فرم|پرسشنامه|بازرسی)\\b/i;\n\n//#endregion\n\n//#region ----- Service -----\n\n/**\n * Session coordinator for the central voice void dialog.\n * Does not import assessment internals — only the capability registry and transport.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXPVoiceCommandShellService {\n //#region ----- Services & Dependencies -----\n\n private readonly popupService = inject(AXPopupService);\n private readonly translation = inject(AXTranslationService);\n private readonly registry = inject(AXPVoiceCapabilityRegistry);\n private readonly transport = inject(AXPHttpSseVoiceTransport);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n readonly uiState = signal<AXPVoiceShellUiState>('idle');\n readonly mode = signal<AXPVoiceShellMode>('command');\n readonly statusText = signal('');\n readonly lastTranscript = signal('');\n readonly lastSpoken = signal('');\n readonly errorMessage = signal('');\n readonly confirmRequest = signal<AXPVoiceShellConfirmRequest | null>(null);\n readonly turns = signal<AXPVoiceShellTranscriptTurn[]>([]);\n readonly interviewProgress = signal<{ answered: number; totalVisible: number } | null>(null);\n\n //#endregion\n\n //#region ----- Session -----\n\n private activeCapability: AXPVoiceCapabilityProvider | null = null;\n private activeSessionId: string | null = null;\n private pendingSpokenConfirm: { kind: 'submit' } | null = null;\n private currentAudio: HTMLAudioElement | null = null;\n private currentObjectUrl: string | null = null;\n private openPromise: Promise<void> | null = null;\n\n //#endregion\n\n //#region ----- Public API -----\n\n async open(options?: AXPVoiceShellOpenOptions): Promise<void> {\n if (this.openPromise) {\n return this.openPromise;\n }\n this.resetSession();\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.idle'));\n const title = await this.translation.translateAsync('@extensions-ai-voice-shell:dialog.title');\n const { AXEAiVoiceVoidDialogComponent } = await import('./voice-void-dialog/voice-void-dialog.component');\n const popupClosed = this.popupService\n .open(AXEAiVoiceVoidDialogComponent, {\n title,\n size: 'sm',\n header: true,\n closeButton: true,\n maximizable: false,\n draggable: true,\n hasBackdrop: true,\n closeOnBackdropClick: true,\n closeOnEscape: true,\n panelClass: ['axe-ai-voice-shell-popup'],\n })\n .then(() => undefined);\n\n this.openPromise = popupClosed.finally(() => {\n this.openPromise = null;\n this.stopPlayback();\n this.resetSession();\n });\n\n if (options?.capabilityId || options?.startInput) {\n void this.beginCapabilitySession(options);\n } else if (options?.initialText?.trim()) {\n void this.handleUserText(options.initialText.trim());\n }\n\n return this.openPromise;\n }\n\n async enterListening(): Promise<void> {\n this.stopPlayback();\n this.uiState.set('listening');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.listening'));\n this.errorMessage.set('');\n }\n\n async cancelListening(): Promise<void> {\n this.uiState.set('idle');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.idle'));\n }\n\n async reportError(key: string, detail?: string): Promise<void> {\n await this.setError(key, detail);\n }\n\n async submitRecording(audio: Blob): Promise<void> {\n this.uiState.set('thinking');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.thinking'));\n try {\n const { text } = await this.transport.transcribe(audio);\n if (!text.trim()) {\n await this.setError('@extensions-ai-voice-shell:errors.empty-transcript');\n return;\n }\n await this.handleUserText(text.trim());\n } catch (err) {\n await this.setError(\n '@extensions-ai-voice-shell:errors.transcribe-failed',\n err instanceof Error ? err.message : undefined,\n );\n }\n }\n\n async handleUserText(text: string): Promise<void> {\n const trimmed = text.trim();\n if (!trimmed) {\n return;\n }\n this.lastTranscript.set(trimmed);\n this.appendTurn('user', trimmed);\n this.uiState.set('thinking');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.thinking'));\n this.errorMessage.set('');\n\n if (this.mode() === 'confirm' && this.pendingSpokenConfirm) {\n await this.handleConfirmUtterance(trimmed);\n return;\n }\n\n if (this.mode() === 'interview' && this.activeCapability && this.activeSessionId) {\n await this.applyInterviewUtterance(trimmed);\n return;\n }\n\n const intent = { text: trimmed };\n const capability =\n this.registry.getById(AXE_ASSESSMENT_QUESTIONNAIRE_VOICE_CAPABILITY_ID) && INTERVIEW_INTENT_RE.test(trimmed)\n ? await this.registry.findForIntent(intent)\n : await this.registry.findForIntent(intent);\n\n if (capability) {\n await this.beginCapabilitySession({ capabilityId: capability.id, startInput: { text: trimmed } });\n return;\n }\n\n await this.runCommandAssist(trimmed);\n }\n\n async confirmYes(): Promise<void> {\n if (this.pendingSpokenConfirm?.kind === 'submit') {\n await this.submitInterview();\n return;\n }\n this.confirmRequest.set(null);\n this.mode.set(this.activeSessionId ? 'interview' : 'command');\n this.uiState.set('idle');\n }\n\n async confirmNo(): Promise<void> {\n this.pendingSpokenConfirm = null;\n this.confirmRequest.set(null);\n if (this.activeSessionId) {\n this.mode.set('interview');\n const stay = await this.translation.translateAsync('@extensions-ai-voice-shell:interview.submit-cancelled');\n await this.speak(stay);\n return;\n }\n this.mode.set('command');\n this.uiState.set('idle');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.idle'));\n }\n\n async saveInterviewDraft(): Promise<void> {\n if (!this.activeCapability?.saveDraft || !this.activeSessionId) {\n return;\n }\n this.uiState.set('thinking');\n try {\n const result = await this.activeCapability.saveDraft(this.activeSessionId);\n const spoken =\n result && typeof result === 'object' && 'spokenMessage' in result && result.spokenMessage\n ? result.spokenMessage\n : await this.translation.translateAsync('@extensions-ai-voice-shell:interview.draft-saved');\n await this.speak(spoken);\n } catch (err) {\n await this.setError(\n '@extensions-ai-voice-shell:errors.save-failed',\n err instanceof Error ? err.message : undefined,\n );\n }\n }\n\n async cancelInterview(): Promise<void> {\n if (this.activeCapability?.cancel && this.activeSessionId) {\n await this.activeCapability.cancel(this.activeSessionId);\n }\n this.resetSession();\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.idle'));\n }\n\n stopPlayback(): void {\n if (this.currentAudio) {\n this.currentAudio.pause();\n this.currentAudio = null;\n }\n if (this.currentObjectUrl) {\n URL.revokeObjectURL(this.currentObjectUrl);\n this.currentObjectUrl = null;\n }\n cancelBrowserSpeechSynthesis();\n }\n\n //#endregion\n\n //#region ----- Interview / command -----\n\n private async beginCapabilitySession(options: AXPVoiceShellOpenOptions): Promise<void> {\n const startInput = options.startInput;\n const startText =\n startInput != null && typeof startInput === 'object' && 'text' in startInput\n ? String((startInput as { text?: unknown }).text ?? '')\n : '';\n const capability = options.capabilityId\n ? this.registry.getById(options.capabilityId)\n : await this.registry.findForIntent({\n text: startText || undefined,\n context:\n startInput != null && typeof startInput === 'object'\n ? (startInput as Record<string, unknown>)\n : undefined,\n });\n if (!capability) {\n await this.setError('@extensions-ai-voice-shell:errors.no-capability');\n return;\n }\n this.uiState.set('thinking');\n try {\n const started = await capability.startSession(options.startInput ?? {});\n this.activeCapability = capability;\n this.activeSessionId = started.sessionId;\n this.mode.set('interview');\n if (started.spokenPrompt) {\n await this.speak(started.spokenPrompt);\n }\n if (capability.nextPrompt) {\n await this.speakNextPrompt();\n }\n } catch (err) {\n await this.setError(\n '@extensions-ai-voice-shell:errors.start-failed',\n err instanceof Error ? err.message : undefined,\n );\n }\n }\n\n private async speakNextPrompt(): Promise<void> {\n if (!this.activeCapability?.nextPrompt || !this.activeSessionId) {\n return;\n }\n const next = await this.activeCapability.nextPrompt(this.activeSessionId);\n await this.handleNextPrompt(next);\n }\n\n private async handleNextPrompt(next: AXPVoiceNextPromptResult): Promise<void> {\n if ('done' in next && next.done) {\n this.interviewProgress.set(null);\n await this.enterSubmitConfirm(next.spokenPrompt);\n return;\n }\n if ('spokenPrompt' in next) {\n if ('progress' in next && next.progress) {\n this.interviewProgress.set(next.progress);\n }\n await this.speak(next.spokenPrompt);\n }\n }\n\n private async applyInterviewUtterance(text: string): Promise<void> {\n if (!this.activeCapability?.applyInput || !this.activeSessionId) {\n return;\n }\n try {\n const result: AXPVoiceApplyResult = await this.activeCapability.applyInput(this.activeSessionId, {\n text,\n });\n if (!result.ok) {\n await this.speak(\n result.spokenMessage ??\n (await this.translation.translateAsync('@extensions-ai-voice-shell:interview.apply-failed')),\n );\n return;\n }\n if (result.next) {\n await this.handleNextPrompt(result.next);\n return;\n }\n await this.speakNextPrompt();\n } catch (err) {\n await this.setError(\n '@extensions-ai-voice-shell:errors.apply-failed',\n err instanceof Error ? err.message : undefined,\n );\n }\n }\n\n private async enterSubmitConfirm(spoken?: string): Promise<void> {\n this.mode.set('confirm');\n this.pendingSpokenConfirm = { kind: 'submit' };\n const prompt =\n spoken?.trim() ||\n (await this.translation.translateAsync('@extensions-ai-voice-shell:interview.submit-confirm'));\n this.confirmRequest.set({\n prompt,\n confirmLabelKey: '@extensions-ai-voice-shell:actions.submit',\n cancelLabelKey: '@extensions-ai-voice-shell:actions.keep-editing',\n });\n await this.speak(prompt);\n }\n\n private async handleConfirmUtterance(text: string): Promise<void> {\n const normalized = text.trim().toLowerCase();\n const yes = /^(yes|y|ok|okay|sure|submit|confirm|بله|آره|باشه|تایید)$/i.test(normalized);\n const no = /^(no|n|cancel|stop|نه|خیر|لغو)$/i.test(normalized);\n if (yes) {\n await this.confirmYes();\n return;\n }\n if (no) {\n await this.confirmNo();\n return;\n }\n await this.speak(await this.translation.translateAsync('@extensions-ai-voice-shell:interview.confirm-repeat'));\n }\n\n private async submitInterview(): Promise<void> {\n if (!this.activeCapability?.submit || !this.activeSessionId) {\n return;\n }\n this.uiState.set('thinking');\n try {\n const result = await this.activeCapability.submit(this.activeSessionId);\n this.pendingSpokenConfirm = null;\n this.confirmRequest.set(null);\n if (!result.ok) {\n const spoken =\n result.spokenMessage ||\n (await this.translation.translateAsync('@extensions-ai-voice-shell:interview.submit-failed'));\n await this.speak(spoken);\n this.mode.set('interview');\n return;\n }\n const spoken =\n result.spokenMessage ||\n (await this.translation.translateAsync('@extensions-ai-voice-shell:interview.submitted'));\n await this.speak(spoken);\n this.resetSession();\n } catch (err) {\n await this.setError(\n '@extensions-ai-voice-shell:errors.submit-failed',\n err instanceof Error ? err.message : undefined,\n );\n }\n }\n\n private async runCommandAssist(text: string): Promise<void> {\n try {\n const { text: reply } = await this.transport.runAssist(text, {\n voiceShell: true,\n mode: 'command',\n });\n const spoken =\n reply.trim() || (await this.translation.translateAsync('@extensions-ai-voice-shell:command.empty-reply'));\n await this.speak(spoken);\n } catch (err) {\n await this.setError(\n '@extensions-ai-voice-shell:errors.assist-failed',\n err instanceof Error ? err.message : undefined,\n );\n }\n }\n\n private async speak(text: string): Promise<void> {\n const trimmed = text.trim();\n if (!trimmed) {\n this.uiState.set('idle');\n return;\n }\n this.lastSpoken.set(trimmed);\n this.appendTurn('assistant', trimmed);\n this.uiState.set('speaking');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.speaking'));\n this.stopPlayback();\n try {\n const tts = await this.transport.synthesize(trimmed);\n if (tts.objectUrl) {\n this.currentObjectUrl = tts.objectUrl;\n const played = await this.playObjectUrl(tts.objectUrl);\n if (played) {\n await this.finishSpeaking();\n return;\n }\n }\n } catch {\n // Fall through to browser speech when server TTS is unavailable.\n }\n await speakWithBrowserSpeechSynthesis(trimmed);\n await this.finishSpeaking();\n }\n\n private async finishSpeaking(): Promise<void> {\n if (this.mode() === 'confirm') {\n this.uiState.set('confirm');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.confirm'));\n return;\n }\n this.uiState.set('idle');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.idle'));\n }\n\n private playObjectUrl(url: string): Promise<boolean> {\n return new Promise((resolve) => {\n const audio = new Audio(url);\n this.currentAudio = audio;\n const finish = (ok: boolean): void => {\n audio.removeEventListener('ended', onEnded);\n audio.removeEventListener('error', onError);\n resolve(ok);\n };\n const onEnded = (): void => finish(true);\n const onError = (): void => finish(false);\n audio.addEventListener('ended', onEnded);\n audio.addEventListener('error', onError);\n void audio.play().catch(() => finish(false));\n });\n }\n\n private async setError(key: string, detail?: string): Promise<void> {\n const messageKey = detail?.startsWith('@') ? detail : key;\n this.errorMessage.set(await this.translation.translateAsync(messageKey));\n this.uiState.set('error');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.error'));\n }\n\n private appendTurn(role: 'user' | 'assistant', text: string): void {\n this.turns.update((current) => [...current, { role, text }]);\n }\n\n private resetSession(): void {\n this.activeCapability = null;\n this.activeSessionId = null;\n this.pendingSpokenConfirm = null;\n this.confirmRequest.set(null);\n this.interviewProgress.set(null);\n this.mode.set('command');\n this.uiState.set('idle');\n this.statusText.set('');\n this.lastTranscript.set('');\n this.lastSpoken.set('');\n this.errorMessage.set('');\n }\n\n //#endregion\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport type { AXPVoiceShellOpenOptions } from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { inject, Injectable } from '@angular/core';\nimport { AXPVoiceCommandShellService } from '../voice-command-shell.service';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport interface AXEAiVoiceShellOpenCommandInput {\n initialText?: string;\n capabilityId?: string;\n caseId?: string;\n sessionId?: string;\n}\n\n//#endregion\n\n//#region ----- Command -----\n\n@Injectable()\nexport class AXEAiVoiceShellOpenCommand implements AXPCommand<AXEAiVoiceShellOpenCommandInput, void> {\n //#region ----- Services & Dependencies -----\n\n private readonly shell = inject(AXPVoiceCommandShellService);\n\n //#endregion\n\n //#region ----- Command execution -----\n\n async execute(input: AXEAiVoiceShellOpenCommandInput): AXPCommandExecuteResultPromise<void> {\n const startInput =\n input?.caseId || input?.sessionId\n ? { caseId: input.caseId, sessionId: input.sessionId }\n : input?.initialText\n ? { text: input.initialText }\n : undefined;\n const options: AXPVoiceShellOpenOptions = {\n initialText: input?.initialText,\n capabilityId: input?.capabilityId,\n startInput,\n };\n await this.shell.open(options);\n return { success: true, kind: 'object', data: undefined };\n }\n\n //#endregion\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule, isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n PLATFORM_ID,\n ViewEncapsulation,\n computed,\n inject,\n} from '@angular/core';\nimport {\n cancelBrowserSpeechSynthesis,\n primeBrowserSpeechSynthesis,\n} from '../browser-speech-synthesis.util';\nimport { AXPVoiceCommandShellService } from '../voice-command-shell.service';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axe-ai-voice-void-dialog',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXTranslationModule],\n templateUrl: './voice-void-dialog.component.html',\n styleUrl: './voice-void-dialog.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXEAiVoiceVoidDialogComponent extends AXBasePageComponent {\n //#region ----- Services & Dependencies -----\n\n readonly shell = inject(AXPVoiceCommandShellService);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly destroyRef = inject(DestroyRef);\n\n //#endregion\n\n //#region ----- State -----\n\n private mediaRecorder?: MediaRecorder;\n private audioChunks: Blob[] = [];\n private activeStream?: MediaStream;\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n readonly orbClass = computed(() => `voice-void-orb voice-void-orb--${this.shell.uiState()}`);\n readonly orbWrapClass = computed(() => `voice-void-orb-wrap voice-void-orb-wrap--${this.shell.uiState()}`);\n readonly canListen = computed(() => {\n const state = this.shell.uiState();\n return state === 'idle' || state === 'error' || state === 'confirm';\n });\n readonly isListening = computed(() => this.shell.uiState() === 'listening');\n readonly isSpeaking = computed(() => this.shell.uiState() === 'speaking');\n readonly showConfirm = computed(() => this.shell.uiState() === 'confirm' && this.shell.confirmRequest() != null);\n readonly progressLabel = computed(() => {\n const progress = this.shell.interviewProgress();\n if (!progress || progress.totalVisible <= 0) {\n return '';\n }\n return `${progress.answered}/${progress.totalVisible}`;\n });\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n this.destroyRef.onDestroy(() => {\n this.stopTracks();\n cancelBrowserSpeechSynthesis();\n });\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n async onMicClick(): Promise<void> {\n if (isPlatformBrowser(this.platformId)) {\n primeBrowserSpeechSynthesis();\n }\n if (this.isListening()) {\n await this.stopAndSubmit();\n return;\n }\n if (!this.canListen()) {\n return;\n }\n await this.startRecording();\n }\n\n async onCancelListen(): Promise<void> {\n this.stopTracks();\n this.audioChunks = [];\n await this.shell.cancelListening();\n }\n\n async onConfirmYes(): Promise<void> {\n await this.shell.confirmYes();\n }\n\n async onConfirmNo(): Promise<void> {\n await this.shell.confirmNo();\n }\n\n async onSaveDraft(): Promise<void> {\n await this.shell.saveInterviewDraft();\n }\n\n async onCancelInterview(): Promise<void> {\n await this.shell.cancelInterview();\n }\n\n //#endregion\n\n //#region ----- Recording -----\n\n private async startRecording(): Promise<void> {\n if (!isPlatformBrowser(this.platformId) || !navigator.mediaDevices?.getUserMedia) {\n await this.shell.reportError('@extensions-ai-voice-shell:errors.mic-unavailable');\n return;\n }\n try {\n const stream = await navigator.mediaDevices.getUserMedia({ audio: true });\n this.activeStream = stream;\n this.audioChunks = [];\n const recorder = new MediaRecorder(stream);\n this.mediaRecorder = recorder;\n recorder.ondataavailable = (event) => {\n if (event.data.size > 0) {\n this.audioChunks.push(event.data);\n }\n };\n recorder.start(250);\n await this.shell.enterListening();\n } catch {\n this.stopTracks();\n await this.shell.reportError('@extensions-ai-voice-shell:errors.mic-denied');\n }\n }\n\n private async stopAndSubmit(): Promise<void> {\n const recorder = this.mediaRecorder;\n if (!recorder || recorder.state !== 'recording') {\n this.stopTracks();\n await this.shell.cancelListening();\n return;\n }\n const blob = await new Promise<Blob | null>((resolve) => {\n recorder.onstop = () => {\n const mime = recorder.mimeType?.trim() || this.audioChunks[0]?.type?.trim() || 'audio/webm';\n const audioBlob = new Blob(this.audioChunks, { type: mime });\n resolve(audioBlob.size > 0 ? audioBlob : null);\n };\n recorder.requestData();\n recorder.stop();\n });\n this.stopTracks();\n if (!blob) {\n await this.shell.cancelListening();\n return;\n }\n await this.shell.submitRecording(blob);\n }\n\n private stopTracks(): void {\n if (this.mediaRecorder?.state === 'recording') {\n this.mediaRecorder.stop();\n }\n this.mediaRecorder = undefined;\n this.activeStream?.getTracks().forEach((track) => track.stop());\n this.activeStream = undefined;\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"voice-void\">\n <div class=\"voice-void-stage\">\n <!-- ----- Listening / thinking / speaking orb ----- -->\n <div [class]=\"orbWrapClass()\">\n <span class=\"voice-void-ring voice-void-ring--1\" aria-hidden=\"true\"></span>\n <span class=\"voice-void-ring voice-void-ring--2\" aria-hidden=\"true\"></span>\n <span class=\"voice-void-ring voice-void-ring--3\" aria-hidden=\"true\"></span>\n <button\n type=\"button\"\n [class]=\"orbClass()\"\n (click)=\"onMicClick()\"\n [disabled]=\"!canListen() && !isListening()\"\n [attr.aria-label]=\"'@extensions-ai-voice-shell:actions.tap-to-talk' | translate | async\"\n >\n @if (isSpeaking()) {\n <!-- ----- AI is speaking ----- -->\n <i class=\"fa-regular fa-volume-high\"></i>\n }\n <!-- ----- Tap-to-talk / user speaking ----- -->\n @else {\n <i class=\"fa-regular fa-microphone\"></i>\n }\n </button>\n @if (isListening() || isSpeaking()) {\n <!-- ----- Waveform bars: user listen vs AI speak ----- -->\n <span class=\"voice-void-eq\" aria-hidden=\"true\">\n <span></span>\n <span></span>\n <span></span>\n <span></span>\n <span></span>\n </span>\n }\n </div>\n\n <p class=\"voice-void-status\">{{ shell.statusText() }}</p>\n\n @if (progressLabel()) {\n <!-- ----- Interview progress counter ----- -->\n <p class=\"voice-void-progress\">{{ progressLabel() }}</p>\n }\n\n @if (shell.lastSpoken()) {\n <!-- ----- Last spoken assistant text ----- -->\n <p class=\"voice-void-spoken\">{{ shell.lastSpoken() }}</p>\n }\n\n @if (shell.lastTranscript()) {\n <!-- ----- Last user transcript ----- -->\n <p class=\"voice-void-transcript\">{{ shell.lastTranscript() }}</p>\n }\n\n @if (shell.errorMessage()) {\n <!-- ----- Spoken / visible error ----- -->\n <p class=\"voice-void-error\">{{ shell.errorMessage() }}</p>\n }\n </div>\n\n @if (showConfirm()) {\n <!-- ----- Confirm chips for submit / destructive actions ----- -->\n <div class=\"voice-void-confirm\">\n <p class=\"voice-void-confirm-prompt\">{{ shell.confirmRequest()?.prompt }}</p>\n <div class=\"voice-void-confirm-actions\">\n <ax-button\n [text]=\"'@extensions-ai-voice-shell:actions.submit' | translate | async\"\n color=\"primary\"\n (onClick)=\"onConfirmYes()\"\n ></ax-button>\n <ax-button\n [text]=\"'@extensions-ai-voice-shell:actions.keep-editing' | translate | async\"\n [look]=\"'ghost'\"\n (onClick)=\"onConfirmNo()\"\n ></ax-button>\n </div>\n </div>\n }\n\n <!-- ----- Secondary interview / listen actions ----- -->\n <div class=\"voice-void-toolbar\">\n @if (isListening()) {\n <!-- ----- Stop listening without sending ----- -->\n <ax-button\n [text]=\"'@extensions-ai-voice-shell:actions.cancel-listen' | translate | async\"\n [look]=\"'ghost'\"\n (onClick)=\"onCancelListen()\"\n ></ax-button>\n }\n <!-- ----- Interview session actions ----- -->\n @if (shell.mode() === 'interview') {\n <!-- ----- Draft save and cancel while filling by voice ----- -->\n <ax-button\n [text]=\"'@extensions-ai-voice-shell:actions.save-draft' | translate | async\"\n [look]=\"'outline'\"\n (onClick)=\"onSaveDraft()\"\n ></ax-button>\n <ax-button\n [text]=\"'@extensions-ai-voice-shell:actions.cancel-interview' | translate | async\"\n [look]=\"'ghost'\"\n (onClick)=\"onCancelInterview()\"\n ></ax-button>\n }\n </div>\n\n <p class=\"voice-void-hint\">{{ '@extensions-ai-voice-shell:dialog.hint' | translate | async }}</p>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAaA;AAEA;AAEA;AACO,MAAM,2BAA2B,GAAG;AAE3C;AAEA;AAEA;;AAEG;MASU,kCAAkC,CAAA;;;AAkB7C,IAAA,WAAA,GAAA;;AAfiB,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC5C,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,2BAA2B,CAAC;AACtD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC7B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,qBAAqB,CAAC;;;QAM1C,IAAA,CAAA,eAAe,GAAG,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,2BAA2B,CAAC,CAAC;AAOzG,QAAA,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC;YAC7B,KAAK,EAAE,IAAI,CAAC,UAAU;AACtB,YAAA,EAAE,EAAE,gBAAgB;YACpB,QAAQ,EAAE,2BAA2B,CAAC,MAAM;AAC5C,YAAA,KAAK,EAAE,2CAA2C;AAClD,YAAA,SAAS,EAAE;AACT,gBAAA;oBACE,IAAI,EAAE,CAAC,2BAA2B,CAAC;AACnC,oBAAA,KAAK,EAAE,wDAAwD;AAC/D,oBAAA,qBAAqB,EAAE,IAAI;oBAC3B,OAAO,EAAE,MAAK;AACZ,wBAAA,KAAK,IAAI,CAAC,gBAAgB,EAAE;oBAC9B,CAAC;AACF,iBAAA;AACF,aAAA;AACF,SAAA,CAAC;IACJ;;;AAMU,IAAA,MAAM,gBAAgB,GAAA;QAC9B,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,+BAA+B,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,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAKnE,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBARzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,mBACnB,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,mBAAmB,CAAC,EAAA,aAAA,EAGhE,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,sxHAAA,EAAA,MAAA,EAAA,CAAA,k/KAAA,CAAA,EAAA;;;;;;;;AEhCvC;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acorex-platform/extension-ai-voice-shell-client",
3
- "version": "0.0.30",
3
+ "version": "0.0.32",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0 || ^22.0.0",
@@ -5,6 +5,8 @@ import * as i2 from '@acorex-platform/framework-client/core';
5
5
  import { AXPVoiceCapabilityProvider, AXPVoiceCapabilityIntent, AXPVoiceShellUiState, AXPVoiceShellMode, AXPVoiceShellConfirmRequest, AXPVoiceShellTranscriptTurn, AXPVoiceShellOpenOptions, AXPVoiceInteractionTransport, AXPVoiceSttResult, AXPVoiceTtsResult } from '@acorex-platform/extension-ai-voice-shell-client/contracts';
6
6
  import { AXPCommand, AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';
7
7
  import { AXBasePageComponent } from '@acorex/components/page';
8
+ import * as _ngrx_signals from '@ngrx/signals';
9
+ import * as _acorex_platform_framework_client_themes_shared from '@acorex-platform/framework-client/themes/shared';
8
10
 
9
11
  /**
10
12
  * Central voice AI command shell (void dialog + capability registry + HTTP/SSE transport).
@@ -165,6 +167,78 @@ declare class AXEAiVoiceShellHeaderSlotComponent {
165
167
  private readonly commandExecutor;
166
168
  private readonly shortcutRegistry;
167
169
  private readonly destroyRef;
170
+ protected readonly themeStore: {
171
+ currentMode: _angular_core.Signal<_acorex_platform_framework_client_themes_shared.AXPThemeMode>;
172
+ currentPalette: _angular_core.Signal<string>;
173
+ systemThemeMode: _angular_core.Signal<_acorex_platform_framework_client_themes_shared.AXPThemeMode>;
174
+ font: _ngrx_signals.DeepSignal<{
175
+ family: string;
176
+ size: string;
177
+ }>;
178
+ overlayLoading: _angular_core.Signal<boolean>;
179
+ navigationLoading: _angular_core.Signal<boolean>;
180
+ overlayLoadingTaskCount: _angular_core.Signal<number>;
181
+ navigationLoadingTaskCount: _angular_core.Signal<number>;
182
+ sideMenuState: _angular_core.Signal<_acorex_platform_framework_client_themes_shared.AXPSideMenuState>;
183
+ overlaySideMenuOpen: _angular_core.Signal<boolean>;
184
+ sideMenuWidth: _angular_core.Signal<number>;
185
+ sideMenuCompactWidth: _angular_core.Signal<number>;
186
+ menuVerticalMode: _angular_core.Signal<_acorex_platform_framework_client_themes_shared.AXPMenuVerticalMode>;
187
+ menuOrientation: _angular_core.Signal<_acorex_platform_framework_client_themes_shared.AXPMenuOrientation>;
188
+ menuAppearance: _angular_core.Signal<_acorex_platform_framework_client_themes_shared.AXPMenuAppearance>;
189
+ headerAppearance: _angular_core.Signal<_acorex_platform_framework_client_themes_shared.AXPHeaderAppearance>;
190
+ mainFooterFullWidth: _angular_core.Signal<boolean>;
191
+ isPrinting: _angular_core.Signal<boolean>;
192
+ isDarkMode: _angular_core.Signal<boolean>;
193
+ isLightMode: _angular_core.Signal<boolean>;
194
+ isSystemMode: _angular_core.Signal<boolean>;
195
+ isSideMenuOpen: _angular_core.Signal<boolean>;
196
+ isOverlayLoading: _angular_core.Signal<boolean>;
197
+ overlayTaskCount: _angular_core.Signal<number>;
198
+ isNavigationLoading: _angular_core.Signal<boolean>;
199
+ isMenuHorizontal: _angular_core.Signal<boolean>;
200
+ effectiveMenuVerticalMode: _angular_core.Signal<_acorex_platform_framework_client_themes_shared.AXPMenuVerticalMode>;
201
+ sideMenuDrawerWidth: _angular_core.Signal<number>;
202
+ menuDarkEnabled: _angular_core.Signal<boolean>;
203
+ menuBrandEnabled: _angular_core.Signal<boolean>;
204
+ effectiveMainFooterFullWidth: _angular_core.Signal<boolean>;
205
+ headerBrandEnabled: _angular_core.Signal<boolean>;
206
+ headerButtonColor: _angular_core.Signal<"default" | "primary">;
207
+ headerButtonLook: _angular_core.Signal<"default" | "blank">;
208
+ changeThemeMode: (theme: _acorex_platform_framework_client_themes_shared.AXPThemeMode) => void;
209
+ openSideMenu: () => void;
210
+ closeSideMenu: () => void;
211
+ setSideMenuWidth: (width: number) => void;
212
+ setSideMenuCompactWidth: (width: number) => void;
213
+ setSideMenuDrawerWidth: (width: number) => void;
214
+ toggleSideMenu: () => void;
215
+ setNavigationLoading: (value: boolean, delay?: number) => void;
216
+ setOverlayLoading: (value: boolean, delay?: number) => void;
217
+ clearOverlayLoading: () => void;
218
+ loadSettings: () => Promise<void>;
219
+ } & _ngrx_signals.StateSource<{
220
+ currentMode: _acorex_platform_framework_client_themes_shared.AXPThemeMode;
221
+ currentPalette: string;
222
+ systemThemeMode: _acorex_platform_framework_client_themes_shared.AXPThemeMode;
223
+ font: {
224
+ family: string;
225
+ size: string;
226
+ };
227
+ overlayLoading: boolean;
228
+ navigationLoading: boolean;
229
+ overlayLoadingTaskCount: number;
230
+ navigationLoadingTaskCount: number;
231
+ sideMenuState: _acorex_platform_framework_client_themes_shared.AXPSideMenuState;
232
+ overlaySideMenuOpen: boolean;
233
+ sideMenuWidth: number;
234
+ sideMenuCompactWidth: number;
235
+ menuVerticalMode: _acorex_platform_framework_client_themes_shared.AXPMenuVerticalMode;
236
+ menuOrientation: _acorex_platform_framework_client_themes_shared.AXPMenuOrientation;
237
+ menuAppearance: _acorex_platform_framework_client_themes_shared.AXPMenuAppearance;
238
+ headerAppearance: _acorex_platform_framework_client_themes_shared.AXPHeaderAppearance;
239
+ mainFooterFullWidth: boolean;
240
+ isPrinting: boolean;
241
+ }>;
168
242
  protected readonly shortcutDisplay: string;
169
243
  constructor();
170
244
  protected openVoiceCommand(): Promise<void>;