mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-08-27 22:04:01 +02:00
Add a typed platform package to decouple the frontend from Tauri (#539)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
0068be9ffc
commit
2383f06e71
@@ -3,7 +3,7 @@ import { changeModelStoreWorkspace, pluginsAtom } from "@yaakapp-internal/models
|
||||
import { useAtomValue } from "jotai";
|
||||
import { jotaiStore } from "../lib/jotai";
|
||||
import { minPromiseMillis } from "../lib/minPromiseMillis";
|
||||
import { invokeCmd } from "../lib/tauri";
|
||||
import { rpc } from "../lib/rpc";
|
||||
import { activeWorkspaceIdAtom } from "./useActiveWorkspace";
|
||||
import { useDebouncedValue } from "@yaakapp-internal/ui";
|
||||
import { invalidateAllPluginInfo } from "./usePluginInfo";
|
||||
@@ -26,7 +26,7 @@ export function useRefreshPlugins() {
|
||||
mutationFn: async () => {
|
||||
await minPromiseMillis(
|
||||
(async () => {
|
||||
await invokeCmd("cmd_reload_plugins");
|
||||
await rpc("cmd_reload_plugins");
|
||||
const workspaceId = jotaiStore.get(activeWorkspaceIdAtom);
|
||||
await changeModelStoreWorkspace(workspaceId); // Force refresh models
|
||||
invalidateAllPluginInfo();
|
||||
|
||||
Reference in New Issue
Block a user