diff --git a/gui/src/components/mainInput/MentionList.tsx b/gui/src/components/mainInput/MentionList.tsx
index c639320f9..45c8d3872 100644
--- a/gui/src/components/mainInput/MentionList.tsx
+++ b/gui/src/components/mainInput/MentionList.tsx
@@ -43,7 +43,7 @@ import {
} from "../../redux/slices/uiStateSlice";
import FileIcon from "../FileIcon";
import AddDocsDialog from "../dialogs/AddDocsDialog";
-import { ComboBoxItem, ComboBoxItemType } from "./types";
+import { ComboBoxItem } from "./types";
const ICONS_FOR_DROPDOWN: { [key: string]: any } = {
file: FolderIcon,
@@ -69,21 +69,24 @@ const ICONS_FOR_DROPDOWN: { [key: string]: any } = {
"/issue": ExclamationCircleIcon,
};
-function DropdownIcon(props: {
- provider: string;
- className?: string;
- type: ComboBoxItemType;
-}) {
- if (props.type === "action") {
+function DropdownIcon(props: { className?: string; item: ComboBoxItem }) {
+ if (props.item.type === "action") {
return (
);
}
- const Icon = ICONS_FOR_DROPDOWN[props.provider];
+ const provider =
+ props.item.type === "contextProvider"
+ ? props.item.id
+ : props.item.type === "slashCommand"
+ ? props.item.id
+ : props.item.type;
+
+ const Icon = ICONS_FOR_DROPDOWN[provider];
const iconClass = `${props.className} flex-shrink-0`;
if (!Icon) {
- return props.type === "contextProvider" ? (
+ return props.item.type === "contextProvider" ? (
) : (
{
)}
{item.type !== "file" && (
<>
-
+
>
)}
{item.title}