Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

feat(ui): add require_mention setting and usage tips to setup wizard

cyhhao243ee78d0325
diff --git a/modules/im/slack.py b/modules/im/slack.py
index b803bcccb..8d00dad77 100644
--- a/modules/im/slack.py
+++ b/modules/im/slack.py
@@ -662,7 +662,7 @@ class SlackBot(BaseIMClient):
if response_url:
await self.send_slash_response(
response_url,
- "❌ This channel is not authorized to use bot commands.",
+ "❌ This channel is not enabled. Please go to the control panel to enable it.",
)
return
@@ -1933,7 +1933,7 @@ class SlackBot(BaseIMClient):
self._ensure_clients()
await self.web_client.chat_postMessage(
channel=channel_id,
- text="❌ This channel is not authorized to use bot commands.",
+ text="❌ This channel is not enabled. Please go to the control panel to enable it.",
)
except Exception as e:
logger.error(f"Failed to send unauthorized message to {channel_id}: {e}")
diff --git a/ui/src/components/steps/Summary.tsx b/ui/src/components/steps/Summary.tsx
index b13a06f10..1b8e53500 100644
--- a/ui/src/components/steps/Summary.tsx
+++ b/ui/src/components/steps/Summary.tsx
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
-import { CheckCircle2 } from 'lucide-react';
+import { CheckCircle2, MessageSquare, Zap, Terminal } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { useApi } from '../../context/ApiContext';
import { useStatus } from '../../context/StatusContext';
@@ -13,21 +13,29 @@ interface SummaryProps {
isLast: boolean;
}
-export const Summary: React.FC<SummaryProps> = ({ data, onBack }) => {
+export const Summary: React.FC<SummaryProps> = ({ data, onBack, onNext }) => {
const { t } = useTranslation();
const api = useApi();
const { control } = useStatus();
const [saving, setSaving] = useState(false);
const [error, setError] = useState<string | null>(null);
+ const [requireMention, setRequireMention] = useState(data.slack?.require_mention || false);
const navigate = useNavigate();
const saveAll = async () => {
setSaving(true);
setError(null);
try {
- const configPayload = buildConfigPayload(data);
+ const updatedData = {
+ ...data,
+ slack: {
+ ...data.slack,
+ require_mention: requireMention,
+ },
+ };
+ const configPayload = buildConfigPayload(updatedData);
await api.saveConfig(configPayload);
- await api.saveSettings(buildSettingsPayload(data));
+ await api.saveSettings(buildSettingsPayload(updatedData));
// Start service
await control('start'); // Use start, fallback to restart if running? Or just start.
@@ -62,6 +70,59 @@ export const Summary: React.FC<SummaryProps> = ({ data, onBack }) => {
<Section title={t('summary.slackAppToken')} value={mask(data.slack?.app_token || '')} />
<Section title={t('summary.enabledAgents')} value={enabledAgents(data).join(', ')} />
<Section title={t('summary.channelsConfigured')} value={Object.keys(data.channelConfigs || {}).filter(k => data.channelConfigs[k]?.enabled).length} />
+
+ {/* Require Mention Setting */}
+ <div className="bg-panel border border-border rounded-lg p-4 shadow-sm">
+ <div className="flex justify-between items-center">
+ <div>
+ <h3 className="text-sm font-medium text-text">{t('summary.requireMention')}</h3>
+ <p className="text-xs text-muted mt-1">{t('summary.requireMentionHint')}</p>
+ </div>
+ <label className="relative inline-flex items-center cursor-pointer">
+ <input
+ type="checkbox"
+ checked={requireMention}
+ onChange={(e) => setRequireMention(e.target.checked)}
+ className="sr-only peer"
+ />
+ <div className="w-11 h-6 bg-border rounded-full peer peer-checked:bg-success peer-focus:ring-2 peer-focus:ring-success/20 after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:after:translate-x-full"></div>
+ </label>
+ </div>
+ </div>
+
+ {/* Usage Tips */}
+ <div className="bg-panel border border-border rounded-lg p-4 shadow-sm">
+ <h3 className="text-sm font-medium text-text mb-3">{t('summary.usageTips')}</h3>
+ <div className="space-y-3">
+ <div className="flex items-start gap-3">
+ <div className="w-8 h-8 bg-primary/10 text-primary rounded-lg flex items-center justify-center flex-shrink-0">
+ <Terminal size={16} />
+ </div>
+ <div>
+ <p className="text-sm font-medium text-text">{t('summary.tipStartCommand')}</p>
+ <p className="text-xs text-muted">{t('summary.tipStartCommandDesc')}</p>
+ </div>
+ </div>
+ <div className="flex items-start gap-3">
+ <div className="w-8 h-8 bg-warning/10 text-warning rounded-lg flex items-center justify-center flex-shrink-0">
+ <Zap size={16} />
+ </div>
+ <div>
+ <p className="text-sm font-medium text-text">{t('summary.tipAgentSwitch')}</p>
+ <p className="text-xs text-muted">{t('summary.tipAgentSwitchDesc')}</p>
+ </div>
+ </div>
+ <div className="flex items-start gap-3">
+ <div className="w-8 h-8 bg-success/10 text-success rounded-lg flex items-center justify-center flex-shrink-0">
+ <MessageSquare size={16} />
+ </div>
+ <div>
+ <p className="text-sm font-medium text-text">{t('summary.tipThread')}</p>
+ <p className="text-xs text-muted">{t('summary.tipThreadDesc')}</p>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
{error && (
diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.json
index 08b9fde96..09dd6257f 100644
--- a/ui/src/i18n/en.json
+++ b/ui/src/i18n/en.json
@@ -145,6 +145,15 @@
"slackAppToken": "Slack App Token",
"enabledAgents": "Enabled Agents",
"channelsConfigured": "Channels Configured",
+ "requireMention": "Require @Mention",
+ "requireMentionHint": "Bot only responds when @mentioned in channels (DMs always work)",
+ "usageTips": "Quick Start Guide",
+ "tipStartCommand": "Use /start to begin",
+ "tipStartCommandDesc": "Type /start in any enabled channel to open the control panel and start a session.",
+ "tipAgentSwitch": "Switch agents instantly",
+ "tipAgentSwitchDesc": "Prefix your message with AgentName: to route to a specific agent. E.g., \"Plan: Design the API\"",
+ "tipThread": "Thread = Session",
+ "tipThreadDesc": "Each thread is an isolated session. Start multiple threads for parallel tasks.",
"finishAndStart": "Finish & Start"
},
"dashboard": {
diff --git a/ui/src/i18n/zh.json b/ui/src/i18n/zh.json
index aa770165e..28c05bb57 100644
--- a/ui/src/i18n/zh.json
+++ b/ui/src/i18n/zh.json
@@ -145,6 +145,15 @@
"slackAppToken": "Slack App 令牌",
"enabledAgents": "已启用的 Agent",
"channelsConfigured": "已配置的频道",
+ "requireMention": "需要 @提及",
+ "requireMentionHint": "机器人仅在被 @提及时响应(私聊始终有效)",
+ "usageTips": "快速上手",
+ "tipStartCommand": "使用 /start 开始",
+ "tipStartCommandDesc": "在任意已启用的频道输入 /start 打开控制面板并开始会话。",
+ "tipAgentSwitch": "即时切换 Agent",
+ "tipAgentSwitchDesc": "在消息前加 AgentName: 前缀即可路由到指定 Agent,如 \"Plan: 设计 API\"",
+ "tipThread": "Thread = 会话",
+ "tipThreadDesc": "每个 Thread 是独立会话,可开多个 Thread 并行执行任务。",
"finishAndStart": "完成并启动"
},
"dashboard": {