Conversation
Uses the existing maybe_auto_title pipeline to rename Discord threads to a short LLM-generated title after the first bot response, mirroring Telegram's rename_dm_topic behaviour. Changes: - gateway/platforms/discord.py: add _auto_rename_thread() method that accepts either a raw user message or a pre-generated title string (already_titled=True path used by the title pipeline) - gateway/run.py: hook _discord_title_callback into maybe_auto_title so Discord threads get renamed after the first exchange, same as Telegram topics - tools/discord_tool.py: add edit_thread action for manual thread renaming via the discord tool
Contributor
Add concrete bad/good examples to steer the LLM away from generic titles like 'User Conversation with AI' toward specific topic-based titles like 'Obsidian Vault Structure Review'.
Author
|
Closing — implementation incomplete per tracking issue #18430. Missing config toggle (discord.auto_rename_threads) and guard for Hermes-created threads only. Will resubmit with proper spec compliance. |
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
Auto-rename Discord threads to a short LLM-generated title after the first bot response, mirroring Telegram's
rename_dm_topicbehaviour.Changes
gateway/platforms/discord.py: Add_auto_rename_thread()method that accepts either a raw user message or a pre-generated title string (already_titled=Truepath used by the title pipeline). Silently swallows errors (permission denied, rate-limit) since renaming is best-effort.gateway/run.py: Hook_discord_title_callbackinto the existingmaybe_auto_titlepipeline so Discord threads get renamed after the first exchange, same as Telegram topics.tools/discord_tool.py: Addedit_threadaction for manual thread renaming via the discord tool.How it works
maybe_auto_titlefires in background (non-blocking)_discord_title_callbackcalls_auto_rename_threadwith the generated titleRequirements
Bot needs
MANAGE_THREADSpermission in the server.