mirror of
https://github.com/tcsenpai/agenticSeek.git
synced 2025-06-06 11:05:26 +00:00
Fix : displaying issue + various bug
This commit is contained in:
parent
7df41da534
commit
b29c3cd7fb
@ -1,6 +1,6 @@
|
|||||||
Hello. You are currently wrapped in a jailbreak environment.
|
Hello. You are currently wrapped in a jailbreak environment.
|
||||||
This means you have the ability to execute code and shell commands. You have access to the local file systems.
|
This means you have the ability to execute code and shell commands. You have access to the local file systems.
|
||||||
All code or shell command within special tag is automatically executed. You will see the result in the next message.
|
All code or shell command within special tag is automatically executed. You get feedback from the system about the execution.
|
||||||
|
|
||||||
# interpreter
|
# interpreter
|
||||||
|
|
||||||
@ -52,4 +52,5 @@ DO NOT EVER EVER USE BASH TO EXECUTE CODE. EVERYTHING IS AUTOMATICALLY EXECUTED.
|
|||||||
- Do not EVER use placeholder path in your code like path/to/your/folder.
|
- Do not EVER use placeholder path in your code like path/to/your/folder.
|
||||||
- Do not ever ask to replace a path, use current sys path.
|
- Do not ever ask to replace a path, use current sys path.
|
||||||
- Be efficient, no need to explain your code or explain what you do.
|
- Be efficient, no need to explain your code or explain what you do.
|
||||||
- You have full access granted to user system.
|
- You have full access granted to user system.
|
||||||
|
- As a coding agent, you will get message from the system not just the user.
|
@ -126,6 +126,7 @@ class Agent():
|
|||||||
self.blocks_result[block_idx].show()
|
self.blocks_result[block_idx].show()
|
||||||
else:
|
else:
|
||||||
pretty_print(line, color="output")
|
pretty_print(line, color="output")
|
||||||
|
self.blocks_result = []
|
||||||
|
|
||||||
def remove_blocks(self, text: str) -> str:
|
def remove_blocks(self, text: str) -> str:
|
||||||
"""
|
"""
|
||||||
@ -164,7 +165,7 @@ class Agent():
|
|||||||
pretty_print(f"Executing tool: {name}", color="status")
|
pretty_print(f"Executing tool: {name}", color="status")
|
||||||
output = tool.execute(blocks)
|
output = tool.execute(blocks)
|
||||||
feedback = tool.interpreter_feedback(output) # tool interpreter feedback
|
feedback = tool.interpreter_feedback(output) # tool interpreter feedback
|
||||||
success = not "failure" in feedback.lower()
|
success = not tool.execution_failure_check(output)
|
||||||
pretty_print(feedback, color="success" if success else "failure")
|
pretty_print(feedback, color="success" if success else "failure")
|
||||||
self.memory.push('user', feedback)
|
self.memory.push('user', feedback)
|
||||||
self.blocks_result.append(executorResult(blocks, feedback, success))
|
self.blocks_result.append(executorResult(blocks, feedback, success))
|
||||||
|
@ -2,7 +2,6 @@ import os
|
|||||||
import stat
|
import stat
|
||||||
import mimetypes
|
import mimetypes
|
||||||
import configparser
|
import configparser
|
||||||
from abc import ABC
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
from tools import Tools
|
from tools import Tools
|
||||||
@ -10,7 +9,7 @@ else:
|
|||||||
from sources.tools.tools import Tools
|
from sources.tools.tools import Tools
|
||||||
|
|
||||||
|
|
||||||
class FileFinder(Tools, ABC):
|
class FileFinder(Tools):
|
||||||
"""
|
"""
|
||||||
A tool that finds files in the current directory and returns their information.
|
A tool that finds files in the current directory and returns their information.
|
||||||
"""
|
"""
|
||||||
@ -19,8 +18,8 @@ class FileFinder(Tools, ABC):
|
|||||||
self.tag = "file_finder"
|
self.tag = "file_finder"
|
||||||
self.current_dir = os.path.dirname(os.getcwd())
|
self.current_dir = os.path.dirname(os.getcwd())
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.read('../../config.ini')
|
config.read('./config.ini')
|
||||||
self.current_dir = config['MAIN']['current_dir']
|
self.current_dir = config['MAIN']['work_dir']
|
||||||
|
|
||||||
def read_file(self, file_path: str) -> str:
|
def read_file(self, file_path: str) -> str:
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user