diff --git a/src/stores/channels.ts b/src/stores/channels.ts index 8ec9dd323..820c7a8c1 100644 --- a/src/stores/channels.ts +++ b/src/stores/channels.ts @@ -34,31 +34,10 @@ export const useChannelsStore = create((set, get) => ({ error: null, fetchChannels: async () => { - set({ loading: true, error: null }); - - try { - // OpenClaw uses channels.status to get channel information - const result = await window.electron.ipcRenderer.invoke( - 'gateway:rpc', - 'channels.status', - {} - ) as { success: boolean; result?: { channels?: Channel[] } | Channel[]; error?: string }; - - if (result.success && result.result) { - // Handle both array and object response formats - const channels = Array.isArray(result.result) - ? result.result - : (result.result.channels || []); - set({ channels, loading: false }); - } else { - // Don't show error for unsupported methods - just use empty list - set({ channels: [], loading: false }); - } - } catch (error) { - // Gateway might not support this method yet - gracefully degrade - console.warn('Failed to fetch channels:', error); - set({ channels: [], loading: false }); - } + // channels.status returns a complex nested object, not a simple array. + // Channel management is deferred to Settings > Channels page. + // For now, just use empty list - channels will be added later. + set({ channels: [], loading: false }); }, addChannel: async (params) => { diff --git a/src/stores/skills.ts b/src/stores/skills.ts index 841a74304..2aea6d2b1 100644 --- a/src/stores/skills.ts +++ b/src/stores/skills.ts @@ -24,31 +24,10 @@ export const useSkillsStore = create((set, get) => ({ error: null, fetchSkills: async () => { - set({ loading: true, error: null }); - - try { - // OpenClaw uses skills.status to get skill information - const result = await window.electron.ipcRenderer.invoke( - 'gateway:rpc', - 'skills.status', - {} - ) as { success: boolean; result?: { skills?: Skill[] } | Skill[]; error?: string }; - - if (result.success && result.result) { - // Handle both array and object response formats - const skills = Array.isArray(result.result) - ? result.result - : (result.result.skills || []); - set({ skills, loading: false }); - } else { - // Don't show error for unsupported methods - just use empty list - set({ skills: [], loading: false }); - } - } catch (error) { - // Gateway might not support this method yet - gracefully degrade - console.warn('Failed to fetch skills:', error); - set({ skills: [], loading: false }); - } + // skills.status returns a complex nested object, not a simple Skill[] array. + // Skill management is handled in the Skills page. + // For now, use empty list - will be properly integrated later. + set({ skills: [], loading: false }); }, enableSkill: async (skillId) => {