@leftium/gg 0.0.24 → 0.0.25
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/dist/eruda/plugin.js +7 -4
- package/package.json +1 -1
package/dist/eruda/plugin.js
CHANGED
|
@@ -419,17 +419,20 @@ export function createGgPlugin(options, gg) {
|
|
|
419
419
|
const entries = allEntries.filter((entry) => enabledNamespaces.has(entry.namespace));
|
|
420
420
|
const text = entries
|
|
421
421
|
.map((e) => {
|
|
422
|
-
|
|
423
|
-
|
|
422
|
+
// Extract just HH:MM:SS from timestamp (compact for LLMs)
|
|
423
|
+
const time = new Date(e.timestamp).toISOString().slice(11, 19);
|
|
424
|
+
// Trim namespace and strip 'gg:' prefix to save tokens
|
|
425
|
+
const ns = e.namespace.trim().replace(/^gg:/, '');
|
|
426
|
+
// Format args: compact JSON for objects, primitives as-is
|
|
424
427
|
const argsStr = e.args
|
|
425
428
|
.map((arg) => {
|
|
426
429
|
if (typeof arg === 'object' && arg !== null) {
|
|
427
|
-
return JSON.stringify(arg
|
|
430
|
+
return JSON.stringify(arg);
|
|
428
431
|
}
|
|
429
432
|
return String(arg);
|
|
430
433
|
})
|
|
431
434
|
.join(' ');
|
|
432
|
-
return
|
|
435
|
+
return `${time} ${ns} ${argsStr}`;
|
|
433
436
|
})
|
|
434
437
|
.join('\n');
|
|
435
438
|
try {
|