googleDocsEditorAPI.applyEdit rejects unconditionally:
// TODO(my-words): bridge to Apps Script (selectPhrase + replaceSelection for
// str_replace; insertTextAtCursor for insert). The GDocs multi-tab corpus
// (getAllTabs) is the exciting follow-up. Deferred — v1 targets standalone.
applyEdit(_edit: DocEdit): Promise<void> {
return Promise.reject(
new Error('applyEdit is not implemented for Google Docs yet'),
);
},
There is no applySplice either, so applySpliceToEditor takes the DocEdit adapter path and every My Words edit fails on that surface. Known and deliberate — recording it so the gap is tracked rather than living only in a TODO.
The parts that do work there are read-only: getDocText, getParagraphs, selectPhrase. So the partner can read and point, and every edit fails.
Notes for when this is picked up
googleDocsEditorAPI.applyEditrejects unconditionally:There is no
applySpliceeither, soapplySpliceToEditortakes theDocEditadapter path and every My Words edit fails on that surface. Known and deliberate — recording it so the gap is tracked rather than living only in a TODO.The parts that do work there are read-only:
getDocText,getParagraphs,selectPhrase. So the partner can read and point, and every edit fails.Notes for when this is picked up
replaceSelection+insertTextAtCursorwould add a fourth search-and-edit policy, whereas a range primitive makesapplySplicea direct lowering.applySplicenatively rather than theDocEditfallback — a splice is one Apps Script round-trip, while the adapter path issues several, and each is roughly a second.