ノードタイトル プレフィックスを短縮

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
るみなー先生
2026-05-20 01:46:22 +09:00
co-authored by Copilot
parent 2cb7db177e
commit 2f4daaef3a
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -506,7 +506,7 @@ courtyard garden,
### 姿勢、視線、動作
```text
()|standing|sitting|walking|looking at viewer|waving|hands on hips|jumping|running|skipping|looking up
()|standing|sitting|walking|looking at viewer|waving|hands on hips|jumping high|running|skipping|looking up
```
### 表情
+5 -2
View File
@@ -22,6 +22,9 @@ app.registerExtension({
return;
}
const nodeName = String(nodeData?.name ?? "");
const prefix = nodeName === "PromptRandomChoiceEx" ? "Ex" : "Ch";
const maxTitleLength = nodeName === "PromptRandomChoiceEx" ? 36 : 40;
const originalOnExecuted = nodeType.prototype.onExecuted;
nodeType.prototype.onExecuted = function (message) {
@@ -32,9 +35,9 @@ app.registerExtension({
const changeEvery = Number(message?.change_every?.[0] ?? 1);
if (changeEvery <= 1) {
this.title = `Choice: ${shorten(selectedTitle)}`;
this.title = `${prefix}: ${shorten(selectedTitle)}`;
} else {
this.title = `Choice: ${shorten(selectedTitle)} (${repeatIndex}/${changeEvery})`;
this.title = `${prefix}: ${shorten(selectedTitle)} (${repeatIndex}/${changeEvery})`;
}
this.setDirtyCanvas?.(true, true);