MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / clearEditorHistory

Function clearEditorHistory

packages/web/src/features/chat/utils.ts:170–173  ·  view source on GitHub ↗
(editor: CustomEditor)

Source from the content-addressed store, hash-verified

168}
169
170export const clearEditorHistory = (editor: CustomEditor) => {
171 // slate-history exposes `history` publicly, but does not provide a clear API.
172 editor.history = { redos: [], undos: [] };
173}
174
175// @see: https://stackoverflow.com/a/74102147
176export const resetEditor = (editor: CustomEditor) => {

Callers 2

restoreEditorChildrenFunction · 0.90
resetEditorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected