@noobdemon/noob-cli 1.9.10 → 1.9.12
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.
- package/package.json +1 -1
- package/src/agent.js +1 -1
- package/src/repl.js +8 -0
package/package.json
CHANGED
package/src/agent.js
CHANGED
|
@@ -33,7 +33,7 @@ Available tools (each is self-contained; pick the SMALLEST tool that answers the
|
|
|
33
33
|
Context is finite. Don't slurp the whole repo up front. Discover information progressively: list_dir/glob to map → grep to locate → read_file (with offset+limit for big files) to inspect only what matters. Each tool result spends your attention budget — make every call earn it. When a tool returns a huge blob, extract the few facts you need, then move on; don't re-read it later (the result stays in history).
|
|
34
34
|
|
|
35
35
|
# Rules
|
|
36
|
-
- TODO-BASED EXECUTION: For
|
|
36
|
+
- TODO-BASED EXECUTION: For multi-step tasks, you MUST keep going until ALL items are "- [x]". NEVER stop mid-list. Flow: (1) write todo list, (2) start first item, (3) after EVERY tool result, check off the completed item AND IMMEDIATELY start the next unchecked item, (4) repeat until all done. Your response is NOT finished until ALL items are checked. The ONLY valid reason to stop is: (a) all items done, or (b) you are WAITING for a user reply. If you just got a tool result, you MUST continue — do NOT output a summary, do NOT ask "what next", do NOT stop. After write_file/edit_file returns, immediately do the next item.
|
|
37
37
|
- GROUND TRUTH = real TOOL RESULTs in this conversation, not your memory or what you intended to do. A file changed only if a write_file/edit_file result confirms it (see the FILES CHANGED list). A test passed / build succeeded / command worked only if a run_command result above shows it. Never narrate outcomes you didn't observe; if you haven't checked, say so and check now (read_file / list_dir / run the command). Before any "done/summary" reply, reconcile every file and result you're about to claim against the actual tool results above — if it isn't there, you didn't do it yet.
|
|
38
38
|
- Investigate before editing: read the relevant files first; never invent file contents.
|
|
39
39
|
- Make the smallest change that fully solves the task. Match the surrounding code style.
|
package/src/repl.js
CHANGED
|
@@ -150,6 +150,12 @@ export async function startRepl(opts = {}) {
|
|
|
150
150
|
};
|
|
151
151
|
const tokenMeter = new TokenMeter();
|
|
152
152
|
|
|
153
|
+
// Set terminal title bar — hiện trên CMD/PowerShell.
|
|
154
|
+
const updateTitle = () => {
|
|
155
|
+
process.title = `noob — ${state.model.name}`;
|
|
156
|
+
};
|
|
157
|
+
updateTitle();
|
|
158
|
+
|
|
153
159
|
// Prompt = dòng trạng thái sống. Luôn phản ánh yolo + version theo thời gian
|
|
154
160
|
// thực (vẽ lại mỗi lượt và ngay khi Shift+Tab), nên không cần gõ /status.
|
|
155
161
|
const promptStr = (lead = true) => {
|
|
@@ -306,6 +312,7 @@ export async function startRepl(opts = {}) {
|
|
|
306
312
|
const m = findModel(s.model);
|
|
307
313
|
if (m) state.model = m;
|
|
308
314
|
}
|
|
315
|
+
updateTitle();
|
|
309
316
|
// Re-arm /loop nếu phiên cũ đang chạy loop (timer/running không serialize được).
|
|
310
317
|
if (s.loop && s.loop.task && s.loop.intervalMs) {
|
|
311
318
|
state.loop = {
|
|
@@ -1790,6 +1797,7 @@ NGUYÊN TẮC:
|
|
|
1790
1797
|
state.model = m;
|
|
1791
1798
|
state.mode = "chat";
|
|
1792
1799
|
config.setModel(m.id);
|
|
1800
|
+
updateTitle();
|
|
1793
1801
|
console.log(c.ok(" " + t.switchTo + " ") + modelBadge(m));
|
|
1794
1802
|
if (m.provider === "openai" || m.provider === "google")
|
|
1795
1803
|
console.log(c.dim(" ") + c.tool(t.providerRefuses(PROVIDERS[m.provider].name)));
|