Skip to content

Commit

Permalink
Move model and mode selection menus (#804)
Browse files Browse the repository at this point in the history
  • Loading branch information
logancyang authored Nov 12, 2024
1 parent b90216a commit 76f4c8d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/components/ChatComponents/ChatControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import { Notice } from "obsidian";
import React, { useEffect, useState } from "react";

import { ChainType } from "@/chainFactory";
import { TooltipActionButton } from "@/components/ChatComponents/TooltipActionButton";
import { stringToChainType } from "@/utils";
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
import { ChevronDown, Download, Puzzle, RefreshCw } from "lucide-react";
import { TooltipActionButton } from "@/components/ChatComponents/TooltipActionButton";

interface ChatControlsProps {
currentChain: ChainType;
Expand Down Expand Up @@ -120,22 +120,22 @@ const ChatControls: React.FC<ChatControlsProps> = ({
<div className="chat-icon-selection-tooltip">
<DropdownMenu.Root>
<DropdownMenu.Trigger className="chain-select-button">
{currentChain === "llm_chain" && "Chat Mode"}
{currentChain === "vault_qa" && "Vault QA Mode (Basic)"}
{currentChain === "copilot_plus" && "Copilot Plus Mode (Alpha)"}
{currentChain === "llm_chain" && "chat"}
{currentChain === "vault_qa" && "vault QA (basic)"}
{currentChain === "copilot_plus" && "copilot plus (alpha)"}
<ChevronDown size={10} />
</DropdownMenu.Trigger>

<DropdownMenu.Portal>
<DropdownMenu.Content className="chain-select-content">
<DropdownMenu.Item onSelect={() => handleChainChange({ value: "llm_chain" })}>
Chat Mode
chat
</DropdownMenu.Item>
<DropdownMenu.Item onSelect={() => handleChainChange({ value: "vault_qa" })}>
Vault QA Mode (Basic)
vault QA (basic)
</DropdownMenu.Item>
<DropdownMenu.Item onSelect={() => handleChainChange({ value: "copilot_plus" })}>
Copilot Plus Mode (Alpha)
copilot plus (alpha)
</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu.Portal>
Expand Down
4 changes: 2 additions & 2 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ If your plugin does not need CSS, delete this file.
border-radius: 4px;
padding: 4px;
font-size: 10px;
transform: translateX(18px);
transform: translateX(30px);
}

.model-select-content [role="menuitem"] {
Expand Down Expand Up @@ -258,7 +258,7 @@ If your plugin does not need CSS, delete this file.
border-radius: 4px;
padding: 4px;
font-size: 10px;
transform: translateX(-18px);
transform: translateX(-5px);
}

.chain-select-content [role="menuitem"] {
Expand Down

0 comments on commit 76f4c8d

Please sign in to comment.