Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66f46af8b6 |
@@ -1,5 +1,73 @@
|
||||
# DEVLOG - ComfyUI-Workflow-Studio
|
||||
|
||||
## 2026-05-19: v0.3.14 — AI TOOL タブ 3ペイン化・RAW JSON 文字色カスタマイズ
|
||||
|
||||
### 概要
|
||||
|
||||
AI タブの UI を刷新し、サブタブ廃止・3 ペイン同時表示レイアウトへ移行。また Settings タブに RAW JSON シンタックスハイライトの文字色カスタマイズ機能を追加。
|
||||
|
||||
### 変更内容
|
||||
|
||||
#### `templates/index.html`
|
||||
|
||||
- タブボタンラベルを `"A"` → `"AI TOOL"` に変更
|
||||
- `<section id="wfm-tab-ai">` をサブタブ構成から **3 ペインレイアウト** に刷新
|
||||
- サブタブナビ(翻訳 / VLM / 設定ボタン)を削除
|
||||
- `<div class="wfm-ai-pane wfm-ai-pane-translate">` — 翻訳ペイン(flex: 4)
|
||||
- `<div class="wfm-ai-pane-divider">` — 縦区切り線
|
||||
- `<div class="wfm-ai-pane wfm-ai-pane-tools">` — TOOLS ペイン(flex: 4、旧 VLM)
|
||||
- `<div class="wfm-ai-pane-divider">` — 縦区切り線
|
||||
- `<div class="wfm-ai-pane wfm-ai-pane-settings">` — 設定ペイン(flex: 2)
|
||||
- 各ペインに `<div class="wfm-ai-pane-header">` を追加(翻訳 / TOOLS / 設定)
|
||||
- ヘルプタブ更新
|
||||
- `wfm-help-sidepanel-16`: 「AI TOOL tab: Translation and TOOLS (VLM) panes … 3-pane layout always visible」に変更
|
||||
- `wfm-help-ai-title`: "AI Tab (A)" → "AI TOOL Tab"
|
||||
- `wfm-help-ai-1`〜`5`: 3 ペインレイアウトの説明に書き直し(項目数 6→5)
|
||||
- `wfm-help-settings-12` 新規追加: RAW JSON Colors 設定の説明
|
||||
|
||||
#### `static/css/main.css`
|
||||
|
||||
- `#wfm-tab-ai` の `flex-direction` を `column` → `row` に変更
|
||||
- サブタブ関連 CSS を削除: `.wfm-ai-subtab-nav`、`.wfm-ai-subtab-btn`(`.active` 含む)、`.wfm-ai-subtab-content`
|
||||
- 3 ペイン用 CSS を追加:
|
||||
- `.wfm-ai-pane` — `display:flex; flex-direction:column; overflow:hidden; min-width:0`
|
||||
- `.wfm-ai-pane-translate { flex:4 }` / `.wfm-ai-pane-tools { flex:4 }` / `.wfm-ai-pane-settings { flex:2 }`
|
||||
- `.wfm-ai-pane-header` — ペイン見出し(uppercase、border-bottom)
|
||||
- `.wfm-ai-pane-divider` — 幅 1px の縦区切り線
|
||||
|
||||
#### `static/js/ai-tab.js`
|
||||
|
||||
- `initSubTabs()` 関数を削除(サブタブ切り替えロジック全体)
|
||||
- `initAiTab()` から `initSubTabs()` の呼び出しを削除
|
||||
- `initTranslateTab()`・`initVlmTab()`・`initSettingsTab()` はそのまま維持
|
||||
|
||||
#### `static/js/i18n.js`
|
||||
|
||||
- `tabAi` を `"A"` → `"AI TOOL"` に EN/JA/ZH 全言語で変更(`replace_all` で 3 箇所一括)
|
||||
|
||||
#### `static/js/settings-tab.js`
|
||||
|
||||
- **`JSON_COLOR_STYLE_ID`** 定数を追加 (`"wfm-json-color-style"`)
|
||||
- **`JSON_COLOR_DEFS`** 配列を追加(6 色定義: base / yellow / pink / green / cyan / red)
|
||||
- 各要素: `{ id, label: () => t(key) || fallback, def: "#xxxxxx" }`
|
||||
- **`export function applyJsonColors(colors)`** を追加
|
||||
- `<style id="wfm-json-color-style">` を動的生成・更新
|
||||
- `.wfm-json-highlight`・`.json-key-*`・`.json-val-*` の 6 クラスを上書き
|
||||
- `colors` が `undefined` のときはすべてデフォルト値を使用
|
||||
- 設定 HTML テンプレートに `<!-- RAW JSON Colors -->` セクションを追加
|
||||
- `<details>` アコーディオン、`<div id="wfm-json-color-grid">` に 6 個のカラーピッカー
|
||||
- `<button id="wfm-json-color-reset">` でデフォルト復元
|
||||
- イベントハンドラを追加
|
||||
- `#wfm-json-color-grid` の `input` イベント: 色変更を即時反映 + `jsonColors` キーとして localStorage 保存
|
||||
- `#wfm-json-color-reset` の `click` イベント: `jsonColors` キー削除・UI リセット・`applyJsonColors(undefined)` 呼び出し
|
||||
|
||||
#### `static/js/app.js`
|
||||
|
||||
- `import` に `applyJsonColors` を追加
|
||||
- 起動時ブロックに `applyJsonColors(_s.jsonColors)` を追加(テーマ・フォントサイズと同様に DOMContentLoaded 前に適用)
|
||||
|
||||
---
|
||||
|
||||
## 2026-05-19: v0.3.13 — AI タブ(A)追加
|
||||
|
||||
### 概要
|
||||
|
||||
@@ -5,7 +5,7 @@ A comprehensive workflow management and generation UI plugin for [ComfyUI](https
|
||||
Browse, organize, and execute workflows directly from a dedicated studio interface — without switching between windows or manually editing JSON.
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## Screenshots
|
||||
|
||||
@@ -106,6 +106,7 @@ Requires the **[comfyui-image-feeder](https://github.com/ketle-man/comfyui-image
|
||||
- **Default workflow** — set a workflow to auto-load on startup
|
||||
- **Data Management** — export all plugin data (settings, metadata, prompts, etc.) to a single JSON file; import to restore data (useful when migrating or reinstalling)
|
||||
- **Text Size** — one slider (10–28 px) adjusts font size for all prompt and chat textareas at once: Generate UI positive/negative prompts, AI Assistant chat input, Preset prompts, Wildcard prompt and file editor, and Metadata prompt full preview; takes effect immediately and saved with Save Settings
|
||||
- **RAW JSON Colors** — customize the 6 syntax highlight colors for the Raw JSON editor in Generate UI: Default Text (base), Name/Scheduler (yellow), Title (pink), Width/Height (green), Prompt/Text (cyan), Image/File (red); changes apply immediately on color pick; Reset Defaults restores the original scheme; saved to `localStorage` under `wfm_settings.jsonColors` and applied on startup
|
||||
- **Wildcard Integration** — link the WFS wildcard directory to ComfyUI-Impact-Pack's `wildcards/` directory (directory junction on Windows, symlink on other OS); existing WFS wildcard files are automatically migrated; requires [ComfyUI-Impact-Pack](https://github.com/ltdrdata/ComfyUI-Impact-Pack)
|
||||
- **Language** — English / Japanese / Chinese
|
||||
|
||||
@@ -148,11 +149,12 @@ Requires the **[comfyui-image-feeder](https://github.com/ketle-man/comfyui-image
|
||||
- **Enable / Disable models** — hide models from ComfyUI by renaming the file extension (`.disabled` suffix); toggle per card (⏸ button), per group (Enable All / Disable All), or filter by status (All / Enabled / Disabled)
|
||||
- **Multi-select & bulk operations** — enter selection mode to check multiple models; bulk action bar supports add/remove from groups and permanent file deletion (model file + preview images + sidecar files such as `.json` / `.info`)
|
||||
|
||||
### AI Tab (A) (v0.3.13)
|
||||
- **Translation sub-tab** — translate text between Japanese, English, Chinese, or a custom Free language using Ollama or LM Studio; language selectors with ⇄ swap button (swaps both language and text content); selections saved automatically
|
||||
- **VLM sub-tab** — drop an image into the 110px drop zone, select a task (Describe Image / Create Prompt), and click Run to analyze with a vision model; result shown in the output area with a Copy button
|
||||
- **Settings sub-tab** — choose backend (Ollama / LM Studio), set the API URL, test connection, select a model (with refresh button), and configure Free language names for translation source and destination
|
||||
- **Settings shared** — settings saved to `localStorage` under `wfm_ai_settings`; shared with the Library panel's A tab so configuration is consistent across both interfaces
|
||||
### AI TOOL Tab (v0.3.14)
|
||||
- **3-pane layout** — Translation (40%) | TOOLS (40%) | Settings (20%); all panes always visible simultaneously; no sub-tab switching required
|
||||
- **Translation pane** — translate text between Japanese, English, Chinese, or a custom Free language using Ollama or LM Studio; language selectors with ⇄ swap button (swaps both language selectors and text content); selections saved automatically
|
||||
- **TOOLS pane (VLM)** — drop an image into the 110px drop zone, select a task (Describe Image / Create Prompt), and click Run to analyze with a vision model; result shown in the output area with a Copy button
|
||||
- **Settings pane** — choose backend (Ollama / LM Studio), set the API URL, test connection, select a model (with refresh button), and configure Free language names for translation source and destination
|
||||
- **Settings shared** — settings saved to `localStorage` under `wfm_ai_settings`; shared with the Library panel's AI TOOL tab so configuration is consistent across both interfaces
|
||||
- **Backend support** — Ollama (`/api/generate` for text, `/api/tags` for model list); LM Studio OpenAI-compatible API (`/v1/chat/completions`, `/v1/models`); VLM images sent as base64 (`images:[]` for Ollama, `image_url` content block for LM Studio)
|
||||
- **URL security** — backend URL validated via `new URL()` to enforce `http://` or `https://` scheme
|
||||
|
||||
@@ -165,7 +167,7 @@ Requires the **[comfyui-image-feeder](https://github.com/ketle-man/comfyui-image
|
||||
- **M — Models tab** — browse installed models (All / ★ Favorites / Groups / By Type sub-tabs)
|
||||
- **P — Prompts tab** — browse prompt presets with All / Favorites / Categories sub-tabs
|
||||
- **I — Information tab** — drop a ComfyUI-generated PNG/WebP or workflow JSON in the side panel to view its metadata; supports `UnetLoaderGGUF` and `QuadrupleCLIPLoader` node types; preview area fixed at 110px
|
||||
- **A — AI Tools tab** — Translation sub-tab and VLM sub-tab powered by Ollama or LM Studio; settings (backend, URL, model) shared with the SPA AI tab via `localStorage`
|
||||
- **A — AI TOOL tab** — 3-pane layout (Translation | TOOLS | Settings) always visible; Translation and TOOLS (VLM) powered by Ollama or LM Studio; settings (backend, URL, model) shared with the SPA AI TOOL tab via `localStorage`
|
||||
- **model sub-tab** — Checkpoint, VAE, Diffusion Model, and Text Encoder; drag items to canvas to place the corresponding loader node (Checkpoint → `CheckpointLoaderSimple`, VAE → `VAELoader`, Diffusion Model → `UNETLoader`, Text Encoder → `CLIPLoader`); double-click also places at canvas center
|
||||
- **lora sub-tab** — LoRA names with `strength_model / strength_clip` values; drag individual LoRA to place `LoraLoader`; **Multiple LORA** section (appears for 1+ LoRAs) drags all LoRAs into a single `Lora Loader (LoraManager)` node
|
||||
- **Prompts sub-tab** — POS / NEG badge list; drag a prompt to place `CLIPTextEncode` with text pre-filled; click any entry to view full text + Copy button
|
||||
@@ -253,6 +255,11 @@ Click the **camera icon** (next to the W button) in ComfyUI's top bar to capture
|
||||
|
||||
## Changelog
|
||||
|
||||
### v0.3.14
|
||||
- **AI TOOL tab redesign** — tab renamed from "A" to "AI TOOL"; sub-tab navigation removed in favor of a permanent 3-pane layout (Translation 40% | TOOLS 40% | Settings 20%) — all panes always visible simultaneously; "VLM" pane renamed to "TOOLS"
|
||||
- **Settings — RAW JSON Colors** — new accordion section with 6 color pickers to customize the syntax highlight colors for the Raw JSON editor in Generate UI: Default Text, Name/Scheduler, Title, Width/Height, Prompt/Text, Image/File; changes apply immediately on color pick; Reset Defaults restores the original scheme; saved to `localStorage` under `wfm_settings.jsonColors` and applied on startup
|
||||
- **Help tab updated** — AI TOOL tab card rewritten; Settings card updated with RAW JSON Colors entry; Library panel sidepanel-16 entry updated
|
||||
|
||||
### v0.3.13
|
||||
- **AI Tab (A)** — new tab added to both the SPA and the Workflow Studio Library side panel (rightmost tab)
|
||||
- **Translation sub-tab** — translate text via Ollama or LM Studio between Japanese, English, Chinese, or a custom Free language; ⇄ swap button exchanges both language selectors and text content simultaneously; language selections persisted automatically
|
||||
@@ -480,7 +487,7 @@ ComfyUI-Workflow-Studio/
|
||||
│ ├── comfyui-client.js # ComfyUI WebSocket/API client
|
||||
│ ├── nodes-tab.js # Node browser & node sets
|
||||
│ ├── models-tab.js # Model browser & CivitAI integration
|
||||
│ ├── ai-tab.js # AI tab (Translation, VLM, Settings — Ollama / LM Studio)
|
||||
│ ├── ai-tab.js # AI TOOL tab (Translation | TOOLS/VLM | Settings — Ollama / LM Studio)
|
||||
│ ├── comfyui-workflow.js # UI-to-API format conversion
|
||||
│ ├── comfyui-editor.js # Dynamic parameter editor
|
||||
│ ├── json-highlight.js # JSON syntax highlighting
|
||||
|
||||
+23
-32
@@ -4448,7 +4448,7 @@ body {
|
||||
|
||||
#wfm-tab-ai {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
flex-direction: row;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -4457,43 +4457,34 @@ body {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* Sub-tab navigation */
|
||||
.wfm-ai-subtab-nav {
|
||||
/* 3-pane layout */
|
||||
.wfm-ai-pane {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.wfm-ai-pane-translate { flex: 4; }
|
||||
.wfm-ai-pane-tools { flex: 4; }
|
||||
.wfm-ai-pane-settings { flex: 2; }
|
||||
|
||||
.wfm-ai-pane-header {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--wfm-text-secondary);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
padding: 8px 12px;
|
||||
border-bottom: 1px solid var(--wfm-border);
|
||||
flex-shrink: 0;
|
||||
background: var(--wfm-surface);
|
||||
}
|
||||
|
||||
.wfm-ai-subtab-btn {
|
||||
flex: 1;
|
||||
padding: 8px 12px;
|
||||
font-size: 13px;
|
||||
border: none;
|
||||
border-bottom: 2px solid transparent;
|
||||
background: transparent;
|
||||
color: var(--wfm-text-secondary);
|
||||
cursor: pointer;
|
||||
transition: color 0.15s, border-color 0.15s;
|
||||
}
|
||||
|
||||
.wfm-ai-subtab-btn:hover {
|
||||
color: var(--wfm-text);
|
||||
}
|
||||
|
||||
.wfm-ai-subtab-btn.active {
|
||||
color: var(--wfm-text);
|
||||
border-bottom-color: var(--wfm-primary);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Sub-tab content */
|
||||
.wfm-ai-subtab-content {
|
||||
flex: 1;
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
min-height: 0;
|
||||
.wfm-ai-pane-divider {
|
||||
width: 1px;
|
||||
background: var(--wfm-border);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Translation tab */
|
||||
|
||||
@@ -151,28 +151,6 @@ function buildTranslationPrompt(text, srcLang, dstLang, settings) {
|
||||
return `Translate the following text ${fromPart}to ${dstName}. Output only the translated text, nothing else.\n\n${text}`;
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// Sub-tab switching
|
||||
// ============================================
|
||||
|
||||
function initSubTabs() {
|
||||
document.querySelectorAll(".wfm-ai-subtab-btn").forEach((btn) => {
|
||||
btn.addEventListener("click", () => {
|
||||
document.querySelectorAll(".wfm-ai-subtab-btn").forEach((b) => b.classList.remove("active"));
|
||||
btn.classList.add("active");
|
||||
const tabId = btn.dataset.aiSubtab;
|
||||
document.querySelectorAll(".wfm-ai-subtab-content").forEach((c) => {
|
||||
c.style.display = "none";
|
||||
});
|
||||
const target = document.getElementById(`wfm-ai-subtab-${tabId}`);
|
||||
if (target) target.style.display = "flex";
|
||||
});
|
||||
});
|
||||
// Show first sub-tab on init
|
||||
const first = document.getElementById("wfm-ai-subtab-translate");
|
||||
if (first) first.style.display = "flex";
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// Translation tab
|
||||
// ============================================
|
||||
@@ -470,7 +448,6 @@ function initVlmTab() {
|
||||
// ============================================
|
||||
|
||||
export function initAiTab() {
|
||||
initSubTabs();
|
||||
initTranslateTab();
|
||||
initVlmTab();
|
||||
initSettingsTab();
|
||||
|
||||
+7
-1
@@ -426,7 +426,7 @@ import { initWorkflowTab } from "./workflow-tab.js";
|
||||
import { initNodesTab } from "./nodes-tab.js";
|
||||
import { initGenerateTab } from "./generate-tab.js";
|
||||
import { initPromptTab } from "./prompt-tab.js";
|
||||
import { initSettingsTab, applyTheme, getSavedTheme, applyTextareaFontSize } from "./settings-tab.js";
|
||||
import { initSettingsTab, applyTheme, getSavedTheme, applyTextareaFontSize, applyJsonColors } from "./settings-tab.js";
|
||||
import { initModelsTab } from "./models-tab.js";
|
||||
import { initGalleryTab } from "./gallery-tab.js";
|
||||
import { initMetadataTab } from "./metadata-tab.js";
|
||||
@@ -441,6 +441,12 @@ try {
|
||||
if (_s.textareaFontSize) applyTextareaFontSize(_s.textareaFontSize);
|
||||
} catch {}
|
||||
|
||||
// Apply saved JSON highlight colors
|
||||
try {
|
||||
const _s = JSON.parse(localStorage.getItem("wfm_settings") || "{}");
|
||||
applyJsonColors(_s.jsonColors);
|
||||
} catch {}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
applyI18nToHtml();
|
||||
initTabs();
|
||||
|
||||
+3
-3
@@ -324,7 +324,7 @@ const LANGUAGES = {
|
||||
galleryOutputDirLabel: "Output Folder Path",
|
||||
galleryOutputDirHint: "Set the ComfyUI output folder to browse in the Gallery tab. Leave blank to use ComfyUI's default output directory.",
|
||||
|
||||
tabAi: "A",
|
||||
tabAi: "AI TOOL",
|
||||
|
||||
// -- AI Tab --
|
||||
aiSubTabTranslate: "Translate",
|
||||
@@ -951,7 +951,7 @@ const LANGUAGES = {
|
||||
galleryOutputDirLabel: "Outputフォルダのパス",
|
||||
galleryOutputDirHint: "ギャラリータブで参照するComfyUIのoutputフォルダを設定します。空欄の場合はComfyUIのデフォルトoutputディレクトリを使用します。",
|
||||
|
||||
tabAi: "A",
|
||||
tabAi: "AI TOOL",
|
||||
|
||||
// -- AI Tab --
|
||||
aiSubTabTranslate: "翻訳",
|
||||
@@ -1574,7 +1574,7 @@ const LANGUAGES = {
|
||||
galleryOutputDirLabel: "输出文件夹路径",
|
||||
galleryOutputDirHint: "设置图库标签页浏览的ComfyUI输出文件夹。留空则使用ComfyUI默认输出目录。",
|
||||
|
||||
tabAi: "A",
|
||||
tabAi: "AI TOOL",
|
||||
|
||||
// -- AI Tab --
|
||||
aiSubTabTranslate: "翻译",
|
||||
|
||||
@@ -338,6 +338,36 @@ export function applyTextareaFontSize(size) {
|
||||
el.textContent = `${TEXTAREA_FONT_SIZE_TARGETS} { font-size: ${px}px !important; }`;
|
||||
}
|
||||
|
||||
// JSON highlight color settings
|
||||
const JSON_COLOR_STYLE_ID = "wfm-json-color-style";
|
||||
|
||||
const JSON_COLOR_DEFS = [
|
||||
{ id: "base", label: () => t("jsonColorBase") || "通常テキスト", def: "#abb2bf" },
|
||||
{ id: "yellow", label: () => t("jsonColorYellow") || "名前 / スケジューラ", def: "#e5c07b" },
|
||||
{ id: "pink", label: () => t("jsonColorPink") || "タイトル", def: "#c678dd" },
|
||||
{ id: "green", label: () => t("jsonColorGreen") || "Width / Height", def: "#98c379" },
|
||||
{ id: "cyan", label: () => t("jsonColorCyan") || "プロンプト / テキスト", def: "#61afef" },
|
||||
{ id: "red", label: () => t("jsonColorRed") || "画像 / ファイル", def: "#e06c75" },
|
||||
];
|
||||
|
||||
export function applyJsonColors(colors) {
|
||||
const vals = Object.fromEntries(JSON_COLOR_DEFS.map(d => [d.id, colors?.[d.id] || d.def]));
|
||||
let el = document.getElementById(JSON_COLOR_STYLE_ID);
|
||||
if (!el) {
|
||||
el = document.createElement("style");
|
||||
el.id = JSON_COLOR_STYLE_ID;
|
||||
document.head.appendChild(el);
|
||||
}
|
||||
el.textContent = [
|
||||
`.wfm-json-highlight { color: ${vals.base}; }`,
|
||||
`.json-key-yellow, .json-val-yellow { color: ${vals.yellow}; }`,
|
||||
`.json-key-pink, .json-val-pink { color: ${vals.pink}; }`,
|
||||
`.json-key-green, .json-val-green { color: ${vals.green}; }`,
|
||||
`.json-key-cyan, .json-val-cyan { color: ${vals.cyan}; }`,
|
||||
`.json-key-red, .json-val-red { color: ${vals.red}; }`,
|
||||
].join("\n");
|
||||
}
|
||||
|
||||
export function applyTheme(themeId) {
|
||||
if (themeId) {
|
||||
document.documentElement.setAttribute("data-theme", themeId);
|
||||
@@ -527,6 +557,23 @@ export async function initSettingsTab() {
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<!-- RAW JSON Colors -->
|
||||
<details class="wfm-settings-section" open>
|
||||
<summary class="wfm-settings-summary">${t("jsonColorsSection") || "RAW JSON Colors"}</summary>
|
||||
<div class="wfm-form-group">
|
||||
<div class="wfm-color-grid" id="wfm-json-color-grid">
|
||||
${JSON_COLOR_DEFS.map(d => {
|
||||
const saved = settings.jsonColors?.[d.id] || d.def;
|
||||
return `<div class="wfm-color-item">
|
||||
<label>${d.label()}</label>
|
||||
<input type="color" data-json-color="${d.id}" value="${saved}">
|
||||
</div>`;
|
||||
}).join("")}
|
||||
</div>
|
||||
<button class="wfm-btn wfm-btn-sm" id="wfm-json-color-reset" style="margin-top:8px;">${t("jsonColorReset") || "デフォルトに戻す"}</button>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<!-- Workflow Data Folder -->
|
||||
<details class="wfm-settings-section">
|
||||
<summary class="wfm-settings-summary">${t("workflowsDir")}</summary>
|
||||
@@ -1082,6 +1129,27 @@ export async function initSettingsTab() {
|
||||
applyTextareaFontSize(px);
|
||||
});
|
||||
|
||||
// --- JSON highlight color pickers ---
|
||||
document.getElementById("wfm-json-color-grid")?.addEventListener("input", (e) => {
|
||||
if (e.target.type !== "color") return;
|
||||
const id = e.target.dataset.jsonColor;
|
||||
const jsonColors = { ...(loadLocalSettings().jsonColors || {}), [id]: e.target.value };
|
||||
saveLocalSettings({ jsonColors });
|
||||
applyJsonColors(jsonColors);
|
||||
});
|
||||
|
||||
document.getElementById("wfm-json-color-reset")?.addEventListener("click", () => {
|
||||
const cur = loadLocalSettings();
|
||||
delete cur.jsonColors;
|
||||
localStorage.setItem(SETTINGS_KEY, JSON.stringify(cur));
|
||||
applyJsonColors(undefined);
|
||||
document.querySelectorAll("#wfm-json-color-grid input[type=color]").forEach(inp => {
|
||||
const def = JSON_COLOR_DEFS.find(d => d.id === inp.dataset.jsonColor);
|
||||
if (def) inp.value = def.def;
|
||||
});
|
||||
showToast(t("settingsSaved"), "success");
|
||||
});
|
||||
|
||||
// Save (local settings)
|
||||
document.getElementById("wfm-settings-save")?.addEventListener("click", () => {
|
||||
const taFontSize = parseInt(document.getElementById("wfm-ta-font-size")?.value) || TEXTAREA_FONT_SIZE_DEFAULT;
|
||||
|
||||
+20
-38
@@ -24,7 +24,7 @@
|
||||
<button class="wfm-tab" data-tab="gallery">Gallery</button>
|
||||
<button class="wfm-tab" data-tab="settings">Settings</button>
|
||||
<button class="wfm-tab" data-tab="help">Help</button>
|
||||
<button class="wfm-tab" data-tab="ai">A</button>
|
||||
<button class="wfm-tab" data-tab="ai">AI TOOL</button>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
@@ -891,6 +891,7 @@
|
||||
<li id="wfm-help-settings-9">All sections are collapsible accordion panels</li>
|
||||
<li id="wfm-help-settings-10">Wildcard Integration: link WFS wildcard dir to ComfyUI-Impact-Pack wildcards (junction/symlink); existing files migrated automatically</li>
|
||||
<li id="wfm-help-settings-11">Text Size: one slider (10–28 px) adjusts font size for all prompt and chat textareas at once — Generate UI positive/negative prompts, AI Assistant chat input, Preset positive/negative, Wildcard prompt and file editor, and Metadata prompt full preview; takes effect immediately and saved with Save Settings</li>
|
||||
<li id="wfm-help-settings-12">RAW JSON Colors: customize the 6 syntax highlight colors for the Raw JSON editor in Generate UI — Default Text, Name/Scheduler, Title, Width/Height, Prompt/Text, Image/File; changes apply immediately on color pick; Reset Defaults restores the original color scheme</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -958,19 +959,18 @@
|
||||
<li id="wfm-help-sidepanel-13">I tab (Information): drop a ComfyUI PNG/WebP/JSON to inspect model, LoRA, and prompt metadata in the side panel — sub-tabs: model / lora / Prompts; supports UnetLoaderGGUF and QuadrupleCLIPLoader node types</li>
|
||||
<li id="wfm-help-sidepanel-14">Information tab — drag items to canvas: model sub-tab places the loader node (Checkpoint → CheckpointLoaderSimple, VAE → VAELoader, Diffusion Model → UNETLoader, Text Encoder → CLIPLoader); double-click also places at canvas center</li>
|
||||
<li id="wfm-help-sidepanel-15">Information tab — LoRA sub-tab: drag individual LoRA to place LoraLoader; "Multiple LORA" section at bottom places all LoRAs in a single Lora Loader (LoraManager) node; Prompts sub-tab: drag a prompt to place CLIPTextEncode node with text pre-filled; click prompt to view full text and copy</li>
|
||||
<li id="wfm-help-sidepanel-16">A tab (AI Tools): Translation and VLM sub-tabs powered by Ollama or LM Studio; settings (backend, URL, model) are shared with the SPA AI tab via localStorage</li>
|
||||
<li id="wfm-help-sidepanel-16">AI TOOL tab: Translation and TOOLS (VLM) panes powered by Ollama or LM Studio; 3-pane layout (Translation | TOOLS | Settings) always visible; settings (backend, URL, model) are shared with the SPA AI TOOL tab via localStorage</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="wfm-help-card">
|
||||
<h3 id="wfm-help-ai-title">AI Tab (A)</h3>
|
||||
<h3 id="wfm-help-ai-title">AI TOOL Tab</h3>
|
||||
<ul>
|
||||
<li id="wfm-help-ai-1">Translation sub-tab: translate text between Japanese, English, Chinese, or a custom Free language using Ollama or LM Studio</li>
|
||||
<li id="wfm-help-ai-2">Language selectors for source and destination with ⇄ swap button; text content is also swapped; selections are saved automatically</li>
|
||||
<li id="wfm-help-ai-3">VLM sub-tab: drop an image into the drop zone and select a task — Describe Image or Create Prompt — then click Run to analyze with a vision model</li>
|
||||
<li id="wfm-help-ai-4">VLM result is displayed in the output area with a Copy button</li>
|
||||
<li id="wfm-help-ai-5">Settings sub-tab: choose backend (Ollama / LM Studio), set the API URL, test connection, select model, and configure Free language names for translation</li>
|
||||
<li id="wfm-help-ai-6">Settings are saved to localStorage and shared with the Library panel's A tab</li>
|
||||
<li id="wfm-help-ai-1">3-pane layout — Translation (40%) | TOOLS (40%) | Settings (20%) — all panes are always visible simultaneously</li>
|
||||
<li id="wfm-help-ai-2">Translation pane: translate text between Japanese, English, Chinese, or a custom Free language using Ollama or LM Studio; language selectors with ⇄ swap button; text content is also swapped on swap; selections are saved automatically</li>
|
||||
<li id="wfm-help-ai-3">TOOLS pane (VLM): drop an image into the drop zone and select a task — Describe Image or Create Prompt — then click Run to analyze with a vision model; result displayed with Copy button</li>
|
||||
<li id="wfm-help-ai-4">Settings pane: choose backend (Ollama / LM Studio), set the API URL, test connection, select model, and configure Free language names for translation</li>
|
||||
<li id="wfm-help-ai-5">Settings are saved to localStorage and shared with the Library panel's AI TOOL tab</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1155,17 +1155,10 @@
|
||||
|
||||
<!-- AI Tab -->
|
||||
<section id="wfm-tab-ai" class="wfm-tab-content">
|
||||
<!-- サブタブナビ -->
|
||||
<div class="wfm-ai-subtab-nav">
|
||||
<button class="wfm-ai-subtab-btn active" data-ai-subtab="translate">翻訳</button>
|
||||
<button class="wfm-ai-subtab-btn" data-ai-subtab="vlm">VLM</button>
|
||||
<button class="wfm-ai-subtab-btn" data-ai-subtab="ai-settings">設定</button>
|
||||
</div>
|
||||
|
||||
<!-- 翻訳サブタブ -->
|
||||
<div id="wfm-ai-subtab-translate" class="wfm-ai-subtab-content">
|
||||
<!-- 翻訳ペイン -->
|
||||
<div class="wfm-ai-pane wfm-ai-pane-translate">
|
||||
<div class="wfm-ai-pane-header">翻訳</div>
|
||||
<div class="wfm-ai-trans-container">
|
||||
<!-- 言語選択行 -->
|
||||
<div class="wfm-ai-trans-lang-row">
|
||||
<select id="wfm-ai-src-lang" class="wfm-select wfm-ai-lang-select">
|
||||
<option value="ja">日本語</option>
|
||||
@@ -1181,29 +1174,25 @@
|
||||
<option value="free">Free</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- 入力テキストエリア -->
|
||||
<textarea id="wfm-ai-trans-input" class="wfm-ai-trans-textarea" placeholder="翻訳するテキストを入力..."></textarea>
|
||||
<!-- アクションボタン行 -->
|
||||
<div class="wfm-ai-trans-actions">
|
||||
<button id="wfm-ai-trans-btn" class="wfm-btn wfm-btn-primary">翻訳</button>
|
||||
<button id="wfm-ai-trans-copy-btn" class="wfm-btn">コピー</button>
|
||||
<span id="wfm-ai-trans-status" class="wfm-ai-trans-status"></span>
|
||||
</div>
|
||||
<!-- 出力テキストエリア -->
|
||||
<textarea id="wfm-ai-trans-output" class="wfm-ai-trans-textarea wfm-ai-trans-output" placeholder="翻訳結果がここに表示されます..." readonly></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- VLM サブタブ -->
|
||||
<div id="wfm-ai-subtab-vlm" class="wfm-ai-subtab-content" style="display:none">
|
||||
<div class="wfm-ai-pane-divider"></div>
|
||||
<!-- TOOLSペイン -->
|
||||
<div class="wfm-ai-pane wfm-ai-pane-tools">
|
||||
<div class="wfm-ai-pane-header">TOOLS</div>
|
||||
<div class="wfm-ai-vlm-container">
|
||||
<!-- ドロップゾーン -->
|
||||
<div class="wfm-ai-vlm-drop" id="wfm-ai-vlm-drop">
|
||||
<img id="wfm-ai-vlm-preview" style="display:none;max-width:100%;max-height:100%;object-fit:contain;pointer-events:none;">
|
||||
<span id="wfm-ai-vlm-label" class="wfm-ai-vlm-label">PNG / JPG / WebP をドロップまたはクリック</span>
|
||||
<input type="file" id="wfm-ai-vlm-file" accept="image/png,image/jpeg,image/webp" style="display:none;">
|
||||
</div>
|
||||
<!-- タスク選択行 -->
|
||||
<div class="wfm-ai-vlm-task-row">
|
||||
<select id="wfm-ai-vlm-task" class="wfm-select">
|
||||
<option value="describe">画像の解説</option>
|
||||
@@ -1211,19 +1200,16 @@
|
||||
</select>
|
||||
<button id="wfm-ai-vlm-run" class="wfm-btn wfm-btn-primary">実行</button>
|
||||
</div>
|
||||
<!-- ステータス -->
|
||||
<span id="wfm-ai-vlm-status" class="wfm-ai-trans-status"></span>
|
||||
<!-- 結果表示 -->
|
||||
<textarea id="wfm-ai-vlm-result" class="wfm-ai-vlm-result" placeholder="実行結果がここに表示されます..." readonly></textarea>
|
||||
<!-- コピーボタン -->
|
||||
<button id="wfm-ai-vlm-copy" class="wfm-btn wfm-ai-vlm-copy-btn">コピー</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 設定サブタブ -->
|
||||
<div id="wfm-ai-subtab-ai-settings" class="wfm-ai-subtab-content" style="display:none">
|
||||
<div class="wfm-ai-pane-divider"></div>
|
||||
<!-- 設定ペイン -->
|
||||
<div class="wfm-ai-pane wfm-ai-pane-settings">
|
||||
<div class="wfm-ai-pane-header">設定</div>
|
||||
<div class="wfm-ai-settings-container">
|
||||
<!-- バックエンド選択 -->
|
||||
<div class="wfm-ai-settings-section">
|
||||
<div class="wfm-ai-settings-title" id="wfm-ai-settings-backend-title">バックエンド</div>
|
||||
<div class="wfm-ai-backend-row">
|
||||
@@ -1235,7 +1221,6 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 接続設定 -->
|
||||
<div class="wfm-ai-settings-section">
|
||||
<div class="wfm-ai-settings-title" id="wfm-ai-settings-conn-title">接続設定</div>
|
||||
<div class="wfm-ai-settings-row">
|
||||
@@ -1247,7 +1232,6 @@
|
||||
<span id="wfm-ai-test-result" class="wfm-ai-test-result"></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- モデル選択 -->
|
||||
<div class="wfm-ai-settings-section">
|
||||
<div class="wfm-ai-settings-title" id="wfm-ai-settings-model-title">モデル選択</div>
|
||||
<div class="wfm-ai-settings-row">
|
||||
@@ -1257,7 +1241,6 @@
|
||||
<button id="wfm-ai-model-refresh-btn" class="wfm-btn">更新</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Free 言語設定 -->
|
||||
<div class="wfm-ai-settings-section">
|
||||
<div class="wfm-ai-settings-title" id="wfm-ai-settings-freelang-title">Free 言語設定</div>
|
||||
<div class="wfm-ai-settings-row">
|
||||
@@ -1269,7 +1252,6 @@
|
||||
<input type="text" id="wfm-ai-free-dst-lang" class="wfm-input" placeholder="例: German">
|
||||
</div>
|
||||
</div>
|
||||
<!-- 保存 -->
|
||||
<div class="wfm-ai-settings-section">
|
||||
<button id="wfm-ai-settings-save-btn" class="wfm-btn wfm-btn-primary">設定を保存</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user