set streamlit config options

This commit is contained in:
Paul Gauthier 2024-04-29 10:19:22 -07:00
parent 3199a8f704
commit 29f4d788a3
2 changed files with 24 additions and 7 deletions

View file

@ -521,6 +521,10 @@ def gui_main():
},
)
# config_options = st.config._config_options
# for key, value in config_options.items():
# print(f"{key}: {value.value}")
GUI()

View file

@ -7,7 +7,7 @@ import git
import litellm
from streamlit.web import cli
from aider import models
from aider import __version__, models
from aider.args import get_parser
from aider.coders import Coder
from aider.io import InputOutput
@ -150,13 +150,26 @@ def launch_gui(args):
target = gui.__file__
st_args = [
"run",
target,
"--global.developmentMode=false",
"--",
st_args = ["run", target]
st_args += [
"--browser.gatherUsageStats=false",
"--runner.magicEnabled=false",
"--server.runOnSave=false",
]
cli.main(st_args + args)
if "-dev" in __version__:
print("Watching for file changes.")
else:
st_args += [
"--global.developmentMode=false",
"--server.fileWatcherType=none",
"--client.toolbarMode=viewer", # minimal?
]
st_args += ["--"] + args
cli.main(st_args)
# from click.testing import CliRunner
# runner = CliRunner()