可以跑了 准备做系统
This commit is contained in:
@@ -41,16 +41,19 @@ class Backboard:
|
||||
five_history = ""
|
||||
for h in self.history[-5:]:
|
||||
five_history += h['type'] + "\n" + h.get('filePath', '') + "\n\n"
|
||||
return (f"###Global Info:###"
|
||||
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}"
|
||||
f"- Activated file content (current editing 10 lines): "
|
||||
f"```"
|
||||
f"{self.active_file_content[-10:]}"
|
||||
f"```"
|
||||
f"- Last five action:{five_history}"
|
||||
f"- File tree: {self.file_tree}")
|
||||
|
||||
endl = "\n"
|
||||
return (f"###Global Info:###{endl}"
|
||||
f"Here are some info about now user's IDE, refer to it when you need to handle some code.{endl}"
|
||||
f"- User's total study time is {self.get_deltatime_mmss(self.create_time, time.time())}{endl}"
|
||||
f"- User's current chapter study time is {self.get_deltatime_mmss(self.enter_chapter_time, time.time())}{endl}"
|
||||
f"- Activated file path: {self.active_file_path}{endl}"
|
||||
f"- Activated file content (current editing 10 lines): {endl}"
|
||||
f"```{endl}"
|
||||
f"{self.active_file_content[-10:]}{endl}"
|
||||
f"```{endl}"
|
||||
f"- Last five action:{five_history}{endl}"
|
||||
f"- File tree: {self.file_tree}{endl}")
|
||||
def add_history(self, realtime_action):
|
||||
if(realtime_action['type']=='config'):return
|
||||
if len(self.history)!=0:
|
||||
|
||||
Reference in New Issue
Block a user