openclaw/docs
David Guttman aa91000a5d
feat(discord): add autoThreadName 'generated' strategy (#43366)
* feat(discord): add autoThreadName 'generated' strategy

Adds async thread title generation for auto-created threads:
- autoThread: boolean - enables/disables auto-threading
- autoThreadName: 'message' | 'generated' - naming strategy
- 'generated' uses LLM to create concise 3-6 word titles
- Includes channel name/description context for better titles
- 10s timeout with graceful fallback

* Discord: support non-key auth for generated thread titles

* Discord: skip fallback auto-thread rename

* Discord: normalize generated thread title first content line

* Discord: split thread title generation helpers

* Discord: tidy thread title generation constants and order

* Discord: use runtime fallback model resolution for thread titles

* Discord: resolve thread-title model aliases

* Discord: fallback thread-title model selection to runtime defaults

* Agents: centralize simple completion runtime

* fix(discord): pass apiKey to complete() for thread title generation

The setRuntimeApiKey approach only works for full agent runs that use
authStorage.getApiKey(). The pi-ai complete() function expects apiKey
directly in options or falls back to env vars — it doesn't read from
authStorage.runtimeOverrides.

Fixes thread title generation for Claude/Anthropic users.

* fix(agents): return exchanged Copilot token from prepareSimpleCompletionModel

The recent thread-title fix (3346ba6) passes prepared.auth.apiKey to
complete(). For github-copilot, this was still the raw GitHub token
rather than the exchanged runtime token, causing auth failures.

Now setRuntimeApiKeyForCompletion returns the resolved token and
prepareSimpleCompletionModel includes it in auth.apiKey, so both the
authStorage path and direct apiKey pass-through work correctly.

* fix(agents): catch auth lookup exceptions in completion model prep

getApiKeyForModel can throw for credential issues (missing profile, etc).
Wrap in try/catch to return { error } for fail-soft handling rather than
propagating rejected promises to callers like thread title generation.

* Discord: strip markdown wrappers from generated thread titles

* Discord/agents: align thread-title model and local no-auth completion headers

* Tests: import fresh modules for mocked thread-title/simple-completion suites

* Agents: apply exchanged Copilot baseUrl in simple completions

* Discord: route thread runtime imports through plugin SDK

* Lockfile: add Discord pi-ai runtime dependency

* Lockfile: regenerate Discord pi-ai runtime dependency entries

* Agents: use published Copilot token runtime module

* Discord: refresh config baseline and lockfile

* Tests: split extension runs by isolation

* Discord: add changelog for generated thread titles (#43366) (thanks @davidguttman)

---------

Co-authored-by: Onur Solmaz <onur@textcortex.com>
Co-authored-by: Onur Solmaz <2453968+osolmaz@users.noreply.github.com>
2026-03-24 16:27:19 +01:00
..
.generated feat(discord): add autoThreadName 'generated' strategy (#43366) 2026-03-24 16:27:19 +01:00
.i18n docs(plugin-sdk): document public SDK surface 2026-03-22 08:50:48 -07:00
assets Docs: switch README logo to SVG assets (#47049) 2026-03-15 08:58:45 +01:00
automation fix: land cron tz one-shot handling and prerelease config warnings (#53224) (thanks @RolfHegr) 2026-03-23 19:38:04 -07:00
channels fix(docs): correct json55 typo to json5 in IRC channel docs (#50831) (#50842) 2026-03-24 16:20:49 +03:00
cli fix: land cron tz one-shot handling and prerelease config warnings (#53224) (thanks @RolfHegr) 2026-03-23 19:38:04 -07:00
concepts docs: clarify sessions_spawn ACP vs subagent policies 2026-03-22 23:08:06 -07:00
debug Docs: enable markdownlint autofixables except list numbering (#10476) 2026-02-06 10:08:59 -05:00
diagnostics
gateway fix: gate synology chat reply name matching 2026-03-22 23:06:38 -07:00
help test: narrow live transcript scaffolding strip 2026-03-23 07:41:18 +00:00
images docs(feishu): Feishu docs – add verificationToken and align zh-CN with EN (openclaw#31555) thanks @xbsheng 2026-03-02 21:33:41 -06:00
install fix(docs): broken anchor links across 4 more files 2026-03-22 15:50:56 -07:00
ja-JP docs update web search config guidance 2026-03-18 00:00:17 -05:00
nodes refactor!: drop legacy CLAWDBOT env compatibility 2026-03-22 22:13:39 -07:00
platforms fix(docs): deduplicate titles across 9 pages 2026-03-22 16:02:28 -07:00
plugins docs: fix CLI command tree, SDK import path, and tool group listing 2026-03-23 10:40:41 -07:00
providers docs: fix nav ordering, missing pages, and stale model references 2026-03-23 10:20:15 -07:00
reference fix: verify global npm correction installs 2026-03-23 21:04:08 -07:00
security docs: add missing frontmatter and title fields 2026-03-18 00:02:43 -07:00
start fix(media): narrow default local attachment roots 2026-03-22 10:24:47 -07:00
tools docs: fix CLI command tree, SDK import path, and tool group listing 2026-03-23 10:40:41 -07:00
web Hardening: refresh stale device pairing requests and pending metadata (#50695) 2026-03-19 18:26:06 -05:00
zh-CN docs(feishu): replace botName with name in config examples (#52753) 2026-03-23 23:48:33 +03:00
auth-credential-semantics.md docs: add missing frontmatter and title fields 2026-03-18 00:02:43 -07:00
brave-search.md fix(docs): deduplicate titles across 9 pages 2026-03-22 16:02:28 -07:00
ci.md fix(ci): skip docs-only preflight pnpm audit 2026-03-23 05:29:27 +00:00
date-time.md
docs.json docs: fix nav ordering, missing pages, and stale model references 2026-03-23 10:20:15 -07:00
index.md docs: add API key prereq, first-message step, fix landing page quick start 2026-03-19 10:32:30 -07:00
logging.md fix(docs): deduplicate titles across 9 pages 2026-03-22 16:02:28 -07:00
nav-tabs-underline.js docs(ui): add animated underline for nav tabs (#21912) 2026-02-20 09:33:46 -05:00
network.md docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
perplexity.md fix(docs): deduplicate titles across 9 pages 2026-03-22 16:02:28 -07:00
pi-dev.md docs: fix em-dash headings and broken links across docs 2026-03-17 23:55:46 -07:00
pi.md docs: update pi package versions to 0.61.1 2026-03-22 22:39:55 +00:00
prose.md docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
style.css fix(ios): force tls for non-loopback manual gateway hosts (#21969) 2026-02-20 16:28:47 +00:00
tts.md fix(docs): deduplicate titles across 9 pages 2026-03-22 16:02:28 -07:00
vps.md docs: rename VPS to Linux Server, update provider links for moved pages 2026-03-19 13:29:39 -07:00
whatsapp-openclaw-ai-zh.jpg
whatsapp-openclaw.jpg