more notch updates
This commit is contained in:
parent
1d9278f704
commit
b757bd5c18
2 changed files with 42 additions and 78 deletions
|
|
@ -1,8 +1,4 @@
|
|||
import {
|
||||
ChevronLeftIcon,
|
||||
EllipsisHorizontalIcon,
|
||||
ExclamationTriangleIcon,
|
||||
} from "@heroicons/react/24/outline";
|
||||
import { ExclamationTriangleIcon } from "@heroicons/react/24/outline";
|
||||
import { ReactNode, useContext, useEffect, useState } from "react";
|
||||
import { vscBadgeForeground } from "../../..";
|
||||
import { IdeMessengerContext } from "../../../../context/IdeMessenger";
|
||||
|
|
@ -89,9 +85,7 @@ function BlockSettingsToolbarIcon(
|
|||
/>
|
||||
<div
|
||||
style={{ fontSize }}
|
||||
className={`overflow-hidden transition-all duration-200 ${
|
||||
props.isSelected ? "ml-1 w-auto opacity-100" : "w-0 opacity-0"
|
||||
}`}
|
||||
className="ml-1 w-auto opacity-100"
|
||||
>
|
||||
<span
|
||||
className="whitespace-nowrap"
|
||||
|
|
@ -110,12 +104,7 @@ function BlockSettingsToolbarIcon(
|
|||
}
|
||||
|
||||
export function BlockSettingsTopToolbar() {
|
||||
const {
|
||||
isToolbarExpanded,
|
||||
toggleToolbar,
|
||||
selectedSection,
|
||||
setSelectedSection,
|
||||
} = useLump();
|
||||
const { selectedSection, setSelectedSection } = useLump();
|
||||
|
||||
const configError = useAppSelector((store) => store.config.configError);
|
||||
const config = useAppSelector((state) => state.config.config);
|
||||
|
|
@ -153,13 +142,6 @@ export function BlockSettingsTopToolbar() {
|
|||
};
|
||||
}, [ideMessenger, isUsingFreeTrial]);
|
||||
|
||||
const handleEllipsisClick = () => {
|
||||
if (isToolbarExpanded) {
|
||||
setSelectedSection(null);
|
||||
}
|
||||
toggleToolbar();
|
||||
};
|
||||
|
||||
const visibleSections = sections.filter(
|
||||
(section) =>
|
||||
section.id !== "error" ||
|
||||
|
|
@ -169,36 +151,22 @@ export function BlockSettingsTopToolbar() {
|
|||
return (
|
||||
<div className="flex flex-1 items-center justify-between gap-2">
|
||||
<div className="flex flex-row">
|
||||
<div className="xs:flex text-description hidden items-center justify-center gap-0.5">
|
||||
<BlockSettingsToolbarIcon
|
||||
className="-ml-1.5"
|
||||
icon={isToolbarExpanded ? ChevronLeftIcon : EllipsisHorizontalIcon}
|
||||
tooltip={isToolbarExpanded ? "Collapse Toolbar" : "Expand Toolbar"}
|
||||
title=""
|
||||
isSelected={false}
|
||||
onClick={handleEllipsisClick}
|
||||
/>
|
||||
<div
|
||||
className={`${isToolbarExpanded ? "w-min" : "w-0"} flex overflow-hidden transition-all duration-200`}
|
||||
>
|
||||
<div className="flex">
|
||||
{visibleSections.map((section) => (
|
||||
<BlockSettingsToolbarIcon
|
||||
key={section.id}
|
||||
sectionId={section.id}
|
||||
icon={section.icon}
|
||||
tooltip={section.tooltip}
|
||||
title={section.title}
|
||||
isSelected={selectedSection === section.id}
|
||||
onClick={() =>
|
||||
setSelectedSection(
|
||||
selectedSection === section.id ? null : section.id,
|
||||
)
|
||||
}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center justify-center gap-0.5">
|
||||
{visibleSections.map((section) => (
|
||||
<BlockSettingsToolbarIcon
|
||||
key={section.id}
|
||||
sectionId={section.id}
|
||||
icon={section.icon}
|
||||
tooltip={section.tooltip}
|
||||
title={section.title}
|
||||
isSelected={selectedSection === section.id}
|
||||
onClick={() =>
|
||||
setSelectedSection(
|
||||
selectedSection === section.id ? null : section.id,
|
||||
)
|
||||
}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex gap-0.5">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
import {
|
||||
BoltIcon,
|
||||
BookOpenIcon,
|
||||
ChatBubbleLeftIcon,
|
||||
CircleStackIcon,
|
||||
Cog6ToothIcon,
|
||||
CubeIcon,
|
||||
|
|
@ -12,10 +10,8 @@ import {
|
|||
} from "@heroicons/react/24/outline";
|
||||
import { useState } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import DocsSection from "../../components/mainInput/Lump/sections/docs/DocsSection";
|
||||
import MCPSection from "../../components/mainInput/Lump/sections/mcp/MCPSection";
|
||||
import { ModelsSection } from "../../components/mainInput/Lump/sections/ModelsSection";
|
||||
import { PromptsSection } from "../../components/mainInput/Lump/sections/PromptsSection";
|
||||
import { RulesSection } from "../../components/mainInput/Lump/sections/RulesSection";
|
||||
import { ToolPoliciesSection } from "../../components/mainInput/Lump/sections/tool-policies/ToolPoliciesSection";
|
||||
import { PageHeader } from "../../components/PageHeader";
|
||||
|
|
@ -68,28 +64,28 @@ function ConfigPage() {
|
|||
),
|
||||
icon: <PencilIcon className="xs:h-4 xs:w-4 h-3 w-3 flex-shrink-0" />,
|
||||
},
|
||||
{
|
||||
id: "docs",
|
||||
label: "Docs",
|
||||
component: (
|
||||
<div className="mt-4">
|
||||
<h3 className="mb-4 mt-0 text-xl">Documentation</h3>
|
||||
<DocsSection />
|
||||
</div>
|
||||
),
|
||||
icon: <BookOpenIcon className="xs:h-4 xs:w-4 h-3 w-3 flex-shrink-0" />,
|
||||
},
|
||||
{
|
||||
id: "prompts",
|
||||
label: "Prompts",
|
||||
component: (
|
||||
<div className="mt-4">
|
||||
<h3 className="mb-4 mt-0 text-xl">Prompts</h3>
|
||||
<PromptsSection />
|
||||
</div>
|
||||
),
|
||||
icon: <ChatBubbleLeftIcon className="xs:h-4 xs:w-4 h-3 w-3 flex-shrink-0" />,
|
||||
},
|
||||
// {
|
||||
// id: "docs",
|
||||
// label: "Docs",
|
||||
// component: (
|
||||
// <div className="mt-4">
|
||||
// <h3 className="mb-4 mt-0 text-xl">Documentation</h3>
|
||||
// <DocsSection />
|
||||
// </div>
|
||||
// ),
|
||||
// icon: <BookOpenIcon className="xs:h-4 xs:w-4 h-3 w-3 flex-shrink-0" />,
|
||||
// },
|
||||
// {
|
||||
// id: "prompts",
|
||||
// label: "Prompts",
|
||||
// component: (
|
||||
// <div className="mt-4">
|
||||
// <h3 className="mb-4 mt-0 text-xl">Prompts</h3>
|
||||
// <PromptsSection />
|
||||
// </div>
|
||||
// ),
|
||||
// icon: <ChatBubbleLeftIcon className="xs:h-4 xs:w-4 h-3 w-3 flex-shrink-0" />,
|
||||
// },
|
||||
{
|
||||
id: "tools",
|
||||
label: "Tools",
|
||||
|
|
@ -142,7 +138,7 @@ function ConfigPage() {
|
|||
/>
|
||||
|
||||
{/* Tab Headers */}
|
||||
<div className="bg-vsc-input-background flex flex-wrap cursor-pointer border-0 border-b-[1px] border-solid border-b-zinc-700 p-0.5 justify-center gap-x-2 gap-y-1">
|
||||
<div className="bg-vsc-input-background flex cursor-pointer flex-wrap justify-center gap-x-2 gap-y-1 border-0 border-b-[1px] border-solid border-b-zinc-700 p-0.5">
|
||||
{tabs.map((tab) => (
|
||||
<div
|
||||
style={{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue