[PR #3] [MERGED] Expand Nickname Macro Coverage to Group Macros + Add Dedicated Nickname Macros #3

Closed
opened 2026-10-15 18:07:25 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/SillyTavern/SillyTavern-Nicknames/pull/3
Author: @Wolfsblvt
Created: 4/16/2026
Status: ✅ Merged
Merged: 4/16/2026
Merged by: @Wolfsblvt

Base: main ← Head: dev


📝 Commits (5)

  • 3d2b362 Update all repo URLS to org
  • 6dbf6a3 fix: Apply nicknames to group macros ({{group}}, {{groupNotMuted}}, {{notChar}})
  • da16352 feat: Add dedicated nickname macros and annotate affected core macros
  • ea025f5 fix: Update badge URLs to use SillyTavern org and bump version to 1.1.0
  • f0dd1e5 fix: macro group value calculation with context override

📊 Changes

6 files changed (+169 additions, -22 deletions)

View changed files

📝 README.md (+18 -5)
📝 index.js (+2 -2)
📝 manifest.json (+2 -2)
📝 src/macros.js (+138 -8)
📝 src/ui.js (+5 -1)
📝 templates/settings.html (+4 -4)

📄 Description

This PR extends the Nicknames extension's macro integration to fully cover group-related macros, and introduces four new dedicated nickname macros that give users explicit control over when nicknames are used. Version bumped to 1.1.0.

What Changed

  • Group macros now use nicknames — {{group}}, {{groupNotMuted}}, and {{notChar}} now resolve each group member's name through the nickname system when "Macros & Prompts" override is enabled
  • Four new dedicated nickname macros registered via MacroRegistry:
    • {{userFull}} / {{charFull}} — always return the original name, bypassing all nickname settings
    • {{userNickname}} / {{charNickname}} — return the nickname if one is set, otherwise fall back to the original name
  • Core macro annotations — when nickname macro override is active, affected core macros (user, char, group, groupNotMuted, notChar) get a ``Using nicknames when available]` note appended to their description in the macro browser; this is restored when the setting is toggled off
  • Tooltip and UI text updates — settings label and V3 compat warning now correctly reference all affected macros, not just {{user}}/{{char}}
  • Repository URLs updated to the SillyTavern organization
  • Version bumped to 1.1.0

Why These Changes

Previously, enabling "Macros & Prompts" mode would replace {{user}} and {{char}} with nicknames, but the group macros ({{group}}, {{groupNotMuted}}, {{notChar}}) still returned original character names. This created an inconsistency in group chats where some names would be nicknames and others wouldn't.

The dedicated {{userNickname}} / {{charNickname}} macros address a different need: users who want the nickname in specific places (e.g. a system prompt) without enabling the global override that affects all macro resolution. Conversely, {{userFull}} / {{charFull}} let users hard-code a reference to the original name even when the global override is on.

How It Works

Group macro recalculation is handled by a new [getGroupValue()helper that mirrors the logic in ST's coreMacroEnvBuilder, but runs each member's name through getNicknameForCharAvatar()` before building the comma-separated output. This runs inside the existing env provider, so it integrates cleanly without touching core code.

The new dedicated macros are registered through MacroRegistry.registerMacro() into the NAMES category, making them discoverable in the macro browser alongside the core macros they complement.

Description annotations are managed by syncCoreMacroDescriptions(), which is called both on init and whenever the "use for macros" setting is toggled — ensuring the macro browser always reflects the current state accurately.

