diff --git a/app/chat/[id]/page.tsx b/app/chat/[id]/page.tsx index 4e7c7a7..79d4776 100644 --- a/app/chat/[id]/page.tsx +++ b/app/chat/[id]/page.tsx @@ -76,7 +76,7 @@ export default function Chat({ params }: { params: { id: string } }) { {conversation.map((message: ClientMessage) => message.role === "user" ? (
-
+
{message.display}
@@ -91,10 +91,13 @@ export default function Chat({ params }: { params: { id: string } }) {
-
{message.display}
+
+ {message.display} +
) : null )} +
{conversation.length === 0 && ( @@ -146,7 +149,7 @@ export default function Chat({ params }: { params: { id: string } }) { diff --git a/llm/components/conditional-purchase.tsx b/llm/components/conditional-purchase.tsx index cd330cc..eb76bd4 100644 --- a/llm/components/conditional-purchase.tsx +++ b/llm/components/conditional-purchase.tsx @@ -102,7 +102,7 @@ export function ConditionalPurchase({ id, isMFAEnrolled }: { id: string; isMFAEn message={ <> {!simulating && ( -
+
To simulate the agent executing the task, please click{" "}
)} {simulating && ( -
+
Simulating
)} } > -
+
Buy {conditionalPurchase.symbol}
-
+
Created {formatRelative(conditionalPurchase.created_at, new Date())}
@@ -130,15 +130,15 @@ export function ConditionalPurchase({ id, isMFAEnrolled }: { id: string; isMFAEn
If {conditionalPurchase.metric} {conditionalPurchase.operator} {conditionalPurchase.threshold}
-
Condition
+
Condition
-
+
-
+
Task: Buy {conditionalPurchase.quantity} ${conditionalPurchase.symbol} shares if{" "} {conditionalPurchase.metric} {conditionalPurchase.operator} {conditionalPurchase.threshold}
@@ -150,13 +150,13 @@ export function ConditionalPurchase({ id, isMFAEnrolled }: { id: string; isMFAEn case "canceled": return ( -
+
Buy {conditionalPurchase.quantity} shares of {conditionalPurchase.symbol}
-
+
Created {formatRelative(conditionalPurchase.created_at, new Date())}
@@ -164,15 +164,15 @@ export function ConditionalPurchase({ id, isMFAEnrolled }: { id: string; isMFAEn
If {conditionalPurchase.metric} {conditionalPurchase.operator} {conditionalPurchase.threshold}
-
Condition
+
Condition
-
+
-
+
The purchase was CANCELED on{" "} {format(conditionalPurchase.updated_at, "PPPP p")}.
@@ -184,13 +184,13 @@ export function ConditionalPurchase({ id, isMFAEnrolled }: { id: string; isMFAEn case "completed": return ( -
+
Buy {conditionalPurchase.quantity} shares of {conditionalPurchase.symbol}
-
+
Created {formatRelative(conditionalPurchase.created_at, new Date())}
@@ -198,15 +198,15 @@ export function ConditionalPurchase({ id, isMFAEnrolled }: { id: string; isMFAEn
If {conditionalPurchase.metric} {conditionalPurchase.operator} {conditionalPurchase.threshold}
-
Condition
+
Condition
-
+
-
+
The purchase was COMPLETED on{" "} {format(conditionalPurchase.updated_at, "PPPP p")}.
diff --git a/llm/components/documents.tsx b/llm/components/documents.tsx index f6fb718..733d942 100644 --- a/llm/components/documents.tsx +++ b/llm/components/documents.tsx @@ -40,10 +40,7 @@ export const Documents = ({ message: `Subscribe me to the newsletter. Once done ASK me if I want to read the forecast analysis for ${symbol}.`, hidden: true, }); - setMessages((prevMessages: ClientMessage[]) => [ - ...prevMessages, - response, - ]); + setMessages((prevMessages: ClientMessage[]) => [...prevMessages, response]); })(); }; @@ -59,17 +56,12 @@ export const Documents = ({ - - [{index + 1}] - + [{index + 1}] @@ -82,19 +74,17 @@ export const Documents = ({
)} {showEnrollment && finished && ( -
-
-

- Join Market0 Newsletter -

-

+

+
+

Join Market0 Newsletter

+

To get access to analyst forecasts join the newsletter.

-
+
diff --git a/llm/components/events.tsx b/llm/components/events.tsx index 163cfda..a0c1309 100644 --- a/llm/components/events.tsx +++ b/llm/components/events.tsx @@ -17,17 +17,14 @@ export function Events({ events }: { events: Event[] }) {
-
+
{events.map((event) => ( -
-
+
+
{format(parseISO(event.date), "dd LLL, yyyy")}
-
+
{event.headline.slice(0, 30)}
diff --git a/llm/components/positions.tsx b/llm/components/positions.tsx index 8ab45e7..df2687f 100644 --- a/llm/components/positions.tsx +++ b/llm/components/positions.tsx @@ -17,29 +17,19 @@ export function Positions({ positions }: { positions: Position[] }) { {positions.map((position) => ( diff --git a/llm/components/reminder.tsx b/llm/components/reminder.tsx index 4713c50..30bc1e2 100644 --- a/llm/components/reminder.tsx +++ b/llm/components/reminder.tsx @@ -50,28 +50,25 @@ export function Reminder({ reminderID }: { reminderID: string }) { }} connectWidget={{ title: "Connect to Google Tasks", - description: - "To create reminders in Google Tasks, you’ll first need to connect to your Google Account.", + description: "To create reminders in Google Tasks, you’ll first need to connect to your Google Account.", }} shouldCheckAuthorization={shouldCheckAuthorization} onUserAuthorized={onUserAuthorized} > {reminder && ( -
-
-

- {reminder.title} -

-

+

+
+

{reminder.title}

+

Google Task created at {format(reminder.due, "dd LLL, yyyy")}.

-
+
View Task diff --git a/llm/components/stock-purchase-status.tsx b/llm/components/stock-purchase-status.tsx index 0041be3..e86d2dc 100644 --- a/llm/components/stock-purchase-status.tsx +++ b/llm/components/stock-purchase-status.tsx @@ -1,11 +1,18 @@ import { CancelRedIcon, CheckGreenIcon } from "@/components/icons"; -export const StockPurchaseStatus = ({ message, status }: { message: string, status?: 'in-progress' | 'success' | 'failure' }) => +export const StockPurchaseStatus = ({ + message, + status, +}: { + message: string; + status?: "in-progress" | "success" | "failure"; +}) => (
- { status === 'failure' && } - { status === 'success' && } - { status === 'in-progress' &&
} -

- {message} -

-
; + {status === "failure" && } + {status === "success" && } + {status === "in-progress" && ( +
+ )} +

{message}

+
+); diff --git a/llm/components/stock-purchase.tsx b/llm/components/stock-purchase.tsx index d1e76a6..e1851a6 100644 --- a/llm/components/stock-purchase.tsx +++ b/llm/components/stock-purchase.tsx @@ -54,8 +54,8 @@ type StockPurchaseUIParams = { * Holds the result of the user interaction with the component. */ result?: { - message: string - status: "success" | "failure" + message: string; + status: "success" | "failure"; }; }; @@ -101,31 +101,25 @@ export function StockPurchase({ return ( -
-
+
+
{symbol}
-
+
{company} • {market} • {currency}
-
- ${price} -
+
${price}
0 ? "text-green-400" : "text-red-400" }`} > {delta > 0 ? : } - {delta} ( - {`${delta > 0 ? "+" : ""}${((delta / price) * 100).toFixed( - 2 - )}%`} - ) + {delta} ({`${delta > 0 ? "+" : ""}${((delta / price) * 100).toFixed(2)}%`})
@@ -133,12 +127,12 @@ export function StockPurchase({ {purchasingUI ? (
-
{purchasingUI}
+
{purchasingUI}
) : ( <> -
-

Shares to purchase

+
+

Shares to purchase

- - 0 - + 0 100 500 - - 1000 - + 1000
-
+
-

- Total cost -

+

Total cost

{quantity} shares x ${price} per share
-
+
{formatNumber(quantity * price)}
-
+