File tree 4 files changed +7
-6
lines changed
4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 1
1
import runpy
2
2
import os
3
- r2aihome = os . path . dirname ( __file__ ) #os.readlink(__file__))
4
- runpy .run_path (r2aihome + ' /r2ai/main.py' )
3
+
4
+ runpy .run_path (os . path . relpath ( '. /r2ai/main.py', __file__ ) )
Original file line number Diff line number Diff line change 1
1
import sys
2
- from .models import models
2
+ from .models import models , mainmodels
3
3
sys .modules ["r2ai" ].models = models
4
+ sys .modules ["r2ai" ].mainmodels = mainmodels
4
5
VERSION = "0.5.0"
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ def run_rcfile_once():
101
101
rcfile_loaded = True
102
102
103
103
if have_rlang :
104
- from .repl import runline , r2ai_repl , help_message
104
+ from r2ai .repl import runline , r2ai_repl , help_message
105
105
if have_r2pipe :
106
106
r2ai_repl (ai )
107
107
os .exit (0 )
Original file line number Diff line number Diff line change @@ -165,10 +165,10 @@ def runline(ai, usertext):
165
165
print (help_message )
166
166
elif usertext .startswith ("clear" ) or usertext .startswith ("-k" ):
167
167
print ("\x1b [2J\x1b [0;0H\r " )
168
- elif usertext .startswith ("-M" ):
169
- print (r2ai .models ().strip ())
170
168
elif usertext .startswith ("-MM" ):
171
169
print (r2ai .mainmodels ().strip ())
170
+ elif usertext .startswith ("-M" ):
171
+ print (r2ai .models ().strip ())
172
172
elif usertext .startswith ("-m" ):
173
173
words = usertext .split (" " )
174
174
if len (words ) > 1 :
You can’t perform that action at this time.
0 commit comments