fix(opencode): support executable slash commands (#597)

This commit is contained in:
Thanh Minh
2026-04-28 20:25:04 +08:00
committed by GitHub
parent 013e53881b
commit 3ba4d09294
4 changed files with 230 additions and 7 deletions
@@ -58,7 +58,7 @@ export function useAgentCommandsQuery({
const response = await client.listCommands(agentId, { draftConfig });
return response.commands as AgentSlashCommand[];
},
enabled: enabled && !!client && isConnected && !!agentId,
enabled: enabled && !!client && isConnected && (!!agentId || !!draftConfig),
staleTime: COMMANDS_STALE_TIME,
retry: 3,
retryDelay: (attemptIndex) => Math.min(1000 * 2 ** attemptIndex, 5000),