From 3db4c76c906a98f51cd0eb0d98bb9998026acab1 Mon Sep 17 00:00:00 2001 From: 4thCafe Date: Fri, 17 Jul 2026 02:05:31 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=BF=E3=82=B0=E5=8D=98=E4=BD=8D=E7=B7=A8?= =?UTF-8?q?=E9=9B=86MVP:=20=E6=97=A2=E5=AD=98=E5=85=A5=E5=8A=9B=E6=AC=84?= =?UTF-8?q?=E3=82=92=E3=83=81=E3=83=83=E3=83=97=E5=8C=96(=E5=80=8B?= =?UTF-8?q?=E5=88=A5=E7=B7=A8=E9=9B=86=E3=83=BB=E9=87=8D=E3=81=BF+/-?= =?UTF-8?q?=E3=83=BBD&D=E4=B8=A6=E3=81=B9=E6=9B=BF=E3=81=88=E3=83=BB?= =?UTF-8?q?=E5=89=8A=E9=99=A4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 既存ノードのmultiline STRING入力欄をフロントエンド拡張でその場チップ化する。 追加ノードは増やさず、ネイティブtextareaを真実の値として温存し双方向同期する。 - prompt_parser.js: 深度カウンタ方式のトークナイズ/シリアライズ、重み調整(0.05刻み・1.0近傍unwrap)、LoRA/BREAK/エスケープ/括弧内カンマ対応、未対応構文はraw温存で無損失 - input_watcher.js: customtext widget発見(element優先)、addDOMWidgetでチップエリア隣接配置、定期スキャンで読込タイミング非依存に、3行同期(textarea.value/input/callback) - tag_editor.js + style.css: チップ描画・inline編集・+/-/×・ドラッグ並べ替え・型別色分け - main.js/__init__.py: 拡張登録・有効化トグル(WEB_DIRECTORY、ノード追加なし) Co-Authored-By: Claude Fable 5 --- .gitignore | 4 + LICENSE | 21 +++++ README.md | 34 ++++++++ __init__.py | 11 +++ js/input_watcher.js | 112 +++++++++++++++++++++++++ js/main.js | 51 ++++++++++++ js/prompt_parser.js | 196 ++++++++++++++++++++++++++++++++++++++++++++ js/style.css | 137 +++++++++++++++++++++++++++++++ js/tag_editor.js | 170 ++++++++++++++++++++++++++++++++++++++ 9 files changed, 736 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 __init__.py create mode 100644 js/input_watcher.js create mode 100644 js/main.js create mode 100644 js/prompt_parser.js create mode 100644 js/style.css create mode 100644 js/tag_editor.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c86c6cb --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +__pycache__/ +*.pyc +.DS_Store +node_modules/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1f2320d --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 4thCafe + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..bdfe947 --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# ComfyUI-PromptTagEditor + +既存ノードのプロンプト入力欄(multiline STRING)を、**タグ(チップ)単位で編集**できるように強化する ComfyUI フロントエンド拡張です。SD-WebUI の `sd-webui-prompt-all-in-one` のタグ編集体験を、**追加ノードを増やさずに** ComfyUI 上で再現します。 + +## 特徴 + +- **タグ編集エリアを分離表示**: 既存の `