Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function POST(

const workflow = access.workflow

let payload: any = {}
let payload: Record<string, unknown> = {}
try {
payload = await request.json()
} catch {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,11 @@ export function ChunkContextMenu({
)}

{/* Destructive action */}
{onToggleEnabled && onDelete && <PopoverDivider />}
{onDelete &&
((!isMultiSelect && onOpenInNewTab) ||
(!isMultiSelect && onEdit) ||
(!isMultiSelect && onCopyContent) ||
onToggleEnabled) && <PopoverDivider />}
{onDelete && (
<PopoverItem
disabled={disableDelete}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ export function DocumentContextMenu({
)}

{/* Destructive action */}
{onToggleEnabled && onDelete && <PopoverDivider />}
{onDelete &&
((!isMultiSelect && onOpenInNewTab) ||
(!isMultiSelect && onRename) ||
(!isMultiSelect && hasTags && onViewTags) ||
onToggleEnabled) && <PopoverDivider />}
{onDelete && (
<PopoverItem
disabled={disableDelete}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,12 @@ export function KnowledgeBaseContextMenu({
)}

{/* Destructive action */}
{showEdit && onEdit && showDelete && onDelete && <PopoverDivider />}
{showDelete &&
onDelete &&
((showOpenInNewTab && onOpenInNewTab) ||
(showViewTags && onViewTags) ||
onCopyId ||
(showEdit && onEdit)) && <PopoverDivider />}
{showDelete && onDelete && (
<PopoverItem
disabled={disableDelete}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { signOut, useSession } from '@/lib/auth/auth-client'
import { ANONYMOUS_USER_ID } from '@/lib/auth/constants'
import { useBrandConfig } from '@/lib/branding/branding'
import { getEnv, isTruthy } from '@/lib/core/config/env'
import { isHosted } from '@/lib/core/config/feature-flags'
import { getBaseUrl } from '@/lib/core/utils/urls'
import { useProfilePictureUpload } from '@/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/hooks/use-profile-picture-upload'
import { useGeneralSettings, useUpdateGeneralSetting } from '@/hooks/queries/general-settings'
Expand Down Expand Up @@ -565,13 +566,15 @@ export function General({ onOpenChange }: GeneralProps) {
</Button>
</>
)}
<Button
onClick={() => window.open('/?from=settings', '_blank', 'noopener,noreferrer')}
variant='active'
className='ml-auto'
>
Home Page
</Button>
{isHosted && (
<Button
onClick={() => window.open('/?from=settings', '_blank', 'noopener,noreferrer')}
variant='active'
className='ml-auto'
>
Home Page
</Button>
)}
</div>

{/* Password Reset Confirmation Modal */}
Expand Down
6 changes: 3 additions & 3 deletions apps/sim/tools/http/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ export interface RequestParams {
url: string
method?: HttpMethod
headers?: TableRow[]
body?: any
body?: unknown
params?: TableRow[]
pathParams?: Record<string, string>
formData?: Record<string, string | Blob>
}

export interface RequestResponse extends ToolResponse {
output: {
data: any
data: unknown
status: number
headers: Record<string, string>
}
}

export interface WebhookRequestParams {
url: string
body?: any
body?: unknown
secret?: string
headers?: Record<string, string>
}
Loading