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.

fix(discord): skip empty wizard guild saves

cyh962089d49c1c
diff --git a/ui/src/components/Wizard.tsx b/ui/src/components/Wizard.tsx
index 9346df08f..04732f422 100644
--- a/ui/src/components/Wizard.tsx
+++ b/ui/src/components/Wizard.tsx
@@ -243,10 +243,11 @@ export const Wizard: React.FC = () => {
) {
await api.saveConfig(buildConfigPayload(mergedData));
}
- if (stepData?.discordGuildAllowlist !== undefined) {
+ const discordGuildAllowlist = stepData?.discordGuildAllowlist;
+ if (Array.isArray(discordGuildAllowlist) && discordGuildAllowlist.length > 0) {
await api.saveSettings({
guilds: Object.fromEntries(
- (stepData.discordGuildAllowlist || []).map((guildId: string) => [guildId, { enabled: true }])
+ discordGuildAllowlist.map((guildId: string) => [guildId, { enabled: true }])
),
}, 'discord');
}
diff --git a/ui/src/components/steps/Summary.tsx b/ui/src/components/steps/Summary.tsx
index 7951cf157..ec5505ea6 100644
--- a/ui/src/components/steps/Summary.tsx
+++ b/ui/src/components/steps/Summary.tsx
@@ -488,7 +488,7 @@ const buildSettingsPayload = (data: any) => {
},
])
),
- ...(platform === 'discord'
+ ...(platform === 'discord' && discordGuildAllowlist.length > 0
? {
guilds: Object.fromEntries(
discordGuildAllowlist.map((guildId: string) => [guildId, { enabled: true }])