import { SpreadsheetProvider, CanvasGrid } from "@rowsncolumns/spreadsheet"
import {
ASK_OPENAI,
functionDescriptions as openAIFunctionDescriptions,
} from "@rowsncolumns/openai";
import { functionDescriptions, functions } from "@rowsncolumns/functions";
import { useSpreadsheetState } from "@rowsncolumns/spreadsheet-state"
const allFunctions = {
...functions,
ASK_OPENAI
}
const allFunctionDescriptions = functionDescriptions.concat(
openAIFunctionDescriptions
);
const MySpreadsheet = () => {
const { ... } = useSpreadsheetState({
functions: allFunctions
})
return (
<CanvasGrid
functionDescriptions={allFunctionDescriptions}
{...}
/>
)
}
export const App = () => (
<SpreadsheetProvider>
<MySpreadsheet />
</SpreadsheetProvider>
)