@cozeloop/prompt-components 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/basic-editor/custom-facet.js +9 -0
- package/dist/es/basic-editor/diff.js +138 -0
- package/dist/{go-syntax-067c4f5d.mjs → es/basic-editor/extensions/go-syntax.js} +9 -16
- package/dist/es/basic-editor/extensions/go-template.js +16 -0
- package/dist/{go-theme-062a6df6.mjs → es/basic-editor/extensions/go-theme.js} +4 -3
- package/dist/es/basic-editor/extensions/jinja.js +80 -0
- package/dist/es/basic-editor/extensions/keymap.js +442 -0
- package/dist/es/basic-editor/extensions/language-support.js +12 -0
- package/dist/es/basic-editor/extensions/markdown.js +58 -0
- package/dist/es/basic-editor/extensions/search/dom/icon.js +250 -0
- package/dist/es/basic-editor/extensions/search/dom/match-count.js +33 -0
- package/dist/es/basic-editor/extensions/search/index.js +18 -0
- package/dist/es/basic-editor/extensions/search/panel.js +418 -0
- package/dist/es/basic-editor/extensions/search/theme.js +184 -0
- package/dist/es/basic-editor/extensions/validation.js +84 -0
- package/dist/es/basic-editor/extensions/validation.module.js +5 -0
- package/dist/es/basic-editor/extensions/validation_module.css +7 -0
- package/dist/es/basic-editor/extensions/variable.js +178 -0
- package/dist/es/basic-editor/index.js +171 -0
- package/dist/es/code-editor/code-editor.js +83 -0
- package/dist/es/code-editor/index.js +12 -0
- package/dist/es/code-editor/json-editor.js +157 -0
- package/dist/es/code-editor/raw-text-editor.js +46 -0
- package/dist/es/code-editor/text-editor.js +41 -0
- package/dist/es/code-editor/themes/coze-dark.js +112 -0
- package/dist/es/code-editor/themes/coze-light.js +118 -0
- package/dist/es/consts/index.js +12 -0
- package/dist/es/dev-layout/index.js +35 -0
- package/dist/es/idls/fornax_ml_flow2/index.js +2293 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/ai_annotate.js +41 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/aidpcallback.js +108 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/annotation_job.js +52 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/base.js +0 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/batch_infer.js +72 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/dataprocess.js +10 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/dataset.js +36 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/datasetv2.js +139 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/datasetv2job.js +40 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/datasetv2similarity.js +12 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/filter.js +0 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/flow_devops_evaluation_callback_common.js +36 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/flow_devops_prompt_common.js +318 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/fornax_domain_model.js +326 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/ml_flow_domain_model.js +327 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/openapi.js +0 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_annotateservice.js +0 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_annotationjobservice.js +0 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_batchinferservice.js +0 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_crowdsourcingannotationjobservice.js +0 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_dataprocessservice.js +0 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_datasetservice.js +0 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_datasetservicev2.js +0 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_modelservice.js +0 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_openapi_annotationjobservice.js +0 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_openapi_batchinferservice.js +0 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_openapi_datasetservicev2.js +0 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_tagservice.js +0 -0
- package/dist/es/idls/fornax_ml_flow2/namespaces/tag.js +33 -0
- package/dist/es/idls/prompt_api2/index.js +1995 -0
- package/dist/es/idls/prompt_api2/namespaces/base.js +0 -0
- package/dist/es/idls/prompt_api2/namespaces/flow_devops_prompt_callback.js +35 -0
- package/dist/es/idls/prompt_api2/namespaces/flow_devops_prompt_commercial_openapi.js +0 -0
- package/dist/es/idls/prompt_api2/namespaces/flow_devops_prompt_common.js +318 -0
- package/dist/es/idls/prompt_api2/namespaces/flow_devops_prompt_debug.js +0 -0
- package/dist/es/idls/prompt_api2/namespaces/flow_devops_prompt_manage.js +23 -0
- package/dist/es/idls/prompt_api2/namespaces/flow_devops_prompt_mcp.js +0 -0
- package/dist/es/idls/prompt_api2/namespaces/flow_devops_prompt_optimize.js +0 -0
- package/dist/es/idls/prompt_api2/namespaces/flow_devops_prompt_paas.js +43 -0
- package/dist/es/idls/prompt_api2/namespaces/flow_devops_prompt_platform.js +0 -0
- package/dist/es/idls/prompt_api2/namespaces/mcp.js +9 -0
- package/dist/es/idls/prompt_api2/namespaces/model.js +320 -0
- package/dist/es/idls/prompt_api2/namespaces/permission.js +47 -0
- package/dist/es/idls/prompt_api2/namespaces/release.js +25 -0
- package/dist/es/index.js +66 -0
- package/dist/es/mermaid-diagram/index.js +148 -0
- package/dist/es/mermaid-diagram/index.module.js +5 -0
- package/dist/es/mermaid-diagram/index_module.css +4 -0
- package/dist/es/mermaid-diagram/use-svg-pan-zoom.js +49 -0
- package/dist/es/mermaid-diagram/utils.js +74 -0
- package/dist/es/model-config-editor/basic-type.js +71 -0
- package/dist/es/model-config-editor/index.module.js +5 -0
- package/dist/es/model-config-editor/index_module.css +8 -0
- package/dist/es/model-config-editor/model-config-form.js +132 -0
- package/dist/es/model-config-editor/popover-type.js +118 -0
- package/dist/es/model-select/index.js +136 -0
- package/dist/es/model-select/index.module.js +5 -0
- package/dist/es/model-select/index_module.css +14 -0
- package/dist/es/model-select/model-option/index.js +161 -0
- package/dist/es/model-select/model-option/index.module.js +5 -0
- package/dist/es/model-select/model-option/index_module.css +23 -0
- package/dist/es/model-select/model-option-group/index.js +44 -0
- package/dist/es/prompt-editor/index.js +188 -0
- package/dist/es/prompt-editor/index.module.js +5 -0
- package/dist/es/prompt-editor/index_module.css +71 -0
- package/dist/es/prompt-editor/message-type-select.js +74 -0
- package/dist/es/schema-editor/index.js +43 -0
- package/dist/es/utils/base.js +53 -0
- package/dist/es/utils/model-config.js +32 -0
- package/dist/lib/basic-editor/custom-facet.js +33 -0
- package/dist/lib/basic-editor/diff.js +167 -0
- package/dist/lib/basic-editor/extensions/go-syntax.js +146 -0
- package/dist/lib/basic-editor/extensions/go-template.js +50 -0
- package/dist/lib/basic-editor/extensions/go-theme.js +1091 -0
- package/dist/lib/basic-editor/extensions/jinja.js +100 -0
- package/dist/lib/basic-editor/extensions/keymap.js +465 -0
- package/dist/lib/basic-editor/extensions/language-support.js +32 -0
- package/dist/lib/basic-editor/extensions/markdown.js +78 -0
- package/dist/lib/basic-editor/extensions/search/dom/icon.js +291 -0
- package/dist/lib/basic-editor/extensions/search/dom/match-count.js +67 -0
- package/dist/lib/basic-editor/extensions/search/index.js +38 -0
- package/dist/lib/basic-editor/extensions/search/panel.js +429 -0
- package/dist/lib/basic-editor/extensions/search/theme.js +208 -0
- package/dist/lib/basic-editor/extensions/validation.js +118 -0
- package/dist/lib/basic-editor/extensions/validation.module.js +25 -0
- package/dist/lib/basic-editor/extensions/validation_module.css +7 -0
- package/dist/lib/basic-editor/extensions/variable.js +190 -0
- package/dist/lib/basic-editor/index.js +193 -0
- package/dist/lib/code-editor/code-editor.js +117 -0
- package/dist/lib/code-editor/index.js +40 -0
- package/dist/lib/code-editor/json-editor.js +184 -0
- package/dist/lib/code-editor/raw-text-editor.js +70 -0
- package/dist/lib/code-editor/text-editor.js +75 -0
- package/dist/lib/code-editor/themes/coze-dark.js +136 -0
- package/dist/lib/code-editor/themes/coze-light.js +142 -0
- package/dist/lib/consts/index.js +38 -0
- package/dist/lib/dev-layout/index.js +69 -0
- package/dist/lib/idls/fornax_ml_flow2/index.js +2355 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/ai_annotate.js +69 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/aidpcallback.js +140 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/annotation_job.js +82 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/base.js +16 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/batch_infer.js +105 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/dataprocess.js +34 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/dataset.js +63 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/datasetv2.js +177 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/datasetv2job.js +68 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/datasetv2similarity.js +37 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/filter.js +16 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/flow_devops_evaluation_callback_common.js +62 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/flow_devops_prompt_common.js +378 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/fornax_domain_model.js +384 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/ml_flow_domain_model.js +385 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/openapi.js +16 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_annotateservice.js +16 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_annotationjobservice.js +16 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_batchinferservice.js +16 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_crowdsourcingannotationjobservice.js +16 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_dataprocessservice.js +16 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_datasetservice.js +16 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_datasetservicev2.js +16 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_modelservice.js +16 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_openapi_annotationjobservice.js +16 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_openapi_batchinferservice.js +16 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_openapi_datasetservicev2.js +16 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_tagservice.js +16 -0
- package/dist/lib/idls/fornax_ml_flow2/namespaces/tag.js +60 -0
- package/dist/lib/idls/prompt_api2/index.js +2042 -0
- package/dist/lib/idls/prompt_api2/namespaces/base.js +16 -0
- package/dist/lib/idls/prompt_api2/namespaces/flow_devops_prompt_callback.js +62 -0
- package/dist/lib/idls/prompt_api2/namespaces/flow_devops_prompt_commercial_openapi.js +16 -0
- package/dist/lib/idls/prompt_api2/namespaces/flow_devops_prompt_common.js +378 -0
- package/dist/lib/idls/prompt_api2/namespaces/flow_devops_prompt_debug.js +16 -0
- package/dist/lib/idls/prompt_api2/namespaces/flow_devops_prompt_manage.js +49 -0
- package/dist/lib/idls/prompt_api2/namespaces/flow_devops_prompt_mcp.js +16 -0
- package/dist/lib/idls/prompt_api2/namespaces/flow_devops_prompt_optimize.js +16 -0
- package/dist/lib/idls/prompt_api2/namespaces/flow_devops_prompt_paas.js +72 -0
- package/dist/lib/idls/prompt_api2/namespaces/flow_devops_prompt_platform.js +16 -0
- package/dist/lib/idls/prompt_api2/namespaces/mcp.js +33 -0
- package/dist/lib/idls/prompt_api2/namespaces/model.js +377 -0
- package/dist/lib/idls/prompt_api2/namespaces/permission.js +72 -0
- package/dist/lib/idls/prompt_api2/namespaces/release.js +50 -0
- package/dist/lib/index.js +110 -0
- package/dist/lib/mermaid-diagram/index.js +174 -0
- package/dist/lib/mermaid-diagram/index.module.js +25 -0
- package/dist/lib/mermaid-diagram/index_module.css +4 -0
- package/dist/lib/mermaid-diagram/use-svg-pan-zoom.js +83 -0
- package/dist/lib/mermaid-diagram/utils.js +98 -0
- package/dist/lib/model-config-editor/basic-type.js +103 -0
- package/dist/lib/model-config-editor/index.module.js +25 -0
- package/dist/lib/model-config-editor/index_module.css +8 -0
- package/dist/lib/model-config-editor/model-config-form.js +151 -0
- package/dist/lib/model-config-editor/popover-type.js +145 -0
- package/dist/lib/model-select/index.js +170 -0
- package/dist/lib/model-select/index.module.js +25 -0
- package/dist/lib/model-select/index_module.css +14 -0
- package/dist/lib/model-select/model-option/index.js +188 -0
- package/dist/lib/model-select/model-option/index.module.js +25 -0
- package/dist/lib/model-select/model-option/index_module.css +23 -0
- package/dist/lib/model-select/model-option-group/index.js +75 -0
- package/dist/lib/prompt-editor/index.js +218 -0
- package/dist/lib/prompt-editor/index.module.js +25 -0
- package/dist/lib/prompt-editor/index_module.css +71 -0
- package/dist/lib/prompt-editor/message-type-select.js +108 -0
- package/dist/lib/schema-editor/index.js +77 -0
- package/dist/lib/utils/base.js +82 -0
- package/dist/lib/utils/model-config.js +57 -0
- package/dist/{src → types}/basic-editor/custom-facet.d.ts +1 -2
- package/dist/types/basic-editor/diff.d.ts +15 -0
- package/dist/types/basic-editor/extensions/go-syntax.d.ts +71 -0
- package/dist/types/basic-editor/extensions/go-template.d.ts +1 -0
- package/dist/{src → types}/basic-editor/extensions/go-theme.d.ts +1 -1
- package/dist/types/basic-editor/extensions/jinja.d.ts +6 -0
- package/dist/{src → types}/basic-editor/extensions/keymap.d.ts +2 -3
- package/dist/types/basic-editor/extensions/language-support.d.ts +2 -0
- package/dist/types/basic-editor/extensions/markdown.d.ts +2 -0
- package/dist/types/basic-editor/extensions/search/dom/icon.d.ts +59 -0
- package/dist/types/basic-editor/extensions/search/dom/match-count.d.ts +14 -0
- package/dist/types/basic-editor/extensions/search/index.d.ts +1 -0
- package/dist/types/basic-editor/extensions/search/panel.d.ts +32 -0
- package/dist/types/basic-editor/extensions/search/theme.d.ts +1 -0
- package/dist/types/basic-editor/extensions/validation.d.ts +10 -0
- package/dist/types/basic-editor/extensions/variable.d.ts +14 -0
- package/dist/types/basic-editor/index.d.ts +28 -0
- package/dist/types/code-editor/code-editor.d.ts +23 -0
- package/dist/{src → types}/code-editor/index.d.ts +1 -1
- package/dist/types/code-editor/json-editor.d.ts +17 -0
- package/dist/types/code-editor/raw-text-editor.d.ts +11 -0
- package/dist/types/code-editor/text-editor.d.ts +23 -0
- package/dist/types/code-editor/themes/coze-dark.d.ts +1 -0
- package/dist/types/code-editor/themes/coze-light.d.ts +1 -0
- package/dist/{src → types}/consts/index.d.ts +1 -1
- package/dist/types/dev-layout/index.d.ts +13 -0
- package/dist/types/idls/fornax_ml_flow2/index.d.ts +750 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/ai_annotate.d.ts +102 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/aidpcallback.d.ts +227 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/annotation_job.d.ts +402 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/base.d.ts +18 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/batch_infer.d.ts +331 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/dataprocess.d.ts +16 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/dataset.d.ts +88 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/datasetv2.d.ts +462 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/datasetv2job.d.ts +180 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/datasetv2similarity.d.ts +8 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/filter.d.ts +39 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/flow_devops_evaluation_callback_common.d.ts +88 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/flow_devops_prompt_common.d.ts +370 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/fornax_domain_model.d.ts +320 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/ml_flow_domain_model.d.ts +510 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/openapi.d.ts +6 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_annotateservice.d.ts +106 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_annotationjobservice.d.ts +256 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_batchinferservice.d.ts +73 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_crowdsourcingannotationjobservice.d.ts +94 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_dataprocessservice.d.ts +11 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_datasetservice.d.ts +24 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_datasetservicev2.d.ts +653 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_modelservice.d.ts +83 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_openapi_annotationjobservice.d.ts +81 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_openapi_batchinferservice.d.ts +24 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_openapi_datasetservicev2.d.ts +260 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/stone_fornax_ml_flow_tagservice.d.ts +111 -0
- package/dist/types/idls/fornax_ml_flow2/namespaces/tag.d.ts +109 -0
- package/dist/types/idls/prompt_api2/index.d.ts +653 -0
- package/dist/types/idls/prompt_api2/namespaces/base.d.ts +18 -0
- package/dist/types/idls/prompt_api2/namespaces/flow_devops_prompt_callback.d.ts +102 -0
- package/dist/types/idls/prompt_api2/namespaces/flow_devops_prompt_commercial_openapi.d.ts +81 -0
- package/dist/types/idls/prompt_api2/namespaces/flow_devops_prompt_common.d.ts +1270 -0
- package/dist/types/idls/prompt_api2/namespaces/flow_devops_prompt_debug.d.ts +197 -0
- package/dist/types/idls/prompt_api2/namespaces/flow_devops_prompt_manage.d.ts +769 -0
- package/dist/types/idls/prompt_api2/namespaces/flow_devops_prompt_mcp.d.ts +301 -0
- package/dist/types/idls/prompt_api2/namespaces/flow_devops_prompt_optimize.d.ts +155 -0
- package/dist/types/idls/prompt_api2/namespaces/flow_devops_prompt_paas.d.ts +198 -0
- package/dist/types/idls/prompt_api2/namespaces/flow_devops_prompt_platform.d.ts +230 -0
- package/dist/types/idls/prompt_api2/namespaces/mcp.d.ts +95 -0
- package/dist/types/idls/prompt_api2/namespaces/model.d.ts +315 -0
- package/dist/types/idls/prompt_api2/namespaces/permission.d.ts +52 -0
- package/dist/types/idls/prompt_api2/namespaces/release.d.ts +62 -0
- package/dist/{src → types}/index.d.ts +7 -7
- package/dist/types/mermaid-diagram/index.d.ts +12 -0
- package/dist/types/mermaid-diagram/use-svg-pan-zoom.d.ts +17 -0
- package/dist/{src → types}/mermaid-diagram/utils.d.ts +1 -1
- package/dist/types/model-config-editor/basic-type.d.ts +19 -0
- package/dist/types/model-config-editor/model-config-form.d.ts +14 -0
- package/dist/types/model-config-editor/popover-type.d.ts +25 -0
- package/dist/types/model-select/index.d.ts +38 -0
- package/dist/types/model-select/model-option/index.d.ts +30 -0
- package/dist/types/model-select/model-option-group/index.d.ts +15 -0
- package/dist/types/prompt-editor/index.d.ts +30 -0
- package/dist/types/prompt-editor/message-type-select.d.ts +16 -0
- package/dist/types/schema-editor/index.d.ts +18 -0
- package/dist/{src → types}/utils/base.d.ts +4 -5
- package/dist/types/utils/model-config.d.ts +4 -0
- package/package.json +9 -13
- package/dist/edenx.config.d.ts +0 -2
- package/dist/go-syntax-4deb0289.js +0 -8
- package/dist/go-theme-fbd8a4fa.js +0 -1
- package/dist/index.cjs +0 -61
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -2788
- package/dist/src/basic-editor/diff.d.ts +0 -16
- package/dist/src/basic-editor/extensions/go-syntax.d.ts +0 -71
- package/dist/src/basic-editor/extensions/go-template.d.ts +0 -1
- package/dist/src/basic-editor/extensions/jinja.d.ts +0 -4
- package/dist/src/basic-editor/extensions/language-support.d.ts +0 -2
- package/dist/src/basic-editor/extensions/markdown.d.ts +0 -2
- package/dist/src/basic-editor/extensions/search/dom/icon.d.ts +0 -59
- package/dist/src/basic-editor/extensions/search/dom/match-count.d.ts +0 -14
- package/dist/src/basic-editor/extensions/search/index.d.ts +0 -1
- package/dist/src/basic-editor/extensions/search/panel.d.ts +0 -33
- package/dist/src/basic-editor/extensions/search/theme.d.ts +0 -1
- package/dist/src/basic-editor/extensions/validation.d.ts +0 -8
- package/dist/src/basic-editor/extensions/variable.d.ts +0 -11
- package/dist/src/basic-editor/index.d.ts +0 -29
- package/dist/src/code-editor/json-editor.d.ts +0 -18
- package/dist/src/code-editor/raw-text-editor.d.ts +0 -11
- package/dist/src/dev-layout/index.d.ts +0 -7
- package/dist/src/mermaid-diagram/index.d.ts +0 -12
- package/dist/src/mermaid-diagram/use-svg-pan-zoom.d.ts +0 -12
- package/dist/src/model-config-editor/basic-type.d.ts +0 -13
- package/dist/src/model-config-editor/model-config-form.d.ts +0 -13
- package/dist/src/model-config-editor/popover-type.d.ts +0 -19
- package/dist/src/model-select/index.d.ts +0 -27
- package/dist/src/model-select/model-option/index.d.ts +0 -25
- package/dist/src/model-select/model-option-group/index.d.ts +0 -16
- package/dist/src/prompt-editor/index.d.ts +0 -31
- package/dist/src/prompt-editor/message-type-select.d.ts +0 -11
- package/dist/src/schema-editor/index.d.ts +0 -11
- package/dist/src/utils/model-config.d.ts +0 -5
- package/dist/style.css +0 -1
- package/dist/test-build.d.ts +0 -7
- package/dist/vite.config.d.ts +0 -2
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var code_editor_exports = {};
|
|
20
|
+
__export(code_editor_exports, {
|
|
21
|
+
BaseJsonEditor: () => import_json_editor.BaseJsonEditor,
|
|
22
|
+
BaseRawTextEditor: () => import_raw_text_editor.BaseRawTextEditor,
|
|
23
|
+
CodeEditor: () => import_code_editor.CodeEditor,
|
|
24
|
+
EditorProvider: () => import_react.EditorProvider,
|
|
25
|
+
TextEditor: () => import_text_editor.TextEditor
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(code_editor_exports);
|
|
28
|
+
var import_react = require("@coze-editor/editor/react");
|
|
29
|
+
var import_code_editor = require("./code-editor");
|
|
30
|
+
var import_text_editor = require("./text-editor");
|
|
31
|
+
var import_json_editor = require("./json-editor");
|
|
32
|
+
var import_raw_text_editor = require("./raw-text-editor");
|
|
33
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
+
0 && (module.exports = {
|
|
35
|
+
BaseJsonEditor,
|
|
36
|
+
BaseRawTextEditor,
|
|
37
|
+
CodeEditor,
|
|
38
|
+
EditorProvider,
|
|
39
|
+
TextEditor
|
|
40
|
+
});
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var __async = (__this, __arguments, generator) => {
|
|
30
|
+
return new Promise((resolve, reject) => {
|
|
31
|
+
var fulfilled = (value) => {
|
|
32
|
+
try {
|
|
33
|
+
step(generator.next(value));
|
|
34
|
+
} catch (e) {
|
|
35
|
+
reject(e);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var rejected = (value) => {
|
|
39
|
+
try {
|
|
40
|
+
step(generator.throw(value));
|
|
41
|
+
} catch (e) {
|
|
42
|
+
reject(e);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
46
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
var json_editor_exports = {};
|
|
50
|
+
__export(json_editor_exports, {
|
|
51
|
+
BaseJsonEditor: () => BaseJsonEditor
|
|
52
|
+
});
|
|
53
|
+
module.exports = __toCommonJS(json_editor_exports);
|
|
54
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
55
|
+
var import_react = __toESM(require("react"));
|
|
56
|
+
var import_react2 = require("@coze-editor/editor/react");
|
|
57
|
+
var import_preset_code = require("@coze-editor/editor/preset-code");
|
|
58
|
+
var import_language_json = require("@coze-editor/editor/language-json");
|
|
59
|
+
var import_view = require("@codemirror/view");
|
|
60
|
+
var import_code_editor = require("./code-editor");
|
|
61
|
+
const extensions = [
|
|
62
|
+
import_view.EditorView.theme({
|
|
63
|
+
".cm-activeLineGutter": {
|
|
64
|
+
backgroundColor: "transparent !important"
|
|
65
|
+
},
|
|
66
|
+
".cm-activeLine": {
|
|
67
|
+
backgroundColor: "transparent !important"
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
];
|
|
71
|
+
function findAllMatches(inputString, regex) {
|
|
72
|
+
const globalRegex = new RegExp(
|
|
73
|
+
regex,
|
|
74
|
+
regex.flags.includes("g") ? regex.flags : `${regex.flags}g`
|
|
75
|
+
);
|
|
76
|
+
let match;
|
|
77
|
+
const matches = [];
|
|
78
|
+
while (true) {
|
|
79
|
+
match = globalRegex.exec(inputString);
|
|
80
|
+
if (!match) {
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
if (match.index === globalRegex.lastIndex) {
|
|
84
|
+
globalRegex.lastIndex++;
|
|
85
|
+
}
|
|
86
|
+
matches.push({
|
|
87
|
+
match: match[0],
|
|
88
|
+
range: [match.index, match.index + match[0].length]
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return matches;
|
|
92
|
+
}
|
|
93
|
+
const transformer = (0, import_preset_code.transformerCreator)((text) => {
|
|
94
|
+
const originalSource = text.toString();
|
|
95
|
+
const matches = findAllMatches(originalSource, /\{\{([^\}]*)\}\}/g);
|
|
96
|
+
if (matches.length > 0) {
|
|
97
|
+
matches.forEach(({ range }) => {
|
|
98
|
+
text.replaceRange(range[0], range[1], "null");
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
return text;
|
|
102
|
+
});
|
|
103
|
+
const BaseJsonEditor = import_react.default.forwardRef(
|
|
104
|
+
(props, ref) => {
|
|
105
|
+
const {
|
|
106
|
+
value,
|
|
107
|
+
onChange,
|
|
108
|
+
placeholder,
|
|
109
|
+
className,
|
|
110
|
+
isDarkTheme,
|
|
111
|
+
readonly,
|
|
112
|
+
minHeight = "100px",
|
|
113
|
+
maxHeight,
|
|
114
|
+
editerHeight,
|
|
115
|
+
padding,
|
|
116
|
+
borderRadius
|
|
117
|
+
} = props;
|
|
118
|
+
const apiRef = (0, import_react.useRef)(null);
|
|
119
|
+
const handleChange = (0, import_react.useCallback)(
|
|
120
|
+
(e) => {
|
|
121
|
+
if (typeof onChange === "function") {
|
|
122
|
+
onChange(e.value);
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
[onChange]
|
|
126
|
+
);
|
|
127
|
+
(0, import_react.useEffect)(() => {
|
|
128
|
+
var _a;
|
|
129
|
+
(_a = apiRef.current) == null ? void 0 : _a.updateASTDecorations();
|
|
130
|
+
}, [isDarkTheme]);
|
|
131
|
+
(0, import_react.useEffect)(() => {
|
|
132
|
+
const editor = apiRef.current;
|
|
133
|
+
if (!editor) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
if (typeof value === "string" && value !== editor.getValue()) {
|
|
137
|
+
editor.setValue(value);
|
|
138
|
+
}
|
|
139
|
+
}, [value]);
|
|
140
|
+
const formatJson = () => __async(void 0, null, function* () {
|
|
141
|
+
var _a;
|
|
142
|
+
const view = (_a = apiRef.current) == null ? void 0 : _a.$view;
|
|
143
|
+
if (!view) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
view.dispatch(
|
|
147
|
+
yield import_language_json.json.languageService.format(view.state, {
|
|
148
|
+
tabSize: 2
|
|
149
|
+
})
|
|
150
|
+
);
|
|
151
|
+
});
|
|
152
|
+
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
153
|
+
formatJson
|
|
154
|
+
}));
|
|
155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.EditorProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
156
|
+
import_code_editor.CodeEditor,
|
|
157
|
+
{
|
|
158
|
+
defaultValue: value != null ? value : "",
|
|
159
|
+
onChange: handleChange,
|
|
160
|
+
options: {
|
|
161
|
+
placeholder,
|
|
162
|
+
lineWrapping: true,
|
|
163
|
+
theme: isDarkTheme ? "coze-dark" : "coze-light",
|
|
164
|
+
languageId: "json",
|
|
165
|
+
editable: !readonly,
|
|
166
|
+
transformer,
|
|
167
|
+
minHeight,
|
|
168
|
+
maxHeight,
|
|
169
|
+
editerHeight,
|
|
170
|
+
borderRadius,
|
|
171
|
+
padding,
|
|
172
|
+
fontSize: 13,
|
|
173
|
+
lineHeight: 20
|
|
174
|
+
},
|
|
175
|
+
didMount: (api) => apiRef.current = api,
|
|
176
|
+
extensions
|
|
177
|
+
}
|
|
178
|
+
) }) });
|
|
179
|
+
}
|
|
180
|
+
);
|
|
181
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
182
|
+
0 && (module.exports = {
|
|
183
|
+
BaseJsonEditor
|
|
184
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var raw_text_editor_exports = {};
|
|
20
|
+
__export(raw_text_editor_exports, {
|
|
21
|
+
BaseRawTextEditor: () => BaseRawTextEditor
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(raw_text_editor_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
var import_react2 = require("@coze-editor/editor/react");
|
|
27
|
+
var import_text_editor = require("./text-editor");
|
|
28
|
+
const BaseRawTextEditor = (0, import_react.forwardRef)(
|
|
29
|
+
(props, ref) => {
|
|
30
|
+
const { value, onChange, placeholder, className, minHeight, readonly } = props;
|
|
31
|
+
const apiRef = (0, import_react.useRef)(null);
|
|
32
|
+
const handleChange = (0, import_react.useCallback)(
|
|
33
|
+
(e) => {
|
|
34
|
+
if (typeof onChange === "function") {
|
|
35
|
+
onChange(e.value);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
[onChange]
|
|
39
|
+
);
|
|
40
|
+
(0, import_react.useEffect)(() => {
|
|
41
|
+
const editor = apiRef.current;
|
|
42
|
+
if (!editor) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (typeof value === "string" && value !== editor.getValue()) {
|
|
46
|
+
editor.setValue(value);
|
|
47
|
+
}
|
|
48
|
+
}, [value]);
|
|
49
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.EditorProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, className, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
50
|
+
import_text_editor.TextEditor,
|
|
51
|
+
{
|
|
52
|
+
defaultValue: value != null ? value : "",
|
|
53
|
+
onChange: handleChange,
|
|
54
|
+
options: {
|
|
55
|
+
placeholder,
|
|
56
|
+
lineWrapping: true,
|
|
57
|
+
minHeight,
|
|
58
|
+
fontSize: 13,
|
|
59
|
+
editable: !readonly,
|
|
60
|
+
lineHeight: 20
|
|
61
|
+
},
|
|
62
|
+
didMount: (api) => apiRef.current = api
|
|
63
|
+
}
|
|
64
|
+
) }) });
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
68
|
+
0 && (module.exports = {
|
|
69
|
+
BaseRawTextEditor
|
|
70
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var text_editor_exports = {};
|
|
30
|
+
__export(text_editor_exports, {
|
|
31
|
+
TextEditor: () => TextEditor
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(text_editor_exports);
|
|
34
|
+
var import_react = require("@coze-editor/editor/react");
|
|
35
|
+
var import_preset_universal = __toESM(require("@coze-editor/editor/preset-universal"));
|
|
36
|
+
var import_editor = require("@coze-editor/editor");
|
|
37
|
+
var import_view = require("@codemirror/view");
|
|
38
|
+
var import_commands = require("@codemirror/commands");
|
|
39
|
+
const RawEditorTheme = import_view.EditorView.theme({
|
|
40
|
+
"&.cm-editor": {
|
|
41
|
+
outline: "none"
|
|
42
|
+
},
|
|
43
|
+
"&.cm-content": {
|
|
44
|
+
wordBreak: "break-all"
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
const minHeightOption = (value) => import_view.EditorView.theme({
|
|
48
|
+
".cm-content, .cm-gutter, .cm-right-gutter": {
|
|
49
|
+
minHeight: typeof value === "number" ? `${value}px` : typeof value === "string" ? value : "unset"
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
const lineHeightOption = (value) => import_view.EditorView.theme({
|
|
53
|
+
".cm-content, .cm-gutter, .cm-right-gutter": {
|
|
54
|
+
lineHeight: typeof value === "number" ? `${value}px` : typeof value === "string" ? value : "unset"
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
const extensions = [
|
|
58
|
+
(0, import_editor.mixLanguages)({}),
|
|
59
|
+
RawEditorTheme,
|
|
60
|
+
// ...其他 extensions
|
|
61
|
+
(0, import_commands.history)(),
|
|
62
|
+
import_view.keymap.of([...import_commands.defaultKeymap, ...import_commands.historyKeymap])
|
|
63
|
+
];
|
|
64
|
+
const TextEditor = (0, import_react.createRenderer)(
|
|
65
|
+
[
|
|
66
|
+
...import_preset_universal.default,
|
|
67
|
+
(0, import_react.option)("minHeight", minHeightOption),
|
|
68
|
+
(0, import_react.option)("lineHeight", lineHeightOption)
|
|
69
|
+
],
|
|
70
|
+
extensions
|
|
71
|
+
);
|
|
72
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
73
|
+
0 && (module.exports = {
|
|
74
|
+
TextEditor
|
|
75
|
+
});
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var coze_dark_exports = {};
|
|
20
|
+
__export(coze_dark_exports, {
|
|
21
|
+
cozeDark: () => cozeDark
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(coze_dark_exports);
|
|
24
|
+
var import_preset_code = require("@coze-editor/editor/preset-code");
|
|
25
|
+
var import_view = require("@codemirror/view");
|
|
26
|
+
const colors = {
|
|
27
|
+
background: "#151B27",
|
|
28
|
+
// syntax
|
|
29
|
+
comment: "#FFFFFF63",
|
|
30
|
+
key: "#39E5D7",
|
|
31
|
+
string: "#FF94D2",
|
|
32
|
+
number: "#FF9933",
|
|
33
|
+
boolean: "#78B0FF",
|
|
34
|
+
null: "#78B0FF",
|
|
35
|
+
separator: "#FFFFFFC9"
|
|
36
|
+
};
|
|
37
|
+
const cozeDark = [
|
|
38
|
+
import_view.EditorView.theme({
|
|
39
|
+
".cm-completionIcon-property": {
|
|
40
|
+
backgroundImage: 'url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMWVtIiBoZWlnaHQ9IjFlbSIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xMi4zNTc2IDguMTAzNTVDMTIuMTYyMyA3LjkwODI5IDExLjg0NTcgNy45MDgyOSAxMS42NTA1IDguMTAzNTVMOC4xMDM1NSAxMS42NTA1QzcuOTA4MjkgMTEuODQ1NyA3LjkwODI5IDEyLjE2MjMgOC4xMDM1NSAxMi4zNTc2TDExLjY1MDUgMTUuOTA0NUMxMS44NDU3IDE2LjA5OTggMTIuMTYyMyAxNi4wOTk4IDEyLjM1NzYgMTUuOTA0NUwxNS45MDQ1IDEyLjM1NzZDMTYuMDk5OCAxMi4xNjIzIDE2LjA5OTggMTEuODQ1NyAxNS45MDQ1IDExLjY1MDVMMTIuMzU3NiA4LjEwMzU1WiIgZmlsbD0iI0ZGRkZGRkM5Ii8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMS4wMDI2IDEuNDU1NDVDMTEuNjIxNCAxLjA5ODE4IDEyLjM4MzggMS4wOTgxOCAxMy4wMDI2IDEuNDU1NDVMMjAuNjM4IDUuODYzNzRDMjEuMjU2OCA2LjIyMSAyMS42MzggNi44ODEyNiAyMS42MzggNy41OTU3OVYxNi40MTI0QzIxLjYzOCAxNy4xMjY5IDIxLjI1NjggMTcuNzg3MiAyMC42MzggMTguMTQ0NEwxMy4wMDI2IDIyLjU1MjdDMTIuMzgzOCAyMi45MSAxMS42MjE0IDIyLjkxIDExLjAwMjYgMjIuNTUyN0wzLjM2NzE5IDE4LjE0NDRDMi43NDgzOSAxNy43ODcyIDIuMzY3MTkgMTcuMTI2OSAyLjM2NzE5IDE2LjQxMjRWNy41OTU3OUMyLjM2NzE5IDYuODgxMjYgMi43NDgzOSA2LjIyMTAxIDMuMzY3MTkgNS44NjM3NEwxMS4wMDI2IDEuNDU1NDVaTTEyLjAwMjYgMy4xODc1TDE5LjYzOCA3LjU5NTc5VjE2LjQxMjRMMTIuMDAyNiAyMC44MjA3TDQuMzY3MTkgMTYuNDEyNEw0LjM2NzE5IDcuNTk1NzlMMTIuMDAyNiAzLjE4NzVaIiBmaWxsPSIjRkZGRkZGQzkiLz48L3N2Zz4=")',
|
|
41
|
+
backgroundSize: "11px 11px",
|
|
42
|
+
backgroundRepeat: "no-repeat",
|
|
43
|
+
width: "11px",
|
|
44
|
+
height: "11px"
|
|
45
|
+
},
|
|
46
|
+
".cm-completionIcon-property::after": {
|
|
47
|
+
content: '""'
|
|
48
|
+
}
|
|
49
|
+
}),
|
|
50
|
+
(0, import_preset_code.createTheme)({
|
|
51
|
+
variant: "dark",
|
|
52
|
+
settings: {
|
|
53
|
+
background: colors.background,
|
|
54
|
+
foreground: "#fff",
|
|
55
|
+
caret: "#AEAFAD",
|
|
56
|
+
selection: "#d9d9d942",
|
|
57
|
+
gutterBackground: colors.background,
|
|
58
|
+
gutterForeground: "#FFFFFF63",
|
|
59
|
+
gutterBorderColor: "transparent",
|
|
60
|
+
gutterBorderWidth: 0,
|
|
61
|
+
lineHighlight: "#272e3d36",
|
|
62
|
+
bracketColors: ["#FFEF61", "#DD99FF", "#78B0FF"],
|
|
63
|
+
tooltip: {
|
|
64
|
+
backgroundColor: "#363D4D",
|
|
65
|
+
color: "#fff",
|
|
66
|
+
border: "none"
|
|
67
|
+
},
|
|
68
|
+
completionItemHover: {
|
|
69
|
+
backgroundColor: "#FFFFFF0F"
|
|
70
|
+
},
|
|
71
|
+
completionItemSelected: {
|
|
72
|
+
backgroundColor: "#FFFFFF17"
|
|
73
|
+
},
|
|
74
|
+
completionItemIcon: {
|
|
75
|
+
color: "#FFFFFFC9"
|
|
76
|
+
},
|
|
77
|
+
completionItemLabel: {
|
|
78
|
+
color: "#FFFFFFC9"
|
|
79
|
+
},
|
|
80
|
+
completionItemDetail: {
|
|
81
|
+
color: "#FFFFFF63"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
styles: [
|
|
85
|
+
// json
|
|
86
|
+
{
|
|
87
|
+
tag: import_preset_code.tags.comment,
|
|
88
|
+
color: colors.comment
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
tag: [import_preset_code.tags.propertyName],
|
|
92
|
+
color: colors.key
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
tag: [import_preset_code.tags.string],
|
|
96
|
+
color: colors.string
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
tag: [import_preset_code.tags.number],
|
|
100
|
+
color: colors.number
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
tag: [import_preset_code.tags.bool],
|
|
104
|
+
color: colors.boolean
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
tag: [import_preset_code.tags.null],
|
|
108
|
+
color: colors.null
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
tag: [import_preset_code.tags.separator],
|
|
112
|
+
color: colors.separator
|
|
113
|
+
},
|
|
114
|
+
// shell
|
|
115
|
+
// curl
|
|
116
|
+
{
|
|
117
|
+
tag: [import_preset_code.tags.standard(import_preset_code.tags.variableName)],
|
|
118
|
+
color: "#3BEB84"
|
|
119
|
+
},
|
|
120
|
+
// -X
|
|
121
|
+
{
|
|
122
|
+
tag: [import_preset_code.tags.attributeName],
|
|
123
|
+
color: "#FF9933"
|
|
124
|
+
},
|
|
125
|
+
// url in string (includes quotes), e.g. "https://..."
|
|
126
|
+
{
|
|
127
|
+
tag: [import_preset_code.tags.special(import_preset_code.tags.string)],
|
|
128
|
+
color: "#78B0FF"
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
})
|
|
132
|
+
];
|
|
133
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
134
|
+
0 && (module.exports = {
|
|
135
|
+
cozeDark
|
|
136
|
+
});
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var coze_light_exports = {};
|
|
20
|
+
__export(coze_light_exports, {
|
|
21
|
+
cozeLight: () => cozeLight
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(coze_light_exports);
|
|
24
|
+
var import_preset_code = require("@coze-editor/editor/preset-code");
|
|
25
|
+
var import_view = require("@codemirror/view");
|
|
26
|
+
const colors = {
|
|
27
|
+
background: "#fff",
|
|
28
|
+
// syntax
|
|
29
|
+
comment: "#000A298A",
|
|
30
|
+
key: "#00818C",
|
|
31
|
+
string: "#D1009D",
|
|
32
|
+
number: "#C74200",
|
|
33
|
+
boolean: "#2B57D9",
|
|
34
|
+
null: "#2B57D9",
|
|
35
|
+
separator: "#0F1529D1"
|
|
36
|
+
};
|
|
37
|
+
const cozeLight = [
|
|
38
|
+
import_view.EditorView.theme({
|
|
39
|
+
".cm-completionIcon-property": {
|
|
40
|
+
backgroundImage: 'url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMWVtIiBoZWlnaHQ9IjFlbSIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xMi4zNTc2IDguMTAzNTVDMTIuMTYyMyA3LjkwODI5IDExLjg0NTcgNy45MDgyOSAxMS42NTA1IDguMTAzNTVMOC4xMDM1NSAxMS42NTA1QzcuOTA4MjkgMTEuODQ1NyA3LjkwODI5IDEyLjE2MjMgOC4xMDM1NSAxMi4zNTc2TDExLjY1MDUgMTUuOTA0NUMxMS44NDU3IDE2LjA5OTggMTIuMTYyMyAxNi4wOTk4IDEyLjM1NzYgMTUuOTA0NUwxNS45MDQ1IDEyLjM1NzZDMTYuMDk5OCAxMi4xNjIzIDE2LjA5OTggMTEuODQ1NyAxNS45MDQ1IDExLjY1MDVMMTIuMzU3NiA4LjEwMzU1WiIgZmlsbD0iIzA2MDcwOUNDIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMS4wMDI2IDEuNDU1NDVDMTEuNjIxNCAxLjA5ODE4IDEyLjM4MzggMS4wOTgxOCAxMy4wMDI2IDEuNDU1NDVMMjAuNjM4IDUuODYzNzRDMjEuMjU2OCA2LjIyMSAyMS42MzggNi44ODEyNiAyMS42MzggNy41OTU3OVYxNi40MTI0QzIxLjYzOCAxNy4xMjY5IDIxLjI1NjggMTcuNzg3MiAyMC42MzggMTguMTQ0NEwxMy4wMDI2IDIyLjU1MjdDMTIuMzgzOCAyMi45MSAxMS42MjE0IDIyLjkxIDExLjAwMjYgMjIuNTUyN0wzLjM2NzE5IDE4LjE0NDRDMi43NDgzOSAxNy43ODcyIDIuMzY3MTkgMTcuMTI2OSAyLjM2NzE5IDE2LjQxMjRWNy41OTU3OUMyLjM2NzE5IDYuODgxMjYgMi43NDgzOSA2LjIyMTAxIDMuMzY3MTkgNS44NjM3NEwxMS4wMDI2IDEuNDU1NDVaTTEyLjAwMjYgMy4xODc1TDE5LjYzOCA3LjU5NTc5VjE2LjQxMjRMMTIuMDAyNiAyMC44MjA3TDQuMzY3MTkgMTYuNDEyNEw0LjM2NzE5IDcuNTk1NzlMMTIuMDAyNiAzLjE4NzVaIiBmaWxsPSIjMDYwNzA5Q0MiLz48L3N2Zz4=")',
|
|
41
|
+
backgroundSize: "11px 11px",
|
|
42
|
+
backgroundRepeat: "no-repeat",
|
|
43
|
+
width: "11px",
|
|
44
|
+
height: "11px"
|
|
45
|
+
},
|
|
46
|
+
".cm-completionIcon-property::after": {
|
|
47
|
+
content: '""'
|
|
48
|
+
}
|
|
49
|
+
}),
|
|
50
|
+
(0, import_preset_code.createTheme)({
|
|
51
|
+
variant: "light",
|
|
52
|
+
settings: {
|
|
53
|
+
background: colors.background,
|
|
54
|
+
foreground: "#4D4D4C",
|
|
55
|
+
caret: "#AEAFAD",
|
|
56
|
+
selection: "#52649A21",
|
|
57
|
+
gutterBackground: colors.background,
|
|
58
|
+
gutterForeground: "#000A298A",
|
|
59
|
+
gutterBorderColor: "transparent",
|
|
60
|
+
gutterBorderWidth: 0,
|
|
61
|
+
lineHighlight: "#efefef78",
|
|
62
|
+
bracketColors: ["#E4D129", "#AC05FF", "#2B57D9"],
|
|
63
|
+
tooltip: {
|
|
64
|
+
backgroundColor: "var(--coz-bg-max)",
|
|
65
|
+
color: "var(--coz-fg-primary)",
|
|
66
|
+
border: "solid 1px var(--coz-stroke-plus)",
|
|
67
|
+
boxShadow: "var(--coz-shadow-default)",
|
|
68
|
+
borderRadius: "8px"
|
|
69
|
+
},
|
|
70
|
+
tooltipCompletion: {
|
|
71
|
+
backgroundColor: "#FFFFFF",
|
|
72
|
+
color: "#060709CC"
|
|
73
|
+
},
|
|
74
|
+
completionItemHover: {
|
|
75
|
+
backgroundColor: "#5768A114"
|
|
76
|
+
},
|
|
77
|
+
completionItemSelected: {
|
|
78
|
+
backgroundColor: "#52649A21"
|
|
79
|
+
},
|
|
80
|
+
completionItemIcon: {
|
|
81
|
+
color: "#060709CC"
|
|
82
|
+
},
|
|
83
|
+
completionItemLabel: {
|
|
84
|
+
color: "#060709CC"
|
|
85
|
+
},
|
|
86
|
+
completionItemDetail: {
|
|
87
|
+
color: "#2029459E"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
styles: [
|
|
91
|
+
// JSON
|
|
92
|
+
{
|
|
93
|
+
tag: import_preset_code.tags.comment,
|
|
94
|
+
color: colors.comment
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
tag: [import_preset_code.tags.propertyName],
|
|
98
|
+
color: colors.key
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
tag: [import_preset_code.tags.string],
|
|
102
|
+
color: colors.string
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
tag: [import_preset_code.tags.number],
|
|
106
|
+
color: colors.number
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
tag: [import_preset_code.tags.bool],
|
|
110
|
+
color: colors.boolean
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
tag: [import_preset_code.tags.null],
|
|
114
|
+
color: colors.null
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
tag: [import_preset_code.tags.separator],
|
|
118
|
+
color: colors.separator
|
|
119
|
+
},
|
|
120
|
+
// shell
|
|
121
|
+
// curl
|
|
122
|
+
{
|
|
123
|
+
tag: [import_preset_code.tags.standard(import_preset_code.tags.variableName)],
|
|
124
|
+
color: "#00804A"
|
|
125
|
+
},
|
|
126
|
+
// -X
|
|
127
|
+
{
|
|
128
|
+
tag: [import_preset_code.tags.attributeName],
|
|
129
|
+
color: "#C74200"
|
|
130
|
+
},
|
|
131
|
+
// url in string (includes quotes), e.g. "https://..."
|
|
132
|
+
{
|
|
133
|
+
tag: [import_preset_code.tags.special(import_preset_code.tags.string)],
|
|
134
|
+
color: "#2B57D9"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
})
|
|
138
|
+
];
|
|
139
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
140
|
+
0 && (module.exports = {
|
|
141
|
+
cozeLight
|
|
142
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var consts_exports = {};
|
|
20
|
+
__export(consts_exports, {
|
|
21
|
+
DEFAULT_MAX_TOKENS: () => DEFAULT_MAX_TOKENS,
|
|
22
|
+
VARIABLE_MAX_LEN: () => VARIABLE_MAX_LEN,
|
|
23
|
+
modelConfigLabelMap: () => modelConfigLabelMap
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(consts_exports);
|
|
26
|
+
const VARIABLE_MAX_LEN = 50;
|
|
27
|
+
const modelConfigLabelMap = {
|
|
28
|
+
temperature: "生成随机性",
|
|
29
|
+
max_tokens: "最大回复长度",
|
|
30
|
+
top_p: "Top P"
|
|
31
|
+
};
|
|
32
|
+
const DEFAULT_MAX_TOKENS = 4096;
|
|
33
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
+
0 && (module.exports = {
|
|
35
|
+
DEFAULT_MAX_TOKENS,
|
|
36
|
+
VARIABLE_MAX_LEN,
|
|
37
|
+
modelConfigLabelMap
|
|
38
|
+
});
|