Improving completion to support the correct table name for autocompletion and formatting

This commit is contained in:
2026-02-07 18:26:29 +01:00
parent ab4f251f0c
commit 3fc4384251
10 changed files with 49 additions and 58 deletions

View File

@@ -32,6 +32,7 @@ class DslEditorConf:
linting: bool = True
placeholder: str = ""
readonly: bool = False
engine_id: str = None # id of the DSL engine to use for autocompletion
class DslEditorState(DbObject):
@@ -141,7 +142,7 @@ class DslEditor(MultipleInstance):
simple_mode_config = None
if hasattr(self._dsl, 'simple_mode_config'):
simple_mode_config = self._dsl.simple_mode_config
config = {
"elementId": str(self._id),
"textareaId": f"ta_{self._id}",
@@ -151,7 +152,7 @@ class DslEditor(MultipleInstance):
"placeholder": self.conf.placeholder,
"readonly": self.conf.readonly,
"updateCommandId": str(self.commands.update_content().id),
"dslId": self._dsl.get_id(),
"dslId": self.conf.engine_id,
"dsl": {
"name": self._dsl.name,
"completions": self._dsl.completions,