Merge branch 'continuedev:main' into main

This commit is contained in:
Anoyi 2024-11-27 10:23:52 +08:00 • committed by GitHub
commit 9a17860b35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 1106 additions and 218 deletions

View file

@ -1 +0,0 @@
npx prettier --write .

View file

@ -252,7 +252,7 @@ export class CompletionProvider {
//////////
// Save to cache
if (!outcome.cacheHit) {
if (!outcome.cacheHit && helper.options.useCache) {
(await this.autocompleteCache).put(outcome.prefix, outcome.completion);
}

View file

@ -87,7 +87,7 @@ const getDiffSnippets = async (
): Promise<AutocompleteDiffSnippet[]> => {
const diff = await ide.getDiff(true);
return [diff].map((item) => {
return diff.map((item) => {
return {
content: item,
type: AutocompleteSnippetType.Diff,

View file

@ -100,7 +100,7 @@ export const formatSnippets = (
return item.content + `\n${commentMark}\n${commentMark}`;
}
return item.content + "\n\n";
return item.content;
})
.join("\n") + `\n${currentFilepathComment}`
);

View file

@ -8,15 +8,16 @@ const CommitMessageCommand: SlashCommand = {
const includeUnstaged = params?.includeUnstaged ?? false;
const diff = await ide.getDiff(includeUnstaged);
if (!diff || diff.trim() === "") {
if (diff.length === 0) {
yield "No changes detected. Make sure you are in a git repository with current changes.";
return;
}
const prompt = `${diff}\n\nGenerate a commit message for the above set of changes. First, give a single sentence, no more than 80 characters. Then, after 2 line breaks, give a list of no more than 5 short bullet points, each no more than 40 characters. Output nothing except for the commit message, and don't surround it in quotes.`;
for await (const chunk of llm.streamChat([
{ role: "user", content: prompt },
], new AbortController().signal)) {
const prompt = `${diff.join("\n")}\n\nGenerate a commit message for the above set of changes. First, give a single sentence, no more than 80 characters. Then, after 2 line breaks, give a list of no more than 5 short bullet points, each no more than 40 characters. Output nothing except for the commit message, and don't surround it in quotes.`;
for await (const chunk of llm.streamChat(
[{ role: "user", content: prompt }],
new AbortController().signal,
)) {
yield stripImages(chunk.content);
}
},

View file

@ -125,7 +125,10 @@ export function slashCommandFromPromptFile(
systemMessage,
);
for await (const chunk of context.llm.streamChat(messages, new AbortController().signal)) {
for await (const chunk of context.llm.streamChat(
messages,
new AbortController().signal,
)) {
yield stripImages(chunk.content);
}
@ -173,7 +176,7 @@ async function renderPrompt(
const diff = await context.ide.getDiff(false);
const currentFile = await context.ide.getCurrentFile();
const inputData: Record<string, string> = {
diff,
diff: diff.join("\n"),
input: userInput,
};
if (currentFile) {

View file

@ -22,9 +22,9 @@ class DiffContextProvider extends BaseContextProvider {
{
description: "The current git diff",
content:
diff.trim() === ""
diff.length === 0
? "Git shows no current changes."
: `\`\`\`git diff\n${diff}\n\`\`\``,
: `\`\`\`git diff\n${diff.join("\n")}\n\`\`\``,
name: "Git Diff",
},
];

2
core/index.d.ts vendored
View file

@ -503,7 +503,7 @@ export interface IdeSettings {
export interface IDE {
getIdeInfo(): Promise<IdeInfo>;
getIdeSettings(): Promise<IdeSettings>;
getDiff(includeUnstaged: boolean): Promise<string>;
getDiff(includeUnstaged: boolean): Promise<string[]>;
getClipboardContent(): Promise<{ text: string; copiedAt: string }>;
isTelemetryEnabled(): Promise<boolean>;
getUniqueId(): Promise<string>;

View file

@ -250,7 +250,7 @@ export class ChromiumInstaller {
private async proposeInstall(site: string) {
const msg =
`Unable to crawl documentation site: ${site}\n` +
`Unable to crawl documentation site: "${site}".` +
"We recommend installing Chromium. " +
"Download progress can be viewed in the developer console.";

View file

@ -8,6 +8,8 @@ export default {
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
"^uuid$": "uuid", // https://stackoverflow.com/a/73626360
'^@azure/(.*)$': '<rootDir>/node_modules/@azure/$1',
'^mssql$': '<rootDir>/node_modules/mssql'
},
extensionsToTreatAsEsm: [".ts"],
preset: "ts-jest/presets/default-esm",

485
core/package-lock.json generated
View file

@ -24,7 +24,7 @@
"cheerio": "^1.0.0-rc.12",
"commander": "^12.0.0",
"comment-json": "^4.2.3",
"dbinfoz": "^0.11.0",
"dbinfoz": "^0.14.0",
"diff": "^7.0.0",
"dotenv": "^16.4.5",
"fastest-levenshtein": "^1.0.16",
@ -1229,6 +1229,241 @@
}
}
},
"node_modules/@azure/abort-controller": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz",
"integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==",
"dependencies": {
"tslib": "^2.6.2"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@azure/core-auth": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.9.0.tgz",
"integrity": "sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw==",
"dependencies": {
"@azure/abort-controller": "^2.0.0",
"@azure/core-util": "^1.11.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@azure/core-client": {
"version": "1.9.2",
"resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.9.2.tgz",
"integrity": "sha512-kRdry/rav3fUKHl/aDLd/pDLcB+4pOFwPPTVEExuMyaI5r+JBbMWqRbCY1pn5BniDaU3lRxO9eaQ1AmSMehl/w==",
"dependencies": {
"@azure/abort-controller": "^2.0.0",
"@azure/core-auth": "^1.4.0",
"@azure/core-rest-pipeline": "^1.9.1",
"@azure/core-tracing": "^1.0.0",
"@azure/core-util": "^1.6.1",
"@azure/logger": "^1.0.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@azure/core-http-compat": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-2.1.2.tgz",
"integrity": "sha512-5MnV1yqzZwgNLLjlizsU3QqOeQChkIXw781Fwh1xdAqJR5AA32IUaq6xv1BICJvfbHoa+JYcaij2HFkhLbNTJQ==",
"dependencies": {
"@azure/abort-controller": "^2.0.0",
"@azure/core-client": "^1.3.0",
"@azure/core-rest-pipeline": "^1.3.0"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@azure/core-lro": {
"version": "2.7.2",
"resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.7.2.tgz",
"integrity": "sha512-0YIpccoX8m/k00O7mDDMdJpbr6mf1yWo2dfmxt5A8XVZVVMz2SSKaEbMCeJRvgQ0IaSlqhjT47p4hVIRRy90xw==",
"dependencies": {
"@azure/abort-controller": "^2.0.0",
"@azure/core-util": "^1.2.0",
"@azure/logger": "^1.0.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@azure/core-paging": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.6.2.tgz",
"integrity": "sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA==",
"dependencies": {
"tslib": "^2.6.2"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@azure/core-rest-pipeline": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.18.0.tgz",
"integrity": "sha512-QSoGUp4Eq/gohEFNJaUOwTN7BCc2nHTjjbm75JT0aD7W65PWM1H/tItz0GsABn22uaKyGxiMhWQLt2r+FGU89Q==",
"dependencies": {
"@azure/abort-controller": "^2.0.0",
"@azure/core-auth": "^1.8.0",
"@azure/core-tracing": "^1.0.1",
"@azure/core-util": "^1.11.0",
"@azure/logger": "^1.0.0",
"http-proxy-agent": "^7.0.0",
"https-proxy-agent": "^7.0.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@azure/core-tracing": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.2.0.tgz",
"integrity": "sha512-UKTiEJPkWcESPYJz3X5uKRYyOcJD+4nYph+KpfdPRnQJVrZfk0KJgdnaAWKfhsBBtAf/D58Az4AvCJEmWgIBAg==",
"dependencies": {
"tslib": "^2.6.2"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@azure/core-util": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.11.0.tgz",
"integrity": "sha512-DxOSLua+NdpWoSqULhjDyAZTXFdP/LKkqtYuxxz1SCN289zk3OG8UOpnCQAz/tygyACBtWp/BoO72ptK7msY8g==",
"dependencies": {
"@azure/abort-controller": "^2.0.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@azure/identity": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.5.0.tgz",
"integrity": "sha512-EknvVmtBuSIic47xkOqyNabAme0RYTw52BTMz8eBgU1ysTyMrD1uOoM+JdS0J/4Yfp98IBT3osqq3BfwSaNaGQ==",
"dependencies": {
"@azure/abort-controller": "^2.0.0",
"@azure/core-auth": "^1.9.0",
"@azure/core-client": "^1.9.2",
"@azure/core-rest-pipeline": "^1.17.0",
"@azure/core-tracing": "^1.0.0",
"@azure/core-util": "^1.11.0",
"@azure/logger": "^1.0.0",
"@azure/msal-browser": "^3.26.1",
"@azure/msal-node": "^2.15.0",
"events": "^3.0.0",
"jws": "^4.0.0",
"open": "^8.0.0",
"stoppable": "^1.1.0",
"tslib": "^2.2.0"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@azure/keyvault-common": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@azure/keyvault-common/-/keyvault-common-2.0.0.tgz",
"integrity": "sha512-wRLVaroQtOqfg60cxkzUkGKrKMsCP6uYXAOomOIysSMyt1/YM0eUn9LqieAWM8DLcU4+07Fio2YGpPeqUbpP9w==",
"dependencies": {
"@azure/abort-controller": "^2.0.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-client": "^1.5.0",
"@azure/core-rest-pipeline": "^1.8.0",
"@azure/core-tracing": "^1.0.0",
"@azure/core-util": "^1.10.0",
"@azure/logger": "^1.1.4",
"tslib": "^2.2.0"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@azure/keyvault-keys": {
"version": "4.9.0",
"resolved": "https://registry.npmjs.org/@azure/keyvault-keys/-/keyvault-keys-4.9.0.tgz",
"integrity": "sha512-ZBP07+K4Pj3kS4TF4XdkqFcspWwBHry3vJSOFM5k5ZABvf7JfiMonvaFk2nBF6xjlEbMpz5PE1g45iTMme0raQ==",
"dependencies": {
"@azure/abort-controller": "^2.0.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-client": "^1.5.0",
"@azure/core-http-compat": "^2.0.1",
"@azure/core-lro": "^2.2.0",
"@azure/core-paging": "^1.1.1",
"@azure/core-rest-pipeline": "^1.8.1",
"@azure/core-tracing": "^1.0.0",
"@azure/core-util": "^1.0.0",
"@azure/keyvault-common": "^2.0.0",
"@azure/logger": "^1.0.0",
"tslib": "^2.2.0"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@azure/logger": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.1.4.tgz",
"integrity": "sha512-4IXXzcCdLdlXuCG+8UKEwLA1T1NHqUfanhXYHiQTn+6sfWCZXduqbtXDGceg3Ce5QxTGo7EqmbV6Bi+aqKuClQ==",
"dependencies": {
"tslib": "^2.6.2"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@azure/msal-browser": {
"version": "3.27.0",
"resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-3.27.0.tgz",
"integrity": "sha512-+b4ZKSD8+vslCtVRVetkegEhOFMLP3rxDWJY212ct+2r6jVg6OSQKc1Qz3kCoXo0FgwaXkb+76TMZfpHp8QtgA==",
"dependencies": {
"@azure/msal-common": "14.16.0"
},
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/@azure/msal-common": {
"version": "14.16.0",
"resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.16.0.tgz",
"integrity": "sha512-1KOZj9IpcDSwpNiQNjt0jDYZpQvNZay7QAEi/5DLubay40iGYtLzya/jbjRPLyOTZhEKyL1MzPuw2HqBCjceYA==",
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/@azure/msal-node": {
"version": "2.16.2",
"resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.16.2.tgz",
"integrity": "sha512-An7l1hEr0w1HMMh1LU+rtDtqL7/jw74ORlc9Wnh06v7TU/xpG39/Zdr1ZJu3QpjUfKJ+E0/OXMW8DRSWTlh7qQ==",
"dependencies": {
"@azure/msal-common": "14.16.0",
"jsonwebtoken": "^9.0.0",
"uuid": "^8.3.0"
},
"engines": {
"node": ">=16"
}
},
"node_modules/@azure/msal-node/node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/@babel/code-frame": {
"version": "7.24.7",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz",
@ -3855,6 +4090,11 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
"node_modules/@js-joda/core": {
"version": "5.6.3",
"resolved": "https://registry.npmjs.org/@js-joda/core/-/core-5.6.3.tgz",
"integrity": "sha512-T1rRxzdqkEXcou0ZprN1q9yDRlvzCPLqmlNt5IIsGBzoEVgLCCYrKEwc84+TvsXuAc95VAZwtWD2zVsKPY4bcA=="
},
"node_modules/@lancedb/vectordb-darwin-arm64": {
"version": "0.4.20",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.20.tgz",
@ -4814,6 +5054,11 @@
"resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz",
"integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA=="
},
"node_modules/@tediousjs/connection-string": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/@tediousjs/connection-string/-/connection-string-0.5.0.tgz",
"integrity": "sha512-7qSgZbincDDDFyRweCIEvZULFAw5iz/DeunhvuxpL31nfntX3P4Yd4HkHBRg9H8CdqY1e5WFN1PZIz/REL9MVQ=="
},
"node_modules/@tootallnate/once": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz",
@ -5085,6 +5330,20 @@
"node": ">=12"
}
},
"node_modules/@types/readable-stream": {
"version": "4.0.18",
"resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.18.tgz",
"integrity": "sha512-21jK/1j+Wg+7jVw1xnSwy/2Q1VgVjWuFssbYGTREPUBeZ+rqVFl2udq0IkxzPC0ZhOzVceUbyIACFZKLqKEBlA==",
"dependencies": {
"@types/node": "*",
"safe-buffer": "~5.1.1"
}
},
"node_modules/@types/readable-stream/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/@types/request": {
"version": "2.48.12",
"resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.12.tgz",
@ -6273,7 +6532,6 @@
"url": "https://feross.org/support"
}
],
"optional": true,
"dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.2.1"
@ -6965,10 +7223,11 @@
}
},
"node_modules/dbinfoz": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/dbinfoz/-/dbinfoz-0.11.0.tgz",
"integrity": "sha512-l7REBd9pwTBI6PWSk/dx+zCpSE2tiJdSKfApeoOajnSgyMJgkwGfhpPO2mV76MLQeKPaSm0mMKxmoqd38SaHmw==",
"version": "0.14.0",
"resolved": "https://registry.npmjs.org/dbinfoz/-/dbinfoz-0.14.0.tgz",
"integrity": "sha512-8NLjmj3gEyxbMu1ZwPEby77QvoEkk5NrHKSwX4oSKeaREherwuSx1y08cXmxBEjrSmvByUX9axoKscuilSXfmg==",
"dependencies": {
"mssql": "^11.0.1",
"mysql2": "^3.9.1",
"pg": "^8.11.3",
"sqlite3": "^5.1.7"
@ -7061,6 +7320,14 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/define-lazy-prop": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
"integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==",
"engines": {
"node": ">=8"
}
},
"node_modules/define-properties": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",
@ -9373,6 +9640,20 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-docker": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
"integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
"bin": {
"is-docker": "cli.js"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-electron": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.2.tgz",
@ -9577,6 +9858,17 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-wsl": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
"integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
"dependencies": {
"is-docker": "^2.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/isarray": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
@ -10559,6 +10851,11 @@
"jinjajs": "cli.js"
}
},
"node_modules/js-md4": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz",
"integrity": "sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA=="
},
"node_modules/js-tiktoken": {
"version": "1.0.12",
"resolved": "https://registry.npmjs.org/js-tiktoken/-/js-tiktoken-1.0.12.tgz",
@ -10723,6 +11020,46 @@
"node": ">= 10.0.0"
}
},
"node_modules/jsonwebtoken": {
"version": "9.0.2",
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
"integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==",
"dependencies": {
"jws": "^3.2.2",
"lodash.includes": "^4.3.0",
"lodash.isboolean": "^3.0.3",
"lodash.isinteger": "^4.0.4",
"lodash.isnumber": "^3.0.3",
"lodash.isplainobject": "^4.0.6",
"lodash.isstring": "^4.0.1",
"lodash.once": "^4.0.0",
"ms": "^2.1.1",
"semver": "^7.5.4"
},
"engines": {
"node": ">=12",
"npm": ">=6"
}
},
"node_modules/jsonwebtoken/node_modules/jwa": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
"integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
"dependencies": {
"buffer-equal-constant-time": "1.0.1",
"ecdsa-sig-formatter": "1.0.11",
"safe-buffer": "^5.0.1"
}
},
"node_modules/jsonwebtoken/node_modules/jws": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
"integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
"dependencies": {
"jwa": "^1.4.1",
"safe-buffer": "^5.0.1"
}
},
"node_modules/jsprim": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz",
@ -10888,6 +11225,36 @@
"integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==",
"dev": true
},
"node_modules/lodash.includes": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
"integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w=="
},
"node_modules/lodash.isboolean": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
"integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="
},
"node_modules/lodash.isinteger": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
"integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA=="
},
"node_modules/lodash.isnumber": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
"integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw=="
},
"node_modules/lodash.isplainobject": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
"integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="
},
"node_modules/lodash.isstring": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
"integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw=="
},
"node_modules/lodash.memoize": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
@ -10899,6 +11266,11 @@
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="
},
"node_modules/lodash.once": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
"integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg=="
},
"node_modules/long": {
"version": "5.2.3",
"resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz",
@ -11288,6 +11660,33 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/mssql": {
"version": "11.0.1",
"resolved": "https://registry.npmjs.org/mssql/-/mssql-11.0.1.tgz",
"integrity": "sha512-KlGNsugoT90enKlR8/G36H0kTxPthDhmtNUCwEHvgRza5Cjpjoj+P2X6eMpFUDN7pFrJZsKadL4x990G8RBE1w==",
"dependencies": {
"@tediousjs/connection-string": "^0.5.0",
"commander": "^11.0.0",
"debug": "^4.3.3",
"rfdc": "^1.3.0",
"tarn": "^3.0.2",
"tedious": "^18.2.1"
},
"bin": {
"mssql": "bin/mssql"
},
"engines": {
"node": ">=18"
}
},
"node_modules/mssql/node_modules/commander": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz",
"integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==",
"engines": {
"node": ">=16"
}
},
"node_modules/myers-diff": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/myers-diff/-/myers-diff-2.1.0.tgz",
@ -11340,6 +11739,11 @@
"resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz",
"integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="
},
"node_modules/native-duplexpair": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/native-duplexpair/-/native-duplexpair-1.0.0.tgz",
"integrity": "sha512-E7QQoM+3jvNtlmyfqRZ0/U75VFgCls+fSkbml2MpgWkWyz3ox8Y58gNhfuziuQYGNNQAbFZJQck55LHCnCK6CA=="
},
"node_modules/natural-compare": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
@ -11798,6 +12202,22 @@
"resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
},
"node_modules/open": {
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz",
"integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==",
"dependencies": {
"define-lazy-prop": "^2.0.0",
"is-docker": "^2.1.1",
"is-wsl": "^2.2.0"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/openai": {
"version": "4.47.1",
"resolved": "https://registry.npmjs.org/openai/-/openai-4.47.1.tgz",
@ -12513,7 +12933,6 @@
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
"optional": true,
"engines": {
"node": ">= 0.6.0"
}
@ -12875,7 +13294,6 @@
"version": "4.5.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz",
"integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==",
"optional": true,
"dependencies": {
"abort-controller": "^3.0.0",
"buffer": "^6.0.3",
@ -13148,6 +13566,11 @@
"node": ">=0.10.0"
}
},
"node_modules/rfdc": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz",
"integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA=="
},
"node_modules/rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
@ -13711,6 +14134,15 @@
"node": ">=8"
}
},
"node_modules/stoppable": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz",
"integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==",
"engines": {
"node": ">=4",
"npm": ">=6"
}
},
"node_modules/stream-read-all": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/stream-read-all/-/stream-read-all-3.0.1.tgz",
@ -14083,6 +14515,45 @@
"node": ">=18"
}
},
"node_modules/tarn": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.2.tgz",
"integrity": "sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ==",
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/tedious": {
"version": "18.6.1",
"resolved": "https://registry.npmjs.org/tedious/-/tedious-18.6.1.tgz",
"integrity": "sha512-9AvErXXQTd6l7TDd5EmM+nxbOGyhnmdbp/8c3pw+tjaiSXW9usME90ET/CRG1LN1Y9tPMtz/p83z4Q97B4DDpw==",
"dependencies": {
"@azure/core-auth": "^1.7.2",
"@azure/identity": "^4.2.1",
"@azure/keyvault-keys": "^4.4.0",
"@js-joda/core": "^5.6.1",
"@types/node": ">=18",
"bl": "^6.0.11",
"iconv-lite": "^0.6.3",
"js-md4": "^0.3.2",
"native-duplexpair": "^1.0.0",
"sprintf-js": "^1.1.3"
},
"engines": {
"node": ">=18"
}
},
"node_modules/tedious/node_modules/bl": {
"version": "6.0.16",
"resolved": "https://registry.npmjs.org/bl/-/bl-6.0.16.tgz",
"integrity": "sha512-V/kz+z2Mx5/6qDfRCilmrukUXcXuCoXKg3/3hDvzKKoSUx8CJKudfIoT29XZc3UE9xBvxs5qictiHdprwtteEg==",
"dependencies": {
"@types/readable-stream": "^4.0.0",
"buffer": "^6.0.3",
"inherits": "^2.0.4",
"readable-stream": "^4.2.0"
}
},
"node_modules/test-exclude": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",

View file

@ -55,7 +55,7 @@
"cheerio": "^1.0.0-rc.12",
"commander": "^12.0.0",
"comment-json": "^4.2.3",
"dbinfoz": "^0.11.0",
"dbinfoz": "^0.14.0",
"diff": "^7.0.0",
"dotenv": "^16.4.5",
"fastest-levenshtein": "^1.0.16",

View file

@ -64,7 +64,7 @@ export type ToIdeFromWebviewOrCoreProtocol = {
getPinnedFiles: [undefined, string[]];
showLines: [{ filepath: string; startLine: number; endLine: number }, void];
readRangeInFile: [{ filepath: string; range: Range }, string];
getDiff: [{ includeUnstaged: boolean }, string];
getDiff: [{ includeUnstaged: boolean }, string[]];
getWorkspaceConfigs: [undefined, ContinueRcJson[]];
getTerminalContents: [undefined, string];
getDebugLocals: [{ threadIndex: number }, string];

View file

@ -125,8 +125,8 @@ class FileSystemIde implements IDE {
return Promise.resolve([]);
}
getDiff(includeUnstaged: boolean): Promise<string> {
return Promise.resolve("");
getDiff(includeUnstaged: boolean): Promise<string[]> {
return Promise.resolve([]);
}
getClipboardContent(): Promise<{ text: string; copiedAt: string }> {

View file

@ -18,7 +18,7 @@
"axios": "^1.2.5",
"core": "file:../../core",
"cors": "^2.8.5",
"dbinfoz": "^0.11.0",
"dbinfoz": "^0.14.0",
"downshift": "^7.6.0",
"esbuild": "^0.17.19",
"express": "^4.18.2",
@ -109,7 +109,6 @@
"cheerio": "^1.0.0-rc.12",
"commander": "^12.0.0",
"comment-json": "^4.2.3",
"dbinfoz": "^0.14.0",
"diff": "^7.0.0",
"dotenv": "^16.4.5",
"fastest-levenshtein": "^1.0.16",
@ -246,7 +245,6 @@
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz",
"integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==",
"dev": true,
"dependencies": {
"tslib": "^2.6.2"
},
@ -258,7 +256,6 @@
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.9.0.tgz",
"integrity": "sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw==",
"dev": true,
"dependencies": {
"@azure/abort-controller": "^2.0.0",
"@azure/core-util": "^1.11.0",
@ -272,7 +269,6 @@
"version": "1.9.2",
"resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.9.2.tgz",
"integrity": "sha512-kRdry/rav3fUKHl/aDLd/pDLcB+4pOFwPPTVEExuMyaI5r+JBbMWqRbCY1pn5BniDaU3lRxO9eaQ1AmSMehl/w==",
"dev": true,
"dependencies": {
"@azure/abort-controller": "^2.0.0",
"@azure/core-auth": "^1.4.0",
@ -286,11 +282,48 @@
"node": ">=18.0.0"
}
},
"node_modules/@azure/core-http-compat": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-2.1.2.tgz",
"integrity": "sha512-5MnV1yqzZwgNLLjlizsU3QqOeQChkIXw781Fwh1xdAqJR5AA32IUaq6xv1BICJvfbHoa+JYcaij2HFkhLbNTJQ==",
"dependencies": {
"@azure/abort-controller": "^2.0.0",
"@azure/core-client": "^1.3.0",
"@azure/core-rest-pipeline": "^1.3.0"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@azure/core-lro": {
"version": "2.7.2",
"resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.7.2.tgz",
"integrity": "sha512-0YIpccoX8m/k00O7mDDMdJpbr6mf1yWo2dfmxt5A8XVZVVMz2SSKaEbMCeJRvgQ0IaSlqhjT47p4hVIRRy90xw==",
"dependencies": {
"@azure/abort-controller": "^2.0.0",
"@azure/core-util": "^1.2.0",
"@azure/logger": "^1.0.0",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@azure/core-paging": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.6.2.tgz",
"integrity": "sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA==",
"dependencies": {
"tslib": "^2.6.2"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@azure/core-rest-pipeline": {
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.17.0.tgz",
"integrity": "sha512-62Vv8nC+uPId3j86XJ0WI+sBf0jlqTqPUFCBNrGtlaUeQUIXWV/D8GE5A1d+Qx8H7OQojn2WguC8kChD6v0shA==",
"dev": true,
"dependencies": {
"@azure/abort-controller": "^2.0.0",
"@azure/core-auth": "^1.8.0",
@ -309,7 +342,6 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.2.0.tgz",
"integrity": "sha512-UKTiEJPkWcESPYJz3X5uKRYyOcJD+4nYph+KpfdPRnQJVrZfk0KJgdnaAWKfhsBBtAf/D58Az4AvCJEmWgIBAg==",
"dev": true,
"dependencies": {
"tslib": "^2.6.2"
},
@ -321,7 +353,6 @@
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.11.0.tgz",
"integrity": "sha512-DxOSLua+NdpWoSqULhjDyAZTXFdP/LKkqtYuxxz1SCN289zk3OG8UOpnCQAz/tygyACBtWp/BoO72ptK7msY8g==",
"dev": true,
"dependencies": {
"@azure/abort-controller": "^2.0.0",
"tslib": "^2.6.2"
@ -334,7 +365,6 @@
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.5.0.tgz",
"integrity": "sha512-EknvVmtBuSIic47xkOqyNabAme0RYTw52BTMz8eBgU1ysTyMrD1uOoM+JdS0J/4Yfp98IBT3osqq3BfwSaNaGQ==",
"dev": true,
"dependencies": {
"@azure/abort-controller": "^2.0.0",
"@azure/core-auth": "^1.9.0",
@ -355,11 +385,50 @@
"node": ">=18.0.0"
}
},
"node_modules/@azure/keyvault-common": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@azure/keyvault-common/-/keyvault-common-2.0.0.tgz",
"integrity": "sha512-wRLVaroQtOqfg60cxkzUkGKrKMsCP6uYXAOomOIysSMyt1/YM0eUn9LqieAWM8DLcU4+07Fio2YGpPeqUbpP9w==",
"dependencies": {
"@azure/abort-controller": "^2.0.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-client": "^1.5.0",
"@azure/core-rest-pipeline": "^1.8.0",
"@azure/core-tracing": "^1.0.0",
"@azure/core-util": "^1.10.0",
"@azure/logger": "^1.1.4",
"tslib": "^2.2.0"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@azure/keyvault-keys": {
"version": "4.9.0",
"resolved": "https://registry.npmjs.org/@azure/keyvault-keys/-/keyvault-keys-4.9.0.tgz",
"integrity": "sha512-ZBP07+K4Pj3kS4TF4XdkqFcspWwBHry3vJSOFM5k5ZABvf7JfiMonvaFk2nBF6xjlEbMpz5PE1g45iTMme0raQ==",
"dependencies": {
"@azure/abort-controller": "^2.0.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-client": "^1.5.0",
"@azure/core-http-compat": "^2.0.1",
"@azure/core-lro": "^2.2.0",
"@azure/core-paging": "^1.1.1",
"@azure/core-rest-pipeline": "^1.8.1",
"@azure/core-tracing": "^1.0.0",
"@azure/core-util": "^1.0.0",
"@azure/keyvault-common": "^2.0.0",
"@azure/logger": "^1.0.0",
"tslib": "^2.2.0"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@azure/logger": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.1.4.tgz",
"integrity": "sha512-4IXXzcCdLdlXuCG+8UKEwLA1T1NHqUfanhXYHiQTn+6sfWCZXduqbtXDGceg3Ce5QxTGo7EqmbV6Bi+aqKuClQ==",
"dev": true,
"dependencies": {
"tslib": "^2.6.2"
},
@ -371,7 +440,6 @@
"version": "3.27.0",
"resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-3.27.0.tgz",
"integrity": "sha512-+b4ZKSD8+vslCtVRVetkegEhOFMLP3rxDWJY212ct+2r6jVg6OSQKc1Qz3kCoXo0FgwaXkb+76TMZfpHp8QtgA==",
"dev": true,
"dependencies": {
"@azure/msal-common": "14.16.0"
},
@ -383,7 +451,6 @@
"version": "14.16.0",
"resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.16.0.tgz",
"integrity": "sha512-1KOZj9IpcDSwpNiQNjt0jDYZpQvNZay7QAEi/5DLubay40iGYtLzya/jbjRPLyOTZhEKyL1MzPuw2HqBCjceYA==",
"dev": true,
"engines": {
"node": ">=0.8.0"
}
@ -392,7 +459,6 @@
"version": "2.16.0",
"resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.16.0.tgz",
"integrity": "sha512-oww0oJTOOvPKTVXqVyxfcFVjExQKYEkKR5KM0cTG3jnzt6u/MRMx8XaK49L/bxV35r9sCHQFjNlEShad9qGSYA==",
"dev": true,
"dependencies": {
"@azure/msal-common": "14.16.0",
"jsonwebtoken": "^9.0.0",
@ -406,7 +472,6 @@
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"dev": true,
"bin": {
"uuid": "dist/bin/uuid"
}
@ -1204,6 +1269,11 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
"node_modules/@js-joda/core": {
"version": "5.6.3",
"resolved": "https://registry.npmjs.org/@js-joda/core/-/core-5.6.3.tgz",
"integrity": "sha512-T1rRxzdqkEXcou0ZprN1q9yDRlvzCPLqmlNt5IIsGBzoEVgLCCYrKEwc84+TvsXuAc95VAZwtWD2zVsKPY4bcA=="
},
"node_modules/@jsdevtools/ono": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz",
@ -1765,6 +1835,11 @@
"node": ">=10"
}
},
"node_modules/@tediousjs/connection-string": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/@tediousjs/connection-string/-/connection-string-0.5.0.tgz",
"integrity": "sha512-7qSgZbincDDDFyRweCIEvZULFAw5iz/DeunhvuxpL31nfntX3P4Yd4HkHBRg9H8CdqY1e5WFN1PZIz/REL9MVQ=="
},
"node_modules/@tootallnate/once": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz",
@ -2035,6 +2110,20 @@
"@types/react": "*"
}
},
"node_modules/@types/readable-stream": {
"version": "4.0.18",
"resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.18.tgz",
"integrity": "sha512-21jK/1j+Wg+7jVw1xnSwy/2Q1VgVjWuFssbYGTREPUBeZ+rqVFl2udq0IkxzPC0ZhOzVceUbyIACFZKLqKEBlA==",
"dependencies": {
"@types/node": "*",
"safe-buffer": "~5.1.1"
}
},
"node_modules/@types/readable-stream/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/@types/request": {
"version": "2.48.12",
"resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.12.tgz",
@ -2751,6 +2840,17 @@
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"node_modules/abort-controller": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
"dependencies": {
"event-target-shim": "^5.0.0"
},
"engines": {
"node": ">=6.5"
}
},
"node_modules/accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
@ -3299,8 +3399,7 @@
"node_modules/buffer-equal-constant-time": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
"integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==",
"dev": true
"integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="
},
"node_modules/bytes": {
"version": "3.1.2",
@ -4215,10 +4314,11 @@
}
},
"node_modules/dbinfoz": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/dbinfoz/-/dbinfoz-0.11.0.tgz",
"integrity": "sha512-l7REBd9pwTBI6PWSk/dx+zCpSE2tiJdSKfApeoOajnSgyMJgkwGfhpPO2mV76MLQeKPaSm0mMKxmoqd38SaHmw==",
"version": "0.14.0",
"resolved": "https://registry.npmjs.org/dbinfoz/-/dbinfoz-0.14.0.tgz",
"integrity": "sha512-8NLjmj3gEyxbMu1ZwPEby77QvoEkk5NrHKSwX4oSKeaREherwuSx1y08cXmxBEjrSmvByUX9axoKscuilSXfmg==",
"dependencies": {
"mssql": "^11.0.1",
"mysql2": "^3.9.1",
"pg": "^8.11.3",
"sqlite3": "^5.1.7"
@ -4347,7 +4447,6 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
"integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==",
"dev": true,
"engines": {
"node": ">=8"
}
@ -4565,7 +4664,6 @@
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
"integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
"dev": true,
"dependencies": {
"safe-buffer": "^5.0.1"
}
@ -5095,6 +5193,14 @@
"es5-ext": "~0.10.14"
}
},
"node_modules/event-target-shim": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
"engines": {
"node": ">=6"
}
},
"node_modules/eventemitter3": {
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
@ -5104,7 +5210,6 @@
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
"dev": true,
"engines": {
"node": ">=0.8.x"
}
@ -6532,7 +6637,6 @@
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
"integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
"dev": true,
"bin": {
"is-docker": "cli.js"
},
@ -6658,7 +6762,6 @@
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
"integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
"dev": true,
"dependencies": {
"is-docker": "^2.0.0"
},
@ -6712,6 +6815,11 @@
"jiti": "bin/jiti.js"
}
},
"node_modules/js-md4": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz",
"integrity": "sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA=="
},
"node_modules/js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@ -6907,7 +7015,6 @@
"version": "9.0.2",
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
"integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==",
"dev": true,
"dependencies": {
"jws": "^3.2.2",
"lodash.includes": "^4.3.0",
@ -6929,7 +7036,6 @@
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
"integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
"dev": true,
"dependencies": {
"buffer-equal-constant-time": "1.0.1",
"ecdsa-sig-formatter": "1.0.11",
@ -6940,7 +7046,6 @@
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
"integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
"dev": true,
"dependencies": {
"jwa": "^1.4.1",
"safe-buffer": "^5.0.1"
@ -6975,7 +7080,6 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz",
"integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==",
"dev": true,
"dependencies": {
"buffer-equal-constant-time": "1.0.1",
"ecdsa-sig-formatter": "1.0.11",
@ -6986,7 +7090,6 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz",
"integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==",
"dev": true,
"dependencies": {
"jwa": "^2.0.0",
"safe-buffer": "^5.0.1"
@ -7100,38 +7203,32 @@
"node_modules/lodash.includes": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
"integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==",
"dev": true
"integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w=="
},
"node_modules/lodash.isboolean": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
"integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==",
"dev": true
"integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="
},
"node_modules/lodash.isinteger": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
"integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==",
"dev": true
"integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA=="
},
"node_modules/lodash.isnumber": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
"integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==",
"dev": true
"integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw=="
},
"node_modules/lodash.isplainobject": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
"integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==",
"dev": true
"integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="
},
"node_modules/lodash.isstring": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
"integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==",
"dev": true
"integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw=="
},
"node_modules/lodash.merge": {
"version": "4.6.2",
@ -7142,8 +7239,7 @@
"node_modules/lodash.once": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
"integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==",
"dev": true
"integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg=="
},
"node_modules/log-symbols": {
"version": "4.1.0",
@ -8247,6 +8343,33 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
},
"node_modules/mssql": {
"version": "11.0.1",
"resolved": "https://registry.npmjs.org/mssql/-/mssql-11.0.1.tgz",
"integrity": "sha512-KlGNsugoT90enKlR8/G36H0kTxPthDhmtNUCwEHvgRza5Cjpjoj+P2X6eMpFUDN7pFrJZsKadL4x990G8RBE1w==",
"dependencies": {
"@tediousjs/connection-string": "^0.5.0",
"commander": "^11.0.0",
"debug": "^4.3.3",
"rfdc": "^1.3.0",
"tarn": "^3.0.2",
"tedious": "^18.2.1"
},
"bin": {
"mssql": "bin/mssql"
},
"engines": {
"node": ">=18"
}
},
"node_modules/mssql/node_modules/commander": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz",
"integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==",
"engines": {
"node": ">=16"
}
},
"node_modules/mute-stream": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
@ -8323,6 +8446,11 @@
"resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz",
"integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="
},
"node_modules/native-duplexpair": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/native-duplexpair/-/native-duplexpair-1.0.0.tgz",
"integrity": "sha512-E7QQoM+3jvNtlmyfqRZ0/U75VFgCls+fSkbml2MpgWkWyz3ox8Y58gNhfuziuQYGNNQAbFZJQck55LHCnCK6CA=="
},
"node_modules/natural-compare": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
@ -8850,7 +8978,6 @@
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz",
"integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==",
"dev": true,
"dependencies": {
"define-lazy-prop": "^2.0.0",
"is-docker": "^2.1.1",
@ -9642,6 +9769,14 @@
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
"node_modules/process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
"engines": {
"node": ">= 0.6.0"
}
},
"node_modules/process-exists": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/process-exists/-/process-exists-4.1.0.tgz",
@ -10320,6 +10455,11 @@
"node": ">=0.10.0"
}
},
"node_modules/rfdc": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz",
"integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA=="
},
"node_modules/rimraf": {
"version": "5.0.10",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz",
@ -10986,7 +11126,6 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz",
"integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==",
"dev": true,
"engines": {
"node": ">=4",
"npm": ">=6"
@ -11424,6 +11563,14 @@
"node": ">=8"
}
},
"node_modules/tarn": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.2.tgz",
"integrity": "sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ==",
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/taskkill": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/taskkill/-/taskkill-4.0.0.tgz",
@ -11439,6 +11586,91 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/tedious": {
"version": "18.6.1",
"resolved": "https://registry.npmjs.org/tedious/-/tedious-18.6.1.tgz",
"integrity": "sha512-9AvErXXQTd6l7TDd5EmM+nxbOGyhnmdbp/8c3pw+tjaiSXW9usME90ET/CRG1LN1Y9tPMtz/p83z4Q97B4DDpw==",
"dependencies": {
"@azure/core-auth": "^1.7.2",
"@azure/identity": "^4.2.1",
"@azure/keyvault-keys": "^4.4.0",
"@js-joda/core": "^5.6.1",
"@types/node": ">=18",
"bl": "^6.0.11",
"iconv-lite": "^0.6.3",
"js-md4": "^0.3.2",
"native-duplexpair": "^1.0.0",
"sprintf-js": "^1.1.3"
},
"engines": {
"node": ">=18"
}
},
"node_modules/tedious/node_modules/@types/node": {
"version": "22.10.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.0.tgz",
"integrity": "sha512-XC70cRZVElFHfIUB40FgZOBbgJYFKKMa5nb9lxcwYstFG/Mi+/Y0bGS+rs6Dmhmkpq4pnNiLiuZAbc02YCOnmA==",
"dependencies": {
"undici-types": "~6.20.0"
}
},
"node_modules/tedious/node_modules/bl": {
"version": "6.0.16",
"resolved": "https://registry.npmjs.org/bl/-/bl-6.0.16.tgz",
"integrity": "sha512-V/kz+z2Mx5/6qDfRCilmrukUXcXuCoXKg3/3hDvzKKoSUx8CJKudfIoT29XZc3UE9xBvxs5qictiHdprwtteEg==",
"dependencies": {
"@types/readable-stream": "^4.0.0",
"buffer": "^6.0.3",
"inherits": "^2.0.4",
"readable-stream": "^4.2.0"
}
},
"node_modules/tedious/node_modules/buffer": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
"integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.2.1"
}
},
"node_modules/tedious/node_modules/readable-stream": {
"version": "4.5.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz",
"integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==",
"dependencies": {
"abort-controller": "^3.0.0",
"buffer": "^6.0.3",
"events": "^3.3.0",
"process": "^0.11.10",
"string_decoder": "^1.3.0"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
"node_modules/tedious/node_modules/string_decoder": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"dependencies": {
"safe-buffer": "~5.2.0"
}
},
"node_modules/text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
@ -11746,6 +11978,11 @@
"node": ">=18.17"
}
},
"node_modules/undici-types": {
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="
},
"node_modules/unified": {
"version": "10.1.2",
"resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz",

View file

@ -2,7 +2,7 @@
"name": "continue",
"icon": "media/icon.png",
"author": "Continue Dev, Inc",
"version": "0.9.235",
"version": "0.9.236",
"repository": {
"type": "git",
"url": "https://github.com/continuedev/continue"
@ -176,7 +176,7 @@
"group": "Continue"
},
{
"command": "continue.quickEdit",
"command": "continue.focusEdit",
"category": "Continue",
"title": "Generate Code",
"group": "Continue"
@ -651,7 +651,7 @@
"axios": "^1.2.5",
"core": "file:../../core",
"cors": "^2.8.5",
"dbinfoz": "^0.11.0",
"dbinfoz": "^0.14.0",
"downshift": "^7.6.0",
"esbuild": "^0.17.19",
"express": "^4.18.2",

View file

@ -36,7 +36,6 @@ import type {
RangeInFile,
Thread,
} from "core";
import { text } from "stream/consumers";
class VsCodeIde implements IDE {
ideUtils: VsCodeIdeUtils;
@ -312,7 +311,7 @@ class VsCodeIde implements IDE {
return Promise.resolve(vscode.env.machineId);
}
async getDiff(includeUnstaged: boolean): Promise<string> {
async getDiff(includeUnstaged: boolean): Promise<string[]> {
return await this.ideUtils.getDiff(includeUnstaged);
}

View file

@ -93,19 +93,44 @@ function addCodeToContextFromRange(
});
}
function getCurrentlyHighlightedCode(
function getRangeInFileWithContents(
allowEmpty?: boolean,
range?: vscode.Range,
): RangeInFileWithContents | null {
const editor = vscode.window.activeTextEditor;
if (editor) {
const selection = editor.selection;
const filepath = editor.document.uri.fsPath;
if (range) {
const contents = editor.document.getText(range);
return {
range: {
start: {
line: range.start.line,
character: range.start.character,
},
end: {
line: range.end.line,
character: range.end.character,
},
},
filepath,
contents,
};
}
if (selection.isEmpty && !allowEmpty) {
return null;
}
// adjust starting position to include indentation
const start = new vscode.Position(selection.start.line, 0);
const range = new vscode.Range(start, selection.end);
const contents = editor.document.getText(range);
const selectionRange = new vscode.Range(start, selection.end);
const contents = editor.document.getText(selectionRange);
return {
filepath: editor.document.uri.fsPath,
contents,
@ -121,13 +146,14 @@ function getCurrentlyHighlightedCode(
},
};
}
return null;
}
async function addHighlightedCodeToContext(
webviewProtocol: VsCodeWebviewProtocol | undefined,
) {
const rangeInFileWithContents = getCurrentlyHighlightedCode();
const rangeInFileWithContents = getRangeInFileWithContents();
if (rangeInFileWithContents) {
webviewProtocol?.request("highlightedCode", {
rangeInFileWithContents,
@ -375,7 +401,7 @@ const getCommandsMap: (
// Passthrough for telemetry purposes
"continue.defaultQuickAction": async (args: QuickEditShowParams) => {
captureCommandTelemetry("defaultQuickAction");
vscode.commands.executeCommand("continue.quickEdit", args);
vscode.commands.executeCommand("continue.focusEdit", args);
},
"continue.customQuickActionSendToChat": async (
prompt: string,
@ -467,7 +493,9 @@ const getCommandsMap: (
void addHighlightedCodeToContext(sidebar.webviewProtocol);
}
},
"continue.focusEdit": async () => {
// QuickEditShowParams are passed from CodeLens, temp fix
// until we update to new params specific to Edit
"continue.focusEdit": async (args?: QuickEditShowParams) => {
captureCommandTelemetry("focusEdit");
focusGUI();
@ -489,12 +517,13 @@ const getCommandsMap: (
return;
}
editDecorationManager.setDecoration(
editor,
new vscode.Range(editor.selection.start, editor.selection.end),
);
const range =
args?.range ??
new vscode.Range(editor.selection.start, editor.selection.end);
const rangeInFileWithContents = getCurrentlyHighlightedCode(true);
editDecorationManager.setDecoration(editor, range);
const rangeInFileWithContents = getRangeInFileWithContents(true, range);
if (rangeInFileWithContents) {
sidebar.webviewProtocol?.request(
@ -508,10 +537,6 @@ const getCommandsMap: (
editor.selection.anchor,
);
}
setTimeout(() => {
sidebar.webviewProtocol?.request("focusContinueInput", undefined);
}, 30);
},
"continue.focusEditWithoutClear": async () => {
captureCommandTelemetry("focusEditWithoutClear");
@ -537,7 +562,7 @@ const getCommandsMap: (
return;
}
const rangeInFileWithContents = getCurrentlyHighlightedCode(false);
const rangeInFileWithContents = getRangeInFileWithContents(false);
if (rangeInFileWithContents) {
sidebar.webviewProtocol?.request(
@ -553,25 +578,21 @@ const getCommandsMap: (
contents,
});
}
setTimeout(() => {
sidebar.webviewProtocol?.request("focusContinueInput", undefined);
}, 30);
},
"continue.exitEditMode": async () => {
captureCommandTelemetry("exitEditMode");
await sidebar.webviewProtocol?.request("exitEditMode", undefined);
},
"continue.quickEdit": async (args: QuickEditShowParams) => {
let linesOfCode = undefined;
if (args.range) {
linesOfCode = args.range.end.line - args.range.start.line;
}
captureCommandTelemetry("quickEdit", {
linesOfCode,
});
quickEdit.show(args);
},
// "continue.quickEdit": async (args: QuickEditShowParams) => {
// let linesOfCode = undefined;
// if (args.range) {
// linesOfCode = args.range.end.line - args.range.start.line;
// }
// captureCommandTelemetry("quickEdit", {
// linesOfCode,
// });
// quickEdit.show(args);
// },
"continue.writeCommentsForCode": async () => {
captureCommandTelemetry("writeCommentsForCode");

View file

@ -5,14 +5,10 @@ class EditDecorationManager {
constructor(context: vscode.ExtensionContext) {
this.decorationType = vscode.window.createTextEditorDecorationType({
backgroundColor: "rgba(255, 255, 0, 0.1)",
borderWidth: "0 0 0 1px",
borderColor: "rgba(255, 255, 0)",
borderStyle: "solid",
backgroundColor: new vscode.ThemeColor(
"editor.inactiveSelectionBackground",
),
isWholeLine: true,
cursor: "pointer",
// gutterIconPath: context.asAbsolutePath("media/gutterIcon.png"),
gutterIconSize: "contain",
});
}

View file

@ -77,7 +77,7 @@ describe("IDE Utils", () => {
test("noDiff", async () => {
const noDiff = await utils.getDiff(false);
assert(noDiff === "");
assert(noDiff.length === 0);
});
test.skip("getBranch", async () => {

View file

@ -570,8 +570,20 @@ export class VsCodeIdeUtils {
return repo?.state?.HEAD?.name || "NONE";
}
async getDiff(includeUnstaged: boolean): Promise<string> {
let diffs: string[] = [];
private splitDiff(diffString: string): string[] {
const fileDiffHeaderRegex = /(?=diff --git a\/.* b\/.*)/;
const diffs = diffString.split(fileDiffHeaderRegex);
if (diffs[0].trim() === "") {
diffs.shift();
}
return diffs;
}
async getDiff(includeUnstaged: boolean): Promise<string[]> {
const diffs: string[] = [];
for (const dir of this.getWorkspaceDirectories()) {
const repo = await this.getRepo(vscode.Uri.file(dir));
@ -587,9 +599,7 @@ export class VsCodeIdeUtils {
}
}
const fullDiff = diffs.join("\n\n");
return fullDiff;
return diffs.flatMap((diff) => this.splitDiff(diff));
}
getHighlightedCode(): RangeInFile[] {

View file

@ -382,7 +382,6 @@ const MentionList = forwardRef((props: MentionListProps, ref) => {
) : (
<>
{subMenuTitle && <ItemDiv className="mb-2">{subMenuTitle}</ItemDiv>}
{/* <CustomScrollbarDiv className="overflow-y-scroll max-h-96"> */}
{allItems.length ? (
allItems.map((item, index) => (
<ItemDiv
@ -402,7 +401,7 @@ const MentionList = forwardRef((props: MentionListProps, ref) => {
height="20px"
width="20px"
filename={item.description}
></FileIcon>
/>
)}
{!showFileIconForItem(item) && (
<>
@ -414,7 +413,7 @@ const MentionList = forwardRef((props: MentionListProps, ref) => {
</div>
<span
style={{
color: vscListActiveForeground,
color: lightGray,
float: "right",
textAlign: "right",
opacity: index !== selectedIndex ? 0 : 1,

View file

@ -40,16 +40,22 @@ import { IdeMessengerContext } from "../../context/IdeMessenger";
import { SubmenuContextProvidersContext } from "../../context/SubmenuContextProviders";
import useHistory from "../../hooks/useHistory";
import { useInputHistory } from "../../hooks/useInputHistory";
import useIsOSREnabled from "../../hooks/useIsOSREnabled";
import useUpdatingRef from "../../hooks/useUpdatingRef";
import { useWebviewListener } from "../../hooks/useWebviewListener";
import { selectUseActiveFile } from "../../redux/selectors";
import { defaultModelSelector } from "../../redux/selectors/modelSelectors";
import {
addCodeToEdit,
clearCodeToEdit,
} from "../../redux/slices/editModeState";
import { RootState } from "../../redux/store";
import {
getFontSize,
isJetBrains,
isMetaEquivalentKeyPressed,
} from "../../util";
import { AddCodeToEdit } from "./AddCodeToEditExtension";
import { CodeBlockExtension } from "./CodeBlockExtension";
import { SlashCommand } from "./CommandsExtension";
import InputToolbar, { ToolbarOptions } from "./InputToolbar";
@ -64,10 +70,6 @@ import {
handleVSCMetaKeyIssues,
} from "./handleMetaKeyIssues";
import { ComboBoxItem } from "./types";
import useIsOSREnabled from "../../hooks/useIsOSREnabled";
import { setShouldAddFileForEditing } from "../../redux/slices/uiStateSlice";
import { AddCodeToEdit } from "./AddCodeToEditExtension";
import { addCodeToEdit } from "../../redux/slices/editModeState";
const InputBoxDiv = styled.div<{ border?: string }>`
resize: none;
@ -313,16 +315,6 @@ function TipTapEditor(props: TipTapEditorProps) {
const { prevRef, nextRef, addRef } = useInputHistory(props.historyKey);
function getPlaceholder() {
if (!hasDefaultModel) {
return "Configure a Chat model to get started";
}
return historyLengthRef.current === 0
? "Ask anything, '/' for slash commands, '@' to add context"
: "Ask a follow-up";
}
const editor: Editor = useEditor({
extensions: [
Document,
@ -366,7 +358,7 @@ function TipTapEditor(props: TipTapEditorProps) {
placeholder:
props.placeholder ??
(historyLengthRef.current === 0
? "Ask anything, '/' for slash commands, '@' to add context"
? "Ask anything, '@' to add context"
: "Ask a follow-up"),
}),
Paragraph.extend({
@ -459,25 +451,23 @@ function TipTapEditor(props: TipTapEditorProps) {
},
}),
Text,
props.availableContextProviders.length
? Mention.configure({
HTMLAttributes: {
class: "mention",
},
suggestion: getContextProviderDropdownOptions(
availableContextProvidersRef,
getSubmenuContextItemsRef,
enterSubmenu,
onClose,
onOpen,
inSubmenuRef,
ideMessenger,
),
renderHTML: (props) => {
return `@${props.node.attrs.label || props.node.attrs.id}`;
},
})
: undefined,
Mention.configure({
HTMLAttributes: {
class: "mention",
},
suggestion: getContextProviderDropdownOptions(
availableContextProvidersRef,
getSubmenuContextItemsRef,
enterSubmenu,
onClose,
onOpen,
inSubmenuRef,
ideMessenger,
),
renderHTML: (props) => {
return `@${props.node.attrs.label || props.node.attrs.id}`;
},
}),
isInEditMode
? AddCodeToEdit.configure({
HTMLAttributes: {
@ -598,7 +588,7 @@ function TipTapEditor(props: TipTapEditorProps) {
if (isOSREnabled) {
handleJetBrainsOSRMetaKeyIssues(e, editor);
} else if (!isJetBrains()){
} else if (!isJetBrains()) {
await handleVSCMetaKeyIssues(e, editor);
}
};
@ -657,6 +647,8 @@ function TipTapEditor(props: TipTapEditorProps) {
useWebviewListener(
"focusContinueInput",
async (data) => {
dispatch(clearCodeToEdit());
if (!props.isMainInput) {
return;
}
@ -822,13 +814,6 @@ function TipTapEditor(props: TipTapEditorProps) {
const [activeKey, setActiveKey] = useState<string | null>(null);
useEffect(() => {
if (shouldAddFileForEditing && props.isMainInput) {
insertCharacterWithWhitespace("#");
dispatch(setShouldAddFileForEditing(false));
}
}, [shouldAddFileForEditing]);
const insertCharacterWithWhitespace = useCallback(
(char: string) => {
const text = editor.getText();

View file

@ -17,7 +17,7 @@ export default function GeneratingCodeLoader({
return (
<span className="inline-flex items-center gap-2 text-gray-400">
{showLineCount ? linesGeneratedText : "Generating..."}
{showLineCount ? linesGeneratedText : "Generating"}
<Spinner />
</span>
);

View file

@ -1,11 +1,15 @@
import { ContextSubmenuItem } from "core";
import { createContext } from "react";
export interface ContextSubmenuItemWithProvider extends ContextSubmenuItem {
providerTitle: string;
}
export const SubmenuContextProvidersContext = createContext<{
getSubmenuContextItems: (
providerTitle: string | undefined,
query: string,
) => (ContextSubmenuItem & { providerTitle: string })[];
) => ContextSubmenuItemWithProvider[];
addItem: (providerTitle: string, item: ContextSubmenuItem) => void;
}>({
getSubmenuContextItems: () => [],

View file

@ -257,11 +257,12 @@ function useChatHandler(dispatch: Dispatch, ideMessenger: IIdeMessenger) {
ideMessenger,
dispatch,
);
if (promptPreamble) {
typeof content === "string"
? (content += promptPreamble)
: (content.at(-1).text += promptPreamble);
if (typeof content === "string") {
content = promptPreamble + content;
} else {
content[0].text = promptPreamble + content[0].text;
}
}
const message: ChatMessage = {

View file

@ -1,27 +1,29 @@
import { useContext, useState, useRef, useEffect } from "react";
import { useContext, useRef } from "react";
import { IdeMessengerContext } from "../../context/IdeMessenger";
import { setShouldAddFileForEditing } from "../../redux/slices/uiStateSlice";
import { useDispatch } from "react-redux";
import { ChevronDownIcon, PlusIcon } from "@heroicons/react/24/outline";
import { addCodeToEdit } from "../../redux/slices/editModeState";
import { Listbox } from "@headlessui/react";
export default function AddFileButton() {
export interface AddFileButtonProps {
onClick: () => void;
}
export default function AddFileButton({ onClick }: AddFileButtonProps) {
const buttonRef = useRef<HTMLButtonElement>(null);
const ideMessenger = useContext(IdeMessengerContext);
const dispatch = useDispatch();
function onClickAddFileToCodeToEdit() {
dispatch(setShouldAddFileForEditing(true));
}
async function handleAddAllOpenFiles() {
const openFiles = await ideMessenger.ide.getOpenFiles();
const filesData = await Promise.all(
openFiles.map(async (filepath) => {
const contents = await ideMessenger.ide.readFile(filepath);
return { filepath, contents };
}),
);
for (const filepath of openFiles) {
const contents = await ideMessenger.ide.readFile(filepath);
dispatch(addCodeToEdit({ filepath, contents }));
}
dispatch(addCodeToEdit(filesData));
}
return (
@ -29,14 +31,14 @@ export default function AddFileButton() {
<div className="relative">
<Listbox.Button
ref={buttonRef}
className="bg-vsc-editor-background border-lightgray/50 flex cursor-pointer items-center justify-between rounded-md border border-solid px-0 shadow-sm transition-colors"
className="bg-vsc-editor-background border-lightgray/50 flex h-5 cursor-pointer items-center justify-between rounded-md border border-solid px-0 shadow-sm transition-colors"
>
<div
className="flex items-center gap-1 px-1.5 hover:brightness-125"
className="flex h-5 w-14 items-center justify-center gap-1 hover:brightness-125"
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClickAddFileToCodeToEdit();
onClick();
}}
>
<PlusIcon className="text-vsc-foreground inline h-2.5 w-2.5 brightness-75" />

View file

@ -0,0 +1,130 @@
import { useState, useContext, useEffect, useRef } from "react";
import {
ContextSubmenuItemWithProvider,
SubmenuContextProvidersContext,
} from "../../context/SubmenuContextProviders";
import { Combobox } from "@headlessui/react";
import FileIcon from "../../components/FileIcon";
import { useSelector } from "react-redux";
import { RootState } from "../../redux/store";
export interface AddFileComboboxProps {
onSelect: (filepaths: string[]) => void;
onEscape: () => void;
}
export default function AddFileCombobox({
onSelect,
onEscape,
}: AddFileComboboxProps) {
const [query, setQuery] = useState("");
const [selectedFiles, setSelectedFiles] = useState<
ContextSubmenuItemWithProvider[]
>([]);
const inputRef = useRef<HTMLInputElement>(null);
const buttonRef = useRef<HTMLButtonElement>(null);
const { getSubmenuContextItems } = useContext(SubmenuContextProvidersContext);
const allFiles = getSubmenuContextItems("file", "");
const codeToEdit = useSelector(
(state: RootState) => state.editModeState.codeToEdit,
);
const remainingFiles = allFiles.filter(
(file) => !codeToEdit.find((code) => code.filepath === file.id),
);
useEffect(() => {
if (inputRef.current) {
inputRef.current.focus();
}
}, []);
const filteredFiles =
query === ""
? remainingFiles
: remainingFiles.filter((file) =>
file.title.toLowerCase().includes(query.toLowerCase()),
);
return (
<div className="pb-2 pl-3.5 pr-2">
<Combobox
multiple
value={selectedFiles}
onChange={(files) => {
setSelectedFiles(files);
onSelect(files.map((file) => file.id));
buttonRef.current?.click();
}}
>
{({ open }) => (
<div className="relative">
<Combobox.Button className="hidden" ref={buttonRef} />
<Combobox.Input
ref={inputRef}
onClick={() => {
if (!open) {
buttonRef.current?.click();
}
}}
onFocus={() => {
buttonRef.current?.click();
}}
className="bg-vsc-background border-lightgray text-vsc-foreground box-border w-full rounded border border-solid py-0.5 pl-2 focus:outline-none"
onChange={(event) => setQuery(event.target.value)}
placeholder="Type to search files..."
onKeyDown={(e) => {
if (e.key === "Escape" && !open) {
onEscape();
}
}}
/>
<Combobox.Options className="no-scrollbar bg-vsc-editor-background border-lightgray/50 absolute left-0 right-0 z-50 mt-1 max-h-60 overflow-y-auto overflow-x-hidden rounded-md border border-solid px-1 py-0 pl-0 pr-5 shadow-lg focus:outline-none">
{filteredFiles.length > 0 ? (
filteredFiles.map((file) => (
<Combobox.Option
key={file.id}
value={file}
className={({ active }) =>
`relative flex w-full cursor-pointer px-2 py-1 text-left text-xs ${
active
? "bg-vsc-list-active-background text-vsc-list-active-foreground"
: ""
}`
}
>
{({ active, selected }) => (
<div className="group flex w-full min-w-0 items-center gap-1">
<div className="flex min-w-0 flex-1 items-center gap-1">
<FileIcon
height="20px"
width="20px"
filename={file.title}
/>
<span className="truncate">{file.title}</span>
</div>
<span
className={`text-lightgray max-w-[30%] truncate ${
active || selected ? "visible" : "invisible"
} group-hover:visible`}
>
{file.description}
</span>
</div>
)}
</Combobox.Option>
))
) : (
<div className="text-vsc-list-active-foreground0 px-2 py-1 text-xs">
No results
</div>
)}
</Combobox.Options>
</div>
)}
</Combobox>
</div>
);
}

View file

@ -1,16 +1,21 @@
import { useContext } from "react";
import { useContext, useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import { IdeMessengerContext } from "../../context/IdeMessenger";
import { removeCodeToEdit } from "../../redux/slices/editModeState";
import {
removeCodeToEdit,
addCodeToEdit,
} from "../../redux/slices/editModeState";
import { RootState } from "../../redux/store";
import CodeToEditListItem from "./CodeToEditListItem";
import { CodeToEdit, RangeInFileWithContents } from "core";
import AddFileButton from "./AddFileButton";
import AddFileCombobox from "./AddFileCombobox";
import { XMarkIcon } from "@heroicons/react/24/outline";
export default function WorkingSet() {
const dispatch = useDispatch();
const ideMessenger = useContext(IdeMessengerContext);
const [showAddFileCombobox, setShowAddFileCombobox] = useState(false);
const codeToEdit = useSelector(
(state: RootState) => state.editModeState.codeToEdit,
);
@ -38,29 +43,55 @@ export default function WorkingSet() {
}
}
const codeToEditItems = [...codeToEdit]
.reverse()
.map((code, i) => (
<CodeToEditListItem
key={code.filepath + i}
code={code}
onDelete={onDelete}
onClickFilename={onClickFilename}
/>
));
async function onSelectFilesToAdd(filepaths: string[]) {
const filePromises = filepaths.map(async (filepath) => {
const contents = await ideMessenger.ide.readFile(filepath);
return { contents, filepath };
});
const fileResults = await Promise.all(filePromises);
for (const file of fileResults) {
dispatch(addCodeToEdit(file));
}
}
return (
<div className="bg-vsc-editor-background border-vsc-input-border mx-1 flex flex-col rounded-t-lg border border-b-0 border-solid p-1">
<div className="bg-vsc-editor-background border-vsc-input-border mx-1 flex flex-col rounded-t-lg border border-b-0 border-solid px-1">
<div className="text-lightgray flex items-center justify-between gap-1.5 py-1.5 pl-3 pr-2 text-xs">
<span>{title}</span>
<AddFileButton />
<AddFileButton onClick={() => setShowAddFileCombobox(true)} />
</div>
{codeToEdit.length > 0 && (
<ul className="no-scrollbar mb-1.5 mt-1 max-h-[50vh] list-outside list-none overflow-y-auto pl-0">
{codeToEditItems}
<ul className="no-scrollbar my-0 mb-1.5 max-h-[50vh] list-outside list-none overflow-y-auto pl-0">
{codeToEdit.map((code, i) => (
<CodeToEditListItem
key={code.filepath + i}
code={code}
onDelete={onDelete}
onClickFilename={onClickFilename}
/>
))}
</ul>
)}
{showAddFileCombobox && (
<div className="mr-2 flex items-center py-1">
<div className="flex-grow">
<AddFileCombobox
onSelect={onSelectFilesToAdd}
onEscape={() => setShowAddFileCombobox(false)}
/>
</div>
<XMarkIcon
onClick={(e) => {
setShowAddFileCombobox(false);
}}
className="text-lightgray hover:bg-lightgray hover:text-vsc-foreground mb-2 h-3.5 w-3.5 cursor-pointer rounded-md rounded-sm p-0.5 hover:bg-opacity-20"
/>
</div>
)}
</div>
);
}

View file

@ -60,7 +60,7 @@ export default function CodeToEditListItem({
onClick={() => setShowCodeSnippet((showCodeSnippet) => !showCodeSnippet)}
>
<div
className={`hover:bg-lightgray hover:text-vsc-foreground flex justify-between rounded px-2 py-1 transition-colors hover:bg-opacity-20 ${showCodeSnippet && "text-vsc-foreground bg-lightgray bg-opacity-20"}`}
className={`hover:bg-lightgray hover:text-vsc-foreground flex justify-between rounded px-2 py-0.5 transition-colors hover:bg-opacity-20 ${showCodeSnippet && "text-vsc-foreground bg-lightgray bg-opacity-20"}`}
>
<div className="flex items-center gap-0.5">
{showCodeSnippet ? (

View file

@ -24,13 +24,21 @@ export const editModeStateSlice = createSlice({
name: "editModeState",
initialState,
reducers: {
addCodeToEdit: (state, { payload }: PayloadAction<CodeToEdit>) => {
const entryExists = state.codeToEdit.some((entry) =>
isCodeToEditEqual(entry, payload),
addCodeToEdit: (
state,
{ payload }: PayloadAction<CodeToEdit | CodeToEdit[]>,
) => {
const entries = Array.isArray(payload) ? payload : [payload];
const newEntries = entries.filter(
(entry) =>
!state.codeToEdit.some((existingEntry) =>
isCodeToEditEqual(existingEntry, entry),
),
);
if (!entryExists) {
state.codeToEdit.push(payload);
if (newEntries.length > 0) {
state.codeToEdit.push(...newEntries);
}
},
focusEdit: (state) => {

View file

@ -43,12 +43,6 @@ export const uiStateSlice = createSlice({
setShowDialog: (state, action: PayloadAction<UiState["showDialog"]>) => {
state.showDialog = action.payload;
},
setShouldAddFileForEditing: (
state,
action: PayloadAction<UiState["shouldAddFileForEditing"]>,
) => {
state.shouldAddFileForEditing = action.payload;
},
},
});
@ -57,7 +51,6 @@ export const {
setDialogMessage,
setDialogEntryOn,
setShowDialog,
setShouldAddFileForEditing,
} = uiStateSlice.actions;
export default uiStateSlice.reducer;

View file

@ -2,11 +2,7 @@
"devDependencies": {
"@typescript-eslint/parser": "^7.8.0",
"eslint-plugin-import": "^2.29.1",
"husky": "^9.1.7",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.8"
},
"scripts": {
"prepare": "husky"
}
}