mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
feat(config): allow placeholder text to be string or list
Allow PlaceholderConfig.Text to accept either a single string or an array of strings, from which one is randomly selected at runtime. This maintains backward compatibility with existing single-string configs while enabling random placeholder selection. Changes: - Modify PlaceholderConfig.Text type from string to FlexibleStringSlice - Add GetRandomText() helper method for random selection - Update SendPlaceholder in all channels to use GetRandomText() - Update config.example.json with array placeholder examples - Update Matrix channel documentation
This commit is contained in:
@@ -129,6 +129,10 @@
|
||||
"encrypt_key": "",
|
||||
"verification_token": "",
|
||||
"allow_from": [],
|
||||
"placeholder": {
|
||||
"enabled": true,
|
||||
"text": ["Thinking...", "Processing...", "Typing..."]
|
||||
},
|
||||
"reasoning_channel_id": "",
|
||||
"random_reaction_emoji": [],
|
||||
"is_lark": false
|
||||
@@ -160,7 +164,7 @@
|
||||
},
|
||||
"placeholder": {
|
||||
"enabled": true,
|
||||
"text": "Thinking... 💭"
|
||||
"text": ["Thinking...", "Processing...", "Typing..."]
|
||||
},
|
||||
"reasoning_channel_id": "",
|
||||
"crypto_database_path": "",
|
||||
|
||||
Reference in New Issue
Block a user