🐛 fix focus shortcut
This commit is contained in:
parent
2ea83a901b
commit
f1c0fe7c8e
4 changed files with 31 additions and 33 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { Tiktoken, encodingForModel as _encodingForModel } from "js-tiktoken";
|
||||
// @ts-expect-error
|
||||
// @ts-ignore
|
||||
import llamaTokenizer from "llama-tokenizer-js";
|
||||
import { ChatMessage, MessageContent, MessagePart } from "..";
|
||||
import { autodetectTemplateType } from "./autodetect";
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
# 👋 Welcome to Continue
|
||||
|
||||
## ❗️ Before you get started
|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
## 🔑 Most important shortcuts
|
||||
|
||||
> If you've been using Continue, these have changed
|
||||
|
||||
<kbd>Cmd/Ctrl</kbd> + <kbd>L</kbd> = Select code
|
||||
|
||||
<kbd>Cmd/Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>L</kbd> = Select code for follow-up
|
||||
|
|
@ -16,6 +12,12 @@ Continue is currently in the left sidebar, but we recommend moving it to the rig
|
|||
|
||||
<kbd>Cmd/Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>R</kbd> = Automatically debug terminal
|
||||
|
||||
## ❗️ Before you get started
|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
## ⚡️ Setting up tab autocomplete
|
||||
|
||||
1. Download [Ollama](https://ollama.ai)
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ function TipTapEditor(props: TipTapEditorProps) {
|
|||
const handleKeyDown = (event: any) => {
|
||||
if (
|
||||
isMetaEquivalentKeyPressed(event) &&
|
||||
(isJetBrains() ? event.code === "KeyJ" : event.code === "KeyM")
|
||||
(isJetBrains() ? event.code === "KeyJ" : event.code === "KeyL")
|
||||
) {
|
||||
setIgnoreHighlightedCode(true);
|
||||
setTimeout(() => {
|
||||
|
|
@ -393,7 +393,9 @@ function TipTapEditor(props: TipTapEditorProps) {
|
|||
if (historyLength > 0) {
|
||||
saveSession();
|
||||
}
|
||||
editor?.commands.focus("end");
|
||||
setTimeout(() => {
|
||||
editor?.commands.focus("end");
|
||||
}, 20);
|
||||
},
|
||||
[historyLength, saveSession, editor, props.isMainInput]
|
||||
);
|
||||
|
|
@ -404,7 +406,9 @@ function TipTapEditor(props: TipTapEditorProps) {
|
|||
if (!props.isMainInput) {
|
||||
return;
|
||||
}
|
||||
editor?.commands.focus("end");
|
||||
setTimeout(() => {
|
||||
editor?.commands.focus("end");
|
||||
}, 20);
|
||||
},
|
||||
[editor, props.isMainInput]
|
||||
);
|
||||
|
|
@ -416,7 +420,9 @@ function TipTapEditor(props: TipTapEditorProps) {
|
|||
return;
|
||||
}
|
||||
saveSession();
|
||||
editor?.commands.focus("end");
|
||||
setTimeout(() => {
|
||||
editor?.commands.focus("end");
|
||||
}, 20);
|
||||
},
|
||||
[editor, props.isMainInput]
|
||||
);
|
||||
|
|
@ -476,11 +482,7 @@ function TipTapEditor(props: TipTapEditorProps) {
|
|||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (!props.isMainInput) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (editor && !document.hasFocus()) {
|
||||
if (props.isMainInput && editor && document.hasFocus()) {
|
||||
editor.commands.focus();
|
||||
// setTimeout(() => {
|
||||
// // https://github.com/continuedev/continue/pull/881
|
||||
|
|
|
|||
|
|
@ -113,7 +113,9 @@ function TableRow({
|
|||
navigate("/");
|
||||
}}
|
||||
>
|
||||
<div className="text-md">{session.title}</div>
|
||||
<div className="text-md">
|
||||
{JSON.stringify(session.title).slice(1, -1)}
|
||||
</div>
|
||||
<div className="text-gray-400">
|
||||
{date.toLocaleString("en-US", {
|
||||
year: "2-digit",
|
||||
|
|
@ -271,28 +273,20 @@ function History() {
|
|||
)} */}
|
||||
</div>
|
||||
|
||||
{sessions.filter((session) => {
|
||||
if (
|
||||
!filteringByWorkspace ||
|
||||
typeof workspacePaths === "undefined" ||
|
||||
typeof session.workspaceDirectory === "undefined"
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return workspacePaths.includes(session.workspaceDirectory);
|
||||
}).length === 0 && (
|
||||
<div className="text-center m-4">
|
||||
No past sessions found. To start a new session, either click the "+"
|
||||
button or use the keyboard shortcut: <b>Option + Command + N</b>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div>
|
||||
<SearchBar
|
||||
placeholder="Search past sessions"
|
||||
type="text"
|
||||
onChange={(e) => setSearchTerm(e.target.value)}
|
||||
/>
|
||||
|
||||
{filteredAndSortedSessions.length === 0 && (
|
||||
<div className="text-center m-4">
|
||||
No past sessions found. To start a new session, either click the "+"
|
||||
button or use the keyboard shortcut: <b>Option + Command + N</b>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<table className="w-full border-spacing-0 border-collapse">
|
||||
<tbody>
|
||||
{filteredAndSortedSessions.map((session, index) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue