@noobdemon/noob-cli 1.9.11 → 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/repl.js +8 -0
package/package.json
CHANGED
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)));
|