Skip to content

Commit 009e88b

Browse files
authored
Merge pull request #4743 from continuedev/nate/blocks-front-and-center
organize the input box folder
2 parents aa20fde + 7ccf9d8 commit 009e88b

File tree

108 files changed

+3336
-3105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+3336
-3105
lines changed

core/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ export interface PromptLog {
439439
completion: string;
440440
}
441441

442-
export type MessageModes = "chat" | "edit";
442+
export type MessageModes = "chat" | "edit" | "agent";
443443

444444
export type ToolStatus =
445445
| "generating"

extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt

-9
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,3 @@ class OpenConfigAction : AnAction() {
126126
continuePluginService.sendToWebview("navigateTo", params)
127127
}
128128
}
129-
130-
class OpenMorePageAction : AnAction() {
131-
override fun actionPerformed(e: AnActionEvent) {
132-
val continuePluginService = getContinuePluginService(e.project) ?: return
133-
continuePluginService.continuePluginWindow?.content?.components?.get(0)?.requestFocus()
134-
val params = mapOf("path" to "/more", "toggle" to true)
135-
continuePluginService.sendToWebview("navigateTo", params)
136-
}
137-
}

extensions/intellij/src/main/resources/META-INF/plugin.xml

-9
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,10 @@
140140
<override-text place="GoToAction" text="Continue Config"/>
141141
</action>
142142

143-
<action id="continue.openMorePage"
144-
class="com.github.continuedev.continueintellijextension.actions.OpenMorePageAction"
145-
icon="AllIcons.Actions.MoreHorizontal"
146-
text="More"
147-
description="More">
148-
<override-text place="GoToAction" text="More"/>
149-
</action>
150-
151143
<group id="ContinueSidebarActionsGroup">
152144
<reference ref="continue.newContinueSession"/>
153145
<reference ref="continue.viewHistory"/>
154146
<reference ref="continue.openConfigPage"/>
155-
<reference ref="continue.openMorePage"/>
156147
</group>
157148

158149
<action id="continue.focusContinueInput"

extensions/vscode/package.json

+1-13
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "continue",
33
"icon": "media/icon.png",
44
"author": "Continue Dev, Inc",
5-
"version": "1.1.13",
5+
"version": "1.1.14",
66
"repository": {
77
"type": "git",
88
"url": "https://github.com/continuedev/continue"
@@ -258,13 +258,6 @@
258258
"title": "Navigate to a path",
259259
"group": "Continue"
260260
},
261-
{
262-
"command": "continue.openMorePage",
263-
"category": "Continue",
264-
"title": "More",
265-
"icon": "$(ellipsis)",
266-
"group": "Continue"
267-
},
268261
{
269262
"command": "continue.writeCommentsForCode",
270263
"category": "Continue",
@@ -512,11 +505,6 @@
512505
"command": "continue.openConfigPage",
513506
"group": "navigation@4",
514507
"when": "view == continue.continueGUIView"
515-
},
516-
{
517-
"command": "continue.openMorePage",
518-
"group": "navigation@6",
519-
"when": "view == continue.continueGUIView"
520508
}
521509
],
522510
"editor/title": [

extensions/vscode/src/commands.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ async function processDiff(
284284
}
285285

286286
await sidebar.webviewProtocol.request("exitEditMode", undefined);
287+
288+
// Save the file
289+
await ide.saveFile(newOrCurrentUri);
287290
}
288291

