Explorar el Código

feat(materials): code-editor & json-editor-with-variables (#479)

* feat: code editor

* feat(material): json editor with variables
Yiwei Mao hace 6 meses
padre
commit
039f937ec2

+ 176 - 175
common/config/rush/pnpm-lock.yaml

@@ -2118,12 +2118,15 @@ importers:
 
   ../../packages/materials/form-materials:
     dependencies:
+      '@codemirror/state':
+        specifier: ~6.5.2
+        version: 6.5.2
       '@codemirror/view':
         specifier: ~6.38.0
         version: 6.38.0
       '@coze-editor/editor':
         specifier: 0.1.0-alpha.8d7a30
-        version: 0.1.0-alpha.8d7a30(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.7)(@codemirror/merge@6.10.2)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)(@types/react@18.3.16)(react-dom@18.3.1)(react@18.3.1)(typescript@5.0.4)(vue@3.5.17)
+        version: 0.1.0-alpha.8d7a30(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.7)(@codemirror/merge@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)(@types/react@18.3.16)(react-dom@18.3.1)(react@18.3.1)(typescript@5.0.4)(vue@3.5.17)
       '@douyinfe/semi-icons':
         specifier: ^2.80.0
         version: 2.80.0(react@18.3.1)
@@ -5729,7 +5732,7 @@ packages:
     resolution: {integrity: sha512-sFAphGQIqyQZfP2ZBsSHV7xQvo9Py0rV0dW7W3IMRdS+zDuNb2l3no78CvUaWKGfzFjI4FTrLdUSj86IGb2hRA==}
     dependencies:
       '@codemirror/language': 6.10.7
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
       '@lezer/common': 1.2.3
     dev: false
@@ -5738,7 +5741,7 @@ packages:
     resolution: {integrity: sha512-llTrboQYw5H4THfhN4U3qCnSZ1SOJ60ohhz+SzU0ADGtwlc533DtklQP0vSFaQuCPDn3BPpOd1GbbnUtwNjsrw==}
     dependencies:
       '@codemirror/language': 6.10.7
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
       '@lezer/common': 1.2.3
     dev: false
@@ -5748,7 +5751,7 @@ packages:
     dependencies:
       '@codemirror/autocomplete': 6.18.4
       '@codemirror/language': 6.10.7
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@lezer/common': 1.2.3
       '@lezer/css': 1.1.9
     dev: false
@@ -5760,7 +5763,7 @@ packages:
       '@codemirror/lang-css': 6.3.1
       '@codemirror/lang-javascript': 6.2.2
       '@codemirror/language': 6.10.7
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
       '@lezer/common': 1.2.3
       '@lezer/css': 1.1.9
@@ -5773,7 +5776,7 @@ packages:
       '@codemirror/autocomplete': 6.18.4
       '@codemirror/language': 6.10.7
       '@codemirror/lint': 6.8.4
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
       '@lezer/common': 1.2.3
       '@lezer/javascript': 1.4.21
@@ -5784,7 +5787,7 @@ packages:
     dependencies:
       '@codemirror/autocomplete': 6.18.4
       '@codemirror/language': 6.10.7
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@lezer/common': 1.2.3
       '@lezer/python': 1.1.18
     dev: false
@@ -5792,7 +5795,7 @@ packages:
   /@codemirror/language@6.10.7:
     resolution: {integrity: sha512-aOswhVOLYhMNeqykt4P7+ukQSpGL0ynZYaEyFDVHE7fl2xgluU3yuE9MdgYNfw6EmaNidoFMIQ2iTh1ADrnT6A==}
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
       '@lezer/common': 1.2.3
       '@lezer/highlight': 1.2.1
@@ -5803,7 +5806,7 @@ packages:
   /@codemirror/lint@6.8.4:
     resolution: {integrity: sha512-u4q7PnZlJUojeRe8FJa/njJcMctISGgPQ4PnWsd9268R4ZTtU+tfFYmwkBvgcrK2+QQ8tYFVALVb5fVJykKc5A==}
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
       crelt: 1.0.6
     dev: false
@@ -5812,7 +5815,7 @@ packages:
     resolution: {integrity: sha512-rmHzVkt5FnCtsi0IgvDIDjh/J4LmbfOboB7FMvVl21IHO0p1QM6jSwjkBjBD3D+c+T79OabEqoduCqvJCBV8Yg==}
     dependencies:
       '@codemirror/language': 6.10.7
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
       '@lezer/highlight': 1.2.1
       style-mod: 4.1.2
@@ -5821,7 +5824,7 @@ packages:
   /@codemirror/search@6.5.11:
     resolution: {integrity: sha512-KmWepDE6jUdL6n8cAAqIpRmLPBZ5ZKnicE8oGU/s3QrAVID+0VhLFrzUucVKHG5035/BSykhExDL/Xm7dHthiA==}
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
       crelt: 1.0.6
     dev: false
@@ -5832,18 +5835,16 @@ packages:
       '@marijn/find-cluster-break': 1.0.2
     dev: false
 
-  /@codemirror/view@6.36.1:
-    resolution: {integrity: sha512-miD1nyT4m4uopZaDdO2uXU/LLHliKNYL9kB1C1wJHrunHLm/rpkb5QVSokqgw9hFqEZakrdlb/VGWX8aYZTslQ==}
+  /@codemirror/state@6.5.2:
+    resolution: {integrity: sha512-FVqsPqtPWKVVL3dPSxy8wEF/ymIEuVzF1PK3VbUgrxXpJUSHQWWZz4JMToquRxnkw+36LTamCZG2iua2Ptq0fA==}
     dependencies:
-      '@codemirror/state': 6.5.0
-      style-mod: 4.1.2
-      w3c-keyname: 2.2.8
+      '@marijn/find-cluster-break': 1.0.2
     dev: false
 
   /@codemirror/view@6.38.0:
     resolution: {integrity: sha512-yvSchUwHOdupXkd7xJ0ob36jdsSR/I+/C+VbY0ffBiL5NiSTEBDfB1ZGWbbIlDd5xgdUkody+lukAdOxYrOBeg==}
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       crelt: 1.0.6
       style-mod: 4.1.2
       w3c-keyname: 2.2.8
@@ -5880,7 +5881,7 @@ packages:
       '@codemirror/lang-javascript': 6.2.2
       '@codemirror/language': 6.10.7
       '@codemirror/state': 6.5.0
-      '@codemirror/view': 6.36.1
+      '@codemirror/view': 6.38.0
       '@codesandbox/sandpack-client': 2.19.8
       '@lezer/highlight': 1.2.1
       '@react-hook/intersection-observer': 3.1.2(react@18.3.1)
@@ -5896,7 +5897,7 @@ packages:
       react-is: 17.0.2
     dev: false
 
-  /@coze-editor/code-language-json@0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30):
+  /@coze-editor/code-language-json@0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30):
     resolution: {integrity: sha512-Q1FYiAmXXw+MbMai5fJPimcBwq/+j+tYtIEBibVSLZlYNotWoP9XqCJ5aVm6aq3/rh/DfkE5uqPWM2b2ngfU6Q==}
     peerDependencies:
       '@codemirror/language': ^6.0.0
@@ -5906,10 +5907,10 @@ packages:
     dependencies:
       '@codemirror/autocomplete': 6.18.4
       '@codemirror/language': 6.10.7
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/code-language-shared': 0.1.0-alpha.8d7a30(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/extension-lint': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
+      '@coze-editor/code-language-shared': 0.1.0-alpha.8d7a30(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/extension-lint': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
       '@coze-editor/lezer-parser-json': 0.1.0-alpha.8d7a30
       '@coze-editor/parser-json': 0.1.0-alpha.8d7a30
       '@lezer/json': 1.0.3
@@ -5919,7 +5920,7 @@ packages:
       vscode-uri: 3.1.0
     dev: false
 
-  /@coze-editor/code-language-python@0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30):
+  /@coze-editor/code-language-python@0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30):
     resolution: {integrity: sha512-c2M8yMDHanoW/Vaqbc51YBIsWKYxmW3QBcv4jnZ9jRjq/2dXRCYKM6bHaE95VfDvbdLQsR5Hfy2X/4kWuD5iyA==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
@@ -5927,12 +5928,12 @@ packages:
       '@coze-editor/code-language-shared': 0.1.0-alpha.8d7a30
     dependencies:
       '@codemirror/lang-python': 6.2.1
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/code-language-shared': 0.1.0-alpha.8d7a30(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/code-language-shared': 0.1.0-alpha.8d7a30(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
     dev: false
 
-  /@coze-editor/code-language-shared@0.1.0-alpha.8d7a30(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
+  /@coze-editor/code-language-shared@0.1.0-alpha.8d7a30(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
     resolution: {integrity: sha512-1eU9oQzNPNsLmsnmKbDnis1PktFJMhygKNzgZWxipOrkHvYCj54qVTk7HrAxNPGF5iyiM4U+WRj4a29zzczTnA==}
     peerDependencies:
       '@codemirror/autocomplete': ^6.18.0
@@ -5942,10 +5943,10 @@ packages:
     dependencies:
       '@codemirror/autocomplete': 6.18.4
       '@codemirror/language': 6.10.7
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/extension-lint': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/extension-lint': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
       mitt: 3.0.1
       vscode-languageserver-textdocument: 1.0.12
       vscode-languageserver-types: 3.17.5
@@ -5953,7 +5954,7 @@ packages:
       - '@lezer/common'
     dev: false
 
-  /@coze-editor/code-language-shell@0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30):
+  /@coze-editor/code-language-shell@0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30):
     resolution: {integrity: sha512-WnlS6018tGchh2FBJaxVLLfwraqj3Vc9XBr91sxPqpTZ9igssDzrX5Y/mddFY5JfGjZr1hFhDWGJHKvOlQ9eig==}
     peerDependencies:
       '@codemirror/language': ^6.0.0
@@ -5962,12 +5963,12 @@ packages:
       '@coze-editor/code-language-shared': 0.1.0-alpha.8d7a30
     dependencies:
       '@codemirror/language': 6.10.7
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/code-language-shared': 0.1.0-alpha.8d7a30(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/code-language-shared': 0.1.0-alpha.8d7a30(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
     dev: false
 
-  /@coze-editor/code-language-typescript@0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30)(typescript@5.0.4):
+  /@coze-editor/code-language-typescript@0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30)(typescript@5.0.4):
     resolution: {integrity: sha512-R5ukNDbSuxzjVUB5nlPcYcKwhUpKofvsVX+toUyCfYO3UtbtVx4nq8o/uOYjOO73Rd8m9JU3AVFc4hBouVShbA==}
     peerDependencies:
       '@codemirror/language': ^6.0.0
@@ -5978,9 +5979,9 @@ packages:
     dependencies:
       '@codemirror/lang-javascript': 6.2.2
       '@codemirror/language': 6.10.7
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/code-language-shared': 0.1.0-alpha.8d7a30(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/code-language-shared': 0.1.0-alpha.8d7a30(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
       '@lukeed/uuid': 2.0.1
       '@typescript/vfs': 1.6.1(typescript@5.0.4)
       comlink: 4.4.2
@@ -5994,7 +5995,7 @@ packages:
       - supports-color
     dev: false
 
-  /@coze-editor/core-plugins@0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
+  /@coze-editor/core-plugins@0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
     resolution: {integrity: sha512-D0nAlwWEUDQ5DKmAF5Ubghj+7TGpEgyE1yj3FOO+SG4n59nl7ifyVFrzot5JOg76mmt1+cvVcTh2OiLH9aKA1A==}
     peerDependencies:
       '@codemirror/commands': ^6.3.3
@@ -6002,27 +6003,27 @@ packages:
       '@codemirror/view': ^6.26.1
     dependencies:
       '@codemirror/commands': 6.7.1
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/extension-placeholder': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/extension-placeholder': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
       es-toolkit: 1.39.5
     transitivePeerDependencies:
       - '@lezer/common'
     dev: false
 
-  /@coze-editor/core@0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0):
+  /@coze-editor/core@0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0):
     resolution: {integrity: sha512-SWXl0pxuf3D2MNX9/l5PWKfucnwjYAEumvJH+MwPElVxYdn4uGTcbFIJdYKtkphFM1L2O3cWklsrd9pEgYzzUQ==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
       '@codemirror/view': ^6.26.1
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
       mitt: 3.0.1
     dev: false
 
-  /@coze-editor/editor@0.1.0-alpha.8d7a30(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.7)(@codemirror/merge@6.10.2)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)(@types/react@18.3.16)(react-dom@18.3.1)(react@18.3.1)(typescript@5.0.4)(vue@3.5.17):
+  /@coze-editor/editor@0.1.0-alpha.8d7a30(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.7)(@codemirror/merge@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)(@types/react@18.3.16)(react-dom@18.3.1)(react@18.3.1)(typescript@5.0.4)(vue@3.5.17):
     resolution: {integrity: sha512-5gDI+/piZoXQYb8dFc22dzo3Dv21K7RMzrt74GYRLTDFJhK5/ihF2bIObPZ4JFJ9FaIcEFy2nmqon7LWvTV7UQ==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
@@ -6031,34 +6032,34 @@ packages:
       react-dom: ~18.2.0
     dependencies:
       '@codemirror/commands': 6.7.1
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/code-language-json': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30)
-      '@coze-editor/code-language-python': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30)
-      '@coze-editor/code-language-shared': 0.1.0-alpha.8d7a30(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/code-language-shell': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30)
-      '@coze-editor/code-language-typescript': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30)(typescript@5.0.4)
-      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/extension-json-ast': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/extension-json-empty-string-value-completion': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/extension-json-hover': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/extension-json-unnecessary-properties': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/extension-regexp-decorator': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/extensions': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/preset-code': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30)(@lezer/common@1.2.3)
-      '@coze-editor/preset-expression': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/preset-none': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/preset-prompt': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/preset-universal': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/preset-variable': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/react': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(react-dom@18.3.1)(react@18.3.1)
-      '@coze-editor/react-components': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/react@0.1.0-alpha.8d7a30)(@lezer/common@1.2.3)(@types/react@18.3.16)(react-dom@18.3.1)(react@18.3.1)
-      '@coze-editor/react-hooks': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/react@0.1.0-alpha.8d7a30)(react-dom@18.3.1)(react@18.3.1)
-      '@coze-editor/react-merge': 0.1.0-alpha.8d7a30(@codemirror/merge@6.10.2)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/react@0.1.0-alpha.8d7a30)(react-dom@18.3.1)(react@18.3.1)
-      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/vscode': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/vue': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)(vue@3.5.17)
-      '@coze-editor/vue-components': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/vue@0.1.0-alpha.8d7a30)(@lezer/common@1.2.3)(vue@3.5.17)
+      '@coze-editor/code-language-json': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30)
+      '@coze-editor/code-language-python': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30)
+      '@coze-editor/code-language-shared': 0.1.0-alpha.8d7a30(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/code-language-shell': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30)
+      '@coze-editor/code-language-typescript': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30)(typescript@5.0.4)
+      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/extension-json-ast': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/extension-json-empty-string-value-completion': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/extension-json-hover': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/extension-json-unnecessary-properties': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/extension-regexp-decorator': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/extensions': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/preset-code': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30)(@lezer/common@1.2.3)
+      '@coze-editor/preset-expression': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/preset-none': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/preset-prompt': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/preset-universal': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/preset-variable': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/react': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(react-dom@18.3.1)(react@18.3.1)
+      '@coze-editor/react-components': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/react@0.1.0-alpha.8d7a30)(@lezer/common@1.2.3)(@types/react@18.3.16)(react-dom@18.3.1)(react@18.3.1)
+      '@coze-editor/react-hooks': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/react@0.1.0-alpha.8d7a30)(react-dom@18.3.1)(react@18.3.1)
+      '@coze-editor/react-merge': 0.1.0-alpha.8d7a30(@codemirror/merge@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/react@0.1.0-alpha.8d7a30)(react-dom@18.3.1)(react@18.3.1)
+      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/vscode': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/vue': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)(vue@3.5.17)
+      '@coze-editor/vue-components': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/vue@0.1.0-alpha.8d7a30)(@lezer/common@1.2.3)(vue@3.5.17)
       react: 18.3.1
       react-dom: 18.3.1(react@18.3.1)
     transitivePeerDependencies:
@@ -6072,129 +6073,129 @@ packages:
       - vue
     dev: false
 
-  /@coze-editor/extension-completion-icons@0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0):
+  /@coze-editor/extension-completion-icons@0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0):
     resolution: {integrity: sha512-aZ1BEK6Y7kNCqDr1vmHX2K6r0Dqot7RVjBne5h8gWPPEtpMxEUjvScGe3pyOZbzIbFsoV6bbBx9U/4aXJ4x2cg==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
       '@codemirror/view': ^6.26.1
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
     dev: false
 
-  /@coze-editor/extension-json-ast@0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
+  /@coze-editor/extension-json-ast@0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
     resolution: {integrity: sha512-CiUK+WM8h/y7nOTAlGhI1z53SORQn7BiIri5tZIOFEqn0hKrogjDeMbR58WBr0eLeCCJ2qDSm/FIzGg3A5Rnlg==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
       '@codemirror/view': ^6.26.1
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
       '@coze-editor/parser-json': 0.1.0-alpha.8d7a30
-      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
       vscode-languageserver-textdocument: 1.0.12
     transitivePeerDependencies:
       - '@lezer/common'
     dev: false
 
-  /@coze-editor/extension-json-empty-string-value-completion@0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
+  /@coze-editor/extension-json-empty-string-value-completion@0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
     resolution: {integrity: sha512-TZGfHyD+7Z1WLZyZObjQUBUtcuujyU2e8JWq+4TVkFz70tuwdT95gUOCptomc6BAckMdKm6ul0ac/OEur5/eNw==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
       '@codemirror/view': ^6.26.1
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/extension-json-ast': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/extension-json-ast': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
     transitivePeerDependencies:
       - '@lezer/common'
     dev: false
 
-  /@coze-editor/extension-json-hover@0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
+  /@coze-editor/extension-json-hover@0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
     resolution: {integrity: sha512-lqhUufwUaaAqjS1RJa89eL8rmOAfVnJv5vaICJXsceQwmM3uNGqsw5B4tW4Ofrz5UWHn/Wh5snjm3z3doafZVA==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
       '@codemirror/view': ^6.26.1
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/extension-json-ast': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/extension-json-ast': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
     transitivePeerDependencies:
       - '@lezer/common'
     dev: false
 
-  /@coze-editor/extension-json-unnecessary-properties@0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
+  /@coze-editor/extension-json-unnecessary-properties@0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
     resolution: {integrity: sha512-fqNno6NgBRnJbSKAyMqNWaubvRch1SZjpCsVNwNQcAybxzBqKNfkzoOHsB8XuY1oL+U/UrhZH32WVkcAYlShKQ==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
       '@codemirror/view': ^6.26.1
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/extension-json-ast': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/extension-json-ast': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
     transitivePeerDependencies:
       - '@lezer/common'
     dev: false
 
-  /@coze-editor/extension-links@0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0):
+  /@coze-editor/extension-links@0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0):
     resolution: {integrity: sha512-w6b36AARA/XTg+G21WKo4aAzWxjyRHd7r/db4t3CpHePgZ/Ol1Z6nqwTgknwStm21ub/kcSHeUvq+YKX6K2wmg==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
       '@codemirror/view': ^6.26.1
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
     dev: false
 
-  /@coze-editor/extension-lint@0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0):
+  /@coze-editor/extension-lint@0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0):
     resolution: {integrity: sha512-fTZH57Whf43m4AHytcirnJKYnRa6RO8nrSnEbi1i8zYiQLbNsY/uQ+ME/8wamJBgIG8Q9mJ02aBpoSu13ZLICQ==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
       '@codemirror/view': ^6.26.1
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
       crelt: 1.0.6
     dev: false
 
-  /@coze-editor/extension-placeholder@0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
+  /@coze-editor/extension-placeholder@0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
     resolution: {integrity: sha512-0axi97xt19OQSPZQp6bPXEmAduY74mkBBVLFISZrX5ZGS5O78c/bRmlaSZi1ofgutIUx9/7LusQAzUg49h+Xrw==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
       '@codemirror/view': ^6.26.1
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
     transitivePeerDependencies:
       - '@lezer/common'
     dev: false
 
-  /@coze-editor/extension-regexp-decorator@0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0):
+  /@coze-editor/extension-regexp-decorator@0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0):
     resolution: {integrity: sha512-eplGwOm2zTWNiDaGrmd48E+iiVRr955PegFNKoAAt/Xfchmo1cAMKGB+C1wsvQKOhcRmG+NpGXbjNnewfmyZgA==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
       '@codemirror/view': ^6.26.1
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
     dev: false
 
-  /@coze-editor/extension-scrollbar@0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0):
+  /@coze-editor/extension-scrollbar@0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0):
     resolution: {integrity: sha512-0Azq69k6xTtpasuQWUnHp9sIzEwGVS8QiakRSltPyX6JORONNKa18pTTnspURL2BH68jp/gmE8YfxODWvafpRA==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
       '@codemirror/view': ^6.26.1
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
       overlayscrollbars: 2.11.4
     dev: false
 
-  /@coze-editor/extensions@0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0):
+  /@coze-editor/extensions@0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0):
     resolution: {integrity: sha512-ORM9nuhrq3L/VAmxLkiy77Q0Aoqm8BtC5RGt5Ze0cZoCTnM+Ne6U1wJGic8aHVpCSpRA/UwBsMqALnky0UtmHw==}
     peerDependencies:
       '@codemirror/language': ^6.0.0
@@ -6202,11 +6203,11 @@ packages:
       '@codemirror/view': ^6.26.1
     dependencies:
       '@codemirror/language': 6.10.7
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/extension-placeholder': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/extension-placeholder': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
       '@coze-editor/lezer-parser-template': 0.1.0-alpha.8d7a30
-      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
       '@lezer/common': 1.2.3
       crelt: 1.0.6
       es-toolkit: 1.39.5
@@ -6241,7 +6242,7 @@ packages:
       vscode-languageserver-types: 3.17.5
     dev: false
 
-  /@coze-editor/preset-code@0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30)(@lezer/common@1.2.3):
+  /@coze-editor/preset-code@0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/code-language-shared@0.1.0-alpha.8d7a30)(@lezer/common@1.2.3):
     resolution: {integrity: sha512-mV6qBq8FSbvJVevmt+k7FY8vADIxLeycVSaisUab1osLPJSYApd+4DTfYEtVhMudDN6KFx2PbUhWfZwnOnHGrg==}
     peerDependencies:
       '@codemirror/commands': ^6.3.3
@@ -6252,22 +6253,22 @@ packages:
       '@codemirror/autocomplete': 6.18.4
       '@codemirror/commands': 6.7.1
       '@codemirror/language': 6.10.7
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/code-language-shared': 0.1.0-alpha.8d7a30(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/core-plugins': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/extension-completion-icons': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/extension-links': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/extension-lint': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/extension-scrollbar': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/extensions': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/preset-universal': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/vscode': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
+      '@coze-editor/code-language-shared': 0.1.0-alpha.8d7a30(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/core-plugins': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/extension-completion-icons': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/extension-links': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/extension-lint': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/extension-scrollbar': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/extensions': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/preset-universal': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/vscode': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
       '@lezer/highlight': 1.2.1
       '@nozbe/microfuzz': 1.0.0
-      codemirror-shiki: 0.2.3(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(shiki@3.7.0)
+      codemirror-shiki: 0.2.3(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(shiki@3.7.0)
       marked: 15.0.12
       marked-shiki: 1.2.0(marked@15.0.12)(shiki@3.7.0)
       shiki: 3.7.0
@@ -6278,7 +6279,7 @@ packages:
       - '@lezer/common'
     dev: false
 
-  /@coze-editor/preset-expression@0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
+  /@coze-editor/preset-expression@0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
     resolution: {integrity: sha512-U/x5ausLukTxgH5lwO7HmMMOh1eaNNJGsuFKr2C13msvI7BjGo6AEBxz8F0HMiw1+pC87EEPdkg+IB50kmmL7Q==}
     peerDependencies:
       '@codemirror/commands': ^6.3.3
@@ -6288,27 +6289,27 @@ packages:
       '@codemirror/autocomplete': 6.18.4
       '@codemirror/commands': 6.7.1
       '@codemirror/language': 6.10.7
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/core-plugins': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/extensions': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
+      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/core-plugins': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/extensions': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
     transitivePeerDependencies:
       - '@lezer/common'
     dev: false
 
-  /@coze-editor/preset-none@0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0):
+  /@coze-editor/preset-none@0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0):
     resolution: {integrity: sha512-714dcAcfDKLQb+dxPqkNDL7gC/8HjVCkSxl1kPnKKWbc0fK12hkmcsePoYS4KG/6vZKKGW322Lh+1dLkATYwiA==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
       '@codemirror/view': ^6.26.1
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
+      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
     dev: false
 
-  /@coze-editor/preset-prompt@0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0):
+  /@coze-editor/preset-prompt@0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0):
     resolution: {integrity: sha512-v7c2uhtS0tG1JnDhgYH5qiCzR+H9Pbq1bn3gVBflv2sHvRVE54kCv9uQRAre2I7TBAm0VInicXmH05Mi1TTOtw==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
@@ -6316,13 +6317,13 @@ packages:
     dependencies:
       '@codemirror/autocomplete': 6.18.4
       '@codemirror/language': 6.10.7
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/core-plugins': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/extensions': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
+      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/core-plugins': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/extensions': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
       '@coze-editor/lezer-parser-jinja2': 0.1.0-alpha.8d7a30
-      '@coze-editor/preset-expression': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/preset-expression': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
       '@lezer/common': 1.2.3
       '@lezer/html': 1.3.10
       '@lezer/markdown': 1.4.3
@@ -6330,24 +6331,24 @@ packages:
       - '@codemirror/commands'
     dev: false
 
-  /@coze-editor/preset-universal@0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
+  /@coze-editor/preset-universal@0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
     resolution: {integrity: sha512-uv+9u2mRawuzeJcRDiY/Wiwn3DuFpQ2jvvwePe8aXmXZHeOG93FPnuNJ7zVo5xSDF6isbUuPJWKfavLP+XnjhA==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
       '@codemirror/view': ^6.26.1
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/core-plugins': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/extensions': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
+      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/core-plugins': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/extensions': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
     transitivePeerDependencies:
       - '@codemirror/commands'
       - '@codemirror/language'
       - '@lezer/common'
     dev: false
 
-  /@coze-editor/preset-variable@0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0):
+  /@coze-editor/preset-variable@0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0):
     resolution: {integrity: sha512-ZlbD2PKhkoorb1j7aSJrj+r2W/chwygpwLXZT8Fhd769OaeLsW8F4X4pE5FJkcdrz5Bhx4g4n4uEuprLVGxFWw==}
     peerDependencies:
       '@codemirror/commands': ^6.3.3
@@ -6357,19 +6358,19 @@ packages:
       '@codemirror/autocomplete': 6.18.4
       '@codemirror/commands': 6.7.1
       '@codemirror/language': 6.10.7
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/core-plugins': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/extensions': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/preset-expression': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/core-plugins': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/extensions': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/preset-expression': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
       '@lezer/common': 1.2.3
       '@lezer/javascript': 1.4.21
       '@lezer/python': 1.1.18
     dev: false
 
-  /@coze-editor/react-components@0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/react@0.1.0-alpha.8d7a30)(@lezer/common@1.2.3)(@types/react@18.3.16)(react-dom@18.3.1)(react@18.3.1):
+  /@coze-editor/react-components@0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/react@0.1.0-alpha.8d7a30)(@lezer/common@1.2.3)(@types/react@18.3.16)(react-dom@18.3.1)(react@18.3.1):
     resolution: {integrity: sha512-WMKBso8FS4GsRLYgT2Hq3/+LGRE8bJNI9nV1JbcAcRsY5a3SlOQN4iLZb1N9ZXVIggl6cARcYJSYdQ7h1dwSaQ==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
@@ -6380,14 +6381,14 @@ packages:
     dependencies:
       '@codemirror/language': 6.10.7
       '@codemirror/merge': 6.10.2
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/extension-placeholder': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/extensions': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/react': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(react-dom@18.3.1)(react@18.3.1)
-      '@coze-editor/react-hooks': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/react@0.1.0-alpha.8d7a30)(react-dom@18.3.1)(react@18.3.1)
-      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/vscode': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
+      '@coze-editor/extension-placeholder': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/extensions': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/react': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(react-dom@18.3.1)(react@18.3.1)
+      '@coze-editor/react-hooks': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/react@0.1.0-alpha.8d7a30)(react-dom@18.3.1)(react@18.3.1)
+      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/vscode': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
       '@floating-ui/dom': 1.7.2
       '@lezer/highlight': 1.2.1
       '@lukeed/uuid': 2.0.1
@@ -6402,7 +6403,7 @@ packages:
       - '@types/react'
     dev: false
 
-  /@coze-editor/react-hooks@0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/react@0.1.0-alpha.8d7a30)(react-dom@18.3.1)(react@18.3.1):
+  /@coze-editor/react-hooks@0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/react@0.1.0-alpha.8d7a30)(react-dom@18.3.1)(react@18.3.1):
     resolution: {integrity: sha512-vQMiAtm4OIpDrLqVG+2e1w3PBat8NrSZAu57pAhppmRvqZUCBrngqeg9iYB/tnzvxj35NwyecLcLmnriTjy6fA==}
     peerDependencies:
       '@codemirror/commands': ^6.3.3
@@ -6413,14 +6414,14 @@ packages:
       react-dom: ~18.2.0
     dependencies:
       '@codemirror/commands': 6.7.1
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/react': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(react-dom@18.3.1)(react@18.3.1)
+      '@coze-editor/react': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(react-dom@18.3.1)(react@18.3.1)
       react: 18.3.1
       react-dom: 18.3.1(react@18.3.1)
     dev: false
 
-  /@coze-editor/react-merge@0.1.0-alpha.8d7a30(@codemirror/merge@6.10.2)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/react@0.1.0-alpha.8d7a30)(react-dom@18.3.1)(react@18.3.1):
+  /@coze-editor/react-merge@0.1.0-alpha.8d7a30(@codemirror/merge@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/react@0.1.0-alpha.8d7a30)(react-dom@18.3.1)(react@18.3.1):
     resolution: {integrity: sha512-vsUO3O7y7vHivJ5c3J/rCj3gwKOEgnIjvsEWyyBqkN2Pq7z8i7pnurzRjIRmu+2vUhWQrapkCNq+pk7bRvyjdg==}
     peerDependencies:
       '@codemirror/merge': ^6.10.0
@@ -6431,14 +6432,14 @@ packages:
       react-dom: ~18.2.0
     dependencies:
       '@codemirror/merge': 6.10.2
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/react': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(react-dom@18.3.1)(react@18.3.1)
+      '@coze-editor/react': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(react-dom@18.3.1)(react@18.3.1)
       react: 18.3.1
       react-dom: 18.3.1(react@18.3.1)
     dev: false
 
-  /@coze-editor/react@0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(react-dom@18.3.1)(react@18.3.1):
+  /@coze-editor/react@0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(react-dom@18.3.1)(react@18.3.1):
     resolution: {integrity: sha512-wUg1LDyNMAy/m03cV/nd53xQ2ZG2aIQLHcpWqSVy1qNy+urLyYxtR9mDsPMrcheIdSWGFQYHMdVcqCsHPIffBQ==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
@@ -6446,39 +6447,39 @@ packages:
       react: ~18.2.0
       react-dom: ~18.2.0
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
+      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
       react: 18.3.1
       react-dom: 18.3.1(react@18.3.1)
     dev: false
 
-  /@coze-editor/utils@0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
+  /@coze-editor/utils@0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3):
     resolution: {integrity: sha512-z/XsahazUIYbfWmnXQHtQVa9iqyhN8z1sdoZBX+z03tAkKgbIznzVt0LyB+uT+nTDmWJ4zJ7SlU3LJjEEXgfZQ==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
       '@codemirror/view': ^6.26.1
       '@lezer/common': ^1.2.2
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
       '@lezer/common': 1.2.3
     dev: false
 
-  /@coze-editor/vscode@0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0):
+  /@coze-editor/vscode@0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0):
     resolution: {integrity: sha512-LvbiK1zlMShOE8wVPGoxvWKDq5vYDJhPR4fDZW7AIWBNqpK7bt2svzYjL8dP0jQJUwD9oD67OekCu0gfgXLrZw==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
       '@codemirror/view': ^6.26.1
     dependencies:
       '@codemirror/search': 6.5.11
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
       '@lezer/highlight': 1.2.1
       crelt: 1.0.6
     dev: false
 
-  /@coze-editor/vue-components@0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@coze-editor/vue@0.1.0-alpha.8d7a30)(@lezer/common@1.2.3)(vue@3.5.17):
+  /@coze-editor/vue-components@0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@coze-editor/vue@0.1.0-alpha.8d7a30)(@lezer/common@1.2.3)(vue@3.5.17):
     resolution: {integrity: sha512-hX9aXUPKPyUuIVpS1vlcdaJ5HgqhGREvoE44cFAvrDZOrdrBzupqAeUnaOCJWlAeAWamg5YQGSFIhcj/wN9nXQ==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
@@ -6486,12 +6487,12 @@ packages:
       '@coze-editor/vue': 0.1.0-alpha.8d7a30
       vue: ^3.5.0
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/extension-placeholder': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/extensions': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/vue': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)(vue@3.5.17)
+      '@coze-editor/extension-placeholder': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/extensions': 0.1.0-alpha.8d7a30(@codemirror/language@6.10.7)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/utils': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/vue': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)(vue@3.5.17)
       '@floating-ui/dom': 1.7.2
       vue: 3.5.17(typescript@5.0.4)
     transitivePeerDependencies:
@@ -6499,18 +6500,18 @@ packages:
       - '@lezer/common'
     dev: false
 
-  /@coze-editor/vue@0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)(vue@3.5.17):
+  /@coze-editor/vue@0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)(vue@3.5.17):
     resolution: {integrity: sha512-PHXsE1ue3yHMR3EvaxyByT0Xh7jGKaqX5nDISJGZVB3Y/qzfNn+tVxCicflwaDBbV6KOYTG3NF48BC93p6Jnhg==}
     peerDependencies:
       '@codemirror/state': ^6.4.1
       '@codemirror/view': ^6.26.1
       vue: ^3.5.0
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
-      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)
-      '@coze-editor/core-plugins': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
-      '@coze-editor/extension-placeholder': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/core': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)
+      '@coze-editor/core-plugins': 0.1.0-alpha.8d7a30(@codemirror/commands@6.7.1)(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
+      '@coze-editor/extension-placeholder': 0.1.0-alpha.8d7a30(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(@lezer/common@1.2.3)
       vue: 3.5.17(typescript@5.0.4)
     transitivePeerDependencies:
       - '@codemirror/commands'
@@ -11462,14 +11463,14 @@ packages:
       type-is: 1.6.18
     dev: false
 
-  /codemirror-shiki@0.2.3(@codemirror/state@6.5.0)(@codemirror/view@6.38.0)(shiki@3.7.0):
+  /codemirror-shiki@0.2.3(@codemirror/state@6.5.2)(@codemirror/view@6.38.0)(shiki@3.7.0):
     resolution: {integrity: sha512-sbpvkOp4elh6qpd9NqLUHbQLXriLMHF5uNTlSMe5rxbIH0MtQAFwg8O3jaqo+tIq7SA7rqKIl8uUdRJxaWMCTA==}
     peerDependencies:
       '@codemirror/state': ^6
       '@codemirror/view': ^6
       shiki: '>=2.0.0'
     dependencies:
-      '@codemirror/state': 6.5.0
+      '@codemirror/state': 6.5.2
       '@codemirror/view': 6.38.0
       shiki: 3.7.0
     dev: false

+ 2 - 1
packages/materials/form-materials/package.json

@@ -43,7 +43,8 @@
     "inquirer": "^9.2.7",
     "immer": "~10.1.1",
     "@coze-editor/editor": "0.1.0-alpha.8d7a30",
-    "@codemirror/view": "~6.38.0"
+    "@codemirror/view": "~6.38.0",
+    "@codemirror/state": "~6.5.2"
   },
   "devDependencies": {
     "@flowgram.ai/eslint-config": "workspace:*",

+ 9 - 0
packages/materials/form-materials/src/components/code-editor/config.json

@@ -0,0 +1,9 @@
+{
+  "name": "code-editor",
+  "depMaterials": [],
+  "depPackages": [
+    "@coze-editor/editor@0.1.0-alpha.8d7a30",
+    "@codemirror/view",
+    "@codemirror/state"
+  ]
+}

+ 59 - 0
packages/materials/form-materials/src/components/code-editor/index.tsx

@@ -0,0 +1,59 @@
+/**
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
+ * SPDX-License-Identifier: MIT
+ */
+
+import React, { useRef } from 'react';
+
+import { createRenderer, EditorProvider } from '@coze-editor/editor/react';
+import preset, { type EditorAPI } from '@coze-editor/editor/preset-code';
+import { EditorView } from '@codemirror/view';
+
+import { getSuffixByLanguageId } from './utils';
+
+import './theme';
+import './language-features';
+
+const OriginCodeEditor = createRenderer(preset, [
+  EditorView.theme({
+    '&.cm-focused': {
+      outline: 'none',
+    },
+  }),
+]);
+
+export interface CodeEditorPropsType extends React.PropsWithChildren<{}> {
+  value?: string;
+  onChange?: (value: string) => void;
+  languageId: 'python' | 'typescript' | 'shell' | 'json';
+  theme?: 'dark' | 'light';
+}
+
+export function CodeEditor({
+  value,
+  onChange,
+  languageId = 'python',
+  theme = 'light',
+  children,
+}: CodeEditorPropsType) {
+  const editorRef = useRef<EditorAPI | null>(null);
+
+  return (
+    <EditorProvider>
+      <OriginCodeEditor
+        defaultValue={value}
+        options={{
+          uri: `file:///untitled${getSuffixByLanguageId(languageId)}`,
+          languageId,
+          theme,
+        }}
+        didMount={(editor: EditorAPI) => {
+          editorRef.current = editor;
+        }}
+        onChange={(e) => onChange?.(e.value)}
+      >
+        {children}
+      </OriginCodeEditor>
+    </EditorProvider>
+  );
+}

+ 24 - 0
packages/materials/form-materials/src/components/code-editor/language-features.ts

@@ -0,0 +1,24 @@
+/**
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
+ * SPDX-License-Identifier: MIT
+ */
+
+import { languages } from '@coze-editor/editor/preset-code';
+// import { typescript } from '@coze-editor/editor/language-typescript';
+import { shell } from '@coze-editor/editor/language-shell';
+import { python } from '@coze-editor/editor/language-python';
+import { json } from '@coze-editor/editor/language-json';
+import { mixLanguages } from '@coze-editor/editor';
+
+languages.register('python', python);
+// languages.register('typescript', typescript);
+
+languages.register('json', {
+  // mixLanguages is used to solve the problem that interpolation also uses parentheses, which causes incorrect highlighting
+  language: mixLanguages({
+    outerLanguage: json.language,
+  }),
+  languageService: json.languageService,
+});
+
+languages.register('shell', shell);

+ 119 - 0
packages/materials/form-materials/src/components/code-editor/theme/dark.ts

@@ -0,0 +1,119 @@
+/**
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
+ * SPDX-License-Identifier: MIT
+ */
+
+import { createTheme, tags as t } from '@coze-editor/editor/preset-code';
+import { type Extension } from '@codemirror/state';
+
+const colors = {
+  background: '#151B27',
+  // syntax
+  comment: '#FFFFFF63',
+  key: '#39E5D7',
+  string: '#FF94D2',
+  number: '#FF9933',
+  boolean: '#78B0FF',
+  null: '#78B0FF',
+  separator: '#FFFFFFC9',
+};
+
+export const darkTheme: Extension = createTheme({
+  variant: 'dark',
+  settings: {
+    background: colors.background,
+    foreground: '#fff',
+    caret: '#AEAFAD',
+    selection: '#d9d9d942',
+    gutterBackground: colors.background,
+    gutterForeground: '#FFFFFF63',
+    gutterBorderColor: 'transparent',
+    gutterBorderWidth: 0,
+    lineHighlight: '#272e3d36',
+    bracketColors: ['#FFEF61', '#DD99FF', '#78B0FF'],
+    tooltip: {
+      backgroundColor: '#363D4D',
+      color: '#fff',
+      border: 'none',
+    },
+    link: {
+      color: '#4daafc',
+    },
+    completionItemHover: {
+      backgroundColor: '#FFFFFF0F',
+    },
+    completionItemSelected: {
+      backgroundColor: '#FFFFFF17',
+    },
+    completionItemIcon: {
+      color: '#FFFFFFC9',
+    },
+    completionItemLabel: {
+      color: '#FFFFFFC9',
+    },
+    completionItemInfo: {
+      color: '#FFFFFFC9',
+    },
+    completionItemDetail: {
+      color: '#FFFFFF63',
+    },
+  },
+  styles: [
+    // json
+    {
+      tag: t.comment,
+      color: colors.comment,
+    },
+    {
+      tag: [t.propertyName],
+      color: colors.key,
+    },
+    {
+      tag: [t.string],
+      color: colors.string,
+    },
+    {
+      tag: [t.number],
+      color: colors.number,
+    },
+    {
+      tag: [t.bool],
+      color: colors.boolean,
+    },
+    {
+      tag: [t.null],
+      color: colors.null,
+    },
+    {
+      tag: [t.separator],
+      color: colors.separator,
+    },
+
+    // markdown
+    {
+      tag: [t.heading],
+      color: '#6b6bff',
+    },
+    {
+      tag: [t.processingInstruction],
+      color: '#6b6bff',
+    },
+
+    // shell
+    // curl
+    {
+      tag: [t.standard(t.variableName)],
+      color: '#3BEB84',
+    },
+    // -X
+    {
+      tag: [t.attributeName],
+      color: '#FF9933',
+    },
+    // url in string (includes quotes), e.g. "https://..."
+    {
+      tag: [t.special(t.string)],
+      color: '#78B0FF',
+    },
+  ],
+});

+ 12 - 0
packages/materials/form-materials/src/components/code-editor/theme/index.ts

@@ -0,0 +1,12 @@
+/**
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
+ * SPDX-License-Identifier: MIT
+ */
+
+import { themes } from '@coze-editor/editor/preset-code';
+
+import { lightTheme } from './light';
+import { darkTheme } from './dark';
+
+themes.register('dark', darkTheme);
+themes.register('light', lightTheme);

+ 119 - 0
packages/materials/form-materials/src/components/code-editor/theme/light.ts

@@ -0,0 +1,119 @@
+/**
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
+ * SPDX-License-Identifier: MIT
+ */
+
+import { createTheme, tags as t } from '@coze-editor/editor/preset-code';
+import { type Extension } from '@codemirror/state';
+
+const colors = {
+  background: '#F7F7FC',
+  // syntax
+  comment: '#000A298A',
+  key: '#00818C',
+  string: '#D1009D',
+  number: '#C74200',
+  boolean: '#2B57D9',
+  null: '#2B57D9',
+  separator: '#0F1529D1',
+};
+
+export const lightTheme: Extension = createTheme({
+  variant: 'light',
+  settings: {
+    background: '#fff',
+    foreground: '#000',
+    caret: '#000',
+    selection: '#d9d9d9',
+    gutterBackground: '#f0f0f0',
+    gutterForeground: '#666',
+    gutterBorderColor: 'transparent',
+    gutterBorderWidth: 0,
+    lineHighlight: '#f0f0f0',
+    bracketColors: ['#FFEF61', '#DD99FF', '#78B0FF'],
+    tooltip: {
+      backgroundColor: '#f0f0f0',
+      color: '#000',
+      border: '1px solid #ccc',
+    },
+    link: {
+      color: '#007bff',
+    },
+    completionItemHover: {
+      backgroundColor: '#f0f0f0',
+    },
+    completionItemSelected: {
+      backgroundColor: '#e0e0e0',
+    },
+    completionItemIcon: {
+      color: '#333',
+    },
+    completionItemLabel: {
+      color: '#333',
+    },
+    completionItemInfo: {
+      color: '#333',
+    },
+    completionItemDetail: {
+      color: '#666',
+    },
+  },
+  styles: [
+    // JSON
+    {
+      tag: t.comment,
+      color: colors.comment,
+    },
+    {
+      tag: [t.propertyName],
+      color: colors.key,
+    },
+    {
+      tag: [t.string],
+      color: colors.string,
+    },
+    {
+      tag: [t.number],
+      color: colors.number,
+    },
+    {
+      tag: [t.bool],
+      color: colors.boolean,
+    },
+    {
+      tag: [t.null],
+      color: colors.null,
+    },
+    {
+      tag: [t.separator],
+      color: colors.separator,
+    },
+
+    // markdown
+    {
+      tag: [t.heading],
+      color: '#3e76ef',
+    },
+    {
+      tag: [t.processingInstruction],
+      color: '#3e76ef',
+    },
+
+    // shell
+    // curl
+    {
+      tag: [t.standard(t.variableName)],
+      color: '#00804A',
+    },
+    // -X
+    {
+      tag: [t.attributeName],
+      color: '#C74200',
+    },
+    // url in string (includes quotes), e.g. "https://..."
+    {
+      tag: [t.special(t.string)],
+      color: '#2B57D9',
+    },
+  ],
+});

+ 20 - 0
packages/materials/form-materials/src/components/code-editor/utils.ts

@@ -0,0 +1,20 @@
+/**
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
+ * SPDX-License-Identifier: MIT
+ */
+
+export function getSuffixByLanguageId(languageId: string) {
+  if (languageId === 'python') {
+    return '.py';
+  }
+  if (languageId === 'typescript') {
+    return '.ts';
+  }
+  if (languageId === 'shell') {
+    return '.sh';
+  }
+  if (languageId === 'json') {
+    return '.json';
+  }
+  return '';
+}

+ 2 - 0
packages/materials/form-materials/src/components/index.ts

@@ -14,3 +14,5 @@ export * from './batch-outputs';
 export * from './prompt-editor';
 export * from './prompt-editor-with-variables';
 export * from './prompt-editor-with-inputs';
+export * from './code-editor';
+export * from './json-editor-with-variables';

+ 13 - 0
packages/materials/form-materials/src/components/json-editor-with-variables/config.json

@@ -0,0 +1,13 @@
+{
+  "name": "json-editor-with-variables",
+  "depMaterials": [
+    "variable-selector",
+    "code-editor"
+  ],
+  "depPackages": [
+    "@coze-editor/editor@0.1.0-alpha.8d7a30",
+    "@codemirror/view",
+    "styled-components",
+    "@douyinfe/semi-ui"
+  ]
+}

+ 173 - 0
packages/materials/form-materials/src/components/json-editor-with-variables/extensions/variable-tag.tsx

@@ -0,0 +1,173 @@
+/**
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
+ * SPDX-License-Identifier: MIT
+ */
+
+import React, { useLayoutEffect } from 'react';
+
+import { createRoot, Root } from 'react-dom/client';
+import { isEqual, last } from 'lodash';
+import {
+  BaseVariableField,
+  Disposable,
+  DisposableCollection,
+  Scope,
+  useCurrentScope,
+} from '@flowgram.ai/editor';
+import { Popover } from '@douyinfe/semi-ui';
+import { IconIssueStroked } from '@douyinfe/semi-icons';
+import { useInjector } from '@coze-editor/editor/react';
+import {
+  Decoration,
+  DecorationSet,
+  EditorView,
+  MatchDecorator,
+  ViewPlugin,
+  WidgetType,
+} from '@codemirror/view';
+
+import { UIPopoverContent, UIRootTitle, UITag, UIVarName } from '../styles';
+
+class VariableTagWidget extends WidgetType {
+  keyPath?: string[];
+
+  toDispose = new DisposableCollection();
+
+  scope: Scope;
+
+  root: Root;
+
+  constructor({ keyPath, scope }: { keyPath?: string[]; scope: Scope }) {
+    super();
+
+    this.keyPath = keyPath;
+    this.scope = scope;
+  }
+
+  renderIcon = (icon: string | JSX.Element) => {
+    if (typeof icon === 'string') {
+      return <img style={{ marginRight: 8 }} width={12} height={12} src={icon} />;
+    }
+
+    return icon;
+  };
+
+  renderVariable(v?: BaseVariableField) {
+    if (!v) {
+      this.root.render(
+        <UITag prefixIcon={<IconIssueStroked />} color="amber">
+          Unknown
+        </UITag>
+      );
+      return;
+    }
+
+    const rootField = last(v.parentFields);
+
+    const rootTitle = (
+      <UIRootTitle>{rootField?.meta.title ? `${rootField.meta.title} -` : ''}</UIRootTitle>
+    );
+    const rootIcon = this.renderIcon(rootField?.meta.icon);
+
+    this.root.render(
+      <Popover
+        content={
+          <UIPopoverContent>
+            {rootIcon}
+            {rootTitle}
+            <UIVarName>{v?.keyPath.slice(1).join('.')}</UIVarName>
+          </UIPopoverContent>
+        }
+      >
+        <UITag prefixIcon={rootIcon}>
+          {rootTitle}
+          <UIVarName>{v?.key}</UIVarName>
+        </UITag>
+      </Popover>
+    );
+  }
+
+  toDOM(view: EditorView): HTMLElement {
+    const dom = document.createElement('span');
+
+    this.root = createRoot(dom);
+
+    this.toDispose.push(
+      Disposable.create(() => {
+        this.root.unmount();
+      })
+    );
+
+    this.toDispose.push(
+      this.scope.available.trackByKeyPath(
+        this.keyPath,
+        (v) => {
+          this.renderVariable(v);
+        },
+        { triggerOnInit: false }
+      )
+    );
+
+    this.renderVariable(this.scope.available.getByKeyPath(this.keyPath));
+
+    return dom;
+  }
+
+  eq(other: VariableTagWidget) {
+    return isEqual(this.keyPath, other.keyPath);
+  }
+
+  ignoreEvent(): boolean {
+    return false;
+  }
+
+  destroy(dom: HTMLElement): void {
+    this.toDispose.dispose();
+  }
+}
+
+export function VariableTagInject() {
+  const injector = useInjector();
+
+  const scope = useCurrentScope();
+
+  // 基于 {{var}} 的正则进行匹配,匹配后进行自定义渲染
+  useLayoutEffect(() => {
+    const atMatcher = new MatchDecorator({
+      regexp: /\{\{([^\}]+)\}\}/g,
+      decoration: (match) =>
+        Decoration.replace({
+          widget: new VariableTagWidget({
+            keyPath: match[1]?.split('.') ?? [],
+            scope,
+          }),
+        }),
+    });
+
+    return injector.inject([
+      ViewPlugin.fromClass(
+        class {
+          decorations: DecorationSet;
+
+          constructor(private view: EditorView) {
+            this.decorations = atMatcher.createDeco(view);
+          }
+
+          update() {
+            this.decorations = atMatcher.createDeco(this.view);
+          }
+        },
+        {
+          decorations: (p) => p.decorations,
+          provide(p) {
+            return EditorView.atomicRanges.of(
+              (view) => view.plugin(p)?.decorations ?? Decoration.none
+            );
+          },
+        }
+      ),
+    ]);
+  }, [injector]);
+
+  return null;
+}

+ 83 - 0
packages/materials/form-materials/src/components/json-editor-with-variables/extensions/variable-tree.tsx

@@ -0,0 +1,83 @@
+/**
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
+ * SPDX-License-Identifier: MIT
+ */
+
+import React, { useEffect, useState } from 'react';
+
+import { Popover, Tree } from '@douyinfe/semi-ui';
+import {
+  Mention,
+  MentionOpenChangeEvent,
+  getCurrentMentionReplaceRange,
+  useEditor,
+  PositionMirror,
+} from '@coze-editor/editor/react';
+import { EditorAPI } from '@coze-editor/editor/preset-prompt';
+
+import { useVariableTree } from '../../variable-selector';
+
+export function VariableTree() {
+  const [posKey, setPosKey] = useState('');
+  const [visible, setVisible] = useState(false);
+  const [position, setPosition] = useState(-1);
+  const editor = useEditor<EditorAPI>();
+
+  function insert(variablePath: string) {
+    const range = getCurrentMentionReplaceRange(editor.$view.state);
+
+    if (!range) {
+      return;
+    }
+
+    editor.replaceText({
+      ...range,
+      text: '{{' + variablePath + '}}',
+    });
+
+    setVisible(false);
+  }
+
+  function handleOpenChange(e: MentionOpenChangeEvent) {
+    setPosition(e.state.selection.main.head);
+    setVisible(e.value);
+  }
+
+  useEffect(() => {
+    if (!editor) {
+      return;
+    }
+  }, [editor, visible]);
+
+  const treeData = useVariableTree({});
+
+  return (
+    <>
+      <Mention triggerCharacters={['@']} onOpenChange={handleOpenChange} />
+
+      <Popover
+        visible={visible}
+        trigger="custom"
+        position="topLeft"
+        rePosKey={posKey}
+        content={
+          <div style={{ width: 300 }}>
+            <Tree
+              treeData={treeData}
+              onSelect={(v) => {
+                insert(v);
+              }}
+            />
+          </div>
+        }
+      >
+        {/* PositionMirror allows the Popover to appear at the specified cursor position */}
+        <PositionMirror
+          position={position}
+          // When Doc scroll, update position
+          onChange={() => setPosKey(String(Math.random()))}
+        />
+      </Popover>
+    </>
+  );
+}

+ 19 - 0
packages/materials/form-materials/src/components/json-editor-with-variables/index.tsx

@@ -0,0 +1,19 @@
+/**
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
+ * SPDX-License-Identifier: MIT
+ */
+
+import React from 'react';
+
+import { VariableTree } from './extensions/variable-tree';
+import { VariableTagInject } from './extensions/variable-tag';
+import { CodeEditor, type CodeEditorPropsType } from '../code-editor';
+
+export function JsonEditorWithVariables(props: Omit<CodeEditorPropsType, 'languageId'>) {
+  return (
+    <CodeEditor languageId="json" {...props}>
+      <VariableTree />
+      <VariableTagInject />
+    </CodeEditor>
+  );
+}

+ 44 - 0
packages/materials/form-materials/src/components/json-editor-with-variables/styles.tsx

@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
+ * SPDX-License-Identifier: MIT
+ */
+
+import styled from 'styled-components';
+import { Tag } from '@douyinfe/semi-ui';
+
+export const UIRootTitle = styled.div`
+  margin-right: 4px;
+  min-width: 20px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  color: var(--semi-color-text-2);
+`;
+
+export const UIVarName = styled.div`
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+`;
+
+export const UITag = styled(Tag)`
+  display: inline-flex;
+  align-items: center;
+  justify-content: flex-start;
+  max-width: 300px;
+
+  & .semi-tag-content-center {
+    justify-content: flex-start;
+  }
+
+  &.semi-tag {
+    margin: 0 5px;
+  }
+`;
+
+export const UIPopoverContent = styled.div`
+  padding: 10px;
+  display: inline-flex;
+  align-items: center;
+  justify-content: flex-start;
+`;