From b4dad78a727feed0ce18769a8d3f9cfd00a3bd57 Mon Sep 17 00:00:00 2001 From: Test Date: Tue, 5 Nov 2024 16:54:25 -0800 Subject: [PATCH 1/4] fix(jb): meta keybinding issues --- .../ConfigJsonSchemaProviderFactory.kt | 2 +- .../toolWindow/ContinueBrowser.kt | 8 +- gui/src/components/mainInput/TipTapEditor.tsx | 99 +++++----------- .../mainInput/handleMetaKeyPress.ts | 110 ++++++++++++++++++ gui/src/util/handleMetaKeyPressJetBrains.ts | 77 ------------ 5 files changed, 141 insertions(+), 155 deletions(-) create mode 100644 gui/src/components/mainInput/handleMetaKeyPress.ts delete mode 100644 gui/src/util/handleMetaKeyPressJetBrains.ts diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigJsonSchemaProviderFactory.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigJsonSchemaProviderFactory.kt index c303b26fb..2056d216e 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigJsonSchemaProviderFactory.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigJsonSchemaProviderFactory.kt @@ -22,7 +22,7 @@ class ConfigJsonSchemaProviderFactory : JsonSchemaProviderFactory { class ConfigJsonSchemaFileProvider : JsonSchemaFileProvider { override fun isAvailable(file: VirtualFile): Boolean { - return path.endsWith("/.continue/config.json") + return file.path.endsWith("/.continue/config.json") } override fun getName(): String { diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt index 03d4f4715..6d132b030 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt @@ -280,7 +280,7 @@ class ContinueBrowser(val project: Project, url: String) { * * Setting `setOffScreenRendering` to `false` causes a number of issues such as a white screen flash when loading * the GUI and the inability to set `cursor: pointer`. However, setting `setOffScreenRendering` to `true` on - * platform versions prior to 2023.3.4 causes larger issues such as an inability to type input for certain langauges, + * platform versions prior to 2023.3.4 causes larger issues such as an inability to type input for certain languages, * e.g. Korean. * * References: @@ -293,12 +293,6 @@ class ContinueBrowser(val project: Project, url: String) { * it's a simple integer without dot notation, making it easier to compare. */ private fun shouldRenderOffScreen(): Boolean { - // With the 0.0.77 release, non-Mac users have been reporting issues with paste functionality - // in the browser. Disabling OSR for all non-Mac users for now. - if (!SystemInfo.isMac) { - return false - } - val minBuildNumber = 233 val applicationInfo = ApplicationInfo.getInstance() val currentBuildNumber = applicationInfo.build.baselineVersion diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index f801aa348..bf6530dcf 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -50,9 +50,11 @@ import { getFontSize, isJetBrains, isMetaEquivalentKeyPressed, - isWebEnvironment, } from "../../util"; -import { handleMetaKeyPressJetBrains } from "../../util/handleMetaKeyPressJetBrains"; +import { + handleJetBrainsMetaKeyPress, + handleMetaKeyPress, +} from "./handleMetaKeyPress"; import { CodeBlockExtension } from "./CodeBlockExtension"; import { SlashCommand } from "./CommandsExtension"; import InputToolbar, { ToolbarOptions } from "./InputToolbar"; @@ -78,6 +80,7 @@ const InputBoxDiv = styled.div<{ border?: string }>` props.border ? props.border : `0.5px solid ${vscInputBorder}`}; outline: none; font-size: ${getFontSize()}px; + &:focus { outline: none; @@ -561,7 +564,7 @@ function TipTapEditor(props: TipTapEditorProps) { /** * This handles various issues with meta key actions - * - In JetBrains, when using "off screen rendering", there is a bug where using the meta key to + * - In JetBrains, when using OSR in JCEF, there is a bug where using the meta key to * highlight code using arrow keys is not working * - In VS Code, while working with .ipynb files there is a problem where copy/paste/cut will affect * the actual notebook cells, even when performing them in our GUI @@ -571,77 +574,33 @@ function TipTapEditor(props: TipTapEditorProps) { setActiveKey(e.key); - if (isMetaEquivalentKeyPressed(e)) { - const { key, code } = e; - const isWebEnv = isWebEnvironment(); - const text = editor.state.doc.textBetween( - editor.state.selection.from, - editor.state.selection.to, - ); - - if (isJetBrains()) { - if (code === "KeyJ") { - e.stopPropagation(); - e.preventDefault(); - setIgnoreHighlightedCode(true); - setTimeout(() => { - setIgnoreHighlightedCode(false); - }, 100); - } - - if (isMetaEquivalentKeyPressed(e)) { - e.stopPropagation(); - e.preventDefault(); - handleMetaKeyPressJetBrains(e, text, editor.commands.setContent); - } - } else { - if (code === "KeyL") { - e.stopPropagation(); - e.preventDefault(); - setIgnoreHighlightedCode(true); - setTimeout(() => { - setIgnoreHighlightedCode(false); - }, 100); - return; - } - - switch (key) { - case "x": - e.stopPropagation(); - e.preventDefault(); - if (isWebEnv) { - await navigator.clipboard.writeText(text); - editor.commands.deleteSelection(); - } else { - document.execCommand("cut"); - } - break; - case "c": - e.stopPropagation(); - e.preventDefault(); - if (isWebEnv) { - await navigator.clipboard.writeText(text); - } else { - document.execCommand("copy"); - } - break; - case "v": - e.stopPropagation(); - e.preventDefault(); - if (isWebEnv) { - const clipboardText = await navigator.clipboard.readText(); - editor.commands.insertContent(clipboardText); - } else { - document.execCommand("paste"); - } - break; - } - } - } else if (e.key === "Escape") { + if (e.key === "Escape") { e.stopPropagation(); e.preventDefault(); ideMessenger.post("focusEditor", undefined); + return; } + + if (!isMetaEquivalentKeyPressed(e)) { + return; + } + + if (isJetBrains()) { + if (e.code === "KeyJ") { + setTemporaryIgnoreHighlightedCode(); + } else { + handleJetBrainsMetaKeyPress(e, editor); + } + } + + await handleMetaKeyPress(e, editor); + }; + + const setTemporaryIgnoreHighlightedCode = () => { + setIgnoreHighlightedCode(true); + setTimeout(() => { + setIgnoreHighlightedCode(false); + }, 100); }; const handleKeyUp = () => { diff --git a/gui/src/components/mainInput/handleMetaKeyPress.ts b/gui/src/components/mainInput/handleMetaKeyPress.ts new file mode 100644 index 000000000..4fee2b646 --- /dev/null +++ b/gui/src/components/mainInput/handleMetaKeyPress.ts @@ -0,0 +1,110 @@ +import { KeyboardEvent } from "react"; +import { isWebEnvironment } from "../../util"; +import { Editor } from "@tiptap/react"; + +const isWebEnv = isWebEnvironment(); + +export const handleJetBrainsMetaKeyPress = ( + e: KeyboardEvent, + editor: Editor, +) => { + const selection = window.getSelection(); + + const handlers: Record void> = { + Backspace: () => handleJetBrainsMetaBackspace(editor), + ArrowLeft: () => + selection.modify( + e.shiftKey ? "extend" : "move", + "backward", + "lineboundary", + ), + ArrowRight: () => + selection.modify( + e.shiftKey ? "extend" : "move", + "forward", + "lineboundary", + ), + ArrowDown: () => + selection.modify( + e.shiftKey ? "extend" : "move", + "forward", + "documentboundary", + ), + ArrowUp: () => { + selection.modify( + e.shiftKey ? "extend" : "move", + "backward", + "documentboundary", + ); + }, + }; + + if (e.key in handlers) { + e.stopPropagation(); + e.preventDefault(); + handlers[e.key](); + } +}; + +export const handleMetaKeyPress = async (e: KeyboardEvent, editor: Editor) => { + const text = editor.state.doc.textBetween( + editor.state.selection.from, + editor.state.selection.to, + ); + + const handlers: Record Promise> = { + x: () => handleCutOperation(text, editor), + c: () => handleCopyOperation(text), + v: () => handlePasteOperation(editor), + }; + + if (e.key in handlers) { + e.stopPropagation(); + e.preventDefault(); + await handlers[e.key](); + } +}; + +export const handleJetBrainsMetaBackspace = (editor: Editor) => { + const { doc } = editor.state; + + for (let i = doc.content.childCount - 1; i >= 0; i--) { + const node = doc.content.child(i); + + if (node.type.name !== "codeBlock") { + editor.commands.deleteNode(node.type.name); + } + } + + // Add an empty string so the user can keep typing + editor.commands.createParagraphNear(); +}; + +export const handleCutOperation = async (text: string, editor: Editor) => { + const selection = window.getSelection(); + selection.deleteFromDocument(); + + if (isWebEnv) { + await navigator.clipboard.writeText(text); + editor.commands.deleteSelection(); + } else { + document.execCommand("cut"); + } +}; + +export const handleCopyOperation = async (text: string) => { + if (isWebEnv) { + await navigator.clipboard.writeText(text); + } else { + document.execCommand("copy"); + } +}; + +export const handlePasteOperation = async (editor: Editor) => { + if (isWebEnv) { + const clipboardText = await navigator.clipboard.readText(); + editor.commands.insertContent(clipboardText); + } else { + document.execCommand("paste"); + } +}; diff --git a/gui/src/util/handleMetaKeyPressJetBrains.ts b/gui/src/util/handleMetaKeyPressJetBrains.ts deleted file mode 100644 index 70740262c..000000000 --- a/gui/src/util/handleMetaKeyPressJetBrains.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { KeyboardEvent } from "react"; -import { getPlatform } from "."; - -export const handleMetaKeyPressJetBrains = ( - e: KeyboardEvent, - text: string, - setText: (text: string) => void, -) => { - const { selectionStart, selectionEnd } = e.target as HTMLTextAreaElement; - - if (e.key === "Backspace") { - handleMetaBackspace(e, text, setText, selectionStart, selectionEnd); - } - - if (getPlatform() === "mac") { - if (e.key === "ArrowLeft") { - handleMacArrowLeftKey(e); - } else if (e.key === "ArrowRight") { - handleMacArrowRightKey(e); - } - } -}; - -const handleMetaBackspace = ( - e: KeyboardEvent, - text: string, - setText: (text: string) => void, - start: number, - end: number, -) => { - const target = e.target as HTMLTextAreaElement; - let newStart = start; - - if (start !== end) { - setText(text.slice(0, start) + text.slice(end)); - } else { - newStart = - getPlatform() === "mac" - ? text.lastIndexOf("\n", start - 1) + 1 - : text.slice(0, start).trimEnd().lastIndexOf(" ") + 1; - setText(text.slice(0, newStart) + text.slice(start)); - } - - target.setSelectionRange(newStart, newStart); -}; - -const handleMacArrowLeftKey = (e: KeyboardEvent) => { - const target = e.target as HTMLDivElement; - const selection = window.getSelection(); - - const range = document.createRange(); - - if (e.shiftKey) { - selection.modify("extend", "backward", "character"); - } else { - range.setStart(target.firstChild, 0); - range.setEnd(target.firstChild, 0); - - selection.removeAllRanges(); - selection.addRange(range); - } -}; - -const handleMacArrowRightKey = (e: KeyboardEvent) => { - const selection = window.getSelection(); - const range = document.createRange(); - const target = e.target as HTMLDivElement; - - if (e.shiftKey) { - selection.modify("extend", "forward", "character"); - } else { - range.selectNodeContents(target); - range.collapse(false); - selection.removeAllRanges(); - selection.addRange(range); - } -}; From 7192aa1b021cdedadb04f1a43cba313e99046876 Mon Sep 17 00:00:00 2001 From: Test Date: Tue, 5 Nov 2024 17:11:30 -0800 Subject: [PATCH 2/4] docs: update useChromiumForDocsCrawling --- docs/docs/reference.md | 2 +- extensions/vscode/config_schema.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/docs/reference.md b/docs/docs/reference.md index 19e8f386e..391273943 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -421,7 +421,7 @@ Several experimental config parameters are available, as described below: - `fix`: Prompt for fixing code. - `optimize`: Prompt for optimizing code. - `fixGrammar`: Prompt for fixing grammar or spelling. -- `useChromiumForDocsCrawling`: Use chromium to crawl docs instead of default lighter-weight tool that can't render sites. Downloads and installs Chromium to `~/.continue/.utils`. +- `useChromiumForDocsCrawling`: Use Chromium to crawl docs locally. Useful if the default Cheerio crawler fails on sites that require JavaScript rendering. Downloads and installs Chromium to `~/.continue/.utils`.. Example diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index c0a734b02..49734ac29 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -2924,6 +2924,11 @@ "default": "If there are any grammar or spelling mistakes in this writing, fix them. Do not make other large changes to the writing." } } + }, + "useChromiumForDocsCrawling": { + "type": "boolean", + "description": "Use Chromium to crawl docs locally. Useful if the default Cheerio crawler fails on sites that require JavaScript rendering. Downloads and installs Chromium to `~/.continue/.utils`.", + "default": false } } } From 883e100432d6d85b2fee5f34377ccbc2d66dadbd Mon Sep 17 00:00:00 2001 From: Test Date: Tue, 5 Nov 2024 17:17:51 -0800 Subject: [PATCH 3/4] chore: add useOSR setting --- docs/docs/reference.md | 4 +++- .../toolWindow/ContinueBrowser.kt | 18 +++++++++++++++++- extensions/vscode/config_schema.json | 5 +++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/docs/docs/reference.md b/docs/docs/reference.md index 391273943..0ce6fc6a1 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -369,6 +369,7 @@ Customizable UI settings to control interface appearance and behavior. - `fontSize`: Specifies font size for UI elements. - `displayRawMarkdown`: If `true`, shows raw markdown in responses. - `showChatScrollbar`: If `true`, enables a scrollbar in the chat window. +- `useOSR`: Controls off-screen rendering in JetBrains IDEs. By default, Continue will automatically determine whether to use OSR based on your IDE version. Set this to `true` to force OSR on, or `false` to force it off. Only applies to JetBrains IDEs. Example: @@ -377,7 +378,8 @@ Example: "ui": { "codeBlockToolbarPosition": "bottom", "fontSize": 14, - "displayRawMarkdown": false + "displayRawMarkdown": false, + "useOSR": true } } ``` diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt index 6d132b030..7aaefa10f 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt @@ -275,7 +275,11 @@ class ContinueBrowser(val project: Project, url: String) { } /** - * This function checks if the pluginSinceBuild is greater than or equal to 233, which corresponds + * This function checks if off-screen rendering (OSR) should be used. + * + * If ui.useOSR is set in config.json, that value is used. + * + * Otherwise, we check if the pluginSinceBuild is greater than or equal to 233, which corresponds * to IntelliJ platform version 2023.3 and later. * * Setting `setOffScreenRendering` to `false` causes a number of issues such as a white screen flash when loading @@ -293,6 +297,18 @@ class ContinueBrowser(val project: Project, url: String) { * it's a simple integer without dot notation, making it easier to compare. */ private fun shouldRenderOffScreen(): Boolean { + val continuePluginService = ServiceManager.getService( + project, + ContinuePluginService::class.java + ) + + // Check if useOSR is explicitly set in config + val useOSR = continuePluginService.coreMessenger?.config?.ui?.useOSR + if (useOSR != null) { + return useOSR + } + + // Fall back to version check val minBuildNumber = 233 val applicationInfo = ApplicationInfo.getInstance() val currentBuildNumber = applicationInfo.build.baselineVersion diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 49734ac29..80cc304b3 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -2777,6 +2777,11 @@ "x-intellij-html-description": "If set to true, a scrollbar will be displayed in the chat window to navigate through messages.", "default": false, "type": "boolean" + }, + "useOSR": { + "type": "boolean", + "description": "Whether to use off-screen rendering in JetBrains IDEs. By default, Continue will automatically determine whether to use OSR based on your IDE version. Set this to true to force OSR on, or false to force it off.", + "default": null } } }, From 7e5a231fa24d3438e2a952382079af843e21f059 Mon Sep 17 00:00:00 2001 From: Test Date: Tue, 5 Nov 2024 18:22:22 -0800 Subject: [PATCH 4/4] move OSR setting to JB IDE --- docs/docs/reference.md | 4 +- .../ContinueExtensionSettingsService.kt | 38 ++++++++++++++++ .../toolWindow/ContinueBrowser.kt | 44 ++----------------- extensions/vscode/config_schema.json | 5 --- 4 files changed, 42 insertions(+), 49 deletions(-) diff --git a/docs/docs/reference.md b/docs/docs/reference.md index 0ce6fc6a1..391273943 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -369,7 +369,6 @@ Customizable UI settings to control interface appearance and behavior. - `fontSize`: Specifies font size for UI elements. - `displayRawMarkdown`: If `true`, shows raw markdown in responses. - `showChatScrollbar`: If `true`, enables a scrollbar in the chat window. -- `useOSR`: Controls off-screen rendering in JetBrains IDEs. By default, Continue will automatically determine whether to use OSR based on your IDE version. Set this to `true` to force OSR on, or `false` to force it off. Only applies to JetBrains IDEs. Example: @@ -378,8 +377,7 @@ Example: "ui": { "codeBlockToolbarPosition": "bottom", "fontSize": 14, - "displayRawMarkdown": false, - "useOSR": true + "displayRawMarkdown": false } } ``` diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt index f73ba509c..a8019e361 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt @@ -2,6 +2,7 @@ package com.github.continuedev.continueintellijextension.services import com.github.continuedev.continueintellijextension.constants.getConfigJsPath import com.github.continuedev.continueintellijextension.constants.getConfigJsonPath +import com.intellij.openapi.application.ApplicationInfo import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.components.* import com.intellij.openapi.options.Configurable @@ -28,6 +29,7 @@ class ContinueSettingsComponent : DumbAware { val userToken: JTextField = JTextField() val enableTabAutocomplete: JCheckBox = JCheckBox("Enable Tab Autocomplete") val enableContinueTeamsBeta: JCheckBox = JCheckBox("Enable Continue for Teams Beta") + val enableOSR: JCheckBox = JCheckBox("Enable Off-Screen Rendering") val displayEditorTooltip: JCheckBox = JCheckBox("Display Editor Tooltip") init { @@ -56,6 +58,8 @@ class ContinueSettingsComponent : DumbAware { constraints.gridy++ panel.add(enableContinueTeamsBeta, constraints) constraints.gridy++ + panel.add(enableOSR, constraints) + constraints.gridy++ panel.add(displayEditorTooltip, constraints) constraints.gridy++ @@ -87,6 +91,7 @@ open class ContinueExtensionSettings : PersistentStateComponent= minBuildNumber +} \ No newline at end of file diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt index 7aaefa10f..7891a02dc 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt @@ -5,6 +5,7 @@ import com.github.continuedev.continueintellijextension.constants.MessageTypes import com.github.continuedev.continueintellijextension.constants.getConfigJsonPath import com.github.continuedev.continueintellijextension.`continue`.* import com.github.continuedev.continueintellijextension.factories.CustomSchemeHandlerFactory +import com.github.continuedev.continueintellijextension.services.ContinueExtensionSettings import com.github.continuedev.continueintellijextension.services.ContinuePluginService import com.google.gson.Gson import com.google.gson.JsonObject @@ -78,7 +79,8 @@ class ContinueBrowser(val project: Project, url: String) { val browser: JBCefBrowser init { - this.browser = JBCefBrowser.createBuilder().setOffScreenRendering(shouldRenderOffScreen()).build() + val enableOSR = ServiceManager.getService(ContinueExtensionSettings::class.java).continueState.enableOSR + this.browser = JBCefBrowser.createBuilder().setOffScreenRendering(enableOSR).build() browser.jbCefClient.setProperty( @@ -274,44 +276,4 @@ class ContinueBrowser(val project: Project, url: String) { return """window.postMessage($jsonData, "*");""" } - /** - * This function checks if off-screen rendering (OSR) should be used. - * - * If ui.useOSR is set in config.json, that value is used. - * - * Otherwise, we check if the pluginSinceBuild is greater than or equal to 233, which corresponds - * to IntelliJ platform version 2023.3 and later. - * - * Setting `setOffScreenRendering` to `false` causes a number of issues such as a white screen flash when loading - * the GUI and the inability to set `cursor: pointer`. However, setting `setOffScreenRendering` to `true` on - * platform versions prior to 2023.3.4 causes larger issues such as an inability to type input for certain languages, - * e.g. Korean. - * - * References: - * 1. https://youtrack.jetbrains.com/issue/IDEA-347828/JCEF-white-flash-when-tool-window-show#focus=Comments-27-9334070.0-0 - * This issue mentions that white screen flash problems were resolved in platformVersion 2023.3.4. - * 2. https://www.jetbrains.com/idea/download/other.html - * This documentation shows mappings from platformVersion to branchNumber. - * - * We use the branchNumber (e.g., 233) instead of the full version number (e.g., 2023.3.4) because - * it's a simple integer without dot notation, making it easier to compare. - */ - private fun shouldRenderOffScreen(): Boolean { - val continuePluginService = ServiceManager.getService( - project, - ContinuePluginService::class.java - ) - - // Check if useOSR is explicitly set in config - val useOSR = continuePluginService.coreMessenger?.config?.ui?.useOSR - if (useOSR != null) { - return useOSR - } - - // Fall back to version check - val minBuildNumber = 233 - val applicationInfo = ApplicationInfo.getInstance() - val currentBuildNumber = applicationInfo.build.baselineVersion - return currentBuildNumber >= minBuildNumber - } } diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 80cc304b3..49734ac29 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -2777,11 +2777,6 @@ "x-intellij-html-description": "If set to true, a scrollbar will be displayed in the chat window to navigate through messages.", "default": false, "type": "boolean" - }, - "useOSR": { - "type": "boolean", - "description": "Whether to use off-screen rendering in JetBrains IDEs. By default, Continue will automatically determine whether to use OSR based on your IDE version. Set this to true to force OSR on, or false to force it off.", - "default": null } } },