Merge pull request #7220 from continuedev/dallin/move-docs-indexing-to-settings
chore: move docs section from lump toolbar to settings
This commit is contained in:
commit
eb3fdf3de9
3 changed files with 22 additions and 16 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import {
|
||||
BookOpenIcon,
|
||||
ChatBubbleLeftIcon,
|
||||
ChevronLeftIcon,
|
||||
CubeIcon,
|
||||
|
|
@ -47,7 +46,6 @@ interface Section {
|
|||
const sections: Section[] = [
|
||||
{ id: "models", title: "Models", tooltip: "Models", icon: CubeIcon },
|
||||
{ id: "rules", title: "Rules", tooltip: "Rules", icon: PencilIcon },
|
||||
{ id: "docs", title: "Docs", tooltip: "Docs", icon: BookOpenIcon },
|
||||
{
|
||||
id: "prompts",
|
||||
title: "Prompts",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { useLump } from "../LumpContext";
|
||||
import { ContextSection } from "./ContextSection";
|
||||
import DocsSection from "./docs/DocsSection";
|
||||
import { ErrorSection } from "./errors/ErrorSection";
|
||||
import MCPSection from "./mcp/MCPSection";
|
||||
import { ModelsSection } from "./ModelsSection";
|
||||
|
|
@ -19,8 +18,6 @@ export function SelectedSection() {
|
|||
return <ModelsSection />;
|
||||
case "rules":
|
||||
return <RulesSection />;
|
||||
case "docs":
|
||||
return <DocsSection />;
|
||||
case "prompts":
|
||||
return <PromptsSection />;
|
||||
case "context":
|
||||
|
|
|
|||
|
|
@ -1,26 +1,37 @@
|
|||
import DocsIndexingStatuses from "../../components/mainInput/Lump/sections/docs/DocsSection";
|
||||
import { useAppSelector } from "../../redux/hooks";
|
||||
import IndexingProgress from "./IndexingProgress";
|
||||
|
||||
export function IndexingSettingsSection() {
|
||||
const config = useAppSelector((state) => state.config.config);
|
||||
return (
|
||||
<div className="py-5">
|
||||
<div className="flex flex-col gap-3 py-5">
|
||||
<div>
|
||||
<h3 className="mx-auto mb-1 mt-0 text-xl">@codebase index</h3>
|
||||
<span className="text-lightgray w-3/4 text-xs">
|
||||
Local embeddings of your codebase
|
||||
</span>
|
||||
{config.disableIndexing ? (
|
||||
<div className="pb-2 pt-5">
|
||||
<p className="py-1 text-center font-semibold">
|
||||
Indexing is disabled
|
||||
</p>
|
||||
<p className="text-lightgray cursor-pointer text-center text-xs">
|
||||
Open settings and toggle <code>Enable Indexing</code> to re-enable
|
||||
</p>
|
||||
</div>
|
||||
) : (
|
||||
<IndexingProgress />
|
||||
)}
|
||||
</div>
|
||||
{config.disableIndexing ? (
|
||||
<div className="pb-2 pt-5">
|
||||
<p className="py-1 text-center font-semibold">Indexing is disabled</p>
|
||||
<p className="text-lightgray cursor-pointer text-center text-xs">
|
||||
Open settings and toggle <code>Enable Indexing</code> to re-enable
|
||||
</p>
|
||||
</div>
|
||||
) : (
|
||||
<IndexingProgress />
|
||||
)}
|
||||
|
||||
<div className="mt-5">
|
||||
<h3 className="mx-auto mb-1 mt-0 text-xl">@docs index</h3>
|
||||
<span className="text-lightgray w-3/4 text-xs">
|
||||
Local embeddings of your documentation sources
|
||||
</span>
|
||||
</div>
|
||||
<DocsIndexingStatuses />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue