🐛 small improvements
This commit is contained in:
parent
a7da4c13bc
commit
21720596e7
4 changed files with 15 additions and 4 deletions
|
|
@ -26,7 +26,7 @@ class ContinueCustomElementRenderer (
|
|||
protected val font: Font
|
||||
get() {
|
||||
val editorFont = editor.colorsScheme.getFont(EditorFontType.PLAIN)
|
||||
return editorFont.deriveFont(Font.ITALIC) ?: editorFont
|
||||
return editorFont.deriveFont(Font.PLAIN) ?: editorFont
|
||||
}
|
||||
|
||||
private fun offsetY(): Int {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class ContinueMultilineCustomElementRenderer (
|
|||
protected val font: Font
|
||||
get() {
|
||||
val editorFont = editor.colorsScheme.getFont(EditorFontType.PLAIN)
|
||||
return editorFont.deriveFont(Font.ITALIC) ?: editorFont
|
||||
return editorFont.deriveFont(Font.PLAIN) ?: editorFont
|
||||
}
|
||||
|
||||
private fun offsetY(): Int {
|
||||
|
|
|
|||
|
|
@ -195,9 +195,11 @@ export class VsCodeExtension {
|
|||
// from outside the window are also caught
|
||||
fs.watchFile(getConfigJsonPath(), { interval: 1000 }, (stats) => {
|
||||
this.configHandler.reloadConfig();
|
||||
this.tabAutocompleteModel.clearLlm();
|
||||
});
|
||||
fs.watchFile(getConfigTsPath(), { interval: 1000 }, (stats) => {
|
||||
this.configHandler.reloadConfig();
|
||||
this.tabAutocompleteModel.clearLlm();
|
||||
});
|
||||
|
||||
vscode.workspace.onDidSaveTextDocument((event) => {
|
||||
|
|
|
|||
|
|
@ -194,6 +194,9 @@ function TipTapEditor(props: TipTapEditorProps) {
|
|||
props.availableSlashCommands,
|
||||
);
|
||||
|
||||
const active = useSelector((state: RootState) => state.state.active);
|
||||
const activeRef = useUpdatingRef(active);
|
||||
|
||||
async function handleImageFile(
|
||||
file: File,
|
||||
): Promise<[HTMLImageElement, string] | undefined> {
|
||||
|
|
@ -268,7 +271,14 @@ function TipTapEditor(props: TipTapEditorProps) {
|
|||
onEnterRef.current({ useCodebase: true });
|
||||
return true;
|
||||
},
|
||||
|
||||
"Cmd-Backspace": () => {
|
||||
// If you press cmd+backspace wanting to cancel,
|
||||
// but are inside of a text box, it shouldn't
|
||||
// delete the text
|
||||
if (activeRef.current) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
"Shift-Enter": () =>
|
||||
this.editor.commands.first(({ commands }) => [
|
||||
() => commands.newlineInCode(),
|
||||
|
|
@ -448,7 +458,6 @@ function TipTapEditor(props: TipTapEditorProps) {
|
|||
}, []);
|
||||
|
||||
// Re-focus main input after done generating
|
||||
const active = useSelector((state: RootState) => state.state.active);
|
||||
useEffect(() => {
|
||||
if (editor && !active && props.isMainInput && document.hasFocus()) {
|
||||
editor.commands.focus();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue