mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-21 14:05:17 +02:00
ignore javascirip validation and add tool_selector in editr class
This commit is contained in:
parent
2cae99fa88
commit
a80b41db5d
2 changed files with 19 additions and 1 deletions
|
|
@ -73,7 +73,24 @@ class LineNumberError(Exception):
|
|||
pass
|
||||
|
||||
|
||||
@register_tool()
|
||||
@register_tool(
|
||||
include_functions=[
|
||||
"write",
|
||||
"read",
|
||||
"open_file",
|
||||
"goto_line",
|
||||
"scroll_down",
|
||||
"scroll_up",
|
||||
"create_file",
|
||||
"edit_file_by_replace",
|
||||
"insert_content_at_line",
|
||||
"append_file",
|
||||
"search_dir",
|
||||
"search_file",
|
||||
"find_file",
|
||||
"search_index_repo",
|
||||
]
|
||||
)
|
||||
class Editor(BaseModel):
|
||||
"""
|
||||
A tool for reading, understanding, writing, and editing files.
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ class Linter:
|
|||
sql=self.fake_lint, # base_lint lacks support for full SQL syntax. Use fake_lint to bypass the validation.
|
||||
css=self.fake_lint, # base_lint lacks support for css syntax. Use fake_lint to bypass the validation.
|
||||
js=self.fake_lint, # base_lint lacks support for javascipt syntax. Use fake_lint to bypass the validation.
|
||||
javascript=self.fake_lint,
|
||||
)
|
||||
self.all_lint_cmd = None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue