orquesta-cli 0.2.76 → 0.2.78
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/ui/components/PlanExecuteApp.js +19 -1
- package/dist/utils/logger.js +87 -69
- package/package.json +1 -1
|
@@ -517,6 +517,24 @@ export const PlanExecuteApp = ({ llmClient: initialLlmClient, modelInfo, resumeL
|
|
|
517
517
|
await closeJsonStreamLogger();
|
|
518
518
|
exit();
|
|
519
519
|
}, [exit]);
|
|
520
|
+
const [resizeTick, setResizeTick] = useState(0);
|
|
521
|
+
useEffect(() => {
|
|
522
|
+
let timer = null;
|
|
523
|
+
const onResize = () => {
|
|
524
|
+
if (timer)
|
|
525
|
+
clearTimeout(timer);
|
|
526
|
+
timer = setTimeout(() => {
|
|
527
|
+
process.stdout.write('\x1b[2J\x1b[3J\x1b[H');
|
|
528
|
+
setResizeTick((t) => t + 1);
|
|
529
|
+
}, 150);
|
|
530
|
+
};
|
|
531
|
+
process.stdout.on('resize', onResize);
|
|
532
|
+
return () => {
|
|
533
|
+
if (timer)
|
|
534
|
+
clearTimeout(timer);
|
|
535
|
+
process.stdout.off('resize', onResize);
|
|
536
|
+
};
|
|
537
|
+
}, []);
|
|
520
538
|
useInput((inputChar, key) => {
|
|
521
539
|
if (key.ctrl && inputChar === 'c') {
|
|
522
540
|
const now = Date.now();
|
|
@@ -1440,7 +1458,7 @@ export const PlanExecuteApp = ({ llmClient: initialLlmClient, modelInfo, resumeL
|
|
|
1440
1458
|
}
|
|
1441
1459
|
};
|
|
1442
1460
|
return (React.createElement(Box, { flexDirection: "column", height: "100%" },
|
|
1443
|
-
React.createElement(Static, { items: logEntries }, (entry) => renderLogEntry(entry)),
|
|
1461
|
+
React.createElement(Static, { key: resizeTick, items: logEntries }, (entry) => renderLogEntry(entry)),
|
|
1444
1462
|
pendingToolApproval && (React.createElement(Box, { marginY: 1 },
|
|
1445
1463
|
React.createElement(ApprovalDialog, { toolName: pendingToolApproval.toolName, args: pendingToolApproval.args, reason: pendingToolApproval.reason, onResponse: handleApprovalResponse }))),
|
|
1446
1464
|
isProcessing && !pendingToolApproval && !isDocsSearching && (React.createElement(Box, { marginY: 1, flexDirection: "column" },
|
package/dist/utils/logger.js
CHANGED
|
@@ -19,6 +19,24 @@ export function disableLLMLog() {
|
|
|
19
19
|
export function isLLMLogEnabled() {
|
|
20
20
|
return llmLogEnabled;
|
|
21
21
|
}
|
|
22
|
+
function safeStringify(value, indent) {
|
|
23
|
+
const seen = new WeakSet();
|
|
24
|
+
try {
|
|
25
|
+
return JSON.stringify(value, (_key, v) => {
|
|
26
|
+
if (typeof v === 'object' && v !== null) {
|
|
27
|
+
if (seen.has(v))
|
|
28
|
+
return '[Circular]';
|
|
29
|
+
seen.add(v);
|
|
30
|
+
}
|
|
31
|
+
if (typeof v === 'bigint')
|
|
32
|
+
return v.toString();
|
|
33
|
+
return v;
|
|
34
|
+
}, indent) ?? String(value);
|
|
35
|
+
}
|
|
36
|
+
catch (e) {
|
|
37
|
+
return `[Unserializable: ${e instanceof Error ? e.message : String(e)}]`;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
22
40
|
export class Logger {
|
|
23
41
|
level;
|
|
24
42
|
prefix;
|
|
@@ -121,7 +139,7 @@ export class Logger {
|
|
|
121
139
|
if (value instanceof Error)
|
|
122
140
|
return `Error: ${value.message}`;
|
|
123
141
|
try {
|
|
124
|
-
const json =
|
|
142
|
+
const json = safeStringify(value);
|
|
125
143
|
return json.length > 100 ? json.slice(0, 100) + '...' : json;
|
|
126
144
|
}
|
|
127
145
|
catch {
|
|
@@ -153,7 +171,7 @@ export class Logger {
|
|
|
153
171
|
console.error(chalk.red(' Cause:'), error.cause);
|
|
154
172
|
}
|
|
155
173
|
if (error.details) {
|
|
156
|
-
console.error(chalk.yellow(' Details:'),
|
|
174
|
+
console.error(chalk.yellow(' Details:'), safeStringify(error.details, 2));
|
|
157
175
|
}
|
|
158
176
|
}
|
|
159
177
|
else {
|
|
@@ -176,7 +194,7 @@ export class Logger {
|
|
|
176
194
|
const loc = this.getLocation(location);
|
|
177
195
|
console.warn(timestamp, prefix, pid, traceId, loc, chalk.yellow('⚠️ WARN:'), message);
|
|
178
196
|
if (data) {
|
|
179
|
-
console.warn(chalk.yellow(' Data:'),
|
|
197
|
+
console.warn(chalk.yellow(' Data:'), safeStringify(data, 2));
|
|
180
198
|
}
|
|
181
199
|
}
|
|
182
200
|
info(message, data) {
|
|
@@ -194,7 +212,7 @@ export class Logger {
|
|
|
194
212
|
const loc = this.getLocation(location);
|
|
195
213
|
console.log(timestamp, prefix, pid, traceId, loc, chalk.blue('ℹ️ INFO:'), message);
|
|
196
214
|
if (data) {
|
|
197
|
-
console.log(chalk.blue(' Data:'),
|
|
215
|
+
console.log(chalk.blue(' Data:'), safeStringify(data, 2));
|
|
198
216
|
}
|
|
199
217
|
}
|
|
200
218
|
debug(message, data) {
|
|
@@ -212,7 +230,7 @@ export class Logger {
|
|
|
212
230
|
const loc = this.getLocation(location);
|
|
213
231
|
console.log(timestamp, prefix, pid, traceId, loc, chalk.magenta('🐛 DEBUG:'), message);
|
|
214
232
|
if (data) {
|
|
215
|
-
console.log(chalk.magenta(' Data:'),
|
|
233
|
+
console.log(chalk.magenta(' Data:'), safeStringify(data, 2));
|
|
216
234
|
}
|
|
217
235
|
}
|
|
218
236
|
verbose(message, data) {
|
|
@@ -230,7 +248,7 @@ export class Logger {
|
|
|
230
248
|
const loc = this.getLocation(location);
|
|
231
249
|
console.log(timestamp, prefix, pid, traceId, loc, chalk.gray('🔍 VERBOSE:'), message);
|
|
232
250
|
if (data) {
|
|
233
|
-
console.log(chalk.gray(' Data:'),
|
|
251
|
+
console.log(chalk.gray(' Data:'), safeStringify(data, 2));
|
|
234
252
|
}
|
|
235
253
|
}
|
|
236
254
|
flow(message, context) {
|
|
@@ -248,7 +266,7 @@ export class Logger {
|
|
|
248
266
|
const loc = this.getLocation(location);
|
|
249
267
|
console.log(timestamp, prefix, pid, traceId, loc, chalk.green('➜ FLOW:'), message);
|
|
250
268
|
if (context) {
|
|
251
|
-
console.log(chalk.green(' Context:'),
|
|
269
|
+
console.log(chalk.green(' Context:'), safeStringify(context, 2));
|
|
252
270
|
}
|
|
253
271
|
}
|
|
254
272
|
vars(...variables) {
|
|
@@ -288,7 +306,7 @@ export class Logger {
|
|
|
288
306
|
const loc = this.getLocation(location);
|
|
289
307
|
console.log(timestamp, prefix, pid, traceId, loc, chalk.green('↓ ENTER:'), chalk.bold(functionName));
|
|
290
308
|
if (args) {
|
|
291
|
-
console.log(chalk.green(' Args:'),
|
|
309
|
+
console.log(chalk.green(' Args:'), safeStringify(args, 2));
|
|
292
310
|
}
|
|
293
311
|
}
|
|
294
312
|
exit(functionName, result) {
|
|
@@ -380,7 +398,7 @@ export class Logger {
|
|
|
380
398
|
const loc = this.getLocation(location);
|
|
381
399
|
console.log(timestamp, prefix, pid, traceId, loc, chalk.cyan('→ HTTP REQUEST:'), chalk.bold(method), url);
|
|
382
400
|
if (body) {
|
|
383
|
-
console.log(chalk.cyan(' Body:'),
|
|
401
|
+
console.log(chalk.cyan(' Body:'), safeStringify(body, 2));
|
|
384
402
|
}
|
|
385
403
|
}
|
|
386
404
|
httpResponse(status, statusText, data) {
|
|
@@ -399,7 +417,7 @@ export class Logger {
|
|
|
399
417
|
const statusColor = status >= 400 ? chalk.red : status >= 300 ? chalk.yellow : chalk.green;
|
|
400
418
|
console.log(timestamp, prefix, pid, traceId, loc, chalk.cyan('← HTTP RESPONSE:'), statusColor(`${status} ${statusText}`));
|
|
401
419
|
if (data && this.level >= LogLevel.VERBOSE) {
|
|
402
|
-
console.log(chalk.cyan(' Data:'),
|
|
420
|
+
console.log(chalk.cyan(' Data:'), safeStringify(data, 2));
|
|
403
421
|
}
|
|
404
422
|
}
|
|
405
423
|
toolExecution(toolName, args, result, error) {
|
|
@@ -417,14 +435,14 @@ export class Logger {
|
|
|
417
435
|
const loc = this.getLocation(location);
|
|
418
436
|
if (error) {
|
|
419
437
|
console.log(timestamp, prefix, pid, traceId, loc, chalk.red('🔧 TOOL FAILED:'), chalk.bold(toolName));
|
|
420
|
-
console.log(chalk.red(' Args:'),
|
|
438
|
+
console.log(chalk.red(' Args:'), safeStringify(args, 2));
|
|
421
439
|
console.log(chalk.red(' Error:'), error.message);
|
|
422
440
|
}
|
|
423
441
|
else {
|
|
424
442
|
console.log(timestamp, prefix, pid, traceId, loc, chalk.green('🔧 TOOL SUCCESS:'), chalk.bold(toolName));
|
|
425
|
-
console.log(chalk.green(' Args:'),
|
|
443
|
+
console.log(chalk.green(' Args:'), safeStringify(args, 2));
|
|
426
444
|
if (result && this.level >= LogLevel.VERBOSE) {
|
|
427
|
-
console.log(chalk.green(' Result:'),
|
|
445
|
+
console.log(chalk.green(' Result:'), safeStringify(result, 2));
|
|
428
446
|
}
|
|
429
447
|
}
|
|
430
448
|
}
|
|
@@ -509,7 +527,7 @@ export class Logger {
|
|
|
509
527
|
console.log(chalk.yellow(` - ${tc.function?.name}:`));
|
|
510
528
|
try {
|
|
511
529
|
const args = JSON.parse(tc.function?.arguments || '{}');
|
|
512
|
-
console.log(chalk.gray(
|
|
530
|
+
console.log(chalk.gray(safeStringify(args, 2)));
|
|
513
531
|
}
|
|
514
532
|
catch {
|
|
515
533
|
console.log(chalk.gray(tc.function?.arguments || '(no arguments)'));
|
|
@@ -574,7 +592,7 @@ export class Logger {
|
|
|
574
592
|
console.log(timestamp, prefix, pid, traceId, loc, chalk.cyan('⇢ HTTP STREAM START:'), chalk.bold(method), url);
|
|
575
593
|
}
|
|
576
594
|
httpStreamChunk(data) {
|
|
577
|
-
const chunkSize = typeof data === 'string' ? data.length :
|
|
595
|
+
const chunkSize = typeof data === 'string' ? data.length : safeStringify(data).length;
|
|
578
596
|
const jsonLogger = getJsonStreamLogger();
|
|
579
597
|
if (jsonLogger?.isActive()) {
|
|
580
598
|
jsonLogger.logDebug('[HTTP] Stream Chunk', { bytes: chunkSize });
|
|
@@ -622,7 +640,7 @@ export class Logger {
|
|
|
622
640
|
console.log(chalk.blue(' Reason:'), reason);
|
|
623
641
|
}
|
|
624
642
|
if (args && this.level >= LogLevel.VERBOSE) {
|
|
625
|
-
console.log(chalk.blue(' Args:'),
|
|
643
|
+
console.log(chalk.blue(' Args:'), safeStringify(args, 2));
|
|
626
644
|
}
|
|
627
645
|
}
|
|
628
646
|
toolSuccess(name, _args, result, duration) {
|
|
@@ -659,7 +677,7 @@ export class Logger {
|
|
|
659
677
|
console.log(timestamp, prefix, pid, traceId, loc, chalk.red('✗ TOOL ERROR:'), chalk.bold(name), chalk.dim(`(${duration}ms)`));
|
|
660
678
|
console.log(chalk.red(' Error:'), error.message);
|
|
661
679
|
if (args) {
|
|
662
|
-
console.log(chalk.red(' Args:'),
|
|
680
|
+
console.log(chalk.red(' Args:'), safeStringify(args, 2));
|
|
663
681
|
}
|
|
664
682
|
}
|
|
665
683
|
userClick(element, context) {
|
|
@@ -675,7 +693,7 @@ export class Logger {
|
|
|
675
693
|
const loc = this.getLocation(location);
|
|
676
694
|
console.log(timestamp, prefix, loc, chalk.yellow('👆 USER CLICK:'), element);
|
|
677
695
|
if (Object.keys(context).length > 0) {
|
|
678
|
-
console.log(chalk.yellow(' Context:'),
|
|
696
|
+
console.log(chalk.yellow(' Context:'), safeStringify(context, 2));
|
|
679
697
|
}
|
|
680
698
|
}
|
|
681
699
|
userKeyboard(type, context) {
|
|
@@ -691,7 +709,7 @@ export class Logger {
|
|
|
691
709
|
const loc = this.getLocation(location);
|
|
692
710
|
console.log(timestamp, prefix, loc, chalk.yellow('⌨️ USER KEYBOARD:'), type);
|
|
693
711
|
if (Object.keys(context).length > 0) {
|
|
694
|
-
console.log(chalk.yellow(' Context:'),
|
|
712
|
+
console.log(chalk.yellow(' Context:'), safeStringify(context, 2));
|
|
695
713
|
}
|
|
696
714
|
}
|
|
697
715
|
userScroll(context) {
|
|
@@ -707,7 +725,7 @@ export class Logger {
|
|
|
707
725
|
const loc = this.getLocation(location);
|
|
708
726
|
console.log(timestamp, prefix, loc, chalk.gray('📜 USER SCROLL'));
|
|
709
727
|
if (Object.keys(context).length > 0) {
|
|
710
|
-
console.log(chalk.gray(' Context:'),
|
|
728
|
+
console.log(chalk.gray(' Context:'), safeStringify(context, 2));
|
|
711
729
|
}
|
|
712
730
|
}
|
|
713
731
|
userDragStart(element, context) {
|
|
@@ -723,7 +741,7 @@ export class Logger {
|
|
|
723
741
|
const loc = this.getLocation(location);
|
|
724
742
|
console.log(timestamp, prefix, loc, chalk.yellow('🖱️ USER DRAG START:'), element);
|
|
725
743
|
if (Object.keys(context).length > 0) {
|
|
726
|
-
console.log(chalk.yellow(' Context:'),
|
|
744
|
+
console.log(chalk.yellow(' Context:'), safeStringify(context, 2));
|
|
727
745
|
}
|
|
728
746
|
}
|
|
729
747
|
userDragEnd(element, context) {
|
|
@@ -739,7 +757,7 @@ export class Logger {
|
|
|
739
757
|
const loc = this.getLocation(location);
|
|
740
758
|
console.log(timestamp, prefix, loc, chalk.yellow('🖱️ USER DRAG END:'), element);
|
|
741
759
|
if (Object.keys(context).length > 0) {
|
|
742
|
-
console.log(chalk.yellow(' Context:'),
|
|
760
|
+
console.log(chalk.yellow(' Context:'), safeStringify(context, 2));
|
|
743
761
|
}
|
|
744
762
|
}
|
|
745
763
|
componentMount(name, context) {
|
|
@@ -755,7 +773,7 @@ export class Logger {
|
|
|
755
773
|
const loc = this.getLocation(location);
|
|
756
774
|
console.log(timestamp, prefix, loc, chalk.green('📦 COMPONENT MOUNT:'), name);
|
|
757
775
|
if (Object.keys(context).length > 0) {
|
|
758
|
-
console.log(chalk.green(' Context:'),
|
|
776
|
+
console.log(chalk.green(' Context:'), safeStringify(context, 2));
|
|
759
777
|
}
|
|
760
778
|
}
|
|
761
779
|
componentUnmount(name, context) {
|
|
@@ -771,7 +789,7 @@ export class Logger {
|
|
|
771
789
|
const loc = this.getLocation(location);
|
|
772
790
|
console.log(timestamp, prefix, loc, chalk.red('📦 COMPONENT UNMOUNT:'), name);
|
|
773
791
|
if (Object.keys(context).length > 0) {
|
|
774
|
-
console.log(chalk.red(' Context:'),
|
|
792
|
+
console.log(chalk.red(' Context:'), safeStringify(context, 2));
|
|
775
793
|
}
|
|
776
794
|
}
|
|
777
795
|
componentRender(name, context) {
|
|
@@ -787,7 +805,7 @@ export class Logger {
|
|
|
787
805
|
const loc = this.getLocation(location);
|
|
788
806
|
console.log(timestamp, prefix, loc, chalk.blue('📦 COMPONENT RENDER:'), name);
|
|
789
807
|
if (Object.keys(context).length > 0) {
|
|
790
|
-
console.log(chalk.blue(' Context:'),
|
|
808
|
+
console.log(chalk.blue(' Context:'), safeStringify(context, 2));
|
|
791
809
|
}
|
|
792
810
|
}
|
|
793
811
|
componentRenderComplete(name, context) {
|
|
@@ -803,7 +821,7 @@ export class Logger {
|
|
|
803
821
|
const loc = this.getLocation(location);
|
|
804
822
|
console.log(timestamp, prefix, loc, chalk.green('✓ COMPONENT RENDER COMPLETE:'), name);
|
|
805
823
|
if (Object.keys(context).length > 0) {
|
|
806
|
-
console.log(chalk.green(' Context:'),
|
|
824
|
+
console.log(chalk.green(' Context:'), safeStringify(context, 2));
|
|
807
825
|
}
|
|
808
826
|
}
|
|
809
827
|
componentStateChange(name, field, context) {
|
|
@@ -819,7 +837,7 @@ export class Logger {
|
|
|
819
837
|
const loc = this.getLocation(location);
|
|
820
838
|
console.log(timestamp, prefix, loc, chalk.yellow('🔄 COMPONENT STATE:'), `${name}.${field}`);
|
|
821
839
|
if (Object.keys(context).length > 0) {
|
|
822
|
-
console.log(chalk.yellow(' Context:'),
|
|
840
|
+
console.log(chalk.yellow(' Context:'), safeStringify(context, 2));
|
|
823
841
|
}
|
|
824
842
|
}
|
|
825
843
|
screenChange(to, context) {
|
|
@@ -835,7 +853,7 @@ export class Logger {
|
|
|
835
853
|
const loc = this.getLocation(location);
|
|
836
854
|
console.log(timestamp, prefix, loc, chalk.magenta('📱 SCREEN CHANGE:'), to);
|
|
837
855
|
if (Object.keys(context).length > 0) {
|
|
838
|
-
console.log(chalk.magenta(' Context:'),
|
|
856
|
+
console.log(chalk.magenta(' Context:'), safeStringify(context, 2));
|
|
839
857
|
}
|
|
840
858
|
}
|
|
841
859
|
tabChange(container, context) {
|
|
@@ -851,7 +869,7 @@ export class Logger {
|
|
|
851
869
|
const loc = this.getLocation(location);
|
|
852
870
|
console.log(timestamp, prefix, loc, chalk.magenta('🗂️ TAB CHANGE:'), container);
|
|
853
871
|
if (Object.keys(context).length > 0) {
|
|
854
|
-
console.log(chalk.magenta(' Context:'),
|
|
872
|
+
console.log(chalk.magenta(' Context:'), safeStringify(context, 2));
|
|
855
873
|
}
|
|
856
874
|
}
|
|
857
875
|
routeChange(context) {
|
|
@@ -867,7 +885,7 @@ export class Logger {
|
|
|
867
885
|
const loc = this.getLocation(location);
|
|
868
886
|
console.log(timestamp, prefix, loc, chalk.magenta('🛤️ ROUTE CHANGE'));
|
|
869
887
|
if (Object.keys(context).length > 0) {
|
|
870
|
-
console.log(chalk.magenta(' Context:'),
|
|
888
|
+
console.log(chalk.magenta(' Context:'), safeStringify(context, 2));
|
|
871
889
|
}
|
|
872
890
|
}
|
|
873
891
|
formStart(formId, context) {
|
|
@@ -883,7 +901,7 @@ export class Logger {
|
|
|
883
901
|
const loc = this.getLocation(location);
|
|
884
902
|
console.log(timestamp, prefix, loc, chalk.blue('📝 FORM START:'), formId);
|
|
885
903
|
if (Object.keys(context).length > 0) {
|
|
886
|
-
console.log(chalk.blue(' Context:'),
|
|
904
|
+
console.log(chalk.blue(' Context:'), safeStringify(context, 2));
|
|
887
905
|
}
|
|
888
906
|
}
|
|
889
907
|
formSubmit(formId, context) {
|
|
@@ -899,7 +917,7 @@ export class Logger {
|
|
|
899
917
|
const loc = this.getLocation(location);
|
|
900
918
|
console.log(timestamp, prefix, loc, chalk.blue('📤 FORM SUBMIT:'), formId);
|
|
901
919
|
if (Object.keys(context).length > 0) {
|
|
902
|
-
console.log(chalk.blue(' Context:'),
|
|
920
|
+
console.log(chalk.blue(' Context:'), safeStringify(context, 2));
|
|
903
921
|
}
|
|
904
922
|
}
|
|
905
923
|
formResult(formId, context) {
|
|
@@ -915,7 +933,7 @@ export class Logger {
|
|
|
915
933
|
const loc = this.getLocation(location);
|
|
916
934
|
console.log(timestamp, prefix, loc, chalk.green('✓ FORM RESULT:'), formId);
|
|
917
935
|
if (Object.keys(context).length > 0) {
|
|
918
|
-
console.log(chalk.green(' Context:'),
|
|
936
|
+
console.log(chalk.green(' Context:'), safeStringify(context, 2));
|
|
919
937
|
}
|
|
920
938
|
}
|
|
921
939
|
formError(formId, context) {
|
|
@@ -931,7 +949,7 @@ export class Logger {
|
|
|
931
949
|
const loc = this.getLocation(location);
|
|
932
950
|
console.log(timestamp, prefix, loc, chalk.red('✗ FORM ERROR:'), formId);
|
|
933
951
|
if (Object.keys(context).length > 0) {
|
|
934
|
-
console.log(chalk.red(' Context:'),
|
|
952
|
+
console.log(chalk.red(' Context:'), safeStringify(context, 2));
|
|
935
953
|
}
|
|
936
954
|
}
|
|
937
955
|
fieldChange(formId, field, context) {
|
|
@@ -947,7 +965,7 @@ export class Logger {
|
|
|
947
965
|
const loc = this.getLocation(location);
|
|
948
966
|
console.log(timestamp, prefix, loc, chalk.gray('📝 FIELD CHANGE:'), `${formId}.${field}`);
|
|
949
967
|
if (Object.keys(context).length > 0) {
|
|
950
|
-
console.log(chalk.gray(' Context:'),
|
|
968
|
+
console.log(chalk.gray(' Context:'), safeStringify(context, 2));
|
|
951
969
|
}
|
|
952
970
|
}
|
|
953
971
|
fieldValidation(formId, field, context) {
|
|
@@ -963,7 +981,7 @@ export class Logger {
|
|
|
963
981
|
const loc = this.getLocation(location);
|
|
964
982
|
console.log(timestamp, prefix, loc, chalk.yellow('✓ FIELD VALIDATION:'), `${formId}.${field}`);
|
|
965
983
|
if (Object.keys(context).length > 0) {
|
|
966
|
-
console.log(chalk.yellow(' Context:'),
|
|
984
|
+
console.log(chalk.yellow(' Context:'), safeStringify(context, 2));
|
|
967
985
|
}
|
|
968
986
|
}
|
|
969
987
|
modalOpen(id, context) {
|
|
@@ -979,7 +997,7 @@ export class Logger {
|
|
|
979
997
|
const loc = this.getLocation(location);
|
|
980
998
|
console.log(timestamp, prefix, loc, chalk.cyan('📭 MODAL OPEN:'), id);
|
|
981
999
|
if (Object.keys(context).length > 0) {
|
|
982
|
-
console.log(chalk.cyan(' Context:'),
|
|
1000
|
+
console.log(chalk.cyan(' Context:'), safeStringify(context, 2));
|
|
983
1001
|
}
|
|
984
1002
|
}
|
|
985
1003
|
modalClose(id, context) {
|
|
@@ -995,7 +1013,7 @@ export class Logger {
|
|
|
995
1013
|
const loc = this.getLocation(location);
|
|
996
1014
|
console.log(timestamp, prefix, loc, chalk.cyan('📪 MODAL CLOSE:'), id);
|
|
997
1015
|
if (Object.keys(context).length > 0) {
|
|
998
|
-
console.log(chalk.cyan(' Context:'),
|
|
1016
|
+
console.log(chalk.cyan(' Context:'), safeStringify(context, 2));
|
|
999
1017
|
}
|
|
1000
1018
|
}
|
|
1001
1019
|
dialogShow(type, context) {
|
|
@@ -1011,7 +1029,7 @@ export class Logger {
|
|
|
1011
1029
|
const loc = this.getLocation(location);
|
|
1012
1030
|
console.log(timestamp, prefix, loc, chalk.cyan('💬 DIALOG SHOW:'), type);
|
|
1013
1031
|
if (Object.keys(context).length > 0) {
|
|
1014
|
-
console.log(chalk.cyan(' Context:'),
|
|
1032
|
+
console.log(chalk.cyan(' Context:'), safeStringify(context, 2));
|
|
1015
1033
|
}
|
|
1016
1034
|
}
|
|
1017
1035
|
dialogResult(type, context) {
|
|
@@ -1027,7 +1045,7 @@ export class Logger {
|
|
|
1027
1045
|
const loc = this.getLocation(location);
|
|
1028
1046
|
console.log(timestamp, prefix, loc, chalk.cyan('💬 DIALOG RESULT:'), type);
|
|
1029
1047
|
if (Object.keys(context).length > 0) {
|
|
1030
|
-
console.log(chalk.cyan(' Context:'),
|
|
1048
|
+
console.log(chalk.cyan(' Context:'), safeStringify(context, 2));
|
|
1031
1049
|
}
|
|
1032
1050
|
}
|
|
1033
1051
|
toastShow(context) {
|
|
@@ -1043,7 +1061,7 @@ export class Logger {
|
|
|
1043
1061
|
const loc = this.getLocation(location);
|
|
1044
1062
|
console.log(timestamp, prefix, loc, chalk.yellow('🔔 TOAST SHOW'));
|
|
1045
1063
|
if (Object.keys(context).length > 0) {
|
|
1046
|
-
console.log(chalk.yellow(' Context:'),
|
|
1064
|
+
console.log(chalk.yellow(' Context:'), safeStringify(context, 2));
|
|
1047
1065
|
}
|
|
1048
1066
|
}
|
|
1049
1067
|
toastDismiss(context) {
|
|
@@ -1059,7 +1077,7 @@ export class Logger {
|
|
|
1059
1077
|
const loc = this.getLocation(location);
|
|
1060
1078
|
console.log(timestamp, prefix, loc, chalk.gray('🔕 TOAST DISMISS'));
|
|
1061
1079
|
if (Object.keys(context).length > 0) {
|
|
1062
|
-
console.log(chalk.gray(' Context:'),
|
|
1080
|
+
console.log(chalk.gray(' Context:'), safeStringify(context, 2));
|
|
1063
1081
|
}
|
|
1064
1082
|
}
|
|
1065
1083
|
loadingStart(id, context) {
|
|
@@ -1075,7 +1093,7 @@ export class Logger {
|
|
|
1075
1093
|
const loc = this.getLocation(location);
|
|
1076
1094
|
console.log(timestamp, prefix, loc, chalk.blue('⏳ LOADING START:'), id);
|
|
1077
1095
|
if (Object.keys(context).length > 0) {
|
|
1078
|
-
console.log(chalk.blue(' Context:'),
|
|
1096
|
+
console.log(chalk.blue(' Context:'), safeStringify(context, 2));
|
|
1079
1097
|
}
|
|
1080
1098
|
}
|
|
1081
1099
|
loadingEnd(id, context) {
|
|
@@ -1091,7 +1109,7 @@ export class Logger {
|
|
|
1091
1109
|
const loc = this.getLocation(location);
|
|
1092
1110
|
console.log(timestamp, prefix, loc, chalk.green('✓ LOADING END:'), id);
|
|
1093
1111
|
if (Object.keys(context).length > 0) {
|
|
1094
|
-
console.log(chalk.green(' Context:'),
|
|
1112
|
+
console.log(chalk.green(' Context:'), safeStringify(context, 2));
|
|
1095
1113
|
}
|
|
1096
1114
|
}
|
|
1097
1115
|
loadingError(id, context) {
|
|
@@ -1107,7 +1125,7 @@ export class Logger {
|
|
|
1107
1125
|
const loc = this.getLocation(location);
|
|
1108
1126
|
console.log(timestamp, prefix, loc, chalk.red('✗ LOADING ERROR:'), id);
|
|
1109
1127
|
if (Object.keys(context).length > 0) {
|
|
1110
|
-
console.log(chalk.red(' Context:'),
|
|
1128
|
+
console.log(chalk.red(' Context:'), safeStringify(context, 2));
|
|
1111
1129
|
}
|
|
1112
1130
|
}
|
|
1113
1131
|
skeletonShow(id, context) {
|
|
@@ -1123,7 +1141,7 @@ export class Logger {
|
|
|
1123
1141
|
const loc = this.getLocation(location);
|
|
1124
1142
|
console.log(timestamp, prefix, loc, chalk.gray('💀 SKELETON SHOW:'), id);
|
|
1125
1143
|
if (Object.keys(context).length > 0) {
|
|
1126
|
-
console.log(chalk.gray(' Context:'),
|
|
1144
|
+
console.log(chalk.gray(' Context:'), safeStringify(context, 2));
|
|
1127
1145
|
}
|
|
1128
1146
|
}
|
|
1129
1147
|
skeletonHide(id, context) {
|
|
@@ -1139,7 +1157,7 @@ export class Logger {
|
|
|
1139
1157
|
const loc = this.getLocation(location);
|
|
1140
1158
|
console.log(timestamp, prefix, loc, chalk.gray('💀 SKELETON HIDE:'), id);
|
|
1141
1159
|
if (Object.keys(context).length > 0) {
|
|
1142
|
-
console.log(chalk.gray(' Context:'),
|
|
1160
|
+
console.log(chalk.gray(' Context:'), safeStringify(context, 2));
|
|
1143
1161
|
}
|
|
1144
1162
|
}
|
|
1145
1163
|
progressStart(id, context) {
|
|
@@ -1155,7 +1173,7 @@ export class Logger {
|
|
|
1155
1173
|
const loc = this.getLocation(location);
|
|
1156
1174
|
console.log(timestamp, prefix, loc, chalk.blue('📊 PROGRESS START:'), id);
|
|
1157
1175
|
if (Object.keys(context).length > 0) {
|
|
1158
|
-
console.log(chalk.blue(' Context:'),
|
|
1176
|
+
console.log(chalk.blue(' Context:'), safeStringify(context, 2));
|
|
1159
1177
|
}
|
|
1160
1178
|
}
|
|
1161
1179
|
progressUpdate(id, context) {
|
|
@@ -1171,7 +1189,7 @@ export class Logger {
|
|
|
1171
1189
|
const loc = this.getLocation(location);
|
|
1172
1190
|
console.log(timestamp, prefix, loc, chalk.blue('📊 PROGRESS UPDATE:'), id);
|
|
1173
1191
|
if (Object.keys(context).length > 0) {
|
|
1174
|
-
console.log(chalk.blue(' Context:'),
|
|
1192
|
+
console.log(chalk.blue(' Context:'), safeStringify(context, 2));
|
|
1175
1193
|
}
|
|
1176
1194
|
}
|
|
1177
1195
|
progressComplete(id, context) {
|
|
@@ -1187,7 +1205,7 @@ export class Logger {
|
|
|
1187
1205
|
const loc = this.getLocation(location);
|
|
1188
1206
|
console.log(timestamp, prefix, loc, chalk.green('✓ PROGRESS COMPLETE:'), id);
|
|
1189
1207
|
if (Object.keys(context).length > 0) {
|
|
1190
|
-
console.log(chalk.green(' Context:'),
|
|
1208
|
+
console.log(chalk.green(' Context:'), safeStringify(context, 2));
|
|
1191
1209
|
}
|
|
1192
1210
|
}
|
|
1193
1211
|
progressError(id, context) {
|
|
@@ -1203,7 +1221,7 @@ export class Logger {
|
|
|
1203
1221
|
const loc = this.getLocation(location);
|
|
1204
1222
|
console.log(timestamp, prefix, loc, chalk.red('✗ PROGRESS ERROR:'), id);
|
|
1205
1223
|
if (Object.keys(context).length > 0) {
|
|
1206
|
-
console.log(chalk.red(' Context:'),
|
|
1224
|
+
console.log(chalk.red(' Context:'), safeStringify(context, 2));
|
|
1207
1225
|
}
|
|
1208
1226
|
}
|
|
1209
1227
|
animationStart(name, context) {
|
|
@@ -1219,7 +1237,7 @@ export class Logger {
|
|
|
1219
1237
|
const loc = this.getLocation(location);
|
|
1220
1238
|
console.log(timestamp, prefix, loc, chalk.magenta('🎬 ANIMATION START:'), name);
|
|
1221
1239
|
if (Object.keys(context).length > 0) {
|
|
1222
|
-
console.log(chalk.magenta(' Context:'),
|
|
1240
|
+
console.log(chalk.magenta(' Context:'), safeStringify(context, 2));
|
|
1223
1241
|
}
|
|
1224
1242
|
}
|
|
1225
1243
|
animationEnd(name, context) {
|
|
@@ -1235,7 +1253,7 @@ export class Logger {
|
|
|
1235
1253
|
const loc = this.getLocation(location);
|
|
1236
1254
|
console.log(timestamp, prefix, loc, chalk.magenta('🎬 ANIMATION END:'), name);
|
|
1237
1255
|
if (Object.keys(context).length > 0) {
|
|
1238
|
-
console.log(chalk.magenta(' Context:'),
|
|
1256
|
+
console.log(chalk.magenta(' Context:'), safeStringify(context, 2));
|
|
1239
1257
|
}
|
|
1240
1258
|
}
|
|
1241
1259
|
transitionStart(name, context) {
|
|
@@ -1251,7 +1269,7 @@ export class Logger {
|
|
|
1251
1269
|
const loc = this.getLocation(location);
|
|
1252
1270
|
console.log(timestamp, prefix, loc, chalk.magenta('🔀 TRANSITION START:'), name);
|
|
1253
1271
|
if (Object.keys(context).length > 0) {
|
|
1254
|
-
console.log(chalk.magenta(' Context:'),
|
|
1272
|
+
console.log(chalk.magenta(' Context:'), safeStringify(context, 2));
|
|
1255
1273
|
}
|
|
1256
1274
|
}
|
|
1257
1275
|
transitionEnd(name, context) {
|
|
@@ -1267,7 +1285,7 @@ export class Logger {
|
|
|
1267
1285
|
const loc = this.getLocation(location);
|
|
1268
1286
|
console.log(timestamp, prefix, loc, chalk.magenta('🔀 TRANSITION END:'), name);
|
|
1269
1287
|
if (Object.keys(context).length > 0) {
|
|
1270
|
-
console.log(chalk.magenta(' Context:'),
|
|
1288
|
+
console.log(chalk.magenta(' Context:'), safeStringify(context, 2));
|
|
1271
1289
|
}
|
|
1272
1290
|
}
|
|
1273
1291
|
hoverEnter(element, context) {
|
|
@@ -1283,7 +1301,7 @@ export class Logger {
|
|
|
1283
1301
|
const loc = this.getLocation(location);
|
|
1284
1302
|
console.log(timestamp, prefix, loc, chalk.gray('🖱️ HOVER ENTER:'), element);
|
|
1285
1303
|
if (Object.keys(context).length > 0) {
|
|
1286
|
-
console.log(chalk.gray(' Context:'),
|
|
1304
|
+
console.log(chalk.gray(' Context:'), safeStringify(context, 2));
|
|
1287
1305
|
}
|
|
1288
1306
|
}
|
|
1289
1307
|
hoverLeave(element, context) {
|
|
@@ -1299,7 +1317,7 @@ export class Logger {
|
|
|
1299
1317
|
const loc = this.getLocation(location);
|
|
1300
1318
|
console.log(timestamp, prefix, loc, chalk.gray('🖱️ HOVER LEAVE:'), element);
|
|
1301
1319
|
if (Object.keys(context).length > 0) {
|
|
1302
|
-
console.log(chalk.gray(' Context:'),
|
|
1320
|
+
console.log(chalk.gray(' Context:'), safeStringify(context, 2));
|
|
1303
1321
|
}
|
|
1304
1322
|
}
|
|
1305
1323
|
viewportResize(context) {
|
|
@@ -1315,7 +1333,7 @@ export class Logger {
|
|
|
1315
1333
|
const loc = this.getLocation(location);
|
|
1316
1334
|
console.log(timestamp, prefix, loc, chalk.blue('📐 VIEWPORT RESIZE'));
|
|
1317
1335
|
if (Object.keys(context).length > 0) {
|
|
1318
|
-
console.log(chalk.blue(' Context:'),
|
|
1336
|
+
console.log(chalk.blue(' Context:'), safeStringify(context, 2));
|
|
1319
1337
|
}
|
|
1320
1338
|
}
|
|
1321
1339
|
breakpointChange(context) {
|
|
@@ -1331,7 +1349,7 @@ export class Logger {
|
|
|
1331
1349
|
const loc = this.getLocation(location);
|
|
1332
1350
|
console.log(timestamp, prefix, loc, chalk.blue('📐 BREAKPOINT CHANGE'));
|
|
1333
1351
|
if (Object.keys(context).length > 0) {
|
|
1334
|
-
console.log(chalk.blue(' Context:'),
|
|
1352
|
+
console.log(chalk.blue(' Context:'), safeStringify(context, 2));
|
|
1335
1353
|
}
|
|
1336
1354
|
}
|
|
1337
1355
|
layoutShift(context) {
|
|
@@ -1347,7 +1365,7 @@ export class Logger {
|
|
|
1347
1365
|
const loc = this.getLocation(location);
|
|
1348
1366
|
console.log(timestamp, prefix, loc, chalk.yellow('📐 LAYOUT SHIFT'));
|
|
1349
1367
|
if (Object.keys(context).length > 0) {
|
|
1350
|
-
console.log(chalk.yellow(' Context:'),
|
|
1368
|
+
console.log(chalk.yellow(' Context:'), safeStringify(context, 2));
|
|
1351
1369
|
}
|
|
1352
1370
|
}
|
|
1353
1371
|
scrollPosition(context) {
|
|
@@ -1363,7 +1381,7 @@ export class Logger {
|
|
|
1363
1381
|
const loc = this.getLocation(location);
|
|
1364
1382
|
console.log(timestamp, prefix, loc, chalk.gray('📜 SCROLL POSITION'));
|
|
1365
1383
|
if (Object.keys(context).length > 0) {
|
|
1366
|
-
console.log(chalk.gray(' Context:'),
|
|
1384
|
+
console.log(chalk.gray(' Context:'), safeStringify(context, 2));
|
|
1367
1385
|
}
|
|
1368
1386
|
}
|
|
1369
1387
|
errorBoundary(context) {
|
|
@@ -1379,7 +1397,7 @@ export class Logger {
|
|
|
1379
1397
|
const loc = this.getLocation(location);
|
|
1380
1398
|
console.log(timestamp, prefix, loc, chalk.red('🛡️ ERROR BOUNDARY'));
|
|
1381
1399
|
if (Object.keys(context).length > 0) {
|
|
1382
|
-
console.log(chalk.red(' Context:'),
|
|
1400
|
+
console.log(chalk.red(' Context:'), safeStringify(context, 2));
|
|
1383
1401
|
}
|
|
1384
1402
|
}
|
|
1385
1403
|
unhandledRejection(context) {
|
|
@@ -1395,7 +1413,7 @@ export class Logger {
|
|
|
1395
1413
|
const loc = this.getLocation(location);
|
|
1396
1414
|
console.log(timestamp, prefix, loc, chalk.red('⚠️ UNHANDLED REJECTION'));
|
|
1397
1415
|
if (Object.keys(context).length > 0) {
|
|
1398
|
-
console.log(chalk.red(' Context:'),
|
|
1416
|
+
console.log(chalk.red(' Context:'), safeStringify(context, 2));
|
|
1399
1417
|
}
|
|
1400
1418
|
}
|
|
1401
1419
|
globalError(context) {
|
|
@@ -1411,7 +1429,7 @@ export class Logger {
|
|
|
1411
1429
|
const loc = this.getLocation(location);
|
|
1412
1430
|
console.log(timestamp, prefix, loc, chalk.red('💥 GLOBAL ERROR'));
|
|
1413
1431
|
if (Object.keys(context).length > 0) {
|
|
1414
|
-
console.log(chalk.red(' Context:'),
|
|
1432
|
+
console.log(chalk.red(' Context:'), safeStringify(context, 2));
|
|
1415
1433
|
}
|
|
1416
1434
|
}
|
|
1417
1435
|
sessionStart(context) {
|
|
@@ -1427,7 +1445,7 @@ export class Logger {
|
|
|
1427
1445
|
const loc = this.getLocation(location);
|
|
1428
1446
|
console.log(timestamp, prefix, loc, chalk.green('🚀 SESSION START'));
|
|
1429
1447
|
if (Object.keys(context).length > 0) {
|
|
1430
|
-
console.log(chalk.green(' Context:'),
|
|
1448
|
+
console.log(chalk.green(' Context:'), safeStringify(context, 2));
|
|
1431
1449
|
}
|
|
1432
1450
|
}
|
|
1433
1451
|
sessionEnd(context) {
|
|
@@ -1443,7 +1461,7 @@ export class Logger {
|
|
|
1443
1461
|
const loc = this.getLocation(location);
|
|
1444
1462
|
console.log(timestamp, prefix, loc, chalk.red('🏁 SESSION END'));
|
|
1445
1463
|
if (Object.keys(context).length > 0) {
|
|
1446
|
-
console.log(chalk.red(' Context:'),
|
|
1464
|
+
console.log(chalk.red(' Context:'), safeStringify(context, 2));
|
|
1447
1465
|
}
|
|
1448
1466
|
}
|
|
1449
1467
|
userMilestone(name, context) {
|
|
@@ -1459,7 +1477,7 @@ export class Logger {
|
|
|
1459
1477
|
const loc = this.getLocation(location);
|
|
1460
1478
|
console.log(timestamp, prefix, loc, chalk.yellow('🏆 USER MILESTONE:'), name);
|
|
1461
1479
|
if (Object.keys(context).length > 0) {
|
|
1462
|
-
console.log(chalk.yellow(' Context:'),
|
|
1480
|
+
console.log(chalk.yellow(' Context:'), safeStringify(context, 2));
|
|
1463
1481
|
}
|
|
1464
1482
|
}
|
|
1465
1483
|
featureUsage(name, context) {
|
|
@@ -1475,7 +1493,7 @@ export class Logger {
|
|
|
1475
1493
|
const loc = this.getLocation(location);
|
|
1476
1494
|
console.log(timestamp, prefix, loc, chalk.cyan('📊 FEATURE USAGE:'), name);
|
|
1477
1495
|
if (Object.keys(context).length > 0) {
|
|
1478
|
-
console.log(chalk.cyan(' Context:'),
|
|
1496
|
+
console.log(chalk.cyan(' Context:'), safeStringify(context, 2));
|
|
1479
1497
|
}
|
|
1480
1498
|
}
|
|
1481
1499
|
updateCheckStart() {
|
|
@@ -1520,7 +1538,7 @@ export class Logger {
|
|
|
1520
1538
|
const loc = this.getLocation(location);
|
|
1521
1539
|
console.log(timestamp, prefix, loc, chalk.cyan('⬇️ UPDATE DOWNLOAD START'));
|
|
1522
1540
|
if (Object.keys(context).length > 0) {
|
|
1523
|
-
console.log(chalk.cyan(' Context:'),
|
|
1541
|
+
console.log(chalk.cyan(' Context:'), safeStringify(context, 2));
|
|
1524
1542
|
}
|
|
1525
1543
|
}
|
|
1526
1544
|
updateDownloadProgress(context) {
|