small tweaks
This commit is contained in:
parent
c7b9aa10a7
commit
52bed16ae5
5 changed files with 17 additions and 11 deletions
|
|
@ -51,7 +51,7 @@ async function installNodeModuleInTempDirAndCopyToCurrent(packageName, toCopy) {
|
|||
console.log(`Copying ${packageName} to ${toCopy}`);
|
||||
// This is a way to install only one package without npm trying to install all the dependencies
|
||||
// Create a temporary directory for installing the package
|
||||
const adjustedName = toCopy.replace(/^@/, "").replace("/", "-");
|
||||
const adjustedName = packageName.replace(/^@/, "").replace("/", "-");
|
||||
const tempDir = path.join(
|
||||
__dirname,
|
||||
"tmp",
|
||||
|
|
|
|||
|
|
@ -2042,7 +2042,9 @@
|
|||
"if": {
|
||||
"properties": {
|
||||
"provider": {
|
||||
"enum": ["cohere"]
|
||||
"enum": [
|
||||
"cohere"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
|
@ -2050,14 +2052,18 @@
|
|||
]
|
||||
},
|
||||
"then": {
|
||||
"required": ["apiKey"]
|
||||
"required": [
|
||||
"apiKey"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"provider": {
|
||||
"enum": ["gemini"]
|
||||
"enum": [
|
||||
"gemini"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
|
|
|||
2
extensions/vscode/package-lock.json
generated
2
extensions/vscode/package-lock.json
generated
|
|
@ -135,8 +135,8 @@
|
|||
"yaml": "^2.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@google/generative-ai": "^0.11.4",
|
||||
"@biomejs/biome": "1.6.4",
|
||||
"@google/generative-ai": "^0.11.4",
|
||||
"@types/follow-redirects": "^1.14.4",
|
||||
"@types/jest": "^29.5.11",
|
||||
"@types/jquery": "^3.5.29",
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ const exe = os === "win32" ? ".exe" : "";
|
|||
console.log(`Copying ${packageName} to ${toCopy}`);
|
||||
// This is a way to install only one package without npm trying to install all the dependencies
|
||||
// Create a temporary directory for installing the package
|
||||
const adjustedName = toCopy.replace(/^@/, "").replace("/", "-");
|
||||
const adjustedName = packageName.replace(/^@/, "").replace("/", "-");
|
||||
|
||||
const tempDir = `/tmp/continue-node_modules-${adjustedName}`;
|
||||
const currentDir = process.cwd();
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ const MentionList = forwardRef((props: MentionListProps, ref) => {
|
|||
}
|
||||
};
|
||||
|
||||
const totalItems = allItems.length;
|
||||
const totalItems = allItems.length;
|
||||
|
||||
const itemRefs = useRef<Array<HTMLButtonElement | null>>([]);
|
||||
|
||||
|
|
@ -239,18 +239,18 @@ const MentionList = forwardRef((props: MentionListProps, ref) => {
|
|||
setSelectedIndex((prevIndex) => {
|
||||
const newIndex = prevIndex - 1 >= 0 ? prevIndex - 1 : 0;
|
||||
itemRefs.current[newIndex]?.scrollIntoView({
|
||||
behavior: "smooth",
|
||||
behavior: "instant",
|
||||
block: "nearest",
|
||||
});
|
||||
return newIndex;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
const downHandler = () => {
|
||||
setSelectedIndex((prevIndex) => {
|
||||
const newIndex = prevIndex + 1 < totalItems ? prevIndex + 1 : prevIndex;
|
||||
itemRefs.current[newIndex]?.scrollIntoView({
|
||||
behavior: "smooth",
|
||||
behavior: "instant",
|
||||
block: "nearest",
|
||||
});
|
||||
return newIndex;
|
||||
|
|
@ -340,7 +340,7 @@ const MentionList = forwardRef((props: MentionListProps, ref) => {
|
|||
allItems.map((item, index) => (
|
||||
<ItemDiv
|
||||
as="button"
|
||||
ref={el => (itemRefs.current[index] = el)}
|
||||
ref={(el) => (itemRefs.current[index] = el)}
|
||||
className={`item ${
|
||||
index === selectedIndex ? "is-selected" : ""
|
||||
}`}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue