@kortix/ui 0.16.3 → 0.16.5

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.
Files changed (156) hide show
  1. package/dist/_vendor/kortix-shared.js +1 -4
  2. package/dist/customize/sections/view/review-center-connected.js +64 -71
  3. package/dist/customize/sections/view/secret-delivery.d.ts +11 -20
  4. package/dist/customize/sections/view/secret-delivery.js +20 -29
  5. package/dist/customize/sections/view/secrets-view.js +9 -24
  6. package/dist/customize/settings/rail-copy-context.d.ts +2 -0
  7. package/dist/customize/settings/rail-copy-context.js +2 -0
  8. package/dist/customize/settings/tabs/chrome-connections-tab.js +1 -1
  9. package/dist/files/renderers/show-content-renderer.js +3 -1
  10. package/dist/i18n/en.d.ts +130 -22
  11. package/dist/i18n/en.js +142 -34
  12. package/dist/i18n/ui-catalog/product-catalog-translation-keys.generated.js +2 -0
  13. package/dist/internal/auth/auth-card-shell.d.ts +24 -3
  14. package/dist/internal/auth/auth-card-shell.js +15 -8
  15. package/dist/internal/auth/auth-primitives.d.ts +15 -2
  16. package/dist/internal/auth/auth-primitives.js +22 -5
  17. package/dist/internal/chrome/chrome-connect.d.ts +3 -5
  18. package/dist/internal/chrome/chrome-connect.js +7 -10
  19. package/dist/internal/chrome/extension.d.ts +1 -8
  20. package/dist/internal/chrome/extension.js +1 -8
  21. package/dist/internal/chrome/use-chrome-offered.d.ts +6 -12
  22. package/dist/internal/chrome/use-chrome-offered.js +13 -15
  23. package/dist/internal/components/agent-mark.d.ts +2 -1
  24. package/dist/internal/components/agent-mark.js +14 -3
  25. package/dist/internal/hooks/use-review-session-summary.d.ts +1 -1
  26. package/dist/internal/hooks/use-review-session-summary.js +1 -1
  27. package/dist/internal/layout/project-nav-row.d.ts +3 -1
  28. package/dist/internal/layout/project-nav-row.js +2 -2
  29. package/dist/internal/layout/project-page-header.js +5 -4
  30. package/dist/internal/stores/user-preferences-store.d.ts +17 -0
  31. package/dist/internal/stores/user-preferences-store.js +5 -0
  32. package/dist/markdown/setup-links/secret-intake-form.d.ts +4 -1
  33. package/dist/markdown/setup-links/secret-intake-form.js +60 -16
  34. package/dist/markdown/setup-links/setup-link-button.js +6 -1
  35. package/dist/primitives/color-picker.d.ts +19 -0
  36. package/dist/primitives/color-picker.js +27 -0
  37. package/dist/primitives/faded-scroll-area.js +4 -0
  38. package/dist/primitives/glyph-picker.d.ts +11 -0
  39. package/dist/primitives/glyph-picker.js +10 -6
  40. package/dist/primitives/gradient-wallpaper-gl.d.ts +61 -0
  41. package/dist/primitives/gradient-wallpaper-gl.js +446 -0
  42. package/dist/primitives/gradient-wallpaper.d.ts +20 -0
  43. package/dist/primitives/gradient-wallpaper.js +242 -0
  44. package/dist/primitives/resizable.d.ts +1 -1
  45. package/dist/session/agents/agent-hover-card.d.ts +26 -0
  46. package/dist/session/agents/agent-hover-card.js +70 -0
  47. package/dist/session/agents/agent-strip.js +33 -7
  48. package/dist/session/agents/agent-surface.d.ts +26 -1
  49. package/dist/session/agents/agent-surface.js +57 -6
  50. package/dist/session/agents/held-messages.js +2 -2
  51. package/dist/session/agents/subagent-dialog-content.js +2 -2
  52. package/dist/session/composer/ComposerCard.js +4 -4
  53. package/dist/session/composer/composer-toolbar.d.ts +8 -1
  54. package/dist/session/composer/composer-toolbar.js +2 -2
  55. package/dist/session/composer/dictation/dictation-control.d.ts +10 -0
  56. package/dist/session/composer/dictation/dictation-control.js +28 -0
  57. package/dist/session/composer/dictation/dictation-state.d.ts +26 -0
  58. package/dist/session/composer/dictation/dictation-state.js +71 -0
  59. package/dist/session/composer/dictation/recorder.d.ts +30 -0
  60. package/dist/session/composer/dictation/recorder.js +129 -0
  61. package/dist/session/composer/dictation/use-composer-dictation.d.ts +25 -0
  62. package/dist/session/composer/dictation/use-composer-dictation.js +218 -0
  63. package/dist/session/composer/queued-prompt-list.js +5 -1
  64. package/dist/session/panel/easy/apps-card.js +3 -10
  65. package/dist/session/panel/easy/background-tasks-card.d.ts +23 -0
  66. package/dist/session/panel/easy/background-tasks-card.js +119 -0
  67. package/dist/session/panel/easy/change-requests-card.js +1 -1
  68. package/dist/session/panel/easy/changes-card.js +4 -6
  69. package/dist/session/panel/easy/context-card.js +8 -9
  70. package/dist/session/panel/easy/context-meter.d.ts +2 -0
  71. package/dist/session/panel/easy/context-meter.js +18 -4
  72. package/dist/session/panel/easy/detail-view.js +7 -4
  73. package/dist/session/panel/easy/easy-panel-logic.d.ts +4 -15
  74. package/dist/session/panel/easy/easy-panel-logic.js +4 -17
  75. package/dist/session/panel/easy/easy-panel.js +5 -4
  76. package/dist/session/panel/easy/outputs-card.d.ts +1 -13
  77. package/dist/session/panel/easy/outputs-card.js +14 -40
  78. package/dist/session/panel/easy/panel-card.d.ts +13 -40
  79. package/dist/session/panel/easy/panel-card.js +17 -55
  80. package/dist/session/panel/easy/plan-card.js +4 -7
  81. package/dist/session/panel/model-switch-event.d.ts +2 -2
  82. package/dist/session/panel/model-switch-event.js +13 -9
  83. package/dist/session/panel/session-panel-provider.d.ts +2 -1
  84. package/dist/session/panel/session-panel-provider.js +3 -3
  85. package/dist/session/panel/shared/collect-tool-parts.js +2 -2
  86. package/dist/session/panel/shared/derive-panels.js +14 -1
  87. package/dist/session/panel/shared/use-panel-handoffs.d.ts +0 -1
  88. package/dist/session/panel/shared/use-panel-handoffs.js +26 -17
  89. package/dist/session/thread/chat-minimap.js +7 -1
  90. package/dist/session/thread/session-body.js +1 -1
  91. package/dist/session/thread/session-chat.js +59 -15
  92. package/dist/session/tool/shared/infrastructure-contexts.d.ts +7 -0
  93. package/dist/session/tool/shared/infrastructure-contexts.js +9 -0
  94. package/dist/session/tool/shared/infrastructure-row-header.js +4 -1
  95. package/dist/session/tool/shared/infrastructure-rows.js +19 -19
  96. package/dist/session/tool/show-group-renderer.d.ts +5 -5
  97. package/dist/session/tool/show-group-renderer.js +7 -4
  98. package/dist/session/tool/tool-part-renderer.js +25 -9
  99. package/dist/session/tool/tool-renderers.d.ts +1 -1
  100. package/dist/session/tool/tool-renderers.js +1 -1
  101. package/dist/session/tool/tools/bash-tool.js +3 -2
  102. package/dist/session/tool/tools/codemode-tool.d.ts +15 -0
  103. package/dist/session/tool/tools/codemode-tool.js +54 -2
  104. package/dist/session/tool/tools/kortix-action-tool.d.ts +1 -0
  105. package/dist/session/tool/tools/kortix-action-tool.js +19 -8
  106. package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +8 -1
  107. package/dist/session/tool/tools/multi-agent-tool-bodies.js +76 -10
  108. package/dist/session/tool/tools/task-tool.js +17 -5
  109. package/dist/session/turn/peer-message-row.d.ts +3 -0
  110. package/dist/session/turn/peer-message-row.js +8 -2
  111. package/dist/session/turn/subagent-notice-row.js +5 -3
  112. package/dist/styles.css +1 -1
  113. package/dist/test-utils/intl.d.ts +130 -22
  114. package/dist/theme/index.d.ts +2 -1
  115. package/dist/theme/index.js +2 -1
  116. package/dist/theme/wallpaper-gradients.d.ts +106 -0
  117. package/dist/theme/wallpaper-gradients.js +347 -0
  118. package/dist/theme/wallpapers.d.ts +23 -3
  119. package/dist/theme/wallpapers.js +53 -29
  120. package/dist/workspace/admin/project-admin-dashboard.js +1 -1
  121. package/dist/workspace/layout/project-home.js +1 -1
  122. package/dist/workspace/new/use-create-workspace.d.ts +5 -3
  123. package/dist/workspace/new/use-create-workspace.js +1 -1
  124. package/dist/workspace/projects/modal/project-icon-field.d.ts +3 -1
  125. package/dist/workspace/projects/modal/project-icon-field.js +3 -3
  126. package/dist/workspace/review/review-center.d.ts +9 -1
  127. package/dist/workspace/review/review-center.js +107 -14
  128. package/dist/workspace/review/review-detail.d.ts +19 -0
  129. package/dist/workspace/review/review-detail.js +18 -3
  130. package/dist/workspace/review/review-swipe-deck.d.ts +27 -0
  131. package/dist/workspace/review/review-swipe-deck.js +304 -0
  132. package/dist/workspace/review/review-swipe.d.ts +17 -0
  133. package/dist/workspace/review/review-swipe.js +10 -0
  134. package/dist/workspace/session-spaces/space-picker.js +3 -3
  135. package/dist/workspace/setup/setup-banner-snooze.d.ts +10 -0
  136. package/dist/workspace/setup/setup-banner-snooze.js +44 -0
  137. package/dist/workspace/setup/setup-banner.js +19 -36
  138. package/dist/workspace/setup/setup-steps.d.ts +0 -5
  139. package/dist/workspace/setup/setup-steps.js +0 -7
  140. package/dist/workspace/setup/workspace-setup-modal.d.ts +39 -0
  141. package/dist/workspace/setup/workspace-setup-modal.js +202 -0
  142. package/dist/workspace/sidebar/footer/project-review-nav.d.ts +13 -0
  143. package/dist/workspace/sidebar/footer/project-review-nav.js +29 -0
  144. package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
  145. package/dist/workspace/sidebar/project-nav-items.js +24 -5
  146. package/dist/workspace/sidebar/project-session-list.js +2 -1
  147. package/dist/workspace/sidebar/project-sidebar.js +6 -5
  148. package/dist/workspace/sidebar/project-spaces-nav.js +3 -10
  149. package/dist/workspace/sidebar/sidebar-more-group.js +1 -1
  150. package/package.json +14 -10
  151. package/skills/kortix-ui/SKILL.md +1 -1
  152. package/skills/kortix-ui/references/modules.md +3 -1
  153. package/dist/primitives/toast-clearance.d.ts +0 -36
  154. package/dist/primitives/toast-clearance.js +0 -94
  155. package/dist/workspace/setup/workspace-setup-page.d.ts +0 -10
  156. package/dist/workspace/setup/workspace-setup-page.js +0 -91
