Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Hide autocomplete scrollbar; Simplify autocomplete coord calculation

Tomas Valenta8d5fe558dc1d
diff --git a/components/Editor/RouteEditor/PromptEditor/Autocomplete/index.tsx b/components/Editor/RouteEditor/PromptEditor/Autocomplete/index.tsx
index df9016335..1cbdf5990 100644
--- a/components/Editor/RouteEditor/PromptEditor/Autocomplete/index.tsx
+++ b/components/Editor/RouteEditor/PromptEditor/Autocomplete/index.tsx
@@ -61,6 +61,7 @@ const Autocomplete: AutocompleteList = forwardRef(({
border
bg-slate-50
shadow-md
+ no-scroller
"
>
{items.map((item, index) => (
diff --git a/editor/extensions/autocomplete/index.ts b/editor/extensions/autocomplete/index.ts
index 3b7c5d4cd..cc098ce3f 100644
--- a/editor/extensions/autocomplete/index.ts
+++ b/editor/extensions/autocomplete/index.ts
@@ -30,7 +30,7 @@ function getReferenceClientRect(props: SuggestionProps): () => DOMRect {
const rect = range.getBoundingClientRect()
rect.x = coords.left
- rect.y = coords.top - rect.height + coords.bottom - coords.top
+ rect.y = coords.bottom - rect.height
return rect
}
@@ -74,7 +74,7 @@ const autocomplete = Node.create<AutocompleteOptions>({
showOnCreate: true,
interactive: true,
hideOnClick: true,
- delay: 150,
+ delay: 120,
maxWidth: 'none',
trigger: 'manual',
offset: [0, 1],