diff --git a/src/App.jsx b/src/App.jsx
index 62b56cf..5683aa2 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -288,7 +288,7 @@ export default function App() {
- $
+ ₹
- The salary buffer capacity will be scaled to 6x this paycheck size (${(parseFloat(paycheckInput) * 6 || 0).toLocaleString()}).
+ The salary buffer capacity will be scaled to 6x this paycheck size (₹{(parseFloat(paycheckInput) * 6 || 0).toLocaleString('en-IN')}).
- $
+ ₹
$${endIncome.toLocaleString()}...`);
+ await simulateThought(toolsRegistry, `Calculating progressive tax bracket for YTD income transition: ₹${startIncome.toLocaleString('en-IN')} -> ₹${endIncome.toLocaleString('en-IN')}...`);
let newBracket = 0.10;
if (endIncome > 250000) {
@@ -346,7 +346,7 @@ export async function runAgentLoop({
});
}
- await simulateThought(toolsRegistry, `OmniFlow Routed: tax=$${taxAlloc}, salary=$${salaryAlloc}, reserve=$${reserveAlloc}, yield=$${yieldAlloc}`);
+ await simulateThought(toolsRegistry, `OmniFlow Routed: tax=₹${taxAlloc}, salary=₹${salaryAlloc}, reserve=₹${reserveAlloc}, yield=₹${yieldAlloc}`);
// Retroactive adjustment shoring if tax bracket shifted
let retroactiveAdjustment = 0;
@@ -370,7 +370,7 @@ export async function runAgentLoop({
description: `Recall for retroactive tax shoring`
});
}
- await simulateThought(toolsRegistry, `Progressive retroactive shoring completed. Transferred $${retroactiveAdjustment} to Tax Pool.`);
+ await simulateThought(toolsRegistry, `Progressive retroactive shoring completed. Transferred ₹${retroactiveAdjustment} to Tax Pool.`);
}
}
@@ -410,7 +410,7 @@ export async function runAgentLoop({
actionTaken = recallAmount > 0;
}
- await simulateThought(toolsRegistry, `Calculated Runway: ${runwayMonths} months based on monthly burn of $${monthlyBurn}. (Salary buffer: $${salaryBuffer}, Yield Pool: $${yieldPool})`);
+ await simulateThought(toolsRegistry, `Calculated Runway: ${runwayMonths} months based on monthly burn of ₹${monthlyBurn}. (Salary buffer: ₹${salaryBuffer}, Yield Pool: ₹${yieldPool})`);
await toolsRegistry.submitTreasuryEvaluation({
runwayMonths,
@@ -451,7 +451,7 @@ export async function runAgentLoop({
amount: recallAmount,
description: 'Yield recall for paycheck deficit shoring'
});
- await simulateThought(toolsRegistry, `Deficit shored. Recalled $${recallAmount} from Ondo yield pool to liquid Salary Buffer.`);
+ await simulateThought(toolsRegistry, `Deficit shored. Recalled ₹${recallAmount} from Ondo yield pool to liquid Salary Buffer.`);
}
}
}
@@ -467,7 +467,7 @@ export async function runAgentLoop({
amount: targetPaycheck,
description: 'Bi-weekly paycheck payout'
});
- await simulateThought(toolsRegistry, `Paycheck of $${targetPaycheck} successfully dispatched.`);
+ await simulateThought(toolsRegistry, `Paycheck of ₹${targetPaycheck} successfully dispatched.`);
} else {
// Partial paycheck dispatch
const partial = currentBuffer;
@@ -481,7 +481,7 @@ export async function runAgentLoop({
description: 'Partial paycheck payout'
});
}
- await simulateThought(toolsRegistry, `CRITICAL: Insufficient funds in salary buffer! Dispatched partial paycheck of $${partial}.`);
+ await simulateThought(toolsRegistry, `CRITICAL: Insufficient funds in salary buffer! Dispatched partial paycheck of ₹${partial}.`);
}
const monthlyBurn = targetPaycheck * 2;
@@ -497,10 +497,10 @@ export async function runAgentLoop({
}
} else if (prompt.includes('manual') || prompt.includes('recall') || prompt.includes('Recall')) {
// Manual recall yield
- const amountMatch = prompt.match(/recall of \$?([0-9,]+(?:\.[0-9]{2})?)/i);
+ const amountMatch = prompt.match(/recall of [₹\$]?([0-9,]+(?:\.[0-9]{2})?)/i);
const recallVal = amountMatch ? parseFloat(amountMatch[1].replace(/,/g, '')) : 0;
- await simulateThought(toolsRegistry, `Executing manual recall of $${recallVal} from Ondo USDY yield pool...`);
+ await simulateThought(toolsRegistry, `Executing manual recall of ₹${recallVal} from Ondo USDY yield pool...`);
if (toolsRegistry.getBalances && toolsRegistry.updateBalances && toolsRegistry.addTransaction && toolsRegistry.submitTreasuryEvaluation) {
const balances = await toolsRegistry.getBalances();
@@ -517,7 +517,7 @@ export async function runAgentLoop({
amount: actualRecall,
description: 'Manual Ondo Yield Recall'
});
- await simulateThought(toolsRegistry, `Recalled $${actualRecall} to liquid checking buffer.`);
+ await simulateThought(toolsRegistry, `Recalled ₹${actualRecall} to liquid checking buffer.`);
}
await toolsRegistry.submitTreasuryEvaluation({
diff --git a/src/ai/treasury.js b/src/ai/treasury.js
index 5e662d2..20293e4 100644
--- a/src/ai/treasury.js
+++ b/src/ai/treasury.js
@@ -81,12 +81,12 @@ Call the database tools to inspect profile/balances, update balances, and log re
You MUST submit your findings by calling the tool "submitTreasuryEvaluation".`;
const prompt = `Please evaluate the runway status and check for paycheck cycles:
-Salary Buffer: $${salaryBuffer}
-Yield Pool: $${yieldPool}
-Reserve Floor: $${reserveFloor}
-Target Paycheck: $${targetPaycheck}
+Salary Buffer: ₹${salaryBuffer}
+Yield Pool: ₹${yieldPool}
+Reserve Floor: ₹${reserveFloor}
+Target Paycheck: ₹${targetPaycheck}
Proposed Runway: ${runwayMonths} months
-Proposed Recall Amount: $${recallAmount} (Action Taken: ${actionTaken})`;
+Proposed Recall Amount: ₹${recallAmount} (Action Taken: ${actionTaken})`;
await runAgentLoop({
agentName: 'Treasury',
diff --git a/src/components/AgentChat.jsx b/src/components/AgentChat.jsx
index 63b5207..bbd3892 100644
--- a/src/components/AgentChat.jsx
+++ b/src/components/AgentChat.jsx
@@ -10,10 +10,10 @@ const AGENTS_METADATA = {
colorBg: 'bg-blue-500/10 text-blue-600 border-blue-500/20',
dotColor: 'bg-blue-500',
capabilities: ['Expense Auditing', 'Tax Bracket Shoring', 'Write-Off Optimization'],
- initialMsg: 'Hello! I am your Tax Accountant Agent. You can ask me to audit a receipt (e.g., "Audit receipt: AWS Hosting, Amount: $300") or evaluate your current progressive tax bracket status.',
+ initialMsg: 'Hello! I am your Tax Accountant Agent. You can ask me to audit a receipt (e.g., "Audit receipt: AWS Hosting, Amount: ₹300") or evaluate your current progressive tax bracket status.',
suggestions: [
- { label: 'Audit Receipt: AWS ($300)', prompt: 'Audit receipt: AWS Hosting, Amount: $300' },
- { label: 'Audit Receipt: Staples ($45)', prompt: 'Audit receipt: Staples Paper, Amount: $45' },
+ { label: 'Audit Receipt: AWS (₹300)', prompt: 'Audit receipt: AWS Hosting, Amount: ₹300' },
+ { label: 'Audit Receipt: Staples (₹45)', prompt: 'Audit receipt: Staples Paper, Amount: ₹45' },
{ label: 'Check Tax Bracket Status', prompt: 'Run a progressive tax evaluation and check my current bracket' }
]
},
@@ -26,10 +26,10 @@ const AGENTS_METADATA = {
colorBg: 'bg-emerald-500/10 text-emerald-600 border-emerald-500/20',
dotColor: 'bg-emerald-500',
capabilities: ['Runway Stress-Testing', 'Yield Optimization', 'Reserve Shore-Up'],
- initialMsg: 'Hi there! I am your Treasury Agent. I monitor cash runway and Ondo yield. You can ask me to stress-test your runway or recall funds (e.g., "Recall $5,000 from Ondo yield pool").',
+ initialMsg: 'Hi there! I am your Treasury Agent. I monitor cash runway and Ondo yield. You can ask me to stress-test your runway or recall funds (e.g., "Recall ₹5,000 from Ondo yield pool").',
suggestions: [
{ label: 'Stress-Test Cash Runway', prompt: 'Stress-test my runway and cash buffers' },
- { label: 'Recall $5,000 from Yield Pool', prompt: 'Recall $5,000 from Ondo yield pool' },
+ { label: 'Recall ₹5,000 from Yield Pool', prompt: 'Recall ₹5,000 from Ondo yield pool' },
{ label: 'Get Treasury Status', prompt: 'Summarize my current liquid buffers and yield allocations' }
]
},
@@ -84,14 +84,14 @@ export default function AgentChat({ dbService, onTriggerReload, logs, setActiveT
const lowerText = textToExecute.toLowerCase();
if (lowerText.includes('audit') || lowerText.includes('receipt') || lowerText.includes('upload')) {
let amount = null;
- const amtMatch = textToExecute.match(/\$?([0-9]+(?:\.[0-9]{2})?)/);
+ const amtMatch = textToExecute.match(/[₹\$]?([0-9]+(?:\.[0-9]{2})?)/);
if (amtMatch) amount = parseFloat(amtMatch[1]);
const receiptText = textToExecute.replace(/audit|receipt|upload/gi, '').trim();
const rec = await dbService.simulateReceiptUpload(receiptText || 'Generic business expense', amount);
if (rec) {
- finalResponse = `[Accountant Audit Result]\n\n• Amount: $${rec.amount.toFixed(2)}\n• Category: ${rec.category}\n• Write-off Eligible: ${rec.is_eligible_writeoff ? 'Yes (Released tax savings)' : 'No (Personal expense)'}\n• Analysis: ${rec.explanation}`;
+ finalResponse = `[Accountant Audit Result]\n\n• Amount: ₹${rec.amount.toFixed(2)}\n• Category: ${rec.category}\n• Write-off Eligible: ${rec.is_eligible_writeoff ? 'Yes (Released tax savings)' : 'No (Personal expense)'}\n• Analysis: ${rec.explanation}`;
} else {
finalResponse = 'Receipt audit processed. Check the transaction ledger for tax pool changes.';
}
@@ -103,18 +103,18 @@ export default function AgentChat({ dbService, onTriggerReload, logs, setActiveT
const res = await dbService.simulateInvoicePaid(0);
const updatedProfile = await dbService.getProfile();
- finalResponse = `I have run a progressive tax evaluation.\n\n• Current marginal tax bracket: ${(updatedProfile.taxBracket * 100).toFixed(0)}%\n• Year-To-Date Income: $${updatedProfile.ytdIncome.toLocaleString()}\n\nAll progressive tax reserves are fully shored up in the Tax Pool account.`;
+ finalResponse = `I have run a progressive tax evaluation.\n\n• Current marginal tax bracket: ${(updatedProfile.taxBracket * 100).toFixed(0)}%\n• Year-To-Date Income: ₹${updatedProfile.ytdIncome.toLocaleString('en-IN')}\n\nAll progressive tax reserves are fully shored up in the Tax Pool account.`;
}
} else if (selectedAgent === 'treasury') {
const lowerText = textToExecute.toLowerCase();
if (lowerText.includes('recall') || lowerText.includes('withdraw') || lowerText.includes('transfer')) {
let amount = 1000;
- const amtMatch = textToExecute.match(/\$?([0-9,]+(?:\.[0-9]{2})?)/);
+ const amtMatch = textToExecute.match(/[₹\$]?([0-9,]+(?:\.[0-9]{2})?)/);
if (amtMatch) amount = parseFloat(amtMatch[1].replace(/,/g, ''));
await dbService.manualRecallYield(amount);
- finalResponse = `Yield recall complete! Recalled $${amount.toLocaleString()} from Ondo USDY yield pool back to your liquid Salary Buffer.`;
+ finalResponse = `Yield recall complete! Recalled ₹${amount.toLocaleString('en-IN')} from Ondo USDY yield pool back to your liquid Salary Buffer.`;
} else if (lowerText.includes('stress') || lowerText.includes('cancellation') || lowerText.includes('runway')) {
await dbService.simulateClientCancellation();
@@ -124,7 +124,7 @@ export default function AgentChat({ dbService, onTriggerReload, logs, setActiveT
const totalAvailable = (balances.salary_buffer || 0) + (balances.yield_pool || 0) + (balances.reserve_floor || 0);
const runway = monthlyBurn > 0 ? (totalAvailable / monthlyBurn).toFixed(1) : '99.0';
- finalResponse = `Treasury Runway Stress-Test complete:\n\n• Liquid Salary Buffer: $${balances.salary_buffer.toLocaleString()}\n• Reserve Floor Cushion: $${balances.reserve_floor.toLocaleString()}\n• Ondo USDY Yield Pool: $${balances.yield_pool.toLocaleString()}\n• Active Cash Runway: ${runway} months (burn rate of $${monthlyBurn.toLocaleString()}/mo).\n\nIf runway drops below paycheck requirements, I will automatically trigger yield recalls.`;
+ finalResponse = `Treasury Runway Stress-Test complete:\n\n• Liquid Salary Buffer: ₹${balances.salary_buffer.toLocaleString('en-IN')}\n• Reserve Floor Cushion: ₹${balances.reserve_floor.toLocaleString('en-IN')}\n• Ondo USDY Yield Pool: ₹${balances.yield_pool.toLocaleString('en-IN')}\n• Active Cash Runway: ${runway} months (burn rate of ₹${monthlyBurn.toLocaleString('en-IN')}/mo).\n\nIf runway drops below paycheck requirements, I will automatically trigger yield recalls.`;
} else {
const balances = await dbService.getBalances();
const profile = await dbService.getProfile();
@@ -132,7 +132,7 @@ export default function AgentChat({ dbService, onTriggerReload, logs, setActiveT
const totalAvailable = (balances.salary_buffer || 0) + (balances.yield_pool || 0) + (balances.reserve_floor || 0);
const runway = monthlyBurn > 0 ? (totalAvailable / monthlyBurn).toFixed(1) : '99';
- finalResponse = `Current Treasury Status:\n\n• Liquid Buffer: $${balances.salary_buffer.toLocaleString()}\n• Yield Pool: $${balances.yield_pool.toLocaleString()}\n• Cash Runway: ${runway} months.\n\nAll funds exceeding the salary cap have been routed to yield pools.`;
+ finalResponse = `Current Treasury Status:\n\n• Liquid Buffer: ₹${balances.salary_buffer.toLocaleString('en-IN')}\n• Yield Pool: ₹${balances.yield_pool.toLocaleString('en-IN')}\n• Cash Runway: ${runway} months.\n\nAll funds exceeding the salary cap have been routed to yield pools.`;
}
} else if (selectedAgent === 'invoice_sentinel') {
@@ -181,7 +181,7 @@ export default function AgentChat({ dbService, onTriggerReload, logs, setActiveT
// 1. Accountant Receipt Audit Result
if (text.includes('[Accountant Audit Result]')) {
- const amountMatch = text.match(/• Amount:\s*\$?([0-9,.]+)/);
+ const amountMatch = text.match(/• Amount:\s*[₹\$]?([0-9,.]+)/);
const categoryMatch = text.match(/• Category:\s*(.+)/);
const writeoffMatch = text.match(/• Write-off Eligible:\s*([^\n]+)/);
const analysisMatch = text.split('• Analysis:');
@@ -205,7 +205,7 @@ export default function AgentChat({ dbService, onTriggerReload, logs, setActiveT