From 5709c9ae003ededb520ee641cae8c8570d4c93af Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 9 Jul 2023 14:12:36 -0700 Subject: sdk.get_code_context --- extension/react-app/src/components/ComboBox.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'extension/react-app/src/components') diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx index e6632360..801c3a03 100644 --- a/extension/react-app/src/components/ComboBox.tsx +++ b/extension/react-app/src/components/ComboBox.tsx @@ -224,8 +224,8 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { editing={section.editing} pinned={section.pinned} index={idx} - key={`${section.filepath}${idx}`} - title={`${section.range.filepath} (${ + key={`${section.display_name}${idx}`} + title={`${section.display_name} (${ section.range.range.start.line + 1 }-${section.range.range.end.line + 1})`} onDelete={() => { @@ -372,7 +372,7 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { > {highlightedCodeSections.map((section, idx) => ( <> -

{section.range.filepath}

+

{section.display_name}

{section.range.contents} -- cgit v1.2.3-70-g09d2 From b9525d5f0851d13b3d4936868f064810f3376dbd Mon Sep 17 00:00:00 2001 From: Ty Dunn Date: Mon, 10 Jul 2023 15:25:29 -0700 Subject: adding onboarding --- extension/react-app/public/edit.gif | Bin 0 -> 41667733 bytes extension/react-app/public/explain.gif | Bin 0 -> 56475028 bytes extension/react-app/public/generate.gif | Bin 0 -> 32532380 bytes extension/react-app/public/intro.gif | Bin 0 -> 3976676 bytes extension/react-app/src/components/Onboarding.tsx | 51 ++++++++++++++++++++++ extension/react-app/src/tabs/gui.tsx | 2 + 6 files changed, 53 insertions(+) create mode 100644 extension/react-app/public/edit.gif create mode 100644 extension/react-app/public/explain.gif create mode 100644 extension/react-app/public/generate.gif create mode 100644 extension/react-app/public/intro.gif create mode 100644 extension/react-app/src/components/Onboarding.tsx (limited to 'extension/react-app/src/components') diff --git a/extension/react-app/public/edit.gif b/extension/react-app/public/edit.gif new file mode 100644 index 00000000..6780cdf7 Binary files /dev/null and b/extension/react-app/public/edit.gif differ diff --git a/extension/react-app/public/explain.gif b/extension/react-app/public/explain.gif new file mode 100644 index 00000000..e74803dc Binary files /dev/null and b/extension/react-app/public/explain.gif differ diff --git a/extension/react-app/public/generate.gif b/extension/react-app/public/generate.gif new file mode 100644 index 00000000..5c1d112b Binary files /dev/null and b/extension/react-app/public/generate.gif differ diff --git a/extension/react-app/public/intro.gif b/extension/react-app/public/intro.gif new file mode 100644 index 00000000..f872dc91 Binary files /dev/null and b/extension/react-app/public/intro.gif differ diff --git a/extension/react-app/src/components/Onboarding.tsx b/extension/react-app/src/components/Onboarding.tsx new file mode 100644 index 00000000..373f7bea --- /dev/null +++ b/extension/react-app/src/components/Onboarding.tsx @@ -0,0 +1,51 @@ +import { useSelector } from "react-redux"; +import { RootStore } from "../redux/store"; +import React, { useState } from 'react'; + + +const Onboarding = () => { + const [counter, setCounter] = useState(0); + + const handleClick = () => { + setCounter(counter + 1); + } + + const vscMediaUrl = useSelector( + (state: RootStore) => state.config.vscMediaUrl + ); + + return ( +
+ {counter === 0 && ( +
+

Welcome to Continue!

+ Intro +
+ )} + {counter === 1 && ( +
+

Answer coding questions

+ Explain +

Ask Continue about a part of your code to get another perspective

+
+ )} + {counter === 2 && ( +
+

Edit in natural language

+ Edit +

Highlight a section of code and instruct Continue to refactor it

+
+ )} + {counter === 3 && ( +
+

Generate files from scratch

+ Generate +

Let Continue build the scaffolding of Python scripts, React components, and more

+
+ )} +

Click to learn how to use Continue...

+
+ ); +} + +export default Onboarding; diff --git a/extension/react-app/src/tabs/gui.tsx b/extension/react-app/src/tabs/gui.tsx index e1ecec9e..14556829 100644 --- a/extension/react-app/src/tabs/gui.tsx +++ b/extension/react-app/src/tabs/gui.tsx @@ -23,6 +23,7 @@ import { RootStore } from "../redux/store"; import LoadingCover from "../components/LoadingCover"; import { postVscMessage } from "../vscode"; import UserInputContainer from "../components/UserInputContainer"; +import Onboarding from "../components/Onboarding"; const TopGUIDiv = styled.div` overflow: hidden; @@ -267,6 +268,7 @@ function GUI(props: GUIProps) { // const iterations = useSelector(selectIterations); return ( <> +