MCPcopy Create free account
hub / github.com/dailydotdev/apps / replaceWord

Method replaceWord

packages/shared/src/lib/textarea.ts:205–217  ·  view source on GitHub ↗
(
    getReplacement: GetReplacementFn,
    onReplaced: ReplacedFn,
    forcedType?: CursorType,
  )

Source from the content-addressed store, hash-verified

203 }
204
205 async replaceWord(
206 getReplacement: GetReplacementFn,
207 onReplaced: ReplacedFn,
208 forcedType?: CursorType,
209 ): Promise<Replacement> {
210 const { result, position, replacement } = this.getResult(
211 getReplacement,
212 forcedType,
213 );
214 onReplaced(result);
215 await focusInput(this.textarea, position);
216 return { result, position, replacement };
217 }
218
219 onReplaceUpload(url: string, filename: string): string {
220 const temporary = getTemporaryUploadString(filename);

Callers 8

useMarkdownInputFunction · 0.80
onApplyMentionFunction · 0.80
onApplyEmojiFunction · 0.80
onLinkCommandFunction · 0.80
onLinkPasteFunction · 0.80
onMentionCommandFunction · 0.80
onKeyDownFunction · 0.80
onGifCommandFunction · 0.80

Calls 2

getResultMethod · 0.95
focusInputFunction · 0.70

Tested by

no test coverage detected