Skip to content

Commit 490b50f

Browse files
committed
refactor(code-interpreter): improve code quality and fix issues
- Extract getMimeType to shared utility to reduce code duplication - Fix security issue: escape single quotes in E2B driver env variable injection - Add CodeInterpreterTool to ToolProviderService for consistency - Create buildExecutionState helper to reduce duplicated state object construction - Add DEFAULT_CODE_INTERPRETER_TIMEOUT_MS constant - Fix lingui warning by extracting filename variable - Fix TypeScript errors: use theme.background.transparent.success/danger - Remove trailing empty lines from new files
1 parent 0ed5dce commit 490b50f

File tree

70 files changed

+2967
-138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+2967
-138
lines changed

packages/twenty-front/src/locales/af-ZA.po

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,6 +2043,11 @@ msgstr "Maak toe"
20432043
msgid "Close command menu"
20442044
msgstr "Sluit opdragkieslys"
20452045

2046+
#. js-lingui-id: EWPtMO
2047+
#: src/modules/ai/components/CodeExecutionDisplay.tsx
2048+
msgid "Code"
2049+
msgstr ""
2050+
20462051
#. js-lingui-id: /8PmQ9
20472052
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionServerlessFunction.tsx
20482053
msgid "Code Editor"
@@ -2120,6 +2125,7 @@ msgstr "voltooi"
21202125

21212126
#. js-lingui-id: qqWcBV
21222127
#: src/modules/settings/admin-panel/health-status/components/SettingsAdminQueueJobsTable.tsx
2128+
#: src/modules/ai/components/CodeExecutionDisplay.tsx
21232129
msgid "Completed"
21242130
msgstr "Voltooi"
21252131

@@ -2370,6 +2376,11 @@ msgstr "Gekopieer na knipbord"
23702376
msgid "Copy"
23712377
msgstr "Kopieer"
23722378

2379+
#. js-lingui-id: NmPNJJ
2380+
#: src/modules/ai/components/CodeExecutionDisplay.tsx
2381+
msgid "Copy code"
2382+
msgstr ""
2383+
23732384
#. js-lingui-id: 7eVkEH
23742385
#: src/pages/onboarding/InviteTeam.tsx
23752386
msgid "Copy invitation link"
@@ -2385,6 +2396,11 @@ msgstr "Kopieer skakel"
23852396
msgid "Copy link to view"
23862397
msgstr "Kopieer skakel na aansig"
23872398

2399+
#. js-lingui-id: VBIlvI
2400+
#: src/modules/ai/components/TerminalOutput.tsx
2401+
msgid "Copy output"
2402+
msgstr ""
2403+
23882404
#. js-lingui-id: HvB+os
23892405
#: src/pages/settings/SettingsTwoFactorAuthenticationMethod.tsx
23902406
msgid "Copy paste the code below"
@@ -3419,6 +3435,12 @@ msgstr "Punte en komma - {dotsAndCommaExample}"
34193435
msgid "Downgrade"
34203436
msgstr "Verlaagde gradering"
34213437

3438+
#. js-lingui-id: BjitBo
3439+
#. placeholder {0}: file.filename
3440+
#: src/modules/ai/components/CodeExecutionDisplay.tsx
3441+
msgid "Download {0}"
3442+
msgstr ""
3443+
34223444
#. js-lingui-id: WcWS//
34233445
#: src/modules/settings/security/components/SSO/SettingsSSOSAMLForm.tsx
34243446
msgid "Download file"
@@ -4323,6 +4345,7 @@ msgstr "Ekstra Krediete Gebruik"
43234345
#. js-lingui-id: 7Bj3x9
43244346
#: src/pages/settings/emailing-domains/utils/getEmailingDomainStatusText.ts
43254347
#: src/modules/settings/admin-panel/health-status/components/SettingsAdminQueueJobsTable.tsx
4348+
#: src/modules/ai/components/CodeExecutionDisplay.tsx
43264349
msgid "Failed"
43274350
msgstr "Misluk"
43284351

@@ -4685,6 +4708,11 @@ msgstr "Algemeen"
46854708
msgid "General - Settings"
46864709
msgstr "Algemeen - Instellings"
46874710

4711+
#. js-lingui-id: wu9eMO
4712+
#: src/modules/ai/components/CodeExecutionDisplay.tsx
4713+
msgid "Generated Files"
4714+
msgstr ""
4715+
46884716
#. js-lingui-id: DDcvSo
46894717
#: src/pages/settings/profile/appearance/components/LocalePicker.tsx
46904718
msgid "German"
@@ -6640,6 +6668,11 @@ msgstr "Geen modelle beskikbaar nie. Stel asseblief KI-modelle in jou werkruimte
66406668
msgid "No option found"
66416669
msgstr "Geen opsie gevind nie"
66426670

6671+
#. js-lingui-id: XRc1G9
6672+
#: src/modules/ai/components/TerminalOutput.tsx
6673+
msgid "No output"
6674+
msgstr ""
6675+
66436676
#. js-lingui-id: tTItk7
66446677
#: src/modules/workflow/workflow-steps/components/WorkflowRunStepOutputDetail.tsx
66456678
msgid "No output available"
@@ -7105,6 +7138,12 @@ msgstr "Ander werksruimtes"
71057138
msgid "Our team can help you set up your workspace to match your specific needs and workflows."
71067139
msgstr "Ons span kan jou help om jou werkruimte op te stel sodat dit by jou spesifieke behoeftes en werksvloei pas."
71077140

7141+
#. js-lingui-id: gh06VD
7142+
#: src/modules/ai/components/TerminalOutput.tsx
7143+
#: src/modules/ai/components/CodeExecutionDisplay.tsx
7144+
msgid "Output"
7145+
msgstr ""
7146+
71087147
#. js-lingui-id: xvfn7l
71097148
#: src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowOutputSchemaBuilder.tsx
71107149
msgid "Output Field {fieldNumber}"
@@ -7550,6 +7589,11 @@ msgstr "Publieke domein suksesvol verwyder"
75507589
msgid "Public Domains"
75517590
msgstr "Publieke Domeine"
75527591

7592+
#. js-lingui-id: GUpZQM
7593+
#: src/modules/ai/components/CodeExecutionDisplay.tsx
7594+
msgid "Python Code Execution"
7595+
msgstr ""
7596+
75537597
#. js-lingui-id: 2vudsu
75547598
#: src/modules/command-menu/pages/page-layout/utils/getDateGranularityLabel.ts
75557599
msgid "Quarter"
@@ -7989,6 +8033,11 @@ msgstr "Voer 'n werkstroom uit en keer hier terug om die uitvoerings te sien"
79898033
msgid "Run Function"
79908034
msgstr "Voer Funksie Uit"
79918035

8036+
#. js-lingui-id: LTC198
8037+
#: src/modules/ai/components/CodeExecutionDisplay.tsx
8038+
msgid "Running..."
8039+
msgstr ""
8040+
79928041
#. js-lingui-id: nji0/X
79938042
#: src/pages/settings/profile/appearance/components/LocalePicker.tsx
79948043
msgid "Russian"
@@ -10147,6 +10196,11 @@ msgstr "Wag"
1014710196
msgid "Waiting Children"
1014810197
msgstr "Wagende Kinders"
1014910198

10199+
#. js-lingui-id: TdQd9Q
10200+
#: src/modules/ai/components/TerminalOutput.tsx
10201+
msgid "Waiting for output..."
10202+
msgstr ""
10203+
1015010204
#. js-lingui-id: zFSQY3
1015110205
#: src/modules/activities/timeline-activities/rows/main-object/components/EventRowMainObject.tsx
1015210206
msgid "was created by"

packages/twenty-front/src/locales/ar-SA.po

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,6 +2043,11 @@ msgstr "إغلاق"
20432043
msgid "Close command menu"
20442044
msgstr "إغلاق قائمة الأوامر"
20452045

2046+
#. js-lingui-id: EWPtMO
2047+
#: src/modules/ai/components/CodeExecutionDisplay.tsx
2048+
msgid "Code"
2049+
msgstr ""
2050+
20462051
#. js-lingui-id: /8PmQ9
20472052
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionServerlessFunction.tsx
20482053
msgid "Code Editor"
@@ -2120,6 +2125,7 @@ msgstr "مكتمل"
21202125

21212126
#. js-lingui-id: qqWcBV
21222127
#: src/modules/settings/admin-panel/health-status/components/SettingsAdminQueueJobsTable.tsx
2128+
#: src/modules/ai/components/CodeExecutionDisplay.tsx
21232129
msgid "Completed"
21242130
msgstr "مكتمل"
21252131

@@ -2370,6 +2376,11 @@ msgstr "تم النسخ إلى الحافظة"
23702376
msgid "Copy"
23712377
msgstr "نسخ"
23722378

2379+
#. js-lingui-id: NmPNJJ
2380+
#: src/modules/ai/components/CodeExecutionDisplay.tsx
2381+
msgid "Copy code"
2382+
msgstr ""
2383+
23732384
#. js-lingui-id: 7eVkEH
23742385
#: src/pages/onboarding/InviteTeam.tsx
23752386
msgid "Copy invitation link"
@@ -2385,6 +2396,11 @@ msgstr "نسخ الرابط"
23852396
msgid "Copy link to view"
23862397
msgstr "نسخ الرابط لعرضه"
23872398

2399+
#. js-lingui-id: VBIlvI
2400+
#: src/modules/ai/components/TerminalOutput.tsx
2401+
msgid "Copy output"
2402+
msgstr ""
2403+
23882404
#. js-lingui-id: HvB+os
23892405
#: src/pages/settings/SettingsTwoFactorAuthenticationMethod.tsx
23902406
msgid "Copy paste the code below"
@@ -3419,6 +3435,12 @@ msgstr "النقاط والفاصلة - {dotsAndCommaExample}"
34193435
msgid "Downgrade"
34203436
msgstr "خفض المستوى"
34213437

3438+
#. js-lingui-id: BjitBo
3439+
#. placeholder {0}: file.filename
3440+
#: src/modules/ai/components/CodeExecutionDisplay.tsx
3441+
msgid "Download {0}"
3442+
msgstr ""
3443+
34223444
#. js-lingui-id: WcWS//
34233445
#: src/modules/settings/security/components/SSO/SettingsSSOSAMLForm.tsx
34243446
msgid "Download file"
@@ -4323,6 +4345,7 @@ msgstr "الإعتمادات الإضافية المستخدمة"
43234345
#. js-lingui-id: 7Bj3x9
43244346
#: src/pages/settings/emailing-domains/utils/getEmailingDomainStatusText.ts
43254347
#: src/modules/settings/admin-panel/health-status/components/SettingsAdminQueueJobsTable.tsx
4348+
#: src/modules/ai/components/CodeExecutionDisplay.tsx
43264349
msgid "Failed"
43274350
msgstr "فشل"
43284351

@@ -4685,6 +4708,11 @@ msgstr "عام"
46854708
msgid "General - Settings"
46864709
msgstr "الإعدادات العامة"
46874710

4711+
#. js-lingui-id: wu9eMO
4712+
#: src/modules/ai/components/CodeExecutionDisplay.tsx
4713+
msgid "Generated Files"
4714+
msgstr ""
4715+
46884716
#. js-lingui-id: DDcvSo
46894717
#: src/pages/settings/profile/appearance/components/LocalePicker.tsx
46904718
msgid "German"
@@ -6640,6 +6668,11 @@ msgstr "لا توجد نماذج متاحة. يرجى تهيئة نماذج ال
66406668
msgid "No option found"
66416669
msgstr "لم يتم العثور على خيار"
66426670

6671+
#. js-lingui-id: XRc1G9
6672+
#: src/modules/ai/components/TerminalOutput.tsx
6673+
msgid "No output"
6674+
msgstr ""
6675+
66436676
#. js-lingui-id: tTItk7
66446677
#: src/modules/workflow/workflow-steps/components/WorkflowRunStepOutputDetail.tsx
66456678
msgid "No output available"
@@ -7105,6 +7138,12 @@ msgstr "مساحات العمل الأخرى"
71057138
msgid "Our team can help you set up your workspace to match your specific needs and workflows."
71067139
msgstr "يمكن لفريقنا مساعدتك في إعداد بيئة العمل الخاصة بك لتناسب احتياجاتك المحددة وسير العمل الخاص بك."
71077140

7141+
#. js-lingui-id: gh06VD
7142+
#: src/modules/ai/components/TerminalOutput.tsx
7143+
#: src/modules/ai/components/CodeExecutionDisplay.tsx
7144+
msgid "Output"
7145+
msgstr ""
7146+
71087147
#. js-lingui-id: xvfn7l
71097148
#: src/modules/workflow/workflow-steps/workflow-actions/ai-agent-action/components/WorkflowOutputSchemaBuilder.tsx
71107149
msgid "Output Field {fieldNumber}"
@@ -7550,6 +7589,11 @@ msgstr "تم حذف النطاق العام بنجاح"
75507589
msgid "Public Domains"
75517590
msgstr "النطاقات العامة"
75527591

7592+
#. js-lingui-id: GUpZQM
7593+
#: src/modules/ai/components/CodeExecutionDisplay.tsx
7594+
msgid "Python Code Execution"
7595+
msgstr ""
7596+
75537597
#. js-lingui-id: 2vudsu
75547598
#: src/modules/command-menu/pages/page-layout/utils/getDateGranularityLabel.ts
75557599
msgid "Quarter"
@@ -7989,6 +8033,11 @@ msgstr "\\\\"
79898033
msgid "Run Function"
79908034
msgstr "تشغيل الوظيفة"
79918035

8036+
#. js-lingui-id: LTC198
8037+
#: src/modules/ai/components/CodeExecutionDisplay.tsx
8038+
msgid "Running..."
8039+
msgstr ""
8040+
79928041
#. js-lingui-id: nji0/X
79938042
#: src/pages/settings/profile/appearance/components/LocalePicker.tsx
79948043
msgid "Russian"
@@ -10147,6 +10196,11 @@ msgstr "في انتظار"
1014710196
msgid "Waiting Children"
1014810197
msgstr "انتظار الأطفال"
1014910198

10199+
#. js-lingui-id: TdQd9Q
10200+
#: src/modules/ai/components/TerminalOutput.tsx
10201+
msgid "Waiting for output..."
10202+
msgstr ""
10203+
1015010204
#. js-lingui-id: zFSQY3
1015110205
#: src/modules/activities/timeline-activities/rows/main-object/components/EventRowMainObject.tsx
1015210206
msgid "was created by"

0 commit comments

Comments
 (0)