@comate/zulu 0.0.9 → 0.0.12
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/README.md +98 -0
- package/comate-engine/bin/comate.js +10 -0
- package/comate-engine/fallbackServer.js +1 -0
- package/comate-engine/node_modules/@comate/plugin-engine/dist/index.d.ts +188 -0
- package/comate-engine/node_modules/@comate/plugin-engine/dist/index.js +36 -0
- package/comate-engine/node_modules/@comate/plugin-engine/package.json +49 -0
- package/comate-engine/node_modules/@comate/plugin-host/bin.js +44 -0
- package/comate-engine/node_modules/@comate/plugin-host/dist/index.js +1 -0
- package/comate-engine/node_modules/@comate/plugin-host/dist/main.d.ts +14 -0
- package/comate-engine/node_modules/@comate/plugin-host/dist/main.js +9 -0
- package/comate-engine/node_modules/@comate/plugin-host/dist/user-Btg63hPI.js +36 -0
- package/comate-engine/node_modules/@comate/plugin-host/package.json +47 -0
- package/comate-engine/node_modules/@comate/plugin-shared-internals/dist/index.d.ts +2849 -0
- package/comate-engine/node_modules/@comate/plugin-shared-internals/dist/index.js +36 -0
- package/comate-engine/node_modules/@comate/plugin-shared-internals/package.json +72 -0
- package/comate-engine/node_modules/@comate/preview-proxy/bin/preview.js +13 -0
- package/comate-engine/node_modules/@comate/preview-proxy/dist/index.js +350 -0
- package/comate-engine/node_modules/@comate/preview-proxy/package.json +83 -0
- package/comate-engine/node_modules/@comate/preview-proxy/static/comate-preview-injector.css +1 -0
- package/comate-engine/node_modules/@comate/preview-proxy/static/comate-preview-injector.js +2 -0
- package/comate-engine/node_modules/@comate/preview-proxy/static/comate-preview-injector.js.LICENSE.txt +58 -0
- package/comate-engine/node_modules/compare-versions/LICENSE +21 -0
- package/comate-engine/node_modules/compare-versions/README.md +133 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/compare.d.ts +19 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/compare.js +44 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/compare.js.map +1 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/compareVersions.d.ts +8 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/compareVersions.js +29 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/compareVersions.js.map +1 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/index.d.ts +5 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/index.js +5 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/index.js.map +1 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/satisfies.d.ts +14 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/satisfies.js +66 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/satisfies.js.map +1 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/utils.d.ts +7 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/utils.js +37 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/utils.js.map +1 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/validate.d.ts +28 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/validate.js +31 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/validate.js.map +1 -0
- package/comate-engine/node_modules/compare-versions/lib/umd/index.js +216 -0
- package/comate-engine/node_modules/compare-versions/lib/umd/index.js.map +1 -0
- package/comate-engine/node_modules/compare-versions/package.json +45 -0
- package/comate-engine/node_modules/compare-versions/src/compare.ts +54 -0
- package/comate-engine/node_modules/compare-versions/src/compareVersions.ts +31 -0
- package/comate-engine/node_modules/compare-versions/src/index.ts +5 -0
- package/comate-engine/node_modules/compare-versions/src/satisfies.ts +69 -0
- package/comate-engine/node_modules/compare-versions/src/utils.ts +50 -0
- package/comate-engine/node_modules/compare-versions/src/validate.ts +36 -0
- package/comate-engine/node_modules/pkce-challenge/LICENSE +21 -0
- package/comate-engine/node_modules/pkce-challenge/README.md +55 -0
- package/comate-engine/node_modules/pkce-challenge/dist/index.browser.d.ts +19 -0
- package/comate-engine/node_modules/pkce-challenge/dist/index.browser.js +72 -0
- package/comate-engine/node_modules/pkce-challenge/dist/index.node.cjs +80 -0
- package/comate-engine/node_modules/pkce-challenge/dist/index.node.d.cts +19 -0
- package/comate-engine/node_modules/pkce-challenge/dist/index.node.d.ts +19 -0
- package/comate-engine/node_modules/pkce-challenge/dist/index.node.js +75 -0
- package/comate-engine/node_modules/pkce-challenge/package.json +58 -0
- package/comate-engine/node_modules/web-streams-polyfill/LICENSE +22 -0
- package/comate-engine/node_modules/web-streams-polyfill/README.md +119 -0
- package/comate-engine/node_modules/web-streams-polyfill/dist/polyfill.es5.js +8 -0
- package/comate-engine/node_modules/web-streams-polyfill/dist/polyfill.js +8 -0
- package/comate-engine/node_modules/web-streams-polyfill/dist/ponyfill.es5.js +8 -0
- package/comate-engine/node_modules/web-streams-polyfill/dist/ponyfill.es5.mjs +8 -0
- package/comate-engine/node_modules/web-streams-polyfill/dist/ponyfill.js +8 -0
- package/comate-engine/node_modules/web-streams-polyfill/dist/ponyfill.mjs +8 -0
- package/comate-engine/node_modules/web-streams-polyfill/package.json +98 -0
- package/comate-engine/node_modules/web-streams-polyfill/types/polyfill.d.ts +28 -0
- package/comate-engine/node_modules/web-streams-polyfill/types/ponyfill.d.ts +809 -0
- package/comate-engine/node_modules/web-streams-polyfill/types/tsdoc-metadata.json +11 -0
- package/comate-engine/package.json +94 -0
- package/comate-engine/plugins/aiscan/assets/icon.svg +12 -0
- package/comate-engine/plugins/aiscan/dist/index.js +53861 -0
- package/comate-engine/plugins/aiscan/package.json +67 -0
- package/comate-engine/plugins/appdev/assets/icon.png +0 -0
- package/comate-engine/plugins/appdev/dist/help.md +12 -0
- package/comate-engine/plugins/appdev/dist/index.d.ts +2 -0
- package/comate-engine/plugins/appdev/dist/index.js +194 -0
- package/comate-engine/plugins/appdev/dist/providers/err.d.ts +8 -0
- package/comate-engine/plugins/appdev/dist/providers/err.js +37 -0
- package/comate-engine/plugins/appdev/dist/providers/fallback.d.ts +5 -0
- package/comate-engine/plugins/appdev/dist/providers/fallback.js +28 -0
- package/comate-engine/plugins/appdev/dist/providers/help.d.ts +8 -0
- package/comate-engine/plugins/appdev/dist/providers/help.js +19 -0
- package/comate-engine/plugins/appdev/dist/providers/medusa.d.ts +8 -0
- package/comate-engine/plugins/appdev/dist/providers/medusa.js +39 -0
- package/comate-engine/plugins/appdev/dist/providers/qa.d.ts +8 -0
- package/comate-engine/plugins/appdev/dist/providers/qa.js +33 -0
- package/comate-engine/plugins/appdev/package.json +67 -0
- package/comate-engine/plugins/bfc/assets/bfc-icon.png +0 -0
- package/comate-engine/plugins/bfc/dist/config/config.d.ts +4 -0
- package/comate-engine/plugins/bfc/dist/config/config.js +4 -0
- package/comate-engine/plugins/bfc/dist/help.md +11 -0
- package/comate-engine/plugins/bfc/dist/index.d.ts +2 -0
- package/comate-engine/plugins/bfc/dist/index.js +452 -0
- package/comate-engine/plugins/bfc/dist/providers/bfcInstructMode.d.ts +8 -0
- package/comate-engine/plugins/bfc/dist/providers/bfcInstructMode.js +77 -0
- package/comate-engine/plugins/bfc/dist/providers/genAbnormalCode.d.ts +8 -0
- package/comate-engine/plugins/bfc/dist/providers/genAbnormalCode.js +71 -0
- package/comate-engine/plugins/bfc/dist/providers/genBfcCode.d.ts +8 -0
- package/comate-engine/plugins/bfc/dist/providers/genBfcCode.js +74 -0
- package/comate-engine/plugins/bfc/dist/providers/getBatchCases.d.ts +10 -0
- package/comate-engine/plugins/bfc/dist/providers/getBatchCases.js +71 -0
- package/comate-engine/plugins/bfc/dist/providers/help.d.ts +8 -0
- package/comate-engine/plugins/bfc/dist/providers/help.js +19 -0
- package/comate-engine/plugins/bfc/dist/service/generateService.d.ts +14 -0
- package/comate-engine/plugins/bfc/dist/service/generateService.js +27 -0
- package/comate-engine/plugins/bfc/package.json +85 -0
- package/comate-engine/plugins/bpm/assets/bpm.png +0 -0
- package/comate-engine/plugins/bpm/dist/index.js +313 -0
- package/comate-engine/plugins/bpm/package.json +65 -0
- package/comate-engine/plugins/casebuilder/assets/icon.svg +1 -0
- package/comate-engine/plugins/casebuilder/dist/help.md +33 -0
- package/comate-engine/plugins/casebuilder/dist/index.js +837 -0
- package/comate-engine/plugins/casebuilder/package.json +80 -0
- package/comate-engine/plugins/centrino/assets/icon.png +0 -0
- package/comate-engine/plugins/centrino/dist/help.md +30 -0
- package/comate-engine/plugins/centrino/dist/index.js +1046 -0
- package/comate-engine/plugins/centrino/package.json +68 -0
- package/comate-engine/plugins/cnap/assets/cnap.png +0 -0
- package/comate-engine/plugins/cnap/dist/help.md +11 -0
- package/comate-engine/plugins/cnap/dist/index.js +171 -0
- package/comate-engine/plugins/cnap/package.json +65 -0
- package/comate-engine/plugins/demo-feature/assets/icon.svg +1 -0
- package/comate-engine/plugins/demo-feature/dist/help.md +1 -0
- package/comate-engine/plugins/demo-feature/dist/index.d.ts +2 -0
- package/comate-engine/plugins/demo-feature/dist/index.js +36008 -0
- package/comate-engine/plugins/demo-feature/dist/providers/codeQuery.d.ts +12 -0
- package/comate-engine/plugins/demo-feature/dist/providers/codeQuery.js +23 -0
- package/comate-engine/plugins/demo-feature/dist/providers/codeSearch.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/codeSearch.js +26 -0
- package/comate-engine/plugins/demo-feature/dist/providers/config.d.ts +13 -0
- package/comate-engine/plugins/demo-feature/dist/providers/config.js +25 -0
- package/comate-engine/plugins/demo-feature/dist/providers/context.d.ts +10 -0
- package/comate-engine/plugins/demo-feature/dist/providers/context.js +49 -0
- package/comate-engine/plugins/demo-feature/dist/providers/debugAgent.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/debugAgent.js +65 -0
- package/comate-engine/plugins/demo-feature/dist/providers/explainCode.d.ts +9 -0
- package/comate-engine/plugins/demo-feature/dist/providers/explainCode.js +24 -0
- package/comate-engine/plugins/demo-feature/dist/providers/fallback.d.ts +5 -0
- package/comate-engine/plugins/demo-feature/dist/providers/fallback.js +23 -0
- package/comate-engine/plugins/demo-feature/dist/providers/file.d.ts +13 -0
- package/comate-engine/plugins/demo-feature/dist/providers/file.js +36 -0
- package/comate-engine/plugins/demo-feature/dist/providers/help.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/help.js +19 -0
- package/comate-engine/plugins/demo-feature/dist/providers/information.d.ts +13 -0
- package/comate-engine/plugins/demo-feature/dist/providers/information.js +23 -0
- package/comate-engine/plugins/demo-feature/dist/providers/knowledge.d.ts +15 -0
- package/comate-engine/plugins/demo-feature/dist/providers/knowledge.js +71 -0
- package/comate-engine/plugins/demo-feature/dist/providers/log.d.ts +12 -0
- package/comate-engine/plugins/demo-feature/dist/providers/log.js +21 -0
- package/comate-engine/plugins/demo-feature/dist/providers/onlyCode.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/onlyCode.js +23 -0
- package/comate-engine/plugins/demo-feature/dist/providers/pluginConfig.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/pluginConfig.js +47 -0
- package/comate-engine/plugins/demo-feature/dist/providers/prompt.d.ts +7 -0
- package/comate-engine/plugins/demo-feature/dist/providers/prompt.js +7 -0
- package/comate-engine/plugins/demo-feature/dist/providers/ragProvider.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/ragProvider.js +17 -0
- package/comate-engine/plugins/demo-feature/dist/providers/render.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/render.js +75 -0
- package/comate-engine/plugins/demo-feature/dist/providers/renderJsx.d.ts +10 -0
- package/comate-engine/plugins/demo-feature/dist/providers/renderJsx.js +173 -0
- package/comate-engine/plugins/demo-feature/dist/providers/section.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/section.js +136 -0
- package/comate-engine/plugins/demo-feature/dist/providers/selectedKnowledge.d.ts +12 -0
- package/comate-engine/plugins/demo-feature/dist/providers/selectedKnowledge.js +17 -0
- package/comate-engine/plugins/demo-feature/dist/providers/streaming.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/streaming.js +29 -0
- package/comate-engine/plugins/demo-feature/dist/providers/userDetail.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/userDetail.js +28 -0
- package/comate-engine/plugins/demo-feature/package.json +214 -0
- package/comate-engine/plugins/demo-timer/assets/icon.svg +2 -0
- package/comate-engine/plugins/demo-timer/dist/index.js +463 -0
- package/comate-engine/plugins/demo-timer/package.json +73 -0
- package/comate-engine/plugins/dev-tools/assets/icon.png +0 -0
- package/comate-engine/plugins/dev-tools/dist/help.md +18 -0
- package/comate-engine/plugins/dev-tools/dist/index.js +166160 -0
- package/comate-engine/plugins/dev-tools/package.json +95 -0
- package/comate-engine/plugins/devaux/assets/icon.svg +1 -0
- package/comate-engine/plugins/devaux/dist/help.md +41 -0
- package/comate-engine/plugins/devaux/dist/index.js +73829 -0
- package/comate-engine/plugins/devaux/dist/static/tree-sitter-cpp.wasm +0 -0
- package/comate-engine/plugins/devaux/dist/static/tree-sitter-go.wasm +0 -0
- package/comate-engine/plugins/devaux/dist/static/tree-sitter.wasm +0 -0
- package/comate-engine/plugins/devaux/dist/tree-sitter.wasm +0 -0
- package/comate-engine/plugins/devaux/package.json +83 -0
- package/comate-engine/plugins/f2c/assets/icon.svg +11 -0
- package/comate-engine/plugins/f2c/dist/help.md +13 -0
- package/comate-engine/plugins/f2c/dist/index.js +64551 -0
- package/comate-engine/plugins/f2c/package.json +56 -0
- package/comate-engine/plugins/fcnap/assets/icon.png +0 -0
- package/comate-engine/plugins/fcnap/dist/help.md +9 -0
- package/comate-engine/plugins/fcnap/dist/index.js +105 -0
- package/comate-engine/plugins/fcnap/package.json +50 -0
- package/comate-engine/plugins/front-end-skills/assets/icon.svg +1 -0
- package/comate-engine/plugins/front-end-skills/dist/help.md +17 -0
- package/comate-engine/plugins/front-end-skills/dist/index.js +8172 -0
- package/comate-engine/plugins/front-end-skills/package.json +79 -0
- package/comate-engine/plugins/gdp/assets/icon.png +0 -0
- package/comate-engine/plugins/gdp/dist/help.md +11 -0
- package/comate-engine/plugins/gdp/dist/index.js +53065 -0
- package/comate-engine/plugins/gdp/package.json +79 -0
- package/comate-engine/plugins/git/assets/git.svg +1 -0
- package/comate-engine/plugins/git/assets/icon.svg +1 -0
- package/comate-engine/plugins/git/dist/help.md +7 -0
- package/comate-engine/plugins/git/dist/index.js +32675 -0
- package/comate-engine/plugins/git/package.json +91 -0
- package/comate-engine/plugins/harmonyos/assets/harmonyos.png +0 -0
- package/comate-engine/plugins/harmonyos/dist/index.js +78 -0
- package/comate-engine/plugins/harmonyos/package.json +37 -0
- package/comate-engine/plugins/iapi/assets/icon.png +0 -0
- package/comate-engine/plugins/iapi/dist/help.md +13 -0
- package/comate-engine/plugins/iapi/dist/index.js +458 -0
- package/comate-engine/plugins/iapi/dist/static/lang/tree-sitter-go.wasm +0 -0
- package/comate-engine/plugins/iapi/dist/static/lang/tree-sitter-java.wasm +0 -0
- package/comate-engine/plugins/iapi/dist/static/tree-sitter-go.wasm +0 -0
- package/comate-engine/plugins/iapi/dist/static/tree-sitter-java.wasm +0 -0
- package/comate-engine/plugins/iapi/dist/tree-sitter.wasm +0 -0
- package/comate-engine/plugins/iapi/package.json +102 -0
- package/comate-engine/plugins/icafe/assets/icafe.svg +1 -0
- package/comate-engine/plugins/icafe/dist/help.md +5 -0
- package/comate-engine/plugins/icafe/dist/index.js +885 -0
- package/comate-engine/plugins/icafe/package.json +74 -0
- package/comate-engine/plugins/ievalue/assets/iEValue.svg +10 -0
- package/comate-engine/plugins/ievalue/dist/index.js +2920 -0
- package/comate-engine/plugins/ievalue/package.json +88 -0
- package/comate-engine/plugins/ipipe/assets/iPipePlugin.png +0 -0
- package/comate-engine/plugins/ipipe/dist/help.md +15 -0
- package/comate-engine/plugins/ipipe/dist/index.js +7264 -0
- package/comate-engine/plugins/ipipe/package.json +62 -0
- package/comate-engine/plugins/jarvis/assets/icon.svg +1 -0
- package/comate-engine/plugins/jarvis/dist/help.md +17 -0
- package/comate-engine/plugins/jarvis/dist/index.js +140416 -0
- package/comate-engine/plugins/jarvis/package.json +93 -0
- package/comate-engine/plugins/mapsearch/assets/mapsearchicon.png +0 -0
- package/comate-engine/plugins/mapsearch/dist/help.md +4 -0
- package/comate-engine/plugins/mapsearch/dist/index.js +145 -0
- package/comate-engine/plugins/mapsearch/package.json +53 -0
- package/comate-engine/plugins/paddle/assets/icon.png +0 -0
- package/comate-engine/plugins/paddle/assets/paconvert-3.0.1-py3-none-any.whl +0 -0
- package/comate-engine/plugins/paddle/dist/help.md +31 -0
- package/comate-engine/plugins/paddle/dist/index.js +1011 -0
- package/comate-engine/plugins/paddle/package.json +129 -0
- package/comate-engine/plugins/robot/assets/Robot.png +0 -0
- package/comate-engine/plugins/robot/dist/index.js +288 -0
- package/comate-engine/plugins/robot/package.json +67 -0
- package/comate-engine/plugins/security/assets/comate.png +0 -0
- package/comate-engine/plugins/security/dist/index.js +18393 -0
- package/comate-engine/plugins/security/package.json +82 -0
- package/comate-engine/plugins/smartapp/assets/icon.png +0 -0
- package/comate-engine/plugins/smartapp/dist/help.md +4 -0
- package/comate-engine/plugins/smartapp/dist/index.js +113 -0
- package/comate-engine/plugins/smartapp/package.json +54 -0
- package/comate-engine/plugins/springer/assets/icon.png +0 -0
- package/comate-engine/plugins/springer/dist/help.md +4 -0
- package/comate-engine/plugins/springer/dist/index.js +94525 -0
- package/comate-engine/plugins/springer/package.json +71 -0
- package/comate-engine/plugins/testmate/assets/icon.svg +1 -0
- package/comate-engine/plugins/testmate/dist/help.md +62 -0
- package/comate-engine/plugins/testmate/dist/index.js +21483 -0
- package/comate-engine/plugins/testmate/package.json +85 -0
- package/comate-engine/plugins/tor/assets/TorPlugin.png +0 -0
- package/comate-engine/plugins/tor/dist/help.md +22 -0
- package/comate-engine/plugins/tor/dist/index.js +807 -0
- package/comate-engine/plugins/tor/package.json +99 -0
- package/comate-engine/plugins/weiyun/assets/icon.png +0 -0
- package/comate-engine/plugins/weiyun/dist/help.md +11 -0
- package/comate-engine/plugins/weiyun/dist/index.js +100491 -0
- package/comate-engine/plugins/weiyun/package.json +55 -0
- package/comate-engine/plugins/wenku/assets/icon.svg +1 -0
- package/comate-engine/plugins/wenku/dist/index.js +249 -0
- package/comate-engine/plugins/wenku/package.json +55 -0
- package/comate-engine/plugins/workcard/assets/favicon.png +0 -0
- package/comate-engine/plugins/workcard/dist/help.md +30 -0
- package/comate-engine/plugins/workcard/dist/index.js +490 -0
- package/comate-engine/plugins/workcard/package.json +95 -0
- package/comate-engine/plugins/xiaomi-aiot/assets/icon.png +0 -0
- package/comate-engine/plugins/xiaomi-aiot/dist/help.md +6 -0
- package/comate-engine/plugins/xiaomi-aiot/dist/index.js +37466 -0
- package/comate-engine/plugins/xiaomi-aiot/package.json +63 -0
- package/comate-engine/server.d.ts +3 -0
- package/comate-engine/server.js +474 -0
- package/dist/bundle/index.js +29 -58174
- package/package.json +2 -1
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
{
|
|
2
|
+
"private": true,
|
|
3
|
+
"name": "@comate-plugin/demo-feature",
|
|
4
|
+
"version": "0.9.2",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"clean": "rm -rf dist",
|
|
8
|
+
"dev": "cpd dev",
|
|
9
|
+
"build": "tsc && cpd build",
|
|
10
|
+
"lint": "eslint --max-warnings=0 src"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"dedent": "^1.5.1"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@comate/plugin-cli": "^0.9.2",
|
|
17
|
+
"@comate/plugin-host": "^0.9.2",
|
|
18
|
+
"@comate/plugin-shared-internals": "^0.9.2"
|
|
19
|
+
},
|
|
20
|
+
"comate": {
|
|
21
|
+
"name": "demo-feature",
|
|
22
|
+
"version": "1.0.0",
|
|
23
|
+
"icon": "./assets/icon.svg",
|
|
24
|
+
"entry": "./dist/index.js",
|
|
25
|
+
"displayName": "功能演示",
|
|
26
|
+
"description": "开放平台能力演示",
|
|
27
|
+
"enableModelSelect": true,
|
|
28
|
+
"keyword": [
|
|
29
|
+
"演示"
|
|
30
|
+
],
|
|
31
|
+
"capabilities": [
|
|
32
|
+
{
|
|
33
|
+
"type": "Skill",
|
|
34
|
+
"name": "demo-feature-help",
|
|
35
|
+
"displayName": "插件介绍",
|
|
36
|
+
"description": "插件介绍",
|
|
37
|
+
"placeholder": "无需输入内容,回车获得插件介绍"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "Skill",
|
|
41
|
+
"name": "userDetail",
|
|
42
|
+
"displayName": "用户信息",
|
|
43
|
+
"description": "获取用户信息",
|
|
44
|
+
"placeholder": "回车发送,获取用户信息(这里是自定义提示语)"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "Skill",
|
|
48
|
+
"name": "config",
|
|
49
|
+
"displayName": "插件配置",
|
|
50
|
+
"description": "获取插件当前配置"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "Skill",
|
|
54
|
+
"name": "context",
|
|
55
|
+
"displayName": "上下文信息",
|
|
56
|
+
"description": "获取工作现场基本信息"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "Skill",
|
|
60
|
+
"name": "file",
|
|
61
|
+
"displayName": "操作文件",
|
|
62
|
+
"description": "读取文件内容"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "Skill",
|
|
66
|
+
"name": "log",
|
|
67
|
+
"displayName": "打印日志",
|
|
68
|
+
"description": "打印日志"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "Skill",
|
|
72
|
+
"name": "render",
|
|
73
|
+
"displayName": "渲染",
|
|
74
|
+
"description": "渲染示例"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "Skill",
|
|
78
|
+
"name": "renderJsx",
|
|
79
|
+
"displayName": "渲染jsx",
|
|
80
|
+
"description": "渲染示例",
|
|
81
|
+
"enableSmartApply": true
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "Skill",
|
|
85
|
+
"name": "section",
|
|
86
|
+
"displayName": "渲染Section",
|
|
87
|
+
"description": "渲染示例"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "Prompt",
|
|
91
|
+
"name": "prompt",
|
|
92
|
+
"displayName": "LLM对话",
|
|
93
|
+
"description": "向大模型提问"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"type": "Skill",
|
|
97
|
+
"name": "rag",
|
|
98
|
+
"displayName": "检索增强生成(RAG)",
|
|
99
|
+
"description": "通过检索增强生成(RAG)进行问答"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"type": "Skill",
|
|
103
|
+
"name": "onlyCode",
|
|
104
|
+
"displayName": "返回代码",
|
|
105
|
+
"description": "通过正则控制只返回代码"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"type": "Skill",
|
|
109
|
+
"name": "streaming",
|
|
110
|
+
"displayName": "流式输出",
|
|
111
|
+
"description": "流式输出大模型的返回"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"type": "Skill",
|
|
115
|
+
"name": "debugAgent",
|
|
116
|
+
"displayName": "debug智能体能力",
|
|
117
|
+
"description": "debug智能体能力调用demo"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"type": "Skill",
|
|
121
|
+
"name": "codeSearch",
|
|
122
|
+
"displayName": "本地代码检索",
|
|
123
|
+
"description": "三方插件支持代码检索调用demo"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"type": "Skill",
|
|
127
|
+
"name": "information",
|
|
128
|
+
"displayName": "知识检索",
|
|
129
|
+
"description": "知识检索"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"type": "Skill",
|
|
133
|
+
"name": "knowledge",
|
|
134
|
+
"displayName": "知识增强",
|
|
135
|
+
"description": "知识增强"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"type": "Skill",
|
|
139
|
+
"name": "codeQuery",
|
|
140
|
+
"displayName": "代码检索",
|
|
141
|
+
"description": "代码检索"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"type": "Skill",
|
|
145
|
+
"name": "explainCode",
|
|
146
|
+
"displayName": "代码解释",
|
|
147
|
+
"description": "代码解释"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"type": "Skill",
|
|
151
|
+
"name": "selectedKnowledge",
|
|
152
|
+
"displayName": "知识选择",
|
|
153
|
+
"description": "知识选择"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"type": "Fallback",
|
|
157
|
+
"name": "fallback",
|
|
158
|
+
"displayName": "兜底",
|
|
159
|
+
"description": "兜底"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"type": "Config",
|
|
163
|
+
"name": "pluginConfig",
|
|
164
|
+
"displayName": "插件配置",
|
|
165
|
+
"description": "插件配置"
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
"configSchema": {
|
|
169
|
+
"sections": [
|
|
170
|
+
{
|
|
171
|
+
"title": "基本配置",
|
|
172
|
+
"properties": {
|
|
173
|
+
"token": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"title": "token",
|
|
176
|
+
"default": "anonymous"
|
|
177
|
+
},
|
|
178
|
+
"knowledgeUuid": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"title": "knowledgeUuid",
|
|
181
|
+
"description": "用户自定义知识中心的uuid"
|
|
182
|
+
},
|
|
183
|
+
"knowledgeQueryTemplate": {
|
|
184
|
+
"type": "string",
|
|
185
|
+
"title": "knowledgeQueryTemplate",
|
|
186
|
+
"description": "用户自定义知识查询语句,可使用{{userQuery}}占位符",
|
|
187
|
+
"default": "{{userQuery}}"
|
|
188
|
+
},
|
|
189
|
+
"llmPromptTemplate": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"title": "llmPromptTemplate",
|
|
192
|
+
"description": "自定义发送至LLM的提示词模板,可用{{userQuery}}和{{knowledge}}占位符",
|
|
193
|
+
"default": "根据我提供的知识,回答我的问题,知识是:\n\n{{knowledge}}\n\n我的问题是:{{userQuery}}"
|
|
194
|
+
},
|
|
195
|
+
"model": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"title": "model",
|
|
198
|
+
"description": "用户自定义模型",
|
|
199
|
+
"enum": [
|
|
200
|
+
"default-model",
|
|
201
|
+
"ernie-bot",
|
|
202
|
+
"ernie-bot-4"
|
|
203
|
+
],
|
|
204
|
+
"default": "default-model"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"required": [
|
|
208
|
+
"token"
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve"
|
|
2
|
+
style="enable-background:new 0 0 120 120" viewBox="0 0 120 120"><circle cx="60" cy="60" r="42.1" style="fill:#439dff"/><circle cx="60" cy="60" r="34.4" style="fill:#f4f4f4"/><path d="M79.8 56.5H63.5V32.9c0-1.9-1.6-3.5-3.5-3.5s-3.5 1.6-3.5 3.5V60.1c0 1.9 1.6 3.5 3.5 3.5h19.8c1.9 0 3.5-1.6 3.5-3.5 0-2-1.6-3.6-3.5-3.6z" style="fill:#1576ce"/><circle cx="60" cy="60" r="6.7" style="fill:#ffc856"/></svg>
|
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
import { FallbackProvider, ElementChunkStream, SkillProvider, PipeHttpRequestSkillProvider } from '@comate/plugin-host';
|
|
2
|
+
|
|
3
|
+
function jsx(type, props) {
|
|
4
|
+
// 按照React的逻辑,`boolean`、`null`、`undefined`是不会显示出来的
|
|
5
|
+
const children = Array.isArray(props.children) ? props.children.filter((v)=>v != null && typeof v !== 'boolean') : props.children;
|
|
6
|
+
return {
|
|
7
|
+
type,
|
|
8
|
+
...props,
|
|
9
|
+
children
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function sleepForOneSecond() {
|
|
14
|
+
return new Promise((r)=>setTimeout(r, 1000));
|
|
15
|
+
}
|
|
16
|
+
function calculateCountdownTime(base, unit) {
|
|
17
|
+
switch(unit){
|
|
18
|
+
case '秒':
|
|
19
|
+
return 1000 * base;
|
|
20
|
+
case '分':
|
|
21
|
+
case '分钟':
|
|
22
|
+
return 60 * 1000 * base;
|
|
23
|
+
default:
|
|
24
|
+
return base;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
class CountdownFallbackProvider extends FallbackProvider {
|
|
28
|
+
static{
|
|
29
|
+
this.description = '指定时间并开启倒计时';
|
|
30
|
+
}
|
|
31
|
+
async *handleQuery() {
|
|
32
|
+
const match = /(\d+)(秒|分|分钟)/.exec(this.currentContext.query);
|
|
33
|
+
const stream = new ElementChunkStream();
|
|
34
|
+
if (!match) {
|
|
35
|
+
yield stream.fail(/*#__PURE__*/ jsx("p", {
|
|
36
|
+
children: "还请提供准确的倒计时时长。"
|
|
37
|
+
}));
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const state = {
|
|
41
|
+
timer: null,
|
|
42
|
+
remaining: calculateCountdownTime(parseInt(match[1], 10), match[2])
|
|
43
|
+
};
|
|
44
|
+
yield stream.flush(/*#__PURE__*/ jsx("p", {
|
|
45
|
+
children: /*#__PURE__*/ jsx("file-link", {
|
|
46
|
+
to: "README.md",
|
|
47
|
+
line: 1
|
|
48
|
+
})
|
|
49
|
+
}));
|
|
50
|
+
while(state.remaining > 0){
|
|
51
|
+
yield stream.flushReplaceLast(/*#__PURE__*/ jsx("p", {
|
|
52
|
+
children: [
|
|
53
|
+
"还剩",
|
|
54
|
+
state.remaining / 1000,
|
|
55
|
+
"秒"
|
|
56
|
+
]
|
|
57
|
+
}));
|
|
58
|
+
await sleepForOneSecond();
|
|
59
|
+
state.remaining -= 1000;
|
|
60
|
+
}
|
|
61
|
+
yield stream.flush(/*#__PURE__*/ jsx("p", {
|
|
62
|
+
children: "倒计时结束"
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
class NowSkillProvider extends SkillProvider {
|
|
68
|
+
static{
|
|
69
|
+
this.skillName = 'getCurrentTime';
|
|
70
|
+
}
|
|
71
|
+
static{
|
|
72
|
+
this.description = '显示当前时间';
|
|
73
|
+
}
|
|
74
|
+
static{
|
|
75
|
+
this.parameters = {
|
|
76
|
+
type: 'object',
|
|
77
|
+
properties: {
|
|
78
|
+
type: {
|
|
79
|
+
type: 'string',
|
|
80
|
+
enum: [
|
|
81
|
+
'12H',
|
|
82
|
+
'24H'
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
required: [
|
|
87
|
+
'type'
|
|
88
|
+
]
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
async *execute({ type }) {
|
|
92
|
+
const now = new Date();
|
|
93
|
+
const formatted = now.toLocaleTimeString([
|
|
94
|
+
'en-US'
|
|
95
|
+
], {
|
|
96
|
+
hour: '2-digit',
|
|
97
|
+
minute: '2-digit',
|
|
98
|
+
hourCycle: type === '24H' ? 'h24' : 'h12'
|
|
99
|
+
});
|
|
100
|
+
yield `现在是:${formatted}`;
|
|
101
|
+
}
|
|
102
|
+
defaultArgumentValue() {
|
|
103
|
+
return {
|
|
104
|
+
type: '24H'
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const timezones = [
|
|
110
|
+
'Africa/Abidjan',
|
|
111
|
+
'Africa/Algiers',
|
|
112
|
+
'Africa/Bissau',
|
|
113
|
+
'Africa/Cairo',
|
|
114
|
+
'Africa/Casablanca',
|
|
115
|
+
'Africa/Ceuta',
|
|
116
|
+
'Africa/El_Aaiun',
|
|
117
|
+
'Africa/Johannesburg',
|
|
118
|
+
'Africa/Juba',
|
|
119
|
+
'Africa/Khartoum',
|
|
120
|
+
'Africa/Lagos',
|
|
121
|
+
'Africa/Maputo',
|
|
122
|
+
'Africa/Monrovia',
|
|
123
|
+
'Africa/Nairobi',
|
|
124
|
+
'Africa/Ndjamena',
|
|
125
|
+
'Africa/Sao_Tome',
|
|
126
|
+
'Africa/Tripoli',
|
|
127
|
+
'Africa/Tunis',
|
|
128
|
+
'Africa/Windhoek',
|
|
129
|
+
'America/Adak',
|
|
130
|
+
'America/Anchorage',
|
|
131
|
+
'America/Araguaina',
|
|
132
|
+
'America/Argentina/Buenos_Aires',
|
|
133
|
+
'America/Argentina/Catamarca',
|
|
134
|
+
'America/Argentina/Cordoba',
|
|
135
|
+
'America/Argentina/Jujuy',
|
|
136
|
+
'America/Argentina/La_Rioja',
|
|
137
|
+
'America/Argentina/Mendoza',
|
|
138
|
+
'America/Argentina/Rio_Gallegos',
|
|
139
|
+
'America/Argentina/Salta',
|
|
140
|
+
'America/Argentina/San_Juan',
|
|
141
|
+
'America/Argentina/San_Luis',
|
|
142
|
+
'America/Argentina/Tucuman',
|
|
143
|
+
'America/Argentina/Ushuaia',
|
|
144
|
+
'America/Asuncion',
|
|
145
|
+
'America/Bahia',
|
|
146
|
+
'America/Bahia_Banderas',
|
|
147
|
+
'America/Barbados',
|
|
148
|
+
'America/Belem',
|
|
149
|
+
'America/Belize',
|
|
150
|
+
'America/Boa_Vista',
|
|
151
|
+
'America/Bogota',
|
|
152
|
+
'America/Boise',
|
|
153
|
+
'America/Cambridge_Bay',
|
|
154
|
+
'America/Campo_Grande',
|
|
155
|
+
'America/Cancun',
|
|
156
|
+
'America/Caracas',
|
|
157
|
+
'America/Cayenne',
|
|
158
|
+
'America/Chicago',
|
|
159
|
+
'America/Chihuahua',
|
|
160
|
+
'America/Ciudad_Juarez',
|
|
161
|
+
'America/Costa_Rica',
|
|
162
|
+
'America/Cuiaba',
|
|
163
|
+
'America/Danmarkshavn',
|
|
164
|
+
'America/Dawson',
|
|
165
|
+
'America/Dawson_Creek',
|
|
166
|
+
'America/Denver',
|
|
167
|
+
'America/Detroit',
|
|
168
|
+
'America/Edmonton',
|
|
169
|
+
'America/Eirunepe',
|
|
170
|
+
'America/El_Salvador',
|
|
171
|
+
'America/Fort_Nelson',
|
|
172
|
+
'America/Fortaleza',
|
|
173
|
+
'America/Glace_Bay',
|
|
174
|
+
'America/Goose_Bay',
|
|
175
|
+
'America/Grand_Turk',
|
|
176
|
+
'America/Guatemala',
|
|
177
|
+
'America/Guayaquil',
|
|
178
|
+
'America/Guyana',
|
|
179
|
+
'America/Halifax',
|
|
180
|
+
'America/Havana',
|
|
181
|
+
'America/Hermosillo',
|
|
182
|
+
'America/Indiana/Indianapolis',
|
|
183
|
+
'America/Indiana/Knox',
|
|
184
|
+
'America/Indiana/Marengo',
|
|
185
|
+
'America/Indiana/Petersburg',
|
|
186
|
+
'America/Indiana/Tell_City',
|
|
187
|
+
'America/Indiana/Vevay',
|
|
188
|
+
'America/Indiana/Vincennes',
|
|
189
|
+
'America/Indiana/Winamac',
|
|
190
|
+
'America/Inuvik',
|
|
191
|
+
'America/Iqaluit',
|
|
192
|
+
'America/Jamaica',
|
|
193
|
+
'America/Juneau',
|
|
194
|
+
'America/Kentucky/Louisville',
|
|
195
|
+
'America/Kentucky/Monticello',
|
|
196
|
+
'America/La_Paz',
|
|
197
|
+
'America/Lima',
|
|
198
|
+
'America/Los_Angeles',
|
|
199
|
+
'America/Maceio',
|
|
200
|
+
'America/Managua',
|
|
201
|
+
'America/Manaus',
|
|
202
|
+
'America/Martinique',
|
|
203
|
+
'America/Matamoros',
|
|
204
|
+
'America/Mazatlan',
|
|
205
|
+
'America/Menominee',
|
|
206
|
+
'America/Merida',
|
|
207
|
+
'America/Metlakatla',
|
|
208
|
+
'America/Mexico_City',
|
|
209
|
+
'America/Miquelon',
|
|
210
|
+
'America/Moncton',
|
|
211
|
+
'America/Monterrey',
|
|
212
|
+
'America/Montevideo',
|
|
213
|
+
'America/New_York',
|
|
214
|
+
'America/Nome',
|
|
215
|
+
'America/Noronha',
|
|
216
|
+
'America/North_Dakota/Beulah',
|
|
217
|
+
'America/North_Dakota/Center',
|
|
218
|
+
'America/North_Dakota/New_Salem',
|
|
219
|
+
'America/Nuuk',
|
|
220
|
+
'America/Ojinaga',
|
|
221
|
+
'America/Panama',
|
|
222
|
+
'America/Paramaribo',
|
|
223
|
+
'America/Phoenix',
|
|
224
|
+
'America/Port-au-Prince',
|
|
225
|
+
'America/Porto_Velho',
|
|
226
|
+
'America/Puerto_Rico',
|
|
227
|
+
'America/Punta_Arenas',
|
|
228
|
+
'America/Rankin_Inlet',
|
|
229
|
+
'America/Recife',
|
|
230
|
+
'America/Regina',
|
|
231
|
+
'America/Resolute',
|
|
232
|
+
'America/Rio_Branco',
|
|
233
|
+
'America/Santarem',
|
|
234
|
+
'America/Santiago',
|
|
235
|
+
'America/Santo_Domingo',
|
|
236
|
+
'America/Sao_Paulo',
|
|
237
|
+
'America/Scoresbysund',
|
|
238
|
+
'America/Sitka',
|
|
239
|
+
'America/St_Johns',
|
|
240
|
+
'America/Swift_Current',
|
|
241
|
+
'America/Tegucigalpa',
|
|
242
|
+
'America/Thule',
|
|
243
|
+
'America/Tijuana',
|
|
244
|
+
'America/Toronto',
|
|
245
|
+
'America/Vancouver',
|
|
246
|
+
'America/Whitehorse',
|
|
247
|
+
'America/Winnipeg',
|
|
248
|
+
'America/Yakutat',
|
|
249
|
+
'Antarctica/Casey',
|
|
250
|
+
'Antarctica/Davis',
|
|
251
|
+
'Antarctica/Macquarie',
|
|
252
|
+
'Antarctica/Mawson',
|
|
253
|
+
'Antarctica/Palmer',
|
|
254
|
+
'Antarctica/Rothera',
|
|
255
|
+
'Antarctica/Troll',
|
|
256
|
+
'Asia/Almaty',
|
|
257
|
+
'Asia/Amman',
|
|
258
|
+
'Asia/Anadyr',
|
|
259
|
+
'Asia/Aqtau',
|
|
260
|
+
'Asia/Aqtobe',
|
|
261
|
+
'Asia/Ashgabat',
|
|
262
|
+
'Asia/Atyrau',
|
|
263
|
+
'Asia/Baghdad',
|
|
264
|
+
'Asia/Baku',
|
|
265
|
+
'Asia/Bangkok',
|
|
266
|
+
'Asia/Barnaul',
|
|
267
|
+
'Asia/Beirut',
|
|
268
|
+
'Asia/Bishkek',
|
|
269
|
+
'Asia/Chita',
|
|
270
|
+
'Asia/Choibalsan',
|
|
271
|
+
'Asia/Colombo',
|
|
272
|
+
'Asia/Damascus',
|
|
273
|
+
'Asia/Dhaka',
|
|
274
|
+
'Asia/Dili',
|
|
275
|
+
'Asia/Dubai',
|
|
276
|
+
'Asia/Dushanbe',
|
|
277
|
+
'Asia/Famagusta',
|
|
278
|
+
'Asia/Gaza',
|
|
279
|
+
'Asia/Hebron',
|
|
280
|
+
'Asia/Ho_Chi_Minh',
|
|
281
|
+
'Asia/Hong_Kong',
|
|
282
|
+
'Asia/Hovd',
|
|
283
|
+
'Asia/Irkutsk',
|
|
284
|
+
'Asia/Jakarta',
|
|
285
|
+
'Asia/Jayapura',
|
|
286
|
+
'Asia/Jerusalem',
|
|
287
|
+
'Asia/Kabul',
|
|
288
|
+
'Asia/Kamchatka',
|
|
289
|
+
'Asia/Karachi',
|
|
290
|
+
'Asia/Kathmandu',
|
|
291
|
+
'Asia/Khandyga',
|
|
292
|
+
'Asia/Kolkata',
|
|
293
|
+
'Asia/Krasnoyarsk',
|
|
294
|
+
'Asia/Kuching',
|
|
295
|
+
'Asia/Macau',
|
|
296
|
+
'Asia/Magadan',
|
|
297
|
+
'Asia/Makassar',
|
|
298
|
+
'Asia/Manila',
|
|
299
|
+
'Asia/Nicosia',
|
|
300
|
+
'Asia/Novokuznetsk',
|
|
301
|
+
'Asia/Novosibirsk',
|
|
302
|
+
'Asia/Omsk',
|
|
303
|
+
'Asia/Oral',
|
|
304
|
+
'Asia/Pontianak',
|
|
305
|
+
'Asia/Pyongyang',
|
|
306
|
+
'Asia/Qatar',
|
|
307
|
+
'Asia/Qostanay',
|
|
308
|
+
'Asia/Qyzylorda',
|
|
309
|
+
'Asia/Riyadh',
|
|
310
|
+
'Asia/Sakhalin',
|
|
311
|
+
'Asia/Samarkand',
|
|
312
|
+
'Asia/Seoul',
|
|
313
|
+
'Asia/Shanghai',
|
|
314
|
+
'Asia/Singapore',
|
|
315
|
+
'Asia/Srednekolymsk',
|
|
316
|
+
'Asia/Taipei',
|
|
317
|
+
'Asia/Tashkent',
|
|
318
|
+
'Asia/Tbilisi',
|
|
319
|
+
'Asia/Tehran',
|
|
320
|
+
'Asia/Thimphu',
|
|
321
|
+
'Asia/Tokyo',
|
|
322
|
+
'Asia/Tomsk',
|
|
323
|
+
'Asia/Ulaanbaatar',
|
|
324
|
+
'Asia/Urumqi',
|
|
325
|
+
'Asia/Ust-Nera',
|
|
326
|
+
'Asia/Vladivostok',
|
|
327
|
+
'Asia/Yakutsk',
|
|
328
|
+
'Asia/Yangon',
|
|
329
|
+
'Asia/Yekaterinburg',
|
|
330
|
+
'Asia/Yerevan',
|
|
331
|
+
'Atlantic/Azores',
|
|
332
|
+
'Atlantic/Bermuda',
|
|
333
|
+
'Atlantic/Canary',
|
|
334
|
+
'Atlantic/Cape_Verde',
|
|
335
|
+
'Atlantic/Faroe',
|
|
336
|
+
'Atlantic/Madeira',
|
|
337
|
+
'Atlantic/South_Georgia',
|
|
338
|
+
'Atlantic/Stanley',
|
|
339
|
+
'Australia/Adelaide',
|
|
340
|
+
'Australia/Brisbane',
|
|
341
|
+
'Australia/Broken_Hill',
|
|
342
|
+
'Australia/Darwin',
|
|
343
|
+
'Australia/Eucla',
|
|
344
|
+
'Australia/Hobart',
|
|
345
|
+
'Australia/Lindeman',
|
|
346
|
+
'Australia/Lord_Howe',
|
|
347
|
+
'Australia/Melbourne',
|
|
348
|
+
'Australia/Perth',
|
|
349
|
+
'Australia/Sydney',
|
|
350
|
+
'Europe/Andorra',
|
|
351
|
+
'Europe/Astrakhan',
|
|
352
|
+
'Europe/Athens',
|
|
353
|
+
'Europe/Belgrade',
|
|
354
|
+
'Europe/Berlin',
|
|
355
|
+
'Europe/Brussels',
|
|
356
|
+
'Europe/Bucharest',
|
|
357
|
+
'Europe/Budapest',
|
|
358
|
+
'Europe/Chisinau',
|
|
359
|
+
'Europe/Dublin',
|
|
360
|
+
'Europe/Gibraltar',
|
|
361
|
+
'Europe/Helsinki',
|
|
362
|
+
'Europe/Istanbul',
|
|
363
|
+
'Europe/Kaliningrad',
|
|
364
|
+
'Europe/Kirov',
|
|
365
|
+
'Europe/Kyiv',
|
|
366
|
+
'Europe/Lisbon',
|
|
367
|
+
'Europe/London',
|
|
368
|
+
'Europe/Madrid',
|
|
369
|
+
'Europe/Malta',
|
|
370
|
+
'Europe/Minsk',
|
|
371
|
+
'Europe/Moscow',
|
|
372
|
+
'Europe/Paris',
|
|
373
|
+
'Europe/Prague',
|
|
374
|
+
'Europe/Riga',
|
|
375
|
+
'Europe/Rome',
|
|
376
|
+
'Europe/Samara',
|
|
377
|
+
'Europe/Saratov',
|
|
378
|
+
'Europe/Simferopol',
|
|
379
|
+
'Europe/Sofia',
|
|
380
|
+
'Europe/Tallinn',
|
|
381
|
+
'Europe/Tirane',
|
|
382
|
+
'Europe/Ulyanovsk',
|
|
383
|
+
'Europe/Vienna',
|
|
384
|
+
'Europe/Vilnius',
|
|
385
|
+
'Europe/Volgograd',
|
|
386
|
+
'Europe/Warsaw',
|
|
387
|
+
'Europe/Zurich',
|
|
388
|
+
'Indian/Chagos',
|
|
389
|
+
'Indian/Maldives',
|
|
390
|
+
'Indian/Mauritius',
|
|
391
|
+
'Pacific/Apia',
|
|
392
|
+
'Pacific/Auckland',
|
|
393
|
+
'Pacific/Bougainville',
|
|
394
|
+
'Pacific/Chatham',
|
|
395
|
+
'Pacific/Easter',
|
|
396
|
+
'Pacific/Efate',
|
|
397
|
+
'Pacific/Fakaofo',
|
|
398
|
+
'Pacific/Fiji',
|
|
399
|
+
'Pacific/Galapagos',
|
|
400
|
+
'Pacific/Gambier',
|
|
401
|
+
'Pacific/Guadalcanal',
|
|
402
|
+
'Pacific/Guam',
|
|
403
|
+
'Pacific/Honolulu',
|
|
404
|
+
'Pacific/Kanton',
|
|
405
|
+
'Pacific/Kiritimati',
|
|
406
|
+
'Pacific/Kosrae',
|
|
407
|
+
'Pacific/Kwajalein',
|
|
408
|
+
'Pacific/Marquesas',
|
|
409
|
+
'Pacific/Nauru',
|
|
410
|
+
'Pacific/Niue',
|
|
411
|
+
'Pacific/Norfolk',
|
|
412
|
+
'Pacific/Noumea',
|
|
413
|
+
'Pacific/Pago_Pago',
|
|
414
|
+
'Pacific/Palau',
|
|
415
|
+
'Pacific/Pitcairn',
|
|
416
|
+
'Pacific/Port_Moresby',
|
|
417
|
+
'Pacific/Rarotonga',
|
|
418
|
+
'Pacific/Tahiti',
|
|
419
|
+
'Pacific/Tarawa',
|
|
420
|
+
'Pacific/Tongatapu'
|
|
421
|
+
];
|
|
422
|
+
class WorldTimeSkillProvider extends PipeHttpRequestSkillProvider {
|
|
423
|
+
static{
|
|
424
|
+
this.skillName = 'getTimeForTimezone';
|
|
425
|
+
}
|
|
426
|
+
static{
|
|
427
|
+
this.displayName = '世界时钟';
|
|
428
|
+
}
|
|
429
|
+
static{
|
|
430
|
+
this.description = '根据指定的时区获取当前时间';
|
|
431
|
+
}
|
|
432
|
+
static{
|
|
433
|
+
this.parameters = {
|
|
434
|
+
type: 'object',
|
|
435
|
+
properties: {
|
|
436
|
+
timezone: {
|
|
437
|
+
type: 'string',
|
|
438
|
+
description: '时区名称',
|
|
439
|
+
enum: timezones
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
async buildRequest(args) {
|
|
445
|
+
return {
|
|
446
|
+
method: 'GET',
|
|
447
|
+
url: `https://worldtimeapi.org/api/timezone/${args.timezone}`,
|
|
448
|
+
responseType: 'json'
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
transformResponseToText(responseData) {
|
|
452
|
+
const [date, time] = responseData.datetime.split(/T|\./);
|
|
453
|
+
return `${responseData.timezone}时区当前时间是:${date} ${time}`;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
function setup({ registry }) {
|
|
458
|
+
registry.registerFallbackProvider('countdown', CountdownFallbackProvider);
|
|
459
|
+
registry.registerSkillProvider('now', NowSkillProvider);
|
|
460
|
+
registry.registerSkillProvider('worldTime', WorldTimeSkillProvider);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export { setup };
|