feat: add project-aware agent workspace
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { createContext, useContext } from "react";
|
||||
|
||||
export type ReadingDocument = { id: string; title: string; host: HTMLDivElement };
|
||||
export type ReadingWorkspace = {
|
||||
active: ReadingDocument | null;
|
||||
view: "focus" | "map_split" | "map_only";
|
||||
open: (document: ReadingDocument) => void;
|
||||
close: (id?: string) => void;
|
||||
setView: (view: ReadingWorkspace["view"]) => void;
|
||||
};
|
||||
export const ReadingWorkspaceContext = createContext<ReadingWorkspace | null>(null);
|
||||
|
||||
export const useReadingWorkspace = () => useContext(ReadingWorkspaceContext);
|
||||
Reference in New Issue
Block a user