Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Comment out new autocomplete matching

Tomas Valentaf7c96eebe1fd
diff --git a/editor/extensions/autocomplete/suggestion.ts b/editor/extensions/autocomplete/suggestion.ts
index c34e227b8..004ae942f 100644
--- a/editor/extensions/autocomplete/suggestion.ts
+++ b/editor/extensions/autocomplete/suggestion.ts
@@ -3,6 +3,7 @@ import { Plugin, PluginKey } from 'prosemirror-state'
import { Decoration, DecorationSet, EditorView } from 'prosemirror-view'
import type { Reference } from 'editor/referenceType'
+import { findSuggestionMatch } from './findSuggestionMatch'
export interface SuggestionOptions<Item = Reference> {
@@ -167,32 +168,28 @@ export function Suggestion<Item = Reference>({
})
- const text = selection.$from.node().text
-
- if (text) {
- const prefix = text.slice(0, selection.$from.textOffset)
- const lastWord = /\\b(\w+)$\\/
-
- const prefixWord = lastWord.exec(prefix)
- if (prefixWord) {
- const match = prefixWord[0]
- // Calculate range
- // Update state
- }
- }
-
-
+ // const text = selection.$from.node().text
+ // if (text) {
+ // const prefix = text.slice(0, selection.$from.textOffset)
+ // const lastWord = /\\b(\w+)$\\/
+ // const prefixWord = lastWord.exec(prefix)
+ // if (prefixWord) {
+ // const match = prefixWord[0]
+ // // Calculate range
+ // // Update state
+ // }
+ // }
// Try to match against where our cursor currently is
- // const match = findSuggestionMatch({
- // char,
- // allowSpaces,
- // startOfLine,
- // $position: selection.$from,
- // })
+ const match = findSuggestionMatch({
+ char,
+ allowSpaces,
+ startOfLine,
+ $position: selection.$from,
+ })
const decorationID = `id_${Math.floor(Math.random() * 0xFFFFFFFF)}`
// If we found a match, update the current state to show it