@@ -44,6 +44,7 @@ import { saveUserConfig } from "@/core/network/requests";
4444import { isWasm } from "@/core/wasm/utils" ;
4545import { Banner } from "@/plugins/impl/common/error-banner" ;
4646import { THEMES } from "@/theme/useTheme" ;
47+ import { arrayToggle } from "@/utils/arrays" ;
4748import { cn } from "@/utils/cn" ;
4849import { keyboardShortcutsAtom } from "../editor/controls/keyboard-shortcuts" ;
4950import { Badge } from "../ui/badge" ;
@@ -975,6 +976,66 @@ export const UserConfigForm: React.FC = () => {
975976 </ div >
976977 ) }
977978 />
979+ < FormField
980+ control = { form . control }
981+ name = "runtime.default_auto_download"
982+ render = { ( { field } ) => (
983+ < div className = "flex flex-col gap-y-1" >
984+ < FormItem className = { formItemClasses } >
985+ < FormLabel > Auto output formats</ FormLabel >
986+ < FormControl >
987+ < div className = "flex gap-4" >
988+ < div className = "flex items-center space-x-2" >
989+ < Checkbox
990+ id = "html-checkbox"
991+ checked = {
992+ Array . isArray ( field . value ) &&
993+ field . value . includes ( "html" )
994+ }
995+ onCheckedChange = { ( ) => {
996+ const currentValue = Array . isArray ( field . value )
997+ ? field . value
998+ : [ ] ;
999+ field . onChange ( arrayToggle ( currentValue , "html" ) ) ;
1000+ } }
1001+ />
1002+ < FormLabel htmlFor = "html-checkbox" > HTML</ FormLabel >
1003+ </ div >
1004+ < div className = "flex items-center space-x-2" >
1005+ < Checkbox
1006+ id = "ipynb-checkbox"
1007+ checked = {
1008+ Array . isArray ( field . value ) &&
1009+ field . value . includes ( "ipynb" )
1010+ }
1011+ onCheckedChange = { ( ) => {
1012+ const currentValue = Array . isArray ( field . value )
1013+ ? field . value
1014+ : [ ] ;
1015+ field . onChange (
1016+ arrayToggle ( currentValue , "ipynb" ) ,
1017+ ) ;
1018+ } }
1019+ />
1020+ < FormLabel htmlFor = "ipynb-checkbox" > IPYNB</ FormLabel >
1021+ </ div >
1022+ </ div >
1023+ </ FormControl >
1024+ < FormMessage />
1025+ < IsOverridden
1026+ userConfig = { config }
1027+ name = "runtime.default_auto_download"
1028+ />
1029+ </ FormItem >
1030+ < FormDescription >
1031+ When enabled, marimo will periodically save notebooks in
1032+ your selected formats (HTML, IPYNB) to a folder named{ " " }
1033+ < Kbd className = "inline" > __marimo__</ Kbd > next to your
1034+ notebook file.
1035+ </ FormDescription >
1036+ </ div >
1037+ ) }
1038+ />
9781039 < FormField
9791040 control = { form . control }
9801041 name = "runtime.auto_instantiate"
0 commit comments