mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
remove developer-specific tabs, hooks, and APIs including debug status, update checks, and system diagnostics simplify tab configuration to only support user mode clean up unused code, routes and update types accordingly
30 lines
606 B
TypeScript
30 lines
606 B
TypeScript
import { create } from 'zustand';
|
|
|
|
export interface TabConfig {
|
|
id: string;
|
|
visible: boolean;
|
|
window: 'user';
|
|
order: number;
|
|
locked?: boolean;
|
|
}
|
|
|
|
interface TabConfigurationStore {
|
|
userTabs: TabConfig[];
|
|
get: () => { userTabs: TabConfig[] };
|
|
set: (config: { userTabs: TabConfig[] }) => void;
|
|
reset: () => void;
|
|
}
|
|
|
|
const DEFAULT_CONFIG = {
|
|
userTabs: [],
|
|
};
|
|
|
|
export const tabConfigurationStore = create<TabConfigurationStore>((set, get) => ({
|
|
...DEFAULT_CONFIG,
|
|
get: () => ({
|
|
userTabs: get().userTabs,
|
|
}),
|
|
set: (config) => set(config),
|
|
reset: () => set(DEFAULT_CONFIG),
|
|
}));
|