feat: more visible assistant refresh + submenus

This commit is contained in:
Patrick Erichsen 2025-04-30 10:51:15 -07:00
parent b714d23b3a
commit 1fd2ce90f2
4 changed files with 27 additions and 14 deletions

View File

@ -74,6 +74,7 @@
"http-proxy-agent": "^7.0.1",
"https-proxy-agent": "^7.0.3",
"ignore": "^5.3.1",
"is-localhost-ip": "^2.0.0",
"jinja-js": "0.1.8",
"js-tiktoken": "^1.0.8",
"jsdom": "^24.0.0",

View File

@ -1,12 +1,12 @@
{
"name": "continue",
"version": "1.1.28",
"version": "1.1.29",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "continue",
"version": "1.1.28",
"version": "1.1.29",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/fetch": "^1.0.3",

View File

@ -4,8 +4,8 @@ import {
ChatBubbleLeftIcon,
PlusIcon,
} from "@heroicons/react/24/outline";
import { Editor } from "@tiptap/react";
import { RangeInFile } from "core";
import type { Editor } from "@tiptap/react";
import type { RangeInFile } from "core";
import {
forwardRef,
useContext,
@ -32,7 +32,7 @@ import SafeImg from "../../SafeImg";
import AddDocsDialog from "../../dialogs/AddDocsDialog";
import HeaderButtonWithToolTip from "../../gui/HeaderButtonWithToolTip";
import { NAMED_ICONS } from "../icons";
import { ComboBoxItem, ComboBoxItemType } from "../types";
import type { ComboBoxItem, ComboBoxItemType } from "../types";
export function getIconFromDropdownItem(
id: string | undefined,
@ -509,7 +509,9 @@ const AtMentionDropdown = forwardRef((props: AtMentionDropdownProps, ref) => {
) : (
<DropdownIcon item={item} className="mr-2" />
)}
<span title={item.id} className="whitespace-nowrap">{item.title}</span>
<span title={item.id} className="whitespace-nowrap">
{item.title}
</span>
{" "}
</div>
<span
@ -517,7 +519,12 @@ const AtMentionDropdown = forwardRef((props: AtMentionDropdownProps, ref) => {
color: lightGray,
float: "right",
textAlign: "right",
opacity: isSelected ? 1 : 0,
opacity:
subMenuTitle || item.type !== "contextProvider"
? 1
: isSelected
? 1
: 0,
minWidth: "30px",
}}
className="ml-2 flex items-center overflow-hidden overflow-ellipsis whitespace-nowrap"

View File

@ -30,7 +30,7 @@ import {
Transition,
} from "../../ui";
import { ProfileDescription } from "core/config/ConfigHandler";
import type { ProfileDescription } from "core/config/ConfigHandler";
import { useNavigate } from "react-router-dom";
import { vscCommandCenterInactiveBorder } from "../..";
import { cn } from "../../../util/cn";
@ -158,7 +158,7 @@ export default function AssistantSelect() {
const orgs = useAppSelector((store) => store.profiles.organizations);
const ideMessenger = useContext(IdeMessengerContext);
const { isToolbarExpanded } = useLump();
const [loading, setLoading] = useState(false)
const [loading, setLoading] = useState(false);
const { profiles, session, login } = useAuth();
const navigate = useNavigate();
@ -287,19 +287,24 @@ export default function AssistantSelect() {
<Transition>
<ListboxOptions className="pb-0">
<div className="flex justify-between gap-1.5 px-2.5 py-1">
<div className="flex gap-1.5 px-2.5 py-1">
<span>Assistants</span>
<div
className="flex cursor-pointer flex-row items-center gap-1 hover:brightness-125"
onClick={async (e) => {
e.stopPropagation();
setLoading(true)
await refreshProfiles()
setLoading(false)
setLoading(true);
await refreshProfiles();
setLoading(false);
buttonRef.current?.click();
}}
>
<ArrowPathIcon className={cn("text-lightgray h-2.5 w-2.5", loading && 'animate-spin-slow')} />
<ArrowPathIcon
className={cn(
"text-lightgray h-2.5 w-2.5",
loading && "animate-spin-slow",
)}
/>
</div>
</div>