-
Sign in with GitHub
-
+
Sign in with GitHub
+
Continue will request read access to your GitHub email so that we can
prevent abuse of the free trial. If you prefer not to sign in, you can
use Continue with your own API keys or local model.
diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx
index 13f4e5394..2c17a1f17 100644
--- a/gui/src/components/mainInput/TipTapEditor.tsx
+++ b/gui/src/components/mainInput/TipTapEditor.tsx
@@ -156,7 +156,7 @@ function TipTapEditor(props: TipTapEditorProps) {
);
const useActiveFile = useSelector(selectUseActiveFile);
- const { saveSession } = useHistory(dispatch);
+ const { saveSession, loadSession } = useHistory(dispatch);
const posthog = usePostHog();
const [isEditorFocused, setIsEditorFocused] = useState(false);
@@ -806,6 +806,17 @@ function TipTapEditor(props: TipTapEditorProps) {
!props.isMainInput,
);
+ useWebviewListener(
+ "focusContinueSessionId",
+ async (data) => {
+ if (!props.isMainInput) {
+ return;
+ }
+ loadSession(data.sessionId);
+ },
+ [loadSession, props.isMainInput],
+ );
+
const [showDragOverMsg, setShowDragOverMsg] = useState(false);
useEffect(() => {
diff --git a/gui/src/components/mainInput/TutorialCard.tsx b/gui/src/components/mainInput/TutorialCard.tsx
index cd5be630b..3a424e257 100644
--- a/gui/src/components/mainInput/TutorialCard.tsx
+++ b/gui/src/components/mainInput/TutorialCard.tsx
@@ -52,10 +52,10 @@ export function TutorialCard({ onClose }: TutorialCardProps) {
{!isJetBrains() && (
-
-
+
ideMessenger.request(
"vscode/openMoveRightMarkdown",
@@ -70,32 +70,33 @@ export function TutorialCard({ onClose }: TutorialCardProps) {
)}
-
-
+
Highlight code and press
{getMetaKeyLabel() + "I"} to
quickly make natural language edits
-
-
+
Highlight code and press
{getMetaKeyLabel() + "L"} to
add it to the chat window
-
-
+
Click the gear icon in the bottom right to configure Continue
-
-
+
+ ideMessenger.post("openUrl", "https://docs.continue.dev")
+ }
>
Read our documentation
{" "}
diff --git a/gui/src/components/markdown/CodeBlockToolbar.tsx b/gui/src/components/markdown/CodeBlockToolbar.tsx
index c2049d7b4..b5380e26d 100644
--- a/gui/src/components/markdown/CodeBlockToolbar.tsx
+++ b/gui/src/components/markdown/CodeBlockToolbar.tsx
@@ -29,6 +29,7 @@ import ButtonWithTooltip from "../ButtonWithTooltip";
import FileIcon from "../FileIcon";
import { CopyButton as CopyButtonHeader } from "./CopyButton";
import { ToolbarButtonWithTooltip } from "./ToolbarButtonWithTooltip";
+import { defaultModelSelector } from "../../redux/selectors/modelSelectors";
const ToolbarDiv = styled.div`
display: flex;
@@ -127,6 +128,7 @@ function getTerminalCommand(text: string): string {
function CodeBlockToolBar(props: CodeBlockToolBarProps) {
const ideMessenger = useContext(IdeMessengerContext);
const dispatch = useDispatch();
+ const defaultModel = useSelector(defaultModelSelector);
const isTerminal = isTerminalCodeBlock(props.language, props.text);
const [isCopied, setIsCopied] = useState(false);
const [isApplying, setIsApplying] = useState(false);
@@ -148,6 +150,7 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) {
"applyCodeFromChat",
async () => {
await ideMessenger.request("applyToCurrentFile", {
+ curSelectedModelTitle: defaultModel.title,
text: props.text,
streamId: streamIdRef.current,
});
@@ -157,24 +160,25 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) {
!props.isNextCodeBlock,
);
- function onClickCopy() {
+ async function onClickCopy() {
if (isJetBrains()) {
- ideMessenger.request("copyText", { text: props.text });
+ await ideMessenger.request("copyText", { text: props.text });
} else {
- navigator.clipboard.writeText(props.text);
+ await navigator.clipboard.writeText(props.text);
}
setIsCopied(true);
setTimeout(() => setIsCopied(false), 2000);
}
- function onClickApply() {
+ async function onClickApply() {
if (isApplying) return;
if (isTerminal) {
- ideMessenger.ide.runCommand(getTerminalCommand(props.text));
+ await ideMessenger.ide.runCommand(getTerminalCommand(props.text));
} else {
ideMessenger.post("applyToCurrentFile", {
+ curSelectedModelTitle: defaultModel.title,
text: props.text,
streamId: streamIdRef.current,
});
@@ -214,7 +218,9 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) {
);
}
- if (!props.filepath) {
+ // Currently we only use the "old" apply logic in JetBrains. This check can be removed once
+ // we implement the "new" lazy apply logic.
+ if (!props.filepath || isJetBrains()) {
return (
@@ -284,69 +290,64 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) {