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:
50
dexto/packages/webui/components/hooks/useSearch.ts
Normal file
50
dexto/packages/webui/components/hooks/useSearch.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { client } from '@/lib/client.js';
|
||||
import { queryKeys } from '@/lib/queryKeys.js';
|
||||
|
||||
// Search messages
|
||||
export function useSearchMessages(
|
||||
query: string,
|
||||
sessionId?: string,
|
||||
limit: number = 50,
|
||||
enabled: boolean = true
|
||||
) {
|
||||
return useQuery({
|
||||
queryKey: queryKeys.search.messages(query, sessionId, limit),
|
||||
queryFn: async () => {
|
||||
const response = await client.api.search.messages.$get({
|
||||
query: {
|
||||
q: query,
|
||||
limit: limit,
|
||||
...(sessionId && { sessionId }),
|
||||
},
|
||||
});
|
||||
return await response.json();
|
||||
},
|
||||
enabled: enabled && query.trim().length > 0,
|
||||
staleTime: 30000, // 30 seconds
|
||||
});
|
||||
}
|
||||
|
||||
// Search sessions
|
||||
export function useSearchSessions(query: string, enabled: boolean = true) {
|
||||
return useQuery({
|
||||
queryKey: queryKeys.search.sessions(query),
|
||||
queryFn: async () => {
|
||||
const response = await client.api.search.sessions.$get({
|
||||
query: { q: query },
|
||||
});
|
||||
return await response.json();
|
||||
},
|
||||
enabled: enabled && query.trim().length > 0,
|
||||
staleTime: 30000, // 30 seconds
|
||||
});
|
||||
}
|
||||
|
||||
// Export types inferred from hook return values
|
||||
export type SearchResult = NonNullable<
|
||||
ReturnType<typeof useSearchMessages>['data']
|
||||
>['results'][number];
|
||||
export type SessionSearchResult = NonNullable<
|
||||
ReturnType<typeof useSearchSessions>['data']
|
||||
>['results'][number];
|
||||
Reference in New Issue
Block a user