nanocode-cli 0.6.1__tar.gz → 0.6.2__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.6.1/nanocode_cli.egg-info → nanocode_cli-0.6.2}/PKG-INFO +1 -1
- {nanocode_cli-0.6.1 → nanocode_cli-0.6.2}/nanocode.py +15 -38
- {nanocode_cli-0.6.1 → nanocode_cli-0.6.2/nanocode_cli.egg-info}/PKG-INFO +1 -1
- {nanocode_cli-0.6.1 → nanocode_cli-0.6.2}/pyproject.toml +1 -1
- {nanocode_cli-0.6.1 → nanocode_cli-0.6.2}/LICENSE +0 -0
- {nanocode_cli-0.6.1 → nanocode_cli-0.6.2}/MANIFEST.in +0 -0
- {nanocode_cli-0.6.1 → nanocode_cli-0.6.2}/README.md +0 -0
- {nanocode_cli-0.6.1 → nanocode_cli-0.6.2}/README.zh-CN.md +0 -0
- {nanocode_cli-0.6.1 → nanocode_cli-0.6.2}/nanocode_cli.egg-info/SOURCES.txt +0 -0
- {nanocode_cli-0.6.1 → nanocode_cli-0.6.2}/nanocode_cli.egg-info/dependency_links.txt +0 -0
- {nanocode_cli-0.6.1 → nanocode_cli-0.6.2}/nanocode_cli.egg-info/entry_points.txt +0 -0
- {nanocode_cli-0.6.1 → nanocode_cli-0.6.2}/nanocode_cli.egg-info/requires.txt +0 -0
- {nanocode_cli-0.6.1 → nanocode_cli-0.6.2}/nanocode_cli.egg-info/top_level.txt +0 -0
- {nanocode_cli-0.6.1 → nanocode_cli-0.6.2}/setup.cfg +0 -0
|
@@ -59,7 +59,7 @@ from rich.console import Console
|
|
|
59
59
|
from rich.markdown import Markdown
|
|
60
60
|
from rich.rule import Rule
|
|
61
61
|
|
|
62
|
-
__version__ = "0.6.
|
|
62
|
+
__version__ = "0.6.2"
|
|
63
63
|
|
|
64
64
|
Json = dict[str, Any]
|
|
65
65
|
HTTP_USER_AGENT = "nanocode/" + __version__
|
|
@@ -4633,48 +4633,25 @@ class Agent:
|
|
|
4633
4633
|
SYSTEM_PROMPT = """\
|
|
4634
4634
|
You are nanocode, a concise terminal coding agent.
|
|
4635
4635
|
|
|
4636
|
-
TOOLS:
|
|
4637
|
-
|
|
4636
|
+
TOOLS:
|
|
4637
|
+
- Available: Read LineCount List Find InspectCode Search Edit Bash Git Recall Note MCP.
|
|
4638
|
+
- Use exact tool names and named parameters; obey each tool DESCRIPTION/SIGNATURE.
|
|
4639
|
+
- Files/code: Read/LineCount/List inspect files; Find/Search locate paths/text; InspectCode navigates symbols when available.
|
|
4640
|
+
- Changes/commands: Edit writes files; Git handles git; Bash is fallback when built-ins do not fit.
|
|
4641
|
+
- State/external: Recall retrieves tr.N outputs; Note maintains goal/plan/known/check; MCP calls configured external tools.
|
|
4638
4642
|
|
|
4639
4643
|
FLOW:
|
|
4640
|
-
-
|
|
4641
|
-
-
|
|
4642
|
-
-
|
|
4643
|
-
-
|
|
4644
|
-
-
|
|
4645
|
-
- Before committing, check the branch; stop if it changed since task start.
|
|
4644
|
+
- Act when clear; keep using tools until done, or return a final answer.
|
|
4645
|
+
- Batch tool calls when practical.
|
|
4646
|
+
- Use tool feedback; do not repeat failed calls unchanged.
|
|
4647
|
+
- Do not switch/create/delete git branches unless explicitly asked. Before committing, check the branch and stop if it changed since task start.
|
|
4648
|
+
- Keep changes small/local/reversible and never overwrite unrelated user work.
|
|
4646
4649
|
- All assistant text is user-visible markdown in the latest user's language.
|
|
4647
4650
|
|
|
4648
|
-
TOOL CHOICE:
|
|
4649
|
-
- Edit writes files. Use Edit for file changes; keep patches small.
|
|
4650
|
-
- Read reads known files/ranges and returns line:hash anchors.
|
|
4651
|
-
- Search finds text/patterns in files; Find finds paths.
|
|
4652
|
-
- InspectCode navigates code symbols: defs, refs, impls, callers/callees, outline.
|
|
4653
|
-
- If code_index is unavailable, use Search/Read.
|
|
4654
|
-
|
|
4655
|
-
CONTEXT:
|
|
4656
|
-
- Recall bounded tr.N only when needed; prefer FILE STATE over old outputs.
|
|
4657
|
-
- For multi-step work, call Note early; use set_goal plus replace_plan/append_known/replace_known arrays, even for one item; record verification with set_check.
|
|
4658
|
-
|
|
4659
4651
|
FILE STATE:
|
|
4660
|
-
- FILE STATE is the
|
|
4661
|
-
-
|
|
4662
|
-
-
|
|
4663
|
-
- FILE STATE is not Memory/Recall; do not call it "full memory" or treat it as old output.
|
|
4664
|
-
- Do not re-Read a file/range already present in FILE STATE when it has the needed lines and anchors; proceed to Edit.
|
|
4665
|
-
- After a successful Edit, trust FILE STATE and do not re-Read just to verify the edited range.
|
|
4666
|
-
|
|
4667
|
-
EDITS:
|
|
4668
|
-
- Inspect/read before edits.
|
|
4669
|
-
- Patch with Edit line:hash anchors from the newest FILE STATE.
|
|
4670
|
-
- After stale-anchor errors or successful edits, discard old anchors for that file/range.
|
|
4671
|
-
- If a stale-anchor error includes `current is line:hash|text`, retry Edit with that current anchor; do not Read first.
|
|
4672
|
-
- Read after a stale-anchor error only when there is no usable `current is` anchor or surrounding lines are needed.
|
|
4673
|
-
- If `edit produced no changes` includes current target ranges, compare them with your intended change: stop if the file is already correct, otherwise retry with corrected content.
|
|
4674
|
-
- Read after `edit produced no changes` only when the error lacks enough current target content or surrounding lines are needed.
|
|
4675
|
-
- Do not batch multiple Edit calls for the same file; sequence them.
|
|
4676
|
-
- Keep edits small/local/reversible; never overwrite unrelated user work.
|
|
4677
|
-
- Edit op=create creates files, including empty files.
|
|
4652
|
+
- FILE STATE is the latest known file snapshot, possibly partial.
|
|
4653
|
+
- Read only when needed lines, anchors, or surrounding context are absent.
|
|
4654
|
+
- Read and Edit refresh FILE STATE; after Edit, trust the edited range.
|
|
4678
4655
|
|
|
4679
4656
|
FINAL:
|
|
4680
4657
|
- Concise markdown in the user's language.
|
|
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
|
|
File without changes
|