feat(discord): auto-rename thread title from generated session title - #57813
Closed
NibbinNone wants to merge 1 commit into
Closed
feat(discord): auto-rename thread title from generated session title#57813NibbinNone wants to merge 1 commit into
NibbinNone wants to merge 1 commit into
Conversation
Add rename_dm_topic() to DiscordAdapter and wire it via title_callback in the Gateway's maybe_auto_title flow, mirroring the existing Telegram topic rename pattern. Tested on live Discord gateway with auto-title generation → callback → thread.rename chain confirmed working.
NibbinNone
force-pushed
the
feat/discord-auto-title-thread-rename
branch
from
July 3, 2026 15:55
8039519 to
803cf8b
Compare
Contributor
|
Fixed via #60187 (salvage of #56792 by @rungmc357). Your title_callback wiring matched the Telegram pattern nicely, but #56792 additionally guarded against renaming user-created threads and human-renamed threads, which we needed. Thanks for the contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wire Discord thread auto-rename to the existing auto-title mechanism (already used for Telegram topics).
When a Discord thread triggers the first exchange, Hermes generates a session title via the configured
title_generationauxiliary model. This PR adds the missingtitle_callbackso that title also renames the Discord thread — same pattern as Telegram topic rename.Changes
plugins/platforms/discord/adapter.pyDiscordAdapter.rename_dm_topic()— callsthread.edit(name=...)via discord.py, capped at 100 charsgateway/run.py_schedule_discord_thread_title_rename()— mirrors_schedule_telegram_topic_title_rename(), threadsafe dispatch to asyncio looptitle_callbackinmaybe_auto_titleflow whensource.platform == Platform.DISCORDandsource.thread_idis setVerification
End-to-end tested on live Discord gateway: title generation → callback → thread rename confirmed working.