289292
function waitForSidebarReady(
@@ -991,9 +994,6 @@ const getCommandsMap: (
991994
vscode.commands.executeCommand("continue.focusContinueInput");
992995
} else if (selectedOption === "$(screen-full) Open full screen chat") {
993996
vscode.commands.executeCommand("continue.toggleFullScreen");
994-
} else if (selectedOption === "$(question) Open help center") {
995-
focusGUI();
996-
vscode.commands.executeCommand("continue.navigateTo", "/more", true);
997997
}
998998
quickPick.dispose();
999999
});
@@ -1016,9 +1016,6 @@ const getCommandsMap: (
10161016
client.sendFeedback(feedback, lastLines);
10171017
}
10181018
},
1019-
"continue.openMorePage": () => {
1020-
vscode.commands.executeCommand("continue.navigateTo", "/more", true);
1021-
},
10221019
"continue.navigateTo": (path: string, toggle: boolean) => {
10231020
sidebar.webviewProtocol?.request("navigateTo", { path, toggle });
10241021
focusGUI();

gui/editorInset/index.html

-13
This file was deleted.

gui/editorInset/vite.config.ts

-19
This file was deleted.

gui/src/App.tsx

+2-13
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
import { useDispatch } from "react-redux";
21
import { RouterProvider, createMemoryRouter } from "react-router-dom";
32
import Layout from "./components/Layout";
3+
import { SubmenuContextProvidersProvider } from "./context/SubmenuContextProviders";
44
import { VscThemeProvider } from "./context/VscTheme";
55
import useSetup from "./hooks/useSetup";
66
import { AddNewModel, ConfigureProvider } from "./pages/AddNewModel";
7+
import ConfigPage from "./pages/config";
78
import ConfigErrorPage from "./pages/config-error";
89
import ErrorPage from "./pages/error";
910
import Chat from "./pages/gui";
1011
import History from "./pages/history";
11-
import MigrationPage from "./pages/migration";
12-
import MorePage from "./pages/More";
1312
import Stats from "./pages/stats";
1413
import { ROUTES } from "./util/navigation";
15-
import { SubmenuContextProvidersProvider } from "./context/SubmenuContextProviders";
16-
import ConfigPage from "./pages/config";
1714

1815
const router = createMemoryRouter([
1916
{
@@ -45,10 +42,6 @@ const router = createMemoryRouter([
4542
path: "/addModel/provider/:providerName",
4643
element: <ConfigureProvider />,
4744
},
48-
{
49-
path: "/more",
50-
element: <MorePage />,
51-
},
5245
{
5346
path: ROUTES.CONFIG_ERROR,
5447
element: <ConfigErrorPage />,
@@ -57,10 +50,6 @@ const router = createMemoryRouter([
5750
path: ROUTES.CONFIG,
5851
element: <ConfigPage />,
5952
},
60-
{
61-
path: "/migration",
62-
element: <MigrationPage />,
63-
},
6453
],
6554
},
6655
]);

gui/src/components/ConversationStarters/ConversationStarterCard.tsx

+9-34
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,37 @@
1-
import { BookmarkIcon, ChatBubbleLeftIcon } from "@heroicons/react/24/outline";
2-
import { BookmarkIcon as BookmarkIconSolid } from "@heroicons/react/24/solid";
1+
import { ChatBubbleLeftIcon } from "@heroicons/react/24/outline";
32
import { SlashCommandDescription } from "core";
43
import { useState } from "react";
5-
import { defaultBorderRadius, GhostButton, vscInputBackground } from "..";
4+
import { defaultBorderRadius, vscInputBackground } from "..";
65

76
interface ConversationStarterCardProps {
87
command: SlashCommandDescription;
98
onClick: (command: SlashCommandDescription) => void;
10-
onBookmark: (command: SlashCommandDescription) => void;
11-
isBookmarked: boolean;
129
}
1310

1411
export function ConversationStarterCard({
1512
command,
1613
onClick,
17-
onBookmark,
18-
isBookmarked = false,
1914
}: ConversationStarterCardProps) {
2015
const [isHovered, setIsHovered] = useState(false);
2116

2217
return (
2318
<div
24-
className="mb-2 w-full shadow-md hover:brightness-110"
19+
className="mb-2 w-full shadow-md hover:cursor-pointer hover:brightness-110"
2520
style={{
2621
borderRadius: defaultBorderRadius,
2722
backgroundColor: vscInputBackground,
2823
}}
2924
onMouseEnter={() => setIsHovered(true)}
3025
onMouseLeave={() => setIsHovered(false)}
26+
onClick={() => onClick(command)}
3127
>
32-
<div className="flex items-center px-3 py-1.5">
33-
<div className="mr-3 flex-shrink-0">
28+
<div className="flex px-3 py-1.5">
29+
<div className="mr-3 flex-shrink-0 self-start pt-0.5">
3430
<ChatBubbleLeftIcon className="text-lightgray h-5 w-5" />
3531
</div>
36-
<div
37-
onClick={() => onClick(command)}
38-
className="flex flex-1 flex-col hover:cursor-pointer"
39-
>
40-
<div className="font-medium">{command.name}</div>
41-
<div className="text-lightgray text-sm">{command.description}</div>
42-
</div>
43-
<div className="flex items-center">
44-
<GhostButton
45-
onClick={(e) => {
46-
e.stopPropagation();
47-
onBookmark(command);
48-
}}
49-
aria-label={
50-
isBookmarked ? "Remove bookmarked prompt" : "Bookmark prompt"
51-
}
52-
className={isHovered || isBookmarked ? "opacity-100" : "opacity-0"}
53-
>
54-
{isBookmarked ? (
55-
<BookmarkIconSolid className="h-4 w-4" />
56-
) : (
57-
<BookmarkIcon className="h-4 w-4" />
58-
)}
59-
</GhostButton>
32+
<div className="flex flex-1 flex-col">
33+
<div className="text-xs font-medium">{command.name}</div>
34+
<div className="text-lightgray text-xs">{command.description}</div>
6035
</div>
6136
</div>
6237
</div>

gui/src/components/ConversationStarters/ConversationStarterCards.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ const NUM_CARDS_TO_RENDER = 3;
99

1010
export function ConversationStarterCards() {
1111
const dispatch = useAppDispatch();
12-
const { cmdsSortedByBookmark, bookmarkStatuses, toggleBookmark } =
13-
useBookmarkedSlashCommands();
12+
const { cmdsSortedByBookmark } = useBookmarkedSlashCommands();
1413

1514
function onClick(command: SlashCommandDescription) {
1615
if (command.prompt) {
@@ -31,8 +30,6 @@ export function ConversationStarterCards() {
3130
key={command.name + i}
3231
command={command}
3332
onClick={onClick}
34-
onBookmark={() => toggleBookmark(command)}
35-
isBookmarked={bookmarkStatuses[command.name]}
3633
/>
3734
))}
3835
</div>

gui/src/components/Layout.tsx

+2-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
import { setShowDialog } from "../redux/slices/uiSlice";
1818
import { exitEditMode } from "../redux/thunks";
1919
import { loadLastSession, saveCurrentSession } from "../redux/thunks/session";
20-
import { getFontSize, isMetaEquivalentKeyPressed } from "../util";
20+
import { fontSize, isMetaEquivalentKeyPressed } from "../util";
2121
import { incrementFreeTrialCount } from "../util/freeTrial";
2222
import { ROUTES } from "../util/navigation";
2323
import TextDialog from "./dialogs";
@@ -305,10 +305,7 @@ const Layout = () => {
305305
<Footer />
306306
</GridDiv>
307307
</div>
308-
<div
309-
style={{ fontSize: `${getFontSize() - 4}px` }}
310-
id="tooltip-portal-div"
311-
/>
308+
<div style={{ fontSize: fontSize(-4) }} id="tooltip-portal-div" />
312309
</LayoutTopDiv>
313310
</AuthProvider>
314311
);

gui/src/components/PageHeader.tsx

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ArrowLeftIcon } from "@heroicons/react/24/outline";
2+
import { fontSize } from "../util";
23

34
export interface PageHeaderProps {
45
onTitleClick?: () => void;
@@ -15,7 +16,7 @@ export default function PageHeader({
1516
}: PageHeaderProps) {
1617
return (
1718
<div
18-
className={`bg-vsc-background sticky top-0 z-20 m-0 flex items-center justify-between bg-inherit py-0.5 ${
19+
className={`bg-vsc-background sticky top-0 z-20 m-0 flex items-center justify-between bg-inherit ${
1920
showBorder
2021
? "border-0 border-b-[1px] border-solid border-b-zinc-700"
2122
: ""
@@ -25,11 +26,16 @@ export default function PageHeader({
2526
{title && (
2627
<>
2728
<div
28-
className="cursor-pointer transition-colors duration-200 hover:text-zinc-100"
29+
className="flex cursor-pointer items-center transition-colors duration-200 hover:text-zinc-100"
2930
onClick={onTitleClick}
3031
>
3132
<ArrowLeftIcon className="ml-3 inline-block h-3 w-3" />
32-
<span className="m-2 inline-block text-base font-bold">
33+
<span
34+
className="mx-2 inline-block text-base font-bold"
35+
style={{
36+
fontSize: fontSize(-2),
37+
}}
38+
>
3339
{title}
3440
</span>
3541
</div>

gui/src/components/StepContainer/StepContainer.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ interface StepContainerProps {
2020
}
2121

2222
const ContentDiv = styled.div<{ fontSize?: number }>`
23-
padding-top: 4px;
24-
padding-bottom: 4px;
23+
padding: 4px;
24+
padding-left: 6px;
25+
padding-right: 6px;
26+
2527
background-color: ${vscBackground};
2628
font-size: ${getFontSize()}px;
2729
overflow: hidden;

gui/src/components/dialogs/AddDocsDialog.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { useAppSelector } from "../../redux/hooks";
99
import { updateIndexingStatus } from "../../redux/slices/indexingSlice";
1010
import { setDialogMessage, setShowDialog } from "../../redux/slices/uiSlice";
1111
import { ToolTip } from "../gui/Tooltip";
12-
import DocsIndexingPeeks from "../indexing/DocsIndexingPeeks";
12+
import DocsIndexingPeeks from "../mainInput/Lump/sections/docs/DocsIndexingPeeks";
1313

1414
function AddDocsDialog() {
1515
const posthog = usePostHog();

gui/src/components/gui/Tooltip.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import ReactDOM from "react-dom";
22
import { Tooltip } from "react-tooltip";
33
import { vscBackground, vscForeground, vscInputBorder } from "..";
4-
import { getFontSize } from "../../util";
4+
import { fontSize } from "../../util";
55

66
const TooltipStyles = {
7-
fontSize: `${getFontSize() - 2}px`,
7+
fontSize: fontSize(-2),
88
backgroundColor: vscBackground,
99
outline: `0.5px solid ${vscInputBorder}`,
1010
color: vscForeground,
@@ -25,7 +25,7 @@ export function ToolTip(props: any) {
2525
return (
2626
tooltipPortalDiv &&
2727
ReactDOM.createPortal(
28-
<Tooltip {...props} style={combinedStyles} opacity={1} />,
28+
<Tooltip {...props} style={combinedStyles} opacity={1} delayShow={400} />,
2929
tooltipPortalDiv,
3030
)
3131
);

gui/src/components/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export const vscListActiveForeground = `var(${VSC_LIST_ACTIVE_FOREGROUND_VAR}, $
5959
export const vscInputBorder = `var(${VSC_INPUT_BORDER_VAR}, ${lightGray})`;
6060
export const vscInputBorderFocus = `var(${VSC_FOCUS_BORDER_VAR}, ${lightGray})`;
6161
export const vscBadgeBackground = `var(${VSC_BADGE_BACKGROUND_VAR}, #1bbe84)`;
62+
export const vscBadgeForeground = `var(${VSC_BADGE_FOREGROUND_VAR}, #ffffff)`;
6263
export const vscCommandCenterActiveBorder = `var(${VSC_COMMAND_CENTER_ACTIVE_BORDER_VAR}, #1bbe84)`;
6364
export const vscCommandCenterInactiveBorder = `var(${VSC_COMMAND_CENTER_INACTIVE_BORDER_VAR}, #1bbe84)`;
6465
export const vscFindMatchSelected = `var(${VSC_FIND_MATCH_SELECTED_VAR}, rgba(255, 223, 0))`;

0 commit comments

Comments
 (0)