@ikyyofc/gemini-cli 4.0.0 → 4.0.2
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 +8 -6
- package/src/renderer.js +20 -14
- package/src/tools.js +380 -590
package/package.json
CHANGED
package/src/agent.js
CHANGED
|
@@ -119,13 +119,15 @@ export async function runAgentLoop(userMessage, history, {
|
|
|
119
119
|
return { finalResponse: textContent, iterations: iteration };
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
// ── Model reasoning
|
|
122
|
+
// ── Model reasoning — show full, not preview ───────────────
|
|
123
123
|
if (textContent) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
124
|
+
const lines = textContent.split("\n");
|
|
125
|
+
lines.forEach((line, i) => {
|
|
126
|
+
process.stdout.write(
|
|
127
|
+
chalk.hex("#4A4A5E")(i === 0 ? " ┄ " : " ") +
|
|
128
|
+
chalk.hex("#7A7A9A").italic(line) + "\n"
|
|
129
|
+
);
|
|
130
|
+
});
|
|
129
131
|
}
|
|
130
132
|
|
|
131
133
|
// ── Step block — fresh per iteration ──────────────────────
|
package/src/renderer.js
CHANGED
|
@@ -285,32 +285,38 @@ export function printStepFooter() {
|
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
export function printToolCall(name, args = {}) {
|
|
288
|
-
|
|
289
|
-
const raw = String(v).replace(/\n/g, "↵");
|
|
290
|
-
const val = raw.length > 42 ? raw.slice(0, 42) + "…" : raw;
|
|
291
|
-
return chalk.hex(C.muted)(k + ":") + chalk.hex(C.orange)(val);
|
|
292
|
-
}).join(" ");
|
|
288
|
+
// Tool name
|
|
293
289
|
process.stdout.write(
|
|
294
|
-
chalk.hex(C.yellow)("├─ ") + chalk.hex(C.blue).bold(name) +
|
|
295
|
-
(argStr ? " " + argStr : "") + "\n"
|
|
290
|
+
chalk.hex(C.yellow)("├─ ") + chalk.hex(C.blue).bold(name) + "\n"
|
|
296
291
|
);
|
|
292
|
+
// Each arg on its own line, full value, no truncation
|
|
293
|
+
Object.entries(args).forEach(([k, v]) => {
|
|
294
|
+
const raw = String(v);
|
|
295
|
+
const lines = raw.split("\n");
|
|
296
|
+
process.stdout.write(
|
|
297
|
+
chalk.hex(C.dimmer)("│ ") +
|
|
298
|
+
chalk.hex(C.muted)(k + ": ") +
|
|
299
|
+
chalk.hex(C.orange)(lines[0]) + "\n"
|
|
300
|
+
);
|
|
301
|
+
// Multi-line values (e.g. file content passed as arg)
|
|
302
|
+
lines.slice(1).forEach(l =>
|
|
303
|
+
process.stdout.write(chalk.hex(C.dimmer)("│ ") + chalk.hex(C.orange)(l) + "\n")
|
|
304
|
+
);
|
|
305
|
+
});
|
|
297
306
|
}
|
|
298
307
|
|
|
299
308
|
export function printToolResult(result) {
|
|
300
|
-
const W = bw() - 5;
|
|
301
309
|
const isErr = typeof result === "object" && result.error;
|
|
302
310
|
const text = typeof result === "object"
|
|
303
311
|
? (result.result ?? result.error ?? JSON.stringify(result, null, 2))
|
|
304
312
|
: String(result);
|
|
305
313
|
const color = isErr ? chalk.hex(C.red) : chalk.hex(C.muted);
|
|
306
314
|
const border = chalk.hex(C.dimmer)("│ ");
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
process.stdout.write(border + color(l.length > W ? l.slice(0, W) + "…" : l) + "\n")
|
|
315
|
+
|
|
316
|
+
// Print ALL lines — no limit, no truncation
|
|
317
|
+
text.split("\n").forEach(l =>
|
|
318
|
+
process.stdout.write(border + color(l) + "\n")
|
|
312
319
|
);
|
|
313
|
-
if (extra > 0) process.stdout.write(border + chalk.hex(C.dim)(`… +${extra} more lines`) + "\n");
|
|
314
320
|
}
|
|
315
321
|
|
|
316
322
|
// ─────────────────────────────────────────────────────────────────
|