mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54: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 Schema:")
|
||||||
self.io.tool_output(json.dumps(self.functions, indent=4))
|
self.io.tool_output(json.dumps(self.functions, indent=4))
|
||||||
|
|
||||||
|
def show_announcements(self):
|
||||||
for line in self.get_announcements():
|
for line in self.get_announcements():
|
||||||
self.io.tool_output(line)
|
self.io.tool_output(line)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ from pathlib import Path
|
||||||
|
|
||||||
import git
|
import git
|
||||||
import litellm
|
import litellm
|
||||||
from click.testing import CliRunner
|
|
||||||
from streamlit.web import cli
|
from streamlit.web import cli
|
||||||
|
|
||||||
from aider import models
|
from aider import models
|
||||||
|
@ -146,19 +145,21 @@ def scrub_sensitive_info(args, text):
|
||||||
def launch_gui(args):
|
def launch_gui(args):
|
||||||
from aider import gui
|
from aider import gui
|
||||||
|
|
||||||
print("Hit CONTROL-C to exit...")
|
print()
|
||||||
|
print("CONTROL-C to exit...")
|
||||||
|
|
||||||
target = gui.__file__
|
target = gui.__file__
|
||||||
|
|
||||||
runner = CliRunner()
|
|
||||||
st_args = [
|
st_args = [
|
||||||
"run",
|
"run",
|
||||||
target,
|
target,
|
||||||
"--global.developmentMode=false",
|
"--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
|
# from streamlit.web import bootstrap
|
||||||
# bootstrap.load_config_options(flag_options={})
|
# bootstrap.load_config_options(flag_options={})
|
||||||
# cli.main_run(target, args)
|
# 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:
|
if return_coder:
|
||||||
return coder
|
return coder
|
||||||
|
|
||||||
|
coder.show_announcements()
|
||||||
|
|
||||||
if args.commit:
|
if args.commit:
|
||||||
coder.commands.cmd_commit("")
|
coder.commands.cmd_commit("")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue