add copy text

This commit is contained in:
Test 2024-09-17 14:40:24 -07:00
parent 191a38c8fb
commit 5b9215b3c4
8 changed files with 1914 additions and 1648 deletions

View file

@ -60,7 +60,8 @@
"cheerio": "^1.0.0-rc.12",
"commander": "^12.0.0",
"comment-json": "^4.2.3",
"dbinfoz": "^0.1.4",
"dbinfoz": "^0.11.0",
"diff": "^7.0.0",
"dotenv": "^16.4.5",
"fastest-levenshtein": "^1.0.16",
"follow-redirects": "^1.15.5",
@ -104,6 +105,7 @@
"@babel/preset-env": "^7.24.7",
"@biomejs/biome": "1.6.4",
"@google/generative-ai": "^0.11.4",
"@types/diff": "^5.2.2",
"@types/follow-redirects": "^1.14.4",
"@types/jest": "^29.5.12",
"@types/jquery": "^3.5.29",

View file

@ -6,7 +6,7 @@ import {
LoadSubmenuItemsArgs,
} from "../../index.js";
import { BaseContextProvider } from "../index.js";
import getDatabaseAdapter from "dbinfoz";
import { getDatabaseAdapter } from "dbinfoz";
class DatabaseContextProvider extends BaseContextProvider {
static description: ContextProviderDescription = {

View file

@ -25,8 +25,8 @@
"cheerio": "^1.0.0-rc.12",
"commander": "^12.0.0",
"comment-json": "^4.2.3",
"diff": "^7.0.0",
"dbinfoz": "^0.11.0",
"diff": "^7.0.0",
"dotenv": "^16.4.5",
"fastest-levenshtein": "^1.0.16",
"follow-redirects": "^1.15.5",

View file

@ -1,12 +1,12 @@
{
"name": "continue",
"version": "0.9.211",
"version": "0.9.212",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "continue",
"version": "0.9.211",
"version": "0.9.212",
"license": "Apache-2.0",
"dependencies": {
"@electron/rebuild": "^3.2.10",

View file

@ -2,7 +2,7 @@
"name": "continue",
"icon": "media/icon.png",
"author": "Continue Dev, Inc",
"version": "0.9.211",
"version": "0.9.212",
"repository": {
"type": "git",
"url": "https://github.com/continuedev/continue"

3500
gui/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -27,7 +27,7 @@ import {
setBottomMessageCloseTimeout,
setShowDialog,
} from "../redux/slices/uiStateSlice";
import HeaderButtonWithText from "./HeaderButtonWithText";
import ButtonWithTooltip from "./ButtonWithTooltip";
const FOOTER_HEIGHT = "1.8em";
@ -248,7 +248,7 @@ const Layout = () => {
</div>
<ProfileSwitcher />
<HeaderButtonWithText
<ButtonWithTooltip
tooltipPlacement="top-end"
text="More"
onClick={() => {
@ -260,7 +260,7 @@ const Layout = () => {
}}
>
<EllipsisHorizontalCircleIcon width="1.4em" height="1.4em" />
</HeaderButtonWithText>
</ButtonWithTooltip>
</Footer>
</GridDiv>

View file

@ -101,16 +101,12 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) {
return (
<ToolbarDiv>
<div
className="flex items-center cursor-pointer"
className="flex items-center cursor-pointer py-0.5 px-0.5"
onClick={() => {
// Open the file
}}
>
<FileIcon
filename={"test.py"}
height={"16px"}
width={"16px"}
></FileIcon>
<FileIcon filename="test.py" height="16px" width="16px" />
{props.language}
</div>
<div className="flex items-center">
@ -137,19 +133,20 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) {
}}
>
<div
className="flex items-center gap-1"
style={{ color: lightGray }}
className={`flex items-center gap-1 text-[${lightGray}] hover:brightness-125 transition-colors duration-200`}
>
{applying ? (
<CheckIcon className="w-3 h-3 text-green-500" />
) : (
<PlayIcon className="w-3 h-3" />
)}
{isTerminalCodeBlock(props.language, props.text)
? "Run in terminal"
: applying
<span>
{isTerminalCodeBlock(props.language, props.text)
? "Run in terminal"
: applying
? "Applying..."
: "Apply"}
</span>
</div>
</ToolbarButton>
)}
@ -177,11 +174,24 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) {
setTimeout(() => setCopied(false), 2000);
}}
>
{copied ? (
<CheckIcon className="w-3 h-3 text-green-500" />
) : (
<ClipboardIcon className="w-3 h-3" color={lightGray} />
)}
<div
className={`flex items-center gap-1 text-[${lightGray}] hover:brightness-125 transition-colors duration-200`}
>
{copied ? (
<>
<CheckIcon className="w-3 h-3 text-green-500 hover:brightness-125" />
<span>Copied</span>
</>
) : (
<>
<ClipboardIcon
className="w-3 h-3 hover:brightness-125"
color={lightGray}
/>
<span>Copy</span>
</>
)}
</div>
</ToolbarButton>
</div>
</ToolbarDiv>