Impact

  • Group chat users get consistent nickname resolution across all name-related macros
  • Users gain fine-grained control: use {{charNickname}} without flipping the global override, or use {{charFull}} to pin an original name even when the override is on
  • The macro browser now clearly signals which macros are affected by the Nicknames extension's settings

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/SillyTavern/SillyTavern-Nicknames/pull/3 **Author:** [@Wolfsblvt](https://github.com/Wolfsblvt) **Created:** 4/16/2026 **Status:** ✅ Merged **Merged:** 4/16/2026 **Merged by:** [@Wolfsblvt](https://github.com/Wolfsblvt) **Base:** `main` ← **Head:** `dev` --- ### 📝 Commits (5) - [`3d2b362`](https://github.com/SillyTavern/SillyTavern-Nicknames/commit/3d2b3625be649178b254548054c6a1606448876c) Update all repo URLS to org - [`6dbf6a3`](https://github.com/SillyTavern/SillyTavern-Nicknames/commit/6dbf6a352c5ee5bd2bd0b59922f617117bba50cc) fix: Apply nicknames to group macros ({{group}}, {{groupNotMuted}}, {{notChar}}) - [`da16352`](https://github.com/SillyTavern/SillyTavern-Nicknames/commit/da1635247cd6521073c0491318d2b1526364b1c4) feat: Add dedicated nickname macros and annotate affected core macros - [`ea025f5`](https://github.com/SillyTavern/SillyTavern-Nicknames/commit/ea025f503fc3d237bc189db5d6e44947972c4e6b) fix: Update badge URLs to use SillyTavern org and bump version to 1.1.0 - [`f0dd1e5`](https://github.com/SillyTavern/SillyTavern-Nicknames/commit/f0dd1e5bfe075f9ab596954fef5ca5a08e83bcb6) fix: macro group value calculation with context override ### 📊 Changes **6 files changed** (+169 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+18 -5) 📝 `index.js` (+2 -2) 📝 `manifest.json` (+2 -2) 📝 `src/macros.js` (+138 -8) 📝 `src/ui.js` (+5 -1) 📝 `templates/settings.html` (+4 -4) </details> ### 📄 Description This PR extends the Nicknames extension's macro integration to fully cover group-related macros, and introduces four new dedicated nickname macros that give users explicit control over when nicknames are used. Version bumped to 1.1.0. ### What Changed - **Group macros now use nicknames** — `{{group}}`, `{{groupNotMuted}}`, and `{{notChar}}` now resolve each group member's name through the nickname system when "Macros & Prompts" override is enabled - **Four new dedicated nickname macros** registered via `MacroRegistry`: - `{{userFull}}` / `{{charFull}}` — always return the original name, bypassing all nickname settings - `{{userNickname}}` / `{{charNickname}}` — return the nickname if one is set, otherwise fall back to the original name - **Core macro annotations** — when nickname macro override is active, affected core macros (`user`, `char`, `group`, `groupNotMuted`, `notChar`) get a ``Using nicknames when available]` note appended to their description in the macro browser; this is restored when the setting is toggled off - **Tooltip and UI text updates** — settings label and V3 compat warning now correctly reference all affected macros, not just `{{user}}`/`{{char}}` - **Repository URLs** updated to the SillyTavern organization - **Version bumped** to 1.1.0 ### Why These Changes Previously, enabling "Macros & Prompts" mode would replace `{{user}}` and `{{char}}` with nicknames, but the group macros (`{{group}}`, `{{groupNotMuted}}`, `{{notChar}}`) still returned original character names. This created an inconsistency in group chats where some names would be nicknames and others wouldn't. The dedicated `{{userNickname}}` / `{{charNickname}}` macros address a different need: users who want the nickname in specific places (e.g. a system prompt) without enabling the global override that affects all macro resolution. Conversely, `{{userFull}}` / `{{charFull}}` let users hard-code a reference to the original name even when the global override is on. ### How It Works Group macro recalculation is handled by a new [getGroupValue()` helper that mirrors the logic in ST's core `MacroEnvBuilder`, but runs each member's name through `getNicknameForCharAvatar()` before building the comma-separated output. This runs inside the existing env provider, so it integrates cleanly without touching core code. The new dedicated macros are registered through `MacroRegistry.registerMacro()` into the `NAMES` category, making them discoverable in the macro browser alongside the core macros they complement. Description annotations are managed by `syncCoreMacroDescriptions()`, which is called both on init and whenever the "use for macros" setting is toggled — ensuring the macro browser always reflects the current state accurately. ### Impact - Group chat users get consistent nickname resolution across all name-related macros - Users gain fine-grained control: use `{{charNickname}}` without flipping the global override, or use `{{charFull}}` to pin an original name even when the override is on - The macro browser now clearly signals which macros are affected by the Nicknames extension's settings --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 18:07:25 +00:00
Sign in to join this conversation.
No labels
bug
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SillyTavern/SillyTavern-Nicknames#3
No description provided.