move more things around

This commit is contained in:
Nate 2025-03-21 17:13:00 -07:00
parent cd5cbfd621
commit 4081730873
3 changed files with 23 additions and 25 deletions

View file

@ -2,10 +2,10 @@ import {
ArrowPathIcon,
ArrowTopRightOnSquareIcon,
StopIcon,
TrashIcon,
} from "@heroicons/react/24/outline";
import { SiteIndexingConfig } from "core";
import { useContext, useMemo, useState } from "react";
import { useAuth } from "../../../../../context/Auth";
import { IdeMessengerContext } from "../../../../../context/IdeMessenger";
import { useAppDispatch, useAppSelector } from "../../../../../redux/hooks";
import { updateIndexingStatus } from "../../../../../redux/slices/indexingSlice";
@ -22,8 +22,8 @@ interface IndexingStatusViewerProps {
}
function DocsIndexingStatus({ docConfig }: IndexingStatusViewerProps) {
const config = useAppSelector((store) => store.config.config);
const ideMessenger = useContext(IdeMessengerContext);
const { selectedProfile } = useAuth();
const dispatch = useAppDispatch();
const status = useAppSelector(
@ -138,12 +138,14 @@ function DocsIndexingStatus({ docConfig }: IndexingStatusViewerProps) {
/>
)}
{status?.status !== "indexing" ? (
{/* Commenting out until we have ability to edit local YAML for the user to remove the docs */}
{/* {selectedProfile?.profileType === "local" &&
status?.status !== "indexing" ? (
<TrashIcon
className="h-3 w-3 cursor-pointer text-gray-400 hover:brightness-125"
onClick={onDelete}
/>
) : null}
) : null} */}
<StatusIndicator status={status?.status} />
</div>

View file

@ -1,3 +1,4 @@
import { PlusIcon } from "@heroicons/react/24/outline";
import { IndexingStatus } from "core";
import { useMemo } from "react";
import { useDispatch } from "react-redux";
@ -6,6 +7,7 @@ import {
setDialogMessage,
setShowDialog,
} from "../../../../../redux/slices/uiSlice";
import { getFontSize } from "../../../../../util";
import AddDocsDialog from "../../../../dialogs/AddDocsDialog";
import DocsIndexingStatus from "./DocsIndexingStatus";
@ -69,17 +71,19 @@ function DocsIndexingStatuses() {
})}
</div>
{sortedConfigDocs.length > 0 && (
<div className="flex justify-start">
<a
href="#"
className="cursor-pointer text-blue-500 hover:text-blue-600 hover:underline"
onClick={(e) => {
e.preventDefault();
handleAddDocs();
}}
>
Add
</a>
<div
className="cursor-pointer rounded px-2 py-1 text-center text-gray-400 hover:text-gray-300"
style={{
fontSize: `${getFontSize() - 3}px`,
}}
onClick={(e) => {
e.preventDefault();
handleAddDocs();
}}
>
<div className="flex items-center justify-center gap-1">
<PlusIcon className="h-3 w-3" /> Add
</div>
</div>
)}
</div>

View file

@ -1,11 +1,11 @@
import { Listbox } from "@headlessui/react";
import {
CheckIcon,
ChevronDownIcon,
Cog6ToothIcon,
CubeIcon,
PlusIcon,
TrashIcon,
CheckIcon,
} from "@heroicons/react/24/outline";
import { useContext, useEffect, useRef, useState } from "react";
import { useDispatch } from "react-redux";
@ -29,7 +29,6 @@ interface ModelOptionProps {
option: Option;
idx: number;
showMissingApiKeyMsg: boolean;
showDelete?: boolean;
isSelected?: boolean;
}
@ -132,7 +131,6 @@ function modelSelectTitle(model: any): string {
function ModelOption({
option,
idx,
showDelete,
showMissingApiKeyMsg,
isSelected,
}: ModelOptionProps) {
@ -199,12 +197,7 @@ function ModelOption({
</div>
<div className="ml-5 flex items-center">
<StyledCog6ToothIcon $hovered={hovered} onClick={onClickGear} />
{showDelete && (
<StyledTrashIcon $hovered={hovered} onClick={onClickDelete} />
)}
{isSelected && (
<CheckIcon className="ml-1 h-4 w-4" />
)}
{isSelected && <CheckIcon className="ml-1 h-4 w-4" />}
</div>
</div>
</div>
@ -342,7 +335,6 @@ function ModelSelect() {
option={option}
idx={idx}
key={idx}
showDelete={options.length > 1}
showMissingApiKeyMsg={option.apiKey === ""}
isSelected={option.value === defaultModel?.title}
/>