nanocode-cli 0.2.5__tar.gz → 0.2.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nanocode_cli-0.2.5/nanocode_cli.egg-info → nanocode_cli-0.2.6}/PKG-INFO +1 -1
- {nanocode_cli-0.2.5 → nanocode_cli-0.2.6}/nanocode.py +11 -3
- {nanocode_cli-0.2.5 → nanocode_cli-0.2.6/nanocode_cli.egg-info}/PKG-INFO +1 -1
- {nanocode_cli-0.2.5 → nanocode_cli-0.2.6}/pyproject.toml +1 -1
- {nanocode_cli-0.2.5 → nanocode_cli-0.2.6}/LICENSE +0 -0
- {nanocode_cli-0.2.5 → nanocode_cli-0.2.6}/MANIFEST.in +0 -0
- {nanocode_cli-0.2.5 → nanocode_cli-0.2.6}/README.md +0 -0
- {nanocode_cli-0.2.5 → nanocode_cli-0.2.6}/nanocode_cli.egg-info/SOURCES.txt +0 -0
- {nanocode_cli-0.2.5 → nanocode_cli-0.2.6}/nanocode_cli.egg-info/dependency_links.txt +0 -0
- {nanocode_cli-0.2.5 → nanocode_cli-0.2.6}/nanocode_cli.egg-info/entry_points.txt +0 -0
- {nanocode_cli-0.2.5 → nanocode_cli-0.2.6}/nanocode_cli.egg-info/requires.txt +0 -0
- {nanocode_cli-0.2.5 → nanocode_cli-0.2.6}/nanocode_cli.egg-info/top_level.txt +0 -0
- {nanocode_cli-0.2.5 → nanocode_cli-0.2.6}/setup.cfg +0 -0
|
@@ -41,7 +41,7 @@ from prompt_toolkit.patch_stdout import patch_stdout
|
|
|
41
41
|
|
|
42
42
|
JsonValue: TypeAlias = Any
|
|
43
43
|
Json: TypeAlias = dict[str, JsonValue]
|
|
44
|
-
__version__ = "0.2.
|
|
44
|
+
__version__ = "0.2.6"
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
class Error(Exception): ...
|
|
@@ -820,6 +820,7 @@ class SearchTool(Tool):
|
|
|
820
820
|
return [
|
|
821
821
|
"Search files or directories before Read; default is fixed text.",
|
|
822
822
|
"Prefix pattern with re: for regex search.",
|
|
823
|
+
"Search is line-oriented; regex patterns must not contain newlines.",
|
|
823
824
|
"Use A|B|C for literal OR search in fixed mode.",
|
|
824
825
|
"Optional context=N or N sets nearby context lines.",
|
|
825
826
|
"Optional glob matches file basename or path relative to cwd.",
|
|
@@ -827,7 +828,7 @@ class SearchTool(Tool):
|
|
|
827
828
|
|
|
828
829
|
@classmethod
|
|
829
830
|
def signature(cls) -> str:
|
|
830
|
-
return "Search(pattern, path[,
|
|
831
|
+
return "Search(pattern, path[, option...]) -> SearchToolResult<matches>; option is context=N|N or glob_pattern"
|
|
831
832
|
|
|
832
833
|
@classmethod
|
|
833
834
|
def example(cls) -> list[str]:
|
|
@@ -850,6 +851,8 @@ class SearchTool(Tool):
|
|
|
850
851
|
pattern = raw_pattern[3:] if regex else raw_pattern
|
|
851
852
|
if not pattern:
|
|
852
853
|
raise ToolCallError("pattern cannot be empty")
|
|
854
|
+
if regex and "\n" in pattern:
|
|
855
|
+
raise ToolCallError("multiline regex is not supported; Search is line-oriented. Search each line separately or Read a nearby range.")
|
|
853
856
|
glob_pattern = ""
|
|
854
857
|
context_lines = cls.CONTEXT_LINES
|
|
855
858
|
for raw_option in args[2:]:
|
|
@@ -1968,6 +1971,7 @@ class ModelClient:
|
|
|
1968
1971
|
"model": self.session.model,
|
|
1969
1972
|
"messages": messages,
|
|
1970
1973
|
"temperature": self.session.temperature,
|
|
1974
|
+
"response_format": {"type": "json_object"},
|
|
1971
1975
|
}
|
|
1972
1976
|
extra_params = self._reasoning_params()
|
|
1973
1977
|
payload.update(extra_params)
|
|
@@ -2809,7 +2813,11 @@ class Agent:
|
|
|
2809
2813
|
return headline
|
|
2810
2814
|
|
|
2811
2815
|
def step(self) -> Json:
|
|
2812
|
-
response = self.request(self.build_system_prompt(), self.build_user_prompt(), activity="main")
|
|
2816
|
+
response = self.request(self.build_system_prompt(), self.build_user_prompt(consume_latest_tool_results=False), activity="main")
|
|
2817
|
+
if _json_str(response.get("_format_error")):
|
|
2818
|
+
return response
|
|
2819
|
+
self.latest_tool_call_results = ""
|
|
2820
|
+
self.latest_agent_feedback = ""
|
|
2813
2821
|
self.state_updater.apply_tool_call_summaries(response)
|
|
2814
2822
|
return response
|
|
2815
2823
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|