Coverage for aipyapp/cli/command/cmd_info.py: 0%

1 import sys

2

3 from ... import T

4 from .base_parser import ParserCommand

5 from .utils import print_table

6

7 class InfoCommand(ParserCommand):

8 name = 'info'

9 description = T('System information')

10

11 def execute(self, args):

12 ctx = self.manager.context

13 tm = ctx.tm

14 settings = tm.settings

15 status = tm.get_status()

16

17 info = [

18 (T('Current configuration directory'), str(settings.config_dir)),

19 (T('Current working directory'), status['workdir']),

20 (T('Current LLM'), status['client']),

21 (T('Current role'), status['role']),

22 (T('Current display style'), T(status['display'])),

23 ('Python', sys.executable),

24 (T('Python version'), sys.version),

25 (T('Python base prefix'), sys.base_prefix),

26 ]

27

28 print_table(info, title=T("System information"), headers=[T("Parameter"), T("Value")])