vscode plugin ws ok

This commit is contained in:
CakeCN
2024-12-11 23:05:43 +08:00
parent 6b045bb296
commit 38e9ae5856
5 changed files with 33 additions and 32 deletions

View File

@@ -42,7 +42,6 @@ class Backboard:
for h in self.history[-5:]:
five_history += h['type'] + "\n" + h.get('filePath', '') + "\n\n"
return (f"###Global Info:###"
f"- User is {self.user_id}"
f"- User's total study time is {self.get_deltatime_mmss(self.create_time, time.time())}"
f"- User's current chapter study time is {self.get_deltatime_mmss(self.enter_chapter_time, time.time())}"
f"- Activated file path: {self.active_file_path}"
@@ -55,8 +54,8 @@ class Backboard:
def add_history(self, realtime_action):
if(realtime_action['type']=='config'):return
if len(self.history)!=0:
if (self.history[-1]['type']=='edit'):
if(self.history[-1]['filepath'] == realtime_action['filepath']):
if (self.history[-1]['type']=='fileEdit'):
if(self.history[-1]['filePath'] == realtime_action['filePath']):
self.history[-1]['content'] = realtime_action['content']
return
self.history.append(realtime_action)