MCPcopy
hub / github.com/srcbookdev/srcbook / CellsContextType

Interface CellsContextType

packages/components/src/components/use-cell.tsx:82–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80type TsServerStateType = Record<string, TsServerDiagnosticType[]>;
81
82interface CellsContextType {
83 cells: ClientCellType[];
84 setCells: (cells: ClientCellType[]) => void;
85 updateCell: (cell: ClientCellType) => void;
86 removeCell: (cell: ClientCellType) => void;
87 insertCellAt: (cell: ClientCellType, idx: number) => void;
88 createCodeCell: (
89 idx: number,
90 language: CodeLanguageType,
91 attrs?: Partial<CodeCellType>,
92 ) => CodeCellType;
93 createMarkdownCell: (idx: number, attrs?: Partial<MarkdownCellType>) => MarkdownCellType;
94 createGenerateAiCell: (idx: number) => GenerateAICellType;
95 hasOutput: (id: string, type?: 'stdout' | 'stderr') => boolean;
96 getOutput: (id: string, type?: 'stdout' | 'stderr') => Array<OutputType>;
97 setOutput: (id: string, output: OutputType | OutputType[]) => void;
98 clearOutput: (id: string, type?: 'stdout' | 'stderr') => void;
99 getTsServerDiagnostics: (id: string) => TsServerDiagnosticType[];
100 setTsServerDiagnostics: (id: string, diagnostics: TsServerDiagnosticType[]) => void;
101 getTsServerSuggestions: (id: string) => TsServerSuggestionType[];
102 setTsServerSuggestions: (id: string, suggestions: TsServerSuggestionType[]) => void;
103}
104
105const CellsContext = createContext<CellsContextType | undefined>(undefined);
106

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected