feat(kernel): complete tree-first graph tasks 074-080

This commit is contained in:
lix-2026
2026-04-16 22:01:51 +08:00
parent 2ff10fa86c
commit b1d5d97142
65 changed files with 11579 additions and 4606 deletions
@@ -0,0 +1,33 @@
"use client";
import { create } from "zustand";
type OnlyOfficeAiBridgeState = {
pluginReady: boolean;
targetOrigin: string;
targetWindow: Window | null;
lastReadyAt: number | null;
captureReady: (payload: { targetOrigin: string; targetWindow: Window | null }) => void;
reset: () => void;
};
export const useOnlyOfficeAiBridgeStore = create<OnlyOfficeAiBridgeState>((set) => ({
pluginReady: false,
targetOrigin: "*",
targetWindow: null,
lastReadyAt: null,
captureReady: ({ targetOrigin, targetWindow }) =>
set({
pluginReady: Boolean(targetWindow),
targetOrigin: targetOrigin || "*",
targetWindow,
lastReadyAt: Date.now(),
}),
reset: () =>
set({
pluginReady: false,
targetOrigin: "*",
targetWindow: null,
lastReadyAt: null,
}),
}));