mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-14 03:30:19 +00:00
✨ feat: optimize bot cli & userId guide (#14258)
* chore: add userId and serverId tooltip guide * feat: update built in message tool * ✨ feat(cli): add bot dm-policy / allowlist subcommands (LOBE-8254) Extend `lh bot update` with --dm-policy / --group-policy / --user-id / --server-id, and add new `lh bot allowlist` and `lh bot group-allowlist` subcommand groups (list/add/remove/clear). All write paths read existing settings first and merge so unrelated keys aren't wiped by the partial update. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ✨ feat(channel): warn when a saved bot is missing the operator userId Surface an inline alert and auto-expand the Advanced Settings group when an existing bot has no settings.userId — without it AI tools can't push notifications back to the operator and pairing approvals fail silently. Skip on first-time configs and on platforms that don't expose userId. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore: optimize userId alert * fix: test case * fix: footer effective userId --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -166,7 +166,7 @@ Each platform exposes a `PlatformDefinition` registered in `platforms/index.ts`:
|
||||
}
|
||||
```
|
||||
|
||||
`schema` drives both server validation (`mergeWithDefaults`, `extractDefaults`) **and** the auto-generated UI form. Top-level keys `applicationId` / `credentials` / `settings` map to DB columns. Common settings fields live in `platforms/const.ts` (`displayToolCallsField`, `serverIdField`, `userIdField`).
|
||||
`schema` drives both server validation (`mergeWithDefaults`, `extractDefaults`) **and** the auto-generated UI form. Top-level keys `applicationId` / `credentials` / `settings` map to DB columns. Common settings fields live in `platforms/const.ts` (`displayToolCallsField`, `makeServerIdField(platform?)`, `makeUserIdField(platform?)`). The `serverId` / `userId` factories take a platform identifier so the field's hint can render platform-specific "how to find this ID" guidance (Discord Developer Mode, Telegram @userinfobot, etc.); pass no argument to fall back to generic copy.
|
||||
|
||||
Each platform implements `PlatformClient` (see `platforms/types.ts`):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user