You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(chats): two-level inline keyboard for /chats command
- Refactor /chats: Level 1 shows one button per chat (name only), callback chatmenu:
- Add Level 2: tapping a chat sends a new message with 3 vertical buttons (Style, Prompt, Auto-reply)
- Add _build_chat_settings_keyboard() for Level 2 keyboard
- Add on_chat_menu_callback() handler, register chatmenu: pattern in bot.py
- Add _find_chat_name() helper to eliminate DRY violation (was repeated 3x)
- Add _refresh_chat_settings() to update Level 2 message after style/auto-reply/prompt changes
- Reuse settings_prompt_set/settings_prompt_empty keys instead of duplicate chats_prompt_* keys
- Move auto_reply_prefix emoji and colon into the message key itself
- Reorder AUTO_REPLY_OPTIONS: Ignore (-1) now second after OFF, before 1 min
- Remove prompt preview from /settings message (title only)
- Update README Per-chat Settings section for two-level UI
- Update test_styles.py and test_settings.py for new keyboard structure and carousel order
Copy file name to clipboardExpand all lines: README.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,11 +95,13 @@ By default, `/connect` prompts for a phone number. A button below the message le
95
95
96
96
### Per-chat Settings (`/chats`)
97
97
98
-
The `/chats` command shows only chats where the bot has actually set a draft or replied, as well as chats with custom settings. Each chat has three buttons:
98
+
The `/chats` command shows only chats where the bot has actually set a draft or replied, as well as chats with custom settings. Each chat is shown as a single button with the chat name.
99
99
100
-
-**Prompt** (`📝`) — tap to open the prompt editor for this chat. Shows the current prompt and lets you set a new one, clear it, or cancel. Per-chat prompt is appended to the global prompt (max 300 chars).
101
-
-**Style** (`🦉 Name`) — tap to cycle through styles
102
-
-**Auto-reply** (`⏰`) — tap to cycle through auto-reply timers for this chat. The last option in the cycle is **🔇 Ignore** — fully disables drafts, auto-replies, and message polling for that chat.
100
+
Tapping a chat opens a **new message** with three vertical buttons:
101
+
102
+
-**Style** (`🦉 Style: Userlike`) — tap to cycle through styles
103
+
-**Prompt** (`📝 Prompt: ✅ ON`) — tap to open the prompt editor for this chat. Shows the current prompt and lets you set a new one, clear it, or cancel. Per-chat prompt is appended to the global prompt (max 300 chars).
104
+
-**Auto-reply** (`⏰ Auto-reply: ✅ OFF`) — tap to cycle through auto-reply timers for this chat. The second option in the cycle is **🔇 Ignore** — fully disables drafts, auto-replies, and message polling for that chat.
103
105
104
106
Per-chat settings override the global ones from `/settings`. If a per-chat value matches the global one, the override is automatically cleared. Available only to connected users.
Copy file name to clipboardExpand all lines: system_messages.py
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -100,7 +100,7 @@
100
100
"settings_prompt_current": f"📝 Global prompt (all chats):\n«{{prompt}}»\n\nSend a new prompt to replace it (Max length: {USER_PROMPT_MAX_LENGTH} chars):",
101
101
"settings_prompt_no_prompt": f"📝 Global prompt (all chats): not set.\n\nSend a prompt to set it (Max length: {USER_PROMPT_MAX_LENGTH} chars):",
102
102
# — Auto-reply labels (base, without prefix) —
103
-
"auto_reply_prefix": "Auto-reply",
103
+
"auto_reply_prefix": "⏰ Auto-reply:",
104
104
"auto_reply_off": "✅ OFF",
105
105
"auto_reply_1m": "⚠️ 1 min",
106
106
"auto_reply_5m": "⚠️ 5 min",
@@ -118,10 +118,9 @@
118
118
119
119
# — Chats (per-chat settings) —
120
120
"menu_chats": "Chat settings",
121
-
"chats_title": "🎭 Chats\nTap to change prompt, style, or auto-reply timer.",
121
+
"chats_title": "🎭 Chats",
122
+
"chats_chat_title": "⚙️ {chat_name}",
122
123
"chats_no_chats": "No active chats found. Start a conversation first.",
0 commit comments