@@ -22,7 +22,7 @@ import { useSessionIds } from '../../providers/session-ids.js';
22
22
  import { appendMentionRefs } from '../../internal/lib/project-preamble.js';
23
23
  import { SessionChatInput } from '../composer/session-chat-input.js';
24
24
  import { agentRowOf, isActive, shortElapsed } from './agent-model.js';
25
- import { AgentFace, AgentFailure } from './agent-surface.js';
25
+ import { AgentChip, AgentFailure } from './agent-surface.js';
26
26
  import { AgentStateMark } from './agent-state-mark.js';
27
27
  import { LegacySubagentChat } from './legacy-subagent-chat.js';
28
28
  import { SessionPeek } from './session-peek.js';
@@ -149,7 +149,7 @@ export function SubagentPanel({ sessionId, title, handle, projectId: projectIdPr
149
149
  // The chat row's state words ("Done", "Working"), so the row and its panel read the same.
150
150
  const stateText = sub.agent ? tAgent(`state.${sub.agent.state}`) : null;
151
151
  const elapsed = sub.agent?.state === 'working' && sub.agent.workingSinceMs !== null ? shortElapsed(now - sub.agent.workingSinceMs) : null;
152
- return (_jsxs("section", { "data-testid": "subagent-panel", "data-body": sub.kind, "aria-label": name, className: "flex h-full min-h-0 min-w-0 flex-col", children: [_jsxs("header", { className: cn(SESSION_BAR_CLASS, 'gap-2 px-3'), children: [leading, _jsxs(HoverCard, { openDelay: 300, closeDelay: 100, children: [_jsx(HoverCardTrigger, { asChild: true, children: _jsxs("div", { tabIndex: 0, className: "hover:bg-secondary focus-visible:ring-ring duration-fast -ml-1.5 flex h-8 min-w-0 cursor-default items-center gap-2 rounded-md px-1.5 transition-colors outline-none focus-visible:ring-2", children: [_jsx(AgentFace, { handle: face }), _jsx("h2", { "data-agent-state": sub.agent?.state, className: "text-foreground min-w-0 truncate text-sm font-semibold", children: name })] }) }), _jsxs(HoverCardContent, { side: "bottom", align: "start", sideOffset: 6, animated: false, className: "w-64 p-3", children: [_jsx("p", { className: "text-foreground truncate text-sm font-medium", children: name }), sub.agent ? (_jsxs("p", { className: "text-muted-foreground mt-1 flex items-center gap-1.5 text-xs tabular-nums", children: [_jsx(AgentStateMark, { state: sub.agent.state }), _jsx("span", { children: [stateText, elapsed].filter(Boolean).join(' · ') })] })) : null, task ? _jsx("p", { className: "text-muted-foreground border-border mt-2.5 line-clamp-3 border-t pt-2.5 text-xs text-pretty", children: task }) : null] })] }), _jsx("span", { className: "min-w-0 flex-1" }), _jsx(SubagentActions, { sub: sub, projectId: projectId, sessionId: sessionId, onLeave: onClose, children: _jsx(CloseAction, { onClose: onClose }) })] }), failure && (_jsx("div", { "data-testid": "subagent-panel-failure", className: "shrink-0 px-3 pb-2.5 text-sm", children: _jsx(AgentFailure, { sentence: tNotice('failedSentence'), raw: failure }) })), _jsx("div", { className: "flex min-h-0 flex-1 flex-col", children: _jsx(SubagentBody, { sub: sub, projectId: projectId, sessionId: sessionId, density: "compact" }) }), sub.kind === 'peek' && projectId && (_jsx(SubagentMessageBox, { projectId: projectId, sessionId: sessionId, name: name, onSent: sub.refreshRow, className: "px-3 pb-3", autoFocus: false }, sessionId))] }));
152
+ return (_jsxs("section", { "data-testid": "subagent-panel", "data-body": sub.kind, "aria-label": name, className: "flex h-full min-h-0 min-w-0 flex-col", children: [_jsxs("header", { className: cn(SESSION_BAR_CLASS, 'gap-2 px-3'), children: [leading, _jsxs(HoverCard, { openDelay: 300, closeDelay: 100, children: [_jsx(HoverCardTrigger, { asChild: true, children: _jsx("div", { tabIndex: 0, className: "hover:bg-secondary focus-visible:ring-ring duration-fast -ml-1.5 flex h-8 min-w-0 cursor-default items-center gap-2 rounded-md px-1.5 transition-colors outline-none focus-visible:ring-2", children: _jsx("h2", { "data-agent-state": sub.agent?.state, className: "flex min-w-0", children: _jsx(AgentChip, { handle: face, name: name, plain: true, className: "max-w-none" }) }) }) }), _jsxs(HoverCardContent, { side: "bottom", align: "start", sideOffset: 6, animated: false, className: "w-64 p-3", children: [_jsx("p", { className: "text-foreground truncate text-sm font-medium", children: name }), sub.agent ? (_jsxs("p", { className: "text-muted-foreground mt-1 flex items-center gap-1.5 text-xs tabular-nums", children: [_jsx(AgentStateMark, { state: sub.agent.state }), _jsx("span", { children: [stateText, elapsed].filter(Boolean).join(' · ') })] })) : null, task ? _jsx("p", { className: "text-muted-foreground border-border mt-2.5 line-clamp-3 border-t pt-2.5 text-xs text-pretty", children: task }) : null] })] }), _jsx("span", { className: "min-w-0 flex-1" }), _jsx(SubagentActions, { sub: sub, projectId: projectId, sessionId: sessionId, onLeave: onClose, children: _jsx(CloseAction, { onClose: onClose }) })] }), failure && (_jsx("div", { "data-testid": "subagent-panel-failure", className: "shrink-0 px-3 pb-2.5 text-sm", children: _jsx(AgentFailure, { sentence: tNotice('failedSentence'), raw: failure }) })), _jsx("div", { className: "flex min-h-0 flex-1 flex-col", children: _jsx(SubagentBody, { sub: sub, projectId: projectId, sessionId: sessionId, density: "compact" }) }), sub.kind === 'peek' && projectId && (_jsx(SubagentMessageBox, { projectId: projectId, sessionId: sessionId, name: name, onSent: sub.refreshRow, className: "px-3 pb-3", autoFocus: false }, sessionId))] }));
153
153
  }
154
154
  function SessionPeekRowError({ onRetry }) {
155
155
  const t = useTranslations('multiAgent.subagent');
@@ -3,13 +3,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { cn } from '../../lib/utils.js';
4
4
  import { WarningIcon } from '@phosphor-icons/react';
5
5
  import { lazy, Suspense, useContext, useEffect, useMemo, useRef, useState } from 'react';
6
- import { useToastClearance } from '../../primitives/toast-clearance.js';
7
6
  import { SpaceMentionContext } from './menus/space-mentions.js';
8
7
  import { useFeatureFlag } from '@kortix/sdk/react';
9
8
  import { ModelConnectionLayoutContext } from '../models/model-connection-layout.js';
10
9
  import { ImagesUnsupportedBar, ModelConnectionBar } from '../models/model-connection-gate.js';
11
10
  import { AnimatedComposerPlaceholder } from './animated-placeholder.js';
12
11
  import { AttachmentTiles } from './attachment-tiles.js';
12
+ import { DictationControl } from './dictation/dictation-control.js';
13
+ import { useComposerDictation } from './dictation/use-composer-dictation.js';
13
14
  import { EMPTY_AGENTS, EMPTY_COMMANDS, EMPTY_MODELS, EMPTY_SLASH_FILES, EMPTY_VARIANTS, } from './composer.js';
14
15
  import { shouldFocusEditorFromPadding } from './composer-logic.js';
15
16
  import { ComposerToolbar } from './composer-toolbar.js';
@@ -30,8 +31,6 @@ export function ComposerCard({ tHardcodedUi, isDragOver, handleDragEnter, handle
30
31
  agents = EMPTY_AGENTS, commands = EMPTY_COMMANDS, slashFiles = EMPTY_SLASH_FILES, models = EMPTY_MODELS, notice = null, disabled = false, lockForQuestion = false, lockForApproval = false, questionButtonLabel = null, questionActive = false, submitLabel = null, questionCanAct = true, escCount = 0, isBusy = false, isSending = false, onStop, stopDisabled = false, canStop = true, modelsLoading = false, modelRequired = false, onModelChange, modelDefaultControls, inheritedModel, providers, variants = EMPTY_VARIANTS, selectedVariant = null, onVariantChange, projectId, toolbarSlot, underbarSlot, rewind, selectedAgent = null, onAgentChange, noAccessibleAgents = false, agentLocked = false, onContextClick, messages, underbarPlacement = 'below', agentPickerCompact = false, slashMenuPlacement = 'above', cardClassName, call, inline = false, hideAgentPicker = false, }) {
31
32
  const connectionsAbove = useContext(ModelConnectionLayoutContext) === 'above';
32
33
  const cardRef = useRef(null);
33
- // A composer docked at the window bottom keeps toasts above its Send/Stop button.
34
- useToastClearance(cardRef, slashMenuPlacement === 'above');
35
34
  const { attachAccept, modelPickerEnabled } = useUiHostConfig();
36
35
  const inlineUnderbar = underbarPlacement === 'inline';
37
36
  // `inline`: one row while the text fits a line. Once it wraps, or anything is
@@ -70,6 +69,7 @@ agents = EMPTY_AGENTS, commands = EMPTY_COMMANDS, slashFiles = EMPTY_SLASH_FILES
70
69
  drawing itself (`ChatInputOverridesProvider`). Off, nothing here changes.
71
70
  */
72
71
  const chatInputEnabled = useFeatureFlag(projectId ?? null, 'chat_input').enabled;
72
+ const dictation = useComposerDictation({ projectId, editorRef });
73
73
  // Inside a space the `@` menu is its people and agents (`menus/space-mentions.ts`).
74
74
  const spaceMentions = useContext(SpaceMentionContext);
75
75
  const chatInputOpen = agentMenuOpen || modelMenuOpen || reasoningMenuOpen;
@@ -176,5 +176,5 @@ agents = EMPTY_AGENTS, commands = EMPTY_COMMANDS, slashFiles = EMPTY_SLASH_FILES
176
176
  toolbarSlot: inlineUnderbar ? toolbarSlot : undefined, rewind: rewind, isSending: isSending, isBusy: isBusy, onStop: onStop, stopDisabled: stopDisabled, canStop: canStop, escCount: escCount, lockForQuestion: lockForQuestion, questionButtonLabel: questionButtonLabel, submitLabel: submitLabel, questionCanAct: questionCanAct, hasText: !isEmpty, canSubmit: canSubmit, submitDisabled: submitDisabled ||
177
177
  attachmentFailed ||
178
178
  modelRejectingImages !== null ||
179
- commandAttachmentPlan.kind === 'refuse', attachmentFailed: attachmentFailed, attachmentUnsupported: imagesUnsupportedReason, disabled: disabled, modelUnavailable: modelUnavailable, agentUnavailable: agentUnavailable, call: call, onSubmit: () => handleSubmit() })] })] })] }), _jsx(ImagesUnsupportedBar, { modelName: noModelsConnected ? null : modelRejectingImages }), inlineUnderbar ? null : (_jsx(ComposerUnderbar, { hideAgentPicker: hideAgentPicker, onAttachClick: handleAttachClick, agents: primaryAgents, selectedAgent: selectedAgent, onAgentChange: onAgentChange, agentMenuOpen: agentMenuOpen, onAgentMenuOpenChange: setAgentMenuOpen, noAccessibleAgents: noAccessibleAgents, agentLocked: agentLocked, messages: messages, models: models, selectedModel: availableSelectedModel, onContextClick: onContextClick, toolbarSlot: toolbarSlot, agentsSlot: underbarSlot, chatInput: chatInput })), connectionsAbove ? null : _jsx(ModelConnectionBar, { show: noModelsConnected }), slashMenuPlacement === 'below' && (_jsx("div", { id: dockId, className: "absolute top-full right-4 left-4 z-99 mt-3.5" }))] }));
179
+ commandAttachmentPlan.kind === 'refuse', attachmentFailed: attachmentFailed, attachmentUnsupported: imagesUnsupportedReason, disabled: disabled, modelUnavailable: modelUnavailable, agentUnavailable: agentUnavailable, call: call, dictation: dictation ? _jsx(DictationControl, { dictation: dictation, disabled: disabled }) : undefined, dictationActive: !!dictation && dictation.phase !== 'idle' && dictation.phase !== 'starting', onSubmit: () => handleSubmit() })] })] })] }), _jsx(ImagesUnsupportedBar, { modelName: noModelsConnected ? null : modelRejectingImages }), inlineUnderbar ? null : (_jsx(ComposerUnderbar, { hideAgentPicker: hideAgentPicker, onAttachClick: handleAttachClick, agents: primaryAgents, selectedAgent: selectedAgent, onAgentChange: onAgentChange, agentMenuOpen: agentMenuOpen, onAgentMenuOpenChange: setAgentMenuOpen, noAccessibleAgents: noAccessibleAgents, agentLocked: agentLocked, messages: messages, models: models, selectedModel: availableSelectedModel, onContextClick: onContextClick, toolbarSlot: toolbarSlot, agentsSlot: underbarSlot, chatInput: chatInput })), connectionsAbove ? null : _jsx(ModelConnectionBar, { show: noModelsConnected }), slashMenuPlacement === 'below' && (_jsx("div", { id: dockId, className: "absolute top-full right-4 left-4 z-99 mt-3.5" }))] }));
180
180
  }
