setAuthScheme(v as AuthScheme)}
- placeholder='Select authentication...'
- />
+ onValueChange={(value) => setAuthScheme(value as AuthScheme)}
+ >
+ API Key
+ Public
+
{authScheme === 'none'
? 'Anyone can call this agent without authentication'
diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat/chat.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat/chat.tsx
index 8b56c5ab43..30a2bd79f3 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat/chat.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat/chat.tsx
@@ -424,7 +424,7 @@ export function ChatDeploy({
>
Cancel
-
diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/environment/environment.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/environment/environment.tsx
index 63d7072971..7f22ca3969 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/environment/environment.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/environment/environment.tsx
@@ -831,7 +831,7 @@ export function EnvironmentVariables({ registerBeforeLeaveHandler }: Environment
-
+
Discard Changes
{hasConflicts || hasInvalidKeys ? (
diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/team-management/components/team-seats/team-seats.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/team-management/components/team-seats/team-seats.tsx
index 58e8a2acd3..82418420ee 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/team-management/components/team-seats/team-seats.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/team-management/components/team-seats/team-seats.tsx
@@ -117,7 +117,7 @@ export function TeamSeats({
- onOpenChange(false)} disabled={isLoading}>
+ onOpenChange(false)} disabled={isLoading}>
Cancel
diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/invite-modal/invite-modal.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/invite-modal/invite-modal.tsx
index 8cb9efcaba..660389c247 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/invite-modal/invite-modal.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/invite-modal/invite-modal.tsx
@@ -709,7 +709,7 @@ export function InviteModal({ open, onOpenChange, workspaceName }: InviteModalPr
{
if (isWorkspaceTransitioning) {
@@ -77,6 +76,7 @@ export const useWorkflowRegistry = create()(
deploymentStatuses: {},
hydration: initialHydration,
clipboard: null,
+ pendingSelection: null,
beginMetadataLoad: (workspaceId: string) => {
set((state) => ({
@@ -98,7 +98,6 @@ export const useWorkflowRegistry = create()(
}, {})
set((state) => {
- // Preserve hydration if workflow is loading or already ready and still exists
const shouldPreserveHydration =
state.hydration.phase === 'state-loading' ||
(state.hydration.phase === 'ready' &&
@@ -134,9 +133,7 @@ export const useWorkflowRegistry = create()(
}))
},
- // Switch to workspace - just clear state, let sidebar handle workflow loading
switchToWorkspace: async (workspaceId: string) => {
- // Prevent multiple simultaneous transitions
if (isWorkspaceTransitioning) {
logger.warn(
`Ignoring workspace switch to ${workspaceId} - transition already in progress`
@@ -144,16 +141,13 @@ export const useWorkflowRegistry = create()(
return
}
- // Set transition flag
setWorkspaceTransitioning(true)
try {
logger.info(`Switching to workspace: ${workspaceId}`)
- // Clear current workspace state
resetWorkflowStores()
- // Update state - sidebar will load workflows when URL changes
set({
activeWorkflowId: null,
workflows: {},
@@ -186,26 +180,21 @@ export const useWorkflowRegistry = create()(
}
},
- // Method to get deployment status for a specific workflow
getWorkflowDeploymentStatus: (workflowId: string | null): DeploymentStatus | null => {
if (!workflowId) {
- // If no workflow ID provided, check the active workflow
workflowId = get().activeWorkflowId
if (!workflowId) return null
}
const { deploymentStatuses = {} } = get()
- // Get from the workflow-specific deployment statuses in the registry
if (deploymentStatuses[workflowId]) {
return deploymentStatuses[workflowId]
}
- // No deployment status found
return null
},
- // Method to set deployment status for a specific workflow
setDeploymentStatus: (
workflowId: string | null,
isDeployed: boolean,
@@ -217,7 +206,6 @@ export const useWorkflowRegistry = create()(
if (!workflowId) return
}
- // Update the deployment statuses in the registry
set((state) => ({
deploymentStatuses: {
...state.deploymentStatuses,
@@ -225,7 +213,6 @@ export const useWorkflowRegistry = create()(
isDeployed,
deployedAt: deployedAt || (isDeployed ? new Date() : undefined),
apiKey,
- // Preserve existing needsRedeployment flag if available, but reset if newly deployed
needsRedeployment: isDeployed
? false
: ((state.deploymentStatuses?.[workflowId as string] as any)?.needsRedeployment ??
@@ -235,14 +222,12 @@ export const useWorkflowRegistry = create()(
}))
},
- // Method to set the needsRedeployment flag for a specific workflow
setWorkflowNeedsRedeployment: (workflowId: string | null, needsRedeployment: boolean) => {
if (!workflowId) {
workflowId = get().activeWorkflowId
if (!workflowId) return
}
- // Update the registry's deployment status for this specific workflow
set((state) => {
const deploymentStatuses = state.deploymentStatuses || {}
const currentStatus = deploymentStatuses[workflowId as string] || { isDeployed: false }
@@ -258,7 +243,6 @@ export const useWorkflowRegistry = create()(
}
})
- // Only update the global flag if this is the active workflow
const { activeWorkflowId } = get()
if (workflowId === activeWorkflowId) {
useWorkflowStore.getState().setNeedsRedeploymentFlag(needsRedeployment)
@@ -402,7 +386,6 @@ export const useWorkflowRegistry = create()(
}
},
- // Modified setActiveWorkflow to work with clean DB-only architecture
setActiveWorkflow: async (id: string) => {
const { activeWorkflowId, hydration } = get()
@@ -473,7 +456,6 @@ export const useWorkflowRegistry = create()(
return null
}
- // Use the server-generated ID
const id = duplicatedWorkflow.id
const newWorkflow: WorkflowMetadata = {
@@ -843,6 +825,16 @@ export const useWorkflowRegistry = create()(
clearClipboard: () => {
set({ clipboard: null })
},
+
+ setPendingSelection: (blockIds: string[]) => {
+ set((state) => ({
+ pendingSelection: [...(state.pendingSelection ?? []), ...blockIds],
+ }))
+ },
+
+ clearPendingSelection: () => {
+ set({ pendingSelection: null })
+ },
}),
{ name: 'workflow-registry' }
)
diff --git a/apps/sim/stores/workflows/registry/types.ts b/apps/sim/stores/workflows/registry/types.ts
index 8ea62dde69..3c49bf2336 100644
--- a/apps/sim/stores/workflows/registry/types.ts
+++ b/apps/sim/stores/workflows/registry/types.ts
@@ -52,6 +52,7 @@ export interface WorkflowRegistryState {
deploymentStatuses: Record
hydration: HydrationState
clipboard: ClipboardData | null
+ pendingSelection: string[] | null
}
export interface WorkflowRegistryActions {
@@ -82,6 +83,8 @@ export interface WorkflowRegistryActions {
} | null
hasClipboard: () => boolean
clearClipboard: () => void
+ setPendingSelection: (blockIds: string[]) => void
+ clearPendingSelection: () => void
logout: () => void
}