Skip to content

Commit 4ba13a8

Browse files
committed
fix: remove debug messages without HEAVY_DEBUG_MODE
1 parent 6a90610 commit 4ba13a8

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ export default class I18nPlugin extends AdminForthPlugin {
410410
// if optional `confirm` is provided, user will be asked to confirm action
411411
confirm: 'Are you sure you want to translate selected items?',
412412
allowed: async ({ resource, adminUser, selectedIds, allowedActions }) => {
413-
console.log('allowedActions', JSON.stringify(allowedActions));
413+
process.env.HEAVY_DEBUG && console.log('allowedActions', JSON.stringify(allowedActions));
414414
return allowedActions.edit;
415415
},
416416
action: async ({ selectedIds, tr }) => {
@@ -509,8 +509,7 @@ JSON.stringify(strings.reduce((acc: object, s: { en_string: string }): object =>
509509
prompt.length * 2,
510510
);
511511

512-
console.log(`🪲🔪LLM resp >> ${prompt.length}, <<${resp.content.length} :\n\n`, JSON.stringify(resp));
513-
512+
process.env.HEAVY_DEBUG && console.log(`🪲🔪LLM resp >> ${prompt.length}, <<${resp.content.length} :\n\n`, JSON.stringify(resp));
514513

515514
if (resp.error) {
516515
throw new AiTranslateError(resp.error);

0 commit comments

Comments
 (0)