Workspaces

This commit is contained in:
2026-02-18 02:36:15 +00:00
parent c2660cd125
commit 826904d74f
22 changed files with 851 additions and 437 deletions
@@ -0,0 +1,17 @@
import { createContext, useContext } from 'react';
type WorkspaceContextValue = {
workspaceId: string | null;
cwd: string;
editing: boolean;
};
const WorkspaceContext = createContext<WorkspaceContextValue>({
workspaceId: null,
cwd: '~',
editing: false,
});
export const WorkspaceProvider = WorkspaceContext.Provider;
export const useWorkspace = () => useContext(WorkspaceContext);