From 3594b0315514d4a7f26f99af8f9bf08f1de2362b Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 27 Apr 2025 11:50:53 -0700 Subject: [PATCH 1/3] fix(ui): standardize flex for credentials component --- .../components/credentials/credentials.tsx | 44 ++++++++++--------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/sim/app/w/components/sidebar/components/settings-modal/components/credentials/credentials.tsx b/sim/app/w/components/sidebar/components/settings-modal/components/credentials/credentials.tsx index 95ab4b38860..d10b6300c31 100644 --- a/sim/app/w/components/sidebar/components/settings-modal/components/credentials/credentials.tsx +++ b/sim/app/w/components/sidebar/components/settings-modal/components/credentials/credentials.tsx @@ -374,14 +374,14 @@ export function Credentials({ onOpenChange }: CredentialsProps) { )} ref={pendingService === service.id ? pendingServiceRef : undefined} > -
-
+
+
{typeof service.icon === 'function' ? service.icon({ className: 'h-5 w-5' }) : service.icon}
-
+

{service.name}

@@ -389,11 +389,11 @@ export function Credentials({ onOpenChange }: CredentialsProps) {

{service.accounts && service.accounts.length > 0 && ( -
+
{service.accounts.map((account) => (
@@ -441,22 +441,24 @@ export function Credentials({ onOpenChange }: CredentialsProps) {
{!service.accounts?.length && ( - +
+ +
)}
From 1145027534271150a597584300bf094f7945c338 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 27 Apr 2025 13:04:00 -0700 Subject: [PATCH 2/3] fixed hanging deploy request for chat deploy, configured & tested DNS subdomain deployment --- .../components/chat-deploy/chat-deploy.tsx | 14 +++++++++++++- .../components/deploy-modal/deploy-modal.tsx | 6 ++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/sim/app/w/[id]/components/control-bar/components/deploy-modal/components/chat-deploy/chat-deploy.tsx b/sim/app/w/[id]/components/control-bar/components/deploy-modal/components/chat-deploy/chat-deploy.tsx index 6bd004b74d9..0243b27a73d 100644 --- a/sim/app/w/[id]/components/control-bar/components/deploy-modal/components/chat-deploy/chat-deploy.tsx +++ b/sim/app/w/[id]/components/control-bar/components/deploy-modal/components/chat-deploy/chat-deploy.tsx @@ -48,6 +48,7 @@ interface ChatDeployProps { onChatExistsChange?: (exists: boolean) => void showDeleteConfirmation?: boolean setShowDeleteConfirmation?: (show: boolean) => void + onDeploymentComplete?: () => void } type AuthType = 'public' | 'password' | 'email' @@ -81,6 +82,7 @@ export function ChatDeploy({ onChatExistsChange, showDeleteConfirmation: externalShowDeleteConfirmation, setShowDeleteConfirmation: externalSetShowDeleteConfirmation, + onDeploymentComplete, }: ChatDeployProps) { // Store hooks const { addNotification } = useNotificationStore() @@ -703,6 +705,16 @@ export function ChatDeploy({ if (chatUrl) { logger.info(`Chat ${existingChat ? 'updated' : 'deployed'} successfully:`, chatUrl) setDeployedChatUrl(chatUrl) + + // Notify parent component that deployment is complete + if (onDeploymentComplete) { + onDeploymentComplete() + } + + // Notify parent that chat exists + if (onChatExistsChange) { + onChatExistsChange(true) + } } else { throw new Error('Response missing chatUrl') } @@ -810,7 +822,7 @@ export function ChatDeploy({ {domainSuffix}
-

Your chat is now live at this URL

+

Your chat is now live at this URL

) diff --git a/sim/app/w/[id]/components/control-bar/components/deploy-modal/deploy-modal.tsx b/sim/app/w/[id]/components/control-bar/components/deploy-modal/deploy-modal.tsx index 54185fb694d..80ae9857fff 100644 --- a/sim/app/w/[id]/components/control-bar/components/deploy-modal/deploy-modal.tsx +++ b/sim/app/w/[id]/components/control-bar/components/deploy-modal/deploy-modal.tsx @@ -495,6 +495,11 @@ export function DeployModal({ } } + // Add a callback function to reset chat submission state + const handleChatDeploymentComplete = () => { + setChatSubmitting(false); + }; + // Render deployed chat view const renderDeployedChatView = () => { if (!deployedChatUrl) { @@ -618,6 +623,7 @@ export function DeployModal({ onChatExistsChange={setChatExists} showDeleteConfirmation={showDeleteConfirmation} setShowDeleteConfirmation={setShowDeleteConfirmation} + onDeploymentComplete={handleChatDeploymentComplete} /> )}
From 608ee435e56647722b118ed0bc4054cf5dc25c03 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 27 Apr 2025 13:40:40 -0700 Subject: [PATCH 3/3] fixed x endpoints --- .../deploy-modal/components/chat-deploy/chat-deploy.tsx | 2 -- .../control-bar/components/deploy-modal/deploy-modal.tsx | 1 - sim/tools/x/read.ts | 2 +- sim/tools/x/search.ts | 2 +- sim/tools/x/write.ts | 2 +- 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sim/app/w/[id]/components/control-bar/components/deploy-modal/components/chat-deploy/chat-deploy.tsx b/sim/app/w/[id]/components/control-bar/components/deploy-modal/components/chat-deploy/chat-deploy.tsx index 0243b27a73d..cc473fa6f85 100644 --- a/sim/app/w/[id]/components/control-bar/components/deploy-modal/components/chat-deploy/chat-deploy.tsx +++ b/sim/app/w/[id]/components/control-bar/components/deploy-modal/components/chat-deploy/chat-deploy.tsx @@ -706,12 +706,10 @@ export function ChatDeploy({ logger.info(`Chat ${existingChat ? 'updated' : 'deployed'} successfully:`, chatUrl) setDeployedChatUrl(chatUrl) - // Notify parent component that deployment is complete if (onDeploymentComplete) { onDeploymentComplete() } - // Notify parent that chat exists if (onChatExistsChange) { onChatExistsChange(true) } diff --git a/sim/app/w/[id]/components/control-bar/components/deploy-modal/deploy-modal.tsx b/sim/app/w/[id]/components/control-bar/components/deploy-modal/deploy-modal.tsx index 80ae9857fff..5b9851dc20b 100644 --- a/sim/app/w/[id]/components/control-bar/components/deploy-modal/deploy-modal.tsx +++ b/sim/app/w/[id]/components/control-bar/components/deploy-modal/deploy-modal.tsx @@ -495,7 +495,6 @@ export function DeployModal({ } } - // Add a callback function to reset chat submission state const handleChatDeploymentComplete = () => { setChatSubmitting(false); }; diff --git a/sim/tools/x/read.ts b/sim/tools/x/read.ts index deb75029046..da24359c280 100644 --- a/sim/tools/x/read.ts +++ b/sim/tools/x/read.ts @@ -42,7 +42,7 @@ export const xReadTool: ToolConfig = { 'attachments.poll_ids', ].join(',') - return `https://api.x.com/2/tweets/${params.tweetId}?expansions=${expansions}` + return `https://api.twitter.com/2/tweets/${params.tweetId}?expansions=${expansions}` }, method: 'GET', headers: (params) => ({ diff --git a/sim/tools/x/search.ts b/sim/tools/x/search.ts index db9060f5f1b..a63e64ab470 100644 --- a/sim/tools/x/search.ts +++ b/sim/tools/x/search.ts @@ -72,7 +72,7 @@ export const xSearchTool: ToolConfig = { if (params.endTime) queryParams.append('end_time', params.endTime) if (params.sortOrder) queryParams.append('sort_order', params.sortOrder) - return `https://api.x.com/2/tweets/search/recent?${queryParams.toString()}` + return `https://api.twitter.com/2/tweets/search/recent?${queryParams.toString()}` }, method: 'GET', headers: (params) => ({ diff --git a/sim/tools/x/write.ts b/sim/tools/x/write.ts index ed6a4da7a3d..1ebbab7c423 100644 --- a/sim/tools/x/write.ts +++ b/sim/tools/x/write.ts @@ -42,7 +42,7 @@ export const xWriteTool: ToolConfig = { }, request: { - url: 'https://api.x.com/2/tweets', + url: 'https://api.twitter.com/2/tweets', method: 'POST', headers: (params) => ({ Authorization: `Bearer ${params.accessToken}`,