mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 20:17:50 +00:00
Added open file
This commit is contained in:
parent
7b84a35076
commit
1158b31968
13
app.py
13
app.py
@ -508,6 +508,9 @@ try:
|
||||
self.add_endpoint(
|
||||
"/open_code_in_vs_code", "open_code_in_vs_code", self.open_code_in_vs_code, methods=["POST"]
|
||||
)
|
||||
self.add_endpoint(
|
||||
"/open_file", "open_file", self.open_file, methods=["GET"]
|
||||
)
|
||||
|
||||
def get_model_status(self):
|
||||
return jsonify({"status":self.model is not None})
|
||||
@ -645,7 +648,13 @@ try:
|
||||
|
||||
os.system('code ' + str(root_folder))
|
||||
return {"output": "OK", "execution_time": 0}
|
||||
|
||||
|
||||
def open_file(self):
|
||||
"""Opens code in vs code."""
|
||||
path = request.args.get('path')
|
||||
os.system("open "+path)
|
||||
return {"output": "OK", "execution_time": 0}
|
||||
|
||||
def open_code_in_vs_code(self):
|
||||
"""Opens code in vs code."""
|
||||
|
||||
@ -853,7 +862,7 @@ try:
|
||||
bmp_logo_path_ = real_assets_path / 'logo.bmp'
|
||||
|
||||
if languages_path.exists():
|
||||
personality_info['languages']=[f.stem for f in languages_path.iterdir() if f.suffix==".yaml"]
|
||||
personality_info['languages']= [""]+[f.stem for f in languages_path.iterdir() if f.suffix==".yaml"]
|
||||
else:
|
||||
personality_info['languages']=None
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 113e5531e53f562c9c22de64236222b9ed9d9a00
|
||||
Subproject commit dcd80a126c6232c3a9ed82b5c877200999308ebc
|
@ -1 +1 @@
|
||||
Subproject commit 65236d13731c2d890073979dfae0d934dfa5e7d5
|
||||
Subproject commit a203e1087771a23770c3080b37822b14555e5f4b
|
@ -1 +1 @@
|
||||
Subproject commit b43d25d13a4614ff4281ebeb157c8be952562475
|
||||
Subproject commit 50ef86ced90019932690d5816fe54efc7e99c73e
|
@ -1 +1 @@
|
||||
Subproject commit 9d6231e2eb20c444a6005e48ea9fceac07629ec2
|
||||
Subproject commit b87a9509f167b476cfcca08c0b813b0df7c33c29
|
Loading…
Reference in New Issue
Block a user