ignore javascirip validation and add tool_selector in editr class

This commit is contained in:
黄伟韬 2024-09-14 12:09:49 +08:00
parent 2cae99fa88
commit a80b41db5d
2 changed files with 19 additions and 1 deletions

View file

@ -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.

View file

@ -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