feat: add gif to tutorial card
This commit is contained in:
parent
77d321ff82
commit
e03eb9d580
6 changed files with 51 additions and 41 deletions
|
|
@ -26,6 +26,7 @@ export type ToIdeFromWebviewProtocol = ToIdeFromWebviewOrCoreProtocol & {
|
|||
insertAtCursor: [{ text: string }, void];
|
||||
copyText: [{ text: string }, void];
|
||||
"jetbrains/editorInsetHeight": [{ height: number }, void];
|
||||
"vscode/openMoveRightMarkdown": [undefined, void];
|
||||
setGitHubAuthToken: [{ token: string }, void];
|
||||
acceptDiff: [{ filepath: string }, void];
|
||||
rejectDiff: [{ filepath: string }, void];
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
# Move Continue to the right sidebar
|
||||
# Move Chat to the right sidebar
|
||||
|
||||
### This will prevent the Chat panel from covering your file explorer
|
||||
|
||||

|
||||
|
||||
Continue is currently in the left sidebar, but we recommend moving it to the right.
|
||||
This way it won't cover your file explorer.
|
||||
|
||||
You can move it back at any time. If you close the sidebar, it can be re-opened with <kbd>Cmd/Ctrl</kbd> + <kbd>L</kbd>.
|
||||
|
|
|
|||
|
|
@ -20,17 +20,6 @@ export async function activateExtension(context: vscode.ExtensionContext) {
|
|||
|
||||
const vscodeExtension = new VsCodeExtension(context);
|
||||
|
||||
migrate("showWelcome_1", () => {
|
||||
vscode.commands.executeCommand(
|
||||
"markdown.showPreview",
|
||||
vscode.Uri.file(
|
||||
path.join(getExtensionUri().fsPath, "media", "welcome.md"),
|
||||
),
|
||||
);
|
||||
|
||||
vscode.commands.executeCommand("continue.focusContinueInput");
|
||||
});
|
||||
|
||||
// Load Continue configuration
|
||||
if (!context.globalState.get("hasBeenInstalled")) {
|
||||
context.globalState.update("hasBeenInstalled", true);
|
||||
|
|
|
|||
|
|
@ -84,9 +84,20 @@ export class VsCodeMessenger {
|
|||
this.onWebview("showFile", (msg) => {
|
||||
this.ide.openFile(msg.data.filepath);
|
||||
});
|
||||
|
||||
this.onWebview("vscode/openMoveRightMarkdown", (msg) => {
|
||||
vscode.commands.executeCommand(
|
||||
"markdown.showPreview",
|
||||
vscode.Uri.file(
|
||||
path.join(getExtensionUri().fsPath, "media", "welcome.md"),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
this.onWebview("openConfigJson", (msg) => {
|
||||
this.ide.openFile(getConfigJsonPath());
|
||||
});
|
||||
|
||||
this.onWebview("readRangeInFile", async (msg) => {
|
||||
return await vscode.workspace
|
||||
.openTextDocument(msg.data.filepath)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import {
|
||||
ArrowRightStartOnRectangleIcon,
|
||||
BookOpenIcon,
|
||||
ClipboardDocumentIcon,
|
||||
Cog6ToothIcon,
|
||||
|
|
@ -7,7 +8,9 @@ import {
|
|||
} from "@heroicons/react/24/outline";
|
||||
import styled from "styled-components";
|
||||
import { defaultBorderRadius, lightGray, vscBackground } from "..";
|
||||
import { getMetaKeyLabel } from "../../util";
|
||||
import { getMetaKeyLabel, isJetBrains } from "../../util";
|
||||
import { useContext } from "react";
|
||||
import { IdeMessengerContext } from "../../context/IdeMessenger";
|
||||
|
||||
interface TutorialCardProps {
|
||||
onClose: () => void;
|
||||
|
|
@ -38,6 +41,8 @@ const CloseButton = styled.button`
|
|||
`;
|
||||
|
||||
export function TutorialCard({ onClose }: TutorialCardProps) {
|
||||
const ideMessenger = useContext(IdeMessengerContext);
|
||||
|
||||
return (
|
||||
<TutorialCardDiv>
|
||||
<CloseButton onClick={onClose}>
|
||||
|
|
@ -45,46 +50,53 @@ export function TutorialCard({ onClose }: TutorialCardProps) {
|
|||
</CloseButton>
|
||||
|
||||
<ul className="space-y-4 pl-0" style={{ color: lightGray }}>
|
||||
{!isJetBrains() && (
|
||||
<li className="flex items-start">
|
||||
<ArrowRightStartOnRectangleIcon className="align-middle pr-3 h-4 w-4" />
|
||||
<span>
|
||||
<span
|
||||
className="underline cursor-pointer"
|
||||
onClick={() =>
|
||||
ideMessenger.request(
|
||||
"vscode/openMoveRightMarkdown",
|
||||
undefined,
|
||||
)
|
||||
}
|
||||
>
|
||||
Move Chat panel to the right
|
||||
</span>{" "}
|
||||
for the cleanest experience
|
||||
</span>
|
||||
</li>
|
||||
)}
|
||||
<li className="flex items-start">
|
||||
<PencilSquareIcon
|
||||
width="1.4em"
|
||||
height="1.4em"
|
||||
className="align-middle pr-3"
|
||||
/>
|
||||
<PencilSquareIcon className="align-middle pr-3 h-4 w-4" />
|
||||
<span>
|
||||
Highlight code and press <code>{getMetaKeyLabel() + "I"}</code> to
|
||||
quickly make natural language edits
|
||||
</span>
|
||||
</li>
|
||||
<li className="flex items-start">
|
||||
<ClipboardDocumentIcon
|
||||
width="1.4em"
|
||||
height="1.4em"
|
||||
className="align-middle pr-3"
|
||||
/>
|
||||
<ClipboardDocumentIcon className="align-middle pr-3 h-4 w-4" />
|
||||
<span>
|
||||
Highlight code and press <code>{getMetaKeyLabel() + "L"}</code> to
|
||||
add it to the chat window
|
||||
</span>
|
||||
</li>
|
||||
<li className="flex items-start">
|
||||
<Cog6ToothIcon
|
||||
width="1.4em"
|
||||
height="1.4em"
|
||||
className="align-middle pr-3"
|
||||
/>
|
||||
<Cog6ToothIcon className="align-middle pr-3 h-4 w-4" />
|
||||
<span>
|
||||
Click the gear icon in the bottom right to configure Continue
|
||||
</span>
|
||||
</li>
|
||||
<li className="flex items-start">
|
||||
<BookOpenIcon
|
||||
width="1.4em"
|
||||
height="1.4em"
|
||||
className="align-middle pr-3"
|
||||
/>
|
||||
<BookOpenIcon className="align-middle pr-3 h-4 w-4" />
|
||||
<span>
|
||||
<a href="https://docs.continue.dev" target="_blank">
|
||||
<a
|
||||
href="https://docs.continue.dev"
|
||||
target="_blank"
|
||||
className="text-inherit underline cursor-pointer hover:text-inherit"
|
||||
>
|
||||
Read our documentation
|
||||
</a>{" "}
|
||||
to learn more
|
||||
|
|
|
|||
|
|
@ -503,11 +503,11 @@ function GUI() {
|
|||
</div>
|
||||
)}
|
||||
|
||||
{showTutorialCard !== false && !onboardingCard.open && (
|
||||
{
|
||||
<div className="flex justify-center w-full">
|
||||
<TutorialCard onClose={closeTutorialCard} />
|
||||
</div>
|
||||
)}
|
||||
}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue