Skip to content

Commit 595b85f

Browse files
committed
feat: Add Agents feature with corresponding UI and translations
Translate "No agents created" messages to multiple languages for improved user experience Refactor SVG files for improved structure and readability, removing unnecessary metadata and optimizing paths. Refactor AgentsPage component to use constants for layout dimensions, improving maintainability and readability. Update illustrations.chunk.ts to include TvScreenRobot SVG, enhancing the icon library. feat: Add OPEN_AGENTS_PAGE command and integrate it into AgentsPage component Refactor AgentsPage component to simplify empty state handling by removing unused constants and updating styles for better maintainability. Refactor Agent actions to use named imports for better clarity and consistency in the AgentsPage component. Update unit tests to reflect these changes.
1 parent eb81f1f commit 595b85f

27 files changed

Lines changed: 345 additions & 0 deletions

File tree

assets/images/bot.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

src/CONST/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9132,6 +9132,7 @@ const CONST = {
91329132
ACCOUNT: {
91339133
PROFILE: 'Account-Profile',
91349134
WALLET: 'Account-Wallet',
9135+
AGENTS: 'Account-Agents',
91359136
RULES: 'Account-Rules',
91369137
PREFERENCES: 'Account-Preferences',
91379138
SECURITY: 'Account-Security',

src/ROUTES.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,7 @@ const ROUTES = {
834834
},
835835
SETTINGS_WALLET_TRAVEL_CVV: 'settings/wallet/travel-cvv',
836836
SETTINGS_WALLET_TRAVEL_CVV_VERIFY_ACCOUNT: `settings/wallet/travel-cvv/${VERIFY_ACCOUNT}`,
837+
SETTINGS_AGENTS: 'settings/agents',
837838
SETTINGS_RULES: 'settings/rules',
838839
SETTINGS_RULES_ADD: {
839840
route: 'settings/rules/new/:field?/:index?',

src/SCREENS.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ const SCREENS = {
170170
PAYMENT_CURRENCY: 'Settings_Payment_Currency',
171171
},
172172

173+
AGENTS: {
174+
ROOT: 'Settings_Agents',
175+
},
176+
173177
RULES: {
174178
ROOT: 'Settings_Rules',
175179
ADD: 'Settings_Rules_Add',

src/components/Icon/chunks/expensify-icons.chunk.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import Binoculars from '@assets/images/binoculars.svg';
2929
import boltSlash from '@assets/images/bolt-slash.svg';
3030
import Bolt from '@assets/images/bolt.svg';
3131
import Bookmark from '@assets/images/bookmark.svg';
32+
import Bot from '@assets/images/bot.svg';
3233
import Box from '@assets/images/box.svg';
3334
import Bug from '@assets/images/bug.svg';
3435
import Building from '@assets/images/building.svg';
@@ -284,6 +285,7 @@ const Expensicons = {
284285
Bell,
285286
Binoculars,
286287
Bolt,
288+
Bot,
287289
Box,
288290
Bug,
289291
Building,

src/components/Icon/chunks/illustrations.chunk.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ import ToddBehindCloud from '@assets/images/product-illustrations/todd-behind-cl
8989
import ToddInCar from '@assets/images/product-illustrations/todd-in-car.svg';
9090
import ToddWithPhones from '@assets/images/product-illustrations/todd-with-phones.svg';
9191
import TopiaryDollarSign from '@assets/images/product-illustrations/topiary-dollar-sign.svg';
92+
import TvScreenRobot from '@assets/images/product-illustrations/tv-screen-robot.svg';
9293
import UpgradeRocket from '@assets/images/product-illustrations/upgrade-rocket.svg';
9394
import WorkspaceScene from '@assets/images/product-illustrations/workspace-scene.svg';
9495
import ReceiptStack from '@assets/images/receipt-upload.svg';
@@ -99,6 +100,7 @@ import Puzzle from '@assets/images/simple-illustrations/emptystate__puzzlepieces
99100
import Abacus from '@assets/images/simple-illustrations/simple-illustration__abacus.svg';
100101
// Simple Illustrations - Original core ones
101102
import Accounting from '@assets/images/simple-illustrations/simple-illustration__accounting.svg';
103+
import AiBot from '@assets/images/simple-illustrations/simple-illustration__ai-bot.svg';
102104
import Alert from '@assets/images/simple-illustrations/simple-illustration__alert.svg';
103105
import Members from '@assets/images/simple-illustrations/simple-illustration__approval-members.svg';
104106
import Approval from '@assets/images/simple-illustrations/simple-illustration__approval.svg';
@@ -285,6 +287,7 @@ const Illustrations = {
285287
ToddInCar,
286288
ToddWithPhones,
287289
TopiaryDollarSign,
290+
TvScreenRobot,
288291
WorkspaceScene,
289292
UpgradeRocket,
290293

@@ -302,6 +305,7 @@ const Illustrations = {
302305

303306
// Simple Illustrations
304307
Accounting,
308+
AiBot,
305309
Building,
306310
BankCoin,
307311
Coins,

src/languages/de.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2720,6 +2720,15 @@ ${amount} für ${merchant} – ${date}`,
27202720
defaultPaymentMethod: 'Standard',
27212721
bankAccountLastFour: (lastFour: string) => `Bankkonto • ${lastFour}`,
27222722
},
2723+
agentsPage: {
2724+
title: 'Agenten',
2725+
subtitle: 'Automatisiere Aufgaben mit benutzerdefinierten Agenten.',
2726+
newAgent: 'Neuer Agent',
2727+
emptyAgents: {
2728+
title: 'Noch keine Agenten erstellt',
2729+
subtitle: 'Höre auf, selbst zu arbeiten. Gebe stattdessen einen Agenten befehle und spare dir viel Zeit.',
2730+
},
2731+
},
27232732
expenseRulesPage: {
27242733
title: 'Ausgabenregeln',
27252734
findRule: 'Regel finden',

src/languages/en.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2773,6 +2773,15 @@ const translations = {
27732773
defaultPaymentMethod: 'Default',
27742774
bankAccountLastFour: (lastFour: string) => `Bank Account • ${lastFour}`,
27752775
},
2776+
agentsPage: {
2777+
title: 'Agents',
2778+
subtitle: 'Automate tasks with custom agents.',
2779+
newAgent: 'New agent',
2780+
emptyAgents: {
2781+
title: 'No agents created',
2782+
subtitle: 'Stop manually doing stuff. Instruct an agent instead and save yourself lots of time.',
2783+
},
2784+
},
27762785
expenseRulesPage: {
27772786
title: 'Expense rules',
27782787
subtitle: 'These rules will apply to your expenses.',

0 commit comments

Comments
 (0)