mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-07 22:24:06 -05:00
fix(wand): should not be able to use wand ui without write/admin perms (#2384)
This commit is contained in:
committed by
GitHub
parent
9762bbc451
commit
8d38c2f15e
@@ -157,6 +157,7 @@ const renderLabel = (
|
||||
isWandEnabled: boolean
|
||||
isPreview: boolean
|
||||
isStreaming: boolean
|
||||
disabled: boolean
|
||||
onSearchClick: () => void
|
||||
onSearchBlur: () => void
|
||||
onSearchChange: (value: string) => void
|
||||
@@ -175,6 +176,7 @@ const renderLabel = (
|
||||
isWandEnabled,
|
||||
isPreview,
|
||||
isStreaming,
|
||||
disabled,
|
||||
onSearchClick,
|
||||
onSearchBlur,
|
||||
onSearchChange,
|
||||
@@ -208,7 +210,7 @@ const renderLabel = (
|
||||
</div>
|
||||
|
||||
{/* Wand inline prompt */}
|
||||
{isWandEnabled && !isPreview && (
|
||||
{isWandEnabled && !isPreview && !disabled && (
|
||||
<div className='flex min-w-0 flex-1 items-center justify-end pr-[4px]'>
|
||||
{!isSearchActive ? (
|
||||
<Button
|
||||
@@ -824,6 +826,7 @@ function SubBlockComponent({
|
||||
isWandEnabled,
|
||||
isPreview,
|
||||
isStreaming: wandControlRef.current?.isWandStreaming ?? false,
|
||||
disabled: isDisabled,
|
||||
onSearchClick: handleSearchClick,
|
||||
onSearchBlur: handleSearchBlur,
|
||||
onSearchChange: handleSearchChange,
|
||||
|
||||
Reference in New Issue
Block a user