merge main
This commit is contained in:
commit
886c0a4741
62 changed files with 4911 additions and 2671 deletions
2
.github/workflows/cla.yaml
vendored
2
.github/workflows/cla.yaml
vendored
|
|
@ -27,5 +27,5 @@ jobs:
|
|||
path-to-document: "https://github.com/continuedev/continue/blob/main/CLA.md"
|
||||
branch: cla-signatures
|
||||
# Bots and CLAs signed outside of GitHub
|
||||
allowlist: dependabot[bot],fbricon,panyamkeerthana,Jazzcort,owtaylor,halfline,agent@continue.dev,action@github.com,snyk-bot,noreply@continue.dev
|
||||
allowlist: dependabot[bot],fbricon,panyamkeerthana,Jazzcort,owtaylor,halfline,agent@continue.dev,action@github.com,continue[bot],snyk-bot,noreply@continue.dev
|
||||
signed-commit-message: "CLA signed in $pullRequestNo"
|
||||
|
|
|
|||
14
binary/package-lock.json
generated
14
binary/package-lock.json
generated
|
|
@ -22,7 +22,7 @@
|
|||
"tar": "^7.5.1",
|
||||
"undici": "^7.16.0",
|
||||
"uuid": "^9.0.1",
|
||||
"vectordb": "^0.4.20",
|
||||
"vectordb": "0.4.20",
|
||||
"win-ca": "^3.5.1"
|
||||
},
|
||||
"bin": {
|
||||
|
|
@ -117,7 +117,7 @@
|
|||
"tree-sitter-wasms": "^0.1.11",
|
||||
"untildify": "^6.0.0",
|
||||
"uuid": "^9.0.1",
|
||||
"vectordb": "^0.4.20",
|
||||
"vectordb": "0.4.20",
|
||||
"web-tree-sitter": "^0.21.0",
|
||||
"win-ca": "^3.5.1",
|
||||
"wink-nlp-utils": "^2.1.0",
|
||||
|
|
@ -42082,15 +42082,15 @@
|
|||
},
|
||||
"../packages/openai-adapters": {
|
||||
"name": "@continuedev/openai-adapters",
|
||||
"version": "1.15.0",
|
||||
"version": "1.32.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "^0.67.0",
|
||||
"@aws-sdk/client-bedrock-runtime": "^3.842.0",
|
||||
"@aws-sdk/credential-providers": "^3.913.0",
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"@continuedev/config-yaml": "^1.33.0",
|
||||
"@continuedev/fetch": "^1.5.0",
|
||||
"@continuedev/config-yaml": "^1.36.0",
|
||||
"@continuedev/fetch": "^1.6.0",
|
||||
"dotenv": "^16.5.0",
|
||||
"google-auth-library": "^10.4.1",
|
||||
"json-schema": "^0.4.0",
|
||||
|
|
@ -42104,14 +42104,14 @@
|
|||
"@semantic-release/commit-analyzer": "^13.0.1",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"@semantic-release/github": "^11.0.3",
|
||||
"@semantic-release/npm": "^13.1.2",
|
||||
"@semantic-release/npm": "^12.0.2",
|
||||
"@semantic-release/release-notes-generator": "^14.0.3",
|
||||
"@types/follow-redirects": "^1.14.4",
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/json-schema": "^7.0.15",
|
||||
"@types/node": "^24.3.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"semantic-release": "^25.0.2",
|
||||
"semantic-release": "^24.2.7",
|
||||
"ts-jest": "^29.2.3",
|
||||
"ts-node": "^10.9.2",
|
||||
"vitest": "^3.2.4"
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
"tar": "^7.5.1",
|
||||
"undici": "^7.16.0",
|
||||
"uuid": "^9.0.1",
|
||||
"vectordb": "^0.4.20",
|
||||
"vectordb": "0.4.20",
|
||||
"win-ca": "^3.5.1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ export class ConfigHandler {
|
|||
return `${workspaceId}:::${orgId}`;
|
||||
}
|
||||
|
||||
private async cascadeInit(reason: string) {
|
||||
private async cascadeInit(reason: string, isLogin?: boolean) {
|
||||
const signal = this.cascadeAbortController.signal;
|
||||
this.workspaceDirs = null; // forces workspace dirs reload
|
||||
|
||||
|
|
@ -118,7 +118,12 @@ export class ConfigHandler {
|
|||
const workspaceId = await this.getWorkspaceId();
|
||||
const selectedOrgs =
|
||||
this.globalContext.get("lastSelectedOrgIdForWorkspace") ?? {};
|
||||
const currentSelection = selectedOrgs[workspaceId];
|
||||
let currentSelection = selectedOrgs[workspaceId];
|
||||
|
||||
// reset personal org to first available non-personal org on login
|
||||
if (isLogin && currentSelection === "personal") {
|
||||
currentSelection = null;
|
||||
}
|
||||
|
||||
const firstNonPersonal = orgs.find(
|
||||
(org) => org.id !== this.PERSONAL_ORG_DESC.id,
|
||||
|
|
@ -402,6 +407,7 @@ export class ConfigHandler {
|
|||
const newSession = sessionInfo;
|
||||
|
||||
let reload = false;
|
||||
let isLogin = false;
|
||||
if (newSession) {
|
||||
if (currentSession) {
|
||||
if (
|
||||
|
|
@ -416,6 +422,7 @@ export class ConfigHandler {
|
|||
} else {
|
||||
// log in
|
||||
reload = true;
|
||||
isLogin = true;
|
||||
}
|
||||
} else {
|
||||
if (currentSession) {
|
||||
|
|
@ -430,7 +437,7 @@ export class ConfigHandler {
|
|||
this.ide,
|
||||
);
|
||||
this.abortCascade();
|
||||
await this.cascadeInit("Control plane session info update");
|
||||
await this.cascadeInit("Control plane session info update", isLogin);
|
||||
}
|
||||
return reload;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,6 +205,7 @@ class CometAPI extends OpenAI {
|
|||
"claude-3-5-haiku-latest",
|
||||
|
||||
// Gemini series
|
||||
"gemini-3-pro-preview",
|
||||
"gemini-2.5-pro",
|
||||
"gemini-2.5-flash",
|
||||
"gemini-2.5-flash-lite",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// core/llm/toolSupport.test.ts
|
||||
import { PROVIDER_TOOL_SUPPORT } from "./toolSupport";
|
||||
import { PROVIDER_TOOL_SUPPORT, isRecommendedAgentModel } from "./toolSupport";
|
||||
|
||||
describe("PROVIDER_TOOL_SUPPORT", () => {
|
||||
describe("continue-proxy", () => {
|
||||
|
|
@ -354,3 +354,140 @@ describe("PROVIDER_TOOL_SUPPORT", () => {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("isRecommendedAgentModel", () => {
|
||||
describe("OpenAI models", () => {
|
||||
it("should return true for o1, o3, o4 models", () => {
|
||||
expect(isRecommendedAgentModel("o1")).toBe(true);
|
||||
expect(isRecommendedAgentModel("o1-preview")).toBe(true);
|
||||
expect(isRecommendedAgentModel("o3")).toBe(true);
|
||||
expect(isRecommendedAgentModel("o3-mini")).toBe(true);
|
||||
expect(isRecommendedAgentModel("o4")).toBe(true);
|
||||
});
|
||||
|
||||
it("should return true for GPT-5 models", () => {
|
||||
expect(isRecommendedAgentModel("gpt-5")).toBe(true);
|
||||
expect(isRecommendedAgentModel("gpt-5-turbo")).toBe(true);
|
||||
});
|
||||
|
||||
it("should return false for GPT-4 models", () => {
|
||||
expect(isRecommendedAgentModel("gpt-4")).toBe(false);
|
||||
expect(isRecommendedAgentModel("gpt-4-turbo")).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("DeepSeek models", () => {
|
||||
it("should return true for DeepSeek R1/Reasoner models", () => {
|
||||
expect(isRecommendedAgentModel("deepseek-r1")).toBe(true);
|
||||
expect(isRecommendedAgentModel("deepseek-r1-0528")).toBe(true);
|
||||
expect(isRecommendedAgentModel("deepseek-reasoner")).toBe(true);
|
||||
});
|
||||
|
||||
it("should return false for non-reasoner DeepSeek models", () => {
|
||||
expect(isRecommendedAgentModel("deepseek-chat")).toBe(false);
|
||||
expect(isRecommendedAgentModel("deepseek-coder")).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Gemini models", () => {
|
||||
it("should return true for Gemini 2.5 Pro models", () => {
|
||||
expect(isRecommendedAgentModel("gemini-2.5-pro")).toBe(true);
|
||||
expect(isRecommendedAgentModel("gemini-2.5-pro-preview")).toBe(true);
|
||||
});
|
||||
|
||||
it("should return true for Gemini 3 Pro models", () => {
|
||||
expect(isRecommendedAgentModel("gemini-3-pro-preview")).toBe(true);
|
||||
expect(isRecommendedAgentModel("gemini-3-pro")).toBe(true);
|
||||
});
|
||||
|
||||
it("should return false for Gemini Flash models", () => {
|
||||
expect(isRecommendedAgentModel("gemini-2.5-flash")).toBe(false);
|
||||
expect(isRecommendedAgentModel("gemini-3-flash")).toBe(false);
|
||||
});
|
||||
|
||||
it("should return false for Gemini models without pro designation", () => {
|
||||
expect(isRecommendedAgentModel("gemini-2.5")).toBe(false);
|
||||
expect(isRecommendedAgentModel("gemini-3")).toBe(false);
|
||||
});
|
||||
|
||||
it("should return false for older Gemini versions", () => {
|
||||
expect(isRecommendedAgentModel("gemini-1.5-pro")).toBe(false);
|
||||
expect(isRecommendedAgentModel("gemini-2.0-pro")).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Claude models", () => {
|
||||
it("should return true for Claude Sonnet 3.7 and later models", () => {
|
||||
expect(isRecommendedAgentModel("claude-3-7-sonnet")).toBe(true);
|
||||
expect(isRecommendedAgentModel("claude-3.7-sonnet")).toBe(true);
|
||||
expect(isRecommendedAgentModel("claude-sonnet-4")).toBe(true);
|
||||
expect(isRecommendedAgentModel("claude-4-sonnet")).toBe(true);
|
||||
});
|
||||
|
||||
it("should return true for Claude Opus 4 models", () => {
|
||||
expect(isRecommendedAgentModel("claude-opus-4")).toBe(true);
|
||||
});
|
||||
|
||||
it("should return true for Claude 4-5 models", () => {
|
||||
expect(isRecommendedAgentModel("claude-4-5")).toBe(true);
|
||||
});
|
||||
|
||||
it("should return false for Claude 3.5 Sonnet models", () => {
|
||||
expect(isRecommendedAgentModel("claude-3-5-sonnet")).toBe(false);
|
||||
expect(isRecommendedAgentModel("claude-3.5-sonnet")).toBe(false);
|
||||
});
|
||||
|
||||
it("should return false for Claude Haiku models", () => {
|
||||
expect(isRecommendedAgentModel("claude-3-7-haiku")).toBe(false);
|
||||
expect(isRecommendedAgentModel("claude-3.7-haiku")).toBe(false);
|
||||
});
|
||||
|
||||
it("should return false for older Claude models", () => {
|
||||
expect(isRecommendedAgentModel("claude-3-opus")).toBe(false);
|
||||
expect(isRecommendedAgentModel("claude-2")).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("xAI models", () => {
|
||||
it("should return true for Grok Code models", () => {
|
||||
expect(isRecommendedAgentModel("grok-code")).toBe(true);
|
||||
expect(isRecommendedAgentModel("grok-code-beta")).toBe(true);
|
||||
});
|
||||
|
||||
it("should return false for non-code Grok models", () => {
|
||||
expect(isRecommendedAgentModel("grok-3")).toBe(false);
|
||||
expect(isRecommendedAgentModel("grok-4")).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("case insensitivity", () => {
|
||||
it("should handle uppercase model names", () => {
|
||||
expect(isRecommendedAgentModel("GEMINI-3-PRO-PREVIEW")).toBe(true);
|
||||
expect(isRecommendedAgentModel("CLAUDE-4-SONNET")).toBe(true);
|
||||
expect(isRecommendedAgentModel("DEEPSEEK-R1")).toBe(true);
|
||||
expect(isRecommendedAgentModel("O3-MINI")).toBe(true);
|
||||
});
|
||||
|
||||
it("should handle mixed case model names", () => {
|
||||
expect(isRecommendedAgentModel("Gemini-3-Pro")).toBe(true);
|
||||
expect(isRecommendedAgentModel("Claude-Opus-4")).toBe(true);
|
||||
expect(isRecommendedAgentModel("DeepSeek-Reasoner")).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("edge cases", () => {
|
||||
it("should return false for empty string", () => {
|
||||
expect(isRecommendedAgentModel("")).toBe(false);
|
||||
});
|
||||
|
||||
it("should return false for random strings", () => {
|
||||
expect(isRecommendedAgentModel("random-model")).toBe(false);
|
||||
expect(isRecommendedAgentModel("test")).toBe(false);
|
||||
});
|
||||
|
||||
it("should return false for partial matches", () => {
|
||||
expect(isRecommendedAgentModel("gemini-pro")).toBe(false);
|
||||
expect(isRecommendedAgentModel("claude-sonnet")).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -366,7 +366,7 @@ export function isRecommendedAgentModel(modelName: string): boolean {
|
|||
const recs: RegExp[][] = [
|
||||
[/o[134]/],
|
||||
[/deepseek/, /r1|reasoner/],
|
||||
[/gemini/, /2\.5/, /pro/],
|
||||
[/gemini/, /2\.5|3/, /pro/],
|
||||
[/gpt/, /-5|5\.1/],
|
||||
[/claude/, /sonnet/, /3\.7|3-7|-4/],
|
||||
[/claude/, /opus/, /-4/],
|
||||
|
|
|
|||
163
core/package-lock.json
generated
163
core/package-lock.json
generated
|
|
@ -78,7 +78,7 @@
|
|||
"tree-sitter-wasms": "^0.1.11",
|
||||
"untildify": "^6.0.0",
|
||||
"uuid": "^9.0.1",
|
||||
"vectordb": "^0.4.20",
|
||||
"vectordb": "0.4.20",
|
||||
"web-tree-sitter": "^0.21.0",
|
||||
"win-ca": "^3.5.1",
|
||||
"wink-nlp-utils": "^2.1.0",
|
||||
|
|
@ -217,15 +217,15 @@
|
|||
},
|
||||
"../packages/openai-adapters": {
|
||||
"name": "@continuedev/openai-adapters",
|
||||
"version": "1.15.0",
|
||||
"version": "1.32.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "^0.67.0",
|
||||
"@aws-sdk/client-bedrock-runtime": "^3.842.0",
|
||||
"@aws-sdk/credential-providers": "^3.913.0",
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"@continuedev/config-yaml": "^1.33.0",
|
||||
"@continuedev/fetch": "^1.5.0",
|
||||
"@continuedev/config-yaml": "^1.36.0",
|
||||
"@continuedev/fetch": "^1.6.0",
|
||||
"dotenv": "^16.5.0",
|
||||
"google-auth-library": "^10.4.1",
|
||||
"json-schema": "^0.4.0",
|
||||
|
|
@ -239,14 +239,14 @@
|
|||
"@semantic-release/commit-analyzer": "^13.0.1",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"@semantic-release/github": "^11.0.3",
|
||||
"@semantic-release/npm": "^13.1.2",
|
||||
"@semantic-release/npm": "^12.0.2",
|
||||
"@semantic-release/release-notes-generator": "^14.0.3",
|
||||
"@types/follow-redirects": "^1.14.4",
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/json-schema": "^7.0.15",
|
||||
"@types/node": "^24.3.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"semantic-release": "^25.0.2",
|
||||
"semantic-release": "^24.2.7",
|
||||
"ts-jest": "^29.2.3",
|
||||
"ts-node": "^10.9.2",
|
||||
"vitest": "^3.2.4"
|
||||
|
|
@ -270,6 +270,7 @@
|
|||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@75lb/deep-merge/-/deep-merge-1.1.2.tgz",
|
||||
"integrity": "sha512-08K9ou5VNbheZFxM5tDWoqjA3ImC50DiuuJ2tj1yEPRfkp8lLLg6XAaJ4On+a0yAXor/8ay5gHnAIshRM44Kpw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"lodash": "^4.17.21",
|
||||
"typical": "^7.1.1"
|
||||
|
|
@ -282,6 +283,7 @@
|
|||
"version": "7.3.0",
|
||||
"resolved": "https://registry.npmjs.org/typical/-/typical-7.3.0.tgz",
|
||||
"integrity": "sha512-ya4mg/30vm+DOWfBg4YK3j2WD6TWtRkCbasOJr40CseYENzCUby/7rIvXA99JGsQHeNxLbnXdyLLxKSv3tauFw==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12.17"
|
||||
}
|
||||
|
|
@ -1322,7 +1324,6 @@
|
|||
"version": "7.26.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz",
|
||||
"integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@ampproject/remapping": "^2.2.0",
|
||||
"@babel/code-frame": "^7.26.0",
|
||||
|
|
@ -4471,7 +4472,6 @@
|
|||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.0.tgz",
|
||||
"integrity": "sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@octokit/auth-token": "^4.0.0",
|
||||
"@octokit/graphql": "^7.1.0",
|
||||
|
|
@ -4616,7 +4616,6 @@
|
|||
"resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz",
|
||||
"integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
}
|
||||
|
|
@ -4638,7 +4637,6 @@
|
|||
"resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.30.1.tgz",
|
||||
"integrity": "sha512-s5vvxXPVdjqS3kTLKMeBMvop9hbWkwzBpu+mUO2M7sZtlkyDJGwFe33wRKnbaYDo8ExRVBIIdwIGrqpxHuKttA==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
|
|
@ -4651,7 +4649,6 @@
|
|||
"resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.30.1.tgz",
|
||||
"integrity": "sha512-OOCM2C/QIURhJMuKaekP3TRBxBKxG/TWWA0TL2J6nXUtDnuCtccy49LUJF8xPFXMX+0LMcxFpCo8M9cGY1W6rQ==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@opentelemetry/semantic-conventions": "1.28.0"
|
||||
},
|
||||
|
|
@ -5171,7 +5168,6 @@
|
|||
"resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.30.1.tgz",
|
||||
"integrity": "sha512-5UxZqiAgLYGFjS4s9qm5mBVo433u+dSPUFWVWXmLAD4wB65oMCoXaJP1KJa9DIYYMeHu3z4BZcStG3LC593cWA==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@opentelemetry/core": "1.30.1",
|
||||
"@opentelemetry/semantic-conventions": "1.28.0"
|
||||
|
|
@ -5197,7 +5193,6 @@
|
|||
"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.30.1.tgz",
|
||||
"integrity": "sha512-jVPgBbH1gCy2Lb7X0AVQ8XAfgg0pJ4nvl8/IiQA6nxOsPvS+0zMJaFSs2ltXe0J6C8dqjcnpyqINDJmU30+uOg==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@opentelemetry/core": "1.30.1",
|
||||
"@opentelemetry/resources": "1.30.1",
|
||||
|
|
@ -5224,7 +5219,6 @@
|
|||
"resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.36.0.tgz",
|
||||
"integrity": "sha512-TtxJSRD8Ohxp6bKkhrm27JRHAxPczQA7idtcTOMYI+wQRRrfgqxHv1cFbCApcSnNjtXkmzFozn6jQtFrOmbjPQ==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
|
|
@ -5635,7 +5629,8 @@
|
|||
"node_modules/@rtsao/scc": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz",
|
||||
"integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g=="
|
||||
"integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@sentry/babel-plugin-component-annotate": {
|
||||
"version": "4.0.2",
|
||||
|
|
@ -6850,12 +6845,14 @@
|
|||
"node_modules/@types/command-line-args": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/command-line-args/-/command-line-args-5.2.0.tgz",
|
||||
"integrity": "sha512-UuKzKpJJ/Ief6ufIaIzr3A/0XnluX7RvFgwkV89Yzvm77wCh1kFaFmqN8XEnGcN62EuHdedQjEMb8mYxFLGPyA=="
|
||||
"integrity": "sha512-UuKzKpJJ/Ief6ufIaIzr3A/0XnluX7RvFgwkV89Yzvm77wCh1kFaFmqN8XEnGcN62EuHdedQjEMb8mYxFLGPyA==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@types/command-line-usage": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/command-line-usage/-/command-line-usage-5.0.2.tgz",
|
||||
"integrity": "sha512-n7RlEEJ+4x4TS7ZQddTmNSxP+zziEG0TNsMfiRIxcIVXt71ENJ9ojeXmGO3wPoTdn7pJcU2xc3CJYMktNT6DPg=="
|
||||
"integrity": "sha512-n7RlEEJ+4x4TS7ZQddTmNSxP+zziEG0TNsMfiRIxcIVXt71ENJ9ojeXmGO3wPoTdn7pJcU2xc3CJYMktNT6DPg==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@types/connect": {
|
||||
"version": "3.4.38",
|
||||
|
|
@ -6971,7 +6968,8 @@
|
|||
"node_modules/@types/json5": {
|
||||
"version": "0.0.29",
|
||||
"resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
|
||||
"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ=="
|
||||
"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@types/long": {
|
||||
"version": "4.0.2",
|
||||
|
|
@ -7036,7 +7034,8 @@
|
|||
"node_modules/@types/pad-left": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/pad-left/-/pad-left-2.1.1.tgz",
|
||||
"integrity": "sha512-Xd22WCRBydkGSApl5Bw0PhAOHKSVjNL3E3AwzKaps96IMraPqy5BvZIsBVK6JLwdybUzjHnuWVwpDd0JjTfHXA=="
|
||||
"integrity": "sha512-Xd22WCRBydkGSApl5Bw0PhAOHKSVjNL3E3AwzKaps96IMraPqy5BvZIsBVK6JLwdybUzjHnuWVwpDd0JjTfHXA==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@types/pg": {
|
||||
"version": "8.11.10",
|
||||
|
|
@ -7245,7 +7244,6 @@
|
|||
"integrity": "sha512-jCNyAuXx8dr5KJMkecGmZ8KI61KBUhkCob+SD+C+I5+Y1FWI2Y3QmY4/cxMCC5WAsZqoEtEETVhUiUMIGCf6Bw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "8.40.0",
|
||||
"@typescript-eslint/types": "8.40.0",
|
||||
|
|
@ -7669,7 +7667,6 @@
|
|||
"version": "8.14.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz",
|
||||
"integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"acorn": "bin/acorn"
|
||||
},
|
||||
|
|
@ -7884,6 +7881,7 @@
|
|||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz",
|
||||
"integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
|
|
@ -7892,6 +7890,7 @@
|
|||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz",
|
||||
"integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.5",
|
||||
"is-array-buffer": "^3.0.4"
|
||||
|
|
@ -7907,6 +7906,7 @@
|
|||
"version": "3.1.8",
|
||||
"resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz",
|
||||
"integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
|
|
@ -7931,6 +7931,7 @@
|
|||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz",
|
||||
"integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
|
|
@ -7950,6 +7951,7 @@
|
|||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz",
|
||||
"integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.2.0",
|
||||
|
|
@ -7967,6 +7969,7 @@
|
|||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz",
|
||||
"integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.2.0",
|
||||
|
|
@ -7984,6 +7987,7 @@
|
|||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz",
|
||||
"integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"array-buffer-byte-length": "^1.0.1",
|
||||
"call-bind": "^1.0.5",
|
||||
|
|
@ -8060,6 +8064,7 @@
|
|||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz",
|
||||
"integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"possible-typed-array-names": "^1.0.0"
|
||||
},
|
||||
|
|
@ -8515,7 +8520,6 @@
|
|||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"caniuse-lite": "^1.0.30001669",
|
||||
"electron-to-chromium": "^1.5.41",
|
||||
|
|
@ -8821,6 +8825,7 @@
|
|||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz",
|
||||
"integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"chalk": "^4.1.2"
|
||||
},
|
||||
|
|
@ -9129,6 +9134,7 @@
|
|||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz",
|
||||
"integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"array-back": "^3.1.0",
|
||||
"find-replace": "^3.0.0",
|
||||
|
|
@ -9143,6 +9149,7 @@
|
|||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-7.0.1.tgz",
|
||||
"integrity": "sha512-NCyznE//MuTjwi3y84QVUGEOT+P5oto1e1Pk/jFPVdPPfsG03qpTIl3yw6etR+v73d0lXsoojRpvbru2sqePxQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"array-back": "^6.2.2",
|
||||
"chalk-template": "^0.4.0",
|
||||
|
|
@ -9157,6 +9164,7 @@
|
|||
"version": "6.2.2",
|
||||
"resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz",
|
||||
"integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12.17"
|
||||
}
|
||||
|
|
@ -9165,6 +9173,7 @@
|
|||
"version": "7.3.0",
|
||||
"resolved": "https://registry.npmjs.org/typical/-/typical-7.3.0.tgz",
|
||||
"integrity": "sha512-ya4mg/30vm+DOWfBg4YK3j2WD6TWtRkCbasOJr40CseYENzCUby/7rIvXA99JGsQHeNxLbnXdyLLxKSv3tauFw==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12.17"
|
||||
}
|
||||
|
|
@ -9432,6 +9441,7 @@
|
|||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz",
|
||||
"integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.6",
|
||||
"es-errors": "^1.3.0",
|
||||
|
|
@ -9448,6 +9458,7 @@
|
|||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz",
|
||||
"integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"es-errors": "^1.3.0",
|
||||
|
|
@ -9464,6 +9475,7 @@
|
|||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz",
|
||||
"integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.6",
|
||||
"es-errors": "^1.3.0",
|
||||
|
|
@ -9702,8 +9714,7 @@
|
|||
"version": "0.0.1521046",
|
||||
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1521046.tgz",
|
||||
"integrity": "sha512-vhE6eymDQSKWUXwwA37NtTTVEzjtGVfDr3pRbsWEQ5onH/Snp2c+2xZHWJJawG/0hCCJLRGt4xVtEVUVILol4w==",
|
||||
"license": "BSD-3-Clause",
|
||||
"peer": true
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/diff": {
|
||||
"version": "7.0.0",
|
||||
|
|
@ -10021,6 +10032,7 @@
|
|||
"version": "1.23.5",
|
||||
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.5.tgz",
|
||||
"integrity": "sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"array-buffer-byte-length": "^1.0.1",
|
||||
"arraybuffer.prototype.slice": "^1.0.3",
|
||||
|
|
@ -10129,6 +10141,7 @@
|
|||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz",
|
||||
"integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"hasown": "^2.0.0"
|
||||
}
|
||||
|
|
@ -10137,6 +10150,7 @@
|
|||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz",
|
||||
"integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"is-callable": "^1.2.7",
|
||||
"is-date-object": "^1.0.5",
|
||||
|
|
@ -10592,7 +10606,6 @@
|
|||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz",
|
||||
"integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==",
|
||||
"deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@eslint-community/regexpp": "^4.6.1",
|
||||
|
|
@ -10677,6 +10690,7 @@
|
|||
"version": "0.3.9",
|
||||
"resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz",
|
||||
"integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"debug": "^3.2.7",
|
||||
"is-core-module": "^2.13.0",
|
||||
|
|
@ -10687,6 +10701,7 @@
|
|||
"version": "3.2.7",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
|
||||
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"ms": "^2.1.1"
|
||||
}
|
||||
|
|
@ -10695,6 +10710,7 @@
|
|||
"version": "2.12.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz",
|
||||
"integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"debug": "^3.2.7"
|
||||
},
|
||||
|
|
@ -10711,6 +10727,7 @@
|
|||
"version": "3.2.7",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
|
||||
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"ms": "^2.1.1"
|
||||
}
|
||||
|
|
@ -10719,6 +10736,7 @@
|
|||
"version": "2.31.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz",
|
||||
"integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@rtsao/scc": "^1.1.0",
|
||||
"array-includes": "^3.1.8",
|
||||
|
|
@ -10752,6 +10770,7 @@
|
|||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
|
||||
"integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
|
|
@ -10761,6 +10780,7 @@
|
|||
"version": "3.2.7",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
|
||||
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"ms": "^2.1.1"
|
||||
}
|
||||
|
|
@ -10769,6 +10789,7 @@
|
|||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
|
||||
"integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"esutils": "^2.0.2"
|
||||
},
|
||||
|
|
@ -10780,6 +10801,7 @@
|
|||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
|
|
@ -11391,6 +11413,7 @@
|
|||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz",
|
||||
"integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"array-back": "^3.0.1"
|
||||
},
|
||||
|
|
@ -11429,7 +11452,8 @@
|
|||
"node_modules/flatbuffers": {
|
||||
"version": "23.5.26",
|
||||
"resolved": "https://registry.npmjs.org/flatbuffers/-/flatbuffers-23.5.26.tgz",
|
||||
"integrity": "sha512-vE+SI9vrJDwi1oETtTIFldC/o9GsVKRM+s6EL0nQgxXlYV1Vc4Tk30hj4xGICftInKQKj1F3up2n8UbIVobISQ=="
|
||||
"integrity": "sha512-vE+SI9vrJDwi1oETtTIFldC/o9GsVKRM+s6EL0nQgxXlYV1Vc4Tk30hj4xGICftInKQKj1F3up2n8UbIVobISQ==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/flatted": {
|
||||
"version": "3.3.2",
|
||||
|
|
@ -11464,6 +11488,7 @@
|
|||
"version": "0.3.3",
|
||||
"resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
|
||||
"integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"is-callable": "^1.1.3"
|
||||
}
|
||||
|
|
@ -11608,6 +11633,7 @@
|
|||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz",
|
||||
"integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.2.0",
|
||||
|
|
@ -11625,6 +11651,7 @@
|
|||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz",
|
||||
"integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
|
|
@ -11816,6 +11843,7 @@
|
|||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz",
|
||||
"integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.5",
|
||||
"es-errors": "^1.3.0",
|
||||
|
|
@ -11926,6 +11954,7 @@
|
|||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",
|
||||
"integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"define-properties": "^1.2.1",
|
||||
"gopd": "^1.0.1"
|
||||
|
|
@ -12114,6 +12143,7 @@
|
|||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz",
|
||||
"integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==",
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
|
|
@ -12149,6 +12179,7 @@
|
|||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz",
|
||||
"integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"dunder-proto": "^1.0.0"
|
||||
},
|
||||
|
|
@ -12506,6 +12537,7 @@
|
|||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz",
|
||||
"integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"hasown": "^2.0.0",
|
||||
|
|
@ -12539,6 +12571,7 @@
|
|||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz",
|
||||
"integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"get-intrinsic": "^1.2.1"
|
||||
|
|
@ -12559,6 +12592,7 @@
|
|||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz",
|
||||
"integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"has-tostringtag": "^1.0.0"
|
||||
},
|
||||
|
|
@ -12573,6 +12607,7 @@
|
|||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz",
|
||||
"integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"has-bigints": "^1.0.2"
|
||||
},
|
||||
|
|
@ -12599,6 +12634,7 @@
|
|||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.0.tgz",
|
||||
"integrity": "sha512-kR5g0+dXf/+kXnqI+lu0URKYPKgICtHGGNCDSB10AaUFj3o/HkB3u7WfpRBJGFopxxY0oH3ux7ZsDjLtK7xqvw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"has-tostringtag": "^1.0.2"
|
||||
|
|
@ -12614,6 +12650,7 @@
|
|||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
|
||||
"integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
|
|
@ -12639,6 +12676,7 @@
|
|||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz",
|
||||
"integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"is-typed-array": "^1.1.13"
|
||||
},
|
||||
|
|
@ -12653,6 +12691,7 @@
|
|||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz",
|
||||
"integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"has-tostringtag": "^1.0.0"
|
||||
},
|
||||
|
|
@ -12694,6 +12733,7 @@
|
|||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.0.tgz",
|
||||
"integrity": "sha512-qfMdqbAQEwBw78ZyReKnlA8ezmPdb9BemzIIip/JkjaZUhitfXDkkr+3QTboW0JrSXT1QWyYShpvnNHGZ4c4yA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7"
|
||||
},
|
||||
|
|
@ -12725,6 +12765,7 @@
|
|||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz",
|
||||
"integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"has-tostringtag": "^1.0.0"
|
||||
},
|
||||
|
|
@ -12765,6 +12806,7 @@
|
|||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz",
|
||||
"integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
|
|
@ -12776,6 +12818,7 @@
|
|||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz",
|
||||
"integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
|
|
@ -12795,6 +12838,7 @@
|
|||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.0.tgz",
|
||||
"integrity": "sha512-KVSZV0Dunv9DTPkhXwcZ3Q+tUc9TsaE1ZwX5J2WMvsSGS6Md8TFPun5uwh0yRdrNerI6vf/tbJxqSx4c1ZI1Lw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"has-tostringtag": "^1.0.2"
|
||||
|
|
@ -12833,6 +12877,7 @@
|
|||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.0.tgz",
|
||||
"integrity": "sha512-B6ohK4ZmoftlUe+uvenXSbPJFo6U37BH7oO1B3nQH8f/7h27N56s85MhUtbFJAziz5dcmuR3i8ovUl35zp8pFA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"gopd": "^1.1.0",
|
||||
|
|
@ -12850,6 +12895,7 @@
|
|||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz",
|
||||
"integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
|
|
@ -12861,6 +12907,7 @@
|
|||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz",
|
||||
"integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7"
|
||||
},
|
||||
|
|
@ -12886,6 +12933,7 @@
|
|||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.0.tgz",
|
||||
"integrity": "sha512-PlfzajuF9vSo5wErv3MJAKD/nqf9ngAs1NFQYm16nUYFO2IzxJ2hcm+IOCg+EEopdykNNUhVq5cz35cAUxU8+g==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"has-tostringtag": "^1.0.2"
|
||||
|
|
@ -12901,6 +12949,7 @@
|
|||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.0.tgz",
|
||||
"integrity": "sha512-qS8KkNNXUZ/I+nX6QT8ZS1/Yx0A444yhzdTKxCzKkNjQ9sHErBxJnJAgh+f5YhusYECEcjo4XcyH87hn6+ks0A==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"has-symbols": "^1.0.3",
|
||||
|
|
@ -12917,6 +12966,7 @@
|
|||
"version": "1.1.13",
|
||||
"resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz",
|
||||
"integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"which-typed-array": "^1.1.14"
|
||||
},
|
||||
|
|
@ -12936,6 +12986,7 @@
|
|||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz",
|
||||
"integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
|
|
@ -12947,6 +12998,7 @@
|
|||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz",
|
||||
"integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2"
|
||||
},
|
||||
|
|
@ -12958,6 +13010,7 @@
|
|||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz",
|
||||
"integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"get-intrinsic": "^1.2.4"
|
||||
|
|
@ -12983,7 +13036,8 @@
|
|||
"node_modules/isarray": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
|
||||
"integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw=="
|
||||
"integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/isexe": {
|
||||
"version": "2.0.0",
|
||||
|
|
@ -13133,7 +13187,6 @@
|
|||
"resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz",
|
||||
"integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@jest/core": "^29.7.0",
|
||||
"@jest/types": "^29.6.3",
|
||||
|
|
@ -14056,7 +14109,6 @@
|
|||
"version": "24.1.3",
|
||||
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.1.3.tgz",
|
||||
"integrity": "sha512-MyL55p3Ut3cXbeBEG7Hcv0mVM8pp8PBNWxRqchZnSfAiES1v1mRnMeFfaHWIPULpwsYfvO+ZmMZz5tGCnjzDUQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"cssstyle": "^4.0.1",
|
||||
"data-urls": "^5.0.0",
|
||||
|
|
@ -14116,6 +14168,7 @@
|
|||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/json-bignum/-/json-bignum-0.0.3.tgz",
|
||||
"integrity": "sha512-2WHyXj3OfHSgNyuzDbSxI1w2jgw5gkWSWhS7Qg4bWXx1nLk3jnbwfUeS0PSba3IzpTUWdHxBieELUzXRjQB2zg==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
|
|
@ -14371,7 +14424,8 @@
|
|||
"node_modules/lodash.camelcase": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
|
||||
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA=="
|
||||
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/lodash.debounce": {
|
||||
"version": "4.0.8",
|
||||
|
|
@ -15291,9 +15345,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/node-forge": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz",
|
||||
"integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==",
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.2.tgz",
|
||||
"integrity": "sha512-6xKiQ+cph9KImrRh0VsjH2d8/GXA4FIMlgU4B757iI1ApvcyA9VlouP0yZJha01V+huImO+kKMU7ih+2+E14fw==",
|
||||
"license": "(BSD-3-Clause OR GPL-2.0)",
|
||||
"engines": {
|
||||
"node": ">= 6.13.0"
|
||||
}
|
||||
|
|
@ -15568,6 +15623,7 @@
|
|||
"version": "2.0.8",
|
||||
"resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz",
|
||||
"integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
|
|
@ -15585,6 +15641,7 @@
|
|||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz",
|
||||
"integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
|
|
@ -15598,6 +15655,7 @@
|
|||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz",
|
||||
"integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
|
|
@ -15907,6 +15965,7 @@
|
|||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/pad-left/-/pad-left-2.1.0.tgz",
|
||||
"integrity": "sha512-HJxs9K9AztdIQIAIa/OIazRAUW/L6B9hbQDxO4X07roW3eo9XqZc2ur9bn1StH9CnbbI9EgvejHQX7CBpCF1QA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"repeat-string": "^1.5.4"
|
||||
},
|
||||
|
|
@ -16085,7 +16144,6 @@
|
|||
"version": "8.13.1",
|
||||
"resolved": "https://registry.npmjs.org/pg/-/pg-8.13.1.tgz",
|
||||
"integrity": "sha512-OUir1A0rPNZlX//c7ksiu7crsGZTKSOXJPgtNiHGIlC9H0lO+NC6ZDYksSgBYY/thSWhnSRBv8w1lieNNGATNQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"pg-connection-string": "^2.7.0",
|
||||
"pg-pool": "^3.7.0",
|
||||
|
|
@ -16350,6 +16408,7 @@
|
|||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz",
|
||||
"integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
|
|
@ -16802,8 +16861,7 @@
|
|||
"node_modules/puppeteer-chromium-resolver/node_modules/devtools-protocol": {
|
||||
"version": "0.0.1367902",
|
||||
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1367902.tgz",
|
||||
"integrity": "sha512-XxtPuC3PGakY6PD7dG66/o8KwJ/LkH2/EKe19Dcw58w53dv4/vSQEkn/SzuyhHE2q4zPgCkxQBxus3VV4ql+Pg==",
|
||||
"peer": true
|
||||
"integrity": "sha512-XxtPuC3PGakY6PD7dG66/o8KwJ/LkH2/EKe19Dcw58w53dv4/vSQEkn/SzuyhHE2q4zPgCkxQBxus3VV4ql+Pg=="
|
||||
},
|
||||
"node_modules/puppeteer-chromium-resolver/node_modules/puppeteer-core": {
|
||||
"version": "23.10.2",
|
||||
|
|
@ -17020,6 +17078,7 @@
|
|||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.8.tgz",
|
||||
"integrity": "sha512-B5dj6usc5dkk8uFliwjwDHM8To5/QwdKz9JcBZ8Ic4G1f0YmeeJTtE/ZTdgRFPAfxZFiUaPhZ1Jcs4qeagItGQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.8",
|
||||
"define-properties": "^1.2.1",
|
||||
|
|
@ -17101,6 +17160,7 @@
|
|||
"version": "1.5.3",
|
||||
"resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz",
|
||||
"integrity": "sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
|
|
@ -17446,6 +17506,7 @@
|
|||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz",
|
||||
"integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
|
|
@ -17482,6 +17543,7 @@
|
|||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz",
|
||||
"integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.6",
|
||||
"es-errors": "^1.3.0",
|
||||
|
|
@ -17611,6 +17673,7 @@
|
|||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz",
|
||||
"integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"define-data-property": "^1.1.4",
|
||||
"es-errors": "^1.3.0",
|
||||
|
|
@ -18212,6 +18275,7 @@
|
|||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/stream-read-all/-/stream-read-all-3.0.1.tgz",
|
||||
"integrity": "sha512-EWZT9XOceBPlVJRrYcykW8jyRSZYbkb/0ZK36uLEmoWVO5gxBOnntNTseNzfREsqxqdfEGQrD8SXQ3QWbBmq8A==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
|
|
@ -18281,6 +18345,7 @@
|
|||
"version": "1.2.9",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz",
|
||||
"integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
|
|
@ -18298,6 +18363,7 @@
|
|||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz",
|
||||
"integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
|
|
@ -18311,6 +18377,7 @@
|
|||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz",
|
||||
"integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
|
|
@ -18435,6 +18502,7 @@
|
|||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/table-layout/-/table-layout-3.0.2.tgz",
|
||||
"integrity": "sha512-rpyNZYRw+/C+dYkcQ3Pr+rLxW4CfHpXjPDnG7lYhdRoUcZTUt+KEsX+94RGp/aVp/MQU35JCITv2T/beY4m+hw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@75lb/deep-merge": "^1.1.1",
|
||||
"array-back": "^6.2.2",
|
||||
|
|
@ -18455,6 +18523,7 @@
|
|||
"version": "6.2.2",
|
||||
"resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz",
|
||||
"integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12.17"
|
||||
}
|
||||
|
|
@ -18463,6 +18532,7 @@
|
|||
"version": "7.3.0",
|
||||
"resolved": "https://registry.npmjs.org/typical/-/typical-7.3.0.tgz",
|
||||
"integrity": "sha512-ya4mg/30vm+DOWfBg4YK3j2WD6TWtRkCbasOJr40CseYENzCUby/7rIvXA99JGsQHeNxLbnXdyLLxKSv3tauFw==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12.17"
|
||||
}
|
||||
|
|
@ -18730,7 +18800,6 @@
|
|||
"integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
|
|
@ -18922,6 +18991,7 @@
|
|||
"version": "3.15.0",
|
||||
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
|
||||
"integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/json5": "^0.0.29",
|
||||
"json5": "^1.0.2",
|
||||
|
|
@ -18933,6 +19003,7 @@
|
|||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
|
||||
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"minimist": "^1.2.0"
|
||||
},
|
||||
|
|
@ -18944,6 +19015,7 @@
|
|||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
|
||||
"integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
|
|
@ -19037,6 +19109,7 @@
|
|||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz",
|
||||
"integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"es-errors": "^1.3.0",
|
||||
|
|
@ -19050,6 +19123,7 @@
|
|||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz",
|
||||
"integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"for-each": "^0.3.3",
|
||||
|
|
@ -19068,6 +19142,7 @@
|
|||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.3.tgz",
|
||||
"integrity": "sha512-GsvTyUHTriq6o/bHcTd0vM7OQ9JEdlvluu9YISaA7+KzDzPaIzEeDFNkTfhdE3MYcNhNi0vq/LlegYgIs5yPAw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"available-typed-arrays": "^1.0.7",
|
||||
"call-bind": "^1.0.7",
|
||||
|
|
@ -19088,6 +19163,7 @@
|
|||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz",
|
||||
"integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"for-each": "^0.3.3",
|
||||
|
|
@ -19113,7 +19189,6 @@
|
|||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz",
|
||||
"integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==",
|
||||
"devOptional": true,
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
|
|
@ -19126,6 +19201,7 @@
|
|||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz",
|
||||
"integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
|
|
@ -19146,6 +19222,7 @@
|
|||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz",
|
||||
"integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"has-bigints": "^1.0.2",
|
||||
|
|
@ -19545,7 +19622,6 @@
|
|||
"integrity": "sha512-0msEVHJEScQbhkbVTb/4iHZdJ6SXp/AvxL2sjwYQFfBqleHtnCqv1J3sa9zbWz/6kW1m9Tfzn92vW+kZ1WV6QA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.25.0",
|
||||
"fdir": "^6.4.4",
|
||||
|
|
@ -19717,7 +19793,6 @@
|
|||
"integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
|
|
@ -19912,6 +19987,7 @@
|
|||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.0.tgz",
|
||||
"integrity": "sha512-Ei7Miu/AXe2JJ4iNF5j/UphAgRoma4trE6PtisM09bPygb3egMH3YLW/befsWb1A1AxvNSFidOFTB18XtnIIng==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"is-bigint": "^1.1.0",
|
||||
"is-boolean-object": "^1.2.0",
|
||||
|
|
@ -19930,6 +20006,7 @@
|
|||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.0.tgz",
|
||||
"integrity": "sha512-I+qLGQ/vucCby4tf5HsLmGueEla4ZhwTBSqaooS+Y0BuxN4Cp+okmGuV+8mXZ84KDI9BA+oklo+RzKg0ONdSUA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"function.prototype.name": "^1.1.6",
|
||||
|
|
@ -19956,6 +20033,7 @@
|
|||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz",
|
||||
"integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"is-map": "^2.0.3",
|
||||
"is-set": "^2.0.3",
|
||||
|
|
@ -19973,6 +20051,7 @@
|
|||
"version": "1.1.16",
|
||||
"resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.16.tgz",
|
||||
"integrity": "sha512-g+N+GAWiRj66DngFwHvISJd+ITsyphZvD1vChfVg6cEdnzy53GzB3oy0fUNlvhz7H7+MiqhYr26qxQShCpKTTQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"available-typed-arrays": "^1.0.7",
|
||||
"call-bind": "^1.0.7",
|
||||
|
|
@ -20198,6 +20277,7 @@
|
|||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-5.1.0.tgz",
|
||||
"integrity": "sha512-JNjcULU2e4KJwUNv6CHgI46UvDGitb6dGryHajXTDiLgg1/RiGoPSDw4kZfYnwGtEXf2ZMeIewDQgFGzkCB2Sg==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12.17"
|
||||
}
|
||||
|
|
@ -20263,7 +20343,6 @@
|
|||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",
|
||||
"integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
|
|
@ -20334,7 +20413,6 @@
|
|||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz",
|
||||
"integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"yaml": "bin.mjs"
|
||||
},
|
||||
|
|
@ -20392,7 +20470,6 @@
|
|||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
|
||||
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@
|
|||
"tree-sitter-wasms": "^0.1.11",
|
||||
"untildify": "^6.0.0",
|
||||
"uuid": "^9.0.1",
|
||||
"vectordb": "^0.4.20",
|
||||
"vectordb": "0.4.20",
|
||||
"web-tree-sitter": "^0.21.0",
|
||||
"win-ca": "^3.5.1",
|
||||
"wink-nlp-utils": "^2.1.0",
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export const grepSearchTool: Tool = {
|
|||
function: {
|
||||
name: BuiltInToolNames.GrepSearch,
|
||||
description:
|
||||
"Performs a regex search over the repository using ripgrep. Will not include results for many build, cache, secrets dirs/files. Output may be truncated, so use targeted queries",
|
||||
"Performs a regular expression (regex) search over the repository using ripgrep. Will not include results for many build, cache, secrets dirs/files. Output may be truncated, so use targeted queries",
|
||||
parameters: {
|
||||
type: "object",
|
||||
required: ["query"],
|
||||
|
|
@ -21,7 +21,7 @@ export const grepSearchTool: Tool = {
|
|||
query: {
|
||||
type: "string",
|
||||
description:
|
||||
"The search query to use. Must be the exact string to be searched or a valid ripgrep expression. Use regex with alternation (e.g., 'word1|word2|word3) or character classes to find multiple potential words in a single search.",
|
||||
"The regex pattern to search for within file contents. Use regex with alternation (e.g., 'word1|word2|word3') or character classes to find multiple potential words in a single search.",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import iconv from "iconv-lite";
|
||||
import childProcess from "node:child_process";
|
||||
import os from "node:os";
|
||||
import util from "node:util";
|
||||
import { ContinueError, ContinueErrorReason } from "../../util/errors";
|
||||
// Automatically decode the buffer according to the platform to avoid garbled Chinese
|
||||
function getDecodedOutput(data: Buffer): string {
|
||||
|
|
@ -44,7 +43,25 @@ import {
|
|||
} from "../../util/processTerminalStates";
|
||||
import { getBooleanArg, getStringArg } from "../parseArgs";
|
||||
|
||||
const asyncExec = util.promisify(childProcess.exec);
|
||||
/**
|
||||
* Resolves the working directory from workspace dirs.
|
||||
* Falls back to home directory or temp directory if no workspace is available.
|
||||
*/
|
||||
function resolveWorkingDirectory(workspaceDirs: string[]): string {
|
||||
const fileWorkspaceDir = workspaceDirs.find((dir) =>
|
||||
dir.startsWith("file:/"),
|
||||
);
|
||||
if (fileWorkspaceDir) {
|
||||
return fileURLToPath(fileWorkspaceDir);
|
||||
}
|
||||
// Default to user's home directory with fallbacks
|
||||
try {
|
||||
return process.env.HOME || process.env.USERPROFILE || process.cwd();
|
||||
} catch {
|
||||
// Final fallback if even process.cwd() fails - use system temp directory
|
||||
return os.tmpdir();
|
||||
}
|
||||
}
|
||||
|
||||
// Add color-supporting environment variables
|
||||
const getColorEnv = () => ({
|
||||
|
|
@ -82,20 +99,7 @@ export const runTerminalCommandImpl: ToolImpl = async (args, extras) => {
|
|||
if (extras.onPartialOutput) {
|
||||
try {
|
||||
const workspaceDirs = await extras.ide.getWorkspaceDirs();
|
||||
|
||||
// Handle case where no workspace is available
|
||||
let cwd: string;
|
||||
if (workspaceDirs.length > 0) {
|
||||
cwd = fileURLToPath(workspaceDirs[0]);
|
||||
} else {
|
||||
// Default to user's home directory with fallbacks
|
||||
try {
|
||||
cwd = process.env.HOME || process.env.USERPROFILE || process.cwd();
|
||||
} catch (error) {
|
||||
// Final fallback if even process.cwd() fails - use system temp directory
|
||||
cwd = os.tmpdir();
|
||||
}
|
||||
}
|
||||
const cwd = resolveWorkingDirectory(workspaceDirs);
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
let terminalOutput = "";
|
||||
|
|
@ -281,20 +285,7 @@ export const runTerminalCommandImpl: ToolImpl = async (args, extras) => {
|
|||
} else {
|
||||
// Fallback to non-streaming for older clients
|
||||
const workspaceDirs = await extras.ide.getWorkspaceDirs();
|
||||
|
||||
// Handle case where no workspace is available
|
||||
let cwd: string;
|
||||
if (workspaceDirs.length > 0) {
|
||||
cwd = fileURLToPath(workspaceDirs[0]);
|
||||
} else {
|
||||
// Default to user's home directory with fallbacks
|
||||
try {
|
||||
cwd = process.env.HOME || process.env.USERPROFILE || process.cwd();
|
||||
} catch (error) {
|
||||
// Final fallback if even process.cwd() fails - use system temp directory
|
||||
cwd = os.tmpdir();
|
||||
}
|
||||
}
|
||||
const cwd = resolveWorkingDirectory(workspaceDirs);
|
||||
|
||||
if (waitForCompletion) {
|
||||
// Standard execution, waiting for completion
|
||||
|
|
|
|||
|
|
@ -1,20 +1,21 @@
|
|||
import {
|
||||
describe,
|
||||
it,
|
||||
expect,
|
||||
beforeEach,
|
||||
afterEach,
|
||||
afterAll,
|
||||
vi,
|
||||
} from "vitest";
|
||||
import * as childProcess from "node:child_process";
|
||||
import * as fs from "node:fs";
|
||||
import * as os from "node:os";
|
||||
import * as path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import {
|
||||
afterAll,
|
||||
afterEach,
|
||||
beforeEach,
|
||||
describe,
|
||||
expect,
|
||||
it,
|
||||
vi,
|
||||
} from "vitest";
|
||||
import { IDE, ToolExtras } from "../..";
|
||||
import * as processTerminalStates from "../../util/processTerminalStates";
|
||||
import { runTerminalCommandImpl } from "./runTerminalCommand";
|
||||
import { runTerminalCommandTool } from "../definitions/runTerminalCommand";
|
||||
import { runTerminalCommandImpl } from "./runTerminalCommand";
|
||||
|
||||
// We're using real child processes, so ensure these aren't mocked
|
||||
vi.unmock("node:child_process");
|
||||
|
|
@ -476,6 +477,206 @@ describe("runTerminalCommandImpl", () => {
|
|||
process.cwd = originalCwd;
|
||||
}
|
||||
});
|
||||
|
||||
describe("cwd handling", () => {
|
||||
describe("workspace directory handling", () => {
|
||||
it("should use file:// URI when available", async () => {
|
||||
const fileUri = "file:///home/user/workspace";
|
||||
mockGetWorkspaceDirs.mockResolvedValue([fileUri]);
|
||||
|
||||
// We can't easily test the internal cwd without mocking child_process,
|
||||
// but we can verify the function doesn't throw with file URIs
|
||||
await expect(
|
||||
runTerminalCommandImpl(
|
||||
{ command: "echo test", waitForCompletion: false },
|
||||
createMockExtras(),
|
||||
),
|
||||
).resolves.toBeDefined();
|
||||
});
|
||||
|
||||
it("should skip non-file URIs and use the first file:// URI", async () => {
|
||||
const workspaceDirs = [
|
||||
"vscode-vfs://github/user/repo",
|
||||
"untitled:/Untitled-1",
|
||||
"file:///home/user/workspace",
|
||||
"file:///home/user/other-workspace",
|
||||
];
|
||||
mockGetWorkspaceDirs.mockResolvedValue(workspaceDirs);
|
||||
|
||||
await expect(
|
||||
runTerminalCommandImpl(
|
||||
{ command: "echo test", waitForCompletion: false },
|
||||
createMockExtras(),
|
||||
),
|
||||
).resolves.toBeDefined();
|
||||
});
|
||||
|
||||
it("should handle workspace with only non-file URIs", async () => {
|
||||
const workspaceDirs = [
|
||||
"vscode-vfs://github/user/repo",
|
||||
"untitled:/Untitled-1",
|
||||
];
|
||||
mockGetWorkspaceDirs.mockResolvedValue(workspaceDirs);
|
||||
|
||||
// Should fall back to HOME/USERPROFILE or process.cwd() without throwing
|
||||
await expect(
|
||||
runTerminalCommandImpl(
|
||||
{ command: "echo test", waitForCompletion: false },
|
||||
createMockExtras(),
|
||||
),
|
||||
).resolves.toBeDefined();
|
||||
});
|
||||
|
||||
it("should handle empty workspace directories", async () => {
|
||||
mockGetWorkspaceDirs.mockResolvedValue([]);
|
||||
|
||||
// Should fall back to HOME/USERPROFILE or process.cwd() without throwing
|
||||
await expect(
|
||||
runTerminalCommandImpl(
|
||||
{ command: "echo test", waitForCompletion: false },
|
||||
createMockExtras(),
|
||||
),
|
||||
).resolves.toBeDefined();
|
||||
});
|
||||
|
||||
it("should properly convert file:// URIs to paths", () => {
|
||||
const fileUri = "file:///home/user/workspace";
|
||||
const expectedPath = "/home/user/workspace";
|
||||
|
||||
// Test that fileURLToPath works correctly with file:// URIs
|
||||
expect(fileURLToPath(fileUri)).toBe(expectedPath);
|
||||
});
|
||||
|
||||
it("should throw error when trying to convert non-file URI", () => {
|
||||
const nonFileUri = "vscode-vfs://github/user/repo";
|
||||
|
||||
// This demonstrates why the fix is needed - fileURLToPath throws on non-file URIs
|
||||
expect(() => fileURLToPath(nonFileUri)).toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
describe("remote environment handling", () => {
|
||||
it("should use ide.runCommand for non-enabled remote environments", async () => {
|
||||
const extras = createMockExtras({
|
||||
remoteName: "some-unsupported-remote",
|
||||
});
|
||||
|
||||
const result = await runTerminalCommandImpl(
|
||||
{ command: "echo test" },
|
||||
extras,
|
||||
);
|
||||
|
||||
expect(mockRunCommand).toHaveBeenCalledWith("echo test");
|
||||
expect(result[0].content).toContain("Terminal output not available");
|
||||
});
|
||||
|
||||
it("should handle local environment with file URIs", async () => {
|
||||
mockGetWorkspaceDirs.mockResolvedValue(["file:///home/user/workspace"]);
|
||||
|
||||
await expect(
|
||||
runTerminalCommandImpl(
|
||||
{ command: "echo test", waitForCompletion: false },
|
||||
createMockExtras({ remoteName: "local" }),
|
||||
),
|
||||
).resolves.toBeDefined();
|
||||
});
|
||||
|
||||
it("should handle WSL environment", async () => {
|
||||
mockGetWorkspaceDirs.mockResolvedValue(["file:///home/user/workspace"]);
|
||||
|
||||
await expect(
|
||||
runTerminalCommandImpl(
|
||||
{ command: "echo test", waitForCompletion: false },
|
||||
createMockExtras({ remoteName: "wsl" }),
|
||||
),
|
||||
).resolves.toBeDefined();
|
||||
});
|
||||
|
||||
it("should handle dev-container environment", async () => {
|
||||
mockGetWorkspaceDirs.mockResolvedValue(["file:///workspace"]);
|
||||
|
||||
await expect(
|
||||
runTerminalCommandImpl(
|
||||
{ command: "echo test", waitForCompletion: false },
|
||||
createMockExtras({ remoteName: "dev-container" }),
|
||||
),
|
||||
).resolves.toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe("fallback behavior", () => {
|
||||
it("should use HOME environment variable as fallback", async () => {
|
||||
const originalHome = process.env.HOME;
|
||||
process.env.HOME = "/home/testuser";
|
||||
|
||||
mockGetWorkspaceDirs.mockResolvedValue([
|
||||
"vscode-vfs://github/user/repo",
|
||||
]);
|
||||
|
||||
try {
|
||||
await expect(
|
||||
runTerminalCommandImpl(
|
||||
{ command: "echo test", waitForCompletion: false },
|
||||
createMockExtras(),
|
||||
),
|
||||
).resolves.toBeDefined();
|
||||
} finally {
|
||||
process.env.HOME = originalHome;
|
||||
}
|
||||
});
|
||||
|
||||
it("should use USERPROFILE on Windows as fallback", async () => {
|
||||
const originalHome = process.env.HOME;
|
||||
const originalUserProfile = process.env.USERPROFILE;
|
||||
|
||||
delete process.env.HOME;
|
||||
process.env.USERPROFILE = "C:\\Users\\TestUser";
|
||||
|
||||
mockGetWorkspaceDirs.mockResolvedValue([]);
|
||||
|
||||
try {
|
||||
await expect(
|
||||
runTerminalCommandImpl(
|
||||
{ command: "echo test", waitForCompletion: false },
|
||||
createMockExtras(),
|
||||
),
|
||||
).resolves.toBeDefined();
|
||||
} finally {
|
||||
process.env.HOME = originalHome;
|
||||
process.env.USERPROFILE = originalUserProfile;
|
||||
}
|
||||
});
|
||||
|
||||
it("should use os.tmpdir() as final fallback", async () => {
|
||||
const originalHome = process.env.HOME;
|
||||
const originalUserProfile = process.env.USERPROFILE;
|
||||
const originalCwd = process.cwd;
|
||||
|
||||
delete process.env.HOME;
|
||||
delete process.env.USERPROFILE;
|
||||
// Mock process.cwd to throw an error
|
||||
process.cwd = vi.fn().mockImplementation(() => {
|
||||
throw new Error("No cwd available");
|
||||
}) as typeof process.cwd;
|
||||
|
||||
mockGetWorkspaceDirs.mockResolvedValue([]);
|
||||
|
||||
try {
|
||||
// Should fall back to os.tmpdir() without throwing
|
||||
await expect(
|
||||
runTerminalCommandImpl(
|
||||
{ command: "echo test", waitForCompletion: false },
|
||||
createMockExtras(),
|
||||
),
|
||||
).resolves.toBeDefined();
|
||||
} finally {
|
||||
process.env.HOME = originalHome;
|
||||
process.env.USERPROFILE = originalUserProfile;
|
||||
process.cwd = originalCwd;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("runTerminalCommandTool.evaluateToolCallPolicy", () => {
|
||||
|
|
|
|||
|
|
@ -150,16 +150,6 @@ export function prepareQueryForRipgrep(query: string): {
|
|||
query: string;
|
||||
warning?: string;
|
||||
} {
|
||||
// Check if it looks like a literal search that should be escaped
|
||||
if (looksLikeLiteralSearch(query)) {
|
||||
return {
|
||||
query: escapeLiteralForRegex(query),
|
||||
warning:
|
||||
"Query contained special regex characters and was escaped for literal text search",
|
||||
};
|
||||
}
|
||||
|
||||
// Otherwise validate and sanitize as regex
|
||||
const validation = validateAndSanitizeRegex(query);
|
||||
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -111,8 +111,7 @@ describe("looksLikeLiteralSearch", () => {
|
|||
describe("prepareQueryForRipgrep", () => {
|
||||
it("should escape literal-looking queries", () => {
|
||||
const result = prepareQueryForRipgrep("hello.world");
|
||||
expect(result.query).toBe("hello\\.world");
|
||||
expect(result.warning).toContain("escaped for literal text search");
|
||||
expect(result.query).toBe("hello.world");
|
||||
});
|
||||
|
||||
it("should sanitize regex patterns", () => {
|
||||
|
|
@ -130,14 +129,12 @@ describe("prepareQueryForRipgrep", () => {
|
|||
describe("real-world examples", () => {
|
||||
it("should escape file patterns", () => {
|
||||
const result = prepareQueryForRipgrep("*.js");
|
||||
expect(result.query).toBe("\\*\\.js");
|
||||
expect(result.warning).toContain("escaped for literal text search");
|
||||
expect(result.query).toBe("*.js");
|
||||
});
|
||||
|
||||
it("should escape function calls", () => {
|
||||
const result = prepareQueryForRipgrep("console.log()");
|
||||
expect(result.query).toBe("console\\.log\\(\\)");
|
||||
expect(result.warning).toContain("escaped for literal text search");
|
||||
expect(result.query).toBe("console.log()");
|
||||
});
|
||||
|
||||
it("should not escape proper regex patterns", () => {
|
||||
|
|
@ -163,8 +160,7 @@ describe("problematic patterns that originally failed", () => {
|
|||
|
||||
it("should handle dollar signs in shell patterns", () => {
|
||||
const result = prepareQueryForRipgrep("$(command)");
|
||||
expect(result.query).toBe("\\$\\(command\\)");
|
||||
expect(result.warning).toContain("escaped for literal text search");
|
||||
expect(result.query).toBe("$(command)");
|
||||
});
|
||||
|
||||
it("should handle escaped dollar signs", () => {
|
||||
|
|
@ -253,8 +249,7 @@ describe("patterns that should NOT be over-sanitized", () => {
|
|||
describe("edge cases that could trigger false positives", () => {
|
||||
it("should not treat mathematical expressions as problematic", () => {
|
||||
const result = prepareQueryForRipgrep("a + b * c");
|
||||
expect(result.query).toBe("a \\+ b \\* c"); // Should be escaped as literal
|
||||
expect(result.warning).toContain("escaped for literal text search");
|
||||
expect(result.query).toBe("a + b * c"); // Should be escaped as literal
|
||||
});
|
||||
|
||||
it("should not break regex that uses word boundaries", () => {
|
||||
|
|
@ -271,8 +266,7 @@ describe("patterns that should NOT be over-sanitized", () => {
|
|||
|
||||
it("should not treat IPv4 addresses as problematic regex", () => {
|
||||
const result = prepareQueryForRipgrep("192.168.1.1");
|
||||
expect(result.query).toBe("192\\.168\\.1\\.1"); // Should be escaped as literal
|
||||
expect(result.warning).toContain("escaped for literal text search");
|
||||
expect(result.query).toBe("192.168.1.1"); // Should be escaped as literal
|
||||
});
|
||||
|
||||
it("should not break hex color codes", () => {
|
||||
|
|
@ -285,8 +279,7 @@ describe("patterns that should NOT be over-sanitized", () => {
|
|||
describe("patterns that should preserve user intent", () => {
|
||||
it("should not sanitize intentional regex alternation", () => {
|
||||
const result = prepareQueryForRipgrep("(foo|bar)");
|
||||
expect(result.query).toBe("\\(foo\\|bar\\)"); // Should be escaped as literal since unescaped
|
||||
expect(result.warning).toContain("escaped for literal text search");
|
||||
expect(result.query).toBe("(foo|bar)"); // Should be escaped as literal since unescaped
|
||||
});
|
||||
|
||||
it("should preserve escaped alternation in regex", () => {
|
||||
|
|
@ -300,11 +293,5 @@ describe("patterns that should NOT be over-sanitized", () => {
|
|||
expect(result.query).toBe("name LIKE '%john%'"); // No regex metacharacters here
|
||||
expect(result.warning).toBeUndefined();
|
||||
});
|
||||
|
||||
it("should not break CSS selectors when used as literal search", () => {
|
||||
const result = prepareQueryForRipgrep(".class-name > div:nth-child(2)");
|
||||
expect(result.query).toBe("\\.class-name > div:nth-child\\(2\\)");
|
||||
expect(result.warning).toContain("escaped for literal text search");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -19,20 +19,20 @@ In Continue, these models are used for normal [Chat](../../ide-extensions/chat/q
|
|||
|
||||
For the best overall Chat experience, you will want to use a 400B+ parameter model or one of the frontier models.
|
||||
|
||||
### Claude Opus 4.1 and Claude Sonnet 4 from Anthropic
|
||||
### Claude Opus 4.5 and Claude Sonnet 4 from Anthropic
|
||||
|
||||
Our current top recommendations are Claude Opus 4.1 and Claude Sonnet 4 from [Anthropic](../model-providers/top-level/anthropic).
|
||||
Our current top recommendations are Claude Opus 4.5 and Claude Sonnet 4 from [Anthropic](../model-providers/top-level/anthropic).
|
||||
|
||||
<Tabs>
|
||||
<Tab title="Hub">
|
||||
View the [Claude Opus 4.1 model block](https://hub.continue.dev/anthropic/claude-4-1-opus) or [Claude Sonnet 4 model block](https://hub.continue.dev/anthropic/claude-4-sonnet) on the hub.
|
||||
View the [Claude Opus 4.5 model block](https://hub.continue.dev/anthropic/claude-4-5-opus) or [Claude Sonnet 4 model block](https://hub.continue.dev/anthropic/claude-4-sonnet) on the hub.
|
||||
</Tab>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Claude Opus 4.1
|
||||
- name: Claude Opus 4.5
|
||||
provider: anthropic
|
||||
model: claude-4-1-opus
|
||||
model: claude-opus-4-5
|
||||
apiKey: <YOUR_ANTHROPIC_API_KEY>
|
||||
```
|
||||
</Tab>
|
||||
|
|
@ -114,20 +114,20 @@ If you prefer to use a model from [xAI](../model-providers/more/xAI), then we re
|
|||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
### Gemini 2.0 Flash from Google
|
||||
### Gemini 3 Pro from Google
|
||||
|
||||
If you prefer to use a model from [Google](../model-providers/top-level/gemini), then we recommend Gemini 2.0 Flash.
|
||||
If you prefer to use a model from [Google](../model-providers/top-level/gemini), then we recommend Gemini 3 Pro.
|
||||
|
||||
<Tabs>
|
||||
<Tab title="Hub">
|
||||
Add the [Gemini 2.0 Flash block](https://hub.continue.dev/google/gemini-2.0-flash) from the hub
|
||||
Add the [Gemini 3 Pro block](https://hub.continue.dev/google/gemini-3-pro-preview) from the hub
|
||||
</Tab>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Gemini 2.0 Flash
|
||||
- name: Gemini 3 Pro
|
||||
provider: gemini
|
||||
model: gemini-2.0-flash
|
||||
model: gemini-3-pro-preview
|
||||
apiKey: <YOUR_GEMINI_API_KEY>
|
||||
```
|
||||
</Tab>
|
||||
|
|
|
|||
143
docs/package-lock.json
generated
143
docs/package-lock.json
generated
|
|
@ -1189,7 +1189,6 @@
|
|||
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
|
||||
"integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
|
||||
"license": "ISC",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"string-width": "^5.1.2",
|
||||
"string-width-cjs": "npm:string-width@^4.2.0",
|
||||
|
|
@ -1206,15 +1205,13 @@
|
|||
"version": "9.2.2",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
|
||||
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@isaacs/cliui/node_modules/string-width": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
|
||||
"integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"eastasianwidth": "^0.2.0",
|
||||
"emoji-regex": "^9.2.2",
|
||||
|
|
@ -1232,7 +1229,6 @@
|
|||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
|
||||
"integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"ansi-styles": "^6.1.0",
|
||||
"string-width": "^5.0.1",
|
||||
|
|
@ -1859,6 +1855,7 @@
|
|||
"resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz",
|
||||
"integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
}
|
||||
|
|
@ -1868,7 +1865,6 @@
|
|||
"resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.208.0.tgz",
|
||||
"integrity": "sha512-CjruKY9V6NMssL/T1kAFgzosF1v9o6oeN+aX5JB/C/xPNtmgIJqcXHG7fA82Ou1zCpWGl4lROQUKwUNE1pMCyg==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@opentelemetry/api": "^1.3.0"
|
||||
},
|
||||
|
|
@ -3129,6 +3125,7 @@
|
|||
"resolved": "https://registry.npmjs.org/@orpc/contract/-/contract-1.8.1.tgz",
|
||||
"integrity": "sha512-zw0xgRxOyR/otX+4UeGEm0VjuMH/AeVbEuWvPNRJC8xxvQpaPJFo8Nr8eaywqSUZo1DnIS+pkwsdipa7GgFl7A==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@orpc/client": "1.8.1",
|
||||
"@orpc/shared": "1.8.1",
|
||||
|
|
@ -3234,6 +3231,7 @@
|
|||
"resolved": "https://registry.npmjs.org/@orpc/server/-/server-1.8.1.tgz",
|
||||
"integrity": "sha512-Aei7KJSMG9daNdubREeDYKCnmSRTnZT7V1Cx0NFLYDYqx8Bdil2J2InJghsio6AZdJUWLNq/zMm6QDu3NN2E6g==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@orpc/client": "1.8.1",
|
||||
"@orpc/contract": "1.8.1",
|
||||
|
|
@ -3483,7 +3481,6 @@
|
|||
"integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
|
|
@ -4061,8 +4058,7 @@
|
|||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@sqltools/formatter/-/formatter-1.2.5.tgz",
|
||||
"integrity": "sha512-Uy0+khmZqUrUGm5dmMqVlnvufZRSK0FbYzVgp0UMstm+F5+W2/jnEEQyc9vo1ZR/E5ZI/B1WjjoTqBqwJL6Krw==",
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@standard-schema/spec": {
|
||||
"version": "1.0.0",
|
||||
|
|
@ -4667,6 +4663,7 @@
|
|||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
|
||||
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"acorn": "bin/acorn"
|
||||
},
|
||||
|
|
@ -4736,6 +4733,7 @@
|
|||
"integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"fast-uri": "^3.0.1",
|
||||
|
|
@ -4835,7 +4833,6 @@
|
|||
"resolved": "https://registry.npmjs.org/ansis/-/ansis-3.17.0.tgz",
|
||||
"integrity": "sha512-0qWUglt9JEqLFr3w1I1pbrChn1grhaiAR2ocX1PP/flRmxgtwTzPFFFnfIlD6aMOLQZgSuCRlidD70lvx8yhzg==",
|
||||
"license": "ISC",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
|
|
@ -4859,7 +4856,6 @@
|
|||
"resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.1.0.tgz",
|
||||
"integrity": "sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">= 6.0.0"
|
||||
}
|
||||
|
|
@ -5965,7 +5961,6 @@
|
|||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"path-key": "^3.1.0",
|
||||
"shebang-command": "^2.0.0",
|
||||
|
|
@ -5980,8 +5975,7 @@
|
|||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
|
||||
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/data-uri-to-buffer": {
|
||||
"version": "6.0.2",
|
||||
|
|
@ -6051,8 +6045,7 @@
|
|||
"version": "1.11.19",
|
||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz",
|
||||
"integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==",
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.4.1",
|
||||
|
|
@ -6119,7 +6112,6 @@
|
|||
"resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz",
|
||||
"integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"peerDependencies": {
|
||||
"babel-plugin-macros": "^3.1.0"
|
||||
},
|
||||
|
|
@ -6302,7 +6294,8 @@
|
|||
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1312386.tgz",
|
||||
"integrity": "sha512-DPnhUXvmvKT2dFA/j7B+riVLUt9Q6RKJlcppojL5CoRywJJKLDYnRlw0gTFKfgDPHP5E04UoB71SxoJlVZy8FA==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause"
|
||||
"license": "BSD-3-Clause",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/dns-packet": {
|
||||
"version": "5.6.1",
|
||||
|
|
@ -6335,7 +6328,6 @@
|
|||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz",
|
||||
"integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==",
|
||||
"license": "BSD-2-Clause",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
|
|
@ -6348,6 +6340,7 @@
|
|||
"resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.44.7.tgz",
|
||||
"integrity": "sha512-quIpnYznjU9lHshEOAYLoZ9s3jweleHlZIAWR/jX9gAWNg/JhQ1wj0KGRf7/Zm+obRrYd9GjPVJg790QY9N5AQ==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"peerDependencies": {
|
||||
"@aws-sdk/client-rds-data": ">=3",
|
||||
"@cloudflare/workers-types": ">=4",
|
||||
|
|
@ -6486,8 +6479,7 @@
|
|||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
|
||||
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/ee-first": {
|
||||
"version": "1.1.1",
|
||||
|
|
@ -7063,40 +7055,40 @@
|
|||
}
|
||||
},
|
||||
"node_modules/express": {
|
||||
"version": "4.21.2",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz",
|
||||
"integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==",
|
||||
"version": "4.22.0",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.22.0.tgz",
|
||||
"integrity": "sha512-c2iPh3xp5vvCLgaHK03+mWLFPhox7j1LwyxcZwFVApEv5i0X+IjPpbT50SJJwwLpdBVfp45AkK/v+AFgv/XlfQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"accepts": "~1.3.8",
|
||||
"array-flatten": "1.1.1",
|
||||
"body-parser": "1.20.3",
|
||||
"content-disposition": "0.5.4",
|
||||
"body-parser": "~1.20.3",
|
||||
"content-disposition": "~0.5.4",
|
||||
"content-type": "~1.0.4",
|
||||
"cookie": "0.7.1",
|
||||
"cookie-signature": "1.0.6",
|
||||
"cookie": "~0.7.1",
|
||||
"cookie-signature": "~1.0.6",
|
||||
"debug": "2.6.9",
|
||||
"depd": "2.0.0",
|
||||
"encodeurl": "~2.0.0",
|
||||
"escape-html": "~1.0.3",
|
||||
"etag": "~1.8.1",
|
||||
"finalhandler": "1.3.1",
|
||||
"fresh": "0.5.2",
|
||||
"http-errors": "2.0.0",
|
||||
"finalhandler": "~1.3.1",
|
||||
"fresh": "~0.5.2",
|
||||
"http-errors": "~2.0.0",
|
||||
"merge-descriptors": "1.0.3",
|
||||
"methods": "~1.1.2",
|
||||
"on-finished": "2.4.1",
|
||||
"on-finished": "~2.4.1",
|
||||
"parseurl": "~1.3.3",
|
||||
"path-to-regexp": "0.1.12",
|
||||
"path-to-regexp": "~0.1.12",
|
||||
"proxy-addr": "~2.0.7",
|
||||
"qs": "6.13.0",
|
||||
"qs": "~6.14.0",
|
||||
"range-parser": "~1.2.1",
|
||||
"safe-buffer": "5.2.1",
|
||||
"send": "0.19.0",
|
||||
"serve-static": "1.16.2",
|
||||
"send": "~0.19.0",
|
||||
"serve-static": "~1.16.2",
|
||||
"setprototypeof": "1.2.0",
|
||||
"statuses": "2.0.1",
|
||||
"statuses": "~2.0.1",
|
||||
"type-is": "~1.6.18",
|
||||
"utils-merge": "1.0.1",
|
||||
"vary": "~1.1.2"
|
||||
|
|
@ -7126,6 +7118,22 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/express/node_modules/qs": {
|
||||
"version": "6.14.0",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz",
|
||||
"integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"side-channel": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/extend": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
|
||||
|
|
@ -7348,7 +7356,6 @@
|
|||
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz",
|
||||
"integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==",
|
||||
"license": "ISC",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"cross-spawn": "^7.0.6",
|
||||
"signal-exit": "^4.0.1"
|
||||
|
|
@ -7365,7 +7372,6 @@
|
|||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
|
||||
"integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
|
||||
"license": "ISC",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
|
|
@ -7707,7 +7713,6 @@
|
|||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz",
|
||||
"integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==",
|
||||
"license": "ISC",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"foreground-child": "^3.1.0",
|
||||
"jackspeak": "^3.1.2",
|
||||
|
|
@ -7741,7 +7746,6 @@
|
|||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
|
||||
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0"
|
||||
}
|
||||
|
|
@ -7751,7 +7755,6 @@
|
|||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
|
||||
"integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
|
||||
"license": "ISC",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
},
|
||||
|
|
@ -7767,7 +7770,6 @@
|
|||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
|
||||
"integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
|
||||
"license": "ISC",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=16 || 14 >=14.17"
|
||||
}
|
||||
|
|
@ -8428,6 +8430,7 @@
|
|||
"integrity": "sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA==",
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/immer"
|
||||
|
|
@ -8455,7 +8458,6 @@
|
|||
"resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-2.0.0.tgz",
|
||||
"integrity": "sha512-yNZhyQYqXpkT0AKq3F3KLasUSK4fHvebNH5hOsKQw2dhGSALvQ4U0BqUc5suziKvydO5u5hgN2hy1RJaho8U5A==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"acorn": "^8.14.0",
|
||||
"acorn-import-attributes": "^1.9.5",
|
||||
|
|
@ -8488,6 +8490,7 @@
|
|||
"integrity": "sha512-vhhFrCodTHZAPPSdMYzLEbeI0Ug37R9j6yA0kLKok9kSK53lQtj/RJhEQJUjq6OwT4N33nxqSRd/7yXhEhVPIw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@alcalzone/ansi-tokenize": "^0.1.3",
|
||||
"ansi-escapes": "^7.0.0",
|
||||
|
|
@ -9277,15 +9280,13 @@
|
|||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
|
||||
"license": "ISC",
|
||||
"peer": true
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/jackspeak": {
|
||||
"version": "3.4.3",
|
||||
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
|
||||
"integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",
|
||||
"license": "BlueOak-1.0.0",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@isaacs/cliui": "^8.0.2"
|
||||
},
|
||||
|
|
@ -9329,6 +9330,7 @@
|
|||
"integrity": "sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">= 10.16.0"
|
||||
}
|
||||
|
|
@ -9445,6 +9447,7 @@
|
|||
"resolved": "https://registry.npmjs.org/kysely/-/kysely-0.27.6.tgz",
|
||||
"integrity": "sha512-FIyV/64EkKhJmjgC0g2hygpBv5RNWVPyNCqSAD7eTCv6eFWNIi4PN1UvdSJGicN/o35bnevgis4Y0UDC0qi8jQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
|
|
@ -11324,8 +11327,7 @@
|
|||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
|
||||
"integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
|
||||
"license": "BlueOak-1.0.0",
|
||||
"peer": true
|
||||
"license": "BlueOak-1.0.0"
|
||||
},
|
||||
"node_modules/parent-module": {
|
||||
"version": "1.0.1",
|
||||
|
|
@ -11443,7 +11445,6 @@
|
|||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
||||
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
|
|
@ -11459,7 +11460,6 @@
|
|||
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
|
||||
"integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
|
||||
"license": "BlueOak-1.0.0",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"lru-cache": "^10.2.0",
|
||||
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
|
||||
|
|
@ -11475,8 +11475,7 @@
|
|||
"version": "10.4.3",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",
|
||||
"integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",
|
||||
"license": "ISC",
|
||||
"peer": true
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/path-to-regexp": {
|
||||
"version": "0.1.12",
|
||||
|
|
@ -11791,6 +11790,7 @@
|
|||
"resolved": "https://registry.npmjs.org/react/-/react-19.1.1.tgz",
|
||||
"integrity": "sha512-w8nqGImo45dmMIfljjMwOGtbmC/mk4CMYhWIicdSflH91J9TyCyczcPFXJzrZ/ZXcgGRFeP6BU0BEJTw6tZdfQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
|
|
@ -11812,8 +11812,7 @@
|
|||
"version": "0.26.0",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.26.0.tgz",
|
||||
"integrity": "sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==",
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/react-reconciler": {
|
||||
"version": "0.32.0",
|
||||
|
|
@ -12255,7 +12254,6 @@
|
|||
"resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
|
||||
"integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"debug": "^4.3.5",
|
||||
"module-details-from-path": "^1.0.3"
|
||||
|
|
@ -12712,7 +12710,6 @@
|
|||
"resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz",
|
||||
"integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==",
|
||||
"license": "(MIT AND BSD-3-Clause)",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.4",
|
||||
"safe-buffer": "^5.2.1",
|
||||
|
|
@ -12773,7 +12770,6 @@
|
|||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"shebang-regex": "^3.0.0"
|
||||
},
|
||||
|
|
@ -12786,7 +12782,6 @@
|
|||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
|
||||
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
|
|
@ -13161,7 +13156,6 @@
|
|||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
|
|
@ -13250,7 +13244,6 @@
|
|||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"emoji-regex": "^8.0.0",
|
||||
"is-fullwidth-code-point": "^3.0.0",
|
||||
|
|
@ -13265,7 +13258,6 @@
|
|||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
|
|
@ -13274,15 +13266,13 @@
|
|||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
||||
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
|
|
@ -13292,7 +13282,6 @@
|
|||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"ansi-regex": "^5.0.1"
|
||||
},
|
||||
|
|
@ -13395,7 +13384,6 @@
|
|||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"ansi-regex": "^5.0.1"
|
||||
},
|
||||
|
|
@ -13408,7 +13396,6 @@
|
|||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
|
|
@ -13543,7 +13530,6 @@
|
|||
"resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.2.tgz",
|
||||
"integrity": "sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"isarray": "^2.0.5",
|
||||
"safe-buffer": "^5.2.1",
|
||||
|
|
@ -13731,7 +13717,6 @@
|
|||
"resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.3.27.tgz",
|
||||
"integrity": "sha512-pNV1bn+1n8qEe8tUNsNdD8ejuPcMAg47u2lUGnbsajiNUr3p2Js1XLKQjBMH0yMRMDfdX8T+fIRejFmIwy9x4A==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@sqltools/formatter": "^1.2.5",
|
||||
"ansis": "^3.17.0",
|
||||
|
|
@ -13848,7 +13833,6 @@
|
|||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"base64-js": "^1.3.1",
|
||||
"ieee754": "^1.2.1"
|
||||
|
|
@ -13858,8 +13842,7 @@
|
|||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
||||
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
||||
"license": "0BSD",
|
||||
"peer": true
|
||||
"license": "0BSD"
|
||||
},
|
||||
"node_modules/unbox-primitive": {
|
||||
"version": "1.1.0",
|
||||
|
|
@ -13903,6 +13886,7 @@
|
|||
"integrity": "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/unist": "^3.0.0",
|
||||
"bail": "^2.0.0",
|
||||
|
|
@ -14170,7 +14154,6 @@
|
|||
"https://github.com/sponsors/ctavan"
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"uuid": "dist/esm/bin/uuid"
|
||||
}
|
||||
|
|
@ -14279,7 +14262,6 @@
|
|||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
||||
"license": "ISC",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"isexe": "^2.0.0"
|
||||
},
|
||||
|
|
@ -14424,7 +14406,6 @@
|
|||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
||||
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"ansi-styles": "^4.0.0",
|
||||
"string-width": "^4.1.0",
|
||||
|
|
@ -14442,7 +14423,6 @@
|
|||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
|
|
@ -14452,7 +14432,6 @@
|
|||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"color-convert": "^2.0.1"
|
||||
},
|
||||
|
|
@ -14467,15 +14446,13 @@
|
|||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
||||
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
|
|
@ -14485,7 +14462,6 @@
|
|||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"emoji-regex": "^8.0.0",
|
||||
"is-fullwidth-code-point": "^3.0.0",
|
||||
|
|
@ -14500,7 +14476,6 @@
|
|||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"ansi-regex": "^5.0.1"
|
||||
},
|
||||
|
|
@ -14520,6 +14495,7 @@
|
|||
"integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
|
|
@ -14702,6 +14678,7 @@
|
|||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.75.tgz",
|
||||
"integrity": "sha512-OhpzAmVzabPOL6C3A3gpAifqr9MqihV/Msx3gor2b2kviCgcb+HM9SEOpMWwwNp9MRunWnhtAKUoo0AHhjyPPg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,11 +40,20 @@ This document captures the responsibilities for both the CLI and backend compone
|
|||
- Resolve `storageId` into the desired S3 prefix (e.g., `sessions/<org>/<storageId>/`).
|
||||
- Generate two short-lived pre-signed `PUT` URLs: one for `session.json`, one for `diff.txt`.
|
||||
- Return both URLs and their keys in the response payload described above.
|
||||
- **Expiration**: The initial implementation can hand out URLs with a generous TTL (e.g., 60 minutes). Later we will add CLI-side refresh logic before expiry.
|
||||
- **Expiration**: URLs are issued with a 60-minute TTL. The CLI automatically refreshes them before expiry (see URL Refresh Strategy below).
|
||||
|
||||
## URL Refresh Strategy
|
||||
|
||||
Pre-signed URLs are automatically refreshed using a dual-strategy approach:
|
||||
|
||||
1. **Proactive Refresh**: URLs are refreshed at the 50-minute mark (10 minutes before expiry) to prevent disruption
|
||||
2. **Reactive Refresh**: If a 403 Forbidden error is detected (indicating expired URLs), an immediate refresh is triggered
|
||||
3. **Error Handling**: Upload errors are logged but non-fatal; the service continues running with automatic recovery
|
||||
|
||||
This ensures continuous operation during devbox suspension, network interruptions, and clock drift.
|
||||
|
||||
## Open Questions & Future Enhancements
|
||||
|
||||
- **URL refresh**: When the presigned URLs expire we currently have no refresh cycle. We'd need either a renewal endpoint or to re-call the existing endpoint on failure.
|
||||
- **Upload cadence**: The 30-second interval is hard-coded for now. Consider making it configurable in both CLI and backend policies.
|
||||
- **Error telemetry**: Decide if repeated upload failures should trip analytics or circuit breakers.
|
||||
- **Diff source**: `diff.txt` currently mirrors the `/diff` endpoint response. Confirm backend expectations for format and size limits.
|
||||
|
|
|
|||
300
extensions/cli/package-lock.json
generated
300
extensions/cli/package-lock.json
generated
|
|
@ -11,6 +11,7 @@
|
|||
"dependencies": {
|
||||
"@sentry/profiling-node": "^9.43.0",
|
||||
"fdir": "^6.4.2",
|
||||
"find-up": "^8.0.0",
|
||||
"fzf": "^0.5.2",
|
||||
"js-yaml": "^4.1.1"
|
||||
},
|
||||
|
|
@ -267,7 +268,7 @@
|
|||
},
|
||||
"../../packages/openai-adapters": {
|
||||
"name": "@continuedev/openai-adapters",
|
||||
"version": "1.15.0",
|
||||
"version": "1.32.0",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
|
|
@ -275,8 +276,8 @@
|
|||
"@aws-sdk/client-bedrock-runtime": "^3.842.0",
|
||||
"@aws-sdk/credential-providers": "^3.913.0",
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"@continuedev/config-yaml": "^1.29.0",
|
||||
"@continuedev/fetch": "^1.5.0",
|
||||
"@continuedev/config-yaml": "^1.36.0",
|
||||
"@continuedev/fetch": "^1.6.0",
|
||||
"dotenv": "^16.5.0",
|
||||
"google-auth-library": "^10.4.1",
|
||||
"json-schema": "^0.4.0",
|
||||
|
|
@ -515,6 +516,7 @@
|
|||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
|
|
@ -538,6 +540,7 @@
|
|||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
|
|
@ -1754,6 +1757,7 @@
|
|||
"integrity": "sha512-oNXsh2ywth5aowwIa7RKtawnkdH6LgU1ztfP9AIUCQCvzysB+WeU8o2kyyosDPwBZutPpjZDKPQGIzzrfTWweQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@octokit/auth-token": "^6.0.0",
|
||||
"@octokit/graphql": "^9.0.1",
|
||||
|
|
@ -1924,6 +1928,7 @@
|
|||
"resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz",
|
||||
"integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
}
|
||||
|
|
@ -1945,6 +1950,7 @@
|
|||
"resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.0.1.tgz",
|
||||
"integrity": "sha512-XuY23lSI3d4PEqKA+7SLtAgwqIfc6E/E9eAQWLN1vlpC53ybO3o6jW4BsXo1xvz9lYyyWItfQDDLzezER01mCw==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": "^18.19.0 || >=20.6.0"
|
||||
},
|
||||
|
|
@ -1957,6 +1963,7 @@
|
|||
"resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
|
||||
"integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@opentelemetry/semantic-conventions": "^1.29.0"
|
||||
},
|
||||
|
|
@ -2198,6 +2205,7 @@
|
|||
"resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.203.0.tgz",
|
||||
"integrity": "sha512-ke1qyM+3AK2zPuBPb6Hk/GCsc5ewbLvPNkEuELx/JmANeEp6ZjnZ+wypPAJSucTw0wvCGrUaibDSdcrGFoWxKQ==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@opentelemetry/api-logs": "0.203.0",
|
||||
"import-in-the-middle": "^1.8.1",
|
||||
|
|
@ -3514,6 +3522,7 @@
|
|||
"resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz",
|
||||
"integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@opentelemetry/core": "2.0.1",
|
||||
"@opentelemetry/semantic-conventions": "^1.29.0"
|
||||
|
|
@ -3602,6 +3611,7 @@
|
|||
"resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz",
|
||||
"integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@opentelemetry/core": "2.0.1",
|
||||
"@opentelemetry/resources": "2.0.1",
|
||||
|
|
@ -3637,6 +3647,7 @@
|
|||
"resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.36.0.tgz",
|
||||
"integrity": "sha512-TtxJSRD8Ohxp6bKkhrm27JRHAxPczQA7idtcTOMYI+wQRRrfgqxHv1cFbCApcSnNjtXkmzFozn6jQtFrOmbjPQ==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
|
|
@ -5047,8 +5058,7 @@
|
|||
"resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz",
|
||||
"integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/body-parser": {
|
||||
"version": "1.19.6",
|
||||
|
|
@ -5336,6 +5346,7 @@
|
|||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz",
|
||||
"integrity": "sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~7.10.0"
|
||||
}
|
||||
|
|
@ -5405,6 +5416,7 @@
|
|||
"integrity": "sha512-lr3jdBw/BGj49Eps7EvqlUaoeA0xpj3pc0RoJkHpYaCHkVK7i28dKyImLQb3JVlqs3aYSXf7qYuWOW/fgZnTXQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"csstype": "^3.0.2"
|
||||
}
|
||||
|
|
@ -5526,6 +5538,7 @@
|
|||
"integrity": "sha512-w/EboPlBwnmOBtRbiOvzjD+wdiZdgFeo17lkltrtn7X37vagKKWJABvyfsJXTlHe6XBzugmYgd4A4nW+k8Mixw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.10.0",
|
||||
"@typescript-eslint/scope-manager": "8.40.0",
|
||||
|
|
@ -5556,6 +5569,7 @@
|
|||
"integrity": "sha512-jCNyAuXx8dr5KJMkecGmZ8KI61KBUhkCob+SD+C+I5+Y1FWI2Y3QmY4/cxMCC5WAsZqoEtEETVhUiUMIGCf6Bw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "8.40.0",
|
||||
"@typescript-eslint/types": "8.40.0",
|
||||
|
|
@ -6156,6 +6170,7 @@
|
|||
"integrity": "sha512-hGISOaP18plkzbWEcP/QvtRW1xDXF2+96HbEX6byqQhAUbiS5oH6/9JwW+QsQCIYON2bI6QZBF+2PvOmrRZ9wA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@vitest/utils": "3.2.4",
|
||||
"fflate": "^0.8.2",
|
||||
|
|
@ -6236,6 +6251,7 @@
|
|||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
|
||||
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"acorn": "bin/acorn"
|
||||
},
|
||||
|
|
@ -6401,7 +6417,6 @@
|
|||
"integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"dequal": "^2.0.3"
|
||||
}
|
||||
|
|
@ -6655,24 +6670,45 @@
|
|||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/body-parser": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz",
|
||||
"integrity": "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==",
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.1.tgz",
|
||||
"integrity": "sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bytes": "^3.1.2",
|
||||
"content-type": "^1.0.5",
|
||||
"debug": "^4.4.0",
|
||||
"debug": "^4.4.3",
|
||||
"http-errors": "^2.0.0",
|
||||
"iconv-lite": "^0.6.3",
|
||||
"iconv-lite": "^0.7.0",
|
||||
"on-finished": "^2.4.1",
|
||||
"qs": "^6.14.0",
|
||||
"raw-body": "^3.0.0",
|
||||
"type-is": "^2.0.0"
|
||||
"raw-body": "^3.0.1",
|
||||
"type-is": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/body-parser/node_modules/iconv-lite": {
|
||||
"version": "0.7.0",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz",
|
||||
"integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/bottleneck": {
|
||||
|
|
@ -8020,9 +8056,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
|
||||
"integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
|
||||
"version": "4.4.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
|
||||
"integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "^2.1.3"
|
||||
|
|
@ -8254,8 +8290,7 @@
|
|||
"resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz",
|
||||
"integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/dot-prop": {
|
||||
"version": "5.3.0",
|
||||
|
|
@ -8796,6 +8831,7 @@
|
|||
"integrity": "sha512-TS9bTNIryDzStCpJN93aC5VRSW3uTx9sClUn4B87pwiCaJh220otoI0X8mJKr+VcPtniMdN8GKjlwgWGUv5ZKA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@eslint-community/regexpp": "^4.12.1",
|
||||
|
|
@ -8967,6 +9003,7 @@
|
|||
"integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@rtsao/scc": "^1.1.0",
|
||||
"array-includes": "^3.1.9",
|
||||
|
|
@ -9140,6 +9177,23 @@
|
|||
"url": "https://opencollective.com/eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/find-up": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
|
||||
"integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"locate-path": "^6.0.0",
|
||||
"path-exists": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/ignore": {
|
||||
"version": "5.3.2",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
|
||||
|
|
@ -9150,6 +9204,22 @@
|
|||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/locate-path": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
|
||||
"integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"p-locate": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
|
|
@ -9163,6 +9233,51 @@
|
|||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/p-limit": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
||||
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"yocto-queue": "^0.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/p-locate": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
|
||||
"integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"p-limit": "^3.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/yocto-queue": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||
"integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/espree": {
|
||||
"version": "10.4.0",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz",
|
||||
|
|
@ -9331,19 +9446,21 @@
|
|||
}
|
||||
},
|
||||
"node_modules/express": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz",
|
||||
"integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==",
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
|
||||
"integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"accepts": "^2.0.0",
|
||||
"body-parser": "^2.2.0",
|
||||
"body-parser": "^2.2.1",
|
||||
"content-disposition": "^1.0.0",
|
||||
"content-type": "^1.0.5",
|
||||
"cookie": "^0.7.1",
|
||||
"cookie-signature": "^1.2.1",
|
||||
"debug": "^4.4.0",
|
||||
"depd": "^2.0.0",
|
||||
"encodeurl": "^2.0.0",
|
||||
"escape-html": "^1.0.3",
|
||||
"etag": "^1.8.1",
|
||||
|
|
@ -9590,17 +9707,16 @@
|
|||
}
|
||||
},
|
||||
"node_modules/find-up": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
|
||||
"integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
|
||||
"dev": true,
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-8.0.0.tgz",
|
||||
"integrity": "sha512-JGG8pvDi2C+JxidYdIwQDyS/CgcrIdh18cvgxcBge3wSHRQOrooMD3GlFBcmMJAN9M42SAZjDp5zv1dglJjwww==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"locate-path": "^6.0.0",
|
||||
"path-exists": "^4.0.0"
|
||||
"locate-path": "^8.0.0",
|
||||
"unicorn-magic": "^0.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
"node": ">=20"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
|
|
@ -10409,30 +10525,24 @@
|
|||
}
|
||||
},
|
||||
"node_modules/http-errors": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
|
||||
"integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
|
||||
"integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"depd": "2.0.0",
|
||||
"inherits": "2.0.4",
|
||||
"setprototypeof": "1.2.0",
|
||||
"statuses": "2.0.1",
|
||||
"toidentifier": "1.0.1"
|
||||
"depd": "~2.0.0",
|
||||
"inherits": "~2.0.4",
|
||||
"setprototypeof": "~1.2.0",
|
||||
"statuses": "~2.0.2",
|
||||
"toidentifier": "~1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/http-errors/node_modules/statuses": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
|
||||
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/http-proxy-agent": {
|
||||
|
|
@ -11773,16 +11883,15 @@
|
|||
}
|
||||
},
|
||||
"node_modules/locate-path": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
|
||||
"integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
|
||||
"dev": true,
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-8.0.0.tgz",
|
||||
"integrity": "sha512-XT9ewWAC43tiAV7xDAPflMkG0qOPn2QjHqlgX8FOqmWa/rxnyYDulF9T0F7tRy1u+TVTmK/M//6VIOye+2zDXg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"p-locate": "^5.0.0"
|
||||
"p-locate": "^6.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
"node": ">=20"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
|
|
@ -11922,7 +12031,6 @@
|
|||
"integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"lz-string": "bin/bin.js"
|
||||
}
|
||||
|
|
@ -11950,6 +12058,7 @@
|
|||
"integrity": "sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"marked": "bin/marked.js"
|
||||
},
|
||||
|
|
@ -14857,6 +14966,7 @@
|
|||
"dev": true,
|
||||
"inBundle": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
|
|
@ -15467,32 +15577,30 @@
|
|||
}
|
||||
},
|
||||
"node_modules/p-limit": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
||||
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
|
||||
"dev": true,
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz",
|
||||
"integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"yocto-queue": "^0.1.0"
|
||||
"yocto-queue": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/p-locate": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
|
||||
"integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
|
||||
"dev": true,
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz",
|
||||
"integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"p-limit": "^3.0.2"
|
||||
"p-limit": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
|
|
@ -15773,6 +15881,7 @@
|
|||
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
|
|
@ -15994,6 +16103,7 @@
|
|||
"integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
|
|
@ -16097,7 +16207,6 @@
|
|||
"integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"ansi-regex": "^5.0.1",
|
||||
"ansi-styles": "^5.0.0",
|
||||
|
|
@ -16113,7 +16222,6 @@
|
|||
"integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
|
|
@ -16278,19 +16386,36 @@
|
|||
}
|
||||
},
|
||||
"node_modules/raw-body": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz",
|
||||
"integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==",
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz",
|
||||
"integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bytes": "3.1.2",
|
||||
"http-errors": "2.0.0",
|
||||
"iconv-lite": "0.6.3",
|
||||
"unpipe": "1.0.0"
|
||||
"bytes": "~3.1.2",
|
||||
"http-errors": "~2.0.1",
|
||||
"iconv-lite": "~0.7.0",
|
||||
"unpipe": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/raw-body/node_modules/iconv-lite": {
|
||||
"version": "0.7.0",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz",
|
||||
"integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/rc": {
|
||||
|
|
@ -16325,6 +16450,7 @@
|
|||
"integrity": "sha512-w8nqGImo45dmMIfljjMwOGtbmC/mk4CMYhWIicdSflH91J9TyCyczcPFXJzrZ/ZXcgGRFeP6BU0BEJTw6tZdfQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
|
|
@ -16348,8 +16474,7 @@
|
|||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
|
||||
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/react-reconciler": {
|
||||
"version": "0.32.0",
|
||||
|
|
@ -16831,6 +16956,7 @@
|
|||
"integrity": "sha512-g7RssbTAbir1k/S7uSwSVZFfFXwpomUB9Oas0+xi9KStSCmeDXcA7rNhiskjLqvUe/Evhx8fVCT16OSa34eM5g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@semantic-release/commit-analyzer": "^13.0.0-beta.1",
|
||||
"@semantic-release/error": "^4.0.0",
|
||||
|
|
@ -18363,6 +18489,7 @@
|
|||
"integrity": "sha512-yyxBKfORQ7LuRt/BQKBXrpcq59ZvSW0XxwfjAt3w2/8PmdxaFzijtMhTawprSHhpzeM5BgU2hXHG3lklIERZXg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"esbuild": "~0.25.0",
|
||||
"get-tsconfig": "^4.7.5"
|
||||
|
|
@ -18512,6 +18639,7 @@
|
|||
"integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
|
|
@ -18573,7 +18701,6 @@
|
|||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz",
|
||||
"integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
|
|
@ -18632,6 +18759,7 @@
|
|||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"napi-postinstall": "^0.3.0"
|
||||
},
|
||||
|
|
@ -18745,6 +18873,7 @@
|
|||
"integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.25.0",
|
||||
"fdir": "^6.4.4",
|
||||
|
|
@ -18843,6 +18972,7 @@
|
|||
"integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/chai": "^5.2.2",
|
||||
"@vitest/expect": "3.2.4",
|
||||
|
|
@ -19378,6 +19508,7 @@
|
|||
"integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
|
|
@ -19452,6 +19583,7 @@
|
|||
"integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"yaml": "bin.mjs"
|
||||
},
|
||||
|
|
@ -19544,13 +19676,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/yocto-queue": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||
"integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
|
||||
"dev": true,
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz",
|
||||
"integrity": "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
"node": ">=12.20"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
|
|
@ -19582,6 +19713,7 @@
|
|||
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
"dependencies": {
|
||||
"@sentry/profiling-node": "^9.43.0",
|
||||
"fdir": "^6.4.2",
|
||||
"find-up": "^8.0.0",
|
||||
"fzf": "^0.5.2",
|
||||
"js-yaml": "^4.1.1"
|
||||
},
|
||||
|
|
@ -87,6 +88,7 @@
|
|||
"@vitest/ui": "^3.2.4",
|
||||
"@workos-inc/node": "^7.45.0",
|
||||
"chalk": "^5.4.1",
|
||||
"clipboardy": "^4.0.0",
|
||||
"commander": "^14.0.0",
|
||||
"conventional-changelog-conventionalcommits": "^9.1.0",
|
||||
"core": "file:../../core",
|
||||
|
|
@ -100,7 +102,6 @@
|
|||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-unused-imports": "^4.1.4",
|
||||
"execa": "^9.6.0",
|
||||
"clipboardy": "^4.0.0",
|
||||
"express": "^5.1.0",
|
||||
"glob": "^11.0.3",
|
||||
"gpt-tokenizer": "^3.0.1",
|
||||
|
|
|
|||
|
|
@ -4,6 +4,24 @@
|
|||
|
||||
Model Context Protocol is a protocol for giving models access to resources and tools. MCP servers can run locally (stdio) or be remote (http/streamable/etc). See https://modelcontextprotocol.io/specification. The Continue CLI uses MCP to extend model's capabilities with MCP prompts and tools. MCP server configurations are stored in the `mcpServers` field of an assistant/config.yaml configuration.
|
||||
|
||||
## Secret Resolution
|
||||
|
||||
MCP server configurations often require secrets (API keys, tokens, etc.) referenced using template variables like `${{ secrets.API_KEY }}`. The CLI resolves these secrets in the following order:
|
||||
|
||||
1. **Organization/Package Secrets**: First attempts to resolve secrets through the Continue API for organization or package-level secrets
|
||||
2. **Local Environment Variables**: Falls back to local environment variables if:
|
||||
- The API secret exists but isn't accessible locally (e.g., in devboxes or restricted environments)
|
||||
- The secret isn't found in organization/package secrets
|
||||
|
||||
Local environment variables are checked in this priority order:
|
||||
|
||||
- `process.env` (runtime environment variables)
|
||||
- `~/.continue/.env`
|
||||
- `<workspace>/.continue/.env`
|
||||
- `<workspace>/.env`
|
||||
|
||||
This fallback mechanism ensures MCP servers can start successfully in environments where organization secrets aren't accessible, such as development containers or CI/CD pipelines, by allowing environment variables to provide the required credentials.
|
||||
|
||||
## MCP Service
|
||||
|
||||
The CLI has an MCP Service should manage connections to MCP servers and provide state to the terminal app regarding MCP server connections.
|
||||
|
|
|
|||
|
|
@ -105,9 +105,10 @@ export class CLIPlatformClient implements PlatformClient {
|
|||
},
|
||||
});
|
||||
|
||||
// Merge API results into our results array
|
||||
// Merge API results into our results array - but only if they have an actual value
|
||||
// API can return found=true for secrets that exist but aren't accessible locally
|
||||
for (let i = 0; i < apiResults.length; i++) {
|
||||
if (apiResults[i]?.found) {
|
||||
if (apiResults[i]?.found && "value" in apiResults[i]) {
|
||||
results[i] = apiResults[i];
|
||||
}
|
||||
}
|
||||
|
|
@ -119,9 +120,10 @@ export class CLIPlatformClient implements PlatformClient {
|
|||
);
|
||||
}
|
||||
|
||||
// For any secret that wasn't found via API, look in local .env files
|
||||
// For any secret without a value (not just "not found"), look in local .env files
|
||||
// This allows environment variables to override org/package secrets that aren't accessible
|
||||
for (let i = 0; i < fqsns.length; i++) {
|
||||
if (!results[i]?.found) {
|
||||
if (!results[i] || !("value" in results[i]!)) {
|
||||
const secretFromEnv = this.findSecretInLocalEnvFiles(fqsns[i]);
|
||||
if (secretFromEnv?.found) {
|
||||
results[i] = secretFromEnv;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import { prependPrompt } from "src/util/promptProcessor.js";
|
|||
import { getAccessToken, getAssistantSlug } from "../auth/workos.js";
|
||||
import { runEnvironmentInstallSafe } from "../environment/environmentHandler.js";
|
||||
import { processCommandFlags } from "../flags/flagProcessor.js";
|
||||
import { setAgentId } from "../index.js";
|
||||
import { toolPermissionManager } from "../permissions/permissionManager.js";
|
||||
import {
|
||||
getService,
|
||||
|
|
@ -27,7 +28,7 @@ import { messageQueue } from "../stream/messageQueue.js";
|
|||
import { constructSystemMessage } from "../systemMessage.js";
|
||||
import { telemetryService } from "../telemetry/telemetryService.js";
|
||||
import { reportFailureTool } from "../tools/reportFailure.js";
|
||||
import { gracefulExit } from "../util/exit.js";
|
||||
import { gracefulExit, updateAgentMetadata } from "../util/exit.js";
|
||||
import { formatError } from "../util/formatError.js";
|
||||
import { getGitDiffSnapshot } from "../util/git.js";
|
||||
import { logger } from "../util/logger.js";
|
||||
|
|
@ -50,6 +51,9 @@ interface ServeOptions extends ExtendedCommandOptions {
|
|||
export async function serve(prompt?: string, options: ServeOptions = {}) {
|
||||
await posthogService.capture("sessionStart", {});
|
||||
|
||||
// Set agent ID for error reporting if provided
|
||||
setAgentId(options.id);
|
||||
|
||||
// Check if prompt should come from stdin instead of parameter
|
||||
let actualPrompt = prompt;
|
||||
if (!prompt) {
|
||||
|
|
@ -351,9 +355,18 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
|
|||
}
|
||||
|
||||
// Give a moment for the response to be sent
|
||||
const handleExitResponse = () => {
|
||||
server.close(() => {
|
||||
const handleExitResponse = async () => {
|
||||
server.close(async () => {
|
||||
telemetryService.stopActiveTime();
|
||||
|
||||
// Update metadata one final time before exiting
|
||||
try {
|
||||
const history = services.chatHistory?.getHistory();
|
||||
await updateAgentMetadata(history);
|
||||
} catch (err) {
|
||||
logger.debug("Failed to update metadata (non-critical)", err as any);
|
||||
}
|
||||
|
||||
gracefulExit(0).catch((err) => {
|
||||
logger.error(`Graceful exit failed: ${formatError(err)}`);
|
||||
process.exit(1);
|
||||
|
|
@ -466,6 +479,18 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
|
|||
// No direct persistence here; ChatHistoryService handles persistence when appropriate
|
||||
|
||||
state.lastActivity = Date.now();
|
||||
|
||||
// Update metadata after successful agent turn
|
||||
try {
|
||||
const history = services.chatHistory?.getHistory();
|
||||
await updateAgentMetadata(history);
|
||||
} catch (metadataErr) {
|
||||
// Non-critical: log but don't fail the agent execution
|
||||
logger.debug(
|
||||
"Failed to update metadata after turn (non-critical)",
|
||||
metadataErr as any,
|
||||
);
|
||||
}
|
||||
} catch (e: any) {
|
||||
if (e.name === "AbortError") {
|
||||
logger.debug("Response interrupted");
|
||||
|
|
@ -522,8 +547,17 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
|
|||
);
|
||||
state.serverRunning = false;
|
||||
stopStorageSync();
|
||||
server.close(() => {
|
||||
server.close(async () => {
|
||||
telemetryService.stopActiveTime();
|
||||
|
||||
// Update metadata one final time before exiting
|
||||
try {
|
||||
const history = services.chatHistory?.getHistory();
|
||||
await updateAgentMetadata(history);
|
||||
} catch (err) {
|
||||
logger.debug("Failed to update metadata (non-critical)", err as any);
|
||||
}
|
||||
|
||||
gracefulExit(0).catch((err) => {
|
||||
logger.error(`Graceful exit failed: ${formatError(err)}`);
|
||||
process.exit(1);
|
||||
|
|
@ -545,8 +579,17 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
|
|||
clearInterval(inactivityChecker);
|
||||
inactivityChecker = null;
|
||||
}
|
||||
server.close(() => {
|
||||
server.close(async () => {
|
||||
telemetryService.stopActiveTime();
|
||||
|
||||
// Update metadata one final time before exiting
|
||||
try {
|
||||
const history = services.chatHistory?.getHistory();
|
||||
await updateAgentMetadata(history);
|
||||
} catch (err) {
|
||||
logger.debug("Failed to update metadata (non-critical)", err as any);
|
||||
}
|
||||
|
||||
gracefulExit(0).catch((err) => {
|
||||
logger.error(`Graceful exit failed: ${formatError(err)}`);
|
||||
process.exit(1);
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ describe("compaction infinite loop prevention", () => {
|
|||
]);
|
||||
|
||||
// This should not hang - it should break out of the loop
|
||||
const result = await compactChatHistory(history, mockModel, mockLlmApi, {});
|
||||
const result = await compactChatHistory(history, mockModel, mockLlmApi);
|
||||
|
||||
// Should complete successfully even though token count is still too high
|
||||
expect(result.compactedHistory).toBeDefined();
|
||||
|
|
@ -88,7 +88,7 @@ describe("compaction infinite loop prevention", () => {
|
|||
]);
|
||||
|
||||
// This should not hang
|
||||
const result = await compactChatHistory(history, mockModel, mockLlmApi, {});
|
||||
const result = await compactChatHistory(history, mockModel, mockLlmApi);
|
||||
|
||||
expect(result.compactedHistory).toBeDefined();
|
||||
});
|
||||
|
|
@ -129,7 +129,7 @@ describe("compaction infinite loop prevention", () => {
|
|||
{ role: "user", content: "Another question" },
|
||||
]);
|
||||
|
||||
const result = await compactChatHistory(history, mockModel, mockLlmApi, {});
|
||||
const result = await compactChatHistory(history, mockModel, mockLlmApi);
|
||||
|
||||
expect(result.compactedHistory).toBeDefined();
|
||||
// The function will call countTokens multiple times during the process
|
||||
|
|
|
|||
|
|
@ -385,8 +385,10 @@ describe("compaction", () => {
|
|||
]);
|
||||
|
||||
await compactChatHistory(history, mockModel, mockLlmApi, {
|
||||
onStreamContent,
|
||||
onStreamComplete,
|
||||
callbacks: {
|
||||
onStreamContent,
|
||||
onStreamComplete,
|
||||
},
|
||||
});
|
||||
|
||||
expect(onStreamContent).toHaveBeenCalledWith("Summary ");
|
||||
|
|
@ -406,7 +408,9 @@ describe("compaction", () => {
|
|||
]);
|
||||
|
||||
await expect(
|
||||
compactChatHistory(history, mockModel, mockLlmApi, { onError }),
|
||||
compactChatHistory(history, mockModel, mockLlmApi, {
|
||||
callbacks: { onError },
|
||||
}),
|
||||
).rejects.toThrow("Stream failed");
|
||||
|
||||
expect(onError).toHaveBeenCalledWith(mockError);
|
||||
|
|
|
|||
|
|
@ -22,22 +22,27 @@ export interface CompactionCallbacks {
|
|||
onError?: (error: Error) => void;
|
||||
}
|
||||
|
||||
export interface CompactionOptions {
|
||||
callbacks?: CompactionCallbacks;
|
||||
abortController?: AbortController;
|
||||
systemMessageTokens?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compacts a chat history into a summarized form
|
||||
* @param chatHistory The current chat history to compact
|
||||
* @param model The model configuration
|
||||
* @param llmApi The LLM API instance
|
||||
* @param callbacks Optional callbacks for streaming updates
|
||||
* @param abortController Optional abort controller for cancellation
|
||||
* @param options Optional configuration including callbacks, abort controller, and system message tokens
|
||||
* @returns The compacted history with compaction index
|
||||
*/
|
||||
export async function compactChatHistory(
|
||||
chatHistory: ChatHistoryItem[],
|
||||
model: ModelConfig,
|
||||
llmApi: BaseLlmApi,
|
||||
callbacks?: CompactionCallbacks,
|
||||
abortController?: AbortController,
|
||||
options?: CompactionOptions,
|
||||
): Promise<CompactionResult> {
|
||||
const { callbacks, abortController, systemMessageTokens = 0 } = options || {};
|
||||
// Create a prompt to summarize the conversation
|
||||
const compactionPrompt: ChatHistoryItem = {
|
||||
message: {
|
||||
|
|
@ -56,7 +61,19 @@ export async function compactChatHistory(
|
|||
const maxTokens = model.defaultCompletionOptions?.maxTokens;
|
||||
const reservedForOutput =
|
||||
maxTokens === undefined ? Math.ceil(contextLimit * 0.35) : maxTokens;
|
||||
const availableForInput = contextLimit - reservedForOutput;
|
||||
|
||||
// Check if system message is already in the history to avoid double-counting
|
||||
const hasSystemMessageInHistory = chatHistory.some(
|
||||
(item) => item.message.role === "system",
|
||||
);
|
||||
|
||||
// Account for system message (if not already in history) AND safety buffer
|
||||
const SAFETY_BUFFER = 100;
|
||||
const systemMessageReservation = hasSystemMessageInHistory
|
||||
? 0
|
||||
: systemMessageTokens;
|
||||
const availableForInput =
|
||||
contextLimit - reservedForOutput - systemMessageReservation - SAFETY_BUFFER;
|
||||
|
||||
// Check if we need to prune to fit within context
|
||||
while (
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import { configureConsoleForHeadless, safeStderr } from "./init.js";
|
|||
import { sentryService } from "./sentry.js";
|
||||
import { addCommonOptions, mergeParentOptions } from "./shared-options.js";
|
||||
import { posthogService } from "./telemetry/posthogService.js";
|
||||
import { post } from "./util/apiClient.js";
|
||||
import { gracefulExit } from "./util/exit.js";
|
||||
import { logger } from "./util/logger.js";
|
||||
import { readStdinSync } from "./util/stdin.js";
|
||||
|
|
@ -31,6 +32,9 @@ let showExitMessage: boolean;
|
|||
let exitMessageCallback: (() => void) | null;
|
||||
let lastCtrlCTime: number;
|
||||
|
||||
// Agent ID for serve mode - set when serve command is invoked with --id
|
||||
let agentId: string | undefined;
|
||||
|
||||
// Initialize state immediately to avoid temporal dead zone issues with exported functions
|
||||
(function initializeTUIState() {
|
||||
tuiUnmount = null;
|
||||
|
|
@ -39,6 +43,11 @@ let lastCtrlCTime: number;
|
|||
lastCtrlCTime = 0;
|
||||
})();
|
||||
|
||||
// Set the agent ID for error reporting (called by serve command)
|
||||
export function setAgentId(id: string | undefined) {
|
||||
agentId = id;
|
||||
}
|
||||
|
||||
// Register TUI cleanup function for graceful shutdown
|
||||
export function setTUIUnmount(unmount: () => void) {
|
||||
tuiUnmount = unmount;
|
||||
|
|
@ -89,21 +98,67 @@ export function shouldShowExitMessage(): boolean {
|
|||
return showExitMessage;
|
||||
}
|
||||
|
||||
// Helper to report unhandled errors to the API when running in serve mode
|
||||
async function reportUnhandledErrorToApi(error: Error): Promise<void> {
|
||||
if (!agentId) {
|
||||
// Not running in serve mode with an agent ID, skip API reporting
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await post(`agents/${agentId}/status`, {
|
||||
status: "FAILED",
|
||||
errorMessage: `Unhandled error: ${error.message}`,
|
||||
});
|
||||
logger.debug(`Reported unhandled error to API for agent ${agentId}`);
|
||||
} catch (apiError) {
|
||||
// If API reporting fails, just log it - don't crash
|
||||
logger.debug(
|
||||
`Failed to report error to API: ${apiError instanceof Error ? apiError.message : String(apiError)}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Add global error handlers to prevent uncaught errors from crashing the process
|
||||
process.on("unhandledRejection", (reason, promise) => {
|
||||
logger.error("Unhandled Rejection at:", { promise, reason });
|
||||
sentryService.captureException(
|
||||
reason instanceof Error ? reason : new Error(String(reason)),
|
||||
{
|
||||
promise: String(promise),
|
||||
},
|
||||
);
|
||||
// Extract useful information from the reason
|
||||
const errorDetails = {
|
||||
promiseString: String(promise),
|
||||
reasonType: typeof reason,
|
||||
reasonConstructor: reason?.constructor?.name,
|
||||
};
|
||||
|
||||
// If reason is an Error, use it directly for better stack traces
|
||||
if (reason instanceof Error) {
|
||||
logger.error("Unhandled Promise Rejection", reason, errorDetails);
|
||||
// Report to API if running in serve mode
|
||||
reportUnhandledErrorToApi(reason).catch(() => {
|
||||
// Silently fail if API reporting errors - already logged in helper
|
||||
});
|
||||
} else {
|
||||
// Convert non-Error reasons to Error for consistent handling
|
||||
const error = new Error(`Unhandled rejection: ${String(reason)}`);
|
||||
logger.error("Unhandled Promise Rejection", error, {
|
||||
...errorDetails,
|
||||
originalReason: String(reason),
|
||||
});
|
||||
// Report to API if running in serve mode
|
||||
reportUnhandledErrorToApi(error).catch(() => {
|
||||
// Silently fail if API reporting errors - already logged in helper
|
||||
});
|
||||
}
|
||||
|
||||
// Note: Sentry capture is handled by logger.error() above
|
||||
// Don't exit the process, just log the error
|
||||
});
|
||||
|
||||
process.on("uncaughtException", (error) => {
|
||||
logger.error("Uncaught Exception:", error);
|
||||
sentryService.captureException(error);
|
||||
// Report to API if running in serve mode
|
||||
reportUnhandledErrorToApi(error).catch(() => {
|
||||
// Silently fail if API reporting errors - already logged in helper
|
||||
});
|
||||
// Note: Sentry capture is handled by logger.error() above
|
||||
// Don't exit the process, just log the error
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
import {
|
||||
decodeSecretLocation,
|
||||
getTemplateVariables,
|
||||
} from "@continuedev/config-yaml";
|
||||
import { decodeFQSN, getTemplateVariables } from "@continuedev/config-yaml";
|
||||
import { type AssistantConfig } from "@continuedev/sdk";
|
||||
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
||||
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
|
||||
|
|
@ -318,7 +315,7 @@ export class MCPService
|
|||
const vars = getTemplateVariables(JSON.stringify(serverConfig));
|
||||
const secretVars = vars.filter((v) => v.startsWith("secrets."));
|
||||
const unrendered = secretVars.map((v) => {
|
||||
return decodeSecretLocation(v.replace("secrets.", "")).secretName;
|
||||
return decodeFQSN(v.replace("secrets.", "")).secretName;
|
||||
});
|
||||
|
||||
try {
|
||||
|
|
@ -506,11 +503,33 @@ Org-level secrets can only be used for MCP by Background Agents (https://docs.co
|
|||
} catch (error: unknown) {
|
||||
// If token refresh didn't work and it's a 401, fall back to mcp-remote
|
||||
if (isAuthError(error) && !this.isHeadless) {
|
||||
// Build mcp-remote args with Supabase-specific OAuth scopes if needed
|
||||
const mcpRemoteArgs = ["-y", "mcp-remote", serverConfig.url];
|
||||
|
||||
// Detect Supabase MCP and add custom OAuth scopes
|
||||
if (serverConfig.url.includes("mcp.supabase.com")) {
|
||||
const supabaseScopes = [
|
||||
"organizations:read",
|
||||
"projects:read",
|
||||
"database:read",
|
||||
"analytics:read",
|
||||
"secrets:read",
|
||||
"edge_functions:read",
|
||||
"environment:read",
|
||||
"storage:read",
|
||||
].join(" ");
|
||||
|
||||
mcpRemoteArgs.push(
|
||||
"--static-oauth-client-metadata",
|
||||
JSON.stringify({ scope: supabaseScopes }),
|
||||
);
|
||||
}
|
||||
|
||||
const transport = this.constructStdioTransport(
|
||||
{
|
||||
name: serverConfig.name,
|
||||
command: "npx",
|
||||
args: ["-y", "mcp-remote", serverConfig.url],
|
||||
args: mcpRemoteArgs,
|
||||
},
|
||||
connection,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -276,4 +276,87 @@ describe("StorageSyncService", () => {
|
|||
|
||||
service.stop();
|
||||
});
|
||||
|
||||
it("refreshes URLs on 403 error", async () => {
|
||||
const syncSessionHistory = vi.fn();
|
||||
const getCompleteStateSnapshot = vi.fn().mockReturnValue({ test: "data" });
|
||||
|
||||
// Mock initial presign success
|
||||
fetchMock.mockResolvedValueOnce({
|
||||
ok: true,
|
||||
json: async () => ({
|
||||
session: { putUrl: "https://upload/session-old", key: "session.json" },
|
||||
diff: { putUrl: "https://upload/diff-old", key: "diff.txt" },
|
||||
}),
|
||||
});
|
||||
|
||||
// Mock 403 upload failure
|
||||
fetchMock.mockResolvedValueOnce({
|
||||
ok: false,
|
||||
status: 403,
|
||||
statusText: "Forbidden",
|
||||
text: async () => "Request has expired",
|
||||
});
|
||||
|
||||
// Mock refresh presign success
|
||||
fetchMock.mockResolvedValueOnce({
|
||||
ok: true,
|
||||
json: async () => ({
|
||||
session: { putUrl: "https://upload/session-new", key: "session.json" },
|
||||
diff: { putUrl: "https://upload/diff-new", key: "diff.txt" },
|
||||
}),
|
||||
});
|
||||
|
||||
gitDiffMock.mockResolvedValue({ diff: "test", repoFound: true });
|
||||
|
||||
const result = await service.startFromOptions({
|
||||
storageOption: "session-123",
|
||||
accessToken: "token",
|
||||
syncSessionHistory,
|
||||
getCompleteStateSnapshot,
|
||||
isActive: () => true,
|
||||
});
|
||||
|
||||
expect(result).toBe(true);
|
||||
|
||||
// Wait for async refresh
|
||||
await new Promise((resolve) => setTimeout(resolve, 100));
|
||||
|
||||
expect(fetchMock).toHaveBeenCalledTimes(3); // presign + failed upload + refresh
|
||||
expect(service.getState().isEnabled).toBe(true);
|
||||
|
||||
service.stop();
|
||||
});
|
||||
|
||||
it("prevents concurrent refresh requests", async () => {
|
||||
const syncSessionHistory = vi.fn();
|
||||
const getCompleteStateSnapshot = vi.fn().mockReturnValue({});
|
||||
|
||||
fetchMock.mockResolvedValue({
|
||||
ok: true,
|
||||
json: async () => ({
|
||||
session: { putUrl: "https://upload/session", key: "session.json" },
|
||||
diff: { putUrl: "https://upload/diff", key: "diff.txt" },
|
||||
}),
|
||||
});
|
||||
|
||||
await service.start({
|
||||
storageId: "session-123",
|
||||
accessToken: "token",
|
||||
syncSessionHistory,
|
||||
getCompleteStateSnapshot,
|
||||
});
|
||||
|
||||
const refreshMethod = (service as any).refreshStorageTargets.bind(service);
|
||||
const results = await Promise.all([
|
||||
refreshMethod(),
|
||||
refreshMethod(),
|
||||
refreshMethod(),
|
||||
]);
|
||||
|
||||
const successCount = results.filter((r) => r === true).length;
|
||||
expect(successCount).toBe(1); // Only first succeeds
|
||||
|
||||
service.stop();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@ export class StorageSyncService {
|
|||
private missingRepoLogged = false;
|
||||
private targets: StorageTargets | null = null;
|
||||
private options: StorageSyncStartOptions | null = null;
|
||||
private targetsExpiresAt: number | null = null;
|
||||
private refreshTimer: NodeJS.Timeout | null = null;
|
||||
private isRefreshing = false;
|
||||
|
||||
async initialize(): Promise<StorageSyncServiceState> {
|
||||
this.stop();
|
||||
|
|
@ -112,6 +115,7 @@ export class StorageSyncService {
|
|||
}
|
||||
|
||||
this.targets = targets;
|
||||
this.targetsExpiresAt = Date.now() + 60 * 60 * 1000; // Track 60-minute expiration
|
||||
this.options = options;
|
||||
this.stopped = false;
|
||||
this.uploadInFlight = false;
|
||||
|
|
@ -130,10 +134,17 @@ export class StorageSyncService {
|
|||
),
|
||||
);
|
||||
|
||||
// Schedule proactive URL refresh at 50-minute mark
|
||||
this.scheduleProactiveRefresh();
|
||||
|
||||
await this.performUpload();
|
||||
|
||||
this.intervalHandle = setInterval(() => {
|
||||
void this.performUpload();
|
||||
this.performUpload().catch((error) => {
|
||||
logger.warn(
|
||||
`Storage sync upload failed in interval: ${formatError(error)}`,
|
||||
);
|
||||
});
|
||||
}, intervalMs);
|
||||
|
||||
return true;
|
||||
|
|
@ -178,6 +189,7 @@ export class StorageSyncService {
|
|||
stop(): void {
|
||||
this.stopped = true;
|
||||
this.targets = null;
|
||||
this.targetsExpiresAt = null;
|
||||
this.options = null;
|
||||
this.uploadInFlight = false;
|
||||
|
||||
|
|
@ -186,6 +198,12 @@ export class StorageSyncService {
|
|||
this.intervalHandle = null;
|
||||
}
|
||||
|
||||
// Clear refresh timer
|
||||
if (this.refreshTimer) {
|
||||
clearTimeout(this.refreshTimer);
|
||||
this.refreshTimer = null;
|
||||
}
|
||||
|
||||
if (this.state.isEnabled) {
|
||||
this.setState({
|
||||
isEnabled: false,
|
||||
|
|
@ -245,6 +263,59 @@ export class StorageSyncService {
|
|||
}
|
||||
}
|
||||
|
||||
private async refreshStorageTargets(): Promise<boolean> {
|
||||
if (this.isRefreshing || !this.options) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.isRefreshing = true;
|
||||
logger.info("Refreshing storage pre-signed URLs...");
|
||||
|
||||
try {
|
||||
const newTargets = await this.requestStorageTargets(
|
||||
this.options.storageId,
|
||||
this.options.accessToken,
|
||||
);
|
||||
|
||||
if (!newTargets) {
|
||||
logger.warn(
|
||||
"Failed to refresh storage URLs - continuing with existing URLs",
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
this.targets = newTargets;
|
||||
this.targetsExpiresAt = Date.now() + 60 * 60 * 1000; // 60 minutes from now
|
||||
logger.info("Storage URLs refreshed successfully");
|
||||
|
||||
// Schedule next proactive refresh at 50-minute mark
|
||||
this.scheduleProactiveRefresh();
|
||||
|
||||
return true;
|
||||
} catch (error) {
|
||||
logger.warn(`Storage URL refresh error: ${formatError(error)}`);
|
||||
return false;
|
||||
} finally {
|
||||
this.isRefreshing = false;
|
||||
}
|
||||
}
|
||||
|
||||
private scheduleProactiveRefresh(): void {
|
||||
// Clear any existing refresh timer
|
||||
if (this.refreshTimer) {
|
||||
clearTimeout(this.refreshTimer);
|
||||
this.refreshTimer = null;
|
||||
}
|
||||
|
||||
// Schedule refresh at 50-minute mark (10 minutes before expiry)
|
||||
const refreshIn = 50 * 60 * 1000; // 50 minutes
|
||||
this.refreshTimer = setTimeout(() => {
|
||||
this.refreshStorageTargets().catch((error) => {
|
||||
logger.warn(`Proactive URL refresh failed: ${formatError(error)}`);
|
||||
});
|
||||
}, refreshIn);
|
||||
}
|
||||
|
||||
private async uploadToPresignedUrl(
|
||||
url: string,
|
||||
body: string,
|
||||
|
|
@ -271,6 +342,16 @@ export class StorageSyncService {
|
|||
if (!response.ok) {
|
||||
const statusText = `${response.status} ${response.statusText}`.trim();
|
||||
const responseBody = await response.text();
|
||||
|
||||
// Detect expired URL (403 Forbidden) and trigger refresh
|
||||
if (response.status === 403) {
|
||||
logger.warn("Storage URL expired (403), triggering refresh...");
|
||||
// Trigger async refresh without blocking the current upload error
|
||||
this.refreshStorageTargets().catch((error) => {
|
||||
logger.debug(`Background URL refresh failed: ${formatError(error)}`);
|
||||
});
|
||||
}
|
||||
|
||||
throw new Error(`Storage upload failed (${statusText}): ${responseBody}`);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ vi.mock("../session.js", () => ({
|
|||
vi.mock("../util/tokenizer.js", () => ({
|
||||
shouldAutoCompact: vi.fn(),
|
||||
getAutoCompactMessage: vi.fn(),
|
||||
countChatHistoryItemTokens: vi.fn(() => 100), // Mock return value
|
||||
}));
|
||||
|
||||
vi.mock("../util/formatError.js", () => ({
|
||||
|
|
@ -38,6 +39,17 @@ vi.mock("../util/logger.js", () => ({
|
|||
},
|
||||
}));
|
||||
|
||||
vi.mock("../services/index.js", () => ({
|
||||
services: {
|
||||
systemMessage: {
|
||||
getSystemMessage: vi.fn(() => Promise.resolve("System message")),
|
||||
},
|
||||
toolPermissions: {
|
||||
getState: vi.fn(() => ({ currentMode: "enabled" })),
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
vi.mock("os", async (importOriginal) => {
|
||||
const actual = (await importOriginal()) as object;
|
||||
return {
|
||||
|
|
@ -137,7 +149,10 @@ describe("handleAutoCompaction", () => {
|
|||
mockChatHistory,
|
||||
mockModel,
|
||||
mockLlmApi,
|
||||
expect.any(Object),
|
||||
expect.objectContaining({
|
||||
callbacks: expect.any(Object),
|
||||
systemMessageTokens: expect.any(Number),
|
||||
}),
|
||||
);
|
||||
expect(updateSessionHistory).toHaveBeenCalledWith(
|
||||
mockCompactionResult.compactedHistory,
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ interface AutoCompactionOptions {
|
|||
isHeadless?: boolean;
|
||||
format?: "json";
|
||||
callbacks?: AutoCompactionCallbacks;
|
||||
systemMessage?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -128,7 +129,11 @@ export async function handleAutoCompaction(
|
|||
compactionIndex: number | null;
|
||||
wasCompacted: boolean;
|
||||
}> {
|
||||
const { isHeadless = false, callbacks } = options;
|
||||
const {
|
||||
isHeadless = false,
|
||||
callbacks,
|
||||
systemMessage: providedSystemMessage,
|
||||
} = options;
|
||||
|
||||
if (!model || !shouldAutoCompact(chatHistory, model)) {
|
||||
return { chatHistory, compactionIndex: null, wasCompacted: false };
|
||||
|
|
@ -142,18 +147,38 @@ export async function handleAutoCompaction(
|
|||
notifyCompactionStart(getAutoCompactMessage(model), isHeadless, callbacks);
|
||||
|
||||
try {
|
||||
// Get system message to calculate its token count for compaction pruning
|
||||
// Use provided message if available, otherwise fetch it (for backward compatibility)
|
||||
const systemMessage =
|
||||
providedSystemMessage ??
|
||||
(async () => {
|
||||
const { services } = await import("../services/index.js");
|
||||
return services.systemMessage.getSystemMessage(
|
||||
services.toolPermissions.getState().currentMode,
|
||||
);
|
||||
})();
|
||||
const resolvedSystemMessage =
|
||||
typeof systemMessage === "string" ? systemMessage : await systemMessage;
|
||||
|
||||
const { countChatHistoryItemTokens } = await import("../util/tokenizer.js");
|
||||
const systemMessageTokens = countChatHistoryItemTokens({
|
||||
message: {
|
||||
role: "system",
|
||||
content: resolvedSystemMessage,
|
||||
},
|
||||
contextItems: [],
|
||||
});
|
||||
|
||||
// Compact the history
|
||||
const result = await compactChatHistory(
|
||||
chatHistory,
|
||||
model,
|
||||
llmApi,
|
||||
isHeadless
|
||||
const result = await compactChatHistory(chatHistory, model, llmApi, {
|
||||
callbacks: isHeadless
|
||||
? undefined
|
||||
: {
|
||||
onStreamContent: callbacks?.onContent,
|
||||
onStreamComplete: () => {},
|
||||
},
|
||||
);
|
||||
systemMessageTokens,
|
||||
});
|
||||
|
||||
// Save the compacted session
|
||||
updateSessionHistory(result.compactedHistory);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,324 @@
|
|||
import { ModelConfig } from "@continuedev/config-yaml";
|
||||
import { BaseLlmApi } from "@continuedev/openai-adapters";
|
||||
import type { ChatHistoryItem } from "core/index.js";
|
||||
import { convertToUnifiedHistory } from "core/util/messageConversion.js";
|
||||
import type { ChatCompletionChunk } from "openai/resources/chat/completions.mjs";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
import { streamChatResponse } from "./streamChatResponse.js";
|
||||
|
||||
// Mock all dependencies
|
||||
vi.mock("../compaction.js", () => ({
|
||||
compactChatHistory: vi.fn(),
|
||||
pruneLastMessage: vi.fn((history) => history.slice(0, -1)),
|
||||
}));
|
||||
|
||||
vi.mock("../session.js", () => ({
|
||||
updateSessionHistory: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock("../util/tokenizer.js", () => ({
|
||||
shouldAutoCompact: vi.fn(),
|
||||
getAutoCompactMessage: vi.fn(() => "Auto-compacting..."),
|
||||
countChatHistoryItemTokens: vi.fn(() => 100),
|
||||
validateContextLength: vi.fn(() => ({ isValid: true })),
|
||||
}));
|
||||
|
||||
vi.mock("../telemetry/telemetryService.js", () => ({
|
||||
telemetryService: {
|
||||
logApiRequest: vi.fn(),
|
||||
recordResponseTime: vi.fn(),
|
||||
recordTokenUsage: vi.fn(),
|
||||
recordCost: vi.fn(),
|
||||
},
|
||||
}));
|
||||
|
||||
vi.mock("../telemetry/posthogService.js", () => ({
|
||||
posthogService: {
|
||||
capture: vi.fn(),
|
||||
},
|
||||
}));
|
||||
|
||||
vi.mock("../util/logger.js", () => ({
|
||||
logger: {
|
||||
info: vi.fn(),
|
||||
debug: vi.fn(),
|
||||
error: vi.fn(),
|
||||
warn: vi.fn(),
|
||||
},
|
||||
}));
|
||||
|
||||
vi.mock("../services/index.js", () => ({
|
||||
services: {
|
||||
systemMessage: {
|
||||
getSystemMessage: vi.fn(() => Promise.resolve("System message")),
|
||||
},
|
||||
toolPermissions: {
|
||||
getState: vi.fn(() => ({ currentMode: "enabled" })),
|
||||
isHeadless: vi.fn(() => false),
|
||||
},
|
||||
chatHistory: {
|
||||
isReady: vi.fn(() => true),
|
||||
getHistory: vi.fn(() => []),
|
||||
setHistory: vi.fn(),
|
||||
addUserMessage: vi.fn(),
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
vi.mock("./handleToolCalls.js", () => ({
|
||||
handleToolCalls: vi.fn(() => Promise.resolve(false)),
|
||||
getRequestTools: vi.fn(() => Promise.resolve([])),
|
||||
}));
|
||||
|
||||
vi.mock("./streamChatResponse.compactionHelpers.js", () => ({
|
||||
handlePreApiCompaction: vi.fn((chatHistory) =>
|
||||
Promise.resolve({ chatHistory, wasCompacted: false }),
|
||||
),
|
||||
handlePostToolValidation: vi.fn((_, chatHistory) =>
|
||||
Promise.resolve({ chatHistory, wasCompacted: false }),
|
||||
),
|
||||
handleNormalAutoCompaction: vi.fn((chatHistory) =>
|
||||
Promise.resolve({ chatHistory, wasCompacted: false }),
|
||||
),
|
||||
}));
|
||||
|
||||
describe("streamChatResponse - auto-continuation after compaction", () => {
|
||||
const mockModel: ModelConfig = {
|
||||
provider: "openai",
|
||||
name: "gpt-4",
|
||||
model: "gpt-4",
|
||||
defaultCompletionOptions: {
|
||||
contextLength: 8192,
|
||||
maxTokens: 2048,
|
||||
},
|
||||
} as any;
|
||||
|
||||
let mockLlmApi: BaseLlmApi;
|
||||
let mockAbortController: AbortController;
|
||||
let chatHistory: ChatHistoryItem[];
|
||||
let chunks: ChatCompletionChunk[];
|
||||
let responseCount: number;
|
||||
|
||||
function contentChunk(content: string): ChatCompletionChunk {
|
||||
return {
|
||||
id: "test",
|
||||
object: "chat.completion.chunk",
|
||||
created: Date.now(),
|
||||
model: "test-model",
|
||||
choices: [
|
||||
{
|
||||
index: 0,
|
||||
delta: { content },
|
||||
finish_reason: null,
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
responseCount = 0;
|
||||
chunks = [contentChunk("Initial response")];
|
||||
chatHistory = convertToUnifiedHistory([{ role: "user", content: "Hello" }]);
|
||||
|
||||
mockLlmApi = {
|
||||
chatCompletionStream: vi.fn().mockImplementation(async function* () {
|
||||
responseCount++;
|
||||
for (const chunk of chunks) {
|
||||
yield chunk;
|
||||
}
|
||||
}),
|
||||
} as unknown as BaseLlmApi;
|
||||
|
||||
mockAbortController = {
|
||||
signal: { aborted: false },
|
||||
abort: vi.fn(),
|
||||
} as unknown as AbortController;
|
||||
});
|
||||
|
||||
it("should automatically continue after compaction when no tool calls remain", async () => {
|
||||
const { services } = await import("../services/index.js");
|
||||
const { handleNormalAutoCompaction } = await import(
|
||||
"./streamChatResponse.compactionHelpers.js"
|
||||
);
|
||||
const { logger } = await import("../util/logger.js");
|
||||
|
||||
// Track history modifications
|
||||
const historyUpdates: string[] = [];
|
||||
vi.mocked(services.chatHistory.addUserMessage).mockImplementation((msg) => {
|
||||
historyUpdates.push(msg);
|
||||
return {
|
||||
message: { role: "user", content: msg },
|
||||
contextItems: [],
|
||||
};
|
||||
});
|
||||
|
||||
// First call: compaction happens
|
||||
// Second call (after continuation): no compaction
|
||||
let compactionCallCount = 0;
|
||||
vi.mocked(handleNormalAutoCompaction).mockImplementation(() => {
|
||||
compactionCallCount++;
|
||||
return Promise.resolve({
|
||||
chatHistory,
|
||||
wasCompacted: compactionCallCount === 1, // Only first call has compaction
|
||||
});
|
||||
});
|
||||
|
||||
// Simulate: first response completes (no tool calls), triggering auto-continue
|
||||
let callCount = 0;
|
||||
mockLlmApi.chatCompletionStream = vi
|
||||
.fn()
|
||||
.mockImplementation(async function* () {
|
||||
callCount++;
|
||||
if (callCount === 1) {
|
||||
// First call: just content, no tool calls (shouldContinue = false)
|
||||
yield contentChunk("First response");
|
||||
} else if (callCount === 2) {
|
||||
// Second call: after auto-continuation
|
||||
yield contentChunk("Continued after compaction");
|
||||
}
|
||||
}) as any;
|
||||
|
||||
await streamChatResponse(
|
||||
chatHistory,
|
||||
mockModel,
|
||||
mockLlmApi,
|
||||
mockAbortController,
|
||||
);
|
||||
|
||||
// Verify "continue" message was added
|
||||
expect(historyUpdates).toContain("continue");
|
||||
|
||||
// Verify logging occurred
|
||||
expect(logger.debug).toHaveBeenCalledWith(
|
||||
"Auto-compaction occurred during this turn - automatically continuing session",
|
||||
);
|
||||
expect(logger.debug).toHaveBeenCalledWith(
|
||||
"Added continuation message after compaction",
|
||||
);
|
||||
|
||||
// Verify the LLM was called multiple times (continuing the conversation)
|
||||
expect(callCount).toBeGreaterThan(1);
|
||||
});
|
||||
|
||||
it("should not auto-continue if compaction occurs with tool calls pending", async () => {
|
||||
const { services } = await import("../services/index.js");
|
||||
const { handleNormalAutoCompaction } = await import(
|
||||
"./streamChatResponse.compactionHelpers.js"
|
||||
);
|
||||
const { handleToolCalls } = await import("./handleToolCalls.js");
|
||||
|
||||
const historyUpdates: string[] = [];
|
||||
vi.mocked(services.chatHistory.addUserMessage).mockImplementation((msg) => {
|
||||
historyUpdates.push(msg);
|
||||
return {
|
||||
message: { role: "user", content: msg },
|
||||
contextItems: [],
|
||||
};
|
||||
});
|
||||
|
||||
// Compaction happens
|
||||
vi.mocked(handleNormalAutoCompaction).mockResolvedValue({
|
||||
chatHistory,
|
||||
wasCompacted: true,
|
||||
});
|
||||
|
||||
// But tool calls are still being processed (shouldContinue = true)
|
||||
// This is simulated by having handleToolCalls return true (shouldReturn)
|
||||
vi.mocked(handleToolCalls).mockResolvedValue(true);
|
||||
|
||||
// Mock tool calls in response
|
||||
mockLlmApi.chatCompletionStream = vi
|
||||
.fn()
|
||||
.mockImplementation(async function* () {
|
||||
yield {
|
||||
id: "test",
|
||||
object: "chat.completion.chunk",
|
||||
created: Date.now(),
|
||||
model: "test-model",
|
||||
choices: [
|
||||
{
|
||||
index: 0,
|
||||
delta: {
|
||||
tool_calls: [
|
||||
{
|
||||
index: 0,
|
||||
id: "call_123",
|
||||
type: "function",
|
||||
function: {
|
||||
name: "ReadFile",
|
||||
arguments: '{"filepath": "/test"}',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
finish_reason: null,
|
||||
},
|
||||
],
|
||||
};
|
||||
}) as any;
|
||||
|
||||
await streamChatResponse(
|
||||
chatHistory,
|
||||
mockModel,
|
||||
mockLlmApi,
|
||||
mockAbortController,
|
||||
);
|
||||
|
||||
// Should NOT auto-continue because tool calls are pending
|
||||
expect(historyUpdates).not.toContain("continue");
|
||||
});
|
||||
|
||||
it("should not create infinite loops - flag is reset after continuation", async () => {
|
||||
const { services } = await import("../services/index.js");
|
||||
const { handleNormalAutoCompaction } = await import(
|
||||
"./streamChatResponse.compactionHelpers.js"
|
||||
);
|
||||
|
||||
const historyUpdates: string[] = [];
|
||||
vi.mocked(services.chatHistory.addUserMessage).mockImplementation((msg) => {
|
||||
historyUpdates.push(msg);
|
||||
return {
|
||||
message: { role: "user", content: msg },
|
||||
contextItems: [],
|
||||
};
|
||||
});
|
||||
|
||||
// Track calls - compaction happens on 1st turn, then again on 2nd turn
|
||||
let normalCompactionCallCount = 0;
|
||||
vi.mocked(handleNormalAutoCompaction).mockImplementation(() => {
|
||||
normalCompactionCallCount++;
|
||||
// Compaction happens on first two calls
|
||||
return Promise.resolve({
|
||||
chatHistory,
|
||||
wasCompacted: normalCompactionCallCount <= 1,
|
||||
});
|
||||
});
|
||||
|
||||
let streamCallCount = 0;
|
||||
mockLlmApi.chatCompletionStream = vi
|
||||
.fn()
|
||||
.mockImplementation(async function* () {
|
||||
streamCallCount++;
|
||||
yield contentChunk(`Response ${streamCallCount}`);
|
||||
}) as any;
|
||||
|
||||
await streamChatResponse(
|
||||
chatHistory,
|
||||
mockModel,
|
||||
mockLlmApi,
|
||||
mockAbortController,
|
||||
);
|
||||
|
||||
// Should only add "continue" once
|
||||
// The flag is reset after the first continuation
|
||||
const continueCount = historyUpdates.filter(
|
||||
(msg) => msg === "continue",
|
||||
).length;
|
||||
expect(continueCount).toBeLessThanOrEqual(1);
|
||||
|
||||
// Should have called the LLM at least once
|
||||
expect(streamCallCount).toBeGreaterThanOrEqual(1);
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,212 @@
|
|||
import { ModelConfig } from "@continuedev/config-yaml";
|
||||
import { BaseLlmApi } from "@continuedev/openai-adapters";
|
||||
import type { ChatHistoryItem } from "core/index.js";
|
||||
|
||||
import { services } from "../services/index.js";
|
||||
import { ToolCall } from "../tools/index.js";
|
||||
import { logger } from "../util/logger.js";
|
||||
import { validateContextLength } from "../util/tokenizer.js";
|
||||
|
||||
import { handleAutoCompaction } from "./streamChatResponse.autoCompaction.js";
|
||||
import { StreamCallbacks } from "./streamChatResponse.types.js";
|
||||
|
||||
export interface CompactionHelperOptions {
|
||||
model: ModelConfig;
|
||||
llmApi: BaseLlmApi;
|
||||
isCompacting: boolean;
|
||||
isHeadless: boolean;
|
||||
callbacks?: StreamCallbacks;
|
||||
systemMessage: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle pre-API auto-compaction if needed
|
||||
*/
|
||||
export async function handlePreApiCompaction(
|
||||
chatHistory: ChatHistoryItem[],
|
||||
options: CompactionHelperOptions,
|
||||
): Promise<{ chatHistory: ChatHistoryItem[]; wasCompacted: boolean }> {
|
||||
const { model, llmApi, isCompacting, isHeadless, callbacks, systemMessage } =
|
||||
options;
|
||||
|
||||
if (isCompacting) {
|
||||
return { chatHistory, wasCompacted: false };
|
||||
}
|
||||
|
||||
const { wasCompacted, chatHistory: preCompactHistory } =
|
||||
await handleAutoCompaction(chatHistory, model, llmApi, {
|
||||
isHeadless,
|
||||
callbacks: {
|
||||
onSystemMessage: callbacks?.onSystemMessage,
|
||||
onContent: callbacks?.onContent,
|
||||
},
|
||||
systemMessage,
|
||||
});
|
||||
|
||||
if (wasCompacted) {
|
||||
logger.debug("Pre-API compaction occurred, updating chat history");
|
||||
const chatHistorySvc = services.chatHistory;
|
||||
if (
|
||||
typeof chatHistorySvc?.isReady === "function" &&
|
||||
chatHistorySvc.isReady()
|
||||
) {
|
||||
chatHistorySvc.setHistory(preCompactHistory);
|
||||
return { chatHistory: chatHistorySvc.getHistory(), wasCompacted: true };
|
||||
}
|
||||
return { chatHistory: [...preCompactHistory], wasCompacted: true };
|
||||
}
|
||||
|
||||
return { chatHistory, wasCompacted: false };
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate and handle context overflow after tool execution
|
||||
*/
|
||||
export async function handlePostToolValidation(
|
||||
toolCalls: ToolCall[],
|
||||
chatHistory: ChatHistoryItem[],
|
||||
options: CompactionHelperOptions,
|
||||
): Promise<{ chatHistory: ChatHistoryItem[]; wasCompacted: boolean }> {
|
||||
const { model, llmApi, isHeadless, callbacks, systemMessage } = options;
|
||||
|
||||
if (toolCalls.length === 0) {
|
||||
return { chatHistory, wasCompacted: false };
|
||||
}
|
||||
|
||||
// Get updated history after tool execution
|
||||
const chatHistorySvc = services.chatHistory;
|
||||
if (
|
||||
typeof chatHistorySvc?.isReady === "function" &&
|
||||
chatHistorySvc.isReady()
|
||||
) {
|
||||
chatHistory = chatHistorySvc.getHistory();
|
||||
}
|
||||
|
||||
// Validate with system message to catch tool result overflow
|
||||
const postToolSystemItem: ChatHistoryItem = {
|
||||
message: {
|
||||
role: "system",
|
||||
content: systemMessage,
|
||||
},
|
||||
contextItems: [],
|
||||
};
|
||||
|
||||
const SAFETY_BUFFER = 100;
|
||||
const postToolValidation = validateContextLength(
|
||||
[postToolSystemItem, ...chatHistory],
|
||||
model,
|
||||
SAFETY_BUFFER,
|
||||
);
|
||||
|
||||
// If tool results pushed us over limit, force compaction regardless of threshold
|
||||
if (!postToolValidation.isValid) {
|
||||
logger.warn("Tool execution caused context overflow, forcing compaction", {
|
||||
inputTokens: postToolValidation.inputTokens,
|
||||
contextLimit: postToolValidation.contextLimit,
|
||||
});
|
||||
|
||||
// Force compaction (compaction now accounts for system message during pruning)
|
||||
const { wasCompacted, chatHistory: compactedHistory } =
|
||||
await handleAutoCompaction(chatHistory, model, llmApi, {
|
||||
isHeadless,
|
||||
callbacks: {
|
||||
onSystemMessage: callbacks?.onSystemMessage,
|
||||
onContent: callbacks?.onContent,
|
||||
},
|
||||
systemMessage,
|
||||
});
|
||||
|
||||
if (wasCompacted) {
|
||||
// Use the service to update history if available, otherwise use local copy
|
||||
if (chatHistorySvc && typeof chatHistorySvc.setHistory === "function") {
|
||||
chatHistorySvc.setHistory(compactedHistory);
|
||||
chatHistory = chatHistorySvc.getHistory();
|
||||
} else {
|
||||
// Fallback: use the compacted history directly when service unavailable
|
||||
chatHistory = compactedHistory;
|
||||
}
|
||||
|
||||
// Verify compaction brought us under the limit
|
||||
const postCompactionValidation = validateContextLength(
|
||||
[postToolSystemItem, ...chatHistory],
|
||||
model,
|
||||
SAFETY_BUFFER,
|
||||
);
|
||||
|
||||
if (!postCompactionValidation.isValid) {
|
||||
logger.error(
|
||||
"Compaction failed to bring context under limit, stopping execution",
|
||||
{
|
||||
inputTokens: postCompactionValidation.inputTokens,
|
||||
contextLimit: postCompactionValidation.contextLimit,
|
||||
},
|
||||
);
|
||||
throw new Error(
|
||||
`Context limit exceeded even after compaction: ${postCompactionValidation.error}`,
|
||||
);
|
||||
}
|
||||
|
||||
logger.info("Successfully compacted after tool overflow", {
|
||||
inputTokens: postCompactionValidation.inputTokens,
|
||||
contextLimit: postCompactionValidation.contextLimit,
|
||||
});
|
||||
return { chatHistory, wasCompacted: true };
|
||||
} else {
|
||||
// Compaction failed, cannot continue
|
||||
logger.error("Failed to compact history after tool execution overflow");
|
||||
throw new Error(
|
||||
"Context limit exceeded and compaction failed. Unable to continue.",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return { chatHistory, wasCompacted: false };
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle normal auto-compaction check at 80% threshold
|
||||
*/
|
||||
export async function handleNormalAutoCompaction(
|
||||
chatHistory: ChatHistoryItem[],
|
||||
shouldContinue: boolean,
|
||||
options: CompactionHelperOptions,
|
||||
): Promise<{ chatHistory: ChatHistoryItem[]; wasCompacted: boolean }> {
|
||||
const { model, llmApi, isHeadless, callbacks, systemMessage } = options;
|
||||
|
||||
if (!shouldContinue) {
|
||||
return { chatHistory, wasCompacted: false };
|
||||
}
|
||||
|
||||
const chatHistorySvc = services.chatHistory;
|
||||
if (
|
||||
typeof chatHistorySvc?.isReady === "function" &&
|
||||
chatHistorySvc.isReady()
|
||||
) {
|
||||
chatHistory = chatHistorySvc.getHistory();
|
||||
}
|
||||
|
||||
const { wasCompacted, chatHistory: updatedChatHistory } =
|
||||
await handleAutoCompaction(chatHistory, model, llmApi, {
|
||||
isHeadless,
|
||||
callbacks: {
|
||||
onSystemMessage: callbacks?.onSystemMessage,
|
||||
onContent: callbacks?.onContent,
|
||||
},
|
||||
systemMessage,
|
||||
});
|
||||
|
||||
if (wasCompacted) {
|
||||
// Use the service to update history if available, otherwise use local copy
|
||||
if (chatHistorySvc && typeof chatHistorySvc.setHistory === "function") {
|
||||
chatHistorySvc.setHistory(updatedChatHistory);
|
||||
return {
|
||||
chatHistory: chatHistorySvc.getHistory(),
|
||||
wasCompacted: true,
|
||||
};
|
||||
}
|
||||
// Fallback: return the compacted history directly when service unavailable
|
||||
return { chatHistory: updatedChatHistory, wasCompacted: true };
|
||||
}
|
||||
|
||||
return { chatHistory, wasCompacted: false };
|
||||
}
|
||||
|
|
@ -0,0 +1,200 @@
|
|||
import { ModelConfig } from "@continuedev/config-yaml";
|
||||
import { BaseLlmApi } from "@continuedev/openai-adapters";
|
||||
import type { ChatHistoryItem } from "core/index.js";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
import { services } from "../services/index.js";
|
||||
|
||||
import { processStreamingResponse } from "./streamChatResponse.js";
|
||||
|
||||
// Mock services
|
||||
vi.mock("../services/index.js", () => ({
|
||||
services: {
|
||||
systemMessage: {
|
||||
getSystemMessage: vi.fn(),
|
||||
},
|
||||
toolPermissions: {
|
||||
getState: vi.fn(() => ({ currentMode: "enabled" })),
|
||||
isHeadless: vi.fn(() => false),
|
||||
},
|
||||
chatHistory: {
|
||||
isReady: vi.fn(() => false),
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
// Mock logger
|
||||
vi.mock("../util/logger.js", () => ({
|
||||
logger: {
|
||||
debug: vi.fn(),
|
||||
info: vi.fn(),
|
||||
warn: vi.fn(),
|
||||
error: vi.fn(),
|
||||
},
|
||||
}));
|
||||
|
||||
// Mock tokenizer
|
||||
vi.mock("../util/tokenizer.js", async () => {
|
||||
const actual = await vi.importActual("../util/tokenizer.js");
|
||||
return {
|
||||
...actual,
|
||||
countChatHistoryTokens: vi.fn((history: ChatHistoryItem[]) => {
|
||||
// Simple mock: count based on content length
|
||||
return history.reduce((sum, item) => {
|
||||
const content =
|
||||
typeof item.message.content === "string"
|
||||
? item.message.content
|
||||
: JSON.stringify(item.message.content);
|
||||
return sum + Math.ceil(content.length / 4); // ~4 chars per token
|
||||
}, 0);
|
||||
}),
|
||||
};
|
||||
});
|
||||
|
||||
describe("streamChatResponse system message validation", () => {
|
||||
let mockLlmApi: BaseLlmApi;
|
||||
let abortController: AbortController;
|
||||
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
|
||||
mockLlmApi = {} as BaseLlmApi;
|
||||
abortController = new AbortController();
|
||||
});
|
||||
|
||||
it("should validate system message is retrieved before validation", async () => {
|
||||
const model = {
|
||||
model: "test-model",
|
||||
defaultCompletionOptions: {
|
||||
contextLength: 1000,
|
||||
maxTokens: 100,
|
||||
},
|
||||
} as ModelConfig;
|
||||
|
||||
// Mock system message
|
||||
const systemMessage = "System instructions";
|
||||
vi.mocked(services.systemMessage.getSystemMessage).mockResolvedValue(
|
||||
systemMessage,
|
||||
);
|
||||
|
||||
// Small chat history
|
||||
const chatHistory: ChatHistoryItem[] = [
|
||||
{
|
||||
message: { role: "user", content: "test" },
|
||||
contextItems: [],
|
||||
},
|
||||
];
|
||||
|
||||
// Mock the streaming response to avoid actual API call
|
||||
const mockStream = {
|
||||
[Symbol.asyncIterator]: async function* () {
|
||||
yield {
|
||||
choices: [{ delta: { content: "test" } }],
|
||||
};
|
||||
},
|
||||
};
|
||||
mockLlmApi.chatCompletionStream = vi.fn().mockResolvedValue(mockStream);
|
||||
|
||||
// Execute the function with systemMessage parameter
|
||||
await processStreamingResponse({
|
||||
chatHistory,
|
||||
model,
|
||||
llmApi: mockLlmApi,
|
||||
abortController,
|
||||
systemMessage,
|
||||
});
|
||||
|
||||
// Verify the function uses the provided system message (no fetch needed)
|
||||
// The system message is now provided by the caller
|
||||
expect(services.systemMessage.getSystemMessage).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("should pass validation when system message + history fits", async () => {
|
||||
const model = {
|
||||
model: "test-model",
|
||||
defaultCompletionOptions: {
|
||||
contextLength: 1000,
|
||||
maxTokens: 100,
|
||||
},
|
||||
} as ModelConfig;
|
||||
|
||||
// Small system message (50 tokens worth)
|
||||
const smallSystemMessage = "x".repeat(200); // ~50 tokens
|
||||
|
||||
// Small chat history (200 tokens worth)
|
||||
const chatHistory: ChatHistoryItem[] = [
|
||||
{
|
||||
message: { role: "user", content: "x".repeat(800) }, // ~200 tokens
|
||||
contextItems: [],
|
||||
},
|
||||
];
|
||||
|
||||
// Available: 1000 - 100 (maxTokens) - 100 (buffer) = 800 tokens
|
||||
// System: ~50 tokens
|
||||
// History: ~200 tokens
|
||||
// Total: ~250 tokens < 800 available
|
||||
// Should pass validation
|
||||
|
||||
// Mock the streaming response to avoid actual API call
|
||||
const mockStream = {
|
||||
[Symbol.asyncIterator]: async function* () {
|
||||
yield {
|
||||
choices: [{ delta: { content: "test" } }],
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
mockLlmApi.chatCompletionStream = vi.fn().mockResolvedValue(mockStream);
|
||||
|
||||
// This should not throw
|
||||
const result = await processStreamingResponse({
|
||||
chatHistory,
|
||||
model,
|
||||
llmApi: mockLlmApi,
|
||||
abortController,
|
||||
systemMessage: smallSystemMessage,
|
||||
});
|
||||
|
||||
expect(result).toBeDefined();
|
||||
// System message is now provided by caller, not fetched
|
||||
expect(services.systemMessage.getSystemMessage).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("should use safety buffer in validation", async () => {
|
||||
const model = {
|
||||
model: "test-model",
|
||||
defaultCompletionOptions: {
|
||||
contextLength: 1000,
|
||||
maxTokens: 100,
|
||||
},
|
||||
} as ModelConfig;
|
||||
|
||||
// System message + history that's exactly at limit without buffer
|
||||
// but fails with buffer
|
||||
const systemMessage = "x".repeat(800); // ~200 tokens
|
||||
|
||||
const chatHistory: ChatHistoryItem[] = [
|
||||
{
|
||||
message: { role: "user", content: "x".repeat(2400) }, // ~600 tokens
|
||||
contextItems: [],
|
||||
},
|
||||
];
|
||||
|
||||
// Available without buffer: 1000 - 100 = 900 tokens
|
||||
// Available with buffer: 1000 - 100 - 100 = 800 tokens
|
||||
// System: ~200 tokens
|
||||
// History: ~600 tokens
|
||||
// Total: ~800 tokens
|
||||
// Should exactly hit the limit with buffer and pass/prune
|
||||
|
||||
await expect(
|
||||
processStreamingResponse({
|
||||
chatHistory,
|
||||
model,
|
||||
llmApi: mockLlmApi,
|
||||
abortController,
|
||||
systemMessage,
|
||||
}),
|
||||
).rejects.toThrow(); // Will fail because we can't prune enough
|
||||
});
|
||||
});
|
||||
|
|
@ -152,6 +152,7 @@ describe("processStreamingResponse - content preservation", () => {
|
|||
model: mockModel,
|
||||
llmApi: mockLlmApi,
|
||||
abortController: mockAbortController,
|
||||
systemMessage: "You are a helpful assistant.",
|
||||
});
|
||||
|
||||
expect(result.content).toBe("I'll read the README file for you.");
|
||||
|
|
@ -172,6 +173,7 @@ describe("processStreamingResponse - content preservation", () => {
|
|||
model: mockModel,
|
||||
llmApi: mockLlmApi,
|
||||
abortController: mockAbortController,
|
||||
systemMessage: "You are a helpful assistant.",
|
||||
});
|
||||
|
||||
expect(result.content).toBe("Let me search for that. ");
|
||||
|
|
@ -220,6 +222,7 @@ describe("processStreamingResponse - content preservation", () => {
|
|||
model: mockModel,
|
||||
llmApi: mockLlmApi,
|
||||
abortController: mockAbortController,
|
||||
systemMessage: "You are a helpful assistant.",
|
||||
});
|
||||
|
||||
expect(result.content).toBe("I'll read the README file for you.");
|
||||
|
|
@ -243,6 +246,7 @@ describe("processStreamingResponse - content preservation", () => {
|
|||
model: mockModel,
|
||||
llmApi: mockLlmApi,
|
||||
abortController: mockAbortController,
|
||||
systemMessage: "You are a helpful assistant.",
|
||||
});
|
||||
|
||||
expect(result.content).toBe("Hello world!");
|
||||
|
|
@ -367,6 +371,7 @@ describe("processStreamingResponse - content preservation", () => {
|
|||
model: mockModel,
|
||||
llmApi: mockLlmApi,
|
||||
abortController: mockAbortController,
|
||||
systemMessage: "You are a helpful assistant.",
|
||||
});
|
||||
|
||||
expect(responsesStream).toHaveBeenCalledTimes(1);
|
||||
|
|
@ -405,6 +410,7 @@ describe("processStreamingResponse - content preservation", () => {
|
|||
model: mockModel,
|
||||
llmApi: mockLlmApi,
|
||||
abortController: mockAbortController,
|
||||
systemMessage: "You are a helpful assistant.",
|
||||
});
|
||||
|
||||
// Content is captured correctly
|
||||
|
|
@ -455,6 +461,7 @@ describe("processStreamingResponse - content preservation", () => {
|
|||
model: mockModel,
|
||||
llmApi: mockLlmApi,
|
||||
abortController: mockAbortController,
|
||||
systemMessage: "You are a helpful assistant.",
|
||||
});
|
||||
|
||||
// Fixed: Both issues are resolved
|
||||
|
|
@ -503,6 +510,7 @@ describe("processStreamingResponse - content preservation", () => {
|
|||
model: mockModel,
|
||||
llmApi: mockLlmApi,
|
||||
abortController: mockAbortController,
|
||||
systemMessage: "You are a helpful assistant.",
|
||||
});
|
||||
} catch (error) {
|
||||
caughtError = error;
|
||||
|
|
@ -516,6 +524,7 @@ describe("processStreamingResponse - content preservation", () => {
|
|||
model: mockModel,
|
||||
llmApi: mockLlmApi,
|
||||
abortController: mockAbortController,
|
||||
systemMessage: "You are a helpful assistant.",
|
||||
});
|
||||
|
||||
expect(result.content).toBe("Hello world!");
|
||||
|
|
|
|||
|
|
@ -22,7 +22,11 @@ import { logger } from "../util/logger.js";
|
|||
import { validateContextLength } from "../util/tokenizer.js";
|
||||
|
||||
import { getRequestTools, handleToolCalls } from "./handleToolCalls.js";
|
||||
import { handleAutoCompaction } from "./streamChatResponse.autoCompaction.js";
|
||||
import {
|
||||
handleNormalAutoCompaction,
|
||||
handlePostToolValidation,
|
||||
handlePreApiCompaction,
|
||||
} from "./streamChatResponse.compactionHelpers.js";
|
||||
import {
|
||||
processChunkContent,
|
||||
processToolCallDelta,
|
||||
|
|
@ -66,6 +70,63 @@ function handleContentDisplay(
|
|||
}
|
||||
}
|
||||
|
||||
// Helper function to refresh chat history from service
|
||||
function refreshChatHistoryFromService(
|
||||
chatHistory: ChatHistoryItem[],
|
||||
isCompacting: boolean,
|
||||
): ChatHistoryItem[] {
|
||||
const chatHistorySvc = services.chatHistory;
|
||||
if (
|
||||
typeof chatHistorySvc?.isReady === "function" &&
|
||||
chatHistorySvc.isReady()
|
||||
) {
|
||||
try {
|
||||
// use chat history from params when isCompacting is true
|
||||
// otherwise use the full history
|
||||
if (!isCompacting) {
|
||||
return chatHistorySvc.getHistory();
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
return chatHistory;
|
||||
}
|
||||
|
||||
// Helper function to handle auto-continuation after compaction
|
||||
function handleAutoContinuation(
|
||||
compactionOccurred: boolean,
|
||||
shouldContinue: boolean,
|
||||
chatHistory: ChatHistoryItem[],
|
||||
): { shouldAutoContinue: boolean; chatHistory: ChatHistoryItem[] } {
|
||||
if (!compactionOccurred || shouldContinue) {
|
||||
return { shouldAutoContinue: false, chatHistory };
|
||||
}
|
||||
|
||||
logger.debug(
|
||||
"Auto-compaction occurred during this turn - automatically continuing session",
|
||||
);
|
||||
|
||||
// Add a continuation message to the history
|
||||
const chatHistorySvc = services.chatHistory;
|
||||
if (
|
||||
typeof chatHistorySvc?.isReady === "function" &&
|
||||
chatHistorySvc.isReady()
|
||||
) {
|
||||
chatHistorySvc.addUserMessage("continue");
|
||||
chatHistory = chatHistorySvc.getHistory();
|
||||
} else {
|
||||
chatHistory.push({
|
||||
message: {
|
||||
role: "user",
|
||||
content: "continue",
|
||||
},
|
||||
contextItems: [],
|
||||
});
|
||||
}
|
||||
|
||||
logger.debug("Added continuation message after compaction");
|
||||
return { shouldAutoContinue: true, chatHistory };
|
||||
}
|
||||
|
||||
// Helper function to process a single chunk
|
||||
interface ProcessChunkOptions {
|
||||
chunk: any;
|
||||
|
|
@ -128,6 +189,7 @@ interface ProcessStreamingResponseOptions {
|
|||
callbacks?: StreamCallbacks;
|
||||
isHeadless?: boolean;
|
||||
tools?: ChatCompletionTool[];
|
||||
systemMessage: string;
|
||||
}
|
||||
|
||||
// Process a single streaming response and return whether we need to continue
|
||||
|
|
@ -140,30 +202,56 @@ export async function processStreamingResponse(
|
|||
toolCalls: ToolCall[];
|
||||
shouldContinue: boolean;
|
||||
}> {
|
||||
const { model, llmApi, abortController, callbacks, isHeadless, tools } =
|
||||
options;
|
||||
const {
|
||||
model,
|
||||
llmApi,
|
||||
abortController,
|
||||
callbacks,
|
||||
isHeadless,
|
||||
tools,
|
||||
systemMessage,
|
||||
} = options;
|
||||
|
||||
let chatHistory = options.chatHistory;
|
||||
|
||||
// Validate context length before making the request
|
||||
let validation = validateContextLength(chatHistory, model);
|
||||
// Create temporary system message item for validation
|
||||
const systemMessageItem: ChatHistoryItem = {
|
||||
message: {
|
||||
role: "system",
|
||||
content: systemMessage,
|
||||
},
|
||||
contextItems: [],
|
||||
};
|
||||
|
||||
// Prune last messages until valid
|
||||
// Safety buffer to account for tokenization estimation errors
|
||||
const SAFETY_BUFFER = 100;
|
||||
|
||||
// Validate context length INCLUDING system message
|
||||
let historyWithSystem = [systemMessageItem, ...chatHistory];
|
||||
let validation = validateContextLength(
|
||||
historyWithSystem,
|
||||
model,
|
||||
SAFETY_BUFFER,
|
||||
);
|
||||
|
||||
// Prune last messages until valid (excluding system message)
|
||||
while (chatHistory.length > 1 && !validation.isValid) {
|
||||
const prunedChatHistory = pruneLastMessage(chatHistory);
|
||||
if (prunedChatHistory.length === chatHistory.length) break;
|
||||
if (prunedChatHistory.length === chatHistory.length) {
|
||||
break;
|
||||
}
|
||||
chatHistory = prunedChatHistory;
|
||||
validation = validateContextLength(chatHistory, model);
|
||||
|
||||
// Re-validate with system message
|
||||
historyWithSystem = [systemMessageItem, ...chatHistory];
|
||||
validation = validateContextLength(historyWithSystem, model, SAFETY_BUFFER);
|
||||
}
|
||||
|
||||
if (!validation.isValid) {
|
||||
throw new Error(`Context length validation failed: ${validation.error}`);
|
||||
}
|
||||
|
||||
// Get fresh system message and inject it
|
||||
const systemMessage = await services.systemMessage.getSystemMessage(
|
||||
services.toolPermissions.getState().currentMode,
|
||||
);
|
||||
// Create OpenAI format history with validated system message
|
||||
const openaiChatHistory = convertFromUnifiedHistoryWithSystemMessage(
|
||||
chatHistory,
|
||||
systemMessage,
|
||||
|
|
@ -329,7 +417,7 @@ export async function processStreamingResponse(
|
|||
}
|
||||
|
||||
// Main function that handles the conversation loop
|
||||
// eslint-disable-next-line complexity, max-params
|
||||
// eslint-disable-next-line max-params
|
||||
export async function streamChatResponse(
|
||||
chatHistory: ChatHistoryItem[],
|
||||
model: ModelConfig,
|
||||
|
|
@ -348,53 +436,32 @@ export async function streamChatResponse(
|
|||
|
||||
let fullResponse = "";
|
||||
let finalResponse = "";
|
||||
let compactionOccurredThisTurn = false; // Track if compaction happened during this conversation turn
|
||||
|
||||
while (true) {
|
||||
// If ChatHistoryService is available, refresh local chatHistory view
|
||||
const chatHistorySvc = services.chatHistory;
|
||||
if (
|
||||
typeof chatHistorySvc?.isReady === "function" &&
|
||||
chatHistorySvc.isReady()
|
||||
) {
|
||||
try {
|
||||
// use chat history from params when isCompacting is true
|
||||
// otherwise use the full history
|
||||
if (!isCompacting) {
|
||||
chatHistory = chatHistorySvc.getHistory();
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
chatHistory = refreshChatHistoryFromService(chatHistory, isCompacting);
|
||||
logger.debug("Starting conversation iteration");
|
||||
|
||||
logger.debug("debug1 streamChatResponse history", { chatHistory });
|
||||
|
||||
// avoid pre-compaction when compaction is in progress
|
||||
// this also avoids infinite compaction call stacks
|
||||
if (!isCompacting) {
|
||||
// Pre-API auto-compaction checkpoint
|
||||
const { wasCompacted: preCompacted, chatHistory: preCompactHistory } =
|
||||
await handleAutoCompaction(chatHistory, model, llmApi, {
|
||||
isHeadless,
|
||||
callbacks: {
|
||||
onSystemMessage: callbacks?.onSystemMessage,
|
||||
onContent: callbacks?.onContent,
|
||||
},
|
||||
});
|
||||
// Get system message once per iteration (can change based on tool permissions mode)
|
||||
const systemMessage = await services.systemMessage.getSystemMessage(
|
||||
services.toolPermissions.getState().currentMode,
|
||||
);
|
||||
|
||||
if (preCompacted) {
|
||||
logger.debug("Pre-API compaction occurred, updating chat history");
|
||||
// Update chat history after pre-compaction
|
||||
const chatHistorySvc2 = services.chatHistory;
|
||||
if (
|
||||
typeof chatHistorySvc2?.isReady === "function" &&
|
||||
chatHistorySvc2.isReady()
|
||||
) {
|
||||
chatHistorySvc2.setHistory(preCompactHistory);
|
||||
chatHistory = chatHistorySvc2.getHistory();
|
||||
} else {
|
||||
chatHistory = [...preCompactHistory];
|
||||
}
|
||||
}
|
||||
// Pre-API auto-compaction checkpoint
|
||||
const preCompactionResult = await handlePreApiCompaction(chatHistory, {
|
||||
model,
|
||||
llmApi,
|
||||
isCompacting,
|
||||
isHeadless,
|
||||
callbacks,
|
||||
systemMessage,
|
||||
});
|
||||
chatHistory = preCompactionResult.chatHistory;
|
||||
if (preCompactionResult.wasCompacted) {
|
||||
compactionOccurredThisTurn = true;
|
||||
}
|
||||
|
||||
// Recompute tools on each iteration to handle mode changes during streaming
|
||||
|
|
@ -415,6 +482,7 @@ export async function streamChatResponse(
|
|||
abortController,
|
||||
callbacks,
|
||||
tools,
|
||||
systemMessage,
|
||||
});
|
||||
|
||||
if (abortController?.signal.aborted) {
|
||||
|
|
@ -447,36 +515,59 @@ export async function streamChatResponse(
|
|||
return finalResponse || content || fullResponse;
|
||||
}
|
||||
|
||||
// Check for auto-compaction after tool execution
|
||||
if (shouldContinue) {
|
||||
const { wasCompacted, chatHistory: updatedChatHistory } =
|
||||
await handleAutoCompaction(chatHistory, model, llmApi, {
|
||||
isHeadless,
|
||||
callbacks: {
|
||||
onSystemMessage: callbacks?.onSystemMessage,
|
||||
onContent: callbacks?.onContent,
|
||||
},
|
||||
});
|
||||
|
||||
// Only update chat history if compaction actually occurred
|
||||
if (wasCompacted) {
|
||||
// Always prefer service; local copy is for temporary reads only
|
||||
const chatHistorySvc2 = services.chatHistory;
|
||||
if (
|
||||
typeof chatHistorySvc2?.isReady === "function" &&
|
||||
chatHistorySvc2.isReady()
|
||||
) {
|
||||
chatHistorySvc2.setHistory(updatedChatHistory);
|
||||
chatHistory = chatHistorySvc2.getHistory();
|
||||
} else {
|
||||
// Fallback only when service is unavailable
|
||||
chatHistory = [...updatedChatHistory];
|
||||
}
|
||||
}
|
||||
// After tool execution, validate that we haven't exceeded context limit
|
||||
const postToolResult = await handlePostToolValidation(
|
||||
toolCalls,
|
||||
chatHistory,
|
||||
{
|
||||
model,
|
||||
llmApi,
|
||||
isCompacting,
|
||||
isHeadless,
|
||||
callbacks,
|
||||
systemMessage,
|
||||
},
|
||||
);
|
||||
chatHistory = postToolResult.chatHistory;
|
||||
if (postToolResult.wasCompacted) {
|
||||
compactionOccurredThisTurn = true;
|
||||
}
|
||||
|
||||
// Check if we should continue
|
||||
if (!shouldContinue) {
|
||||
// Normal auto-compaction check at 80% threshold
|
||||
const compactionResult = await handleNormalAutoCompaction(
|
||||
chatHistory,
|
||||
shouldContinue,
|
||||
{
|
||||
model,
|
||||
llmApi,
|
||||
isCompacting,
|
||||
isHeadless,
|
||||
callbacks,
|
||||
systemMessage,
|
||||
},
|
||||
);
|
||||
chatHistory = compactionResult.chatHistory;
|
||||
if (compactionResult.wasCompacted) {
|
||||
compactionOccurredThisTurn = true;
|
||||
}
|
||||
|
||||
// If compaction happened during this turn and we're about to stop,
|
||||
// automatically send a continuation message to keep the agent going
|
||||
const autoContinueResult = handleAutoContinuation(
|
||||
compactionOccurredThisTurn,
|
||||
shouldContinue,
|
||||
chatHistory,
|
||||
);
|
||||
chatHistory = autoContinueResult.chatHistory;
|
||||
const shouldAutoContinue = autoContinueResult.shouldAutoContinue;
|
||||
|
||||
// Reset flag to avoid infinite continuation
|
||||
if (shouldAutoContinue) {
|
||||
compactionOccurredThisTurn = false;
|
||||
}
|
||||
|
||||
// Check if we should continue (skip break if auto-continuing after compaction)
|
||||
if (!shouldContinue && !shouldAutoContinue) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,15 +3,27 @@ import * as fs from "fs";
|
|||
import * as util from "util";
|
||||
|
||||
import { ContinueError, ContinueErrorReason } from "core/util/errors.js";
|
||||
import { findUp } from "find-up";
|
||||
|
||||
import { Tool } from "./types.js";
|
||||
|
||||
const execPromise = util.promisify(child_process.exec);
|
||||
|
||||
// Default maximum number of results to display
|
||||
const DEFAULT_MAX_RESULTS = 100;
|
||||
const MAX_LINE_LENGTH = 1000;
|
||||
async function getGitignorePatterns() {
|
||||
const gitIgnorePath = await findUp(".gitignore");
|
||||
if (!gitIgnorePath) return [];
|
||||
const content = fs.readFileSync(gitIgnorePath, "utf-8");
|
||||
const ignorePatterns = [];
|
||||
for (let line of content.trim().split("\n")) {
|
||||
line = line.trim();
|
||||
if (line.startsWith("#") || line === "") continue; // ignore comments and empty line
|
||||
if (line.startsWith("!")) continue; // ignore negated ignores
|
||||
ignorePatterns.push(line);
|
||||
}
|
||||
return ignorePatterns;
|
||||
}
|
||||
|
||||
// procedure 1: search with ripgrep
|
||||
export async function checkIfRipgrepIsInstalled(): Promise<boolean> {
|
||||
try {
|
||||
await execPromise("rg --version");
|
||||
|
|
@ -21,6 +33,57 @@ export async function checkIfRipgrepIsInstalled(): Promise<boolean> {
|
|||
}
|
||||
}
|
||||
|
||||
async function searchWithRipgrep(
|
||||
pattern: string,
|
||||
searchPath: string,
|
||||
filePattern?: string,
|
||||
) {
|
||||
let command = `rg --line-number --with-filename --color never "${pattern}"`;
|
||||
|
||||
if (filePattern) {
|
||||
command += ` -g "${filePattern}"`;
|
||||
}
|
||||
|
||||
const ignorePatterns = await getGitignorePatterns();
|
||||
for (const ignorePattern of ignorePatterns) {
|
||||
command += ` -g "!${ignorePattern}"`;
|
||||
}
|
||||
|
||||
command += ` "${searchPath}"`;
|
||||
const { stdout, stderr } = await execPromise(command);
|
||||
return { stdout, stderr };
|
||||
}
|
||||
|
||||
// procedure 2: search with grep on unix or findstr on windows
|
||||
async function searchWithGrepOrFindstr(
|
||||
pattern: string,
|
||||
searchPath: string,
|
||||
filePattern?: string,
|
||||
) {
|
||||
const isWindows = process.platform === "win32";
|
||||
const ignorePatterns = await getGitignorePatterns();
|
||||
let command: string;
|
||||
if (isWindows) {
|
||||
const fileSpec = filePattern ? filePattern : "*";
|
||||
command = `findstr /S /N /P /R "${pattern}" "${fileSpec}"`; // findstr does not support ignoring patterns
|
||||
} else {
|
||||
let excludeArgs = "";
|
||||
for (const ignorePattern of ignorePatterns) {
|
||||
excludeArgs += ` --exclude="${ignorePattern}" --exclude-dir="${ignorePattern}"`; // use both exclude and exclude-dir because ignorePattern can be a file or directory
|
||||
}
|
||||
if (filePattern) {
|
||||
command = `find . -type f -path "${filePattern}" -print0 | xargs -0 grep -nH -I${excludeArgs} "${pattern}"`;
|
||||
} else {
|
||||
command = `grep -R -n -H -I${excludeArgs} "${pattern}" .`;
|
||||
}
|
||||
}
|
||||
return await execPromise(command, { cwd: searchPath });
|
||||
}
|
||||
|
||||
// Default maximum number of results to display
|
||||
const DEFAULT_MAX_RESULTS = 100;
|
||||
const MAX_LINE_LENGTH = 1000;
|
||||
|
||||
export const searchCodeTool: Tool = {
|
||||
name: "Search",
|
||||
displayName: "Search",
|
||||
|
|
@ -73,15 +136,26 @@ export const searchCodeTool: Tool = {
|
|||
);
|
||||
}
|
||||
|
||||
let command = `rg --line-number --with-filename --color never "${args.pattern}"`;
|
||||
|
||||
if (args.file_pattern) {
|
||||
command += ` -g "${args.file_pattern}"`;
|
||||
}
|
||||
|
||||
command += ` "${searchPath}"`;
|
||||
let stdout = "",
|
||||
stderr = "";
|
||||
try {
|
||||
const { stdout, stderr } = await execPromise(command);
|
||||
if (await checkIfRipgrepIsInstalled()) {
|
||||
const results = await searchWithRipgrep(
|
||||
args.pattern,
|
||||
searchPath,
|
||||
args.file_pattern,
|
||||
);
|
||||
stdout = results.stdout;
|
||||
stderr = results.stderr;
|
||||
} else {
|
||||
const results = await searchWithGrepOrFindstr(
|
||||
args.pattern,
|
||||
searchPath,
|
||||
args.file_pattern,
|
||||
);
|
||||
stdout = results.stdout;
|
||||
stderr = results.stderr;
|
||||
}
|
||||
|
||||
if (stderr) {
|
||||
return `Warning during search: ${stderr}\n\n${stdout}`;
|
||||
|
|
@ -121,13 +195,8 @@ export const searchCodeTool: Tool = {
|
|||
args.file_pattern ? ` in files matching "${args.file_pattern}"` : ""
|
||||
}.`;
|
||||
}
|
||||
if (error instanceof Error) {
|
||||
if (error.message.includes("command not found")) {
|
||||
throw new Error(`ripgrep is not installed.`);
|
||||
}
|
||||
}
|
||||
throw new Error(
|
||||
`Error executing ripgrep: ${
|
||||
`Error executing search: ${
|
||||
error instanceof Error ? error.message : String(error)
|
||||
}`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,18 @@
|
|||
import { testBothModes, renderInMode } from "./TUIChat.dualModeHelper.js";
|
||||
import { renderInMode, testBothModes } from "./TUIChat.dualModeHelper.js";
|
||||
|
||||
async function waitForCondition(
|
||||
conditionFn: () => boolean,
|
||||
timeoutMs = 2000,
|
||||
intervalMs = 50,
|
||||
): Promise<void> {
|
||||
const startTime = Date.now();
|
||||
while (Date.now() - startTime < timeoutMs) {
|
||||
if (conditionFn()) {
|
||||
return;
|
||||
}
|
||||
await new Promise((resolve) => setTimeout(resolve, intervalMs));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Integration tests for the message edit feature in TUIChat
|
||||
|
|
@ -10,7 +24,6 @@ import { testBothModes, renderInMode } from "./TUIChat.dualModeHelper.js";
|
|||
* 4. History is rewound and new message is submitted
|
||||
* 5. Chat updates correctly
|
||||
*/
|
||||
|
||||
describe("TUIChat - Message Edit Feature", () => {
|
||||
testBothModes("double Esc should open edit selector", async (mode) => {
|
||||
const { lastFrame, stdin } = renderInMode(mode);
|
||||
|
|
@ -119,7 +132,11 @@ describe("TUIChat - Message Edit Feature", () => {
|
|||
// Perform various operations
|
||||
stdin.write("\u001b");
|
||||
stdin.write("\u001b"); // Open edit with separate Esc presses
|
||||
await new Promise((resolve) => setTimeout(resolve, 100));
|
||||
|
||||
// Wait for selector to open (poll instead of fixed timeout)
|
||||
await waitForCondition(
|
||||
() => lastFrame()?.includes("No user messages to edit") ?? false,
|
||||
);
|
||||
|
||||
// Verify selector opened
|
||||
let frame = lastFrame();
|
||||
|
|
@ -130,7 +147,11 @@ describe("TUIChat - Message Edit Feature", () => {
|
|||
await new Promise((resolve) => setTimeout(resolve, 50));
|
||||
|
||||
stdin.write("\u001b"); // Close
|
||||
await new Promise((resolve) => setTimeout(resolve, 100));
|
||||
|
||||
// Wait for selector to close (poll instead of fixed timeout)
|
||||
await waitForCondition(
|
||||
() => !(lastFrame()?.includes("No user messages to edit") ?? true),
|
||||
);
|
||||
|
||||
frame = lastFrame();
|
||||
|
||||
|
|
|
|||
|
|
@ -44,13 +44,9 @@ export async function handleCompactCommand({
|
|||
|
||||
try {
|
||||
// Compact the chat history directly (already in unified format) with abort controller
|
||||
const result = await compactChatHistory(
|
||||
chatHistory,
|
||||
model,
|
||||
llmApi,
|
||||
undefined,
|
||||
compactionController,
|
||||
);
|
||||
const result = await compactChatHistory(chatHistory, model, llmApi, {
|
||||
abortController: compactionController,
|
||||
});
|
||||
|
||||
// Check if operation was aborted before proceeding with success actions
|
||||
if (compactionController.signal.aborted) {
|
||||
|
|
@ -153,13 +149,9 @@ export async function handleAutoCompaction({
|
|||
logger.info("Auto-compaction triggered for TUI mode");
|
||||
|
||||
// Compact the unified history
|
||||
const result = await compactChatHistory(
|
||||
chatHistory,
|
||||
model,
|
||||
llmApi,
|
||||
undefined,
|
||||
const result = await compactChatHistory(chatHistory, model, llmApi, {
|
||||
abortController,
|
||||
);
|
||||
});
|
||||
|
||||
// Keep the system message and append the compaction summary
|
||||
// This replaces the old messages with a summary to reduce context size
|
||||
|
|
|
|||
|
|
@ -1,7 +1,74 @@
|
|||
import type { ChatHistoryItem } from "core/index.js";
|
||||
|
||||
import { sentryService } from "../sentry.js";
|
||||
import { telemetryService } from "../telemetry/telemetryService.js";
|
||||
|
||||
import { getGitDiffSnapshot } from "./git.js";
|
||||
import { logger } from "./logger.js";
|
||||
import {
|
||||
calculateDiffStats,
|
||||
extractSummary,
|
||||
getAgentIdFromArgs,
|
||||
postAgentMetadata,
|
||||
} from "./metadata.js";
|
||||
|
||||
/**
|
||||
* Update agent session metadata in control plane
|
||||
* Collects diff stats and conversation summary, posts to control plane
|
||||
* This is called both during execution (after each turn) and before exit
|
||||
*
|
||||
* @param history - Chat history to extract summary from (optional, will fetch if not provided)
|
||||
*/
|
||||
export async function updateAgentMetadata(
|
||||
history?: ChatHistoryItem[],
|
||||
): Promise<void> {
|
||||
try {
|
||||
const agentId = getAgentIdFromArgs();
|
||||
if (!agentId) {
|
||||
logger.debug("No agent ID found, skipping metadata update");
|
||||
return;
|
||||
}
|
||||
|
||||
const metadata: Record<string, any> = {};
|
||||
|
||||
// Calculate diff stats
|
||||
try {
|
||||
const { diff, repoFound } = await getGitDiffSnapshot();
|
||||
if (repoFound && diff) {
|
||||
const { additions, deletions } = calculateDiffStats(diff);
|
||||
if (additions > 0 || deletions > 0) {
|
||||
metadata.additions = additions;
|
||||
metadata.deletions = deletions;
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
logger.debug("Failed to calculate diff stats (non-critical)", err as any);
|
||||
}
|
||||
|
||||
// Extract summary from conversation
|
||||
if (history && history.length > 0) {
|
||||
try {
|
||||
const summary = extractSummary(history);
|
||||
if (summary) {
|
||||
metadata.summary = summary;
|
||||
}
|
||||
} catch (err) {
|
||||
logger.debug(
|
||||
"Failed to extract conversation summary (non-critical)",
|
||||
err as any,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Post metadata if we have any
|
||||
if (Object.keys(metadata).length > 0) {
|
||||
await postAgentMetadata(agentId, metadata);
|
||||
}
|
||||
} catch (err) {
|
||||
// Non-critical: log but don't fail the process
|
||||
logger.debug("Error in updateAgentMetadata (ignored)", err as any);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Exit the process after flushing telemetry and error reporting.
|
||||
|
|
|
|||
|
|
@ -44,6 +44,19 @@ function createReplacer() {
|
|||
seen.add(value);
|
||||
}
|
||||
|
||||
// Handle Error objects explicitly - extract useful properties
|
||||
if (value instanceof Error) {
|
||||
const errorObj: any = {
|
||||
name: value.name,
|
||||
message: value.message,
|
||||
stack: value.stack,
|
||||
};
|
||||
if (value.cause) {
|
||||
errorObj.cause = value.cause;
|
||||
}
|
||||
return errorObj;
|
||||
}
|
||||
|
||||
// Handle functions
|
||||
if (typeof value === "function") {
|
||||
return "[Function]";
|
||||
|
|
|
|||
381
extensions/cli/src/util/metadata.test.ts
Normal file
381
extensions/cli/src/util/metadata.test.ts
Normal file
|
|
@ -0,0 +1,381 @@
|
|||
import type { ChatHistoryItem } from "core/index.js";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { calculateDiffStats, extractSummary } from "./metadata.js";
|
||||
|
||||
// Helper to create a mock chat history item
|
||||
function createMockChatHistoryItem(
|
||||
content: string,
|
||||
role: "user" | "assistant" | "system" = "assistant",
|
||||
): ChatHistoryItem {
|
||||
return {
|
||||
message: {
|
||||
role,
|
||||
content,
|
||||
},
|
||||
} as ChatHistoryItem;
|
||||
}
|
||||
|
||||
describe("metadata utilities", () => {
|
||||
describe("calculateDiffStats", () => {
|
||||
it("should count additions and deletions in a simple diff", () => {
|
||||
const diff = `diff --git a/file.txt b/file.txt
|
||||
index 123..456 789
|
||||
--- a/file.txt
|
||||
+++ b/file.txt
|
||||
@@ -1,3 +1,3 @@
|
||||
line 1
|
||||
-line 2
|
||||
+line 2 modified
|
||||
line 3`;
|
||||
|
||||
const stats = calculateDiffStats(diff);
|
||||
|
||||
expect(stats.additions).toBe(1);
|
||||
expect(stats.deletions).toBe(1);
|
||||
});
|
||||
|
||||
it("should handle multiple hunks with multiple changes", () => {
|
||||
const diff = `diff --git a/app.js b/app.js
|
||||
--- a/app.js
|
||||
+++ b/app.js
|
||||
@@ -10,5 +10,7 @@
|
||||
const express = require('express');
|
||||
-const old = 'value';
|
||||
+const new = 'value';
|
||||
+const another = 'line';
|
||||
|
||||
@@ -50,3 +52,2 @@
|
||||
-function oldFunc() {}
|
||||
-function anotherOld() {}
|
||||
+function newFunc() {}`;
|
||||
|
||||
const stats = calculateDiffStats(diff);
|
||||
|
||||
expect(stats.additions).toBe(3); // +const new, +const another, +function newFunc
|
||||
expect(stats.deletions).toBe(3); // -const old, -function oldFunc, -function anotherOld
|
||||
});
|
||||
|
||||
it("should exclude diff metadata lines from counts", () => {
|
||||
const diff = `diff --git a/file.txt b/file.txt
|
||||
index abc123..def456 100644
|
||||
--- a/file.txt
|
||||
+++ b/file.txt
|
||||
@@ -1 +1 @@
|
||||
-old content
|
||||
+new content`;
|
||||
|
||||
const stats = calculateDiffStats(diff);
|
||||
|
||||
// Should only count the actual changes, not the metadata lines
|
||||
expect(stats.additions).toBe(1);
|
||||
expect(stats.deletions).toBe(1);
|
||||
});
|
||||
|
||||
it("should handle binary file changes", () => {
|
||||
const diff = `diff --git a/image.png b/image.png
|
||||
Binary files a/image.png and b/image.png differ`;
|
||||
|
||||
const stats = calculateDiffStats(diff);
|
||||
|
||||
// Binary files shouldn't be counted
|
||||
expect(stats.additions).toBe(0);
|
||||
expect(stats.deletions).toBe(0);
|
||||
});
|
||||
|
||||
it("should return zeros for empty diff", () => {
|
||||
const stats = calculateDiffStats("");
|
||||
|
||||
expect(stats.additions).toBe(0);
|
||||
expect(stats.deletions).toBe(0);
|
||||
});
|
||||
|
||||
it("should return zeros for whitespace-only diff", () => {
|
||||
const stats = calculateDiffStats(" \n\n \t ");
|
||||
|
||||
expect(stats.additions).toBe(0);
|
||||
expect(stats.deletions).toBe(0);
|
||||
});
|
||||
|
||||
it("should handle a diff with only additions", () => {
|
||||
const diff = `diff --git a/new.txt b/new.txt
|
||||
--- /dev/null
|
||||
+++ b/new.txt
|
||||
@@ -0,0 +1,3 @@
|
||||
+line 1
|
||||
+line 2
|
||||
+line 3`;
|
||||
|
||||
const stats = calculateDiffStats(diff);
|
||||
|
||||
expect(stats.additions).toBe(3);
|
||||
expect(stats.deletions).toBe(0);
|
||||
});
|
||||
|
||||
it("should handle a diff with only deletions", () => {
|
||||
const diff = `diff --git a/old.txt b/old.txt
|
||||
--- a/old.txt
|
||||
+++ /dev/null
|
||||
@@ -1,3 +0,0 @@
|
||||
-line 1
|
||||
-line 2
|
||||
-line 3`;
|
||||
|
||||
const stats = calculateDiffStats(diff);
|
||||
|
||||
expect(stats.additions).toBe(0);
|
||||
expect(stats.deletions).toBe(3);
|
||||
});
|
||||
|
||||
it("should handle real-world TypeScript diff", () => {
|
||||
const diff = `diff --git a/src/util/metadata.ts b/src/util/metadata.ts
|
||||
index abc123..def456 100644
|
||||
--- a/src/util/metadata.ts
|
||||
+++ b/src/util/metadata.ts
|
||||
@@ -1,10 +1,15 @@
|
||||
import type { ChatHistoryItem } from "core/index.js";
|
||||
|
||||
-export function oldFunction() {
|
||||
- return "old";
|
||||
+export function newFunction() {
|
||||
+ return "new";
|
||||
+}
|
||||
+
|
||||
+export function anotherFunction() {
|
||||
+ return "another";
|
||||
}
|
||||
|
||||
// Comment line (unchanged)
|
||||
-const OLD_CONSTANT = 42;
|
||||
+const NEW_CONSTANT = 43;`;
|
||||
|
||||
const stats = calculateDiffStats(diff);
|
||||
|
||||
expect(stats.additions).toBe(7);
|
||||
expect(stats.deletions).toBe(3);
|
||||
});
|
||||
|
||||
it("should correctly count code with ++ or -- operators", () => {
|
||||
// This tests the edge case where code contains ++ or -- at the start
|
||||
const diff = `diff --git a/counter.js b/counter.js
|
||||
index abc123..def456 100644
|
||||
--- a/counter.js
|
||||
+++ b/counter.js
|
||||
@@ -1,5 +1,5 @@
|
||||
function increment(counter) {
|
||||
- counter++;
|
||||
+ ++counter;
|
||||
}
|
||||
|
||||
function decrement(counter) {
|
||||
- counter--;
|
||||
+ --counter;
|
||||
}`;
|
||||
|
||||
const stats = calculateDiffStats(diff);
|
||||
|
||||
// Should count all 4 changes: 2 additions and 2 deletions
|
||||
// Lines like "+++counter;" should be counted as additions, not skipped as file headers
|
||||
expect(stats.additions).toBe(2);
|
||||
expect(stats.deletions).toBe(2);
|
||||
});
|
||||
|
||||
it("should handle code with multiple + or - at line start", () => {
|
||||
const diff = `diff --git a/operators.c b/operators.c
|
||||
--- a/operators.c
|
||||
+++ b/operators.c
|
||||
@@ -1,4 +1,4 @@
|
||||
int main() {
|
||||
- x--;
|
||||
- y++;
|
||||
+ --x;
|
||||
+ ++y;
|
||||
return 0;
|
||||
}`;
|
||||
|
||||
const stats = calculateDiffStats(diff);
|
||||
|
||||
expect(stats.additions).toBe(2);
|
||||
expect(stats.deletions).toBe(2);
|
||||
});
|
||||
});
|
||||
|
||||
describe("extractSummary", () => {
|
||||
it("should extract last assistant message", () => {
|
||||
const history = [
|
||||
createMockChatHistoryItem("Hello", "user"),
|
||||
createMockChatHistoryItem("Hi there, how can I help?", "assistant"),
|
||||
createMockChatHistoryItem("Please fix the bug", "user"),
|
||||
createMockChatHistoryItem(
|
||||
"I've fixed the authentication bug in the login module.",
|
||||
"assistant",
|
||||
),
|
||||
];
|
||||
|
||||
const summary = extractSummary(history);
|
||||
|
||||
expect(summary).toBe(
|
||||
"I've fixed the authentication bug in the login module.",
|
||||
);
|
||||
});
|
||||
|
||||
it("should skip empty assistant messages", () => {
|
||||
const history = [
|
||||
createMockChatHistoryItem("User message", "user"),
|
||||
createMockChatHistoryItem("Valid assistant message", "assistant"),
|
||||
createMockChatHistoryItem("", "assistant"),
|
||||
createMockChatHistoryItem(" ", "assistant"),
|
||||
];
|
||||
|
||||
const summary = extractSummary(history);
|
||||
|
||||
expect(summary).toBe("Valid assistant message");
|
||||
});
|
||||
|
||||
it("should truncate long messages to default 500 characters", () => {
|
||||
const longMessage = "a".repeat(600);
|
||||
const history = [createMockChatHistoryItem(longMessage, "assistant")];
|
||||
|
||||
const summary = extractSummary(history);
|
||||
|
||||
expect(summary?.length).toBe(500);
|
||||
expect(summary).toBe("a".repeat(497) + "...");
|
||||
});
|
||||
|
||||
it("should respect custom maxLength parameter", () => {
|
||||
const longMessage = "b".repeat(200);
|
||||
const history = [createMockChatHistoryItem(longMessage, "assistant")];
|
||||
|
||||
const summary = extractSummary(history, 100);
|
||||
|
||||
expect(summary?.length).toBe(100);
|
||||
expect(summary).toBe("b".repeat(97) + "...");
|
||||
});
|
||||
|
||||
it("should not truncate messages under the limit", () => {
|
||||
const shortMessage = "This is a short message.";
|
||||
const history = [createMockChatHistoryItem(shortMessage, "assistant")];
|
||||
|
||||
const summary = extractSummary(history, 500);
|
||||
|
||||
expect(summary).toBe(shortMessage);
|
||||
});
|
||||
|
||||
it("should return undefined for empty history", () => {
|
||||
const summary = extractSummary([]);
|
||||
|
||||
expect(summary).toBeUndefined();
|
||||
});
|
||||
|
||||
it("should return undefined when no assistant messages exist", () => {
|
||||
const history = [
|
||||
createMockChatHistoryItem("User message 1", "user"),
|
||||
createMockChatHistoryItem("User message 2", "user"),
|
||||
createMockChatHistoryItem("System message", "system"),
|
||||
];
|
||||
|
||||
const summary = extractSummary(history);
|
||||
|
||||
expect(summary).toBeUndefined();
|
||||
});
|
||||
|
||||
it("should handle message content as object (multimodal)", () => {
|
||||
const history: ChatHistoryItem[] = [
|
||||
{
|
||||
message: {
|
||||
role: "assistant",
|
||||
content: [
|
||||
{ type: "text", text: "Here's the image analysis" },
|
||||
{ type: "image_url", image_url: { url: "data:..." } },
|
||||
],
|
||||
},
|
||||
} as any,
|
||||
];
|
||||
|
||||
const summary = extractSummary(history);
|
||||
|
||||
// Should stringify the object content
|
||||
expect(summary).toBeDefined();
|
||||
expect(typeof summary).toBe("string");
|
||||
expect(summary).toContain("Here's the image analysis");
|
||||
});
|
||||
|
||||
it("should trim whitespace from content", () => {
|
||||
const history = [
|
||||
createMockChatHistoryItem(
|
||||
" \n Message with whitespace \n ",
|
||||
"assistant",
|
||||
),
|
||||
];
|
||||
|
||||
const summary = extractSummary(history);
|
||||
|
||||
expect(summary).toBe("Message with whitespace");
|
||||
});
|
||||
|
||||
it("should find last assistant message among mixed roles", () => {
|
||||
const history = [
|
||||
createMockChatHistoryItem("First assistant message", "assistant"),
|
||||
createMockChatHistoryItem("User response", "user"),
|
||||
createMockChatHistoryItem("Second assistant message", "assistant"),
|
||||
createMockChatHistoryItem("Another user message", "user"),
|
||||
createMockChatHistoryItem("System notification", "system"),
|
||||
];
|
||||
|
||||
const summary = extractSummary(history);
|
||||
|
||||
expect(summary).toBe("Second assistant message");
|
||||
});
|
||||
|
||||
it("should handle markdown formatting in messages", () => {
|
||||
const history = [
|
||||
createMockChatHistoryItem(
|
||||
"I've updated the code:\n\n```typescript\nfunction test() {}\n```\n\nThe changes are complete.",
|
||||
"assistant",
|
||||
),
|
||||
];
|
||||
|
||||
const summary = extractSummary(history);
|
||||
|
||||
// Should keep markdown formatting
|
||||
expect(summary).toContain("```typescript");
|
||||
expect(summary).toContain("function test()");
|
||||
});
|
||||
|
||||
it("should handle special characters in messages", () => {
|
||||
const history = [
|
||||
createMockChatHistoryItem(
|
||||
'Fixed the regex pattern: /[a-z]+/gi and added "quotes" & <tags>',
|
||||
"assistant",
|
||||
),
|
||||
];
|
||||
|
||||
const summary = extractSummary(history);
|
||||
|
||||
expect(summary).toBe(
|
||||
'Fixed the regex pattern: /[a-z]+/gi and added "quotes" & <tags>',
|
||||
);
|
||||
});
|
||||
|
||||
it("should handle exactly 500 character message (no truncation)", () => {
|
||||
const exactMessage = "x".repeat(500);
|
||||
const history = [createMockChatHistoryItem(exactMessage, "assistant")];
|
||||
|
||||
const summary = extractSummary(history, 500);
|
||||
|
||||
expect(summary).toBe(exactMessage);
|
||||
expect(summary?.length).toBe(500);
|
||||
expect(summary?.endsWith("...")).toBe(false);
|
||||
});
|
||||
|
||||
it("should handle 501 character message (with truncation)", () => {
|
||||
const longMessage = "y".repeat(501);
|
||||
const history = [createMockChatHistoryItem(longMessage, "assistant")];
|
||||
|
||||
const summary = extractSummary(history, 500);
|
||||
|
||||
expect(summary).toBe("y".repeat(497) + "...");
|
||||
expect(summary?.length).toBe(500);
|
||||
});
|
||||
});
|
||||
});
|
||||
169
extensions/cli/src/util/metadata.ts
Normal file
169
extensions/cli/src/util/metadata.ts
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
import type { ChatHistoryItem } from "core/index.js";
|
||||
|
||||
import {
|
||||
post,
|
||||
ApiRequestError,
|
||||
AuthenticationRequiredError,
|
||||
} from "./apiClient.js";
|
||||
import { logger } from "./logger.js";
|
||||
|
||||
/**
|
||||
* Statistics about a git diff
|
||||
*/
|
||||
export interface DiffStats {
|
||||
additions: number;
|
||||
deletions: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate diff statistics from unified diff content
|
||||
* Counts lines added (+) and deleted (-), excluding metadata lines
|
||||
*
|
||||
* @param diffContent - The unified diff content as a string
|
||||
* @returns Object with additions and deletions counts
|
||||
*/
|
||||
export function calculateDiffStats(diffContent: string): DiffStats {
|
||||
if (!diffContent || diffContent.trim() === "") {
|
||||
return { additions: 0, deletions: 0 };
|
||||
}
|
||||
|
||||
const lines = diffContent.split("\n");
|
||||
let additions = 0;
|
||||
let deletions = 0;
|
||||
|
||||
for (const line of lines) {
|
||||
// Skip diff metadata lines
|
||||
// File headers contain a space: "--- a/file" or "+++ b/file"
|
||||
// But code changes with ++ or -- at start don't: "+++counter;" or "---counter;"
|
||||
if (
|
||||
(line.startsWith("+++") && (line.length === 3 || line[3] === " ")) ||
|
||||
(line.startsWith("---") && (line.length === 3 || line[3] === " ")) ||
|
||||
line.startsWith("@@") ||
|
||||
line.startsWith("diff ") ||
|
||||
line.startsWith("index ") ||
|
||||
line.startsWith("Binary files")
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Count actual code changes
|
||||
if (line.startsWith("+")) {
|
||||
additions++;
|
||||
} else if (line.startsWith("-")) {
|
||||
deletions++;
|
||||
}
|
||||
}
|
||||
|
||||
return { additions, deletions };
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract the last assistant message from conversation history
|
||||
* Truncates if too long
|
||||
*
|
||||
* @param history - Array of chat history items
|
||||
* @param maxLength - Maximum length for the summary (default: 500)
|
||||
* @returns The last assistant message content, or undefined if none found
|
||||
*/
|
||||
export function extractSummary(
|
||||
history: ChatHistoryItem[],
|
||||
maxLength: number = 500,
|
||||
): string | undefined {
|
||||
if (!history || history.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// Find last assistant message (iterate backwards)
|
||||
for (let i = history.length - 1; i >= 0; i--) {
|
||||
const item = history[i];
|
||||
if (item.message.role === "assistant") {
|
||||
const content =
|
||||
typeof item.message.content === "string"
|
||||
? item.message.content
|
||||
: JSON.stringify(item.message.content);
|
||||
|
||||
if (!content || content.trim() === "") {
|
||||
continue;
|
||||
}
|
||||
|
||||
const trimmedContent = content.trim();
|
||||
|
||||
// Truncate if too long
|
||||
if (trimmedContent.length <= maxLength) {
|
||||
return trimmedContent;
|
||||
}
|
||||
|
||||
return trimmedContent.substring(0, maxLength - 3) + "...";
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract the agent ID from the --id command line flag
|
||||
* @returns The agent ID or undefined if not found
|
||||
*/
|
||||
export function getAgentIdFromArgs(): string | undefined {
|
||||
const args = process.argv;
|
||||
const idIndex = args.indexOf("--id");
|
||||
if (idIndex !== -1 && idIndex + 1 < args.length) {
|
||||
return args[idIndex + 1];
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* POST metadata to the control plane for an agent session
|
||||
* Non-blocking and error-tolerant - failures are logged but don't throw
|
||||
*
|
||||
* @param agentId - The agent session ID
|
||||
* @param metadata - Arbitrary metadata object to post
|
||||
*/
|
||||
export async function postAgentMetadata(
|
||||
agentId: string,
|
||||
metadata: Record<string, any>,
|
||||
): Promise<void> {
|
||||
if (!agentId) {
|
||||
logger.debug("No agent ID provided, skipping metadata update");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!metadata || Object.keys(metadata).length === 0) {
|
||||
logger.debug("Empty metadata object, skipping metadata update");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
logger.debug("Posting metadata to control plane", {
|
||||
agentId,
|
||||
metadata,
|
||||
});
|
||||
|
||||
const response = await post(`agents/${agentId}/metadata`, { metadata });
|
||||
|
||||
if (response.ok) {
|
||||
logger.info("Successfully posted metadata to control plane");
|
||||
} else {
|
||||
logger.warn(
|
||||
`Unexpected response when posting metadata: ${response.status}`,
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
// Non-critical: Log but don't fail the entire agent execution
|
||||
if (error instanceof AuthenticationRequiredError) {
|
||||
logger.debug(
|
||||
"Authentication required for metadata update (skipping)",
|
||||
error.message,
|
||||
);
|
||||
} else if (error instanceof ApiRequestError) {
|
||||
logger.warn(
|
||||
`Failed to post metadata: ${error.status} ${error.response || error.statusText}`,
|
||||
);
|
||||
} else {
|
||||
const errorMessage =
|
||||
error instanceof Error ? error.message : String(error);
|
||||
logger.warn(`Error posting metadata: ${errorMessage}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -22,6 +22,67 @@ export function getModelContextLimit(model: ModelConfig): number {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Count tokens in message content (string or multimodal array)
|
||||
*/
|
||||
function countContentTokens(content: string | any[]): number {
|
||||
if (typeof content === "string") {
|
||||
return encode(content).length;
|
||||
}
|
||||
|
||||
if (Array.isArray(content)) {
|
||||
let tokenCount = 0;
|
||||
for (const part of content) {
|
||||
if (part.type === "text" && part.text) {
|
||||
tokenCount += encode(part.text).length;
|
||||
}
|
||||
if (part.type === "imageUrl") {
|
||||
tokenCount += 1024; // Rough estimate for image tokens
|
||||
}
|
||||
}
|
||||
return tokenCount;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Count tokens in a single tool call function
|
||||
*/
|
||||
function countToolCallFunctionTokens(
|
||||
toolCallFunction: { name?: string; arguments?: string } | undefined,
|
||||
): number {
|
||||
if (!toolCallFunction) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
let tokenCount = 0;
|
||||
tokenCount += encode(toolCallFunction.name ?? "").length + 10; // Function name and structure overhead
|
||||
tokenCount += encode(toolCallFunction.arguments ?? "").length; // Arguments
|
||||
return tokenCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Count tokens in tool call outputs
|
||||
*/
|
||||
function countToolOutputTokens(
|
||||
output: Array<{ content?: string; name?: string }> | undefined,
|
||||
): number {
|
||||
if (!output) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
let tokenCount = 0;
|
||||
for (const item of output) {
|
||||
if (item.content) {
|
||||
tokenCount += encode(item.content).length;
|
||||
}
|
||||
// Note: item.name is not sent to the model, only used for internal tracking
|
||||
tokenCount += 5; // Output structure overhead
|
||||
}
|
||||
return tokenCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Estimate the token count for a single ChatHistoryItem
|
||||
* @param historyItem The ChatHistoryItem to count tokens for
|
||||
|
|
@ -36,35 +97,20 @@ export function countChatHistoryItemTokens(
|
|||
const message = historyItem.message;
|
||||
|
||||
// Count tokens in content
|
||||
if (typeof message.content === "string") {
|
||||
tokenCount += encode(message.content).length;
|
||||
} else if (Array.isArray(message.content)) {
|
||||
// Handle array content (e.g., multimodal messages)
|
||||
for (const part of message.content) {
|
||||
if (part.type === "text" && part.text) {
|
||||
tokenCount += encode(part.text).length;
|
||||
}
|
||||
// Images and other content types have their own token costs
|
||||
// but we'll use a rough estimate for now
|
||||
if (part.type === "imageUrl") {
|
||||
tokenCount += 1024; // Rough estimate for image tokens
|
||||
}
|
||||
}
|
||||
}
|
||||
tokenCount += countContentTokens(message.content);
|
||||
|
||||
// Add tokens for role (roughly 1-2 tokens)
|
||||
tokenCount += 2;
|
||||
|
||||
// Add tokens for tool calls if present
|
||||
if ("toolCalls" in message && message.toolCalls) {
|
||||
// Skip if toolCallStates exists to avoid double-counting (toolCallStates includes the tool calls)
|
||||
if (
|
||||
"toolCalls" in message &&
|
||||
message.toolCalls &&
|
||||
!historyItem.toolCallStates
|
||||
) {
|
||||
for (const toolCall of message.toolCalls) {
|
||||
if (!toolCall.function) {
|
||||
continue;
|
||||
}
|
||||
// Function name and structure overhead
|
||||
tokenCount += encode(toolCall.function.name ?? "").length + 10;
|
||||
// Arguments
|
||||
tokenCount += encode(toolCall.function.arguments ?? "").length;
|
||||
tokenCount += countToolCallFunctionTokens(toolCall.function);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -80,6 +126,16 @@ export function countChatHistoryItemTokens(
|
|||
tokenCount += 5; // Context item structure overhead
|
||||
}
|
||||
|
||||
// Add tokens for tool call states (tool results/outputs)
|
||||
if (historyItem.toolCallStates) {
|
||||
for (const toolState of historyItem.toolCallStates) {
|
||||
// Count tokens in tool call function (name + arguments)
|
||||
tokenCount += countToolCallFunctionTokens(toolState.toolCall?.function);
|
||||
// Count tokens in tool outputs (can be very large - thousands of tokens)
|
||||
tokenCount += countToolOutputTokens(toolState.output);
|
||||
}
|
||||
}
|
||||
|
||||
return tokenCount;
|
||||
} catch (error) {
|
||||
logger.error("Error counting tokens for history item", error);
|
||||
|
|
@ -197,11 +253,13 @@ export function getAutoCompactMessage(model: ModelConfig): string {
|
|||
* Validates that the input tokens + max_tokens don't exceed context limit
|
||||
* @param chatHistory The chat history to validate
|
||||
* @param model The model configuration
|
||||
* @param safetyBuffer Additional token buffer to account for estimation errors (default: 0)
|
||||
* @returns Validation result with error details if invalid
|
||||
*/
|
||||
export function validateContextLength(
|
||||
chatHistory: ChatHistoryItem[],
|
||||
model: ModelConfig,
|
||||
safetyBuffer: number = 0,
|
||||
): {
|
||||
isValid: boolean;
|
||||
error?: string;
|
||||
|
|
@ -216,12 +274,12 @@ export function validateContextLength(
|
|||
// If maxTokens is not set, use 35% default reservation for output
|
||||
const reservedForOutput =
|
||||
maxTokens > 0 ? maxTokens : Math.ceil(contextLimit * 0.35);
|
||||
const totalRequired = inputTokens + reservedForOutput;
|
||||
const totalRequired = inputTokens + reservedForOutput + safetyBuffer;
|
||||
|
||||
if (totalRequired > contextLimit) {
|
||||
return {
|
||||
isValid: false,
|
||||
error: `Context length exceeded: input (${inputTokens.toLocaleString()}) + max_tokens (${reservedForOutput.toLocaleString()}) = ${totalRequired.toLocaleString()} > context_limit (${contextLimit.toLocaleString()})`,
|
||||
error: `Context length exceeded: input (${inputTokens.toLocaleString()}) + max_tokens (${reservedForOutput.toLocaleString()})${safetyBuffer > 0 ? ` + buffer (${safetyBuffer})` : ""} = ${totalRequired.toLocaleString()} > context_limit (${contextLimit.toLocaleString()})`,
|
||||
inputTokens,
|
||||
contextLimit,
|
||||
maxTokens: reservedForOutput,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
pluginGroup=com.github.continuedev.continueintellijextension
|
||||
pluginVersion=1.0.55
|
||||
pluginVersion=1.0.57
|
||||
platformVersion=2024.1
|
||||
kotlin.stdlib.default.dependency=false
|
||||
org.gradle.configuration-cache=true
|
||||
|
|
|
|||
4
extensions/vscode/package-lock.json
generated
4
extensions/vscode/package-lock.json
generated
|
|
@ -53,7 +53,7 @@
|
|||
"undici": "^6.21.3",
|
||||
"uuid": "^9.0.1",
|
||||
"uuidv4": "^6.2.13",
|
||||
"vectordb": "^0.4.20",
|
||||
"vectordb": "0.4.20",
|
||||
"vitest": "^3.1.4",
|
||||
"vscode-languageclient": "^8.0.2",
|
||||
"ws": "^8.13.0",
|
||||
|
|
@ -168,7 +168,7 @@
|
|||
"tree-sitter-wasms": "^0.1.11",
|
||||
"untildify": "^6.0.0",
|
||||
"uuid": "^9.0.1",
|
||||
"vectordb": "^0.4.20",
|
||||
"vectordb": "0.4.20",
|
||||
"web-tree-sitter": "^0.21.0",
|
||||
"win-ca": "^3.5.1",
|
||||
"wink-nlp-utils": "^2.1.0",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "continue",
|
||||
"icon": "media/icon.png",
|
||||
"author": "Continue Dev, Inc",
|
||||
"version": "1.3.27",
|
||||
"version": "1.3.28",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/continuedev/continue"
|
||||
|
|
@ -772,7 +772,7 @@
|
|||
"undici": "^6.21.3",
|
||||
"uuid": "^9.0.1",
|
||||
"uuidv4": "^6.2.13",
|
||||
"vectordb": "^0.4.20",
|
||||
"vectordb": "0.4.20",
|
||||
"vitest": "^3.1.4",
|
||||
"vscode-languageclient": "^8.0.2",
|
||||
"ws": "^8.13.0",
|
||||
|
|
|
|||
|
|
@ -913,6 +913,20 @@ export const models: { [key: string]: ModelPackage } = {
|
|||
providerOptions: ["gemini"],
|
||||
isOpenSource: false,
|
||||
},
|
||||
gemini3ProPreview: {
|
||||
title: "Gemini 3 Pro",
|
||||
description:
|
||||
"Google's latest Pro model with up to 64k output context. Best for complex tasks involving reasoning.",
|
||||
params: {
|
||||
title: "Gemini 3 Pro",
|
||||
model: "gemini-3-pro-preview",
|
||||
contextLength: 1_048_576,
|
||||
apiKey: "<API_KEY>",
|
||||
},
|
||||
icon: "gemini.png",
|
||||
providerOptions: ["gemini"],
|
||||
isOpenSource: false,
|
||||
},
|
||||
c4aiAyaExpanse8B: {
|
||||
title: "C4AI Aya Expanse 8B",
|
||||
description:
|
||||
|
|
@ -1241,14 +1255,13 @@ export const models: { [key: string]: ModelPackage } = {
|
|||
icon: "anthropic.png",
|
||||
isOpenSource: false,
|
||||
},
|
||||
claude35Haiku: {
|
||||
title: "Claude 3.5 Haiku",
|
||||
description:
|
||||
"The fastest model in the Claude 3.5 series: a compact model for near-instant responsiveness",
|
||||
claude4_5Opus: {
|
||||
title: "Claude 4.5 Opus",
|
||||
description: "The most capable model in the Claude 4.5 series",
|
||||
params: {
|
||||
model: "claude-3-5-haiku-latest",
|
||||
model: "claude-opus-4-5",
|
||||
contextLength: 200_000,
|
||||
title: "Claude 3.5 Haiku",
|
||||
title: "Claude 4.5 Opus",
|
||||
apiKey: "",
|
||||
},
|
||||
providerOptions: ["anthropic"],
|
||||
|
|
@ -1268,7 +1281,6 @@ export const models: { [key: string]: ModelPackage } = {
|
|||
icon: "anthropic.png",
|
||||
isOpenSource: false,
|
||||
},
|
||||
|
||||
graniteChat: {
|
||||
title: "Granite Chat 13b",
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -170,11 +170,11 @@ export const providers: Partial<Record<string, ProviderInfo>> = {
|
|||
},
|
||||
],
|
||||
packages: [
|
||||
models.claude4_5Opus,
|
||||
models.claude45Sonnet,
|
||||
models.claude45Haiku,
|
||||
models.claude41Opus,
|
||||
models.claude4Sonnet,
|
||||
models.claude35Haiku,
|
||||
],
|
||||
apiKeyUrl: "https://console.anthropic.com/account/keys",
|
||||
},
|
||||
|
|
@ -606,7 +606,7 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n
|
|||
models.gemini20Flash,
|
||||
models.gemini20FlashLite,
|
||||
models.gemini20FlashImageGeneration,
|
||||
models.gemini25ProExp,
|
||||
models.gemini3ProPreview,
|
||||
],
|
||||
apiKeyUrl: "https://aistudio.google.com/app/apikey",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -598,7 +598,6 @@ export const sessionSlice = createSlice({
|
|||
},
|
||||
contextItems: [],
|
||||
};
|
||||
handleToolCallsInMessage(message, historyItem);
|
||||
state.history.push(historyItem);
|
||||
lastItem = state.history[state.history.length - 1];
|
||||
lastMessage = lastItem.message;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import { PackageIdentifier } from "../interfaces/slugs.js";
|
||||
import {
|
||||
fillTemplateVariables,
|
||||
getTemplateVariables,
|
||||
parseMarkdownRuleOrAssistantUnrolled,
|
||||
replaceInputsWithSecrets,
|
||||
} from "./unroll.js";
|
||||
|
|
@ -274,3 +276,73 @@ data:
|
|||
expect(result).not.toContain("inputs.dbPassword");
|
||||
});
|
||||
});
|
||||
|
||||
describe("getTemplateVariables edge cases", () => {
|
||||
it("handles undefined input gracefully", () => {
|
||||
const result = getTemplateVariables(undefined as any);
|
||||
expect(result).toEqual([]);
|
||||
});
|
||||
|
||||
it("handles null input gracefully", () => {
|
||||
const result = getTemplateVariables(null as any);
|
||||
expect(result).toEqual([]);
|
||||
});
|
||||
|
||||
it("handles non-string input gracefully", () => {
|
||||
const result = getTemplateVariables(123 as any);
|
||||
expect(result).toEqual([]);
|
||||
});
|
||||
|
||||
it("handles empty string correctly", () => {
|
||||
const result = getTemplateVariables("");
|
||||
expect(result).toEqual([]);
|
||||
});
|
||||
|
||||
it("extracts template variables from valid input", () => {
|
||||
const result = getTemplateVariables("\${{ secrets.apiKey }}");
|
||||
expect(result).toEqual(["secrets.apiKey"]);
|
||||
});
|
||||
|
||||
it("extracts multiple template variables", () => {
|
||||
const result = getTemplateVariables(
|
||||
"\${{ secrets.key1 }} and \${{ inputs.key2 }}",
|
||||
);
|
||||
expect(result).toContain("secrets.key1");
|
||||
expect(result).toContain("inputs.key2");
|
||||
expect(result.length).toBe(2);
|
||||
});
|
||||
});
|
||||
|
||||
describe("fillTemplateVariables edge cases", () => {
|
||||
it("handles undefined input gracefully", () => {
|
||||
const result = fillTemplateVariables(undefined as any, {});
|
||||
expect(result).toBe("");
|
||||
});
|
||||
|
||||
it("handles null input gracefully", () => {
|
||||
const result = fillTemplateVariables(null as any, {});
|
||||
expect(result).toBe("");
|
||||
});
|
||||
|
||||
it("handles non-string input gracefully", () => {
|
||||
const result = fillTemplateVariables(123 as any, {});
|
||||
expect(result).toBe("");
|
||||
});
|
||||
|
||||
it("handles empty string correctly", () => {
|
||||
const result = fillTemplateVariables("", {});
|
||||
expect(result).toBe("");
|
||||
});
|
||||
|
||||
it("fills template variables with valid input", () => {
|
||||
const result = fillTemplateVariables("\${{ secrets.apiKey }}", {
|
||||
"secrets.apiKey": "my-secret-key",
|
||||
});
|
||||
expect(result).toBe("my-secret-key");
|
||||
});
|
||||
|
||||
it("leaves unfilled variables unchanged", () => {
|
||||
const result = fillTemplateVariables("\${{ secrets.apiKey }}", {});
|
||||
expect(result).toBe("\${{ secrets.apiKey }}");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -86,6 +86,11 @@ export function parseBlock(configYaml: string): Block {
|
|||
export const TEMPLATE_VAR_REGEX = /\${{[\s]*([^}\s]+)[\s]*}}/g;
|
||||
|
||||
export function getTemplateVariables(templatedYaml: string): string[] {
|
||||
// Defensive guard against undefined/null/non-string values
|
||||
if (!templatedYaml || typeof templatedYaml !== "string") {
|
||||
return [];
|
||||
}
|
||||
|
||||
const variables = new Set<string>();
|
||||
const matches = templatedYaml.matchAll(TEMPLATE_VAR_REGEX);
|
||||
for (const match of matches) {
|
||||
|
|
@ -98,6 +103,11 @@ export function fillTemplateVariables(
|
|||
templatedYaml: string,
|
||||
data: { [key: string]: string },
|
||||
): string {
|
||||
// Defensive guard against undefined/null/non-string values
|
||||
if (!templatedYaml || typeof templatedYaml !== "string") {
|
||||
return "";
|
||||
}
|
||||
|
||||
return templatedYaml.replace(TEMPLATE_VAR_REGEX, (match, variableName) => {
|
||||
// Inject data
|
||||
if (variableName in data) {
|
||||
|
|
@ -701,7 +711,7 @@ function injectLocalSourceFile(
|
|||
|
||||
export async function resolveBlock(
|
||||
id: PackageIdentifier,
|
||||
inputs: Record<string, string> | undefined,
|
||||
inputs: Record<string, string | undefined> | undefined,
|
||||
registry: Registry,
|
||||
): Promise<AssistantUnrolled> {
|
||||
// Retrieve block raw yaml
|
||||
|
|
@ -777,11 +787,19 @@ function parseYamlOrMarkdownRule<T>(
|
|||
}
|
||||
|
||||
function inputsToFQSNs(
|
||||
inputs: Record<string, string>,
|
||||
inputs: Record<string, string | undefined>,
|
||||
blockIdentifier: PackageIdentifier,
|
||||
): Record<string, string> {
|
||||
const renderedInputs: Record<string, string> = {};
|
||||
for (const [key, value] of Object.entries(inputs)) {
|
||||
// Skip undefined, null, or non-string values
|
||||
if (value === undefined || value === null || typeof value !== "string") {
|
||||
console.warn(
|
||||
`Skipping input "${key}" with invalid value type: ${typeof value}. Expected string.`,
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
renderedInputs[key] = renderTemplateData(value, {
|
||||
secrets: extractFQSNMap(value, [blockIdentifier]),
|
||||
});
|
||||
|
|
|
|||
12
packages/continue-sdk/package-lock.json
generated
12
packages/continue-sdk/package-lock.json
generated
|
|
@ -9,7 +9,7 @@
|
|||
"version": "0.0.1",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/config-yaml": "^1.33.0",
|
||||
"@continuedev/config-yaml": "^1.36.0",
|
||||
"@openapitools/openapi-generator-cli": "^2.25.1",
|
||||
"express": "^4.18.2",
|
||||
"swagger-ui-express": "^5.0.0"
|
||||
|
|
@ -38,14 +38,14 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@continuedev/config-yaml": {
|
||||
"version": "1.33.0",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.33.0.tgz",
|
||||
"integrity": "sha512-riMSmuQ3HhLMKXeQ6L55pXzo/CZUVbEMallg09Pq3GNl8nddV6+7eHhzr1bThLO1COvKNLmo+3kQg52ROv+syA==",
|
||||
"version": "1.36.0",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.36.0.tgz",
|
||||
"integrity": "sha512-uYFs22npkF2wvvpkRDsDJyaGNRydHxYW+ekksGOMj2MFbUkFMH3CZ/K/tD8S/DW6ZXbwju4datXr+BthW0n0Cg==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"yaml": "^2.6.1",
|
||||
"zod": "^3.24.2"
|
||||
"yaml": "^2.8.1",
|
||||
"zod": "^3.25.76"
|
||||
},
|
||||
"bin": {
|
||||
"config-yaml": "dist/cli.js"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
"author": "Continue Dev, Inc.",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/config-yaml": "^1.33.0",
|
||||
"@continuedev/config-yaml": "^1.36.0",
|
||||
"@openapitools/openapi-generator-cli": "^2.25.1",
|
||||
"express": "^4.18.2",
|
||||
"swagger-ui-express": "^5.0.0"
|
||||
|
|
|
|||
28
packages/hub/package-lock.json
generated
28
packages/hub/package-lock.json
generated
|
|
@ -9,7 +9,7 @@
|
|||
"version": "0.0.7",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/config-yaml": "^1.33.0",
|
||||
"@continuedev/config-yaml": "^1.36.0",
|
||||
"js-yaml": "^4.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
@ -545,14 +545,14 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@continuedev/config-yaml": {
|
||||
"version": "1.33.0",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.33.0.tgz",
|
||||
"integrity": "sha512-riMSmuQ3HhLMKXeQ6L55pXzo/CZUVbEMallg09Pq3GNl8nddV6+7eHhzr1bThLO1COvKNLmo+3kQg52ROv+syA==",
|
||||
"version": "1.36.0",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.36.0.tgz",
|
||||
"integrity": "sha512-uYFs22npkF2wvvpkRDsDJyaGNRydHxYW+ekksGOMj2MFbUkFMH3CZ/K/tD8S/DW6ZXbwju4datXr+BthW0n0Cg==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"yaml": "^2.6.1",
|
||||
"zod": "^3.24.2"
|
||||
"yaml": "^2.8.1",
|
||||
"zod": "^3.25.76"
|
||||
},
|
||||
"bin": {
|
||||
"config-yaml": "dist/cli.js"
|
||||
|
|
@ -3788,14 +3788,15 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/yaml": {
|
||||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz",
|
||||
"integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==",
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz",
|
||||
"integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"yaml": "bin.mjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
"node": ">= 14.6"
|
||||
}
|
||||
},
|
||||
"node_modules/yargs": {
|
||||
|
|
@ -3847,9 +3848,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/zod": {
|
||||
"version": "3.24.2",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.24.2.tgz",
|
||||
"integrity": "sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==",
|
||||
"version": "3.25.76",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
|
||||
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
"author": "Continue Dev, Inc.",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/config-yaml": "^1.33.0",
|
||||
"@continuedev/config-yaml": "^1.36.0",
|
||||
"js-yaml": "^4.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
|
@ -46,7 +46,27 @@ export const Anthropic: ModelProvider = {
|
|||
recommendedFor: ["chat"],
|
||||
},
|
||||
{
|
||||
model: "claude-opus-4-20250514",
|
||||
model: "claude-opus-4-5",
|
||||
displayName: "Claude Opus 4.5",
|
||||
contextLength: 200000,
|
||||
maxCompletionTokens: 64000,
|
||||
description:
|
||||
"Most intelligent model with the highest level of intelligence and capability.",
|
||||
regex: /claude-(?:4-5-opus|opus-4-5).*/i,
|
||||
recommendedFor: ["chat"],
|
||||
},
|
||||
// order matters for regex conflicts
|
||||
{
|
||||
model: "claude-opus-4.1",
|
||||
displayName: "Claude Opus 4.1",
|
||||
contextLength: 200000,
|
||||
maxCompletionTokens: 32000,
|
||||
description: "Previous iteration on Opus",
|
||||
regex: /claude-(?:4[.-]1-opus|opus-4[.-]1).*/i,
|
||||
recommendedFor: ["chat"],
|
||||
},
|
||||
{
|
||||
model: "claude-opus-4",
|
||||
displayName: "Claude 4 Opus",
|
||||
contextLength: 200000,
|
||||
maxCompletionTokens: 8192,
|
||||
|
|
@ -55,6 +75,7 @@ export const Anthropic: ModelProvider = {
|
|||
regex: /claude-(?:4-opus|opus-4).*/i,
|
||||
recommendedFor: ["chat"],
|
||||
},
|
||||
|
||||
{
|
||||
model: "claude-3-7-sonnet-latest",
|
||||
displayName: "Claude 3.7 Sonnet",
|
||||
|
|
|
|||
|
|
@ -153,6 +153,15 @@ export const CometAPI: ModelProvider = {
|
|||
},
|
||||
|
||||
// Gemini Series
|
||||
{
|
||||
model: "gemini-3-pro-preview",
|
||||
displayName: "Gemini 3 Pro Preview",
|
||||
contextLength: 2000000,
|
||||
maxCompletionTokens: 8192,
|
||||
description:
|
||||
"Gemini flagship model with high precision multimodal capabilities.",
|
||||
recommendedFor: ["chat"],
|
||||
},
|
||||
{
|
||||
model: "gemini-2.5-pro",
|
||||
displayName: "Gemini 2.5 Pro",
|
||||
|
|
|
|||
|
|
@ -3,11 +3,22 @@ import { AllMediaTypes, ModelProvider } from "../types.js";
|
|||
// See https://ai.google.dev/gemini-api/docs/models
|
||||
export const Gemini: ModelProvider = {
|
||||
models: [
|
||||
{
|
||||
model: "gemini-3-pro-preview",
|
||||
displayName: "Gemini 3 Pro Preview",
|
||||
description:
|
||||
"Google's flagship frontier model with high precision multimodal capabilities.",
|
||||
contextLength: 1048576,
|
||||
maxCompletionTokens: 65536,
|
||||
mediaTypes: AllMediaTypes,
|
||||
regex: /gemini-3-pro-preview/i,
|
||||
recommendedFor: ["chat"],
|
||||
},
|
||||
{
|
||||
model: "gemini-2.5-pro-preview-05-06",
|
||||
displayName: "Gemini 2.5 Pro Preview",
|
||||
description:
|
||||
"Google's most advanced model with strong reasoning, multimodal capabilities, and advanced coding skills",
|
||||
"Google's advanced model with strong reasoning, multimodal capabilities, and advanced coding skills",
|
||||
contextLength: 1048576,
|
||||
maxCompletionTokens: 65536,
|
||||
mediaTypes: AllMediaTypes,
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ They are concerned with:
|
|||
- [x] Anthropic
|
||||
- [ ] AskSage
|
||||
- [x] Azure
|
||||
- [ ] Bedrock
|
||||
- [x] Bedrock
|
||||
- [ ] Bedrock Import
|
||||
- [x] Cerebras
|
||||
- [ ] Cloudflare
|
||||
|
|
@ -62,7 +62,7 @@ They are concerned with:
|
|||
- [x] Together
|
||||
- [x] Novita AI
|
||||
- [x] Vllm
|
||||
- [ ] Vertex AI
|
||||
- [x] Vertex AI
|
||||
- [x] Voyage AI
|
||||
- [x] WatsonX
|
||||
- [x] xAI
|
||||
|
|
|
|||
3878
packages/openai-adapters/package-lock.json
generated
3878
packages/openai-adapters/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@continuedev/openai-adapters",
|
||||
"version": "1.15.0",
|
||||
"version": "1.32.0",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
|
@ -13,11 +13,11 @@
|
|||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "^0.67.0",
|
||||
"@aws-sdk/client-bedrock-runtime": "^3.842.0",
|
||||
"@aws-sdk/credential-providers": "^3.913.0",
|
||||
"@aws-sdk/client-bedrock-runtime": "^3.925.0",
|
||||
"@aws-sdk/credential-providers": "^3.925.0",
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"@continuedev/config-yaml": "^1.33.0",
|
||||
"@continuedev/fetch": "^1.5.0",
|
||||
"@continuedev/config-yaml": "^1.36.0",
|
||||
"@continuedev/fetch": "^1.6.0",
|
||||
"dotenv": "^16.5.0",
|
||||
"google-auth-library": "^10.4.1",
|
||||
"json-schema": "^0.4.0",
|
||||
|
|
@ -31,14 +31,14 @@
|
|||
"@semantic-release/commit-analyzer": "^13.0.1",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"@semantic-release/github": "^11.0.3",
|
||||
"@semantic-release/npm": "^13.1.2",
|
||||
"@semantic-release/npm": "^12.0.2",
|
||||
"@semantic-release/release-notes-generator": "^14.0.3",
|
||||
"@types/follow-redirects": "^1.14.4",
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/json-schema": "^7.0.15",
|
||||
"@types/node": "^24.3.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"semantic-release": "^25.0.2",
|
||||
"semantic-release": "^24.2.7",
|
||||
"ts-jest": "^29.2.3",
|
||||
"ts-node": "^10.9.2",
|
||||
"vitest": "^3.2.4"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue