feat(channel): add customizable JS model-call scripts with split-panel editor

- Run user-authored async scripts per model with flat locals (prompt,
  images, messages, params, model, baseUrl, apiKey, http, request, poll,
  sleep, signal, onDelta); empty script falls back to system default.
- Wire image/video/audio/text request entrypoints through the plugin
  runtime, keeping default handlers unchanged.
- Split-panel script editor: variable/return docs on the left, CodeMirror
  JS editor on the right; title shows capability - model.
- Provide OpenAI and Gemini template buttons per capability; text template
  uses the /responses API; image template branches text2img vs img2img.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
HouYunFei
2026-07-15 11:24:34 +08:00
parent 3963c6eebf
commit f0db29d8e3
6 changed files with 341 additions and 132 deletions
+1
View File
@@ -14,6 +14,7 @@
"dependencies": {
"@ant-design/icons": "^6.1.1",
"@ant-design/pro-components": "3.0.0-beta.3",
"@codemirror/lang-javascript": "^6.2.5",
"@codemirror/lang-json": "^6.0.2",
"@tanstack/react-query": "^5.100.9",
"@uiw/react-codemirror": "^4.25.9",