Cmd Palette Improvements (#50)

- Fuzzy matching
- Show hotkeys
- Add actions
This commit is contained in:
Gregory Schier
2024-06-10 21:37:41 -07:00
committed by GitHub
parent f0c7a83134
commit 47fcb8bad4
11 changed files with 308 additions and 123 deletions

View File

@@ -14,7 +14,7 @@ export function useCreateHttpRequest() {
const routes = useAppRoutes();
return useMutation<HttpRequest, unknown, Partial<HttpRequest>>({
mutationFn: (patch) => {
mutationFn: (patch = {}) => {
if (workspaceId === null) {
throw new Error("Cannot create request when there's no active workspace");
}
@@ -28,7 +28,6 @@ export function useCreateHttpRequest() {
}
}
patch.folderId = patch.folderId || activeRequest?.folderId;
console.log('PATCH', patch);
return invoke('cmd_create_http_request', { request: { workspaceId, ...patch } });
},
onSettled: () => trackEvent('http_request', 'create'),