mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 15:07:55 -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
|
isWandEnabled: boolean
|
||||||
isPreview: boolean
|
isPreview: boolean
|
||||||
isStreaming: boolean
|
isStreaming: boolean
|
||||||
|
disabled: boolean
|
||||||
onSearchClick: () => void
|
onSearchClick: () => void
|
||||||
onSearchBlur: () => void
|
onSearchBlur: () => void
|
||||||
onSearchChange: (value: string) => void
|
onSearchChange: (value: string) => void
|
||||||
@@ -175,6 +176,7 @@ const renderLabel = (
|
|||||||
isWandEnabled,
|
isWandEnabled,
|
||||||
isPreview,
|
isPreview,
|
||||||
isStreaming,
|
isStreaming,
|
||||||
|
disabled,
|
||||||
onSearchClick,
|
onSearchClick,
|
||||||
onSearchBlur,
|
onSearchBlur,
|
||||||
onSearchChange,
|
onSearchChange,
|
||||||
@@ -208,7 +210,7 @@ const renderLabel = (
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Wand inline prompt */}
|
{/* Wand inline prompt */}
|
||||||
{isWandEnabled && !isPreview && (
|
{isWandEnabled && !isPreview && !disabled && (
|
||||||
<div className='flex min-w-0 flex-1 items-center justify-end pr-[4px]'>
|
<div className='flex min-w-0 flex-1 items-center justify-end pr-[4px]'>
|
||||||
{!isSearchActive ? (
|
{!isSearchActive ? (
|
||||||
<Button
|
<Button
|
||||||
@@ -824,6 +826,7 @@ function SubBlockComponent({
|
|||||||
isWandEnabled,
|
isWandEnabled,
|
||||||
isPreview,
|
isPreview,
|
||||||
isStreaming: wandControlRef.current?.isWandStreaming ?? false,
|
isStreaming: wandControlRef.current?.isWandStreaming ?? false,
|
||||||
|
disabled: isDisabled,
|
||||||
onSearchClick: handleSearchClick,
|
onSearchClick: handleSearchClick,
|
||||||
onSearchBlur: handleSearchBlur,
|
onSearchBlur: handleSearchBlur,
|
||||||
onSearchChange: handleSearchChange,
|
onSearchChange: handleSearchChange,
|
||||||
|
|||||||
Reference in New Issue
Block a user