mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
simpler launch of streamlit
This commit is contained in:
parent
73bad5250b
commit
ec9fac2500
2 changed files with 8 additions and 4 deletions
|
@ -253,6 +253,7 @@ class Coder:
|
|||
self.io.tool_output("JSON Schema:")
|
||||
self.io.tool_output(json.dumps(self.functions, indent=4))
|
||||
|
||||
def show_announcements(self):
|
||||
for line in self.get_announcements():
|
||||
self.io.tool_output(line)
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ from pathlib import Path
|
|||
|
||||
import git
|
||||
import litellm
|
||||
from click.testing import CliRunner
|
||||
from streamlit.web import cli
|
||||
|
||||
from aider import models
|
||||
|
@ -146,19 +145,21 @@ def scrub_sensitive_info(args, text):
|
|||
def launch_gui(args):
|
||||
from aider import gui
|
||||
|
||||
print("Hit CONTROL-C to exit...")
|
||||
print()
|
||||
print("CONTROL-C to exit...")
|
||||
|
||||
target = gui.__file__
|
||||
|
||||
runner = CliRunner()
|
||||
st_args = [
|
||||
"run",
|
||||
target,
|
||||
"--global.developmentMode=false",
|
||||
"--",
|
||||
]
|
||||
runner.invoke(cli.main, st_args + args)
|
||||
cli.main(st_args + args)
|
||||
|
||||
# from click.testing import CliRunner
|
||||
# runner = CliRunner()
|
||||
# from streamlit.web import bootstrap
|
||||
# bootstrap.load_config_options(flag_options={})
|
||||
# cli.main_run(target, args)
|
||||
|
@ -330,6 +331,8 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||
if return_coder:
|
||||
return coder
|
||||
|
||||
coder.show_announcements()
|
||||
|
||||
if args.commit:
|
||||
coder.commands.cmd_commit("")
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue