Skip to content

fix: make bot greeting name configurable via bot_name setting#303

Open
AtharvaGurao wants to merge 1 commit intosipeed:mainfrom
AtharvaGurao:fix/configurable-bot-name
Open

fix: make bot greeting name configurable via bot_name setting#303
AtharvaGurao wants to merge 1 commit intosipeed:mainfrom
AtharvaGurao:fix/configurable-bot-name

Conversation

@AtharvaGurao
Copy link

Summary

The /start greeting in Telegram and the DingTalk reply title were hardcoded as "PicoClaw". Users who customize their bot's identity via soul.md still see Hello! I am PicoClaw on the first message, which breaks their custom identity.

This PR adds a bot_name config field so all channels use the configured name.

Changes

File Change
pkg/config/config.go Added BotName field to AgentDefaults (default: "PicoClaw")
pkg/channels/telegram_commands.go /start greeting uses configured bot_name
pkg/channels/dingtalk.go DingTalk reply title uses configured bot_name
pkg/channels/manager.go Passes bot_name to DingTalk channel constructor

Config Example

{"agents": {"defaults": {"bot_name": "MyBot"}}}

Or via environment variable:

PICOCLAW_AGENTS_DEFAULTS_BOT_NAME=MyBot

Backward Compatible

  • Default value is "PicoClaw" — no change for existing users
  • Only 4 files changed, 16 insertions, 4 deletions

Closes #288

The /start greeting in Telegram and the DingTalk reply title were
hardcoded as "PicoClaw". Users who customize their bot's identity
via soul.md still see "Hello! I am PicoClaw" on the first message.

Add a bot_name field to agents.defaults config (default: "PicoClaw")
so all channels use the configured name instead of a hardcoded string.

Config example:
  {"agents": {"defaults": {"bot_name": "MyBot"}}}

Or via environment variable:
  PICOCLAW_AGENTS_DEFAULTS_BOT_NAME=MyBot

Closes sipeed#288
Comment on lines +55 to +58
botName := c.config.Agents.Defaults.BotName
if botName == "" {
botName = "PicoClaw"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would look at moving the bot name to the telegram config vs using the default agent

Comment on lines +35 to +42
func NewDingTalkChannel(cfg config.DingTalkConfig, messageBus *bus.MessageBus, botName string) (*DingTalkChannel, error) {
if cfg.ClientID == "" || cfg.ClientSecret == "" {
return nil, fmt.Errorf("dingtalk client_id and client_secret are required")
}

if botName == "" {
botName = "PicoClaw"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like wise move the bot name to DingTalk config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

change identity PicoClaw

2 participants