@@ -131,70 +131,6 @@ def init():
131131 set_variable_in_file (target_dir / "deploy.py" , setting_values )
132132
133133
134- # @app.command()
135- # def web(
136- # path: str = typer.Option(".", "--path", help="Agent project path"),
137- # ):
138- # from google.adk.cli import cli_tools_click
139-
140- # def my_decorator(func):
141- # @wraps(func)
142- # def wrapper(*args, **kwargs):
143- # adk_app: FastAPI = func(*args, **kwargs)
144- # import importlib.util
145- # import mimetypes
146-
147- # from fastapi.staticfiles import StaticFiles
148-
149- # mimetypes.add_type("application/javascript", ".js", True)
150- # mimetypes.add_type("text/javascript", ".js", True)
151-
152- # spec = importlib.util.find_spec("veadk.cli.browser")
153- # if spec is not None:
154- # ANGULAR_DIST_PATH = spec.submodule_search_locations[0]
155- # logger.info(f"Static source path: {ANGULAR_DIST_PATH}")
156- # else:
157- # raise Exception("veadk.cli.browser not found")
158-
159- # # ----- 8< Unmount app -----
160- # from starlette.routing import Mount
161-
162- # for index, route in enumerate(adk_app.routes):
163- # if isinstance(route, Mount) and route.path == "/dev-ui":
164- # del adk_app.routes[index]
165- # break
166- # # ----- 8< Mount our app -----
167-
168- # adk_app.mount(
169- # "/dev-ui/",
170- # StaticFiles(directory=ANGULAR_DIST_PATH, html=True),
171- # name="static",
172- # )
173-
174- # from fastapi.middleware.cors import CORSMiddleware
175-
176- # adk_app.add_middleware(
177- # CORSMiddleware,
178- # allow_origins=["*"],
179- # allow_credentials=True,
180- # allow_methods=["*"],
181- # allow_headers=["*"],
182- # )
183- # return adk_app
184-
185- # return wrapper
186-
187- # # Monkey patch
188- # fast_api.get_fast_api_app = my_decorator(fast_api.get_fast_api_app)
189-
190- # # reload cli_tools_click
191- # importlib.reload(cli_tools_click)
192-
193- # agents_dir = str(Path(path).resolve())
194- # logger.info(f"Agents dir is {agents_dir}")
195- # cli_tools_click.cli_web.main(args=[agents_dir])
196-
197-
198134@app .command ()
199135def web (
200136 session_service_uri : str = typer .Option (
@@ -325,19 +261,6 @@ def prompt(
325261 ap .optimize (agents = agents , feedback = feedback , model_name = model_name )
326262
327263
328- # @app.command()
329- # def studio():
330- # import os
331-
332- # # pre-load
333- # from veadk import Agent # noqa
334-
335- # os.environ["VEADK_STUDIO_AGENTS_DIR"] = os.getcwd()
336- # app_path = os.path.join(os.path.dirname(__file__), "../../app/app.py")
337-
338- # os.system(f"streamlit run {app_path}")
339-
340-
341264@app .command ()
342265def deploy (
343266 access_key : str = typer .Option (..., "--access-key" , help = "Access Key" ),
@@ -352,24 +275,6 @@ def deploy(
352275 vefaas .deploy (name = name , path = path )
353276
354277
355- @app .command ()
356- def log (
357- access_key : str = typer .Option (..., "--access-key" , help = "Access Key" ),
358- secret_key : str = typer .Option (..., "--secret-key" , help = "Secret Key" ),
359- query : str = typer .Option (..., "--query" , help = "Query statement" ),
360- topic_id : str = typer .Option (..., "--topic-id" , help = "Topic ID in VeTLS" ),
361- dump_path : str = typer .Option (
362- "." , "--dump-path" , help = "Local path for log storage file"
363- ),
364- ):
365- path = Path (dump_path ).resolve ()
366-
367- from veadk .cli .services .vetls import VeTLS
368-
369- vetls = VeTLS (access_key , secret_key , dump_path = str (path ))
370- vetls .query (topic_id = topic_id , query = query )
371-
372-
373278@app .command ()
374279def version ():
375280 print (f"VeADK { VERSION } " )
0 commit comments