diff --git a/weave-js/src/assets/icons/icon-visible.svg b/weave-js/src/assets/icons/icon-visible.svg new file mode 100644 index 00000000000..823c36bb17f --- /dev/null +++ b/weave-js/src/assets/icons/icon-visible.svg @@ -0,0 +1,4 @@ + + + + diff --git a/weave-js/src/components/Icon/Icon.tsx b/weave-js/src/components/Icon/Icon.tsx index 9c020b1bab9..32b9ca65921 100644 --- a/weave-js/src/components/Icon/Icon.tsx +++ b/weave-js/src/components/Icon/Icon.tsx @@ -256,6 +256,7 @@ import {ReactComponent as ImportVersionsLayers} from '../../assets/icons/icon-ve import {ReactComponent as ImportVertexGCP} from '../../assets/icons/icon-vertex-gcp.svg'; import {ReactComponent as ImportVideoPlay} from '../../assets/icons/icon-video-play.svg'; import {ReactComponent as ImportViewGlasses} from '../../assets/icons/icon-view-glasses.svg'; +import {ReactComponent as ImportVisible} from '../../assets/icons/icon-visible.svg'; import {ReactComponent as ImportWandb} from '../../assets/icons/icon-wandb.svg'; import {ReactComponent as ImportWarning} from '../../assets/icons/icon-warning.svg'; import {ReactComponent as ImportWarningAlt} from '../../assets/icons/icon-warning-alt.svg'; @@ -1048,6 +1049,9 @@ export const IconVideoPlay = (props: SVGIconProps) => ( export const IconViewGlasses = (props: SVGIconProps) => ( ); +export const IconVisible = (props: SVGIconProps) => ( + +); export const IconWandb = (props: SVGIconProps) => ( ); @@ -1336,6 +1340,7 @@ const ICON_NAME_TO_ICON: Record = { 'vertex-gcp': IconVertexGCP, 'video-play': IconVideoPlay, 'view-glasses': IconViewGlasses, + visible: IconVisible, wandb: IconWandb, warning: IconWarning, 'warning-alt': IconWarningAlt, diff --git a/weave-js/src/components/Icon/index.ts b/weave-js/src/components/Icon/index.ts index 85ea5332649..08bf7854ad2 100644 --- a/weave-js/src/components/Icon/index.ts +++ b/weave-js/src/components/Icon/index.ts @@ -256,6 +256,7 @@ export { IconVertexGCP, IconVideoPlay, IconViewGlasses, + IconVisible, IconWandb, IconWarning, IconWarningAlt, diff --git a/weave-js/src/components/Icon/types.ts b/weave-js/src/components/Icon/types.ts index 87a1207bc85..7ca30049257 100644 --- a/weave-js/src/components/Icon/types.ts +++ b/weave-js/src/components/Icon/types.ts @@ -255,6 +255,7 @@ export const IconNames = { VertexGCP: 'vertex-gcp', VideoPlay: 'video-play', ViewGlasses: 'view-glasses', + Visible: 'visible', Wandb: 'wandb', Warning: 'warning', WarningAlt: 'warning-alt', diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ChatView/ChoiceView.tsx b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ChatView/ChoiceView.tsx index 9e24e7e0a4a..e511d6fbf5c 100644 --- a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ChatView/ChoiceView.tsx +++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ChatView/ChoiceView.tsx @@ -8,6 +8,7 @@ type ChoiceViewProps = { isStructuredOutput?: boolean; isNested?: boolean; choiceIndex?: number; + messageHeader?: React.ReactNode; }; export const ChoiceView = ({ @@ -15,6 +16,7 @@ export const ChoiceView = ({ isStructuredOutput, isNested, choiceIndex, + messageHeader, }: ChoiceViewProps) => { const {message} = choice; return ( @@ -24,6 +26,7 @@ export const ChoiceView = ({ isStructuredOutput={isStructuredOutput} isNested={isNested} choiceIndex={choiceIndex} + messageHeader={messageHeader} /> ); }; diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ChatView/ChoicesViewCarousel.tsx b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ChatView/ChoicesViewCarousel.tsx index 18760817665..b7dc6eb427d 100644 --- a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ChatView/ChoicesViewCarousel.tsx +++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ChatView/ChoicesViewCarousel.tsx @@ -29,38 +29,39 @@ export const ChoicesViewCarousel = ({ }; return ( - <> - -
-
+ +
+
-
-
-
- + } + /> ); }; diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ChatView/MessagePanel.tsx b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ChatView/MessagePanel.tsx index 1e778727522..f570b2f6295 100644 --- a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ChatView/MessagePanel.tsx +++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ChatView/MessagePanel.tsx @@ -18,6 +18,7 @@ type MessagePanelProps = { choiceIndex?: number; isNested?: boolean; pendingToolResponseId?: string; + messageHeader?: React.ReactNode; }; export const MessagePanel = ({ @@ -30,6 +31,7 @@ export const MessagePanel = ({ // If the tool call response is pending, the editor will be shown automatically // and on save the tool call response will be updated and sent to the LLM pendingToolResponseId, + messageHeader, }: MessagePanelProps) => { const [isShowingMore, setIsShowingMore] = useState(false); const [isOverflowing, setIsOverflowing] = useState(false); @@ -116,6 +118,7 @@ export const MessagePanel = ({ 'max-h-[400px]': !isShowingMore, 'max-h-full': isShowingMore, })}> + {messageHeader} {isPlayground && editorHeight ? (