diff options
author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2025-03-04 04:32:50 -0500 |
---|---|---|
committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2025-03-04 04:32:50 -0500 |
commit | 95abdada5a275fc258fa72781f7f3c40c0b306ea (patch) | |
tree | 6d729cebe0937ae81108005de9895b5398d1f475 /src/client/util/DictationManager.ts | |
parent | 0a8f3739cf5c30852f18751a4c05d81e0dabe928 (diff) | |
parent | 215ad40efa2e343e290d18bffbc55884829f1a0d (diff) |
Merge branch 'master' of https://github.com/brown-dash/Dash-Web into Merge
Diffstat (limited to 'src/client/util/DictationManager.ts')
-rw-r--r-- | src/client/util/DictationManager.ts | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/client/util/DictationManager.ts b/src/client/util/DictationManager.ts index a0e1413b6..897366757 100644 --- a/src/client/util/DictationManager.ts +++ b/src/client/util/DictationManager.ts @@ -71,7 +71,6 @@ export namespace DictationManager { let current: string | undefined; let sessionResults: string[] = []; - // eslint-disable-next-line new-cap const recognizer: Opt<SpeechRecognition> = webkitSpeechRecognition ? new webkitSpeechRecognition() : undefined; export type InterimResultHandler = (results: string) => void; @@ -257,7 +256,6 @@ export namespace DictationManager { if (entry) { let success = false; const { restrictTo } = entry; - // eslint-disable-next-line no-restricted-syntax for (const target of targets) { if (!restrictTo || validate(target, restrictTo)) { // eslint-disable-next-line no-await-in-loop @@ -268,7 +266,6 @@ export namespace DictationManager { return success; } - // eslint-disable-next-line no-restricted-syntax for (const depEntry of Dependent) { const regex = depEntry.expression; const matches = regex.exec(phrase); @@ -276,7 +273,6 @@ export namespace DictationManager { if (matches !== null) { let success = false; const { restrictTo } = depEntry; - // eslint-disable-next-line no-restricted-syntax for (const target of targets) { if (!restrictTo || validate(target, restrictTo)) { // eslint-disable-next-line no-await-in-loop @@ -307,7 +303,6 @@ export namespace DictationManager { }; const validate = (target: DocumentView, types: DocumentType[]) => { - // eslint-disable-next-line no-restricted-syntax for (const type of types) { if (tryCast(target, type)) { return true; @@ -349,7 +344,7 @@ export namespace DictationManager { const head = 3; const anchor = head + prompt.length; const proseMirrorState = `{"doc":{"type":"doc","content":[{"type":"ordered_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"type":"text","text":"${prompt}"}]}]}]}]},"selection":{"type":"text","anchor":${anchor},"head":${head}}}`; - proto.data = new RichTextField(proseMirrorState); + proto.data = new RichTextField(proseMirrorState, prompt); proto.backgroundColor = '#eeffff'; target.props.addDocTab(newBox, OpenWhere.addRight); }, |