mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-31 14:33:18 +02:00
Run oxfmt across repo, add format script and docs
Add .oxfmtignore to skip generated bindings and wasm-pack output. Add npm format script, update DEVELOPMENT.md for Vite+ toolchain, and format all non-generated files with oxfmt. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import type { WebsocketRequest } from '@yaakapp-internal/models';
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import type { WebsocketRequest } from "@yaakapp-internal/models";
|
||||
import type {
|
||||
CallWebsocketRequestActionRequest,
|
||||
GetWebsocketRequestActionsResponse,
|
||||
WebsocketRequestAction,
|
||||
} from '@yaakapp-internal/plugins';
|
||||
import { useMemo } from 'react';
|
||||
import { invokeCmd } from '../lib/tauri';
|
||||
import { usePluginsKey } from './usePlugins';
|
||||
} from "@yaakapp-internal/plugins";
|
||||
import { useMemo } from "react";
|
||||
import { invokeCmd } from "../lib/tauri";
|
||||
import { usePluginsKey } from "./usePlugins";
|
||||
|
||||
export type CallableWebSocketRequestAction = Pick<WebsocketRequestAction, 'label' | 'icon'> & {
|
||||
export type CallableWebSocketRequestAction = Pick<WebsocketRequestAction, "label" | "icon"> & {
|
||||
call: (request: WebsocketRequest) => Promise<void>;
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ export function useWebsocketRequestActions() {
|
||||
const pluginsKey = usePluginsKey();
|
||||
|
||||
const actionsResult = useQuery<CallableWebSocketRequestAction[]>({
|
||||
queryKey: ['websocket_request_actions', pluginsKey],
|
||||
queryKey: ["websocket_request_actions", pluginsKey],
|
||||
queryFn: () => getWebsocketRequestActions(),
|
||||
});
|
||||
|
||||
@@ -31,7 +31,7 @@ export function useWebsocketRequestActions() {
|
||||
|
||||
export async function getWebsocketRequestActions() {
|
||||
const responses = await invokeCmd<GetWebsocketRequestActionsResponse[]>(
|
||||
'cmd_websocket_request_actions',
|
||||
"cmd_websocket_request_actions",
|
||||
);
|
||||
const actions = responses.flatMap((r) =>
|
||||
r.actions.map((a: WebsocketRequestAction, i: number) => ({
|
||||
@@ -43,7 +43,7 @@ export async function getWebsocketRequestActions() {
|
||||
pluginRefId: r.pluginRefId,
|
||||
args: { websocketRequest },
|
||||
};
|
||||
await invokeCmd('cmd_call_websocket_request_action', { req: payload });
|
||||
await invokeCmd("cmd_call_websocket_request_action", { req: payload });
|
||||
},
|
||||
})),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user