@@ -123,6 +123,13 @@ export interface ComposerToolbarProps {
123
123
  attachmentUnsupported?: string | null;
124
124
  /** The host's voice call, offered in Send's place on an empty composer. See `SendStopControl`. */
125
125
  call?: ComposerCall;
126
+ /** The microphone (`DictationControl`), drawn right before Send. */
127
+ dictation?: React.ReactNode;
128
+ /**
129
+ * A dictation take is running: its Done button is the primary action, so
130
+ * Send steps aside. Stop stays while a turn runs.
131
+ */
132
+ dictationActive?: boolean;
126
133
  onSubmit: () => void;
127
134
  }
128
- export declare function ComposerToolbar({ collapsed, models, modelsLoading, selectedModel, onModelChange, modelDefaultControls, providers, modelRequired, modelMenuOpen, onModelMenuOpenChange, reasoningMenuOpen, onReasoningMenuOpenChange, variants, selectedVariant, onVariantChange, projectId, toolbarSlot, rewind, leading, pickersInChatInput, noModel, isSending, isBusy, onStop, stopDisabled, canStop, escCount, lockForQuestion, questionButtonLabel, submitLabel, questionCanAct, hasText, canSubmit, submitDisabled, disabled, modelUnavailable, agentUnavailable, attachmentFailed, attachmentUnsupported, call, onSubmit, }: ComposerToolbarProps): import("react").JSX.Element;
135
+ export declare function ComposerToolbar({ collapsed, models, modelsLoading, selectedModel, onModelChange, modelDefaultControls, providers, modelRequired, modelMenuOpen, onModelMenuOpenChange, reasoningMenuOpen, onReasoningMenuOpenChange, variants, selectedVariant, onVariantChange, projectId, toolbarSlot, rewind, leading, pickersInChatInput, noModel, isSending, isBusy, onStop, stopDisabled, canStop, escCount, lockForQuestion, questionButtonLabel, submitLabel, questionCanAct, hasText, canSubmit, submitDisabled, disabled, modelUnavailable, agentUnavailable, attachmentFailed, attachmentUnsupported, call, dictation, dictationActive, onSubmit, }: ComposerToolbarProps): import("react").JSX.Element;
@@ -10,7 +10,7 @@ import Loading from '../../primitives/loading.js';
10
10
  import { ModelSelector } from '../models/model-selector.js';
11
11
  import { ReasoningEffortSelector } from './reasoning-effort-selector.js';
12
12
  import { SendStopControl } from './send-stop-control.js';
13
- export function ComposerToolbar({ collapsed = false, models, modelsLoading, selectedModel, onModelChange, modelDefaultControls, providers, modelRequired, modelMenuOpen, onModelMenuOpenChange, reasoningMenuOpen, onReasoningMenuOpenChange, variants, selectedVariant, onVariantChange, projectId, toolbarSlot, rewind, leading, pickersInChatInput = false, noModel = false, isSending, isBusy, onStop, stopDisabled, canStop, escCount, lockForQuestion, questionButtonLabel, submitLabel, questionCanAct, hasText, canSubmit, submitDisabled, disabled, modelUnavailable, agentUnavailable = false, attachmentFailed = false, attachmentUnsupported = null, call, onSubmit, }) {
13
+ export function ComposerToolbar({ collapsed = false, models, modelsLoading, selectedModel, onModelChange, modelDefaultControls, providers, modelRequired, modelMenuOpen, onModelMenuOpenChange, reasoningMenuOpen, onReasoningMenuOpenChange, variants, selectedVariant, onVariantChange, projectId, toolbarSlot, rewind, leading, pickersInChatInput = false, noModel = false, isSending, isBusy, onStop, stopDisabled, canStop, escCount, lockForQuestion, questionButtonLabel, submitLabel, questionCanAct, hasText, canSubmit, submitDisabled, disabled, modelUnavailable, agentUnavailable = false, attachmentFailed = false, attachmentUnsupported = null, call, dictation, dictationActive = false, onSubmit, }) {
14
14
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
15
15
  const { modelPickerEnabled } = useUiHostConfig();
16
16
  const showModel = !noModel && !pickersInChatInput && modelPickerEnabled && (models.length > 0 || modelRequired) && !!onModelChange;
@@ -28,5 +28,5 @@ export function ComposerToolbar({ collapsed = false, models, modelsLoading, sele
28
28
  // become the row's first and last columns, either side of the editor.
29
29
  _jsxs("div", { className: cn('kortix-composer-toolbar overflow-visible', collapsed ? 'contents' : 'flex items-center justify-between gap-1'), children: [_jsxs("div", { className: cn('flex min-w-0 items-center gap-1 overflow-visible', collapsed && 'col-start-1 row-start-1'), children: [leading, showModel && (_jsx(ModelSelector, { models: models, modelsLoading: modelsLoading, selectedModel: selectedModel, onSelect: onModelChange, providers: providers, defaultControls: modelDefaultControls, triggerLabelClassName: "max-w-[7rem]", projectId: projectId, offerProviderAccounts: true, open: pickerOpen, onOpenChange: onPickerOpenChange, reasoning: { variants, selectedVariant, onVariantChange } })), !showModel && !noModel && modelPickerEnabled && !pickersInChatInput && _jsx(ReasoningEffortSelector, { variants: variants, selectedVariant: selectedVariant, onVariantChange: onVariantChange, open: reasoningMenuOpen, onOpenChange: onReasoningMenuOpenChange })] }), _jsxs("div", { className: cn('flex shrink-0 items-center gap-1.5', collapsed && 'col-start-3 row-start-1'), children: [rewind && (_jsxs(HoverCard, { openDelay: 0, closeDelay: 0, children: [_jsx(HoverCardTrigger, { asChild: true, children: _jsx("span", { className: "inline-flex", children: _jsxs(Button, { type: "button", variant: "ghost", size: "sm", disabled: rewind.pending || rewind.disabled, onClick: rewind.onRestore, className: "text-muted-foreground hover:text-foreground gap-1.5", children: [rewind.pending ? (_jsx(Loading, { className: "size-3.5 shrink-0" })) : (_jsx(ArrowCounterClockwiseIcon, { className: "size-3.5 shrink-0" })), tI18nComplete.raw('texta76e13b98392')] }) }) }), _jsx(HoverCardContent, { className: "px-3 py-2 text-sm text-balance", children: rewind.disabled && !rewind.pending
30
30
  ? tI18nComplete.raw('text98433e61649a')
31
- : tI18nComplete.raw('text4c25090df9ea') })] })), toolbarSlot, _jsx(SendStopControl, { isSending: isSending, isBusy: isBusy, onStop: onStop, stopDisabled: stopDisabled, canStop: canStop, escCount: escCount, lockForQuestion: lockForQuestion, questionButtonLabel: questionButtonLabel, submitLabel: submitLabel, questionCanAct: questionCanAct, hasText: hasText, canSubmit: canSubmit, submitDisabled: submitDisabled, disabled: disabled, modelUnavailable: modelUnavailable, agentUnavailable: agentUnavailable, attachmentFailed: attachmentFailed, attachmentUnsupported: attachmentUnsupported, call: call, onSubmit: onSubmit })] })] }));
31
+ : tI18nComplete.raw('text4c25090df9ea') })] })), toolbarSlot, dictation, (!dictationActive || isBusy) && _jsx(SendStopControl, { isSending: isSending, isBusy: isBusy, onStop: onStop, stopDisabled: stopDisabled, canStop: canStop, escCount: escCount, lockForQuestion: lockForQuestion, questionButtonLabel: questionButtonLabel, submitLabel: submitLabel, questionCanAct: questionCanAct, hasText: hasText, canSubmit: canSubmit, submitDisabled: submitDisabled, disabled: disabled, modelUnavailable: modelUnavailable, agentUnavailable: agentUnavailable, attachmentFailed: attachmentFailed, attachmentUnsupported: attachmentUnsupported, call: call, onSubmit: onSubmit })] })] }));
32
32
  }
@@ -0,0 +1,10 @@
1
+ import type { ComposerDictation } from './use-composer-dictation.js';
2
+ /**
3
+ * The composer's microphone. Idle: one ghost button before Send. Recording:
4
+ * Discard, the live level, the time, and Done in its place. Done puts the
5
+ * words at the caret; Escape discards.
6
+ */
7
+ export declare function DictationControl({ dictation, disabled }: {
8
+ dictation: ComposerDictation;
9
+ disabled?: boolean;
10
+ }): import("react").JSX.Element;
@@ -0,0 +1,28 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { CheckIcon, MicrophoneIcon, XIcon } from '@phosphor-icons/react';
4
+ import { useReducedMotion } from 'motion/react';
5
+ import { useTranslations } from '../../../i18n/index.js';
6
+ import { cn } from '../../../lib/utils.js';
7
+ import { Button } from '../../../primitives/button.js';
8
+ import Hint from '../../../primitives/hint.js';
9
+ import Loading from '../../../primitives/loading.js';
10
+ import { DICTATION_BARS, formatElapsed } from './dictation-state.js';
11
+ /** The composer's other icon buttons: round, a press scale, color on hover. */
12
+ const ICON_BUTTON = 'shrink-0 rounded-full p-0 hit-area-3 text-muted-foreground hover:text-foreground transition-[color,background-color,scale] active:scale-[0.96] active:duration-(--duration-normal) duration-(--duration-fast) ease-out motion-reduce:active:scale-100';
13
+ /**
14
+ * The composer's microphone. Idle: one ghost button before Send. Recording:
15
+ * Discard, the live level, the time, and Done in its place. Done puts the
16
+ * words at the caret; Escape discards.
17
+ */
18
+ export function DictationControl({ dictation, disabled = false }) {
19
+ const t = useTranslations('dictation');
20
+ const reduceMotion = useReducedMotion();
21
+ const { phase } = dictation;
22
+ if (phase === 'idle' || phase === 'starting') {
23
+ return (_jsx(Hint, { side: "top", label: _jsxs("span", { className: "flex flex-col", children: [_jsx("span", { children: t('start') }), _jsx("span", { className: "text-muted-foreground", children: t('price', { credits: dictation.creditsPerMinute }) })] }), children: _jsx("span", { className: "inline-flex", children: _jsx(Button, { type: "button", variant: "ghost", size: "icon-base", "aria-label": t('start'), disabled: disabled || phase === 'starting', onClick: dictation.start, className: ICON_BUTTON, children: _jsx(MicrophoneIcon, { className: "size-4" }) }) }) }));
24
+ }
25
+ const transcribing = phase === 'transcribing';
26
+ const padded = [...Array(Math.max(0, DICTATION_BARS - dictation.levels.length)).fill(0), ...dictation.levels];
27
+ return (_jsxs("div", { className: "flex items-center gap-1", role: "group", "aria-label": t('recording'), children: [_jsx(Hint, { side: "top", label: t('discard'), children: _jsx("span", { className: "inline-flex", children: _jsx(Button, { type: "button", variant: "ghost", size: "icon-base", "aria-label": t('discard'), onClick: dictation.cancel, className: ICON_BUTTON, children: _jsx(XIcon, { className: "size-4" }) }) }) }), !reduceMotion && (_jsx("div", { "aria-hidden": true, className: cn('flex h-4 items-center gap-0.5', transcribing && 'text-muted-foreground'), children: padded.map((level, i) => (_jsx("span", { className: "bg-current w-0.5 rounded-full", style: { height: `${Math.round(2 + level * 14)}px` } }, i))) })), _jsx("span", { className: "text-muted-foreground min-w-9 text-right text-xs tabular-nums", "aria-live": "off", children: transcribing ? t('transcribing') : formatElapsed(dictation.elapsedMs) }), _jsx(Hint, { side: "top", label: t('finish'), children: _jsx("span", { className: "inline-flex", children: _jsx(Button, { type: "button", size: "icon-base", "aria-label": transcribing ? t('transcribing') : t('finish'), disabled: transcribing, onClick: dictation.finish, className: "shrink-0 rounded-full p-0 hit-area-3", children: transcribing ? _jsx(Loading, { className: "size-3.5 shrink-0" }) : _jsx(CheckIcon, { weight: "bold", className: "size-4" }) }) }) })] }));
28
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Dictation — pure rules for the composer's microphone (web and desktop).
3
+ * The recorder (`recorder.ts`) and the hook (`use-composer-dictation.ts`) hold
4
+ * the browser state; everything here is a value in, a value out.
5
+ */
6
+ /** Bars in the live level meter, newest on the right. */
7
+ export declare const DICTATION_BARS = 24;
8
+ /** The MIME type to record, or '' to let the browser choose. */
9
+ export declare function pickRecordingType(isTypeSupported: (type: string) => boolean): string;
10
+ /**
11
+ * A meter level (0..1) from the RMS of the last samples. Speech sits between
12
+ * about -45 and -10 dBFS; -60 dBFS and below is silence.
13
+ */
14
+ export declare function levelFromRms(rms: number): number;
15
+ export declare function pushLevel(history: readonly number[], level: number, bars?: number): number[];
16
+ /** `m:ss` for the recording timer: `0:07`, `1:05`, `10:00`. */
17
+ export declare function formatElapsed(ms: number): string;
18
+ /**
19
+ * The text to insert after `before` (the character left of the caret, or '').
20
+ * A word right before the caret gets a space; punctuation that opens the
21
+ * transcript joins it as written.
22
+ */
23
+ export declare function dictationInsert(before: string, text: string): string;
24
+ /** What went wrong with the microphone, from a `getUserMedia` refusal. */
25
+ export type MicrophoneProblem = 'denied' | 'missing' | 'busy' | 'unsupported';
26
+ export declare function microphoneProblem(error: unknown): MicrophoneProblem;
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Dictation — pure rules for the composer's microphone (web and desktop).
3
+ * The recorder (`recorder.ts`) and the hook (`use-composer-dictation.ts`) hold
4
+ * the browser state; everything here is a value in, a value out.
5
+ */
6
+ /** Bars in the live level meter, newest on the right. */
7
+ export const DICTATION_BARS = 24;
8
+ /**
9
+ * The containers a browser may record, best first. Chrome, Edge, Firefox and
10
+ * Electron take WebM/Opus; Safari takes MP4/AAC. Whisper reads all of them.
11
+ */
12
+ const RECORDING_TYPES = [
13
+ 'audio/webm;codecs=opus',
14
+ 'audio/webm',
15
+ 'audio/mp4;codecs=mp4a.40.2',
16
+ 'audio/mp4',
17
+ 'audio/ogg;codecs=opus',
18
+ ];
19
+ /** The MIME type to record, or '' to let the browser choose. */
20
+ export function pickRecordingType(isTypeSupported) {
21
+ return RECORDING_TYPES.find((type) => {
22
+ try {
23
+ return isTypeSupported(type);
24
+ }
25
+ catch {
26
+ return false;
27
+ }
28
+ }) ?? '';
29
+ }
30
+ /**
31
+ * A meter level (0..1) from the RMS of the last samples. Speech sits between
32
+ * about -45 and -10 dBFS; -60 dBFS and below is silence.
33
+ */
34
+ export function levelFromRms(rms) {
35
+ if (!Number.isFinite(rms) || rms <= 0)
36
+ return 0;
37
+ const db = 20 * Math.log10(rms);
38
+ return Math.max(0, Math.min(1, (db + 60) / 50));
39
+ }
40
+ export function pushLevel(history, level, bars = DICTATION_BARS) {
41
+ const next = [...history, level];
42
+ return next.length > bars ? next.slice(next.length - bars) : next;
43
+ }
44
+ /** `m:ss` for the recording timer: `0:07`, `1:05`, `10:00`. */
45
+ export function formatElapsed(ms) {
46
+ const total = Math.max(0, Math.floor(ms / 1000));
47
+ return `${Math.floor(total / 60)}:${String(total % 60).padStart(2, '0')}`;
48
+ }
49
+ /**
50
+ * The text to insert after `before` (the character left of the caret, or '').
51
+ * A word right before the caret gets a space; punctuation that opens the
52
+ * transcript joins it as written.
53
+ */
54
+ export function dictationInsert(before, text) {
55
+ const words = text.trim();
56
+ if (!words)
57
+ return '';
58
+ if (!before || /\s/.test(before) || /^[,.;:!?)]/.test(words))
59
+ return words;
60
+ return ` ${words}`;
61
+ }
62
+ export function microphoneProblem(error) {
63
+ const name = error && typeof error === 'object' && 'name' in error ? String(error.name) : '';
64
+ if (name === 'NotAllowedError' || name === 'SecurityError' || name === 'PermissionDeniedError')
65
+ return 'denied';
66
+ if (name === 'NotFoundError' || name === 'OverconstrainedError' || name === 'DevicesNotFoundError')
67
+ return 'missing';
68
+ if (name === 'NotReadableError' || name === 'TrackStartError' || name === 'AbortError')
69
+ return 'busy';
70
+ return 'unsupported';
71
+ }
@@ -0,0 +1,30 @@
1
+ import { type MicrophoneProblem } from './dictation-state.js';
2
+ /** The microphone refused, with the reason a person can act on. */
3
+ export declare class MicrophoneError extends Error {
4
+ readonly problem: MicrophoneProblem;
5
+ constructor(problem: MicrophoneProblem);
6
+ }
7
+ /**
8
+ * One dictation's microphone: `MediaRecorder` for the clip, an `AnalyserNode`
9
+ * for the live level. `stop` resolves the clip; `cancel` drops it. Either one
10
+ * releases the microphone, so the browser's recording indicator goes out.
11
+ */
12
+ export declare class DictationRecorder {
13
+ private stream?;
14
+ private recorder?;
15
+ private context?;
16
+ private analyser?;
17
+ private chunks;
18
+ private readonly samples;
19
+ private released;
20
+ static supported(): boolean;
21
+ /** Asks for the microphone and starts recording. Throws `MicrophoneError`. */
22
+ start(): Promise<void>;
23
+ /** The microphone level now, 0..1. */
24
+ level(): number;
25
+ /** Ends the take and resolves the clip (empty when nothing was recorded). */
26
+ stop(): Promise<Blob>;
27
+ /** Drops the take and releases the microphone. */
28
+ cancel(): void;
29
+ private release;
30
+ }
@@ -0,0 +1,129 @@
1
+ import { desktopPlatform } from '../../../internal/lib/desktop-detect.js';
2
+ import { levelFromRms, microphoneProblem, pickRecordingType } from './dictation-state.js';
3
+ /** The microphone refused, with the reason a person can act on. */
4
+ export class MicrophoneError extends Error {
5
+ problem;
6
+ constructor(problem) {
7
+ super(`microphone ${problem}`);
8
+ this.problem = problem;
9
+ this.name = 'MicrophoneError';
10
+ }
11
+ }
12
+ // Speech, not music: the browser's own echo and noise handling, one channel.
13
+ const MICROPHONE = {
14
+ audio: { echoCancellation: true, noiseSuppression: true, autoGainControl: true, channelCount: 1 },
15
+ };
16
+ /** 32 kb/s Opus or AAC: ten minutes is about 2.4 MB, well under the 25 MB clip cap. */
17
+ const BITS_PER_SECOND = 32_000;
18
+ /**
19
+ * One dictation's microphone: `MediaRecorder` for the clip, an `AnalyserNode`
20
+ * for the live level. `stop` resolves the clip; `cancel` drops it. Either one
21
+ * releases the microphone, so the browser's recording indicator goes out.
22
+ */
23
+ export class DictationRecorder {
24
+ stream;
25
+ recorder;
26
+ context;
27
+ analyser;
28
+ chunks = [];
29
+ samples = new Float32Array(1024);
30
+ released = false;
31
+ static supported() {
32
+ if (typeof window === 'undefined' || typeof MediaRecorder === 'undefined' || !navigator.mediaDevices?.getUserMedia) {
33
+ return false;
34
+ }
35
+ // A macOS desktop build without the microphone entitlement never gets a
36
+ // microphone: macOS refuses it without a prompt. Such a build does not
37
+ // announce `microphone` on its bridge (apps/desktop-electron/src/preload.js).
38
+ if (desktopPlatform() === 'macos') {
39
+ return window.kortixDesktop?.microphone === true;
40
+ }
41
+ return true;
42
+ }
43
+ /** Asks for the microphone and starts recording. Throws `MicrophoneError`. */
44
+ async start() {
45
+ if (!DictationRecorder.supported())
46
+ throw new MicrophoneError('unsupported');
47
+ let stream;
48
+ try {
49
+ stream = await navigator.mediaDevices.getUserMedia(MICROPHONE);
50
+ }
51
+ catch (error) {
52
+ throw new MicrophoneError(microphoneProblem(error));
53
+ }
54
+ if (this.released) {
55
+ stream.getTracks().forEach((track) => track.stop());
56
+ return;
57
+ }
58
+ this.stream = stream;
59
+ const type = pickRecordingType((t) => MediaRecorder.isTypeSupported(t));
60
+ const recorder = new MediaRecorder(stream, {
61
+ ...(type ? { mimeType: type } : {}),
62
+ audioBitsPerSecond: BITS_PER_SECOND,
63
+ });
64
+ recorder.ondataavailable = (event) => {
65
+ if (event.data.size > 0)
66
+ this.chunks.push(event.data);
67
+ };
68
+ this.recorder = recorder;
69
+ // A slice a second: a long take is never held as one buffer only.
70
+ recorder.start(1000);
71
+ try {
72
+ const context = new AudioContext();
73
+ const analyser = context.createAnalyser();
74
+ analyser.fftSize = 1024;
75
+ context.createMediaStreamSource(stream).connect(analyser);
76
+ if (context.state === 'suspended')
77
+ void context.resume().catch(() => { });
78
+ this.context = context;
79
+ this.analyser = analyser;
80
+ }
81
+ catch {
82
+ // No meter is not a failure: the clip still records.
83
+ }
84
+ }
85
+ /** The microphone level now, 0..1. */
86
+ level() {
87
+ if (!this.analyser)
88
+ return 0;
89
+ this.analyser.getFloatTimeDomainData(this.samples);
90
+ let sum = 0;
91
+ for (const sample of this.samples)
92
+ sum += sample * sample;
93
+ return levelFromRms(Math.sqrt(sum / this.samples.length));
94
+ }
95
+ /** Ends the take and resolves the clip (empty when nothing was recorded). */
96
+ stop() {
97
+ const recorder = this.recorder;
98
+ if (!recorder || recorder.state === 'inactive') {
99
+ this.release();
100
+ return Promise.resolve(new Blob(this.chunks, { type: recorder?.mimeType || 'audio/webm' }));
101
+ }
102
+ return new Promise((resolve) => {
103
+ recorder.onstop = () => {
104
+ const clip = new Blob(this.chunks, { type: recorder.mimeType || 'audio/webm' });
105
+ this.release();
106
+ resolve(clip);
107
+ };
108
+ recorder.stop();
109
+ });
110
+ }
111
+ /** Drops the take and releases the microphone. */
112
+ cancel() {
113
+ this.chunks = [];
114
+ if (this.recorder && this.recorder.state !== 'inactive') {
115
+ this.recorder.onstop = null;
116
+ this.recorder.stop();
117
+ }
118
+ this.release();
119
+ }
120
+ release() {
121
+ this.released = true;
122
+ this.stream?.getTracks().forEach((track) => track.stop());
123
+ if (this.context && this.context.state !== 'closed')
124
+ void this.context.close().catch(() => { });
125
+ this.stream = undefined;
126
+ this.context = undefined;
127
+ this.analyser = undefined;
128
+ }
129
+ }
@@ -0,0 +1,25 @@
1
+ import { type RefObject } from 'react';
2
+ import type { ComposerEditorHandle } from '../editor/composer-editor.js';
3
+ export type DictationPhase = 'idle' | 'starting' | 'recording' | 'transcribing';
4
+ export interface ComposerDictation {
5
+ phase: DictationPhase;
6
+ /** Live meter levels (0..1), newest last. */
7
+ levels: number[];
8
+ elapsedMs: number;
9
+ maxSeconds: number;
10
+ creditsPerMinute: number;
11
+ start: () => void;
12
+ /** Stop recording and put the words into the composer. */
13
+ finish: () => void;
14
+ /** Drop the recording, or stop waiting for its text. */
15
+ cancel: () => void;
16
+ }
17
+ /**
18
+ * The composer's dictation, or null where it is not offered: no project, no
19
+ * microphone API, or a server without managed models (`available: false`).
20
+ * One recording at a time; the words land at the caret.
21
+ */
22
+ export declare function useComposerDictation({ projectId, editorRef, }: {
23
+ projectId: string | null | undefined;
24
+ editorRef: RefObject<ComposerEditorHandle | null>;
25
+ }): ComposerDictation | null;