File tree 1 file changed +4
-12
lines changed
1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change 1
- import argparse
2
1
import asyncio
3
2
import logging
4
3
from typing import Type
10
9
from openhands .controller import AgentController
11
10
from openhands .controller .agent import Agent
12
11
from openhands .core .config import (
12
+ get_parser ,
13
13
load_app_config ,
14
14
)
15
15
from openhands .core .logger import openhands_logger as logger
@@ -63,10 +63,10 @@ def display_event(event: Event):
63
63
display_command_output (event .content )
64
64
65
65
66
- def get_parser () -> argparse .ArgumentParser :
67
- """Get the parser for the command line arguments."""
68
- parser = argparse .ArgumentParser (description = 'Run an agent with a specific task' )
66
+ async def main ():
67
+ """Runs the agent in CLI mode"""
69
68
69
+ parser = get_parser ()
70
70
# Add the version argument
71
71
parser .add_argument (
72
72
'-v' ,
@@ -76,14 +76,6 @@ def get_parser() -> argparse.ArgumentParser:
76
76
help = 'Show the version number and exit' ,
77
77
default = None ,
78
78
)
79
-
80
- return parser
81
-
82
-
83
- async def main ():
84
- """Runs the agent in CLI mode"""
85
-
86
- parser = get_parser ()
87
79
args = parser .parse_args ()
88
80
89
81
if args .version :
You can’t perform that action at this time.
0 commit comments