feat: Add intelligent auto-router and enhanced integrations
- Add intelligent-router.sh hook for automatic agent routing - Add AUTO-TRIGGER-SUMMARY.md documentation - Add FINAL-INTEGRATION-SUMMARY.md documentation - Complete Prometheus integration (6 commands + 4 tools) - Complete Dexto integration (12 commands + 5 tools) - Enhanced Ralph with access to all agents - Fix /clawd command (removed disable-model-invocation) - Update hooks.json to v5 with intelligent routing - 291 total skills now available - All 21 commands with automatic routing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
34
dexto/packages/webui/components/hooks/useResources.ts
Normal file
34
dexto/packages/webui/components/hooks/useResources.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { client } from '@/lib/client.js';
|
||||
import { queryKeys } from '@/lib/queryKeys.js';
|
||||
|
||||
async function fetchResources() {
|
||||
const response = await client.api.resources.$get();
|
||||
const data = await response.json();
|
||||
if (!data.ok || !Array.isArray(data.resources)) {
|
||||
throw new Error('Invalid response shape');
|
||||
}
|
||||
return data.resources;
|
||||
}
|
||||
|
||||
export function useResources() {
|
||||
const {
|
||||
data: resources = [],
|
||||
isLoading: loading,
|
||||
error,
|
||||
refetch: refresh,
|
||||
} = useQuery({
|
||||
queryKey: queryKeys.resources.all,
|
||||
queryFn: fetchResources,
|
||||
staleTime: 60 * 1000, // 1 minute - resources can change when servers connect/disconnect
|
||||
});
|
||||
|
||||
return {
|
||||
resources,
|
||||
loading,
|
||||
error: error?.message ?? null,
|
||||
refresh: async () => {
|
||||
await refresh();
|
||||
},
|
||||
} as const;
|
||||
}
|
||||
Reference in New Issue
Block a user