From 644280bbb41491c51ad161e617f316f0994a3eeb Mon Sep 17 00:00:00 2001 From: canvrno <46584286+canvrno@users.noreply.github.com> Date: Mon, 19 May 2025 10:37:34 -0700 Subject: [PATCH 01/85] copyToClipboard protobus migration (#3615) --- .changeset/long-zebras-yawn.md | 5 +++++ proto/file.proto | 3 +++ src/core/controller/file/copyToClipboard.ts | 20 ++++++++++++++++++++ src/core/controller/index.ts | 8 -------- src/shared/WebviewMessage.ts | 1 - src/shared/proto/file.ts | 9 +++++++++ src/standalone/server-setup.ts | 2 ++ webview-ui/src/components/chat/ChatView.tsx | 10 ++++++++-- 8 files changed, 47 insertions(+), 11 deletions(-) create mode 100644 .changeset/long-zebras-yawn.md create mode 100644 src/core/controller/file/copyToClipboard.ts diff --git a/.changeset/long-zebras-yawn.md b/.changeset/long-zebras-yawn.md new file mode 100644 index 00000000..c38e0860 --- /dev/null +++ b/.changeset/long-zebras-yawn.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +copyToClipboard protobus migration diff --git a/proto/file.proto b/proto/file.proto index 81917000..c0779808 100644 --- a/proto/file.proto +++ b/proto/file.proto @@ -8,6 +8,9 @@ import "common.proto"; // Service for file-related operations service FileService { + // Copies text to clipboard + rpc copyToClipboard(StringRequest) returns (Empty); + // Opens a file in the editor rpc openFile(StringRequest) returns (Empty); diff --git a/src/core/controller/file/copyToClipboard.ts b/src/core/controller/file/copyToClipboard.ts new file mode 100644 index 00000000..156fa82c --- /dev/null +++ b/src/core/controller/file/copyToClipboard.ts @@ -0,0 +1,20 @@ +import * as vscode from "vscode" +import { Controller } from ".." +import { Empty, StringRequest } from "../../../shared/proto/common" + +/** + * Copies text to the system clipboard + * @param controller The controller instance + * @param request The request containing the text to copy + * @returns Empty response + */ +export async function copyToClipboard(controller: Controller, request: StringRequest): Promise { + try { + if (request.value) { + await vscode.env.clipboard.writeText(request.value) + } + } catch (error) { + console.error("Error copying to clipboard:", error) + } + return Empty.create() +} diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index ca7389ca..8bb36060 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -607,14 +607,6 @@ export class Controller { break } - case "copyToClipboard": { - try { - await vscode.env.clipboard.writeText(message.text || "") - } catch (error) { - console.error("Error copying to clipboard:", error) - } - break - } case "updateTerminalConnectionTimeout": { if (message.shellIntegrationTimeout !== undefined) { const timeout = message.shellIntegrationTimeout diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 4d7ceaf8..3fdfe844 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -53,7 +53,6 @@ export interface WebviewMessage { | "toggleWindsurfRule" | "toggleWorkflow" | "deleteClineRule" - | "copyToClipboard" | "updateTerminalConnectionTimeout" | "setActiveQuote" diff --git a/src/shared/proto/file.ts b/src/shared/proto/file.ts index 644ab6d5..e24b38c9 100644 --- a/src/shared/proto/file.ts +++ b/src/shared/proto/file.ts @@ -906,6 +906,15 @@ export const FileServiceDefinition = { name: "FileService", fullName: "cline.FileService", methods: { + /** Copies text to clipboard */ + copyToClipboard: { + name: "copyToClipboard", + requestType: StringRequest, + requestStream: false, + responseType: Empty, + responseStream: false, + options: {}, + }, /** Opens a file in the editor */ openFile: { name: "openFile", diff --git a/src/standalone/server-setup.ts b/src/standalone/server-setup.ts index 769a06cc..f38e3aea 100644 --- a/src/standalone/server-setup.ts +++ b/src/standalone/server-setup.ts @@ -19,6 +19,7 @@ import { checkpointDiff } from "../core/controller/checkpoints/checkpointDiff" import { checkpointRestore } from "../core/controller/checkpoints/checkpointRestore" // File Service +import { copyToClipboard } from "../core/controller/file/copyToClipboard" import { openFile } from "../core/controller/file/openFile" import { openImage } from "../core/controller/file/openImage" import { deleteRuleFile } from "../core/controller/file/deleteRuleFile" @@ -100,6 +101,7 @@ export function addServices( // File Service server.addService(proto.cline.FileService.service, { + copyToClipboard: wrapper(copyToClipboard, controller), openFile: wrapper(openFile, controller), openImage: wrapper(openImage, controller), deleteRuleFile: wrapper(deleteRuleFile, controller), diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index 2206312c..b50f33b1 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -199,8 +199,14 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie } if (textToCopy !== null) { - vscode.postMessage({ type: "copyToClipboard", text: textToCopy }) - e.preventDefault() + try { + FileServiceClient.copyToClipboard({ value: textToCopy }).catch((err) => { + console.error("Error copying to clipboard:", err) + }) + e.preventDefault() + } catch (error) { + console.error("Error copying to clipboard:", error) + } } } } From c535a5ec7383e7d7abf800989b44237b51e8b2bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Barreiro?= <52393857+BarreiroT@users.noreply.github.com> Date: Mon, 19 May 2025 19:52:49 +0200 Subject: [PATCH 02/85] Fail the workflow on webview test errors (#3275) * do not exit with status code 0 if tests fail * fix broken tests * use a data-testid to find the button * Fix API options test --- .github/workflows/test.yml | 2 +- .../src/components/chat/Announcement.tsx | 2 +- .../chat/__tests__/Announcement.spec.tsx | 8 +- .../settings/__tests__/APIOptions.spec.tsx | 84 +++++++------------ 4 files changed, 33 insertions(+), 63 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 22aeb024..03bf8388 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -92,7 +92,7 @@ jobs: cd webview-ui # Ensure coverage dependency is installed npm install --no-save @vitest/coverage-v8 - npm run test:coverage > webview_coverage.txt 2>&1 || true + npm run test:coverage > webview_coverage.txt 2>&1 cd .. PYTHONPATH=.github/scripts python -m coverage_check extract-coverage webview-ui/webview_coverage.txt --type=webview --github-output --verbose diff --git a/webview-ui/src/components/chat/Announcement.tsx b/webview-ui/src/components/chat/Announcement.tsx index 981d8e1e..d9ab1a0e 100644 --- a/webview-ui/src/components/chat/Announcement.tsx +++ b/webview-ui/src/components/chat/Announcement.tsx @@ -36,7 +36,7 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => { const minorVersion = version.split(".").slice(0, 2).join(".") // 2.0.0 -> 2.0 return (
- +

diff --git a/webview-ui/src/components/chat/__tests__/Announcement.spec.tsx b/webview-ui/src/components/chat/__tests__/Announcement.spec.tsx index 227a7859..d234c197 100644 --- a/webview-ui/src/components/chat/__tests__/Announcement.spec.tsx +++ b/webview-ui/src/components/chat/__tests__/Announcement.spec.tsx @@ -20,13 +20,7 @@ describe("Announcement", () => { it("calls hideAnnouncement when close button is clicked", () => { render() - fireEvent.click(screen.getByRole("button")) + fireEvent.click(screen.getByTestId("close-button")) expect(hideAnnouncement).toHaveBeenCalled() }) - - it("renders the enhanced MCP support announcement", () => { - render() - // Updated text based on actual component output - expect(screen.getByText(/Enhanced MCP Support:/)).toBeInTheDocument() - }) }) diff --git a/webview-ui/src/components/settings/__tests__/APIOptions.spec.tsx b/webview-ui/src/components/settings/__tests__/APIOptions.spec.tsx index 2316dd64..aeae5ca8 100644 --- a/webview-ui/src/components/settings/__tests__/APIOptions.spec.tsx +++ b/webview-ui/src/components/settings/__tests__/APIOptions.spec.tsx @@ -1,7 +1,8 @@ import { render, screen, fireEvent } from "@testing-library/react" import { describe, it, expect, vi } from "vitest" import ApiOptions from "../ApiOptions" -import { ExtensionStateContextProvider } from "@/context/ExtensionStateContext" +import { ExtensionStateContextProvider, useExtensionState } from "@/context/ExtensionStateContext" +import { ApiConfiguration } from "@shared/api" vi.mock("../../../context/ExtensionStateContext", async (importOriginal) => { const actual = await importOriginal() @@ -16,10 +17,20 @@ vi.mock("../../../context/ExtensionStateContext", async (importOriginal) => { }, setApiConfiguration: vi.fn(), uriScheme: "vscode", + requestyModels: {}, })), } }) +const mockExtensionState = (apiConfiguration: Partial) => { + vi.mocked(useExtensionState).mockReturnValue({ + apiConfiguration, + setApiConfiguration: vi.fn(), + uriScheme: "vscode", + requestyModels: {}, + } as any) +} + describe("ApiOptions Component", () => { vi.clearAllMocks() const mockPostMessage = vi.fn() @@ -27,6 +38,9 @@ describe("ApiOptions Component", () => { beforeEach(() => { //@ts-expect-error - vscode is not defined in the global namespace in test environment global.vscode = { postMessage: mockPostMessage } + mockExtensionState({ + apiProvider: "requesty", + }) }) it("renders Requesty API Key input", () => { @@ -45,28 +59,11 @@ describe("ApiOptions Component", () => { , ) - const modelIdInput = screen.getByPlaceholderText("Enter Model ID...") + const modelIdInput = screen.getByPlaceholderText("Search and select a model...") expect(modelIdInput).toBeInTheDocument() }) }) -vi.mock("../../../context/ExtensionStateContext", async (importOriginal) => { - const actual = await importOriginal() - return { - ...(actual || {}), - // your mocked methods - useExtensionState: vi.fn(() => ({ - apiConfiguration: { - apiProvider: "together", - requestyApiKey: "", - requestyModelId: "", - }, - setApiConfiguration: vi.fn(), - uriScheme: "vscode", - })), - } -}) - describe("ApiOptions Component", () => { vi.clearAllMocks() const mockPostMessage = vi.fn() @@ -74,6 +71,9 @@ describe("ApiOptions Component", () => { beforeEach(() => { //@ts-expect-error - vscode is not defined in the global namespace in test environment global.vscode = { postMessage: mockPostMessage } + mockExtensionState({ + apiProvider: "together", + }) }) it("renders Together API Key input", () => { @@ -97,24 +97,6 @@ describe("ApiOptions Component", () => { }) }) -vi.mock("../../../context/ExtensionStateContext", async (importOriginal) => { - const actual = await importOriginal() - return { - ...(actual || {}), - useExtensionState: vi.fn(() => ({ - apiConfiguration: { - apiProvider: "fireworks", - fireworksApiKey: "", - fireworksModelId: "", - fireworksModelMaxCompletionTokens: 2000, - fireworksModelMaxTokens: 4000, - }, - setApiConfiguration: vi.fn(), - uriScheme: "vscode", - })), - } -}) - describe("ApiOptions Component", () => { vi.clearAllMocks() const mockPostMessage = vi.fn() @@ -122,6 +104,14 @@ describe("ApiOptions Component", () => { beforeEach(() => { //@ts-expect-error - vscode is not defined in the global namespace in test environment global.vscode = { postMessage: mockPostMessage } + + mockExtensionState({ + apiProvider: "fireworks", + fireworksApiKey: "", + fireworksModelId: "", + fireworksModelMaxCompletionTokens: 2000, + fireworksModelMaxTokens: 4000, + }) }) it("renders Fireworks API Key input", () => { @@ -165,23 +155,6 @@ describe("ApiOptions Component", () => { }) }) -vi.mock("../../../context/ExtensionStateContext", async (importOriginal) => { - const actual = await importOriginal() - return { - ...(actual || {}), - // your mocked methods - useExtensionState: vi.fn(() => ({ - apiConfiguration: { - apiProvider: "openai", - requestyApiKey: "", - requestyModelId: "", - }, - setApiConfiguration: vi.fn(), - uriScheme: "vscode", - })), - } -}) - describe("OpenApiInfoOptions", () => { const mockPostMessage = vi.fn() @@ -189,6 +162,9 @@ describe("OpenApiInfoOptions", () => { vi.clearAllMocks() //@ts-expect-error - vscode is not defined in the global namespace in test environment global.vscode = { postMessage: mockPostMessage } + mockExtensionState({ + apiProvider: "openai", + }) }) it("renders OpenAI Supports Images input", () => { From 1700c0e4f88e81ba39bef08e8587e466c8087a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Barreiro?= <52393857+BarreiroT@users.noreply.github.com> Date: Mon, 19 May 2025 22:32:35 +0200 Subject: [PATCH 03/85] Run tests against Windows and Ubuntu (#3246) * add a matrix strategy for testing * Handle EOL on Windows * use bash as shell on every os and run the test-ci script * fix tsconfig path resolution using the __dirnname * print test results regardless of status * Limit artifact upload to Linux * update the test-cli * Add windows-specific dependencies as optional dependencies lightningcss-win32-x64-msvc rollup-win32-x64-msvc * Do not collect coverage on Windows * Use UTF-8 on the Python Scripts * force the ubuntu-latest name to be `test` --- .gitattributes | 2 ++ .github/workflows/test.yml | 35 ++++++++++++++++++++----- .prettierrc.json | 3 ++- package-lock.json | 18 ++++++------- package.json | 4 +-- scripts/test-ci.js | 2 +- test-setup.js | 7 +++-- webview-ui/package-lock.json | 50 +++--------------------------------- webview-ui/package.json | 4 ++- 9 files changed, 56 insertions(+), 69 deletions(-) diff --git a/.gitattributes b/.gitattributes index 92a294bf..9f1ff5fc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,4 @@ demo.gif filter=lfs diff=lfs merge=lfs -text assets/docs/demo.gif filter=lfs diff=lfs merge=lfs -text + +* text=auto eol=lf diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 03bf8388..df170e9c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,15 @@ permissions: jobs: test: - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + name: ${{ matrix.os == 'ubuntu-latest' && 'test' || format('test ({0})', matrix.os) }} + defaults: + run: + shell: bash steps: - name: Checkout code uses: actions/checkout@v4 @@ -60,6 +68,11 @@ jobs: if: steps.webview-cache.outputs.cache-hit != 'true' run: cd webview-ui && npm ci + - name: Set up NPM on Windows + if: runner.os == 'Windows' + run: | + npm config set script-shell "C:\\Program Files\\Git\\bin\\bash.exe" + - name: Type Check run: npm run check-types @@ -81,8 +94,9 @@ jobs: id: extension_coverage continue-on-error: true run: | - xvfb-run -a npm run test:coverage > extension_coverage.txt 2>&1 - PYTHONPATH=.github/scripts python -m coverage_check extract-coverage extension_coverage.txt --type=extension --github-output --verbose + node ./scripts/test-ci.js > extension_coverage.txt 2>&1 + # Default the encoding to UTF-8 - It's not the default on Windows + PYTHONUTF8=1 PYTHONPATH=.github/scripts python -m coverage_check extract-coverage extension_coverage.txt --type=extension --github-output --verbose # Run webview tests with coverage - name: Webview Tests with Coverage @@ -94,11 +108,14 @@ jobs: npm install --no-save @vitest/coverage-v8 npm run test:coverage > webview_coverage.txt 2>&1 cd .. - PYTHONPATH=.github/scripts python -m coverage_check extract-coverage webview-ui/webview_coverage.txt --type=webview --github-output --verbose + # Default the encoding to UTF-8 - It's not the default on Windows + PYTHONUTF8=1 PYTHONPATH=.github/scripts python -m coverage_check extract-coverage webview-ui/webview_coverage.txt --type=webview --github-output --verbose # Save coverage reports as artifacts (workflow-scoped) - name: Save Coverage Reports uses: actions/upload-artifact@v4 + # Only upload artifacts on Linux - We only need coverage from one OS + if: runner.os == 'Linux' with: name: pr-coverage-reports path: | @@ -107,14 +124,18 @@ jobs: retention-period: workflow # Artifacts are automatically deleted when the workflow completes # Set the check as failed if any of the tests failed - - name: Check for test failures + - name: Print test results and check for failures run: | + echo "Extension Tests Result: ${{ steps.extension_coverage.outcome }}" + cat extension_coverage.txt + + echo "Webview Tests Result: ${{ steps.webview_coverage.outcome }}" + cat webview-ui/webview_coverage.txt + # Check if any of the test steps failed # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#steps-context if [ "${{ steps.extension_coverage.outcome }}" != "success" ] || [ "${{ steps.webview_coverage.outcome }}" != "success" ]; then echo "Tests failed." - cat extension_coverage.txt - cat webview-ui/webview_coverage.txt exit 1 fi diff --git a/.prettierrc.json b/.prettierrc.json index f2cbe27c..98201ba7 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -3,5 +3,6 @@ "useTabs": true, "printWidth": 130, "semi": false, - "bracketSameLine": true + "bracketSameLine": true, + "endOfLine": "lf" } diff --git a/package-lock.json b/package-lock.json index 8619f093..9428e81d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -86,8 +86,8 @@ "@types/vscode": "^1.84.0", "@typescript-eslint/eslint-plugin": "^7.14.1", "@typescript-eslint/parser": "^7.11.0", - "@vscode/test-cli": "^0.0.9", - "@vscode/test-electron": "^2.4.0", + "@vscode/test-cli": "^0.0.10", + "@vscode/test-electron": "^2.4.1", "chai": "^4.3.10", "chalk": "^5.3.0", "esbuild": "^0.25.0", @@ -11473,9 +11473,9 @@ "license": "CC-BY-4.0" }, "node_modules/@vscode/test-cli": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/@vscode/test-cli/-/test-cli-0.0.9.tgz", - "integrity": "sha512-vsl5/ueE3Jf0f6XzB0ECHHMsd5A0Yu6StElb8a+XsubZW7kHNAOw4Y3TSSuDzKEpLnJ92nbMy1Zl+KLGCE6NaA==", + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/@vscode/test-cli/-/test-cli-0.0.10.tgz", + "integrity": "sha512-B0mMH4ia+MOOtwNiLi79XhA+MLmUItIC8FckEuKrVAVriIuSWjt7vv4+bF8qVFiNFe4QRfzPaIZk39FZGWEwHA==", "dev": true, "license": "MIT", "dependencies": { @@ -34535,9 +34535,9 @@ "integrity": "sha512-wsNOvNMMJ2BY8rC2N2MNBG7yOowV3ov8KlvUE/AiVUlHKTfWsw3OgAOQduX7h0Un6GssKD3aoTVH+TF3DSQwKQ==" }, "@vscode/test-cli": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/@vscode/test-cli/-/test-cli-0.0.9.tgz", - "integrity": "sha512-vsl5/ueE3Jf0f6XzB0ECHHMsd5A0Yu6StElb8a+XsubZW7kHNAOw4Y3TSSuDzKEpLnJ92nbMy1Zl+KLGCE6NaA==", + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/@vscode/test-cli/-/test-cli-0.0.10.tgz", + "integrity": "sha512-B0mMH4ia+MOOtwNiLi79XhA+MLmUItIC8FckEuKrVAVriIuSWjt7vv4+bF8qVFiNFe4QRfzPaIZk39FZGWEwHA==", "dev": true, "requires": { "@types/mocha": "^10.0.2", @@ -44188,4 +44188,4 @@ "dev": true } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 9ce31702..370aa500 100644 --- a/package.json +++ b/package.json @@ -292,8 +292,8 @@ "@types/vscode": "^1.84.0", "@typescript-eslint/eslint-plugin": "^7.14.1", "@typescript-eslint/parser": "^7.11.0", - "@vscode/test-cli": "^0.0.9", - "@vscode/test-electron": "^2.4.0", + "@vscode/test-cli": "^0.0.10", + "@vscode/test-electron": "^2.4.1", "chai": "^4.3.10", "chalk": "^5.3.0", "esbuild": "^0.25.0", diff --git a/scripts/test-ci.js b/scripts/test-ci.js index 26823a2b..ff069ad3 100644 --- a/scripts/test-ci.js +++ b/scripts/test-ci.js @@ -9,7 +9,7 @@ try { execSync("which xvfb-run", { stdio: "ignore" }) console.log("xvfb-run is installed. Running tests with xvfb-run...") - execSync("xvfb-run -a npm run test:integration", { stdio: "inherit" }) + execSync("xvfb-run -a npm run test:coverage", { stdio: "inherit" }) } else { console.log("Non-Linux environment detected. Running tests normally.") execSync("npm run test:integration", { stdio: "inherit" }) diff --git a/test-setup.js b/test-setup.js index 58f88d0c..a096b737 100644 --- a/test-setup.js +++ b/test-setup.js @@ -1,7 +1,10 @@ const tsConfigPaths = require("tsconfig-paths") const fs = require("fs") +const path = require("path") -const tsConfig = JSON.parse(fs.readFileSync("./tsconfig.json", "utf-8")) +const baseUrl = path.resolve(__dirname) + +const tsConfig = JSON.parse(fs.readFileSync(path.join(baseUrl, "tsconfig.json"), "utf-8")) /** * The aliases point towards the `src` directory. @@ -17,6 +20,6 @@ Object.keys(tsConfig.compilerOptions.paths).forEach((key) => { }) tsConfigPaths.register({ - baseUrl: ".", + baseUrl: baseUrl, paths: outPaths, }) diff --git a/webview-ui/package-lock.json b/webview-ui/package-lock.json index ebf79b3c..be56de8e 100644 --- a/webview-ui/package-lock.json +++ b/webview-ui/package-lock.json @@ -71,9 +71,11 @@ "optionalDependencies": { "@rollup/rollup-linux-arm64-gnu": "^4.40.0", "@rollup/rollup-linux-x64-gnu": "^4.40.0", + "@rollup/rollup-win32-x64-msvc": "^4.40.0", "@swc/core-linux-x64-gnu": "^1.11.0", "@tailwindcss/oxide-linux-x64-gnu": "^4.0.1", - "lightningcss-linux-x64-gnu": "^1.29.1" + "lightningcss-linux-x64-gnu": "^1.29.1", + "lightningcss-win32-x64-msvc": "1.29.2" } }, "node_modules/@adobe/css-tools": { @@ -5731,48 +5733,6 @@ "linux" ] }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.40.1.tgz", - "integrity": "sha512-2BRORitq5rQ4Da9blVovzNCMaUlyKrzMSvkVR0D4qPuOy/+pMCrh1d7o01RATwVy+6Fa1WBw+da7QPeLWU/1mQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.40.1.tgz", - "integrity": "sha512-b2bcNm9Kbde03H+q+Jjw9tSfhYkzrDUf2d5MAd1bOJuVplXvFhWz7tRtWvD8/ORZi7qSCy0idW6tf2HgxSXQSg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.40.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.40.1.tgz", - "integrity": "sha512-DfcogW8N7Zg7llVEfpqWMZcaErKfsj9VvmfSyRjCyo4BI3wPEfrzTtJkZG6gKP/Z92wFm6rz2aDO7/JfiR/whA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, "node_modules/@rollup/rollup-win32-x64-msvc": { "version": "4.40.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.40.1.tgz", @@ -5780,7 +5740,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -12208,7 +12167,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -17616,4 +17574,4 @@ } } } -} +} \ No newline at end of file diff --git a/webview-ui/package.json b/webview-ui/package.json index a9562efd..ed058aab 100644 --- a/webview-ui/package.json +++ b/webview-ui/package.json @@ -78,8 +78,10 @@ "optionalDependencies": { "@rollup/rollup-linux-arm64-gnu": "^4.40.0", "@rollup/rollup-linux-x64-gnu": "^4.40.0", + "@rollup/rollup-win32-x64-msvc": "^4.40.0", "@swc/core-linux-x64-gnu": "^1.11.0", "@tailwindcss/oxide-linux-x64-gnu": "^4.0.1", - "lightningcss-linux-x64-gnu": "^1.29.1" + "lightningcss-linux-x64-gnu": "^1.29.1", + "lightningcss-win32-x64-msvc": "1.29.2" } } From 5efbf77f7c02f7a4ea39e1151cad92e934009399 Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Mon, 19 May 2025 20:17:58 -0700 Subject: [PATCH 04/85] Migrate delete mcp server protobus (#3612) * migrate deleteMcpServer * changeset * changed to stringrequest --------- Co-authored-by: Elephant Lumps --- .changeset/wild-gifts-switch.md | 5 ++++ proto/mcp.proto | 1 + src/core/controller/index.ts | 7 +----- src/core/controller/mcp/deleteMcpServer.ts | 25 +++++++++++++++++++ src/core/controller/mcp/methods.ts | 2 ++ src/services/mcp/McpHub.ts | 21 ++++++++++------ src/shared/WebviewMessage.ts | 1 - src/shared/proto/mcp.ts | 8 ++++++ src/standalone/server-setup.ts | 2 ++ .../tabs/installed/server-row/ServerRow.tsx | 16 +++++++++--- 10 files changed, 70 insertions(+), 18 deletions(-) create mode 100644 .changeset/wild-gifts-switch.md create mode 100644 src/core/controller/mcp/deleteMcpServer.ts diff --git a/.changeset/wild-gifts-switch.md b/.changeset/wild-gifts-switch.md new file mode 100644 index 00000000..6f57308b --- /dev/null +++ b/.changeset/wild-gifts-switch.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Migrate the deleteMcpServer message to protobus diff --git a/proto/mcp.proto b/proto/mcp.proto index 0625dc31..572728bd 100644 --- a/proto/mcp.proto +++ b/proto/mcp.proto @@ -12,6 +12,7 @@ service McpService { rpc addRemoteMcpServer(AddRemoteMcpServerRequest) returns (McpServers); rpc downloadMcp(StringRequest) returns (Empty); rpc restartMcpServer(StringRequest) returns (McpServers); + rpc deleteMcpServer(StringRequest) returns (McpServers); } message ToggleMcpServerRequest { diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 8bb36060..078f8f4d 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -482,12 +482,7 @@ export class Controller { this.refreshTotalTasksSize() break } - case "deleteMcpServer": { - if (message.serverName) { - this.mcpHub?.deleteServer(message.serverName) - } - break - } + case "fetchLatestMcpServersFromHub": { this.mcpHub?.sendLatestMcpServers() break diff --git a/src/core/controller/mcp/deleteMcpServer.ts b/src/core/controller/mcp/deleteMcpServer.ts new file mode 100644 index 00000000..d3a171e8 --- /dev/null +++ b/src/core/controller/mcp/deleteMcpServer.ts @@ -0,0 +1,25 @@ +import type { Controller } from "../index" +import type { McpServers } from "../../../shared/proto/mcp" +import { convertMcpServersToProtoMcpServers } from "../../../shared/proto-conversions/mcp/mcp-server-conversion" +import { StringRequest } from "@/shared/proto/common" + +/** + * Deletes an MCP server + * @param controller The controller instance + * @param request The delete server request + * @returns The list of remaining MCP servers after deletion + */ +export async function deleteMcpServer(controller: Controller, request: StringRequest): Promise { + try { + // Call the RPC variant to delete the server and get updated server list + const mcpServers = (await controller.mcpHub?.deleteServerRPC(request.value)) || [] + + // Convert application types to protobuf types + const protoServers = convertMcpServersToProtoMcpServers(mcpServers) + + return { mcpServers: protoServers } + } catch (error) { + console.error(`Failed to delete MCP server: ${error}`) + throw error + } +} diff --git a/src/core/controller/mcp/methods.ts b/src/core/controller/mcp/methods.ts index 3f7fd416..6f1455d4 100644 --- a/src/core/controller/mcp/methods.ts +++ b/src/core/controller/mcp/methods.ts @@ -4,6 +4,7 @@ // Import all method implementations import { registerMethod } from "./index" import { addRemoteMcpServer } from "./addRemoteMcpServer" +import { deleteMcpServer } from "./deleteMcpServer" import { downloadMcp } from "./downloadMcp" import { restartMcpServer } from "./restartMcpServer" import { toggleMcpServer } from "./toggleMcpServer" @@ -13,6 +14,7 @@ import { updateMcpTimeout } from "./updateMcpTimeout" export function registerAllMethods(): void { // Register each method with the registry registerMethod("addRemoteMcpServer", addRemoteMcpServer) + registerMethod("deleteMcpServer", deleteMcpServer) registerMethod("downloadMcp", downloadMcp) registerMethod("restartMcpServer", restartMcpServer) registerMethod("toggleMcpServer", toggleMcpServer) diff --git a/src/services/mcp/McpHub.ts b/src/services/mcp/McpHub.ts index f7021347..40fe03e5 100644 --- a/src/services/mcp/McpHub.ts +++ b/src/services/mcp/McpHub.ts @@ -883,7 +883,12 @@ export class McpHub { } } - public async deleteServer(serverName: string) { + /** + * RPC variant of deleteServer that returns the updated server list directly + * @param serverName The name of the server to delete + * @returns Array of remaining MCP servers + */ + public async deleteServerRPC(serverName: string): Promise { try { const settingsPath = await this.getMcpSettingsFilePath() const content = await fs.readFile(settingsPath, "utf-8") @@ -891,21 +896,23 @@ export class McpHub { if (!config.mcpServers || typeof config.mcpServers !== "object") { config.mcpServers = {} } + if (config.mcpServers[serverName]) { delete config.mcpServers[serverName] const updatedConfig = { mcpServers: config.mcpServers, } await fs.writeFile(settingsPath, JSON.stringify(updatedConfig, null, 2)) - await this.updateServerConnections(config.mcpServers) - vscode.window.showInformationMessage(`Deleted ${serverName} MCP server`) + await this.updateServerConnectionsRPC(config.mcpServers) + + // Get the servers in their correct order from settings + const serverOrder = Object.keys(config.mcpServers || {}) + return this.getSortedMcpServers(serverOrder) } else { - vscode.window.showWarningMessage(`${serverName} not found in MCP configuration`) + throw new Error(`${serverName} not found in MCP configuration`) } } catch (error) { - vscode.window.showErrorMessage( - `Failed to delete MCP server: ${error instanceof Error ? error.message : String(error)}`, - ) + console.error(`Failed to delete MCP server: ${error instanceof Error ? error.message : String(error)}`) throw error } } diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 3fdfe844..75f6813b 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -20,7 +20,6 @@ export interface WebviewMessage { | "showChatView" | "refreshClineRules" | "openMcpSettings" - | "deleteMcpServer" | "autoApprovalSettings" | "browserRelaunchResult" | "togglePlanActMode" diff --git a/src/shared/proto/mcp.ts b/src/shared/proto/mcp.ts index 24496104..a4b9563b 100644 --- a/src/shared/proto/mcp.ts +++ b/src/shared/proto/mcp.ts @@ -1020,6 +1020,14 @@ export const McpServiceDefinition = { responseStream: false, options: {}, }, + deleteMcpServer: { + name: "deleteMcpServer", + requestType: StringRequest, + requestStream: false, + responseType: McpServers, + responseStream: false, + options: {}, + }, }, } as const diff --git a/src/standalone/server-setup.ts b/src/standalone/server-setup.ts index f38e3aea..363dec7f 100644 --- a/src/standalone/server-setup.ts +++ b/src/standalone/server-setup.ts @@ -35,6 +35,7 @@ import { updateMcpTimeout } from "../core/controller/mcp/updateMcpTimeout" import { addRemoteMcpServer } from "../core/controller/mcp/addRemoteMcpServer" import { downloadMcp } from "../core/controller/mcp/downloadMcp" import { restartMcpServer } from "../core/controller/mcp/restartMcpServer" +import { deleteMcpServer } from "../core/controller/mcp/deleteMcpServer" // Models Service import { getOllamaModels } from "../core/controller/models/getOllamaModels" @@ -119,6 +120,7 @@ export function addServices( addRemoteMcpServer: wrapper(addRemoteMcpServer, controller), downloadMcp: wrapper(downloadMcp, controller), restartMcpServer: wrapper(restartMcpServer, controller), + deleteMcpServer: wrapper(deleteMcpServer, controller), }) // Models Service diff --git a/webview-ui/src/components/mcp/configuration/tabs/installed/server-row/ServerRow.tsx b/webview-ui/src/components/mcp/configuration/tabs/installed/server-row/ServerRow.tsx index b00a512e..3d05f6ae 100644 --- a/webview-ui/src/components/mcp/configuration/tabs/installed/server-row/ServerRow.tsx +++ b/webview-ui/src/components/mcp/configuration/tabs/installed/server-row/ServerRow.tsx @@ -117,10 +117,18 @@ const ServerRow = ({ const handleDelete = () => { setIsDeleting(true) - vscode.postMessage({ - type: "deleteMcpServer", - serverName: server.name, - }) + McpServiceClient.deleteMcpServer({ + value: server.name, + } as StringRequest) + .then((response: McpServers) => { + const mcpServers = convertProtoMcpServersToMcpServers(response.mcpServers) + setMcpServers(mcpServers) + setIsDeleting(false) + }) + .catch((error) => { + console.error("Error deleting MCP server", error) + setIsDeleting(false) + }) } const handleAutoApproveChange = () => { From c47503affe77049e46df16a6832d23711cfe490e Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Mon, 19 May 2025 21:41:23 -0700 Subject: [PATCH 05/85] Migrate accountLogoutClicked protobus (#3652) * migrate accountLogoutClicked * changeset --------- Co-authored-by: Elephant Lumps --- .changeset/pink-deers-burn.md | 5 +++ proto/account.proto | 4 ++ .../account/accountLogoutClicked.ts | 14 +++++++ src/core/controller/account/methods.ts | 2 + src/core/controller/index.ts | 4 -- src/shared/WebviewMessage.ts | 1 - src/shared/proto/account.ts | 14 ++++++- src/standalone/server-setup.ts | 2 + .../src/components/account/AccountView.tsx | 4 +- .../settings/ClineAccountInfoCard.tsx | 39 ------------------- 10 files changed, 42 insertions(+), 47 deletions(-) create mode 100644 .changeset/pink-deers-burn.md create mode 100644 src/core/controller/account/accountLogoutClicked.ts diff --git a/.changeset/pink-deers-burn.md b/.changeset/pink-deers-burn.md new file mode 100644 index 00000000..f018cf44 --- /dev/null +++ b/.changeset/pink-deers-burn.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +migrate accountLogoutClicked to protobus diff --git a/proto/account.proto b/proto/account.proto index 21bf064e..31cb5176 100644 --- a/proto/account.proto +++ b/proto/account.proto @@ -12,4 +12,8 @@ service AccountService { // Generates a secure nonce for state validation, stores it in secrets, // and opens the authentication URL in the external browser. rpc accountLoginClicked(EmptyRequest) returns (String); + + // Handles the user clicking the logout button in the UI. + // Clears API keys and user state. + rpc accountLogoutClicked(EmptyRequest) returns (Empty); } diff --git a/src/core/controller/account/accountLogoutClicked.ts b/src/core/controller/account/accountLogoutClicked.ts new file mode 100644 index 00000000..787ff4a1 --- /dev/null +++ b/src/core/controller/account/accountLogoutClicked.ts @@ -0,0 +1,14 @@ +import type { Empty } from "../../../shared/proto/common" +import type { EmptyRequest } from "../../../shared/proto/common" +import type { Controller } from "../index" + +/** + * Handles the account logout action + * @param controller The controller instance + * @param _request The empty request object + * @returns Empty response + */ +export async function accountLogoutClicked(controller: Controller, _request: EmptyRequest): Promise { + await controller.handleSignOut() + return {} +} diff --git a/src/core/controller/account/methods.ts b/src/core/controller/account/methods.ts index 0d79b0df..287c3fe6 100644 --- a/src/core/controller/account/methods.ts +++ b/src/core/controller/account/methods.ts @@ -4,9 +4,11 @@ // Import all method implementations import { registerMethod } from "./index" import { accountLoginClicked } from "./accountLoginClicked" +import { accountLogoutClicked } from "./accountLogoutClicked" // Register all account service methods export function registerAllMethods(): void { // Register each method with the registry registerMethod("accountLoginClicked", accountLoginClicked) + registerMethod("accountLogoutClicked", accountLogoutClicked) } diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 078f8f4d..3f27de45 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -341,10 +341,6 @@ export class Controller { case "openMention": openMention(message.text) break - case "accountLogoutClicked": { - await this.handleSignOut() - break - } case "showAccountViewClicked": { await this.postMessageToWebview({ type: "action", action: "accountButtonClicked" }) break diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 75f6813b..5867ba49 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -26,7 +26,6 @@ export interface WebviewMessage { | "openExtensionSettings" | "requestVsCodeLmModels" | "toggleToolAutoApprove" - | "accountLogoutClicked" | "showAccountViewClicked" | "authStateChanged" | "authCallback" diff --git a/src/shared/proto/account.ts b/src/shared/proto/account.ts index 5a4af7e9..471e546f 100644 --- a/src/shared/proto/account.ts +++ b/src/shared/proto/account.ts @@ -5,7 +5,7 @@ // source: account.proto /* eslint-disable */ -import { EmptyRequest, String } from "./common" +import { Empty, EmptyRequest, String } from "./common" export const protobufPackage = "cline" @@ -28,5 +28,17 @@ export const AccountServiceDefinition = { responseStream: false, options: {}, }, + /** + * Handles the user clicking the logout button in the UI. + * Clears API keys and user state. + */ + accountLogoutClicked: { + name: "accountLogoutClicked", + requestType: EmptyRequest, + requestStream: false, + responseType: Empty, + responseStream: false, + options: {}, + }, }, } as const diff --git a/src/standalone/server-setup.ts b/src/standalone/server-setup.ts index 363dec7f..1daefab8 100644 --- a/src/standalone/server-setup.ts +++ b/src/standalone/server-setup.ts @@ -6,6 +6,7 @@ import { GrpcHandlerWrapper, GrpcStreamingResponseHandlerWrapper } from "./grpc- // Account Service import { accountLoginClicked } from "../core/controller/account/accountLoginClicked" +import { accountLogoutClicked } from "../core/controller/account/accountLogoutClicked" // Browser Service import { getBrowserConnectionInfo } from "../core/controller/browser/getBrowserConnectionInfo" @@ -83,6 +84,7 @@ export function addServices( // Account Service server.addService(proto.cline.AccountService.service, { accountLoginClicked: wrapper(accountLoginClicked, controller), + accountLogoutClicked: wrapper(accountLogoutClicked, controller), }) // Browser Service diff --git a/webview-ui/src/components/account/AccountView.tsx b/webview-ui/src/components/account/AccountView.tsx index 1483132b..c29536de 100644 --- a/webview-ui/src/components/account/AccountView.tsx +++ b/webview-ui/src/components/account/AccountView.tsx @@ -76,8 +76,8 @@ export const ClineAccountView = () => { } const handleLogout = () => { - // First notify extension to clear API keys and state - vscode.postMessage({ type: "accountLogoutClicked" }) + // Use gRPC client to notify extension to clear API keys and state + AccountServiceClient.accountLogoutClicked(EmptyRequest.create()).catch((err) => console.error("Failed to logout:", err)) // Then sign out of Firebase handleSignOut() } diff --git a/webview-ui/src/components/settings/ClineAccountInfoCard.tsx b/webview-ui/src/components/settings/ClineAccountInfoCard.tsx index b5999ebb..6199c132 100644 --- a/webview-ui/src/components/settings/ClineAccountInfoCard.tsx +++ b/webview-ui/src/components/settings/ClineAccountInfoCard.tsx @@ -17,13 +17,6 @@ export const ClineAccountInfoCard = () => { ) } - const handleLogout = () => { - // First notify extension to clear API keys and state - vscode.postMessage({ type: "accountLogoutClicked" }) - // Then sign out of Firebase - handleSignOut() - } - const handleShowAccount = () => { vscode.postMessage({ type: "showAccountViewClicked" }) } @@ -35,38 +28,6 @@ export const ClineAccountInfoCard = () => { View Billing & Usage ) : ( - //
- //
- // {user.photoURL ? ( - // Profile - // ) : ( - //
- // {user.displayName?.[0] || user.email?.[0] || "?"} - //
- // )} - //
- // {user.displayName && ( - //
- // {user.displayName} - //
- // )} - // {user.email && ( - //
- // {user.email} - //
- // )} - //
- - // - // Log out - // - //
- //
- //
- //
Sign Up with Cline From c3caec253f0467336ebf5981df9fb351aede97b1 Mon Sep 17 00:00:00 2001 From: canvrno <46584286+canvrno@users.noreply.github.com> Date: Mon, 19 May 2025 21:54:56 -0700 Subject: [PATCH 06/85] [PROTOBUS] Move togglePlanActMode to protobus (#3647) * togglePlanActMode protobus migration * metadata on request * Mode enum, removed metadata in request --- .changeset/hot-dodos-rhyme.md | 5 + proto/state.proto | 23 ++ src/core/controller/file/methods.ts | 2 + src/core/controller/index.ts | 5 - src/core/controller/state/methods.ts | 2 + .../controller/state/togglePlanActMode.ts | 32 ++ src/shared/WebviewMessage.ts | 1 - .../state/chat-settings-conversion.ts | 53 +++ src/shared/proto/state.ts | 329 +++++++++++++++++- src/standalone/server-setup.ts | 2 + webview-ui/package-lock.json | 2 +- .../src/components/chat/ChatTextArea.tsx | 3 +- .../src/components/settings/SettingsView.tsx | 3 +- 13 files changed, 450 insertions(+), 12 deletions(-) create mode 100644 .changeset/hot-dodos-rhyme.md create mode 100644 src/core/controller/state/togglePlanActMode.ts create mode 100644 src/shared/proto-conversions/state/chat-settings-conversion.ts diff --git a/.changeset/hot-dodos-rhyme.md b/.changeset/hot-dodos-rhyme.md new file mode 100644 index 00000000..ee14905c --- /dev/null +++ b/.changeset/hot-dodos-rhyme.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +togglePlanActMode protobus migration diff --git a/proto/state.proto b/proto/state.proto index 3b3aba3d..cb4cfda3 100644 --- a/proto/state.proto +++ b/proto/state.proto @@ -8,8 +8,31 @@ service StateService { rpc subscribeToState(EmptyRequest) returns (stream State); rpc toggleFavoriteModel(StringRequest) returns (Empty); rpc resetState(EmptyRequest) returns (Empty); + rpc togglePlanActMode(TogglePlanActModeRequest) returns (Empty); } message State { string state_json = 1; } + +message TogglePlanActModeRequest { + Metadata metadata = 1; + ChatSettings chat_settings = 2; + optional ChatContent chat_content = 3; +} + +enum PlanActMode { + PLAN = 0; + ACT = 1; +} + +message ChatSettings { + PlanActMode mode = 1; + optional string preferred_language = 2; + optional string open_ai_reasoning_effort = 3; +} + +message ChatContent { + optional string message = 1; + repeated string images = 2; +} diff --git a/src/core/controller/file/methods.ts b/src/core/controller/file/methods.ts index c8d71212..20dc5aa4 100644 --- a/src/core/controller/file/methods.ts +++ b/src/core/controller/file/methods.ts @@ -3,6 +3,7 @@ // Import all method implementations import { registerMethod } from "./index" +import { copyToClipboard } from "./copyToClipboard" import { createRuleFile } from "./createRuleFile" import { deleteRuleFile } from "./deleteRuleFile" import { getRelativePaths } from "./getRelativePaths" @@ -15,6 +16,7 @@ import { selectImages } from "./selectImages" // Register all file service methods export function registerAllMethods(): void { // Register each method with the registry + registerMethod("copyToClipboard", copyToClipboard) registerMethod("createRuleFile", createRuleFile) registerMethod("deleteRuleFile", deleteRuleFile) registerMethod("getRelativePaths", getRelativePaths) diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 3f27de45..b840ff6c 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -306,11 +306,6 @@ export class Controller { } } break - case "togglePlanActMode": - if (message.chatSettings) { - await this.togglePlanActModeWithChatSettings(message.chatSettings, message.chatContent) - } - break case "optionsResponse": await this.postMessageToWebview({ type: "invoke", diff --git a/src/core/controller/state/methods.ts b/src/core/controller/state/methods.ts index 44d6dd11..8ab69921 100644 --- a/src/core/controller/state/methods.ts +++ b/src/core/controller/state/methods.ts @@ -7,6 +7,7 @@ import { getLatestState } from "./getLatestState" import { resetState } from "./resetState" import { subscribeToState } from "./subscribeToState" import { toggleFavoriteModel } from "./toggleFavoriteModel" +import { togglePlanActMode } from "./togglePlanActMode" // Streaming methods for this service export const streamingMethods = ["subscribeToState"] @@ -18,4 +19,5 @@ export function registerAllMethods(): void { registerMethod("resetState", resetState) registerMethod("subscribeToState", subscribeToState, { isStreaming: true }) registerMethod("toggleFavoriteModel", toggleFavoriteModel) + registerMethod("togglePlanActMode", togglePlanActMode) } diff --git a/src/core/controller/state/togglePlanActMode.ts b/src/core/controller/state/togglePlanActMode.ts new file mode 100644 index 00000000..7d8cc4b8 --- /dev/null +++ b/src/core/controller/state/togglePlanActMode.ts @@ -0,0 +1,32 @@ +import { Controller } from ".." +import { Empty } from "../../../shared/proto/common" +import { TogglePlanActModeRequest } from "../../../shared/proto/state" +import { + convertProtoChatContentToChatContent, + convertProtoChatSettingsToChatSettings, +} from "@shared/proto-conversions/state/chat-settings-conversion" + +/** + * Toggles between Plan and Act modes + * @param controller The controller instance + * @param request The request containing the chat settings and optional chat content + * @returns An empty response + */ +export async function togglePlanActMode(controller: Controller, request: TogglePlanActModeRequest): Promise { + try { + if (!request.chatSettings) { + throw new Error("Chat settings are required") + } + + const chatSettings = convertProtoChatSettingsToChatSettings(request.chatSettings) + const chatContent = request.chatContent ? convertProtoChatContentToChatContent(request.chatContent) : undefined + + // Call the existing controller implementation + await controller.togglePlanActModeWithChatSettings(chatSettings, chatContent) + + return Empty.create() + } catch (error) { + console.error("Failed to toggle Plan/Act mode:", error) + throw error + } +} diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 5867ba49..0b16ff7f 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -22,7 +22,6 @@ export interface WebviewMessage { | "openMcpSettings" | "autoApprovalSettings" | "browserRelaunchResult" - | "togglePlanActMode" | "openExtensionSettings" | "requestVsCodeLmModels" | "toggleToolAutoApprove" diff --git a/src/shared/proto-conversions/state/chat-settings-conversion.ts b/src/shared/proto-conversions/state/chat-settings-conversion.ts new file mode 100644 index 00000000..6d405594 --- /dev/null +++ b/src/shared/proto-conversions/state/chat-settings-conversion.ts @@ -0,0 +1,53 @@ +import { ChatContent } from "@shared/ChatContent" +import { ChatSettings } from "@shared/ChatSettings" +import { ChatContent as ProtoChatContent, ChatSettings as ProtoChatSettings, PlanActMode } from "../../../shared/proto/state" + +/** + * Converts domain ChatSettings objects to proto ChatSettings objects + */ +export function convertChatSettingsToProtoChatSettings(chatSettings: ChatSettings): ProtoChatSettings { + return { + mode: chatSettings.mode === "plan" ? PlanActMode.PLAN : PlanActMode.ACT, + preferredLanguage: chatSettings.preferredLanguage, + openAiReasoningEffort: chatSettings.openAIReasoningEffort, + } +} + +/** + * Converts proto ChatSettings objects to domain ChatSettings objects + */ +export function convertProtoChatSettingsToChatSettings(protoChatSettings: ProtoChatSettings): ChatSettings { + return { + mode: protoChatSettings.mode === PlanActMode.PLAN ? "plan" : "act", + preferredLanguage: protoChatSettings.preferredLanguage, + openAIReasoningEffort: protoChatSettings.openAiReasoningEffort as "low" | "medium" | "high" | undefined, + } +} + +/** + * Converts domain ChatContent objects to proto ChatContent objects + */ +export function convertChatContentToProtoChatContent(chatContent?: ChatContent): ProtoChatContent | undefined { + if (!chatContent) { + return undefined + } + + return { + message: chatContent.message, + images: chatContent.images || [], + } +} + +/** + * Converts proto ChatContent objects to domain ChatContent objects + */ +export function convertProtoChatContentToChatContent(protoChatContent?: ProtoChatContent): ChatContent | undefined { + if (!protoChatContent) { + return undefined + } + + return { + message: protoChatContent.message, + images: protoChatContent.images || [], + } +} diff --git a/src/shared/proto/state.ts b/src/shared/proto/state.ts index d0c617bf..de3c8676 100644 --- a/src/shared/proto/state.ts +++ b/src/shared/proto/state.ts @@ -6,14 +6,64 @@ /* eslint-disable */ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { Empty, EmptyRequest, StringRequest } from "./common" +import { Empty, EmptyRequest, Metadata, StringRequest } from "./common" export const protobufPackage = "cline" +export enum PlanActMode { + PLAN = 0, + ACT = 1, + UNRECOGNIZED = -1, +} + +export function planActModeFromJSON(object: any): PlanActMode { + switch (object) { + case 0: + case "PLAN": + return PlanActMode.PLAN + case 1: + case "ACT": + return PlanActMode.ACT + case -1: + case "UNRECOGNIZED": + default: + return PlanActMode.UNRECOGNIZED + } +} + +export function planActModeToJSON(object: PlanActMode): string { + switch (object) { + case PlanActMode.PLAN: + return "PLAN" + case PlanActMode.ACT: + return "ACT" + case PlanActMode.UNRECOGNIZED: + default: + return "UNRECOGNIZED" + } +} + export interface State { stateJson: string } +export interface TogglePlanActModeRequest { + metadata?: Metadata | undefined + chatSettings?: ChatSettings | undefined + chatContent?: ChatContent | undefined +} + +export interface ChatSettings { + mode: PlanActMode + preferredLanguage?: string | undefined + openAiReasoningEffort?: string | undefined +} + +export interface ChatContent { + message?: string | undefined + images: string[] +} + function createBaseState(): State { return { stateJson: "" } } @@ -72,6 +122,275 @@ export const State: MessageFns = { }, } +function createBaseTogglePlanActModeRequest(): TogglePlanActModeRequest { + return { metadata: undefined, chatSettings: undefined, chatContent: undefined } +} + +export const TogglePlanActModeRequest: MessageFns = { + encode(message: TogglePlanActModeRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.metadata !== undefined) { + Metadata.encode(message.metadata, writer.uint32(10).fork()).join() + } + if (message.chatSettings !== undefined) { + ChatSettings.encode(message.chatSettings, writer.uint32(18).fork()).join() + } + if (message.chatContent !== undefined) { + ChatContent.encode(message.chatContent, writer.uint32(26).fork()).join() + } + return writer + }, + + decode(input: BinaryReader | Uint8Array, length?: number): TogglePlanActModeRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = createBaseTogglePlanActModeRequest() + while (reader.pos < end) { + const tag = reader.uint32() + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break + } + + message.metadata = Metadata.decode(reader, reader.uint32()) + continue + } + case 2: { + if (tag !== 18) { + break + } + + message.chatSettings = ChatSettings.decode(reader, reader.uint32()) + continue + } + case 3: { + if (tag !== 26) { + break + } + + message.chatContent = ChatContent.decode(reader, reader.uint32()) + continue + } + } + if ((tag & 7) === 4 || tag === 0) { + break + } + reader.skip(tag & 7) + } + return message + }, + + fromJSON(object: any): TogglePlanActModeRequest { + return { + metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, + chatSettings: isSet(object.chatSettings) ? ChatSettings.fromJSON(object.chatSettings) : undefined, + chatContent: isSet(object.chatContent) ? ChatContent.fromJSON(object.chatContent) : undefined, + } + }, + + toJSON(message: TogglePlanActModeRequest): unknown { + const obj: any = {} + if (message.metadata !== undefined) { + obj.metadata = Metadata.toJSON(message.metadata) + } + if (message.chatSettings !== undefined) { + obj.chatSettings = ChatSettings.toJSON(message.chatSettings) + } + if (message.chatContent !== undefined) { + obj.chatContent = ChatContent.toJSON(message.chatContent) + } + return obj + }, + + create, I>>(base?: I): TogglePlanActModeRequest { + return TogglePlanActModeRequest.fromPartial(base ?? ({} as any)) + }, + fromPartial, I>>(object: I): TogglePlanActModeRequest { + const message = createBaseTogglePlanActModeRequest() + message.metadata = + object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined + message.chatSettings = + object.chatSettings !== undefined && object.chatSettings !== null + ? ChatSettings.fromPartial(object.chatSettings) + : undefined + message.chatContent = + object.chatContent !== undefined && object.chatContent !== null + ? ChatContent.fromPartial(object.chatContent) + : undefined + return message + }, +} + +function createBaseChatSettings(): ChatSettings { + return { mode: 0, preferredLanguage: undefined, openAiReasoningEffort: undefined } +} + +export const ChatSettings: MessageFns = { + encode(message: ChatSettings, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.mode !== 0) { + writer.uint32(8).int32(message.mode) + } + if (message.preferredLanguage !== undefined) { + writer.uint32(18).string(message.preferredLanguage) + } + if (message.openAiReasoningEffort !== undefined) { + writer.uint32(26).string(message.openAiReasoningEffort) + } + return writer + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ChatSettings { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = createBaseChatSettings() + while (reader.pos < end) { + const tag = reader.uint32() + switch (tag >>> 3) { + case 1: { + if (tag !== 8) { + break + } + + message.mode = reader.int32() as any + continue + } + case 2: { + if (tag !== 18) { + break + } + + message.preferredLanguage = reader.string() + continue + } + case 3: { + if (tag !== 26) { + break + } + + message.openAiReasoningEffort = reader.string() + continue + } + } + if ((tag & 7) === 4 || tag === 0) { + break + } + reader.skip(tag & 7) + } + return message + }, + + fromJSON(object: any): ChatSettings { + return { + mode: isSet(object.mode) ? planActModeFromJSON(object.mode) : 0, + preferredLanguage: isSet(object.preferredLanguage) ? globalThis.String(object.preferredLanguage) : undefined, + openAiReasoningEffort: isSet(object.openAiReasoningEffort) + ? globalThis.String(object.openAiReasoningEffort) + : undefined, + } + }, + + toJSON(message: ChatSettings): unknown { + const obj: any = {} + if (message.mode !== 0) { + obj.mode = planActModeToJSON(message.mode) + } + if (message.preferredLanguage !== undefined) { + obj.preferredLanguage = message.preferredLanguage + } + if (message.openAiReasoningEffort !== undefined) { + obj.openAiReasoningEffort = message.openAiReasoningEffort + } + return obj + }, + + create, I>>(base?: I): ChatSettings { + return ChatSettings.fromPartial(base ?? ({} as any)) + }, + fromPartial, I>>(object: I): ChatSettings { + const message = createBaseChatSettings() + message.mode = object.mode ?? 0 + message.preferredLanguage = object.preferredLanguage ?? undefined + message.openAiReasoningEffort = object.openAiReasoningEffort ?? undefined + return message + }, +} + +function createBaseChatContent(): ChatContent { + return { message: undefined, images: [] } +} + +export const ChatContent: MessageFns = { + encode(message: ChatContent, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.message !== undefined) { + writer.uint32(10).string(message.message) + } + for (const v of message.images) { + writer.uint32(18).string(v!) + } + return writer + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ChatContent { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = createBaseChatContent() + while (reader.pos < end) { + const tag = reader.uint32() + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break + } + + message.message = reader.string() + continue + } + case 2: { + if (tag !== 18) { + break + } + + message.images.push(reader.string()) + continue + } + } + if ((tag & 7) === 4 || tag === 0) { + break + } + reader.skip(tag & 7) + } + return message + }, + + fromJSON(object: any): ChatContent { + return { + message: isSet(object.message) ? globalThis.String(object.message) : undefined, + images: globalThis.Array.isArray(object?.images) ? object.images.map((e: any) => globalThis.String(e)) : [], + } + }, + + toJSON(message: ChatContent): unknown { + const obj: any = {} + if (message.message !== undefined) { + obj.message = message.message + } + if (message.images?.length) { + obj.images = message.images + } + return obj + }, + + create, I>>(base?: I): ChatContent { + return ChatContent.fromPartial(base ?? ({} as any)) + }, + fromPartial, I>>(object: I): ChatContent { + const message = createBaseChatContent() + message.message = object.message ?? undefined + message.images = object.images?.map((e) => e) || [] + return message + }, +} + export type StateServiceDefinition = typeof StateServiceDefinition export const StateServiceDefinition = { name: "StateService", @@ -109,6 +428,14 @@ export const StateServiceDefinition = { responseStream: false, options: {}, }, + togglePlanActMode: { + name: "togglePlanActMode", + requestType: TogglePlanActModeRequest, + requestStream: false, + responseType: Empty, + responseStream: false, + options: {}, + }, }, } as const diff --git a/src/standalone/server-setup.ts b/src/standalone/server-setup.ts index 1daefab8..b499cecd 100644 --- a/src/standalone/server-setup.ts +++ b/src/standalone/server-setup.ts @@ -55,6 +55,7 @@ import { getLatestState } from "../core/controller/state/getLatestState" import { subscribeToState } from "../core/controller/state/subscribeToState" import { toggleFavoriteModel } from "../core/controller/state/toggleFavoriteModel" import { resetState } from "../core/controller/state/resetState" +import { togglePlanActMode } from "../core/controller/state/togglePlanActMode" // Task Service import { cancelTask } from "../core/controller/task/cancelTask" @@ -147,6 +148,7 @@ export function addServices( subscribeToState: wrapStreamingResponse(subscribeToState, controller), toggleFavoriteModel: wrapper(toggleFavoriteModel, controller), resetState: wrapper(resetState, controller), + togglePlanActMode: wrapper(togglePlanActMode, controller), }) // Task Service diff --git a/webview-ui/package-lock.json b/webview-ui/package-lock.json index be56de8e..3aa194dc 100644 --- a/webview-ui/package-lock.json +++ b/webview-ui/package-lock.json @@ -17574,4 +17574,4 @@ } } } -} \ No newline at end of file +} diff --git a/webview-ui/src/components/chat/ChatTextArea.tsx b/webview-ui/src/components/chat/ChatTextArea.tsx index cd45c342..c92f74f1 100644 --- a/webview-ui/src/components/chat/ChatTextArea.tsx +++ b/webview-ui/src/components/chat/ChatTextArea.tsx @@ -966,8 +966,7 @@ const ChatTextArea = forwardRef( } setTimeout(() => { const newMode = chatSettings.mode === "plan" ? "act" : "plan" - vscode.postMessage({ - type: "togglePlanActMode", + StateServiceClient.togglePlanActMode({ chatSettings: { mode: newMode, }, diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index 4714b747..81764225 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -115,8 +115,7 @@ const SettingsView = ({ onDone }: SettingsViewProps) => { switch (message.type) { case "didUpdateSettings": if (pendingTabChange) { - vscode.postMessage({ - type: "togglePlanActMode", + StateServiceClient.togglePlanActMode({ chatSettings: { mode: pendingTabChange, }, From 699d312dbbbc43c588518376be3f090e96bb0a7a Mon Sep 17 00:00:00 2001 From: pashpashpash Date: Tue, 20 May 2025 01:30:14 -0700 Subject: [PATCH 07/85] docs improvements (#3659) * docs improvements * new rule slash command no screenshot * docs * language --------- Co-authored-by: Cline Evaluation --- .clinerules/workflows/extension-release.md | 549 + docs/docs.json | 16 + docs/features/cline-rules.mdx | 162 + docs/features/slash-commands/new-rule.mdx | 42 + docs/features/slash-commands/new-task.mdx | 41 + docs/features/slash-commands/report-bug.mdx | 30 + .../slash-commands/slash-commands.mdx | 0 docs/features/slash-commands/smol.mdx | 47 + docs/features/slash-commands/workflows.mdx | 323 + docs/package-lock.json | 10118 ++++++++++++++++ docs/package.json | 16 + docs/prompting/prompt-engineering-guide.mdx | 206 - 12 files changed, 11344 insertions(+), 206 deletions(-) create mode 100644 .clinerules/workflows/extension-release.md create mode 100644 docs/features/cline-rules.mdx create mode 100644 docs/features/slash-commands/new-rule.mdx create mode 100644 docs/features/slash-commands/new-task.mdx create mode 100644 docs/features/slash-commands/report-bug.mdx create mode 100644 docs/features/slash-commands/slash-commands.mdx create mode 100644 docs/features/slash-commands/smol.mdx create mode 100644 docs/features/slash-commands/workflows.mdx create mode 100644 docs/package-lock.json create mode 100644 docs/package.json diff --git a/.clinerules/workflows/extension-release.md b/.clinerules/workflows/extension-release.md new file mode 100644 index 00000000..a9b03e71 --- /dev/null +++ b/.clinerules/workflows/extension-release.md @@ -0,0 +1,549 @@ +The goal of this workflow is to take a changeset for a release of Cline, an autonomous coding agent extension that plugs right into your IDE, and write the updated announcement component, and the updated changelog. + + +For reference, here are some examples of how we converted previous changesets to announcement components / changelogs. + + +- 3.14 + +This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or setup this action to publish automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. + +Releases +claude-dev@3.14.0 +Minor Changes +77c9863: create clinerules folder if its currently a file and creating new rule +0ffb7dd: disabling shift hint for now & improving tooltip behavior +79b76fd: Add support for custom model ID in AWS Bedrock provider, enabling use of Application Inference Profile. +eb6e481: Full support for LaTeX rendering +df37f29: Add support for custom API request timeout. Previously, timeouts were hardcoded to 30 seconds for providers like Ollama or 15 seconds for OpenRouter and Cline. Now users can set a custom timeout value in milliseconds through the settings interface. +e4d26be: allow cursorrules and windsurfrules +c5de50f: Fix Handle @withRetry() SyntaxError when running extension locally issue +61d2f42: enabled pricing calculation for gemini and vertex + more robust caching & cache tracking for gemini & vertex +aed152b: add truncation notice when truncating manually +2fe2405: Migrate Cline Tools Section to new docs +19cc8bc: Add a timeout setting for the terminal connection, allowing users to adjust this if they are having timeout issues +03d4410: Added copy button to code blocks. +c78fe23: addressed race condition in terminal command usage +91e222f: add checkpoints after more messages +14230e7: add newrule slash command +1c7d33a: Add remote config with posthog allowing for disabling new features until they're reading, making for a better developer experience. +4196c14: add cache ui for open router and cline provider +d97424f: showing expanded task by default +5294e78: Refactor to not pass a message for showing the MCP View from the servers modal +70cc437: Fix Windows path issue: Correct handling of import.meta.url to avoid leading slash in pathname +4b697d8: Migrate the addRemoteServer to protobus +Patch Changes +c63d9a1: updated drag and drop text to say "drop" instead of "drag" +459adf0: Add markdown copy to chat +74ec823: Minor UX improvement to drag and drop ux +b0961f4: Remove linear pull request action +e9ce384: searchCommits protobus migration +5802b68: createRuleFile protobus migration +df7f9fc: Add dependsOn to more blocks in the tasks.json +41ae732: Fix for git commit mentions in repos with no git commits +7e78445: Adding args to allow Cursor to open workspaces (for checkpoint testing/development) +bdfda6f: feat(bedrock): Introduce Amazon Nova Premier +65243ad: Introduce UI library for future UI development +4565e06: checkIsImageURL migrated to protobus +5a8e9d8: protobus migration for openImage +deeda6e: Lowering Gemini cache TTL time +db0b022: Adding UI to show openrouter balance next to provider +4650ffa: deleteRuleFile protobus migration +d4bd755: fix cost calculation + + + +## [3.14.0] + +- Add UI to show openrouter balance next to provider +- Add support for custom model ID in AWS Bedrock provider, enabling use of Application Inference Profile (Thanks @clicube!) +- Add more robust caching & cache tracking for gemini & vertex providers +- Add support for LaTeX rendering +- Add support for custom API request timeout. Timeouts were 15-30s, but can now be configured via settings for OpenRouter/Cline & Ollama (Thanks @WingsDrafterwork!) +- Add truncation notice when truncating manually +- Add a timeout setting for the terminal connection, allowing users to set a time to wait for terminal startup +- Add copy button to code blocks +- Add copy button to markdown blocks (Thanks @weshoke!) +- Add checkpoints to more messages +- Add slash command to create a new rules file (/newrule) +- Add cache ui for open router and cline provider +- Add Amazon Nova Premier model to Bedrock (Thanks @watany!) +- Add support for cursorrules and windsurfrules +- Add support for batch history deletion (Thanks @danix800!) +- Improve Drag & Drop experience +- Create clinerules folder creating new rule if it's needed +- Enable pricing calculation for gemini and vertex providers +- Refactor message handling to not show the MCP View of the server modal +- Migrate the addRemoteServer to protobus (Thanks @DaveFres!) +- Update task header to be expanded by default +- Update Gemini cache TTL time to 15 minutes +- Fix race condition in terminal command usage +- Fix to correctly handle `import.meta.url`, avoiding leading slash in pathname for Windows (Thanks @DaveFres!) +- Fix @withRetry() decoration syntax error when running extension locally (Thanks @DaveFres!) +- Fix for git commit mentions in repos with no git commits +- Fix cost calculation (Thanks @BarreiroT!) + + + + +const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => { + const minorVersion = version.split(".").slice(0, 2).join(".") // 2.0.0 -> 2.0 + return ( +
+ + + +

+ 🎉{" "}New in v{minorVersion} +

+
    +
  • + Gemini prompt caching: Gemini and Vertex providers now support prompt caching and price tracking for + Gemini models. +
  • +
  • + Copy Buttons: Buttons were added to Markdown and Code blocks that allow you to copy their contents + easily. +
  • +
  • + /newrule command: New slash command to have cline write your .clinerules for you based on your + workflow. +
  • +
  • + Drag and drop improvements: Don't forget to hold shift while dragging files! +
  • +
  • Added more checkpoints across the task, allowing you to restore from more than just file changes.
  • +
  • Added support for rendering LaTeX in message responses. (Try asking Cline to show the quadratic formula)
  • +
+ + +
    +
  • + Global Cline Rules: store multiple rules files in Documents/Cline/Rules to share between + projects. +
  • +
  • + Cline Rules Popup: New button in the chat area to view workspace and global cline rules files + to plug and play specific rules for the task +
  • +
  • + Slash Commands: Type / in chat to see the list of quick actions, like starting a + new task (more coming soon!) +
  • +
  • + Edit Messages: You can now edit a message you sent previously by clicking on it. Optionally + restore your project when the message was sent! +
  • +
+
+
+ + {/* + // Leave this here for an example of how to structure the announcement +
    +
  • + OpenRouter now supports prompt caching! They also have much higher rate limits than other providers, + so I recommend trying them out. +
    + {!apiConfiguration?.openRouterApiKey && ( + + Get OpenRouter API Key + + )} + {apiConfiguration?.openRouterApiKey && apiConfiguration?.apiProvider !== "openrouter" && ( + { + vscode.postMessage({ + type: "apiConfiguration", + apiConfiguration: { ...apiConfiguration, apiProvider: "openrouter" }, + }) + }} + style={{ + transform: "scale(0.85)", + transformOrigin: "left center", + margin: "4px -30px 2px 0", + }}> + Switch to OpenRouter + + )} +
  • +
  • + Edit Cline's changes before accepting! When he creates or edits a file, you can modify his + changes directly in the right side of the diff view (+ hover over the 'Revert Block' arrow button in + the center to undo "{"// rest of code here"}" shenanigans) +
  • +
  • + New search_files tool that lets Cline perform regex searches in your project, letting + him refactor code, address TODOs and FIXMEs, remove dead code, and more! +
  • +
  • + When Cline runs commands, you can now type directly in the terminal (+ support for Python + environments) +
  • +
*/} +
+

+ Join us on{" "} + + X, + {" "} + + discord, + {" "} + or{" "} + + r/cline + + for more updates! +

+
+ ) +} + + +- 3.13 + + +Minor Changes +2964388: Added copy button to MermaidBlock component +75143a7: Add the ability to fetch from global cline rules files +Patch Changes +a0252e7: convert inline style to tailwind css of file SettingsView.tsx +ab59bd9: Add stream options back to xai provider +7276f50: Icons to indicate an action is occuring outside of the users workspace +0b19ba6: update to NEW model + + + +## [3.13.0] + +- Add Cline rules popover under the chat field, allowing you to easily add, enable & disable workspace level or global rule files +- Add new slash command menu letting you type “/“ to do quick actions like creating new tasks +- Add ability to edit past messages, with options to restore your workspace back to that point +- Allow sending a message when selecting an option provided by the question or plan tool +- Add command to jump to Cline's chat input +- Add support for OpenAI o3 & 4o-mini (Thanks @PeterDaveHello and @arafatkatze!) +- Add baseURL option for Google Gemini provider (Thanks @owengo and @olivierhub!) +- Add support for Azure's DeepSeek model. (Thanks @yt3trees!) +- Add ability for models that support it to receive image responses from MCP servers (Thanks @rikaaa0928!) +- Improve search and replace diff editing by making it more flexible with models that fail to follow structured output instructions. (Thanks @chi-cat!) +- Add detection of Ctrl+C termination in terminal, improving output reading issues +- Fix issue where some commands with large output would cause UI to freeze +- Fix token usage tracking issues with vertex provider (Thanks @mzsima!) +- Fix issue with xAI reasoning content not being parsed (Thanks @mrubens!) + + + +const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => { + const minorVersion = version.split(".").slice(0, 2).join(".") // 2.0.0 -> 2.0 + return ( +
+ + + +

+ 🎉{" "}New in v{minorVersion} +

+
    +
  • + Global Cline Rules: store multiple rules files in Documents/Cline/Rules to share between projects. +
  • +
  • + Cline Rules Popup: New button in the chat area to view workspace and global cline rules files to plug + and play specific rules for the task +
  • +
  • + Slash Commands: Type / in chat to see the list of quick actions, like starting a new task + (more coming soon!) +
  • +
  • + Edit Messages: You can now edit a message you sent previously by clicking on it. Optionally restore + your project when the message was sent! +
  • +
+

Previous Updates:

+
    +
  • + Model Favorites: You can now mark your favorite models when using Cline & OpenRouter providers for + quick access! +
  • +
  • + Faster Diff Editing: Improved animation performance for large files, plus a new indicator in chat + showing the number of edits Cline makes. +
  • +
  • + New Auto-Approve Options: Turn off Cline's ability to read and edit files outside your workspace. +
  • +
+ {/* + // Leave this here for an example of how to structure the announcement +
    +
  • + OpenRouter now supports prompt caching! They also have much higher rate limits than other providers, + so I recommend trying them out. +
    + {!apiConfiguration?.openRouterApiKey && ( + + Get OpenRouter API Key + + )} + {apiConfiguration?.openRouterApiKey && apiConfiguration?.apiProvider !== "openrouter" && ( + { + vscode.postMessage({ + type: "apiConfiguration", + apiConfiguration: { ...apiConfiguration, apiProvider: "openrouter" }, + }) + }} + style={{ + transform: "scale(0.85)", + transformOrigin: "left center", + margin: "4px -30px 2px 0", + }}> + Switch to OpenRouter + + )} +
  • +
  • + Edit Cline's changes before accepting! When he creates or edits a file, you can modify his + changes directly in the right side of the diff view (+ hover over the 'Revert Block' arrow button in + the center to undo "{"// rest of code here"}" shenanigans) +
  • +
  • + New search_files tool that lets Cline perform regex searches in your project, letting + him refactor code, address TODOs and FIXMEs, remove dead code, and more! +
  • +
  • + When Cline runs commands, you can now type directly in the terminal (+ support for Python + environments) +
  • +
*/} +
+

+ Join us on{" "} + + X, + {" "} + + discord, + {" "} + or{" "} + + r/cline + + for more updates! +

+
+ ) +} + + + +We have a changeset PR that automatically generated as new unreleased PRs are merged into main, the PR is always called "Changeset version bump" and the author is github-actions. + +The Changeset PR description looks something like this: + + +This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. + + +# Releases +## claude-dev@3.16.0 + +### Minor Changes + +- c6e8b04: Recent task list is now collapsible, allowing users to hide their recent tasks (e.g. when sharing their screen). +- aabe4ae: Add detection for new users to display special components +- 6c18d51: adds global endpoint for vertex ai users +- 080ed7c: Add Tailwind CSS IntelliSense to the the recommended extensions list +- 5147e28: new workflow feature + +### Patch Changes + +- c0b3c69: fix eternal loading states when the last message is a checkpoint +- 570ece3: selectImages protos migration +- 8d8452e: askResponse protobus migration +- cd1ff2a: Finishing the migration of Vscode Advanced settings to Settings Webview + + +The changeset pr is ALWAYS on the following branch: `changeset-release/main`. + +I have the `gh` command line tool set up and authenticated, so you have everything you need. + +The first step is to get the full diff from the changeset PR to look at the changes that were automatically made to the `CHANGELOG.md` file. By default it will automatically add a new section to the changelog.md file with the new version. The problem with the automatically generated section is that it just takes the text that the developers threw into their changeset files for each corresponding PR, and they can be pretty vague and bad. Additionally there's some stuff that is totally irrelevant for the end user, like minor refactoring changes. So I manually typically go in and update this section to be a proper changelog that will show up in our patchnotes. You can look at how the rest of the file is done because those are all good examples of us updating this to use good language for the end user. We usually put new features up top (and the most exciting flagship features at the very top), and then bug fixes/improvements at the bottom. Having some basic organization to the ordering of the bullet points by content is nice. But use common sense. + +To handle this process effectively, do the following: + +For each of the automatically generated bullet points in the Changelog.md, you should +1. Take the commit hash at the start of the bullet point, and use the `gh` command line tool find the PR that it was associated with. +2. Use the `gh` command to get the PR title/description/discussion to understand the context surrounding the PR. +3. Use the `gh` command line tool to get the full PR diff to fully understand the changes made in the code. +4. Synthesize that knowledge to determine (a) whether or not this change is relevant to end users and (b) what the text & ordering of the line should be. +5. Update the `CHANGELOG.md` accordingly + +Do this for every single item in the list from the autogenerated bullet points. We want to be diligent and have a full understanding of every feature so we can make the best changelog ever! + +Here are some principles for good changelogs from keepchangelog.com, a handy guide: + + +### Guiding Principles +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- The latest version comes first. + +### Bullet points in the changelog should follow these principles: +- Types of changes +- Added for new features. +- Changed for changes in existing functionality. +- Deprecated for soon-to-be removed features. +- Removed for now removed features. +- Fixed for any bug fixes. +- Security in case of vulnerabilities. + + +Lastly, when developers make a PR, they typically make a changeset. And they have 3 options when making the changeset: + +1. Patch +2. Minor +3. Major + +Sometimes they label something as minor when really it should just be a patch. Or vice versa. Because of this, the automatic version bump may be incorrect. So when starting out this workflow, you should use the tool to confirm with me whether or not this should be a patch bump (show the old version number and what the proposed new version number would be) or a minor bump. Part of the release process is making sure the version in package.json that is automatically changed actually corresponds with what we decided the bump should actually be based on the features. ALL these modifications happen in the `changeset-release/main` branch btw. + + +Before doing any of this, make sure you check out the `changeset-release/main` and pull the most recent up to date changes. Then perform all this work in that branch. + +New announcement banners should ONLY be made for minor version bumps or higher. That's another reason why double checking if the changelog warrants the bump is important. + +Also, SUPER important: For any external contributors that aren't part of the cline github organization, we always want to add a (Thanks @username!) at the end of the changelog to attribute them properly. We're an open source project and it's ethical to do this. + + +Once the changelog looks good, and the version number looks good, we gotta double check that the version number in the changelog has the brackets around it. And as a final step, double check the package.json version number matches the latest number in the changelog. And as the ultimate final step we run `npm run install:all` to make sure the package version number permiates through the lock file. + + + +# Cline Release Process - Detailed Sequence of Steps + +## Before Starting +1. First, examine the changeset PR without checking it out: + ```bash + gh pr view changeset-release/main + ``` + +2. View the PR diff to see the auto-generated CHANGELOG.md changes: + ```bash + gh pr diff changeset-release/main > changeset-diff.txt + cat changeset-diff.txt | grep -A 50 "CHANGELOG.md" + ``` + +## Initial Setup +3. Once you're ready to start, checkout and update the changeset release branch: + ```bash + git checkout changeset-release/main + git pull origin changeset-release/main + ``` + +## Analyzing Each Change +4. For each commit hash in the auto-generated changelog entries: + + a. Find the PR number associated with a commit hash: + ```bash + gh pr list --search "" --state merged + ``` + + b. Get PR details for better context: + ```bash + gh pr view + ``` + + c. Check if the contributor is external to determine if attribution is needed: + ```bash + # Extract username from PR + USERNAME=$(gh pr view --json author --jq .author.login) + + # Check if user is a member of the Cline organization + # this command is a bit finnicky, but it 100% works. + # if you see a `Error executing command: The command ran successfully, but we couldn't capture its output. Please proceed accordingly.` error, just retry it until you actually get the output + # don't make any assumptions, just retry the command to actually get the output and determine if they're external or not. + # no output means they are an external contributor, otherwise if there is output they are an internal contributor (part of our github org) + gh api "orgs/cline/members" --jq "map(.login)" | grep -i "pashpashpash" + ``` + + d. View the full PR diff to understand code changes: + ```bash + gh pr diff > pr-diff-.txt + cat pr-diff-.txt + ``` + +## Updating the Changelog +5. Based on PR analysis, update the CHANGELOG.md with user-friendly descriptions: + - Use the `` tool to edit the CHANGELOG.md file + - Group by feature type (Added, Changed, Fixed) + - Put most exciting features at the top + - Move bug fixes and small improvements to the bottom + - Use clear, end-user focused language + - For external contributors, add attribution at the end of the relevant entry: `(Thanks @username!)` + +## Version Number Verification +6. Confirm the version bump is appropriate: + - Check package.json to verify the auto-generated version number: + ```bash + cat package.json | grep "\"version\"" + ``` + - If the feature set doesn't warrant a minor bump, use the `` tool to modify package.json + +7. Ensure the version in CHANGELOG.md has brackets around it: + ``` + ## [3.16.0] + ``` + +## Creating the Announcement (for minor/major versions only) +8. If this is a minor version bump, create/update the announcement component: + - Use the `` tool to edit the src/views/components/announcement.tsx file + - Update the highlights based on key features + - Move previous version highlights to the "Previous Updates" section + - Use the previous announcement components as reference for structure + +## Finalizing the Release +9. Update dependencies with the new version number: + ```bash + npm run install:all + ``` + +10. Commit your changes: + ```bash + git add CHANGELOG.md package.json package-lock.json src/views/components/announcement.tsx + git commit -m "Update CHANGELOG.md and announcement for version 3.16.0" + ``` + +11. Push your changes to the changeset branch: + ```bash + git push origin changeset-release/main + ``` + +12. Check that your changes pushed successfully: + ```bash + git status + ``` + \ No newline at end of file diff --git a/docs/docs.json b/docs/docs.json index 83c93a5c..4ae24579 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -71,6 +71,22 @@ "group": "Improving Your Prompting Skills", "pages": ["prompting/prompt-engineering-guide", "prompting/cline-memory-bank"] }, + { + "group": "Features", + "pages": [ + "features/cline-rules", + "features/slash-commands/workflows", + { + "group": "Slash Commands", + "pages": [ + "features/slash-commands/new-task", + "features/slash-commands/new-rule", + "features/slash-commands/smol", + "features/slash-commands/report-bug" + ] + } + ] + }, { "group": "Exploring Cline's Tools", "pages": [ diff --git a/docs/features/cline-rules.mdx b/docs/features/cline-rules.mdx new file mode 100644 index 00000000..4b4ef28c --- /dev/null +++ b/docs/features/cline-rules.mdx @@ -0,0 +1,162 @@ +Cline Rules allow you to provide Cline with system-level guidance. Think of them as a persistent way to include context and preferences for your projects or globally for every conversation. + +## Creating a Rule + +You can create a rule by clicking the `+` button in the Rules tab. This will open a new file in your IDE which you can use to write your rule. + + + Create a Rule + + +Once you save the file: + +- Your rule will be stored in the `.clinerules/` directory in your project (if it's a Workspace Rule) +- Or in the `Documents/Cline/Rules` directory (if it's a Global Rule). + +You can also have Cline create a rule for you by using the [`/newrule` slash command](/features/slash-commands/new-rule) in the chat. + +```markdown Example Cline Rule Structure [expandable] +# Project Guidelines + +## Documentation Requirements + +- Update relevant documentation in /docs when modifying features +- Keep README.md in sync with new capabilities +- Maintain changelog entries in CHANGELOG.md + +## Architecture Decision Records + +Create ADRs in /docs/adr for: + +- Major dependency changes +- Architectural pattern changes +- New integration patterns +- Database schema changes + Follow template in /docs/adr/template.md + +## Code Style & Patterns + +- Generate API clients using OpenAPI Generator +- Use TypeScript axios template +- Place generated code in /src/generated +- Prefer composition over inheritance +- Use repository pattern for data access +- Follow error handling pattern in /src/utils/errors.ts + +## Testing Standards + +- Unit tests required for business logic +- Integration tests for API endpoints +- E2E tests for critical user flows +``` + +### Key Benefits + +1. **Version Controlled**: The `.clinerules` file becomes part of your project's source code +2. **Team Consistency**: Ensures consistent behavior across all team members +3. **Project-Specific**: Rules and standards tailored to each project's needs +4. **Institutional Knowledge**: Maintains project standards and practices in code + +Place the `.clinerules` file in your project's root directory: + +``` +your-project/ +├── .clinerules +├── src/ +├── docs/ +└── ... +``` + +Cline's system prompt, on the other hand, is not user-editable ([here's where you can find it](https://github.com/cline/cline/blob/main/src/core/prompts/system.ts)). For a broader look at prompt engineering best practices, check out [this resource](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview). + +### Tips for Writing Effective Cline Rules + +- Be Clear and Concise: Use simple language and avoid ambiguity. +- Focus on Desired Outcomes: Describe the results you want, not the specific steps. +- Test and Iterate: Experiment to find what works best for your workflow. + +### .clinerules/ Folder System + +``` +your-project/ +├── .clinerules/ # Folder containing active rules +│ ├── 01-coding.md # Core coding standards +│ ├── 02-documentation.md # Documentation requirements +│ └── current-sprint.md # Rules specific to current work +├── src/ +└── ... +``` + +Cline automatically processes **all Markdown files** inside the `.clinerules/` directory, combining them into a unified set of rules. The numeric prefixes (optional) help organize files in a logical sequence. + +#### Using a Rules Bank + +For projects with multiple contexts or teams, maintain a rules bank directory: + +``` +your-project/ +├── .clinerules/ # Active rules - automatically applied +│ ├── 01-coding.md +│ └── client-a.md +│ +├── clinerules-bank/ # Repository of available but inactive rules +│ ├── clients/ # Client-specific rule sets +│ │ ├── client-a.md +│ │ └── client-b.md +│ ├── frameworks/ # Framework-specific rules +│ │ ├── react.md +│ │ └── vue.md +│ └── project-types/ # Project type standards +│ ├── api-service.md +│ └── frontend-app.md +└── ... +``` + +#### Benefits of the Folder Approach + +1. **Contextual Activation**: Copy only relevant rules from the bank to the active folder +2. **Easier Maintenance**: Update individual rule files without affecting others +3. **Team Flexibility**: Different team members can activate rules specific to their current task +4. **Reduced Noise**: Keep the active ruleset focused and relevant + +#### Usage Examples + +Switch between client projects: + +```bash +# Switch to Client B project +rm .clinerules/client-a.md +cp clinerules-bank/clients/client-b.md .clinerules/ +``` + +Adapt to different tech stacks: + +```bash +# Frontend React project +cp clinerules-bank/frameworks/react.md .clinerules/ +``` + +#### Implementation Tips + +- Keep individual rule files focused on specific concerns +- Use descriptive filenames that clearly indicate the rule's purpose +- Consider git-ignoring the active `.clinerules/` folder while tracking the `clinerules-bank/` +- Create team scripts to quickly activate common rule combinations + +The folder system transforms your Cline rules from a static document into a dynamic knowledge system that adapts to your team's changing contexts and requirements. + +### Managing Rules with the Toggleable Popover + +To make managing both single `.clinerules` files and the folder system even easier, Cline v3.13 introduces a dedicated popover UI directly accessible from the chat interface. + +Located conveniently under the chat input field, this popover allows you to: + +- **Instantly See Active Rules:** View which global rules (from your user settings) and workspace rules (`.clinerules` file or folder contents) are currently active. +- **Quickly Toggle Rules:** Enable or disable specific rule files within your workspace `.clinerules/` folder with a single click. This is perfect for activating context-specific rules (like `react-rules.md` or `memory-bank.md`) only when needed. +- **Easily Add/Manage Rules:** Quickly create a workspace `.clinerules` file or folder if one doesn't exist, or add new rule files to an existing folder. + +This UI significantly simplifies switching contexts and managing different sets of instructions without needing to manually edit files or configurations during a conversation. + + + Cline Logo + diff --git a/docs/features/slash-commands/new-rule.mdx b/docs/features/slash-commands/new-rule.mdx new file mode 100644 index 00000000..c42d09fc --- /dev/null +++ b/docs/features/slash-commands/new-rule.mdx @@ -0,0 +1,42 @@ +--- +title: "New Rule Command" +sidebarTitle: "/newrule" +--- + +`/newrule` is a slash command that lets you teach Cline your preferred way of working. It creates a markdown file in your `.clinerules` directory that acts like persistent instructions for how Cline should behave when helping with your projects. + +Think of it as setting up house rules that Cline will always follow, so you don't have to repeat your preferences in every conversation. + +#### Using the `/newrule` Slash Command + +When you want Cline to consistently follow certain guidelines: + +- Type `/newrule` in the chat +- Cline will help you create a structured rule file by asking about your preferences for: + - Communication style (verbose vs. concise) + - Development workflows + - Coding standards + - Project context + - Any other specific guidelines +- You'll review the rule file before it's created +- Once approved, Cline creates a markdown file in your `.clinerules` directory that will automatically be loaded for future conversations + +#### Example + +I used `/newrule` when I was fed up with repeating the same instructions on every new task. I had specific preferences for how I wanted my React components structured, which testing library to use, and even my preferred variable naming style. + +Instead of typing these preferences each time, I just used `/newrule` and worked with Cline to create a detailed rule file. We built a markdown file that covered everything from code organization to my preference for functional components over class components. + +Now whenever I chat with Cline about my React project, it automatically follows these guidelines without me having to remind it. The best part is that I can create different rule files for different projects, so Cline adapts to whatever codebase I'm working on. + +#### Inspiration + +Here's how I use `/newrule` to make my development smoother: + +- I created a rule file for each major project with specific architectural patterns and library preferences, so Cline always generates code that matches our existing codebase. + +- For my team's shared projects, we have a common rule file that ensures consistent code style and documentation practices regardless of who's using Cline. + +- When working with legacy code, I made a rule file that reminds Cline about the quirks and constraints of the old system, so it never suggests modern approaches that won't integrate well. + +- I even have a personal rule file for my side projects with all my opinionated preferences - two-space indentation, arrow functions everywhere, and my exact folder structure requirements. diff --git a/docs/features/slash-commands/new-task.mdx b/docs/features/slash-commands/new-task.mdx new file mode 100644 index 00000000..03bd0d96 --- /dev/null +++ b/docs/features/slash-commands/new-task.mdx @@ -0,0 +1,41 @@ +--- +title: "New Task Command" +sidebarTitle: "/newtask" +--- + +`/newtask` is a slash command that works like a perfect developer handoff. It intelligently packages what matters - the overall plan, work accomplished, relevant files, and next steps - into a fresh task with a clean context window. All while leaving behind the noise of tool calls, documentation searches, and implementation details. + +It's exactly what you'd do when bringing a new developer onto your project: provide the essential context they need to continue the work without overwhelming them with every keystroke that came before. + +#### Using the `/newtask` Slash Command + +When your context window is filling up but you're not done with your project: + + + Using the /newtask slash command + + +- Type `/newtask` in the chat input field +- Cline will analyze your conversation and propose a distilled version of the context to carry forward +- You can refine this proposed context through conversation before committing +- Once satisfied, a button appears to create the new task with your refined context + +#### Example + +I regularly use `/newtask` when working through complex implementations with multiple steps. For instance, if I've completed 3 steps of a 10-step process and my context is already 75% full with documentation snippets, file contents, and detailed discussions. + +Rather than losing those insights or starting from scratch, I use `/newtask` to have Cline extract what matters - the key decisions, file changes, and progress so far - without all the noise of individual tool calls and research steps. + +I like to think of `/newtask` as a new developer joining the project. I need to give them the full understanding of the work that has been done, awareness of the relevant files, any other context that would be helpful, and where to go next. + +#### Inspiration + +Here are some popular ways to use `/newtask`: + +- I research complex APIs using the Context7 MCP server, filling my context with documentation. Once I understand the concepts, I use `/newtask` to start fresh with just the essential knowledge needed for implementation. +- After identifying the root cause of a tough bug through multiple debugging attempts and file explorations, I use `/newtask` to continue with a clean slate that includes the solution but discards all the failed attempts. +- When a client discussion explores multiple approaches and finally settles on one direction, I use `/newtask` to focus solely on implementing the chosen solution. +- For complex projects spanning multiple days, I use `/newtask` at logical stopping points to maintain a clean workspace while carrying forward my progress. diff --git a/docs/features/slash-commands/report-bug.mdx b/docs/features/slash-commands/report-bug.mdx new file mode 100644 index 00000000..cad10b3d --- /dev/null +++ b/docs/features/slash-commands/report-bug.mdx @@ -0,0 +1,30 @@ +--- +title: "Report Bug Command" +sidebarTitle: "/reportbug" +--- + +`/reportbug` is an absolute lifesaver when you hit a weird issue with Cline. Instead of having to remember all the details GitHub wants for a bug report, this command turns Cline into your personal bug reporting assistant. + +It walks you through collecting all the info needed for a proper bug report and then shoots it straight to our GitHub issues page with all the right formatting and system details included. + +#### Using the `/reportbug` Slash Command + +When you run into something funky that doesn't seem right: + +- Just type `/reportbug` in the chat +- Cline will guide you through all the details we need: + - A quick title describing the issue + - What actually happened vs. what you expected + - Steps to reproduce the bug + - Any relevant output or errors you saw + - Additional context that might help us fix it +- You'll get to review everything before it's submitted +- Once you approve, it opens a perfectly formatted GitHub issue with all your info plus automatic system details + +#### Example + +Last week I hit a weird bug where Cline kept timing out when reading large files. Instead of trying to remember all the GitHub template fields, I just typed `/reportbug` and Cline guided me through the whole process. + +It asked me about what I was trying to do, what happened instead, and the exact steps that led to the issue. The best part was that it automatically included my OS version, Cline version, and all the technical details our devs would need. + +A few seconds later, I had a properly formatted GitHub issue created without having to hunt down any of that info myself. diff --git a/docs/features/slash-commands/slash-commands.mdx b/docs/features/slash-commands/slash-commands.mdx new file mode 100644 index 00000000..e69de29b diff --git a/docs/features/slash-commands/smol.mdx b/docs/features/slash-commands/smol.mdx new file mode 100644 index 00000000..5aa74eba --- /dev/null +++ b/docs/features/slash-commands/smol.mdx @@ -0,0 +1,47 @@ +--- +title: "Smol Command" +sidebarTitle: "/smol" +--- + +`/smol` (or its alias, `/compact`) is a slash command that compresses your conversation history while preserving essential context. + +Unlike `/newtask` which creates a new task, `/smol` condenses your current conversation into a comprehensive summary, freeing up context window space while allowing you to continue working in the same task. + +Think of it like summarizing the relevant parts of a conversation while discarding the rest. + +#### Using the `/smol` Slash Command + +When your context window is getting full but you want to continue in the same task: + + + Using the /smol slash command + + +- Type `/smol` (or its alias `/compact`) in the chat input field +- Cline will analyze your conversation and create a detailed summary that preserves essential information +- You'll have a chance to review this summary and provide feedback if needed +- Once accepted, the detailed conversation history is replaced with this condensed version + +#### Example + +I use `/smol` when I'm deep into a complex debugging session and need to continue in the same task. After exploring multiple approaches and examining several files, my context window gets crowded with all the back-and-forth. + +By using `/smol`, I can condense all that exploration into a concise summary that captures what we've learned, which files we've examined, and what approaches we've tried. This frees up space to continue the debugging without losing the insights we've gained. + +The key difference from `/newtask` is that I'm staying in the same conversation flow rather than creating a separate task. This is particularly useful when I'm in the middle of something and don't want to context switch. + +#### Inspiration + +Here are powerful ways I use `/smol` in my workflow: + +- During lengthy brainstorming sessions, I use `/smol` to condense our exploration before implementing the chosen solution, all within the same task. +- When debugging complex issues that involve multiple file checks and test runs, I use `/smol` to summarize what we've learned while continuing the debugging process. +- For iterative development, I use `/smol` after completing each feature to compress the implementation details while keeping the key decisions and approaches accessible. +- When gathering requirements from multiple sources, I use `/smol` to distill the essential needs into a concise summary before moving to the design phase. + +#### Smol vs Newtask + +People often ask me when to use `/smol` vs `/newtask`. Frankly, it's a matter of personal preference and what you're trying to achieve. Here are some guidelines: + +- Use `/smol` when you're in the middle of something and want to keep going in the same task. It's perfect when you're deep in a debugging flow or brainstorming session and don't want to break your momentum. The downside? Once you compress your history, you can't get those detailed conversations back. +- Use `/newtask` when you're at a logical transition point and want to start fresh. It's great for moving from planning to implementation, or when you want to preserve your full conversation history (since it creates a new task rather than overwriting your current one). diff --git a/docs/features/slash-commands/workflows.mdx b/docs/features/slash-commands/workflows.mdx new file mode 100644 index 00000000..92fa4964 --- /dev/null +++ b/docs/features/slash-commands/workflows.mdx @@ -0,0 +1,323 @@ +--- +title: "Workflows" +sidebarTitle: "Workflows" +--- + +Workflows allow you to define a series of steps to guide Cline through a repetitive set of tasks, such as deploying a service or submitting a PR. + +To invoke a workflow, type `/[workflow-name.md]` in the chat. + +## How to Create and Use Workflows + +Workflows live alongside Cline Rules. Creating one is straightforward: + + + Workflows tab in Cline + + +1. Create a markdown file with clear instructions for the steps Cline should take +2. Save it with a `.md` extension in your workflows directory +3. To trigger a workflow, just type `/` followed by the workflow filename +4. Provide any required parameters when prompted + +The real power comes from how you structure your workflow files. You can: + +- Leverage Cline's built-in tools like `ask_followup_question`, `read_file`, and `search_files` +- Use command-line tools you already have installed like `gh` or `docker` +- Reference external MCP tool calls like Slack or Whatsapp +- Chain multiple actions together in a specific sequence + +## Real-world Example + +I created a PR Review workflow that's already saving me tons of time. + +````md pr-review.md [expandable] +You have access to the `gh` terminal command. I already authenticated it for you. Please review it to use the PR that I asked you to review. You're already in the `cline` repo. + + + +# GitHub PR Review Process - Detailed Sequence of Steps + +## 1. Gather PR Information + +1. Get the PR title, description, and comments: + + ```bash + gh pr view --json title,body,comments + ``` + +2. Get the full diff of the PR: + ```bash + gh pr diff + ``` + +## 2. Understand the Context + +1. Identify which files were modified in the PR: + + ```bash + gh pr view --json files + ``` + +2. Examine the original files in the main branch to understand the context: + + ```xml + + path/to/file + + ``` + +3. For specific sections of a file, you can use search_files: + ```xml + + path/to/directory + search term + *.ts + + ``` + +## 3. Analyze the Changes + +1. For each modified file, understand: + + - What was changed + - Why it was changed (based on PR description) + - How it affects the codebase + - Potential side effects + +2. Look for: + - Code quality issues + - Potential bugs + - Performance implications + - Security concerns + - Test coverage + +## 4. Ask for User Confirmation + +1. Before making a decision, ask the user if you should approve the PR, providing your assessment and justification: + + ```xml + + Based on my review of PR #, I recommend [approving/requesting changes]. Here's my justification: + + [Detailed justification with key points about the PR quality, implementation, and any concerns] + + Would you like me to proceed with this recommendation? + ["Yes, approve the PR", "Yes, request changes", "No, I'd like to discuss further"] + + ``` + +## 5. Ask if User Wants a Comment Drafted + +1. After the user decides on approval/rejection, ask if they would like a comment drafted: + + ```xml + + Would you like me to draft a comment for this PR that you can copy and paste? + ["Yes, please draft a comment", "No, I'll handle the comment myself"] + + ``` + +2. If the user wants a comment drafted, provide a well-structured comment they can copy: + + ``` + Thank you for this PR! Here's my assessment: + + [Detailed assessment with key points about the PR quality, implementation, and any suggestions] + + [Include specific feedback on code quality, functionality, and testing] + ``` + +## 6. Make a Decision + +1. Approve the PR if it meets quality standards: + + ```bash + gh pr review --approve --body "Your approval message" + ``` + +2. Request changes if improvements are needed: + ```bash + gh pr review --request-changes --body "Your feedback message" + ``` + + + + +# Example PR Review Process + +Let's walk through a real example of reviewing PR #3627 which fixes the thinking mode calculation for Claude 3.7 models. + +## Step 1: Gather PR Information + +```bash +# Get PR details +gh pr view 3627 --json title,body,comments + +# Get the full diff +gh pr diff 3627 +``` + +## Step 2: Understand the Context + +```xml +# Examine the original files to understand what's being changed + +src/shared/api.ts + + +# Look at the ThinkingBudgetSlider component implementation + +webview-ui/src/components/settings/ThinkingBudgetSlider.tsx + + +# Check how thinking mode is currently handled in API providers + +src/api/providers +reasoningOn +*.ts + +``` + +## Step 3: Analyze the Changes + +From the PR information and code examination, we can see that: + +1. The PR fixes an issue with the thinking mode budget calculation for Claude 3.7 models +2. Currently, the thinking budget is incorrectly calculated as 80% of maxTokens (8192), resulting in 6553 tokens +3. Claude 3.7 actually supports a much larger thinking budget (up to 64000 tokens) +4. The PR adds a `thinkingConfig` property with `maxBudget: 64000` to model definitions +5. It updates API handlers to use this value when reasoning mode is enabled +6. It enhances the slider component to calculate max values based on model-specific percentages +7. Comprehensive tests were added to verify the calculations + +## Step 4: Ask for User Confirmation + +```xml + +Based on my review of PR #3627, I recommend approving this PR. Here's my justification: + +1. The PR correctly fixes the thinking mode budget calculation for Claude 3.7 models +2. It properly implements the thinkingConfig.maxBudget property (64000) for Claude 3.7 models +3. It applies the appropriate percentage (50%) for the slider calculation +4. The changes are well-tested with comprehensive unit tests +5. The implementation is clean and follows the project's coding standards +6. The PR includes helpful screenshots demonstrating the fix + +Would you like me to proceed with approving this PR? +["Yes, approve the PR", "No, I'd like to discuss further", "Let me review it myself first"] + +``` + +## Step 5: Ask if User Wants a Comment Drafted + +```xml + +Would you like me to draft a comment for this PR that you can copy and paste? +["Yes, please draft a comment", "No, I'll handle the comment myself"] + +``` + +## Step 6: Make a Decision + +```bash +gh pr review 3627 --approve --body "This PR looks good! It correctly fixes the thinking mode budget calculation for Claude 3.7 models by using the appropriate maxBudget value (64000) and applying the right percentage (50%) for the slider. The changes are well-tested and the implementation is clean." +``` + + + + + +# Common GitHub CLI Commands for PR Review + +## Basic PR Commands + +```bash +# List open PRs +gh pr list + +# View a specific PR +gh pr view + +# View PR with specific fields +gh pr view --json title,body,comments,files,commits + +# Check PR status +gh pr status +``` + +## Diff and File Commands + +```bash +# Get the full diff of a PR +gh pr diff + +# List files changed in a PR +gh pr view --json files + +# Check out a PR locally +gh pr checkout +``` + +## Review Commands + +```bash +# Approve a PR +gh pr review --approve --body "Your approval message" + +# Request changes on a PR +gh pr review --request-changes --body "Your feedback message" + +# Add a comment review (without approval/rejection) +gh pr review --comment --body "Your comment message" +``` + +## Additional Commands + +```bash +# View PR checks status +gh pr checks + +# View PR commits +gh pr view --json commits + +# Merge a PR (if you have permission) +gh pr merge --merge +``` + + +```` + +When I get a new PR to review, I used to manually gather context: checking the PR description, examining the diff, looking at surrounding files, and finally forming an opinion. Now I just: + +1. Type `/pr-review.md` in chat +2. Paste in the PR number +3. Let Cline handle everything else + +My workflow uses the `gh` command-line tool to: + +- Pull the PR description and comments +- Examine the diff +- Check surrounding files for context +- Analyze potential issues +- Asks me if it's cool approve it if everything looks good, with justification for why it should be approved +- If I say "yes," Cline automatically approves the PR with the `gh` command + +This has taken my PR review process from a manual, multi-step operation to a single command that gives me everything I need to make an informed decision. + +> This is just one example of a workflow file. You can find more in our [prompts repository](https://github.com/cline/prompts) for inspiration. + +## Building Your Own Workflows + +The beauty of workflows is they're completely customizable to your needs. You might create workflows for all kinds of repetitive tasks: + +- For releases, you could have a workflow that grabs all merged PRs, builds a changelog, and handles version bumps. +- Setting up new projects is perfect for workflows. Just run one command to create your folder structure, install dependencies, and set up configs. +- Need to create a report? Create a workflow that grabs stats from different sources and formats them exactly how you like. You can even visualize them with a charting library and then make a presentation out of it with a library like [slidev](https://sli.dev/). +- You can even use workflows to draft messages to your team using an MCP server like Slack or Whatsapp after you submit a PR. + +With Workflows, your imagination is the limit. The true potential comes from spotting those annoying repetitive tasks you do all the time. + +If you can describe something as "first I do X, then Y, then Z" - that's a perfect workflow candidate. + +Start with something small that bugs you, turn it into a workflow, and keep refining it. You'll be shocked how much of your day can be automated this way. diff --git a/docs/package-lock.json b/docs/package-lock.json new file mode 100644 index 00000000..6a38d621 --- /dev/null +++ b/docs/package-lock.json @@ -0,0 +1,10118 @@ +{ + "name": "docs", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "docs", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "mintlify": "^4.0.538" + } + }, + "node_modules/@asyncapi/parser": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.4.0.tgz", + "integrity": "sha512-Sxn74oHiZSU6+cVeZy62iPZMFMvKp4jupMFHelSICCMw1qELmUHPvuZSr+ZHDmNGgHcEpzJM5HN02kR7T4g+PQ==", + "license": "Apache-2.0", + "dependencies": { + "@asyncapi/specs": "^6.8.0", + "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", + "@stoplight/json": "3.21.0", + "@stoplight/json-ref-readers": "^1.2.2", + "@stoplight/json-ref-resolver": "^3.1.5", + "@stoplight/spectral-core": "^1.18.3", + "@stoplight/spectral-functions": "^1.7.2", + "@stoplight/spectral-parsers": "^1.0.2", + "@stoplight/spectral-ref-resolver": "^1.0.3", + "@stoplight/types": "^13.12.0", + "@types/json-schema": "^7.0.11", + "@types/urijs": "^1.19.19", + "ajv": "^8.17.1", + "ajv-errors": "^3.0.0", + "ajv-formats": "^2.1.1", + "avsc": "^5.7.5", + "js-yaml": "^4.1.0", + "jsonpath-plus": "^10.0.0", + "node-fetch": "2.6.7" + } + }, + "node_modules/@asyncapi/specs": { + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.8.1.tgz", + "integrity": "sha512-czHoAk3PeXTLR+X8IUaD+IpT+g+zUvkcgMDJVothBsan+oHN3jfcFcFUNdOPAAFoUCQN1hXF1dWuphWy05THlA==", + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.11" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.3.tgz", + "integrity": "sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD", + "optional": true + }, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", + "integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz", + "integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz", + "integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz", + "integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz", + "integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==", + "cpu": [ + "arm" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz", + "integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-s390x": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz", + "integrity": "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==", + "cpu": [ + "s390x" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz", + "integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz", + "integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz", + "integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz", + "integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==", + "cpu": [ + "arm" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.0.5" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz", + "integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-linux-s390x": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz", + "integrity": "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==", + "cpu": [ + "s390x" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-s390x": "1.0.4" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz", + "integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz", + "integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz", + "integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-wasm32": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz", + "integrity": "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==", + "cpu": [ + "wasm32" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", + "optional": true, + "dependencies": { + "@emnapi/runtime": "^1.2.0" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-ia32": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz", + "integrity": "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==", + "cpu": [ + "ia32" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz", + "integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@inquirer/checkbox": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.1.6.tgz", + "integrity": "sha512-62u896rWCtKKE43soodq5e/QcRsA22I+7/4Ov7LESWnKRO6BVo2A1DFLDmXL9e28TB0CfHc3YtkbPm7iwajqkg==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.11", + "@inquirer/figures": "^1.0.11", + "@inquirer/type": "^3.0.6", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/confirm": { + "version": "5.1.10", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.10.tgz", + "integrity": "sha512-FxbQ9giWxUWKUk2O5XZ6PduVnH2CZ/fmMKMBkH71MHJvWr7WL5AHKevhzF1L5uYWB2P548o1RzVxrNd3dpmk6g==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.11", + "@inquirer/type": "^3.0.6" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/core": { + "version": "10.1.11", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.1.11.tgz", + "integrity": "sha512-BXwI/MCqdtAhzNQlBEFE7CEflhPkl/BqvAuV/aK6lW3DClIfYVDWPP/kXuXHtBWC7/EEbNqd/1BGq2BGBBnuxw==", + "license": "MIT", + "dependencies": { + "@inquirer/figures": "^1.0.11", + "@inquirer/type": "^3.0.6", + "ansi-escapes": "^4.3.2", + "cli-width": "^4.1.0", + "mute-stream": "^2.0.0", + "signal-exit": "^4.1.0", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/editor": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.11.tgz", + "integrity": "sha512-YoZr0lBnnLFPpfPSNsQ8IZyKxU47zPyVi9NLjCWtna52//M/xuL0PGPAxHxxYhdOhnvY2oBafoM+BI5w/JK7jw==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.11", + "@inquirer/type": "^3.0.6", + "external-editor": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/expand": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.13.tgz", + "integrity": "sha512-HgYNWuZLHX6q5y4hqKhwyytqAghmx35xikOGY3TcgNiElqXGPas24+UzNPOwGUZa5Dn32y25xJqVeUcGlTv+QQ==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.11", + "@inquirer/type": "^3.0.6", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/figures": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.11.tgz", + "integrity": "sha512-eOg92lvrn/aRUqbxRyvpEWnrvRuTYRifixHkYVpJiygTgVSBIHDqLh0SrMQXkafvULg3ck11V7xvR+zcgvpHFw==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/input": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.1.10.tgz", + "integrity": "sha512-kV3BVne3wJ+j6reYQUZi/UN9NZGZLxgc/tfyjeK3mrx1QI7RXPxGp21IUTv+iVHcbP4ytZALF8vCHoxyNSC6qg==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.11", + "@inquirer/type": "^3.0.6" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/number": { + "version": "3.0.13", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.13.tgz", + "integrity": "sha512-IrLezcg/GWKS8zpKDvnJ/YTflNJdG0qSFlUM/zNFsdi4UKW/CO+gaJpbMgQ20Q58vNKDJbEzC6IebdkprwL6ew==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.11", + "@inquirer/type": "^3.0.6" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/password": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.13.tgz", + "integrity": "sha512-NN0S/SmdhakqOTJhDwOpeBEEr8VdcYsjmZHDb0rblSh2FcbXQOr+2IApP7JG4WE3sxIdKytDn4ed3XYwtHxmJQ==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.11", + "@inquirer/type": "^3.0.6", + "ansi-escapes": "^4.3.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/prompts": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.5.1.tgz", + "integrity": "sha512-5AOrZPf2/GxZ+SDRZ5WFplCA2TAQgK3OYrXCYmJL5NaTu4ECcoWFlfUZuw7Es++6Njv7iu/8vpYJhuzxUH76Vg==", + "license": "MIT", + "dependencies": { + "@inquirer/checkbox": "^4.1.6", + "@inquirer/confirm": "^5.1.10", + "@inquirer/editor": "^4.2.11", + "@inquirer/expand": "^4.0.13", + "@inquirer/input": "^4.1.10", + "@inquirer/number": "^3.0.13", + "@inquirer/password": "^4.0.13", + "@inquirer/rawlist": "^4.1.1", + "@inquirer/search": "^3.0.13", + "@inquirer/select": "^4.2.1" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/rawlist": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.1.tgz", + "integrity": "sha512-VBUC0jPN2oaOq8+krwpo/mf3n/UryDUkKog3zi+oIi8/e5hykvdntgHUB9nhDM78RubiyR1ldIOfm5ue+2DeaQ==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.11", + "@inquirer/type": "^3.0.6", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/search": { + "version": "3.0.13", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.0.13.tgz", + "integrity": "sha512-9g89d2c5Izok/Gw/U7KPC3f9kfe5rA1AJ24xxNZG0st+vWekSk7tB9oE+dJv5JXd0ZSijomvW0KPMoBd8qbN4g==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.11", + "@inquirer/figures": "^1.0.11", + "@inquirer/type": "^3.0.6", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/select": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.2.1.tgz", + "integrity": "sha512-gt1Kd5XZm+/ddemcT3m23IP8aD8rC9drRckWoP/1f7OL46Yy2FGi8DSmNjEjQKtPl6SV96Kmjbl6p713KXJ/Jg==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.11", + "@inquirer/figures": "^1.0.11", + "@inquirer/type": "^3.0.6", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/type": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.6.tgz", + "integrity": "sha512-/mKVCtVpyBu3IDarv0G+59KC4stsD5mDsGpYh+GKs1NZT88Jh52+cuoA1AtLk2Q0r/quNl+1cSUyLRHBFeD0XA==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@jsep-plugin/assignment": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@jsep-plugin/assignment/-/assignment-1.3.0.tgz", + "integrity": "sha512-VVgV+CXrhbMI3aSusQyclHkenWSAm95WaiKrMxRFam3JSUiIaQjoMIw2sEs/OX4XifnqeQUN4DYbJjlA8EfktQ==", + "license": "MIT", + "engines": { + "node": ">= 10.16.0" + }, + "peerDependencies": { + "jsep": "^0.4.0||^1.0.0" + } + }, + "node_modules/@jsep-plugin/regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.4.tgz", + "integrity": "sha512-q7qL4Mgjs1vByCaTnDFcBnV9HS7GVPJX5vyVoCgZHNSC9rjwIlmbXG5sUuorR5ndfHAIlJ8pVStxvjXHbNvtUg==", + "license": "MIT", + "engines": { + "node": ">= 10.16.0" + }, + "peerDependencies": { + "jsep": "^0.4.0||^1.0.0" + } + }, + "node_modules/@jsep-plugin/ternary": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@jsep-plugin/ternary/-/ternary-1.1.4.tgz", + "integrity": "sha512-ck5wiqIbqdMX6WRQztBL7ASDty9YLgJ3sSAK5ZpBzXeySvFGCzIvM6UiAI4hTZ22fEcYQVV/zhUbNscggW+Ukg==", + "license": "MIT", + "engines": { + "node": ">= 10.16.0" + }, + "peerDependencies": { + "jsep": "^0.4.0||^1.0.0" + } + }, + "node_modules/@leichtgewicht/ip-codec": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", + "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==", + "license": "MIT" + }, + "node_modules/@mdx-js/mdx": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-3.1.0.tgz", + "integrity": "sha512-/QxEhPAvGwbQmy1Px8F899L5Uc2KZ6JtXwlCgJmjSTBedwOZkByYcBG4GceIGPXRDsmfxhHazuS+hlOShRLeDw==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdx": "^2.0.0", + "collapse-white-space": "^2.0.0", + "devlop": "^1.0.0", + "estree-util-is-identifier-name": "^3.0.0", + "estree-util-scope": "^1.0.0", + "estree-walker": "^3.0.0", + "hast-util-to-jsx-runtime": "^2.0.0", + "markdown-extensions": "^2.0.0", + "recma-build-jsx": "^1.0.0", + "recma-jsx": "^1.0.0", + "recma-stringify": "^1.0.0", + "rehype-recma": "^1.0.0", + "remark-mdx": "^3.0.0", + "remark-parse": "^11.0.0", + "remark-rehype": "^11.0.0", + "source-map": "^0.7.0", + "unified": "^11.0.0", + "unist-util-position-from-estree": "^2.0.0", + "unist-util-stringify-position": "^4.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@mdx-js/react": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-3.1.0.tgz", + "integrity": "sha512-QjHtSaoameoalGnKDT3FoIl4+9RwyTmo9ZJGBdLOks/YOiWHoRDI3PUwEzOE7kEmGcV3AFcp9K6dYu9rEuKLAQ==", + "license": "MIT", + "dependencies": { + "@types/mdx": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + }, + "peerDependencies": { + "@types/react": ">=16", + "react": ">=16" + } + }, + "node_modules/@mintlify/cli": { + "version": "4.0.536", + "resolved": "https://registry.npmjs.org/@mintlify/cli/-/cli-4.0.536.tgz", + "integrity": "sha512-000gMp5bumPmxDaN9uuorz34aZamsKfLzjzav3WT79MzC4yYxyJ4oFbqH8XGeS4JQn1BsB/NMu2plQnlZZiqIg==", + "license": "Elastic-2.0", + "dependencies": { + "@mintlify/common": "1.0.380", + "@mintlify/link-rot": "3.0.494", + "@mintlify/models": "0.0.193", + "@mintlify/prebuild": "1.0.491", + "@mintlify/previewing": "4.0.527", + "@mintlify/validation": "0.1.367", + "chalk": "^5.2.0", + "detect-port": "^1.5.1", + "fs-extra": "^11.2.0", + "inquirer": "^12.3.0", + "js-yaml": "^4.1.0", + "ora": "^6.1.2", + "yargs": "^17.6.0" + }, + "bin": { + "mint": "bin/index.js", + "mintlify": "bin/index.js" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@mintlify/common": { + "version": "1.0.380", + "resolved": "https://registry.npmjs.org/@mintlify/common/-/common-1.0.380.tgz", + "integrity": "sha512-GYg4ozOF7g36aFKvoYQhtoTnogA6xGbQjNL2W+M5gR7+VxLKJJuAS+xEjJXBi8aQAmxy2CP5KSqIP8csSbyHdg==", + "license": "ISC", + "dependencies": { + "@asyncapi/parser": "^3.4.0", + "@mintlify/mdx": "^1.0.1", + "@mintlify/models": "0.0.193", + "@mintlify/openapi-parser": "^0.0.7", + "@mintlify/validation": "0.1.367", + "@sindresorhus/slugify": "^2.1.1", + "acorn": "^8.11.2", + "estree-util-to-js": "^2.0.0", + "estree-walker": "^3.0.3", + "gray-matter": "^4.0.3", + "hast-util-from-html": "^2.0.3", + "hast-util-to-html": "^9.0.4", + "hast-util-to-text": "^4.0.2", + "is-absolute-url": "^4.0.1", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "mdast": "^3.0.0", + "mdast-util-from-markdown": "^2.0.2", + "mdast-util-mdx": "^3.0.0", + "mdast-util-mdx-jsx": "^3.1.3", + "micromark-extension-mdx-jsx": "^3.0.1", + "openapi-types": "^12.0.0", + "remark": "^15.0.1", + "remark-frontmatter": "^5.0.0", + "remark-gfm": "^4.0.0", + "remark-math": "^6.0.0", + "remark-mdx": "^3.1.0", + "remark-stringify": "^11.0.0", + "unified": "^11.0.5", + "unist-builder": "^4.0.0", + "unist-util-map": "^4.0.0", + "unist-util-remove": "^4.0.0", + "unist-util-remove-position": "^5.0.0", + "unist-util-visit": "^5.0.0", + "unist-util-visit-parents": "^6.0.1", + "vfile": "^6.0.3" + } + }, + "node_modules/@mintlify/link-rot": { + "version": "3.0.494", + "resolved": "https://registry.npmjs.org/@mintlify/link-rot/-/link-rot-3.0.494.tgz", + "integrity": "sha512-5lBfLPL2vfMQlU9o9cGWSep0sWFO4omW/hCoT7gV9Hehbyq915KRmvuXJ2kFksnByLKcT3RSh5WpnTgHnkGwew==", + "license": "Elastic-2.0", + "dependencies": { + "@mintlify/common": "1.0.380", + "@mintlify/prebuild": "1.0.491", + "fs-extra": "^11.1.0", + "is-absolute-url": "^4.0.1", + "unist-util-visit": "^4.1.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@mintlify/link-rot/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "license": "MIT" + }, + "node_modules/@mintlify/link-rot/node_modules/unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@mintlify/link-rot/node_modules/unist-util-visit": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", + "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0", + "unist-util-visit-parents": "^5.1.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@mintlify/link-rot/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@mintlify/mdx": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@mintlify/mdx/-/mdx-1.0.1.tgz", + "integrity": "sha512-zrzt8nxoIgJeSUeuJaC8pbd5EHKjCq30qV2HMoqIHLjeE0l7hkMgjBPNWNde7CYDPig1ODS1kPuE5Bnt+/+PIg==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.4", + "@types/unist": "^3.0.3", + "hast-util-to-string": "^3.0.1", + "next-mdx-remote-client": "^1.0.3", + "refractor": "^4.8.1", + "rehype-katex": "^7.0.1", + "remark-gfm": "^4.0.0", + "remark-math": "^6.0.0", + "remark-smartypants": "^3.0.2", + "unified": "^11.0.0", + "unist-util-visit": "^5.0.0" + }, + "peerDependencies": { + "react": "^18.3.1", + "react-dom": "^18.3.1" + } + }, + "node_modules/@mintlify/models": { + "version": "0.0.193", + "resolved": "https://registry.npmjs.org/@mintlify/models/-/models-0.0.193.tgz", + "integrity": "sha512-Y1FjNGSTttZu7y7EUUVsBBIrMEWhRkMNsUxOAc88gLeDy3fQkONyCgFQus0FNdG/G9DzKxZDPurFLUul0VPmCQ==", + "license": "Elastic-2.0", + "dependencies": { + "axios": "^1.4.0", + "openapi-types": "^12.0.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@mintlify/openapi-parser": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/@mintlify/openapi-parser/-/openapi-parser-0.0.7.tgz", + "integrity": "sha512-3ecbkzPbsnkKVZJypVL0H5pCTR7a4iLv4cP7zbffzAwy+vpH70JmPxNVpPPP62yLrdZlfNcMxu5xKeT7fllgMg==", + "license": "MIT", + "dependencies": { + "ajv": "^8.17.1", + "ajv-draft-04": "^1.0.0", + "ajv-formats": "^3.0.1", + "jsonpointer": "^5.0.1", + "leven": "^4.0.0", + "yaml": "^2.4.5" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@mintlify/openapi-parser/node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/@mintlify/prebuild": { + "version": "1.0.491", + "resolved": "https://registry.npmjs.org/@mintlify/prebuild/-/prebuild-1.0.491.tgz", + "integrity": "sha512-JwIKBmtT3kN2bFFonJeQk9IzCmxW6NGsmFr8WjZOz4C7PdWbYnZqugXXAD7KjNj9y6Ju0dT4zM1YDK/H7zL1gw==", + "license": "Elastic-2.0", + "dependencies": { + "@mintlify/common": "1.0.380", + "@mintlify/openapi-parser": "^0.0.7", + "@mintlify/scraping": "4.0.236", + "@mintlify/validation": "0.1.367", + "axios": "^1.6.2", + "chalk": "^5.3.0", + "favicons": "^7.0.2", + "fs-extra": "^11.1.0", + "gray-matter": "^4.0.3", + "is-absolute-url": "^4.0.1", + "js-yaml": "^4.1.0", + "mdast": "^3.0.0", + "openapi-types": "^12.0.0", + "unist-util-visit": "^4.1.1" + } + }, + "node_modules/@mintlify/prebuild/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "license": "MIT" + }, + "node_modules/@mintlify/prebuild/node_modules/unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@mintlify/prebuild/node_modules/unist-util-visit": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", + "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0", + "unist-util-visit-parents": "^5.1.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@mintlify/prebuild/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@mintlify/previewing": { + "version": "4.0.527", + "resolved": "https://registry.npmjs.org/@mintlify/previewing/-/previewing-4.0.527.tgz", + "integrity": "sha512-6qDYfR9fyjy8zzStlg9zJTz6eaDqYXw1zegTCOd7p1Ffvw+gSla/7kRpl5JsnKnkcOyro6mxVzKucVbeP2wUUA==", + "license": "Elastic-2.0", + "dependencies": { + "@mintlify/common": "1.0.380", + "@mintlify/prebuild": "1.0.491", + "@mintlify/validation": "0.1.367", + "better-opn": "^3.0.2", + "chalk": "^5.1.0", + "chokidar": "^3.5.3", + "express": "^4.18.2", + "fs-extra": "^11.1.0", + "got": "^13.0.0", + "gray-matter": "^4.0.3", + "is-absolute-url": "^4.0.1", + "is-online": "^10.0.0", + "js-yaml": "^4.1.0", + "mdast": "^3.0.0", + "openapi-types": "^12.0.0", + "ora": "^6.1.2", + "socket.io": "^4.7.2", + "tar": "^6.1.15", + "unist-util-visit": "^4.1.1", + "yargs": "^17.6.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@mintlify/previewing/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "license": "MIT" + }, + "node_modules/@mintlify/previewing/node_modules/unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@mintlify/previewing/node_modules/unist-util-visit": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", + "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0", + "unist-util-visit-parents": "^5.1.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@mintlify/previewing/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@mintlify/scraping": { + "version": "4.0.236", + "resolved": "https://registry.npmjs.org/@mintlify/scraping/-/scraping-4.0.236.tgz", + "integrity": "sha512-9LK3JVHIrwzRmver8g8A+8WC+9i0zqILk4nD8oQSpUqN4ZHWKcR5lGu1nZl/seJqI2PT8fJeELQZDuxa+b9C2A==", + "license": "Elastic-2.0", + "dependencies": { + "@mintlify/common": "1.0.380", + "@mintlify/openapi-parser": "^0.0.7", + "fs-extra": "^11.1.1", + "hast-util-to-mdast": "^10.1.0", + "js-yaml": "^4.1.0", + "mdast-util-mdx-jsx": "^3.1.3", + "neotraverse": "^0.6.18", + "puppeteer": "^22.14.0", + "rehype-parse": "^9.0.0", + "remark-gfm": "^4.0.0", + "remark-mdx": "^3.0.1", + "remark-parse": "^11.0.0", + "remark-stringify": "^11.0.0", + "unified": "^11.0.5", + "unist-util-visit": "^5.0.0", + "yargs": "^17.6.0", + "zod": "^3.20.6" + }, + "bin": { + "mintlify-scrape": "bin/cli.js" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@mintlify/validation": { + "version": "0.1.367", + "resolved": "https://registry.npmjs.org/@mintlify/validation/-/validation-0.1.367.tgz", + "integrity": "sha512-X7j1Hwf60AMOIhtacsWTCil5dxFVL7SDkYYUrh8J3jBHJTi4IwRBCqm4ib98hAB4z+ToXZWXDt+JjGm6KSA1LQ==", + "license": "Elastic-2.0", + "dependencies": { + "@mintlify/models": "0.0.193", + "is-absolute-url": "^4.0.1", + "lcm": "^0.0.3", + "lodash": "^4.17.21", + "openapi-types": "^12.0.0", + "zod": "^3.20.6", + "zod-to-json-schema": "^3.20.3" + } + }, + "node_modules/@openapi-contrib/openapi-schema-to-json-schema": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@openapi-contrib/openapi-schema-to-json-schema/-/openapi-schema-to-json-schema-3.2.0.tgz", + "integrity": "sha512-Gj6C0JwCr8arj0sYuslWXUBSP/KnUlEGnPW4qxlXvAl543oaNQgMgIgkQUA6vs5BCCvwTEiL8m/wdWzfl4UvSw==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3" + } + }, + "node_modules/@puppeteer/browsers": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.3.0.tgz", + "integrity": "sha512-ioXoq9gPxkss4MYhD+SFaU9p1IHFUX0ILAWFPyjGaBdjLsYAlZw6j1iLA0N/m12uVHLFDfSYNF7EQccjinIMDA==", + "license": "Apache-2.0", + "dependencies": { + "debug": "^4.3.5", + "extract-zip": "^2.0.1", + "progress": "^2.0.3", + "proxy-agent": "^6.4.0", + "semver": "^7.6.3", + "tar-fs": "^3.0.6", + "unbzip2-stream": "^1.4.3", + "yargs": "^17.7.2" + }, + "bin": { + "browsers": "lib/cjs/main-cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@sindresorhus/is": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.6.0.tgz", + "integrity": "sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==", + "license": "MIT", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, + "node_modules/@sindresorhus/slugify": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@sindresorhus/slugify/-/slugify-2.2.1.tgz", + "integrity": "sha512-MkngSCRZ8JdSOCHRaYd+D01XhvU3Hjy6MGl06zhOk614hp9EOAp5gIkBeQg7wtmxpitU6eAL4kdiRMcJa2dlrw==", + "license": "MIT", + "dependencies": { + "@sindresorhus/transliterate": "^1.0.0", + "escape-string-regexp": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@sindresorhus/transliterate": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/transliterate/-/transliterate-1.6.0.tgz", + "integrity": "sha512-doH1gimEu3A46VX6aVxpHTeHrytJAG6HgdxntYnCFiIFHEM/ZGpG8KiZGBChchjQmG0XFIBL552kBTjVcMZXwQ==", + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@socket.io/component-emitter": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz", + "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==", + "license": "MIT" + }, + "node_modules/@stoplight/better-ajv-errors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@stoplight/better-ajv-errors/-/better-ajv-errors-1.0.3.tgz", + "integrity": "sha512-0p9uXkuB22qGdNfy3VeEhxkU5uwvp/KrBTAbrLBURv6ilxIVwanKwjMc41lQfIVgPGcOkmLbTolfFrSsueu7zA==", + "license": "Apache-2.0", + "dependencies": { + "jsonpointer": "^5.0.0", + "leven": "^3.1.0" + }, + "engines": { + "node": "^12.20 || >= 14.13" + }, + "peerDependencies": { + "ajv": ">=8" + } + }, + "node_modules/@stoplight/better-ajv-errors/node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/@stoplight/json": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@stoplight/json/-/json-3.21.0.tgz", + "integrity": "sha512-5O0apqJ/t4sIevXCO3SBN9AHCEKKR/Zb4gaj7wYe5863jme9g02Q0n/GhM7ZCALkL+vGPTe4ZzTETP8TFtsw3g==", + "license": "Apache-2.0", + "dependencies": { + "@stoplight/ordered-object-literal": "^1.0.3", + "@stoplight/path": "^1.3.2", + "@stoplight/types": "^13.6.0", + "jsonc-parser": "~2.2.1", + "lodash": "^4.17.21", + "safe-stable-stringify": "^1.1" + }, + "engines": { + "node": ">=8.3.0" + } + }, + "node_modules/@stoplight/json-ref-readers": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@stoplight/json-ref-readers/-/json-ref-readers-1.2.2.tgz", + "integrity": "sha512-nty0tHUq2f1IKuFYsLM4CXLZGHdMn+X/IwEUIpeSOXt0QjMUbL0Em57iJUDzz+2MkWG83smIigNZ3fauGjqgdQ==", + "license": "Apache-2.0", + "dependencies": { + "node-fetch": "^2.6.0", + "tslib": "^1.14.1" + }, + "engines": { + "node": ">=8.3.0" + } + }, + "node_modules/@stoplight/json-ref-resolver": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@stoplight/json-ref-resolver/-/json-ref-resolver-3.1.6.tgz", + "integrity": "sha512-YNcWv3R3n3U6iQYBsFOiWSuRGE5su1tJSiX6pAPRVk7dP0L7lqCteXGzuVRQ0gMZqUl8v1P0+fAKxF6PLo9B5A==", + "license": "Apache-2.0", + "dependencies": { + "@stoplight/json": "^3.21.0", + "@stoplight/path": "^1.3.2", + "@stoplight/types": "^12.3.0 || ^13.0.0", + "@types/urijs": "^1.19.19", + "dependency-graph": "~0.11.0", + "fast-memoize": "^2.5.2", + "immer": "^9.0.6", + "lodash": "^4.17.21", + "tslib": "^2.6.0", + "urijs": "^1.19.11" + }, + "engines": { + "node": ">=8.3.0" + } + }, + "node_modules/@stoplight/json-ref-resolver/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/@stoplight/ordered-object-literal": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@stoplight/ordered-object-literal/-/ordered-object-literal-1.0.5.tgz", + "integrity": "sha512-COTiuCU5bgMUtbIFBuyyh2/yVVzlr5Om0v5utQDgBCuQUOPgU1DwoffkTfg4UBQOvByi5foF4w4T+H9CoRe5wg==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/@stoplight/path": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@stoplight/path/-/path-1.3.2.tgz", + "integrity": "sha512-lyIc6JUlUA8Ve5ELywPC8I2Sdnh1zc1zmbYgVarhXIp9YeAB0ReeqmGEOWNtlHkbP2DAA1AL65Wfn2ncjK/jtQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/@stoplight/spectral-core": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-core/-/spectral-core-1.20.0.tgz", + "integrity": "sha512-5hBP81nCC1zn1hJXL/uxPNRKNcB+/pEIHgCjPRpl/w/qy9yC9ver04tw1W0l/PMiv0UeB5dYgozXVQ4j5a6QQQ==", + "license": "Apache-2.0", + "dependencies": { + "@stoplight/better-ajv-errors": "1.0.3", + "@stoplight/json": "~3.21.0", + "@stoplight/path": "1.3.2", + "@stoplight/spectral-parsers": "^1.0.0", + "@stoplight/spectral-ref-resolver": "^1.0.4", + "@stoplight/spectral-runtime": "^1.1.2", + "@stoplight/types": "~13.6.0", + "@types/es-aggregate-error": "^1.0.2", + "@types/json-schema": "^7.0.11", + "ajv": "^8.17.1", + "ajv-errors": "~3.0.0", + "ajv-formats": "~2.1.1", + "es-aggregate-error": "^1.0.7", + "jsonpath-plus": "^10.3.0", + "lodash": "~4.17.21", + "lodash.topath": "^4.5.2", + "minimatch": "3.1.2", + "nimma": "0.2.3", + "pony-cause": "^1.1.1", + "simple-eval": "1.0.1", + "tslib": "^2.8.1" + }, + "engines": { + "node": "^16.20 || ^18.18 || >= 20.17" + } + }, + "node_modules/@stoplight/spectral-core/node_modules/@stoplight/types": { + "version": "13.6.0", + "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-13.6.0.tgz", + "integrity": "sha512-dzyuzvUjv3m1wmhPfq82lCVYGcXG0xUYgqnWfCq3PCVR4BKFhjdkHrnJ+jIDoMKvXb05AZP/ObQF6+NpDo29IQ==", + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.4", + "utility-types": "^3.10.0" + }, + "engines": { + "node": "^12.20 || >=14.13" + } + }, + "node_modules/@stoplight/spectral-core/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/@stoplight/spectral-formats": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-formats/-/spectral-formats-1.8.2.tgz", + "integrity": "sha512-c06HB+rOKfe7tuxg0IdKDEA5XnjL2vrn/m/OVIIxtINtBzphZrOgtRn7epQ5bQF5SWp84Ue7UJWaGgDwVngMFw==", + "license": "Apache-2.0", + "dependencies": { + "@stoplight/json": "^3.17.0", + "@stoplight/spectral-core": "^1.19.2", + "@types/json-schema": "^7.0.7", + "tslib": "^2.8.1" + }, + "engines": { + "node": "^16.20 || ^18.18 || >= 20.17" + } + }, + "node_modules/@stoplight/spectral-formats/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/@stoplight/spectral-functions": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-functions/-/spectral-functions-1.10.1.tgz", + "integrity": "sha512-obu8ZfoHxELOapfGsCJixKZXZcffjg+lSoNuttpmUFuDzVLT3VmH8QkPXfOGOL5Pz80BR35ClNAToDkdnYIURg==", + "license": "Apache-2.0", + "dependencies": { + "@stoplight/better-ajv-errors": "1.0.3", + "@stoplight/json": "^3.17.1", + "@stoplight/spectral-core": "^1.19.4", + "@stoplight/spectral-formats": "^1.8.1", + "@stoplight/spectral-runtime": "^1.1.2", + "ajv": "^8.17.1", + "ajv-draft-04": "~1.0.0", + "ajv-errors": "~3.0.0", + "ajv-formats": "~2.1.1", + "lodash": "~4.17.21", + "tslib": "^2.8.1" + }, + "engines": { + "node": "^16.20 || ^18.18 || >= 20.17" + } + }, + "node_modules/@stoplight/spectral-functions/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/@stoplight/spectral-parsers": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-parsers/-/spectral-parsers-1.0.5.tgz", + "integrity": "sha512-ANDTp2IHWGvsQDAY85/jQi9ZrF4mRrA5bciNHX+PUxPr4DwS6iv4h+FVWJMVwcEYdpyoIdyL+SRmHdJfQEPmwQ==", + "license": "Apache-2.0", + "dependencies": { + "@stoplight/json": "~3.21.0", + "@stoplight/types": "^14.1.1", + "@stoplight/yaml": "~4.3.0", + "tslib": "^2.8.1" + }, + "engines": { + "node": "^16.20 || ^18.18 || >= 20.17" + } + }, + "node_modules/@stoplight/spectral-parsers/node_modules/@stoplight/types": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-14.1.1.tgz", + "integrity": "sha512-/kjtr+0t0tjKr+heVfviO9FrU/uGLc+QNX3fHJc19xsCNYqU7lVhaXxDmEID9BZTjG+/r9pK9xP/xU02XGg65g==", + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.4", + "utility-types": "^3.10.0" + }, + "engines": { + "node": "^12.20 || >=14.13" + } + }, + "node_modules/@stoplight/spectral-parsers/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/@stoplight/spectral-ref-resolver": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-ref-resolver/-/spectral-ref-resolver-1.0.5.tgz", + "integrity": "sha512-gj3TieX5a9zMW29z3mBlAtDOCgN3GEc1VgZnCVlr5irmR4Qi5LuECuFItAq4pTn5Zu+sW5bqutsCH7D4PkpyAA==", + "license": "Apache-2.0", + "dependencies": { + "@stoplight/json-ref-readers": "1.2.2", + "@stoplight/json-ref-resolver": "~3.1.6", + "@stoplight/spectral-runtime": "^1.1.2", + "dependency-graph": "0.11.0", + "tslib": "^2.8.1" + }, + "engines": { + "node": "^16.20 || ^18.18 || >= 20.17" + } + }, + "node_modules/@stoplight/spectral-ref-resolver/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/@stoplight/spectral-runtime": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-runtime/-/spectral-runtime-1.1.4.tgz", + "integrity": "sha512-YHbhX3dqW0do6DhiPSgSGQzr6yQLlWybhKwWx0cqxjMwxej3TqLv3BXMfIUYFKKUqIwH4Q2mV8rrMM8qD2N0rQ==", + "license": "Apache-2.0", + "dependencies": { + "@stoplight/json": "^3.20.1", + "@stoplight/path": "^1.3.2", + "@stoplight/types": "^13.6.0", + "abort-controller": "^3.0.0", + "lodash": "^4.17.21", + "node-fetch": "^2.7.0", + "tslib": "^2.8.1" + }, + "engines": { + "node": "^16.20 || ^18.18 || >= 20.17" + } + }, + "node_modules/@stoplight/spectral-runtime/node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/@stoplight/spectral-runtime/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/@stoplight/types": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-13.20.0.tgz", + "integrity": "sha512-2FNTv05If7ib79VPDA/r9eUet76jewXFH2y2K5vuge6SXbRHtWBhcaRmu+6QpF4/WRNoJj5XYRSwLGXDxysBGA==", + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.4", + "utility-types": "^3.10.0" + }, + "engines": { + "node": "^12.20 || >=14.13" + } + }, + "node_modules/@stoplight/yaml": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@stoplight/yaml/-/yaml-4.3.0.tgz", + "integrity": "sha512-JZlVFE6/dYpP9tQmV0/ADfn32L9uFarHWxfcRhReKUnljz1ZiUM5zpX+PH8h5CJs6lao3TuFqnPm9IJJCEkE2w==", + "license": "Apache-2.0", + "dependencies": { + "@stoplight/ordered-object-literal": "^1.0.5", + "@stoplight/types": "^14.1.1", + "@stoplight/yaml-ast-parser": "0.0.50", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=10.8" + } + }, + "node_modules/@stoplight/yaml-ast-parser": { + "version": "0.0.50", + "resolved": "https://registry.npmjs.org/@stoplight/yaml-ast-parser/-/yaml-ast-parser-0.0.50.tgz", + "integrity": "sha512-Pb6M8TDO9DtSVla9yXSTAxmo9GVEouq5P40DWXdOie69bXogZTkgvopCq+yEvTMA0F6PEvdJmbtTV3ccIp11VQ==", + "license": "Apache-2.0" + }, + "node_modules/@stoplight/yaml/node_modules/@stoplight/types": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-14.1.1.tgz", + "integrity": "sha512-/kjtr+0t0tjKr+heVfviO9FrU/uGLc+QNX3fHJc19xsCNYqU7lVhaXxDmEID9BZTjG+/r9pK9xP/xU02XGg65g==", + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.4", + "utility-types": "^3.10.0" + }, + "engines": { + "node": "^12.20 || >=14.13" + } + }, + "node_modules/@stoplight/yaml/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/@szmarczak/http-timer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", + "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", + "license": "MIT", + "dependencies": { + "defer-to-connect": "^2.0.1" + }, + "engines": { + "node": ">=14.16" + } + }, + "node_modules/@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", + "license": "MIT" + }, + "node_modules/@types/cors": { + "version": "2.8.18", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.18.tgz", + "integrity": "sha512-nX3d0sxJW41CqQvfOzVG1NCTXfFDrDWIghCZncpHeWlVFd81zxB/DLhg7avFg6eHLCRX7ckBmoIIcqa++upvJA==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/debug": { + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "license": "MIT", + "dependencies": { + "@types/ms": "*" + } + }, + "node_modules/@types/es-aggregate-error": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/es-aggregate-error/-/es-aggregate-error-1.0.6.tgz", + "integrity": "sha512-qJ7LIFp06h1QE1aVxbVd+zJP2wdaugYXYfd6JxsyRMrYHaxb6itXPogW2tz+ylUJ1n1b+JF1PHyYCfYHm0dvUg==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "license": "MIT" + }, + "node_modules/@types/estree-jsx": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.5.tgz", + "integrity": "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==", + "license": "MIT", + "dependencies": { + "@types/estree": "*" + } + }, + "node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/http-cache-semantics": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "license": "MIT" + }, + "node_modules/@types/katex": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.16.7.tgz", + "integrity": "sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==", + "license": "MIT" + }, + "node_modules/@types/mdast": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", + "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/mdx": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@types/mdx/-/mdx-2.0.13.tgz", + "integrity": "sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==", + "license": "MIT" + }, + "node_modules/@types/ms": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", + "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", + "license": "MIT" + }, + "node_modules/@types/nlcst": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/nlcst/-/nlcst-2.0.3.tgz", + "integrity": "sha512-vSYNSDe6Ix3q+6Z7ri9lyWqgGhJTmzRjZRqyq15N0Z/1/UnVsno9G/N40NBijoYx2seFDIl0+B2mgAb9mezUCA==", + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/node": { + "version": "22.15.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.19.tgz", + "integrity": "sha512-3vMNr4TzNQyjHcRZadojpRaD9Ofr6LsonZAoQ+HMUa/9ORTPoxVIw0e0mpqWpdjj8xybyCM+oKOUH2vwFu/oEw==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/prismjs": { + "version": "1.26.5", + "resolved": "https://registry.npmjs.org/@types/prismjs/-/prismjs-1.26.5.tgz", + "integrity": "sha512-AUZTa7hQ2KY5L7AmtSiqxlhWxb4ina0yd8hNbl4TWuqnv/pFP0nDMb3YrfSBf4hJVGLh2YEIBfKaBW/9UEl6IQ==", + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "19.1.4", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.4.tgz", + "integrity": "sha512-EB1yiiYdvySuIITtD5lhW4yPyJ31RkJkkDw794LaQYrxCSaQV/47y5o1FMC4zF9ZyjUjzJMZwbovEnT5yHTW6g==", + "license": "MIT", + "peer": true, + "dependencies": { + "csstype": "^3.0.2" + } + }, + "node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "license": "MIT" + }, + "node_modules/@types/urijs": { + "version": "1.19.25", + "resolved": "https://registry.npmjs.org/@types/urijs/-/urijs-1.19.25.tgz", + "integrity": "sha512-XOfUup9r3Y06nFAZh3WvO0rBU4OtlfPB/vgxpjg+NRdGU6CN6djdc6OEiH+PcqHCY6eFLo9Ista73uarf4gnBg==", + "license": "MIT" + }, + "node_modules/@types/yauzl": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", + "license": "MIT", + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "license": "ISC" + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/address": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/address/-/address-1.2.2.tgz", + "integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==", + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/aggregate-error": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz", + "integrity": "sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==", + "license": "MIT", + "dependencies": { + "clean-stack": "^4.0.0", + "indent-string": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-draft-04": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz", + "integrity": "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==", + "license": "MIT", + "peerDependencies": { + "ajv": "^8.5.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", + "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", + "license": "MIT", + "peerDependencies": { + "ajv": "^8.0.1" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/array-iterate": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/array-iterate/-/array-iterate-2.0.1.tgz", + "integrity": "sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ast-types": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ast-types/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/astring": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/astring/-/astring-1.9.0.tgz", + "integrity": "sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==", + "license": "MIT", + "bin": { + "astring": "bin/astring" + } + }, + "node_modules/async-function": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", + "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/available-typed-arrays": { + "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==", + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/avsc": { + "version": "5.7.7", + "resolved": "https://registry.npmjs.org/avsc/-/avsc-5.7.7.tgz", + "integrity": "sha512-9cYNccliXZDByFsFliVwk5GvTq058Fj513CiR4E60ndDwmuXzTJEp/Bp8FyuRmGyYupLjHLs+JA9/CBoVS4/NQ==", + "license": "MIT", + "engines": { + "node": ">=0.11" + } + }, + "node_modules/axios": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz", + "integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/b4a": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", + "integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==", + "license": "Apache-2.0" + }, + "node_modules/bail": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", + "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, + "node_modules/bare-events": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.4.tgz", + "integrity": "sha512-+gFfDkR8pj4/TrWCGUGWmJIkBwuxPS5F+a5yWjOHQt2hHvNZd5YLzadjmDUtFmMM4y429bnKLa8bYBMHcYdnQA==", + "license": "Apache-2.0", + "optional": true + }, + "node_modules/bare-fs": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.1.5.tgz", + "integrity": "sha512-1zccWBMypln0jEE05LzZt+V/8y8AQsQQqxtklqaIyg5nu6OAYFhZxPXinJTSG+kU5qyNmeLgcn9AW7eHiCHVLA==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "bare-events": "^2.5.4", + "bare-path": "^3.0.0", + "bare-stream": "^2.6.4" + }, + "engines": { + "bare": ">=1.16.0" + }, + "peerDependencies": { + "bare-buffer": "*" + }, + "peerDependenciesMeta": { + "bare-buffer": { + "optional": true + } + } + }, + "node_modules/bare-os": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.6.1.tgz", + "integrity": "sha512-uaIjxokhFidJP+bmmvKSgiMzj2sV5GPHaZVAIktcxcpCyBFFWO+YlikVAdhmUo2vYFvFhOXIAlldqV29L8126g==", + "license": "Apache-2.0", + "optional": true, + "engines": { + "bare": ">=1.14.0" + } + }, + "node_modules/bare-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-3.0.0.tgz", + "integrity": "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "bare-os": "^3.0.1" + } + }, + "node_modules/bare-stream": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.6.5.tgz", + "integrity": "sha512-jSmxKJNJmHySi6hC42zlZnq00rga4jjxcgNZjY9N5WlOe/iOoGRtdwGsHzQv2RlH2KOYMwGUXhf2zXd32BA9RA==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "streamx": "^2.21.0" + }, + "peerDependencies": { + "bare-buffer": "*", + "bare-events": "*" + }, + "peerDependenciesMeta": { + "bare-buffer": { + "optional": true + }, + "bare-events": { + "optional": true + } + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/base64id": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", + "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", + "license": "MIT", + "engines": { + "node": "^4.5.0 || >= 5.9" + } + }, + "node_modules/basic-ftp": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", + "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/better-opn": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/better-opn/-/better-opn-3.0.2.tgz", + "integrity": "sha512-aVNobHnJqLiUelTaHat9DZ1qM2w0C0Eym4LPI/3JxOnSokGVdsl1T1kN7TFvsEAD8G47A6VKQ0TVHqbBnYMJlQ==", + "license": "MIT", + "dependencies": { + "open": "^8.0.4" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bl": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", + "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==", + "license": "MIT", + "dependencies": { + "buffer": "^6.0.3", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cacheable-lookup": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", + "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==", + "license": "MIT", + "engines": { + "node": ">=14.16" + } + }, + "node_modules/cacheable-request": { + "version": "10.2.14", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.14.tgz", + "integrity": "sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==", + "license": "MIT", + "dependencies": { + "@types/http-cache-semantics": "^4.0.2", + "get-stream": "^6.0.1", + "http-cache-semantics": "^4.1.1", + "keyv": "^4.5.3", + "mimic-response": "^4.0.0", + "normalize-url": "^8.0.0", + "responselike": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + } + }, + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ccount": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/chalk": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/character-entities": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", + "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-html4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz", + "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "license": "MIT" + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/chromium-bidi": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.6.3.tgz", + "integrity": "sha512-qXlsCmpCZJAnoTYI83Iu6EdYQpMYdVkCfq08KDh2pmlVqK5t5IA9mGs4/LwCwp4fqisSOMXZxP3HIh8w8aRn0A==", + "license": "Apache-2.0", + "dependencies": { + "mitt": "3.0.1", + "urlpattern-polyfill": "10.0.0", + "zod": "3.23.8" + }, + "peerDependencies": { + "devtools-protocol": "*" + } + }, + "node_modules/chromium-bidi/node_modules/zod": { + "version": "3.23.8", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", + "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/clean-stack": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz", + "integrity": "sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==", + "license": "MIT", + "dependencies": { + "escape-string-regexp": "5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", + "license": "MIT", + "dependencies": { + "restore-cursor": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "license": "ISC", + "engines": { + "node": ">= 12" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/collapse-white-space": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-2.1.0.tgz", + "integrity": "sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "license": "MIT", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "license": "MIT" + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cosmiconfig": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "license": "MIT", + "peer": true + }, + "node_modules/data-uri-to-buffer": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/data-view-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/inspect-js" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decode-named-character-reference": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.1.0.tgz", + "integrity": "sha512-Wy+JTSbFThEOXQIR2L6mxJvEs+veIzpmqD7ynWxMXGpnk3smkHQOp6forLdHsKpAMW9iJpaBBIxz285t1n1C3w==", + "license": "MIT", + "dependencies": { + "character-entities": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decompress-response/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/degenerator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "license": "MIT", + "dependencies": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/dependency-graph": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz", + "integrity": "sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==", + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detect-libc": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz", + "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/detect-port": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.6.1.tgz", + "integrity": "sha512-CmnVc+Hek2egPx1PeTFVta2W78xy2K/9Rkf6cC4T59S50tVnzKj+tnx5mmx5lwvCkujZ4uRrpRSuV+IVs3f90Q==", + "license": "MIT", + "dependencies": { + "address": "^1.0.1", + "debug": "4" + }, + "bin": { + "detect": "bin/detect-port.js", + "detect-port": "bin/detect-port.js" + }, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/devlop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", + "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", + "license": "MIT", + "dependencies": { + "dequal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/devtools-protocol": { + "version": "0.0.1312386", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1312386.tgz", + "integrity": "sha512-DPnhUXvmvKT2dFA/j7B+riVLUt9Q6RKJlcppojL5CoRywJJKLDYnRlw0gTFKfgDPHP5E04UoB71SxoJlVZy8FA==", + "license": "BSD-3-Clause" + }, + "node_modules/dns-packet": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.6.1.tgz", + "integrity": "sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==", + "license": "MIT", + "dependencies": { + "@leichtgewicht/ip-codec": "^2.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dns-socket": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/dns-socket/-/dns-socket-4.2.2.tgz", + "integrity": "sha512-BDeBd8najI4/lS00HSKpdFia+OvUMytaVjfzR9n5Lq8MlZRSvtbI+uLtx1+XmQFls5wFU9dssccTmQQ6nfpjdg==", + "license": "MIT", + "dependencies": { + "dns-packet": "^5.2.4" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/emoji-regex": { + "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" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/engine.io": { + "version": "6.6.4", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.4.tgz", + "integrity": "sha512-ZCkIjSYNDyGn0R6ewHDtXgns/Zre/NT6Agvq1/WobF7JXgFff4SeDroKiCO3fNJreU9YG429Sc81o4w5ok/W5g==", + "license": "MIT", + "dependencies": { + "@types/cors": "^2.8.12", + "@types/node": ">=10.0.0", + "accepts": "~1.3.4", + "base64id": "2.0.0", + "cookie": "~0.7.2", + "cors": "~2.8.5", + "debug": "~4.3.1", + "engine.io-parser": "~5.2.1", + "ws": "~8.17.1" + }, + "engines": { + "node": ">=10.2.0" + } + }, + "node_modules/engine.io-parser": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz", + "integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/engine.io/node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/engine.io/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/engine.io/node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/entities": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.0.tgz", + "integrity": "sha512-aKstq2TDOndCn4diEyp9Uq/Flu2i1GlLkc6XIDQSDMuaFE3OPW5OphLCyQ5SpSJZTb4reN+kTcYru5yIfXoRPw==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.23.9", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.9.tgz", + "integrity": "sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA==", + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.1.0", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.0", + "get-symbol-description": "^1.1.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.2", + "is-regex": "^1.2.1", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.0", + "math-intrinsics": "^1.1.0", + "object-inspect": "^1.13.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.7", + "own-keys": "^1.0.1", + "regexp.prototype.flags": "^1.5.3", + "safe-array-concat": "^1.1.3", + "safe-push-apply": "^1.0.0", + "safe-regex-test": "^1.1.0", + "set-proto": "^1.0.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.18" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-aggregate-error": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/es-aggregate-error/-/es-aggregate-error-1.0.13.tgz", + "integrity": "sha512-KkzhUUuD2CUMqEc8JEqsXEMDHzDPE8RCjZeUBitsnB1eNcAJWQPiciKsMXe3Yytj4Flw1XLl46Qcf9OxvZha7A==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "globalthis": "^1.0.3", + "has-property-descriptors": "^1.0.2", + "set-function-name": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "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==", + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7", + "is-date-object": "^1.0.5", + "is-symbol": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/esast-util-from-estree": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/esast-util-from-estree/-/esast-util-from-estree-2.0.0.tgz", + "integrity": "sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "devlop": "^1.0.0", + "estree-util-visit": "^2.0.0", + "unist-util-position-from-estree": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/esast-util-from-js": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esast-util-from-js/-/esast-util-from-js-2.0.1.tgz", + "integrity": "sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "acorn": "^8.0.0", + "esast-util-from-estree": "^2.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "license": "BSD-2-Clause", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/escodegen/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "license": "BSD-3-Clause", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-util-attach-comments": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/estree-util-attach-comments/-/estree-util-attach-comments-3.0.0.tgz", + "integrity": "sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/estree-util-build-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/estree-util-build-jsx/-/estree-util-build-jsx-3.0.1.tgz", + "integrity": "sha512-8U5eiL6BTrPxp/CHbs2yMgP8ftMhR5ww1eIKoWRMlqvltHF8fZn5LRDvTKuxD3DUn+shRbLGqXemcP51oFCsGQ==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "devlop": "^1.0.0", + "estree-util-is-identifier-name": "^3.0.0", + "estree-walker": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/estree-util-is-identifier-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz", + "integrity": "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/estree-util-scope": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/estree-util-scope/-/estree-util-scope-1.0.0.tgz", + "integrity": "sha512-2CAASclonf+JFWBNJPndcOpA8EMJwa0Q8LUFJEKqXLW6+qBvbFZuF5gItbQOs/umBUkjviCSDCbBwU2cXbmrhQ==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "devlop": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/estree-util-to-js": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/estree-util-to-js/-/estree-util-to-js-2.0.0.tgz", + "integrity": "sha512-WDF+xj5rRWmD5tj6bIqRi6CkLIXbbNQUcxQHzGysQzvHmdYG2G7p/Tf0J0gpxGgkeMZNTIjT/AoSvC9Xehcgdg==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "astring": "^1.8.0", + "source-map": "^0.7.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/estree-util-visit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/estree-util-visit/-/estree-util-visit-2.0.0.tgz", + "integrity": "sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/express": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "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", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.12", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "license": "MIT" + }, + "node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "license": "BSD-2-Clause", + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, + "node_modules/extract-zip/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "license": "MIT", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" + }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", + "license": "MIT" + }, + "node_modules/fast-memoize": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz", + "integrity": "sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw==", + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", + "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/fault": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fault/-/fault-2.0.1.tgz", + "integrity": "sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==", + "license": "MIT", + "dependencies": { + "format": "^0.2.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/favicons": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/favicons/-/favicons-7.2.0.tgz", + "integrity": "sha512-k/2rVBRIRzOeom3wI9jBPaSEvoTSQEW4iM0EveBmBBKFxO8mSyyRWtDlfC3VnEfu0avmjrMzy8/ZFPSe6F71Hw==", + "license": "MIT", + "dependencies": { + "escape-html": "^1.0.3", + "sharp": "^0.33.1", + "xml2js": "^0.6.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "license": "MIT", + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/form-data": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", + "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/form-data-encoder": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz", + "integrity": "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==", + "license": "MIT", + "engines": { + "node": ">= 14.17" + } + }, + "node_modules/format": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", + "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", + "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", + "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gcd": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/gcd/-/gcd-0.0.1.tgz", + "integrity": "sha512-VNx3UEGr+ILJTiMs1+xc5SX1cMgJCrXezKPa003APUWNqQqaF6n25W8VcR7nHN6yRWbvvUTwCpZCFJeWC2kXlw==", + "license": "MIT" + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-symbol-description": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-uri": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.4.tgz", + "integrity": "sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==", + "license": "MIT", + "dependencies": { + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.2", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "license": "MIT", + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/got": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/got/-/got-13.0.0.tgz", + "integrity": "sha512-XfBk1CxOOScDcMr9O1yKkNaQyy865NbYs+F7dr4H0LZMVgCj2Le59k6PqbNHoL5ToeaEQUYh6c6yMfVcc6SJxA==", + "license": "MIT", + "dependencies": { + "@sindresorhus/is": "^5.2.0", + "@szmarczak/http-timer": "^5.0.1", + "cacheable-lookup": "^7.0.0", + "cacheable-request": "^10.2.8", + "decompress-response": "^6.0.0", + "form-data-encoder": "^2.1.2", + "get-stream": "^6.0.1", + "http2-wrapper": "^2.1.10", + "lowercase-keys": "^3.0.0", + "p-cancelable": "^3.0.0", + "responselike": "^3.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, + "node_modules/gray-matter": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz", + "integrity": "sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==", + "license": "MIT", + "dependencies": { + "js-yaml": "^3.13.1", + "kind-of": "^6.0.2", + "section-matter": "^1.0.0", + "strip-bom-string": "^1.0.0" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/gray-matter/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/gray-matter/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/gray-matter/node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "license": "BSD-3-Clause" + }, + "node_modules/has-bigints": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hast-util-embedded": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-embedded/-/hast-util-embedded-3.0.0.tgz", + "integrity": "sha512-naH8sld4Pe2ep03qqULEtvYr7EjrLK2QHY8KJR6RJkTUjPGObe1vnx585uzem2hGra+s1q08DZZpfgDVYRbaXA==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "hast-util-is-element": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-from-dom": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/hast-util-from-dom/-/hast-util-from-dom-5.0.1.tgz", + "integrity": "sha512-N+LqofjR2zuzTjCPzyDUdSshy4Ma6li7p/c3pA78uTwzFgENbgbUrm2ugwsOdcjI1muO+o6Dgzp9p8WHtn/39Q==", + "license": "ISC", + "dependencies": { + "@types/hast": "^3.0.0", + "hastscript": "^9.0.0", + "web-namespaces": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-from-html": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hast-util-from-html/-/hast-util-from-html-2.0.3.tgz", + "integrity": "sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "devlop": "^1.1.0", + "hast-util-from-parse5": "^8.0.0", + "parse5": "^7.0.0", + "vfile": "^6.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-from-html-isomorphic": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hast-util-from-html-isomorphic/-/hast-util-from-html-isomorphic-2.0.0.tgz", + "integrity": "sha512-zJfpXq44yff2hmE0XmwEOzdWin5xwH+QIhMLOScpX91e/NSGPsAzNCvLQDIEPyO2TXi+lBmU6hjLIhV8MwP2kw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "hast-util-from-dom": "^5.0.0", + "hast-util-from-html": "^2.0.0", + "unist-util-remove-position": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-from-parse5": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-8.0.3.tgz", + "integrity": "sha512-3kxEVkEKt0zvcZ3hCRYI8rqrgwtlIOFMWkbclACvjlDw8Li9S2hk/d51OI0nr/gIpdMHNepwgOKqZ/sy0Clpyg==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "devlop": "^1.0.0", + "hastscript": "^9.0.0", + "property-information": "^7.0.0", + "vfile": "^6.0.0", + "vfile-location": "^5.0.0", + "web-namespaces": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-has-property": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-has-property/-/hast-util-has-property-3.0.0.tgz", + "integrity": "sha512-MNilsvEKLFpV604hwfhVStK0usFY/QmM5zX16bo7EjnAEGofr5YyI37kzopBlZJkHD4t887i+q/C8/tr5Q94cA==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-is-body-ok-link": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/hast-util-is-body-ok-link/-/hast-util-is-body-ok-link-3.0.1.tgz", + "integrity": "sha512-0qpnzOBLztXHbHQenVB8uNuxTnm/QBFUOmdOSsEn7GnBtyY07+ENTWVFBAnXd/zEgd9/SUG3lRY7hSIBWRgGpQ==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-is-element": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-3.0.0.tgz", + "integrity": "sha512-Val9mnv2IWpLbNPqc/pUem+a7Ipj2aHacCwgNfTiK0vJKl0LF+4Ba4+v1oPHFpf3bLYmreq0/l3Gud9S5OH42g==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-minify-whitespace": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hast-util-minify-whitespace/-/hast-util-minify-whitespace-1.0.1.tgz", + "integrity": "sha512-L96fPOVpnclQE0xzdWb/D12VT5FabA7SnZOUMtL1DbXmYiHJMXZvFkIZfiMmTCNJHUeO2K9UYNXoVyfz+QHuOw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "hast-util-embedded": "^3.0.0", + "hast-util-is-element": "^3.0.0", + "hast-util-whitespace": "^3.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-parse-selector": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-4.0.0.tgz", + "integrity": "sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-phrasing": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/hast-util-phrasing/-/hast-util-phrasing-3.0.1.tgz", + "integrity": "sha512-6h60VfI3uBQUxHqTyMymMZnEbNl1XmEGtOxxKYL7stY2o601COo62AWAYBQR9lZbYXYSBoxag8UpPRXK+9fqSQ==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "hast-util-embedded": "^3.0.0", + "hast-util-has-property": "^3.0.0", + "hast-util-is-body-ok-link": "^3.0.0", + "hast-util-is-element": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-estree": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hast-util-to-estree/-/hast-util-to-estree-3.1.3.tgz", + "integrity": "sha512-48+B/rJWAp0jamNbAAf9M7Uf//UVqAoMmgXhBdxTDJLGKY+LRnZ99qcG+Qjl5HfMpYNzS5v4EAwVEF34LeAj7w==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "comma-separated-tokens": "^2.0.0", + "devlop": "^1.0.0", + "estree-util-attach-comments": "^3.0.0", + "estree-util-is-identifier-name": "^3.0.0", + "hast-util-whitespace": "^3.0.0", + "mdast-util-mdx-expression": "^2.0.0", + "mdast-util-mdx-jsx": "^3.0.0", + "mdast-util-mdxjs-esm": "^2.0.0", + "property-information": "^7.0.0", + "space-separated-tokens": "^2.0.0", + "style-to-js": "^1.0.0", + "unist-util-position": "^5.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-html": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.5.tgz", + "integrity": "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-whitespace": "^3.0.0", + "html-void-elements": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "property-information": "^7.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-jsx-runtime": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.6.tgz", + "integrity": "sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "comma-separated-tokens": "^2.0.0", + "devlop": "^1.0.0", + "estree-util-is-identifier-name": "^3.0.0", + "hast-util-whitespace": "^3.0.0", + "mdast-util-mdx-expression": "^2.0.0", + "mdast-util-mdx-jsx": "^3.0.0", + "mdast-util-mdxjs-esm": "^2.0.0", + "property-information": "^7.0.0", + "space-separated-tokens": "^2.0.0", + "style-to-js": "^1.0.0", + "unist-util-position": "^5.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-mdast": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/hast-util-to-mdast/-/hast-util-to-mdast-10.1.2.tgz", + "integrity": "sha512-FiCRI7NmOvM4y+f5w32jPRzcxDIz+PUqDwEqn1A+1q2cdp3B8Gx7aVrXORdOKjMNDQsD1ogOr896+0jJHW1EFQ==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@ungap/structured-clone": "^1.0.0", + "hast-util-phrasing": "^3.0.0", + "hast-util-to-html": "^9.0.0", + "hast-util-to-text": "^4.0.0", + "hast-util-whitespace": "^3.0.0", + "mdast-util-phrasing": "^4.0.0", + "mdast-util-to-hast": "^13.0.0", + "mdast-util-to-string": "^4.0.0", + "rehype-minify-whitespace": "^6.0.0", + "trim-trailing-lines": "^2.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-string": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/hast-util-to-string/-/hast-util-to-string-3.0.1.tgz", + "integrity": "sha512-XelQVTDWvqcl3axRfI0xSeoVKzyIFPwsAGSLIsKdJKQMXDYJS4WYrBNF/8J7RdhIcFI2BOHgAifggsvsxp/3+A==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-text": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/hast-util-to-text/-/hast-util-to-text-4.0.2.tgz", + "integrity": "sha512-KK6y/BN8lbaq654j7JgBydev7wuNMcID54lkRav1P0CaE1e47P72AWWPiGKXTJU271ooYzcvTAn/Zt0REnvc7A==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "hast-util-is-element": "^3.0.0", + "unist-util-find-after": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-whitespace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", + "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hastscript": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-9.0.1.tgz", + "integrity": "sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-parse-selector": "^4.0.0", + "property-information": "^7.0.0", + "space-separated-tokens": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/html-void-elements": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz", + "integrity": "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/http-cache-semantics": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", + "license": "BSD-2-Clause" + }, + "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==", + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/http2-wrapper": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz", + "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==", + "license": "MIT", + "dependencies": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.2.0" + }, + "engines": { + "node": ">=10.19.0" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/immer": { + "version": "9.0.21", + "resolved": "https://registry.npmjs.org/immer/-/immer-9.0.21.tgz", + "integrity": "sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/immer" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/inline-style-parser": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.4.tgz", + "integrity": "sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==", + "license": "MIT" + }, + "node_modules/inquirer": { + "version": "12.6.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-12.6.1.tgz", + "integrity": "sha512-MGFnzHVS3l3oM3cy+LWkyR7UUtVEn3D5U41CZbEY34szToWoJAvaVtCTz1mxsEzZFk/HXWyCArn0HDgloTXMDw==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.11", + "@inquirer/prompts": "^7.5.1", + "@inquirer/type": "^3.0.6", + "ansi-escapes": "^4.3.2", + "mute-stream": "^2.0.0", + "run-async": "^3.0.0", + "rxjs": "^7.8.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/internal-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.2", + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "license": "MIT", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/ip-regex": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", + "integrity": "sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-absolute-url": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-4.0.1.tgz", + "integrity": "sha512-/51/TKE88Lmm7Gc4/8btclNXWS+g50wXhYJq8HWIBAGUBnoAdRu1aXeh364t/O7wXDAcTJDP8PNuNKWUDWie+A==", + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-alphabetical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", + "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz", + "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==", + "license": "MIT", + "dependencies": { + "is-alphabetical": "^2.0.0", + "is-decimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "license": "MIT" + }, + "node_modules/is-async-function": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", + "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", + "license": "MIT", + "dependencies": { + "async-function": "^1.0.0", + "call-bound": "^1.0.3", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", + "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", + "license": "MIT", + "dependencies": { + "has-bigints": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-boolean-object": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", + "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-decimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", + "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-finalizationregistry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-function": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", + "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-proto": "^1.0.0", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-hexadecimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", + "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-interactive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-ip": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-ip/-/is-ip-3.1.0.tgz", + "integrity": "sha512-35vd5necO7IitFPjd/YBeqwWnyDWbuLH9ZXQdMfDA8TEo7pv5X8yfrvVO3xbJbLUlERCMvf6X0hTUamQxCYJ9Q==", + "license": "MIT", + "dependencies": { + "ip-regex": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-map": { + "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==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-online": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/is-online/-/is-online-10.0.0.tgz", + "integrity": "sha512-WCPdKwNDjXJJmUubf2VHLMDBkUZEtuOvpXUfUnUFbEnM6In9ByiScL4f4jKACz/fsb2qDkesFerW3snf/AYz3A==", + "license": "MIT", + "dependencies": { + "got": "^12.1.0", + "p-any": "^4.0.0", + "p-timeout": "^5.1.0", + "public-ip": "^5.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-online/node_modules/got": { + "version": "12.6.1", + "resolved": "https://registry.npmjs.org/got/-/got-12.6.1.tgz", + "integrity": "sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==", + "license": "MIT", + "dependencies": { + "@sindresorhus/is": "^5.2.0", + "@szmarczak/http-timer": "^5.0.1", + "cacheable-lookup": "^7.0.0", + "cacheable-request": "^10.2.8", + "decompress-response": "^6.0.0", + "form-data-encoder": "^2.1.2", + "get-stream": "^6.0.1", + "http2-wrapper": "^2.1.10", + "lowercase-keys": "^3.0.0", + "p-cancelable": "^3.0.0", + "responselike": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" + } + }, + "node_modules/is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-set": { + "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==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", + "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "license": "MIT" + }, + "node_modules/jsep": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.4.0.tgz", + "integrity": "sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==", + "license": "MIT", + "engines": { + "node": ">= 10.16.0" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "license": "MIT" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, + "node_modules/jsonc-parser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.2.1.tgz", + "integrity": "sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w==", + "license": "MIT" + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonpath-plus": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", + "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", + "license": "MIT", + "dependencies": { + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" + }, + "bin": { + "jsonpath": "bin/jsonpath-cli.js", + "jsonpath-plus": "bin/jsonpath-cli.js" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/jsonpointer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", + "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/katex": { + "version": "0.16.22", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.22.tgz", + "integrity": "sha512-XCHRdUw4lf3SKBaJe4EvgqIuWwkPSo9XoeO8GjQW94Bp7TWv9hNhzZjZ+OH9yf1UmLygb7DIT5GSFQiyt16zYg==", + "funding": [ + "https://opencollective.com/katex", + "https://github.com/sponsors/katex" + ], + "license": "MIT", + "dependencies": { + "commander": "^8.3.0" + }, + "bin": { + "katex": "cli.js" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lcm": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/lcm/-/lcm-0.0.3.tgz", + "integrity": "sha512-TB+ZjoillV6B26Vspf9l2L/vKaRY/4ep3hahcyVkCGFgsTNRUQdc24bQeNFiZeoxH0vr5+7SfNRMQuPHv/1IrQ==", + "license": "MIT", + "dependencies": { + "gcd": "^0.0.1" + } + }, + "node_modules/leven": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-4.0.0.tgz", + "integrity": "sha512-puehA3YKku3osqPlNuzGDUHq8WpwXupUg1V6NXdV38G+gr+gkBwFC8g1b/+YcIvp8gnqVIus+eJCH/eGsRmJNw==", + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "license": "MIT" + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" + }, + "node_modules/lodash.topath": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/lodash.topath/-/lodash.topath-4.5.2.tgz", + "integrity": "sha512-1/W4dM+35DwvE/iEd1M9ekewOSTlpFekhw9mhAtrwjVqUr83/ilQiyAvmg4tVX7Unkcfl1KC+i9WdaT4B6aQcg==", + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-5.1.0.tgz", + "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==", + "license": "MIT", + "dependencies": { + "chalk": "^5.0.0", + "is-unicode-supported": "^1.1.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/longest-streak": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz", + "integrity": "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lowercase-keys": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", + "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/markdown-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-extensions/-/markdown-extensions-2.0.0.tgz", + "integrity": "sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==", + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/markdown-table": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.4.tgz", + "integrity": "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mdast": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mdast/-/mdast-3.0.0.tgz", + "integrity": "sha512-xySmf8g4fPKMeC07jXGz971EkLbWAJ83s4US2Tj9lEdnZ142UP5grN73H1Xd3HzrdbU5o9GYYP/y8F9ZSwLE9g==", + "deprecated": "`mdast` was renamed to `remark`", + "license": "MIT" + }, + "node_modules/mdast-util-find-and-replace": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.2.tgz", + "integrity": "sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "escape-string-regexp": "^5.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-from-markdown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.2.tgz", + "integrity": "sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "mdast-util-to-string": "^4.0.0", + "micromark": "^4.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-decode-string": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-frontmatter": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-2.0.1.tgz", + "integrity": "sha512-LRqI9+wdgC25P0URIJY9vwocIzCcksduHQ9OF2joxQoyTNVduwLAFUzjoopuRJbJAReaKrNQKAZKL3uCMugWJA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "escape-string-regexp": "^5.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "micromark-extension-frontmatter": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-3.1.0.tgz", + "integrity": "sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==", + "license": "MIT", + "dependencies": { + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-gfm-autolink-literal": "^2.0.0", + "mdast-util-gfm-footnote": "^2.0.0", + "mdast-util-gfm-strikethrough": "^2.0.0", + "mdast-util-gfm-table": "^2.0.0", + "mdast-util-gfm-task-list-item": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-autolink-literal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-2.0.1.tgz", + "integrity": "sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "ccount": "^2.0.0", + "devlop": "^1.0.0", + "mdast-util-find-and-replace": "^3.0.0", + "micromark-util-character": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-footnote": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-2.1.0.tgz", + "integrity": "sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.1.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-strikethrough": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-2.0.0.tgz", + "integrity": "sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-table": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-2.0.0.tgz", + "integrity": "sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "markdown-table": "^3.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-task-list-item": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-2.0.0.tgz", + "integrity": "sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-math": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-math/-/mdast-util-math-3.0.0.tgz", + "integrity": "sha512-Tl9GBNeG/AhJnQM221bJR2HPvLOSnLE/T9cJI9tlc6zwQk2nPk/4f0cHkOdEixQPC/j8UtKDdITswvLAy1OZ1w==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "longest-streak": "^3.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.1.0", + "unist-util-remove-position": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdx": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-mdx/-/mdast-util-mdx-3.0.0.tgz", + "integrity": "sha512-JfbYLAW7XnYTTbUsmpu0kdBUVe+yKVJZBItEjwyYJiDJuZ9w4eeaqks4HQO+R7objWgS2ymV60GYpI14Ug554w==", + "license": "MIT", + "dependencies": { + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-mdx-expression": "^2.0.0", + "mdast-util-mdx-jsx": "^3.0.0", + "mdast-util-mdxjs-esm": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdx-expression": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.1.tgz", + "integrity": "sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdx-jsx": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.2.0.tgz", + "integrity": "sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "devlop": "^1.1.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "parse-entities": "^4.0.0", + "stringify-entities": "^4.0.0", + "unist-util-stringify-position": "^4.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdxjs-esm": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-2.0.1.tgz", + "integrity": "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-phrasing": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-4.1.0.tgz", + "integrity": "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.0.tgz", + "integrity": "sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@ungap/structured-clone": "^1.0.0", + "devlop": "^1.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "trim-lines": "^3.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-markdown": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.2.tgz", + "integrity": "sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "longest-streak": "^3.0.0", + "mdast-util-phrasing": "^4.0.0", + "mdast-util-to-string": "^4.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-decode-string": "^2.0.0", + "unist-util-visit": "^5.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz", + "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromark": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz", + "integrity": "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "@types/debug": "^4.0.0", + "debug": "^4.0.0", + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-combine-extensions": "^2.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-subtokenize": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-core-commonmark": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz", + "integrity": "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "micromark-factory-destination": "^2.0.0", + "micromark-factory-label": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-factory-title": "^2.0.0", + "micromark-factory-whitespace": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-html-tag-name": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-subtokenize": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-extension-frontmatter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-2.0.0.tgz", + "integrity": "sha512-C4AkuM3dA58cgZha7zVnuVxBhDsbttIMiytjgsM2XbHAB2faRVaHRle40558FBN+DJcrLNCoqG5mlrpdU4cRtg==", + "license": "MIT", + "dependencies": { + "fault": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-3.0.0.tgz", + "integrity": "sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==", + "license": "MIT", + "dependencies": { + "micromark-extension-gfm-autolink-literal": "^2.0.0", + "micromark-extension-gfm-footnote": "^2.0.0", + "micromark-extension-gfm-strikethrough": "^2.0.0", + "micromark-extension-gfm-table": "^2.0.0", + "micromark-extension-gfm-tagfilter": "^2.0.0", + "micromark-extension-gfm-task-list-item": "^2.0.0", + "micromark-util-combine-extensions": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-autolink-literal": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-2.1.0.tgz", + "integrity": "sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==", + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-footnote": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.1.0.tgz", + "integrity": "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==", + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-strikethrough": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.1.0.tgz", + "integrity": "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==", + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-table": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.1.tgz", + "integrity": "sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg==", + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-tagfilter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-2.0.0.tgz", + "integrity": "sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==", + "license": "MIT", + "dependencies": { + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-task-list-item": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.1.0.tgz", + "integrity": "sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==", + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-math": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-math/-/micromark-extension-math-3.1.0.tgz", + "integrity": "sha512-lvEqd+fHjATVs+2v/8kg9i5Q0AP2k85H0WUOwpIVvUML8BapsMvh1XAogmQjOCsLpoKRCVQqEkQBB3NhVBcsOg==", + "license": "MIT", + "dependencies": { + "@types/katex": "^0.16.0", + "devlop": "^1.0.0", + "katex": "^0.16.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-mdx-expression": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/micromark-extension-mdx-expression/-/micromark-extension-mdx-expression-3.0.1.tgz", + "integrity": "sha512-dD/ADLJ1AeMvSAKBwO22zG22N4ybhe7kFIZ3LsDI0GlsNr2A3KYxb0LdC1u5rj4Nw+CHKY0RVdnHX8vj8ejm4Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "devlop": "^1.0.0", + "micromark-factory-mdx-expression": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-events-to-acorn": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-extension-mdx-jsx": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/micromark-extension-mdx-jsx/-/micromark-extension-mdx-jsx-3.0.2.tgz", + "integrity": "sha512-e5+q1DjMh62LZAJOnDraSSbDMvGJ8x3cbjygy2qFEi7HCeUT4BDKCvMozPozcD6WmOt6sVvYDNBKhFSz3kjOVQ==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "devlop": "^1.0.0", + "estree-util-is-identifier-name": "^3.0.0", + "micromark-factory-mdx-expression": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-events-to-acorn": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-mdx-md": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-mdx-md/-/micromark-extension-mdx-md-2.0.0.tgz", + "integrity": "sha512-EpAiszsB3blw4Rpba7xTOUptcFeBFi+6PY8VnJ2hhimH+vCQDirWgsMpz7w1XcZE7LVrSAUGb9VJpG9ghlYvYQ==", + "license": "MIT", + "dependencies": { + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-mdxjs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-mdxjs/-/micromark-extension-mdxjs-3.0.0.tgz", + "integrity": "sha512-A873fJfhnJ2siZyUrJ31l34Uqwy4xIFmvPY1oj+Ean5PHcPBYzEsvqvWGaWcfEIr11O5Dlw3p2y0tZWpKHDejQ==", + "license": "MIT", + "dependencies": { + "acorn": "^8.0.0", + "acorn-jsx": "^5.0.0", + "micromark-extension-mdx-expression": "^3.0.0", + "micromark-extension-mdx-jsx": "^3.0.0", + "micromark-extension-mdx-md": "^2.0.0", + "micromark-extension-mdxjs-esm": "^3.0.0", + "micromark-util-combine-extensions": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-mdxjs-esm": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-mdxjs-esm/-/micromark-extension-mdxjs-esm-3.0.0.tgz", + "integrity": "sha512-DJFl4ZqkErRpq/dAPyeWp15tGrcrrJho1hKK5uBS70BCtfrIFg81sqcTVu3Ta+KD1Tk5vAtBNElWxtAa+m8K9A==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-events-to-acorn": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unist-util-position-from-estree": "^2.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-factory-destination": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz", + "integrity": "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-label": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz", + "integrity": "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-mdx-expression": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/micromark-factory-mdx-expression/-/micromark-factory-mdx-expression-2.0.3.tgz", + "integrity": "sha512-kQnEtA3vzucU2BkrIa8/VaSAsP+EJ3CKOvhMuJgOEGg9KDC6OAY6nSnNDVRiVNRqj7Y4SlSzcStaH/5jge8JdQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-events-to-acorn": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unist-util-position-from-estree": "^2.0.0", + "vfile-message": "^4.0.0" + } + }, + "node_modules/micromark-factory-space": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", + "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-title": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz", + "integrity": "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-whitespace": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz", + "integrity": "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-character": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-chunked": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz", + "integrity": "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-classify-character": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz", + "integrity": "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-combine-extensions": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz", + "integrity": "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-chunked": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-decode-numeric-character-reference": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz", + "integrity": "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-decode-string": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz", + "integrity": "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-encode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", + "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-events-to-acorn": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/micromark-util-events-to-acorn/-/micromark-util-events-to-acorn-2.0.3.tgz", + "integrity": "sha512-jmsiEIiZ1n7X1Rr5k8wVExBQCg5jy4UXVADItHmNk1zkwEVhBuIUKRu3fqv+hs4nxLISi2DQGlqIOGiFxgbfHg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "@types/unist": "^3.0.0", + "devlop": "^1.0.0", + "estree-util-visit": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "vfile-message": "^4.0.0" + } + }, + "node_modules/micromark-util-html-tag-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz", + "integrity": "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-normalize-identifier": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz", + "integrity": "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-resolve-all": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz", + "integrity": "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-sanitize-uri": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", + "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-subtokenize": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz", + "integrity": "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-symbol": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-types": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz", + "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/mimic-response": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz", + "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==", + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mintlify": { + "version": "4.0.538", + "resolved": "https://registry.npmjs.org/mintlify/-/mintlify-4.0.538.tgz", + "integrity": "sha512-rJbcZGyQq6LP05ReHvxf/32vEQ8DAky8vMa4WjuYYMwZB1Ks2wboC+LIa60inEU4tDG9wnBSkgNDZj2F49oZCQ==", + "license": "Elastic-2.0", + "dependencies": { + "@mintlify/cli": "4.0.536" + }, + "bin": { + "mint": "index.js", + "mintlify": "index.js" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", + "license": "MIT" + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/mute-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", + "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neotraverse": { + "version": "0.6.18", + "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-0.6.18.tgz", + "integrity": "sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA==", + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/netmask": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/next-mdx-remote-client": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/next-mdx-remote-client/-/next-mdx-remote-client-1.1.1.tgz", + "integrity": "sha512-cJnJGaRiHc1gn4aCzDmY9zmcCjEw+zMCpCYIy45Kjs8HzeQpdGcaO5GrgIcX/DFkuCVrrzc69wi2gGnExXbv/A==", + "license": "MPL 2.0", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@mdx-js/mdx": "^3.1.0", + "@mdx-js/react": "^3.1.0", + "remark-mdx-remove-esm": "^1.1.0", + "serialize-error": "^12.0.0", + "vfile": "^6.0.3", + "vfile-matter": "^5.0.1" + }, + "engines": { + "node": ">=18.18.0" + }, + "peerDependencies": { + "react": ">= 18.3.0 < 19.0.0", + "react-dom": ">= 18.3.0 < 19.0.0" + } + }, + "node_modules/nimma": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/nimma/-/nimma-0.2.3.tgz", + "integrity": "sha512-1ZOI8J+1PKKGceo/5CT5GfQOG6H8I2BencSK06YarZ2wXwH37BSSUWldqJmMJYA5JfqDqffxDXynt6f11AyKcA==", + "license": "Apache-2.0", + "dependencies": { + "@jsep-plugin/regex": "^1.0.1", + "@jsep-plugin/ternary": "^1.0.2", + "astring": "^1.8.1", + "jsep": "^1.2.0" + }, + "engines": { + "node": "^12.20 || >=14.13" + }, + "optionalDependencies": { + "jsonpath-plus": "^6.0.1 || ^10.1.0", + "lodash.topath": "^4.5.2" + } + }, + "node_modules/nlcst-to-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/nlcst-to-string/-/nlcst-to-string-4.0.0.tgz", + "integrity": "sha512-YKLBCcUYKAg0FNlOBT6aI91qFmSiFKiluk655WzPF+DDMA02qIyy8uiRqI8QXtcFpEvll12LpL5MXqEmAZ+dcA==", + "license": "MIT", + "dependencies": { + "@types/nlcst": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-url": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.1.tgz", + "integrity": "sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==", + "license": "MIT", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "license": "MIT", + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/openapi-types": { + "version": "12.1.3", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", + "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==", + "license": "MIT" + }, + "node_modules/ora": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-6.3.1.tgz", + "integrity": "sha512-ERAyNnZOfqM+Ao3RAvIXkYh5joP220yf59gVe2X/cI6SiCxIdi4c9HZKZD8R6q/RDXEje1THBju6iExiSsgJaQ==", + "license": "MIT", + "dependencies": { + "chalk": "^5.0.0", + "cli-cursor": "^4.0.0", + "cli-spinners": "^2.6.1", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^1.1.0", + "log-symbols": "^5.1.0", + "stdin-discarder": "^0.1.0", + "strip-ansi": "^7.0.1", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/own-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", + "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.6", + "object-keys": "^1.1.1", + "safe-push-apply": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/p-any": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-any/-/p-any-4.0.0.tgz", + "integrity": "sha512-S/B50s+pAVe0wmEZHmBs/9yJXeZ5KhHzOsgKzt0hRdgkoR3DxW9ts46fcsWi/r3VnzsnkKS7q4uimze+zjdryw==", + "license": "MIT", + "dependencies": { + "p-cancelable": "^3.0.0", + "p-some": "^6.0.0" + }, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-cancelable": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", + "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", + "license": "MIT", + "engines": { + "node": ">=12.20" + } + }, + "node_modules/p-some": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-some/-/p-some-6.0.0.tgz", + "integrity": "sha512-CJbQCKdfSX3fIh8/QKgS+9rjm7OBNUTmwWswAFQAhc8j1NR1dsEDETUEuVUtQHZpV+J03LqWBEwvu0g1Yn+TYg==", + "license": "MIT", + "dependencies": { + "aggregate-error": "^4.0.0", + "p-cancelable": "^3.0.0" + }, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-timeout": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz", + "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pac-proxy-agent": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz", + "integrity": "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==", + "license": "MIT", + "dependencies": { + "@tootallnate/quickjs-emscripten": "^0.23.0", + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "get-uri": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.6", + "pac-resolver": "^7.0.1", + "socks-proxy-agent": "^8.0.5" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/pac-resolver": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "license": "MIT", + "dependencies": { + "degenerator": "^5.0.0", + "netmask": "^2.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-entities": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz", + "integrity": "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "character-entities-legacy": "^3.0.0", + "character-reference-invalid": "^2.0.0", + "decode-named-character-reference": "^1.0.0", + "is-alphanumerical": "^2.0.0", + "is-decimal": "^2.0.0", + "is-hexadecimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/parse-entities/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "license": "MIT" + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse-latin": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse-latin/-/parse-latin-7.0.0.tgz", + "integrity": "sha512-mhHgobPPua5kZ98EF4HWiH167JWBfl4pvAIXXdbaVohtK7a6YBOy56kvhCqduqyo/f3yrHFWmqmiMg/BkBkYYQ==", + "license": "MIT", + "dependencies": { + "@types/nlcst": "^2.0.0", + "@types/unist": "^3.0.0", + "nlcst-to-string": "^4.0.0", + "unist-util-modify-children": "^4.0.0", + "unist-util-visit-children": "^3.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/parse5": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", + "license": "MIT", + "dependencies": { + "entities": "^6.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pony-cause": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pony-cause/-/pony-cause-1.1.1.tgz", + "integrity": "sha512-PxkIc/2ZpLiEzQXu5YRDOUgBlfGYBY8156HY5ZcRAwwonMk5W/MrJP2LLkG/hF7GEQzaHo2aS7ho6ZLCOvf+6g==", + "license": "0BSD", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/property-information": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.1.0.tgz", + "integrity": "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-agent": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz", + "integrity": "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.6", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.1.0", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.5" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, + "node_modules/public-ip": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/public-ip/-/public-ip-5.0.0.tgz", + "integrity": "sha512-xaH3pZMni/R2BG7ZXXaWS9Wc9wFlhyDVJF47IJ+3ali0TGv+2PsckKxbmo+rnx3ZxiV2wblVhtdS3bohAP6GGw==", + "license": "MIT", + "dependencies": { + "dns-socket": "^4.2.2", + "got": "^12.0.0", + "is-ip": "^3.1.0" + }, + "engines": { + "node": "^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/public-ip/node_modules/got": { + "version": "12.6.1", + "resolved": "https://registry.npmjs.org/got/-/got-12.6.1.tgz", + "integrity": "sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==", + "license": "MIT", + "dependencies": { + "@sindresorhus/is": "^5.2.0", + "@szmarczak/http-timer": "^5.0.1", + "cacheable-lookup": "^7.0.0", + "cacheable-request": "^10.2.8", + "decompress-response": "^6.0.0", + "form-data-encoder": "^2.1.2", + "get-stream": "^6.0.1", + "http2-wrapper": "^2.1.10", + "lowercase-keys": "^3.0.0", + "p-cancelable": "^3.0.0", + "responselike": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" + } + }, + "node_modules/pump": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", + "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/puppeteer": { + "version": "22.15.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.15.0.tgz", + "integrity": "sha512-XjCY1SiSEi1T7iSYuxS82ft85kwDJUS7wj1Z0eGVXKdtr5g4xnVcbjwxhq5xBnpK/E7x1VZZoJDxpjAOasHT4Q==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@puppeteer/browsers": "2.3.0", + "cosmiconfig": "^9.0.0", + "devtools-protocol": "0.0.1312386", + "puppeteer-core": "22.15.0" + }, + "bin": { + "puppeteer": "lib/esm/puppeteer/node/cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/puppeteer-core": { + "version": "22.15.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.15.0.tgz", + "integrity": "sha512-cHArnywCiAAVXa3t4GGL2vttNxh7GqXtIYGym99egkNJ3oG//wL9LkvO4WE8W1TJe95t1F1ocu9X4xWaGsOKOA==", + "license": "Apache-2.0", + "dependencies": { + "@puppeteer/browsers": "2.3.0", + "chromium-bidi": "0.6.3", + "debug": "^4.3.6", + "devtools-protocol": "0.0.1312386", + "ws": "^8.18.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/recma-build-jsx": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/recma-build-jsx/-/recma-build-jsx-1.0.0.tgz", + "integrity": "sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-util-build-jsx": "^3.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/recma-jsx": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/recma-jsx/-/recma-jsx-1.0.0.tgz", + "integrity": "sha512-5vwkv65qWwYxg+Atz95acp8DMu1JDSqdGkA2Of1j6rCreyFUE/gp15fC8MnGEuG1W68UKjM6x6+YTWIh7hZM/Q==", + "license": "MIT", + "dependencies": { + "acorn-jsx": "^5.0.0", + "estree-util-to-js": "^2.0.0", + "recma-parse": "^1.0.0", + "recma-stringify": "^1.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/recma-parse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/recma-parse/-/recma-parse-1.0.0.tgz", + "integrity": "sha512-OYLsIGBB5Y5wjnSnQW6t3Xg7q3fQ7FWbw/vcXtORTnyaSFscOtABg+7Pnz6YZ6c27fG1/aN8CjfwoUEUIdwqWQ==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "esast-util-from-js": "^2.0.0", + "unified": "^11.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/recma-stringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/recma-stringify/-/recma-stringify-1.0.0.tgz", + "integrity": "sha512-cjwII1MdIIVloKvC9ErQ+OgAtwHBmcZ0Bg4ciz78FtbT8In39aAYbaA7zvxQ61xVMSPE8WxhLwLbhif4Js2C+g==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-util-to-js": "^2.0.0", + "unified": "^11.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", + "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.1", + "which-builtin-type": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/refractor": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/refractor/-/refractor-4.9.0.tgz", + "integrity": "sha512-nEG1SPXFoGGx+dcjftjv8cAjEusIh6ED1xhf5DG3C0x/k+rmZ2duKnc3QLpt6qeHv5fPb8uwN3VWN2BT7fr3Og==", + "license": "MIT", + "dependencies": { + "@types/hast": "^2.0.0", + "@types/prismjs": "^1.0.0", + "hastscript": "^7.0.0", + "parse-entities": "^4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/refractor/node_modules/@types/hast": { + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.10.tgz", + "integrity": "sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^2" + } + }, + "node_modules/refractor/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "license": "MIT" + }, + "node_modules/refractor/node_modules/hast-util-parse-selector": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz", + "integrity": "sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA==", + "license": "MIT", + "dependencies": { + "@types/hast": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/refractor/node_modules/hastscript": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-7.2.0.tgz", + "integrity": "sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-parse-selector": "^3.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/refractor/node_modules/property-information": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.5.0.tgz", + "integrity": "sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "set-function-name": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/rehype-katex": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/rehype-katex/-/rehype-katex-7.0.1.tgz", + "integrity": "sha512-OiM2wrZ/wuhKkigASodFoo8wimG3H12LWQaH8qSPVJn9apWKFSH3YOCtbKpBorTVw/eI7cuT21XBbvwEswbIOA==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/katex": "^0.16.0", + "hast-util-from-html-isomorphic": "^2.0.0", + "hast-util-to-text": "^4.0.0", + "katex": "^0.16.0", + "unist-util-visit-parents": "^6.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-minify-whitespace": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/rehype-minify-whitespace/-/rehype-minify-whitespace-6.0.2.tgz", + "integrity": "sha512-Zk0pyQ06A3Lyxhe9vGtOtzz3Z0+qZ5+7icZ/PL/2x1SHPbKao5oB/g/rlc6BCTajqBb33JcOe71Ye1oFsuYbnw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "hast-util-minify-whitespace": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-parse": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/rehype-parse/-/rehype-parse-9.0.1.tgz", + "integrity": "sha512-ksCzCD0Fgfh7trPDxr2rSylbwq9iYDkSn8TCDmEJ49ljEUBxDVCzCHv7QNzZOfODanX4+bWQ4WZqLCRWYLfhag==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "hast-util-from-html": "^2.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rehype-recma": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/rehype-recma/-/rehype-recma-1.0.0.tgz", + "integrity": "sha512-lqA4rGUf1JmacCNWWZx0Wv1dHqMwxzsDWYMTowuplHF3xH0N/MmrZ/G3BDZnzAkRmxDadujCjaKM2hqYdCBOGw==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "@types/hast": "^3.0.0", + "hast-util-to-estree": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark": { + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/remark/-/remark-15.0.1.tgz", + "integrity": "sha512-Eht5w30ruCXgFmxVUSlNWQ9iiimq07URKeFS3hNc8cUWy1llX4KDWfyEDZRycMc+znsN9Ux5/tJ/BFdgdOwA3A==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "remark-parse": "^11.0.0", + "remark-stringify": "^11.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-frontmatter": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-5.0.0.tgz", + "integrity": "sha512-XTFYvNASMe5iPN0719nPrdItC9aU0ssC4v14mH1BCi1u0n1gAocqcujWUrByftZTbLhRtiKRyjYTSIOcr69UVQ==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-frontmatter": "^2.0.0", + "micromark-extension-frontmatter": "^2.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-gfm": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.1.tgz", + "integrity": "sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-gfm": "^3.0.0", + "micromark-extension-gfm": "^3.0.0", + "remark-parse": "^11.0.0", + "remark-stringify": "^11.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-math": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/remark-math/-/remark-math-6.0.0.tgz", + "integrity": "sha512-MMqgnP74Igy+S3WwnhQ7kqGlEerTETXMvJhrUzDikVZ2/uogJCb+WHUg97hK9/jcfc0dkD73s3LN8zU49cTEtA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-math": "^3.0.0", + "micromark-extension-math": "^3.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-mdx": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-3.1.0.tgz", + "integrity": "sha512-Ngl/H3YXyBV9RcRNdlYsZujAmhsxwzxpDzpDEhFBVAGthS4GDgnctpDjgFl/ULx5UEDzqtW1cyBSNKqYYrqLBA==", + "license": "MIT", + "dependencies": { + "mdast-util-mdx": "^3.0.0", + "micromark-extension-mdxjs": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-mdx-remove-esm": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remark-mdx-remove-esm/-/remark-mdx-remove-esm-1.1.0.tgz", + "integrity": "sha512-oN3F9QRuPKSdzZi+wvEodBVjKwya63sl403pWzJvm0+c503iUjCDR+JAnP3Ho/4205IWbQ2NujPQi/B9kU6ZrA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.3", + "mdast-util-mdxjs-esm": "^2.0.1", + "unist-util-remove": "^4.0.0" + } + }, + "node_modules/remark-parse": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz", + "integrity": "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-from-markdown": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-rehype": { + "version": "11.1.2", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.2.tgz", + "integrity": "sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "mdast-util-to-hast": "^13.0.0", + "unified": "^11.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-smartypants": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/remark-smartypants/-/remark-smartypants-3.0.2.tgz", + "integrity": "sha512-ILTWeOriIluwEvPjv67v7Blgrcx+LZOkAUVtKI3putuhlZm84FnqDORNXPPm+HY3NdZOMhyDwZ1E+eZB/Df5dA==", + "license": "MIT", + "dependencies": { + "retext": "^9.0.0", + "retext-smartypants": "^6.0.0", + "unified": "^11.0.4", + "unist-util-visit": "^5.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/remark-stringify": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-11.0.0.tgz", + "integrity": "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-to-markdown": "^2.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", + "license": "MIT" + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/responselike": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz", + "integrity": "sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==", + "license": "MIT", + "dependencies": { + "lowercase-keys": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "license": "ISC" + }, + "node_modules/retext": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/retext/-/retext-9.0.0.tgz", + "integrity": "sha512-sbMDcpHCNjvlheSgMfEcVrZko3cDzdbe1x/e7G66dFp0Ff7Mldvi2uv6JkJQzdRcvLYE8CA8Oe8siQx8ZOgTcA==", + "license": "MIT", + "dependencies": { + "@types/nlcst": "^2.0.0", + "retext-latin": "^4.0.0", + "retext-stringify": "^4.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/retext-latin": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/retext-latin/-/retext-latin-4.0.0.tgz", + "integrity": "sha512-hv9woG7Fy0M9IlRQloq/N6atV82NxLGveq+3H2WOi79dtIYWN8OaxogDm77f8YnVXJL2VD3bbqowu5E3EMhBYA==", + "license": "MIT", + "dependencies": { + "@types/nlcst": "^2.0.0", + "parse-latin": "^7.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/retext-smartypants": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/retext-smartypants/-/retext-smartypants-6.2.0.tgz", + "integrity": "sha512-kk0jOU7+zGv//kfjXEBjdIryL1Acl4i9XNkHxtM7Tm5lFiCog576fjNC9hjoR7LTKQ0DsPWy09JummSsH1uqfQ==", + "license": "MIT", + "dependencies": { + "@types/nlcst": "^2.0.0", + "nlcst-to-string": "^4.0.0", + "unist-util-visit": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/retext-stringify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/retext-stringify/-/retext-stringify-4.0.0.tgz", + "integrity": "sha512-rtfN/0o8kL1e+78+uxPTqu1Klt0yPzKuQ2BfWwwfgIUSayyzxpM1PJzkKt4V8803uB9qSy32MvI7Xep9khTpiA==", + "license": "MIT", + "dependencies": { + "@types/nlcst": "^2.0.0", + "nlcst-to-string": "^4.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/run-async": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/rxjs/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/safe-array-concat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", + "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-push-apply": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", + "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-stable-stringify": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-1.1.1.tgz", + "integrity": "sha512-ERq4hUjKDbJfE4+XtZLFPCDi8Vb1JqaxAPTxWFLBx8XcAlf9Bda/ZJdVezs/NAfsMQScyIlUMx+Yeu7P7rx5jw==", + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/sax": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", + "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", + "license": "ISC" + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/section-matter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", + "integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==", + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/serialize-error": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-12.0.0.tgz", + "integrity": "sha512-ZYkZLAvKTKQXWuh5XpBw7CdbSzagarX39WyZ2H07CDLC5/KfsRGlIXV8d4+tfqX1M7916mRqR1QfNHSij+c9Pw==", + "license": "MIT", + "dependencies": { + "type-fest": "^4.31.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/serialize-error/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "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==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", + "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/sharp": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz", + "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.3", + "semver": "^7.6.3" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.33.5", + "@img/sharp-darwin-x64": "0.33.5", + "@img/sharp-libvips-darwin-arm64": "1.0.4", + "@img/sharp-libvips-darwin-x64": "1.0.4", + "@img/sharp-libvips-linux-arm": "1.0.5", + "@img/sharp-libvips-linux-arm64": "1.0.4", + "@img/sharp-libvips-linux-s390x": "1.0.4", + "@img/sharp-libvips-linux-x64": "1.0.4", + "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", + "@img/sharp-libvips-linuxmusl-x64": "1.0.4", + "@img/sharp-linux-arm": "0.33.5", + "@img/sharp-linux-arm64": "0.33.5", + "@img/sharp-linux-s390x": "0.33.5", + "@img/sharp-linux-x64": "0.33.5", + "@img/sharp-linuxmusl-arm64": "0.33.5", + "@img/sharp-linuxmusl-x64": "0.33.5", + "@img/sharp-wasm32": "0.33.5", + "@img/sharp-win32-ia32": "0.33.5", + "@img/sharp-win32-x64": "0.33.5" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/simple-eval": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-eval/-/simple-eval-1.0.1.tgz", + "integrity": "sha512-LH7FpTAkeD+y5xQC4fzS+tFtaNlvt3Ib1zKzvhjv/Y+cioV4zIuw4IZr2yhRLu67CWL7FR9/6KXKnjRoZTvGGQ==", + "license": "MIT", + "dependencies": { + "jsep": "^1.3.6" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/simple-swizzle/node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "license": "MIT" + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socket.io": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.8.1.tgz", + "integrity": "sha512-oZ7iUCxph8WYRHHcjBEc9unw3adt5CmSNlppj/5Q4k2RIrhl8Z5yY2Xr4j9zj0+wzVZ0bxmYoGSzKJnRl6A4yg==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.4", + "base64id": "~2.0.0", + "cors": "~2.8.5", + "debug": "~4.3.2", + "engine.io": "~6.6.0", + "socket.io-adapter": "~2.5.2", + "socket.io-parser": "~4.2.4" + }, + "engines": { + "node": ">=10.2.0" + } + }, + "node_modules/socket.io-adapter": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz", + "integrity": "sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg==", + "license": "MIT", + "dependencies": { + "debug": "~4.3.4", + "ws": "~8.17.1" + } + }, + "node_modules/socket.io-adapter/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socket.io-adapter/node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/socket.io-parser": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", + "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", + "license": "MIT", + "dependencies": { + "@socket.io/component-emitter": "~3.1.0", + "debug": "~4.3.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/socket.io-parser/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socket.io/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socks": { + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.4.tgz", + "integrity": "sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==", + "license": "MIT", + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", + "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">= 8" + } + }, + "node_modules/space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "license": "BSD-3-Clause" + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/stdin-discarder": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.1.0.tgz", + "integrity": "sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==", + "license": "MIT", + "dependencies": { + "bl": "^5.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/streamx": { + "version": "2.22.0", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.22.0.tgz", + "integrity": "sha512-sLh1evHOzBy/iWRiR6d1zRcLao4gGZr3C1kzNz4fopCOKJb6xD9ub8Mpi9Mr1R6id5o43S+d93fI48UC5uM9aw==", + "license": "MIT", + "dependencies": { + "fast-fifo": "^1.3.2", + "text-decoder": "^1.1.0" + }, + "optionalDependencies": { + "bare-events": "^2.2.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", + "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-data-property": "^1.1.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-object-atoms": "^1.0.0", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", + "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/stringify-entities": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", + "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==", + "license": "MIT", + "dependencies": { + "character-entities-html4": "^2.0.0", + "character-entities-legacy": "^3.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-bom-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/style-to-js": { + "version": "1.1.16", + "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.16.tgz", + "integrity": "sha512-/Q6ld50hKYPH3d/r6nr117TZkHR0w0kGGIVfpG9N6D8NymRPM9RqCUv4pRpJ62E5DqOYx2AFpbZMyCPnjQCnOw==", + "license": "MIT", + "dependencies": { + "style-to-object": "1.0.8" + } + }, + "node_modules/style-to-object": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.8.tgz", + "integrity": "sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g==", + "license": "MIT", + "dependencies": { + "inline-style-parser": "0.2.4" + } + }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar-fs": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.8.tgz", + "integrity": "sha512-ZoROL70jptorGAlgAYiLoBLItEKw/fUxg9BSYK/dF/GAGYFJOJJJMvjPAKDJraCXFwadD456FCuvLWgfhMsPwg==", + "license": "MIT", + "dependencies": { + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + }, + "optionalDependencies": { + "bare-fs": "^4.0.1", + "bare-path": "^3.0.0" + } + }, + "node_modules/tar-stream": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", + "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "license": "MIT", + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, + "node_modules/text-decoder": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz", + "integrity": "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==", + "license": "Apache-2.0", + "dependencies": { + "b4a": "^1.6.4" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "license": "MIT" + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/trim-lines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/trim-trailing-lines": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-2.1.0.tgz", + "integrity": "sha512-5UR5Biq4VlVOtzqkm2AZlgvSlDJtME46uV0br0gENbwN4l5+mMKT4b9gJKqWtuL2zAIqajGJGuvbCbcAJUZqBg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/trough": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz", + "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "license": "0BSD" + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "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==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0", + "reflect.getprototypeof": "^1.0.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/unbox-primitive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-bigints": "^1.0.2", + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "license": "MIT", + "dependencies": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "node_modules/unbzip2-stream/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "license": "MIT" + }, + "node_modules/unified": { + "version": "11.0.5", + "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz", + "integrity": "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "bail": "^2.0.0", + "devlop": "^1.0.0", + "extend": "^3.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-builder": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-builder/-/unist-builder-4.0.0.tgz", + "integrity": "sha512-wmRFnH+BLpZnTKpc5L7O67Kac89s9HMrtELpnNaE6TAobq5DTZZs5YaTQfAZBA9bFPECx2uVAPO31c+GVug8mg==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-find-after": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-find-after/-/unist-util-find-after-5.0.0.tgz", + "integrity": "sha512-amQa0Ep2m6hE2g72AugUItjbuM8X8cGQnFoHk0pGfrFeT9GZhzN5SW8nRsiGKK7Aif4CrACPENkA6P/Lw6fHGQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-is": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", + "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-map/-/unist-util-map-4.0.0.tgz", + "integrity": "sha512-HJs1tpkSmRJUzj6fskQrS5oYhBYlmtcvy4SepdDEEsL04FjBrgF0Mgggvxc1/qGBGgW7hRh9+UBK1aqTEnBpIA==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-modify-children": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-modify-children/-/unist-util-modify-children-4.0.0.tgz", + "integrity": "sha512-+tdN5fGNddvsQdIzUF3Xx82CU9sMM+fA0dLgR9vOmT0oPT2jH+P1nd5lSqfCfXAw+93NhcXNY2qqvTUtE4cQkw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "array-iterate": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", + "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position-from-estree": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unist-util-position-from-estree/-/unist-util-position-from-estree-2.0.0.tgz", + "integrity": "sha512-KaFVRjoqLyF6YXCbVLNad/eS4+OfPQQn2yOd7zF/h5T/CSL2v8NpN6a5TPvtbXthAGw5nG+PuTtq+DdIZr+cRQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-remove": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-remove/-/unist-util-remove-4.0.0.tgz", + "integrity": "sha512-b4gokeGId57UVRX/eVKej5gXqGlc9+trkORhFJpu9raqZkZhU0zm8Doi05+HaiBsMEIJowL+2WtQ5ItjsngPXg==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-remove-position": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-5.0.0.tgz", + "integrity": "sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-visit": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", + "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-children": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unist-util-visit-children/-/unist-util-visit-children-3.0.0.tgz", + "integrity": "sha512-RgmdTfSBOg04sdPcpTSD1jzoNBjt9a80/ZCzp5cI9n1qPzLZWF9YdvWGN2zmTumP1HWhXKdUWexjy/Wy/lJ7tA==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz", + "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/urijs": { + "version": "1.19.11", + "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz", + "integrity": "sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==", + "license": "MIT" + }, + "node_modules/urlpattern-polyfill": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", + "license": "MIT" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/utility-types": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.11.0.tgz", + "integrity": "sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vfile": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-location": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-5.0.3.tgz", + "integrity": "sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-matter": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/vfile-matter/-/vfile-matter-5.0.1.tgz", + "integrity": "sha512-o6roP82AiX0XfkyTHyRCMXgHfltUNlXSEqCIS80f+mbAyiQBE2fxtDVMtseyytGx75sihiJFo/zR6r/4LTs2Cw==", + "license": "MIT", + "dependencies": { + "vfile": "^6.0.0", + "yaml": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz", + "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/web-namespaces": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", + "integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", + "license": "MIT", + "dependencies": { + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", + "is-async-function": "^2.0.0", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", + "is-generator-function": "^1.0.10", + "is-regex": "^1.2.1", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.1.0", + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-collection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "license": "MIT", + "dependencies": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/ws": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", + "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xml2js": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", + "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", + "license": "MIT", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "license": "MIT", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" + }, + "node_modules/yaml": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz", + "integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==", + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "node_modules/yoctocolors-cjs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz", + "integrity": "sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zod": { + "version": "3.25.3", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.3.tgz", + "integrity": "sha512-VGZqnyYNrl8JpEJRZaFPqeVNIuqgXNu4cXZ5cOb6zEUO1OxKbRnWB4UdDIXMmiERWncs0yDQukssHov8JUxykQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-to-json-schema": { + "version": "3.24.5", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.5.tgz", + "integrity": "sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==", + "license": "ISC", + "peerDependencies": { + "zod": "^3.24.1" + } + }, + "node_modules/zwitch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + } + } +} diff --git a/docs/package.json b/docs/package.json new file mode 100644 index 00000000..18393b41 --- /dev/null +++ b/docs/package.json @@ -0,0 +1,16 @@ +{ + "name": "docs", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "dev": "mintlify dev" + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "", + "dependencies": { + "mintlify": "^4.0.538" + } +} diff --git a/docs/prompting/prompt-engineering-guide.mdx b/docs/prompting/prompt-engineering-guide.mdx index 1c19f0d7..42659d5c 100644 --- a/docs/prompting/prompt-engineering-guide.mdx +++ b/docs/prompting/prompt-engineering-guide.mdx @@ -4,212 +4,6 @@ title: "Prompt Engineering Guide" Welcome to the Cline Prompting Guide! This guide will equip you with the knowledge to write effective prompts and custom instructions, maximizing your productivity with Cline. -## Custom Instructions ⚙️ - -Think of **custom instructions as Cline's programming**. They define Cline's baseline behavior and are **always "on," influencing all interactions.** Instructions can be broad and abstract, or specific and explicit. You might want Cline to have a unique personality, or produce output in a particular file format, or adhere to certain architectural principles. Custom instructions can standardize Cline's output in ways you define, which is especially valuable when working with others. See the [Enterprise section](../enterprise-solutions/custom-instructions.md) for using Custom Instructions in a team context.\ -\ - - - NOTE: Modifying the Custom Instructions field updates Cline's prompt cache, discarding accumulated context. This causes a - temporary increase in cost while that context is replaced. Update Custom Instructions between conversations whenever possible. - - -To add custom instructions: - -1. Open VSCode -2. Click the Cline extension settings dial ⚙️ -3. Find the "Custom Instructions" field -4. Paste your instructions - - - Cline Logo - - -Custom instructions are powerful for: - -- Enforcing Coding Style and Best Practices: Ensure Cline always adheres to your team's coding conventions, naming conventions, and best practices. -- Improving Code Quality: Encourage Cline to write more readable, maintainable, and efficient code. -- Guiding Error Handling: Tell Cline how to handle errors, write error messages, and log information. - ---- - -## .clinerules File 📋 - -NOTE: Modifying the -`.clinerules` - - file updates Cline's prompt cache, discarding accumulated context. This causes a temporary increase in cost while that context - is replaced. Update the - -`.clinerules` -file between conversations whenever possible. - -While custom instructions are user-specific and global (applying across all projects), the `.clinerules` file provides **project-specific instructions** that live in your project's root directory. These instructions are automatically appended to your custom instructions and referenced in Cline's system prompt, ensuring they influence all interactions within the project context. This makes it an excellent tool for: - -### General Use Cases - -The `.clinerules` file is excellent for: - -- Maintaining project standards across team members -- Enforcing development practices -- Managing documentation requirements -- Setting up analysis frameworks -- Defining project-specific behaviors - -### Example .clinerules Structure - -```markdown -# Project Guidelines - -## Documentation Requirements - -- Update relevant documentation in /docs when modifying features -- Keep README.md in sync with new capabilities -- Maintain changelog entries in CHANGELOG.md - -## Architecture Decision Records - -Create ADRs in /docs/adr for: - -- Major dependency changes -- Architectural pattern changes -- New integration patterns -- Database schema changes - Follow template in /docs/adr/template.md - -## Code Style & Patterns - -- Generate API clients using OpenAPI Generator -- Use TypeScript axios template -- Place generated code in /src/generated -- Prefer composition over inheritance -- Use repository pattern for data access -- Follow error handling pattern in /src/utils/errors.ts - -## Testing Standards - -- Unit tests required for business logic -- Integration tests for API endpoints -- E2E tests for critical user flows -``` - -### Key Benefits - -1. **Version Controlled**: The `.clinerules` file becomes part of your project's source code -2. **Team Consistency**: Ensures consistent behavior across all team members -3. **Project-Specific**: Rules and standards tailored to each project's needs -4. **Institutional Knowledge**: Maintains project standards and practices in code - -Place the `.clinerules` file in your project's root directory: - -``` -your-project/ -├── .clinerules -├── src/ -├── docs/ -└── ... -``` - -Cline's system prompt, on the other hand, is not user-editable ([here's where you can find it](https://github.com/cline/cline/blob/main/src/core/prompts/system.ts)). For a broader look at prompt engineering best practices, check out [this resource](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview). - -### Tips for Writing Effective Custom Instructions - -- Be Clear and Concise: Use simple language and avoid ambiguity. -- Focus on Desired Outcomes: Describe the results you want, not the specific steps. -- Test and Iterate: Experiment to find what works best for your workflow. - -### .clinerules Folder System 📂 - -While a single `.clinerules` file works well for simpler projects, Cline now supports a `.clinerules` folder for more sophisticated rule organization. This modular approach brings several advantages: - -#### How It Works - -Instead of a single file, create a `.clinerules/` directory in your project root: - -``` -your-project/ -├── .clinerules/ # Folder containing active rules -│ ├── 01-coding.md # Core coding standards -│ ├── 02-documentation.md # Documentation requirements -│ └── current-sprint.md # Rules specific to current work -├── src/ -└── ... -``` - -Cline automatically processes **all Markdown files** inside the `.clinerules/` directory, combining them into a unified set of rules. The numeric prefixes (optional) help organize files in a logical sequence. - -#### Using a Rules Bank - -For projects with multiple contexts or teams, maintain a rules bank directory: - -``` -your-project/ -├── .clinerules/ # Active rules - automatically applied -│ ├── 01-coding.md -│ └── client-a.md -│ -├── clinerules-bank/ # Repository of available but inactive rules -│ ├── clients/ # Client-specific rule sets -│ │ ├── client-a.md -│ │ └── client-b.md -│ ├── frameworks/ # Framework-specific rules -│ │ ├── react.md -│ │ └── vue.md -│ └── project-types/ # Project type standards -│ ├── api-service.md -│ └── frontend-app.md -└── ... -``` - -#### Benefits of the Folder Approach - -1. **Contextual Activation**: Copy only relevant rules from the bank to the active folder -2. **Easier Maintenance**: Update individual rule files without affecting others -3. **Team Flexibility**: Different team members can activate rules specific to their current task -4. **Reduced Noise**: Keep the active ruleset focused and relevant - -#### Usage Examples - -Switch between client projects: - -```bash -# Switch to Client B project -rm .clinerules/client-a.md -cp clinerules-bank/clients/client-b.md .clinerules/ -``` - -Adapt to different tech stacks: - -```bash -# Frontend React project -cp clinerules-bank/frameworks/react.md .clinerules/ -``` - -#### Implementation Tips - -- Keep individual rule files focused on specific concerns -- Use descriptive filenames that clearly indicate the rule's purpose -- Consider git-ignoring the active `.clinerules/` folder while tracking the `clinerules-bank/` -- Create team scripts to quickly activate common rule combinations - -The folder system transforms your Cline rules from a static document into a dynamic knowledge system that adapts to your team's changing contexts and requirements. - -### Managing Rules with the Toggleable Popover - -To make managing both single `.clinerules` files and the folder system even easier, Cline v3.13 introduces a dedicated popover UI directly accessible from the chat interface. - -Located conveniently under the chat input field, this popover allows you to: - -- **Instantly See Active Rules:** View which global rules (from your user settings) and workspace rules (`.clinerules` file or folder contents) are currently active. -- **Quickly Toggle Rules:** Enable or disable specific rule files within your workspace `.clinerules/` folder with a single click. This is perfect for activating context-specific rules (like `react-rules.md` or `memory-bank.md`) only when needed. -- **Easily Add/Manage Rules:** Quickly create a workspace `.clinerules` file or folder if one doesn't exist, or add new rule files to an existing folder. - -This UI significantly simplifies switching contexts and managing different sets of instructions without needing to manually edit files or configurations during a conversation. - - - Cline Logo - - ## .clineignore File Guide ### Overview From ee9ddef7c5603bb731352ae93407ac67291113ce Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Tue, 20 May 2025 09:29:04 -0700 Subject: [PATCH 08/85] Centralize navigation message handling (#3650) * centralize navigation message handling in the extension state context * changeset --------- Co-authored-by: Elephant Lumps --- .changeset/blue-moons-mate.md | 5 + ui-navigation-refactoring-guide.md | 224 ++++++++++++++++++ webview-ui/src/App.tsx | 98 ++------ .../components/chat/ServersToggleModal.tsx | 4 +- .../src/context/ExtensionStateContext.tsx | 117 ++++++++- webview-ui/src/hooks/useNavigator.ts | 24 -- 6 files changed, 369 insertions(+), 103 deletions(-) create mode 100644 .changeset/blue-moons-mate.md create mode 100644 ui-navigation-refactoring-guide.md delete mode 100644 webview-ui/src/hooks/useNavigator.ts diff --git a/.changeset/blue-moons-mate.md b/.changeset/blue-moons-mate.md new file mode 100644 index 00000000..e097959d --- /dev/null +++ b/.changeset/blue-moons-mate.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Put all the navigation state and message handling and navigation functions in the extension state context instead of the app.tsx diff --git a/ui-navigation-refactoring-guide.md b/ui-navigation-refactoring-guide.md new file mode 100644 index 00000000..f7d93ed0 --- /dev/null +++ b/ui-navigation-refactoring-guide.md @@ -0,0 +1,224 @@ +--- +title: "UI Navigation Refactoring Guide for Cline" +description: "A comprehensive guide for refactoring Cline's UI navigation system from extension message-based navigation to React state management" +--- + + + +This guide provides context for refactoring Cline's UI navigation system, moving from extension message-based navigation to React state management using context and custom hooks. + +## Key Files and Structure + +### Message Types + +Message types define the communication between the extension and webview. + +- `src/shared/WebviewMessage.ts` - TypeScript interface defining the messages sent from webview to extension + - Contains message types that should be removed in favor of direct navigation functions + - Example: `"showChatView"` should be replaced with `navigateToChat()` + +- `src/shared/ExtensionMessage.ts` - TypeScript interface defining the messages sent from extension to extension + - Contains navigation actions that will be handled by ExtensionStateContext + - Example: `action: "mcpButtonClicked"` triggers MCP view navigation + +### Controller and Context + +- `src/core/controller/index.ts` - Main controller that handles messages from the webview + - Processes incoming WebviewMessages + - Sends navigation commands via ExtensionMessages + - Contains handlers that will be removed after refactoring + +- `webview-ui/src/context/ExtensionStateContext.tsx` - React context for managing UI state + - Maintains navigation state (which views are visible) + - Provides navigation functions through the context (navigateToMcp, navigateToSettings, etc.) + - Handles incoming extension messages for navigation + +### Components + +- `webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx` - Example component using direct message posting + - Currently uses `vscode.postMessage()` directly for some actions + - Should be updated to use navigation functions from ExtensionStateContext directly + +- `webview-ui/src/components/chat/ServersToggleModal.tsx` - Example of refactored component + - Uses `navigateToMcp()` directly from ExtensionStateContext + - No longer depends on separate navigation hooks + +## Understanding the Navigation Patterns + +### Pattern 1: Webview-to-Extension-to-Webview (To Be Refactored) + +This pattern occurs when a component wants to navigate to a different view: + +1. Component sends a message to the extension: `vscode.postMessage({ type: "showChatView" })` +2. Extension controller processes it: `case "showChatView"` +3. Controller sends a navigation action back: `this.postMessageToWebview({ type: "action", action: "chatButtonClicked" })` +4. ExtensionStateContext handles the action and updates state: `case "chatButtonClicked": navigateToChat()` + +**Example from the code:** + +```typescript +// WebviewMessage.ts - Message type to be removed +| "showChatView" + +// controller/index.ts - Handler to be removed +case "showChatView": { + this.postMessageToWebview({ + type: "action", + action: "chatButtonClicked", + }) + break +} + +// ExtensionStateContext.tsx - Handling that will remain +case "chatButtonClicked": + navigateToChat() + break +``` + +### Pattern 2: Extension-Initiated Navigation (Must Remain) + +This pattern occurs when the extension needs to control navigation: + +1. Extension sends a message: `this.postMessageToWebview({ type: "action", action: "settingsButtonClicked" })` +2. ExtensionStateContext handles it and updates state: `case "settingsButtonClicked": navigateToSettings()` + +**Example from the code:** + +```typescript +// ExtensionMessage.ts +action?: + | "chatButtonClicked" + | "mcpButtonClicked" + | "settingsButtonClicked" + | "historyButtonClicked" + | "didBecomeVisible" + | "accountLogoutClicked" + | "accountButtonClicked" + | "focusChatInput" + +// ExtensionStateContext.tsx +case "settingsButtonClicked": + navigateToSettings() + break +``` + +## The Refactoring Process + +For each UI action that follows Pattern 1, follow these steps: + +1. **Identify UI state variables needed** + - ExtensionStateContext already includes view state variables: + ```typescript + const [showMcp, setShowMcp] = useState(false) + const [mcpTab, setMcpTab] = useState(undefined) + const [showSettings, setShowSettings] = useState(false) + const [showHistory, setShowHistory] = useState(false) + const [showAccount, setShowAccount] = useState(false) + ``` + +2. **Use navigation functions from ExtensionStateContext directly** + - ExtensionStateContext provides navigation functions: + ```typescript + const navigateToMcp = useCallback(/*...*/) + const navigateToSettings = useCallback(/*...*/) + const navigateToHistory = useCallback(/*...*/) + const navigateToAccount = useCallback(/*...*/) + const navigateToChat = useCallback(/*...*/) + ``` + - Use these functions directly without intermediate hooks + +3. **Update components to use the context** + - Replace `vscode.postMessage()` calls with context functions: + ```typescript + // Before: + vscode.postMessage({ type: "showChatView" }) + + // After: + const { navigateToChat } = useExtensionState() + navigateToChat() + ``` + +4. **Clean up message interfaces and controller** + - Remove the action type from WebviewMessage interface + - Remove the case handler from controller/index.ts + +## Messages to Remove vs. Keep + +### Messages to Remove (Pattern 1) + +These messages from WebviewMessage.ts should be refactored to use direct navigation functions: + +```typescript +| "showChatView" // Use navigateToChat() instead +| "openMcpSettings" // Use navigateToMcp() instead +| "openSettings" // Use navigateToSettings() instead +``` + +### Messages to Keep (Pattern 2) + +These actions in ExtensionMessage.ts must remain as they're initiated by the extension: + +```typescript +action?: + | "chatButtonClicked" // Extension initiates chat view + | "mcpButtonClicked" // Extension initiates MCP view + | "settingsButtonClicked" // Extension initiates settings view + | "historyButtonClicked" // Extension initiates history view + | "accountButtonClicked" // Extension initiates account view +``` + +## Example Refactoring + +Let's look at how `showChatView` would be refactored: + +### Before Refactoring + +```typescript +// Component.tsx +const handleButtonClick = () => { + vscode.postMessage({ type: "showChatView" }) +} + +// controller/index.ts +case "showChatView": { + this.postMessageToWebview({ + type: "action", + action: "chatButtonClicked", + }) + break +} + +// ExtensionStateContext.tsx +case "chatButtonClicked": + navigateToChat() + break +``` + +### After Refactoring + +```typescript +// Component.tsx +const { navigateToChat } = useExtensionState() +const handleButtonClick = () => { + navigateToChat() +} + +// controller/index.ts +// The showChatView case is removed + +// ExtensionStateContext.tsx +// The chatButtonClicked case remains for extension-initiated navigation +case "chatButtonClicked": + navigateToChat() + break +``` + +## Best Practices + +- **Direct Navigation**: Always use the navigation functions from ExtensionStateContext directly +- **Clean Views**: When navigating to a view, ensure other views are properly hidden +- **Consistent Naming**: Use consistent naming for navigation functions (`navigateTo`) +- **Keep Extension Actions**: Maintain extension-initiated navigation actions in ExtensionMessage.ts +- **Document Dependencies**: Use proper dependency arrays in useCallback for navigation functions +- **Centralized Logic**: Keep all navigation logic in ExtensionStateContext +- **Avoid Extra Hooks**: Don't create separate hooks that merely wrap navigation functions diff --git a/webview-ui/src/App.tsx b/webview-ui/src/App.tsx index 24c1eb16..86df63cd 100644 --- a/webview-ui/src/App.tsx +++ b/webview-ui/src/App.tsx @@ -1,6 +1,4 @@ -import { useCallback, useEffect, useState } from "react" -import { useEvent } from "react-use" -import { ExtensionMessage } from "@shared/ExtensionMessage" +import { useEffect } from "react" import ChatView from "./components/chat/ChatView" import HistoryView from "./components/history/HistoryView" import SettingsView from "./components/settings/SettingsView" @@ -12,67 +10,24 @@ import McpView from "./components/mcp/configuration/McpConfigurationView" import { Providers } from "./Providers" const AppContent = () => { - const { didHydrateState, showWelcome, shouldShowAnnouncement, showMcp, mcpTab } = useExtensionState() - const [showSettings, setShowSettings] = useState(false) - const hideSettings = useCallback(() => setShowSettings(false), []) - const [showHistory, setShowHistory] = useState(false) - const [showAccount, setShowAccount] = useState(false) - const [showAnnouncement, setShowAnnouncement] = useState(false) - - const { setShowMcp, setMcpTab } = useExtensionState() - - const closeMcpView = useCallback(() => { - setShowMcp(false) - setMcpTab(undefined) - }, [setShowMcp, setMcpTab]) - - const handleMessage = useCallback( - (e: MessageEvent) => { - const message: ExtensionMessage = e.data - switch (message.type) { - case "action": - switch (message.action!) { - case "settingsButtonClicked": - setShowSettings(true) - setShowHistory(false) - closeMcpView() - setShowAccount(false) - break - case "historyButtonClicked": - setShowSettings(false) - setShowHistory(true) - closeMcpView() - setShowAccount(false) - break - case "mcpButtonClicked": - setShowSettings(false) - setShowHistory(false) - if (message.tab) { - setMcpTab(message.tab) - } - setShowMcp(true) - setShowAccount(false) - break - case "accountButtonClicked": - setShowSettings(false) - setShowHistory(false) - closeMcpView() - setShowAccount(true) - break - case "chatButtonClicked": - setShowSettings(false) - setShowHistory(false) - closeMcpView() - setShowAccount(false) - break - } - break - } - }, - [setShowMcp, setMcpTab, closeMcpView], - ) - - useEvent("message", handleMessage) + const { + didHydrateState, + showWelcome, + shouldShowAnnouncement, + showMcp, + mcpTab, + showSettings, + showHistory, + showAccount, + showAnnouncement, + setShowAnnouncement, + closeMcpView, + navigateToHistory, + hideSettings, + hideHistory, + hideAccount, + hideAnnouncement, + } = useExtensionState() useEffect(() => { if (shouldShowAnnouncement) { @@ -92,22 +47,15 @@ const AppContent = () => { ) : ( <> {showSettings && } - {showHistory && setShowHistory(false)} />} + {showHistory && } {showMcp && } - {showAccount && setShowAccount(false)} />} + {showAccount && } {/* Do not conditionally load ChatView, it's expensive and there's state we don't want to lose (user input, disableInput, askResponse promise, etc.) */} { - setShowSettings(false) - closeMcpView() - setShowAccount(false) - setShowHistory(true) - }} + showHistoryView={navigateToHistory} isHidden={showSettings || showHistory || showMcp || showAccount} showAnnouncement={showAnnouncement} - hideAnnouncement={() => { - setShowAnnouncement(false) - }} + hideAnnouncement={hideAnnouncement} /> )} diff --git a/webview-ui/src/components/chat/ServersToggleModal.tsx b/webview-ui/src/components/chat/ServersToggleModal.tsx index 93363d97..0aa2ca5c 100644 --- a/webview-ui/src/components/chat/ServersToggleModal.tsx +++ b/webview-ui/src/components/chat/ServersToggleModal.tsx @@ -1,7 +1,6 @@ import React, { useRef, useState, useEffect } from "react" import { useClickAway, useWindowSize } from "react-use" import { useExtensionState } from "@/context/ExtensionStateContext" -import { useNavigator } from "@/hooks/useNavigator" import { CODE_BLOCK_BG_COLOR } from "@/components/common/CodeBlock" import ServersToggleList from "@/components/mcp/configuration/tabs/installed/ServersToggleList" import { vscode } from "@/utils/vscode" @@ -9,8 +8,7 @@ import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" import Tooltip from "@/components/common/Tooltip" const ServersToggleModal: React.FC = () => { - const { mcpServers } = useExtensionState() - const { navigateToMcp } = useNavigator() + const { mcpServers, navigateToMcp } = useExtensionState() const [isVisible, setIsVisible] = useState(false) const buttonRef = useRef(null) const modalRef = useRef(null) diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index bdae3c2b..27ea1c62 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -31,9 +31,14 @@ interface ExtensionStateContextType extends ExtensionState { mcpMarketplaceCatalog: McpMarketplaceCatalog filePaths: string[] totalTasksSize: number | null + // View state showMcp: boolean mcpTab?: McpViewTab + showSettings: boolean + showHistory: boolean + showAccount: boolean + showAnnouncement: boolean // Setters setApiConfiguration: (config: ApiConfiguration) => void @@ -47,9 +52,23 @@ interface ExtensionStateContextType extends ExtensionState { setChatSettings: (value: ChatSettings) => void setMcpServers: (value: McpServer[]) => void - // Navigation + // Navigation state setters setShowMcp: (value: boolean) => void setMcpTab: (tab?: McpViewTab) => void + + // Navigation functions + navigateToMcp: (tab?: McpViewTab) => void + navigateToSettings: () => void + navigateToHistory: () => void + navigateToAccount: () => void + navigateToChat: () => void + + // Hide functions + hideSettings: () => void + hideHistory: () => void + hideAccount: () => void + hideAnnouncement: () => void + closeMcpView: () => void } const ExtensionStateContext = createContext(undefined) @@ -60,6 +79,64 @@ export const ExtensionStateContextProvider: React.FC<{ // UI view state const [showMcp, setShowMcp] = useState(false) const [mcpTab, setMcpTab] = useState(undefined) + const [showSettings, setShowSettings] = useState(false) + const [showHistory, setShowHistory] = useState(false) + const [showAccount, setShowAccount] = useState(false) + const [showAnnouncement, setShowAnnouncement] = useState(false) + + // Helper for MCP view + const closeMcpView = useCallback(() => { + setShowMcp(false) + setMcpTab(undefined) + }, [setShowMcp, setMcpTab]) + + // Hide functions + const hideSettings = useCallback(() => setShowSettings(false), [setShowSettings]) + const hideHistory = useCallback(() => setShowHistory(false), [setShowHistory]) + const hideAccount = useCallback(() => setShowAccount(false), [setShowAccount]) + const hideAnnouncement = useCallback(() => setShowAnnouncement(false), [setShowAnnouncement]) + + // Navigation functions + const navigateToMcp = useCallback( + (tab?: McpViewTab) => { + setShowSettings(false) + setShowHistory(false) + setShowAccount(false) + if (tab) { + setMcpTab(tab) + } + setShowMcp(true) + }, + [setShowMcp, setMcpTab, setShowSettings, setShowHistory, setShowAccount], + ) + + const navigateToSettings = useCallback(() => { + setShowHistory(false) + closeMcpView() + setShowAccount(false) + setShowSettings(true) + }, [setShowSettings, setShowHistory, closeMcpView, setShowAccount]) + + const navigateToHistory = useCallback(() => { + setShowSettings(false) + closeMcpView() + setShowAccount(false) + setShowHistory(true) + }, [setShowSettings, closeMcpView, setShowAccount, setShowHistory]) + + const navigateToAccount = useCallback(() => { + setShowSettings(false) + closeMcpView() + setShowHistory(false) + setShowAccount(true) + }, [setShowSettings, closeMcpView, setShowHistory, setShowAccount]) + + const navigateToChat = useCallback(() => { + setShowSettings(false) + closeMcpView() + setShowHistory(false) + setShowAccount(false) + }, [setShowSettings, closeMcpView, setShowHistory, setShowAccount]) const [state, setState] = useState({ version: "", @@ -100,6 +177,26 @@ export const ExtensionStateContextProvider: React.FC<{ const handleMessage = useCallback((event: MessageEvent) => { const message: ExtensionMessage = event.data switch (message.type) { + case "action": { + switch (message.action!) { + case "mcpButtonClicked": + navigateToMcp(message.tab) + break + case "settingsButtonClicked": + navigateToSettings() + break + case "historyButtonClicked": + navigateToHistory() + break + case "accountButtonClicked": + navigateToAccount() + break + case "chatButtonClicked": + navigateToChat() + break + } + break + } case "state": { // Handler for direct state messages if (message.state) { @@ -335,12 +432,29 @@ export const ExtensionStateContextProvider: React.FC<{ totalTasksSize, showMcp, mcpTab, + showSettings, + showHistory, + showAccount, + showAnnouncement, globalClineRulesToggles: state.globalClineRulesToggles || {}, localClineRulesToggles: state.localClineRulesToggles || {}, localCursorRulesToggles: state.localCursorRulesToggles || {}, localWindsurfRulesToggles: state.localWindsurfRulesToggles || {}, workflowToggles: state.workflowToggles || {}, enableCheckpointsSetting: state.enableCheckpointsSetting, + + // Navigation functions + navigateToMcp, + navigateToSettings, + navigateToHistory, + navigateToAccount, + navigateToChat, + + // Hide functions + hideSettings, + hideHistory, + hideAccount, + hideAnnouncement, setApiConfiguration: (value) => setState((prevState) => ({ ...prevState, @@ -383,6 +497,7 @@ export const ExtensionStateContextProvider: React.FC<{ })), setMcpServers: (mcpServers: McpServer[]) => setMcpServers(mcpServers), setShowMcp, + closeMcpView, setChatSettings: (value) => { setState((prevState) => ({ ...prevState, diff --git a/webview-ui/src/hooks/useNavigator.ts b/webview-ui/src/hooks/useNavigator.ts deleted file mode 100644 index 129ed797..00000000 --- a/webview-ui/src/hooks/useNavigator.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { useExtensionState } from "../context/ExtensionStateContext" -import { McpViewTab } from "@shared/mcp" - -/** - * Hook for navigating between different views in the application. - */ -export const useNavigator = () => { - const { setShowMcp, setMcpTab } = useExtensionState() - - /** - * Navigate to the MCP view - * @param tab Optional tab to show in the MCP view - */ - const navigateToMcp = (tab?: McpViewTab) => { - if (tab) { - setMcpTab(tab) - } - setShowMcp(true) - } - - return { - navigateToMcp, - } -} From 6cf5fdadb961fd7d3dc47ebac929af7e95d8e471 Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Tue, 20 May 2025 09:47:44 -0700 Subject: [PATCH 09/85] remove markdown (#3667) Co-authored-by: Elephant Lumps --- ui-navigation-refactoring-guide.md | 224 ----------------------------- 1 file changed, 224 deletions(-) delete mode 100644 ui-navigation-refactoring-guide.md diff --git a/ui-navigation-refactoring-guide.md b/ui-navigation-refactoring-guide.md deleted file mode 100644 index f7d93ed0..00000000 --- a/ui-navigation-refactoring-guide.md +++ /dev/null @@ -1,224 +0,0 @@ ---- -title: "UI Navigation Refactoring Guide for Cline" -description: "A comprehensive guide for refactoring Cline's UI navigation system from extension message-based navigation to React state management" ---- - - - -This guide provides context for refactoring Cline's UI navigation system, moving from extension message-based navigation to React state management using context and custom hooks. - -## Key Files and Structure - -### Message Types - -Message types define the communication between the extension and webview. - -- `src/shared/WebviewMessage.ts` - TypeScript interface defining the messages sent from webview to extension - - Contains message types that should be removed in favor of direct navigation functions - - Example: `"showChatView"` should be replaced with `navigateToChat()` - -- `src/shared/ExtensionMessage.ts` - TypeScript interface defining the messages sent from extension to extension - - Contains navigation actions that will be handled by ExtensionStateContext - - Example: `action: "mcpButtonClicked"` triggers MCP view navigation - -### Controller and Context - -- `src/core/controller/index.ts` - Main controller that handles messages from the webview - - Processes incoming WebviewMessages - - Sends navigation commands via ExtensionMessages - - Contains handlers that will be removed after refactoring - -- `webview-ui/src/context/ExtensionStateContext.tsx` - React context for managing UI state - - Maintains navigation state (which views are visible) - - Provides navigation functions through the context (navigateToMcp, navigateToSettings, etc.) - - Handles incoming extension messages for navigation - -### Components - -- `webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx` - Example component using direct message posting - - Currently uses `vscode.postMessage()` directly for some actions - - Should be updated to use navigation functions from ExtensionStateContext directly - -- `webview-ui/src/components/chat/ServersToggleModal.tsx` - Example of refactored component - - Uses `navigateToMcp()` directly from ExtensionStateContext - - No longer depends on separate navigation hooks - -## Understanding the Navigation Patterns - -### Pattern 1: Webview-to-Extension-to-Webview (To Be Refactored) - -This pattern occurs when a component wants to navigate to a different view: - -1. Component sends a message to the extension: `vscode.postMessage({ type: "showChatView" })` -2. Extension controller processes it: `case "showChatView"` -3. Controller sends a navigation action back: `this.postMessageToWebview({ type: "action", action: "chatButtonClicked" })` -4. ExtensionStateContext handles the action and updates state: `case "chatButtonClicked": navigateToChat()` - -**Example from the code:** - -```typescript -// WebviewMessage.ts - Message type to be removed -| "showChatView" - -// controller/index.ts - Handler to be removed -case "showChatView": { - this.postMessageToWebview({ - type: "action", - action: "chatButtonClicked", - }) - break -} - -// ExtensionStateContext.tsx - Handling that will remain -case "chatButtonClicked": - navigateToChat() - break -``` - -### Pattern 2: Extension-Initiated Navigation (Must Remain) - -This pattern occurs when the extension needs to control navigation: - -1. Extension sends a message: `this.postMessageToWebview({ type: "action", action: "settingsButtonClicked" })` -2. ExtensionStateContext handles it and updates state: `case "settingsButtonClicked": navigateToSettings()` - -**Example from the code:** - -```typescript -// ExtensionMessage.ts -action?: - | "chatButtonClicked" - | "mcpButtonClicked" - | "settingsButtonClicked" - | "historyButtonClicked" - | "didBecomeVisible" - | "accountLogoutClicked" - | "accountButtonClicked" - | "focusChatInput" - -// ExtensionStateContext.tsx -case "settingsButtonClicked": - navigateToSettings() - break -``` - -## The Refactoring Process - -For each UI action that follows Pattern 1, follow these steps: - -1. **Identify UI state variables needed** - - ExtensionStateContext already includes view state variables: - ```typescript - const [showMcp, setShowMcp] = useState(false) - const [mcpTab, setMcpTab] = useState(undefined) - const [showSettings, setShowSettings] = useState(false) - const [showHistory, setShowHistory] = useState(false) - const [showAccount, setShowAccount] = useState(false) - ``` - -2. **Use navigation functions from ExtensionStateContext directly** - - ExtensionStateContext provides navigation functions: - ```typescript - const navigateToMcp = useCallback(/*...*/) - const navigateToSettings = useCallback(/*...*/) - const navigateToHistory = useCallback(/*...*/) - const navigateToAccount = useCallback(/*...*/) - const navigateToChat = useCallback(/*...*/) - ``` - - Use these functions directly without intermediate hooks - -3. **Update components to use the context** - - Replace `vscode.postMessage()` calls with context functions: - ```typescript - // Before: - vscode.postMessage({ type: "showChatView" }) - - // After: - const { navigateToChat } = useExtensionState() - navigateToChat() - ``` - -4. **Clean up message interfaces and controller** - - Remove the action type from WebviewMessage interface - - Remove the case handler from controller/index.ts - -## Messages to Remove vs. Keep - -### Messages to Remove (Pattern 1) - -These messages from WebviewMessage.ts should be refactored to use direct navigation functions: - -```typescript -| "showChatView" // Use navigateToChat() instead -| "openMcpSettings" // Use navigateToMcp() instead -| "openSettings" // Use navigateToSettings() instead -``` - -### Messages to Keep (Pattern 2) - -These actions in ExtensionMessage.ts must remain as they're initiated by the extension: - -```typescript -action?: - | "chatButtonClicked" // Extension initiates chat view - | "mcpButtonClicked" // Extension initiates MCP view - | "settingsButtonClicked" // Extension initiates settings view - | "historyButtonClicked" // Extension initiates history view - | "accountButtonClicked" // Extension initiates account view -``` - -## Example Refactoring - -Let's look at how `showChatView` would be refactored: - -### Before Refactoring - -```typescript -// Component.tsx -const handleButtonClick = () => { - vscode.postMessage({ type: "showChatView" }) -} - -// controller/index.ts -case "showChatView": { - this.postMessageToWebview({ - type: "action", - action: "chatButtonClicked", - }) - break -} - -// ExtensionStateContext.tsx -case "chatButtonClicked": - navigateToChat() - break -``` - -### After Refactoring - -```typescript -// Component.tsx -const { navigateToChat } = useExtensionState() -const handleButtonClick = () => { - navigateToChat() -} - -// controller/index.ts -// The showChatView case is removed - -// ExtensionStateContext.tsx -// The chatButtonClicked case remains for extension-initiated navigation -case "chatButtonClicked": - navigateToChat() - break -``` - -## Best Practices - -- **Direct Navigation**: Always use the navigation functions from ExtensionStateContext directly -- **Clean Views**: When navigating to a view, ensure other views are properly hidden -- **Consistent Naming**: Use consistent naming for navigation functions (`navigateTo`) -- **Keep Extension Actions**: Maintain extension-initiated navigation actions in ExtensionMessage.ts -- **Document Dependencies**: Use proper dependency arrays in useCallback for navigation functions -- **Centralized Logic**: Keep all navigation logic in ExtensionStateContext -- **Avoid Extra Hooks**: Don't create separate hooks that merely wrap navigation functions From 7a24c10188f709508d3a8a0fd3875600221e1de3 Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Tue, 20 May 2025 12:31:45 -0700 Subject: [PATCH 10/85] Migrate toggleClineRule protobus (#3638) * migrate toggleClineRule * changeset --------- Co-authored-by: Elephant Lumps --- .changeset/hungry-worms-draw.md | 5 + proto/file.proto | 22 + src/core/controller/file/methods.ts | 2 + src/core/controller/file/toggleClineRule.ts | 43 ++ src/core/controller/index.ts | 24 -- src/shared/WebviewMessage.ts | 2 - src/shared/proto/file.ts | 390 ++++++++++++++++++ src/standalone/server-setup.ts | 2 + .../cline-rules/ClineRulesToggleModal.tsx | 20 +- .../src/context/ExtensionStateContext.tsx | 12 + 10 files changed, 493 insertions(+), 29 deletions(-) create mode 100644 .changeset/hungry-worms-draw.md create mode 100644 src/core/controller/file/toggleClineRule.ts diff --git a/.changeset/hungry-worms-draw.md b/.changeset/hungry-worms-draw.md new file mode 100644 index 00000000..6112af0b --- /dev/null +++ b/.changeset/hungry-worms-draw.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Migrate toggleClineRule to protobus diff --git a/proto/file.proto b/proto/file.proto index c0779808..16b83585 100644 --- a/proto/file.proto +++ b/proto/file.proto @@ -34,6 +34,9 @@ service FileService { // Search for files in the workspace with fuzzy matching rpc searchFiles(FileSearchRequest) returns (FileSearchResults); + + // Toggle a Cline rule (enable or disable) + rpc toggleClineRule(ToggleClineRuleRequest) returns (ToggleClineRules); } // Request to convert a list of URIs to relative paths @@ -97,3 +100,22 @@ message RuleFile { string display_name = 2; // Filename for display purposes bool already_exists = 3; // For createRuleFile, indicates if file already existed } + +// Request to toggle a Cline rule +message ToggleClineRuleRequest { + Metadata metadata = 1; + bool is_global = 2; // Whether this is a global rule or workspace rule + string rule_path = 3; // Path to the rule file + bool enabled = 4; // Whether to enable or disable the rule +} + +// Maps from filepath to enabled/disabled status, matching app's ClineRulesToggles type +message ClineRulesToggles { + map toggles = 1; +} + +// Response for toggleClineRule operation +message ToggleClineRules { + ClineRulesToggles global_cline_rules_toggles = 1; + ClineRulesToggles local_cline_rules_toggles = 2; +} diff --git a/src/core/controller/file/methods.ts b/src/core/controller/file/methods.ts index 20dc5aa4..8c1f60c4 100644 --- a/src/core/controller/file/methods.ts +++ b/src/core/controller/file/methods.ts @@ -12,6 +12,7 @@ import { openImage } from "./openImage" import { searchCommits } from "./searchCommits" import { searchFiles } from "./searchFiles" import { selectImages } from "./selectImages" +import { toggleClineRule } from "./toggleClineRule" // Register all file service methods export function registerAllMethods(): void { @@ -25,4 +26,5 @@ export function registerAllMethods(): void { registerMethod("searchCommits", searchCommits) registerMethod("searchFiles", searchFiles) registerMethod("selectImages", selectImages) + registerMethod("toggleClineRule", toggleClineRule) } diff --git a/src/core/controller/file/toggleClineRule.ts b/src/core/controller/file/toggleClineRule.ts new file mode 100644 index 00000000..3f1237fc --- /dev/null +++ b/src/core/controller/file/toggleClineRule.ts @@ -0,0 +1,43 @@ +import type { ToggleClineRuleRequest, ClineRulesToggles, ToggleClineRules } from "../../../shared/proto/file" +import type { Controller } from "../index" +import { getGlobalState, getWorkspaceState, updateGlobalState, updateWorkspaceState } from "../../../core/storage/state" +import { ClineRulesToggles as AppClineRulesToggles } from "@shared/cline-rules" + +/** + * Toggles a Cline rule (enable or disable) + * @param controller The controller instance + * @param request The toggle request + * @returns The updated Cline rule toggles + */ +export async function toggleClineRule(controller: Controller, request: ToggleClineRuleRequest): Promise { + const { isGlobal, rulePath, enabled } = request + + if (!rulePath || typeof enabled !== "boolean" || typeof isGlobal !== "boolean") { + console.error("toggleClineRule: Missing or invalid parameters", { + rulePath, + isGlobal: typeof isGlobal === "boolean" ? isGlobal : `Invalid: ${typeof isGlobal}`, + enabled: typeof enabled === "boolean" ? enabled : `Invalid: ${typeof enabled}`, + }) + throw new Error("Missing or invalid parameters for toggleClineRule") + } + + // This is the same core logic as in the original handler + if (isGlobal) { + const toggles = ((await getGlobalState(controller.context, "globalClineRulesToggles")) as AppClineRulesToggles) || {} + toggles[rulePath] = enabled + await updateGlobalState(controller.context, "globalClineRulesToggles", toggles) + } else { + const toggles = ((await getWorkspaceState(controller.context, "localClineRulesToggles")) as AppClineRulesToggles) || {} + toggles[rulePath] = enabled + await updateWorkspaceState(controller.context, "localClineRulesToggles", toggles) + } + + // Get the current state to return in the response + const globalToggles = ((await getGlobalState(controller.context, "globalClineRulesToggles")) as AppClineRulesToggles) || {} + const localToggles = ((await getWorkspaceState(controller.context, "localClineRulesToggles")) as AppClineRulesToggles) || {} + + return { + globalClineRulesToggles: { toggles: globalToggles }, + localClineRulesToggles: { toggles: localToggles }, + } +} diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index b840ff6c..46bbce60 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -409,30 +409,6 @@ export class Controller { } break } - case "toggleClineRule": { - const { isGlobal, rulePath, enabled } = message - if (rulePath && typeof enabled === "boolean" && typeof isGlobal === "boolean") { - if (isGlobal) { - const toggles = - ((await getGlobalState(this.context, "globalClineRulesToggles")) as ClineRulesToggles) || {} - toggles[rulePath] = enabled - await updateGlobalState(this.context, "globalClineRulesToggles", toggles) - } else { - const toggles = - ((await getWorkspaceState(this.context, "localClineRulesToggles")) as ClineRulesToggles) || {} - toggles[rulePath] = enabled - await updateWorkspaceState(this.context, "localClineRulesToggles", toggles) - } - await this.postStateToWebview() - } else { - console.error("toggleClineRule: Missing or invalid parameters", { - rulePath, - isGlobal: typeof isGlobal === "boolean" ? isGlobal : `Invalid: ${typeof isGlobal}`, - enabled: typeof enabled === "boolean" ? enabled : `Invalid: ${typeof enabled}`, - }) - } - break - } case "toggleWindsurfRule": { const { rulePath, enabled } = message if (rulePath && typeof enabled === "boolean") { diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 0b16ff7f..77d387a9 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -45,11 +45,9 @@ export interface WebviewMessage { | "searchFiles" | "grpc_request" | "grpc_request_cancel" - | "toggleClineRule" | "toggleCursorRule" | "toggleWindsurfRule" | "toggleWorkflow" - | "deleteClineRule" | "updateTerminalConnectionTimeout" | "setActiveQuote" diff --git a/src/shared/proto/file.ts b/src/shared/proto/file.ts index e24b38c9..733ed155 100644 --- a/src/shared/proto/file.ts +++ b/src/shared/proto/file.ts @@ -87,6 +87,33 @@ export interface RuleFile { alreadyExists: boolean } +/** Request to toggle a Cline rule */ +export interface ToggleClineRuleRequest { + metadata?: Metadata | undefined + /** Whether this is a global rule or workspace rule */ + isGlobal: boolean + /** Path to the rule file */ + rulePath: string + /** Whether to enable or disable the rule */ + enabled: boolean +} + +/** Maps from filepath to enabled/disabled status, matching app's ClineRulesToggles type */ +export interface ClineRulesToggles { + toggles: { [key: string]: boolean } +} + +export interface ClineRulesToggles_TogglesEntry { + key: string + value: boolean +} + +/** Response for toggleClineRule operation */ +export interface ToggleClineRules { + globalClineRulesToggles?: ClineRulesToggles | undefined + localClineRulesToggles?: ClineRulesToggles | undefined +} + function createBaseRelativePathsRequest(): RelativePathsRequest { return { metadata: undefined, uris: [] } } @@ -900,6 +927,356 @@ export const RuleFile: MessageFns = { }, } +function createBaseToggleClineRuleRequest(): ToggleClineRuleRequest { + return { metadata: undefined, isGlobal: false, rulePath: "", enabled: false } +} + +export const ToggleClineRuleRequest: MessageFns = { + encode(message: ToggleClineRuleRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.metadata !== undefined) { + Metadata.encode(message.metadata, writer.uint32(10).fork()).join() + } + if (message.isGlobal !== false) { + writer.uint32(16).bool(message.isGlobal) + } + if (message.rulePath !== "") { + writer.uint32(26).string(message.rulePath) + } + if (message.enabled !== false) { + writer.uint32(32).bool(message.enabled) + } + return writer + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ToggleClineRuleRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = createBaseToggleClineRuleRequest() + while (reader.pos < end) { + const tag = reader.uint32() + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break + } + + message.metadata = Metadata.decode(reader, reader.uint32()) + continue + } + case 2: { + if (tag !== 16) { + break + } + + message.isGlobal = reader.bool() + continue + } + case 3: { + if (tag !== 26) { + break + } + + message.rulePath = reader.string() + continue + } + case 4: { + if (tag !== 32) { + break + } + + message.enabled = reader.bool() + continue + } + } + if ((tag & 7) === 4 || tag === 0) { + break + } + reader.skip(tag & 7) + } + return message + }, + + fromJSON(object: any): ToggleClineRuleRequest { + return { + metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, + isGlobal: isSet(object.isGlobal) ? globalThis.Boolean(object.isGlobal) : false, + rulePath: isSet(object.rulePath) ? globalThis.String(object.rulePath) : "", + enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false, + } + }, + + toJSON(message: ToggleClineRuleRequest): unknown { + const obj: any = {} + if (message.metadata !== undefined) { + obj.metadata = Metadata.toJSON(message.metadata) + } + if (message.isGlobal !== false) { + obj.isGlobal = message.isGlobal + } + if (message.rulePath !== "") { + obj.rulePath = message.rulePath + } + if (message.enabled !== false) { + obj.enabled = message.enabled + } + return obj + }, + + create, I>>(base?: I): ToggleClineRuleRequest { + return ToggleClineRuleRequest.fromPartial(base ?? ({} as any)) + }, + fromPartial, I>>(object: I): ToggleClineRuleRequest { + const message = createBaseToggleClineRuleRequest() + message.metadata = + object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined + message.isGlobal = object.isGlobal ?? false + message.rulePath = object.rulePath ?? "" + message.enabled = object.enabled ?? false + return message + }, +} + +function createBaseClineRulesToggles(): ClineRulesToggles { + return { toggles: {} } +} + +export const ClineRulesToggles: MessageFns = { + encode(message: ClineRulesToggles, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + Object.entries(message.toggles).forEach(([key, value]) => { + ClineRulesToggles_TogglesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join() + }) + return writer + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ClineRulesToggles { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = createBaseClineRulesToggles() + while (reader.pos < end) { + const tag = reader.uint32() + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break + } + + const entry1 = ClineRulesToggles_TogglesEntry.decode(reader, reader.uint32()) + if (entry1.value !== undefined) { + message.toggles[entry1.key] = entry1.value + } + continue + } + } + if ((tag & 7) === 4 || tag === 0) { + break + } + reader.skip(tag & 7) + } + return message + }, + + fromJSON(object: any): ClineRulesToggles { + return { + toggles: isObject(object.toggles) + ? Object.entries(object.toggles).reduce<{ [key: string]: boolean }>((acc, [key, value]) => { + acc[key] = Boolean(value) + return acc + }, {}) + : {}, + } + }, + + toJSON(message: ClineRulesToggles): unknown { + const obj: any = {} + if (message.toggles) { + const entries = Object.entries(message.toggles) + if (entries.length > 0) { + obj.toggles = {} + entries.forEach(([k, v]) => { + obj.toggles[k] = v + }) + } + } + return obj + }, + + create, I>>(base?: I): ClineRulesToggles { + return ClineRulesToggles.fromPartial(base ?? ({} as any)) + }, + fromPartial, I>>(object: I): ClineRulesToggles { + const message = createBaseClineRulesToggles() + message.toggles = Object.entries(object.toggles ?? {}).reduce<{ [key: string]: boolean }>((acc, [key, value]) => { + if (value !== undefined) { + acc[key] = globalThis.Boolean(value) + } + return acc + }, {}) + return message + }, +} + +function createBaseClineRulesToggles_TogglesEntry(): ClineRulesToggles_TogglesEntry { + return { key: "", value: false } +} + +export const ClineRulesToggles_TogglesEntry: MessageFns = { + encode(message: ClineRulesToggles_TogglesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.key !== "") { + writer.uint32(10).string(message.key) + } + if (message.value !== false) { + writer.uint32(16).bool(message.value) + } + return writer + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ClineRulesToggles_TogglesEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = createBaseClineRulesToggles_TogglesEntry() + while (reader.pos < end) { + const tag = reader.uint32() + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break + } + + message.key = reader.string() + continue + } + case 2: { + if (tag !== 16) { + break + } + + message.value = reader.bool() + continue + } + } + if ((tag & 7) === 4 || tag === 0) { + break + } + reader.skip(tag & 7) + } + return message + }, + + fromJSON(object: any): ClineRulesToggles_TogglesEntry { + return { + key: isSet(object.key) ? globalThis.String(object.key) : "", + value: isSet(object.value) ? globalThis.Boolean(object.value) : false, + } + }, + + toJSON(message: ClineRulesToggles_TogglesEntry): unknown { + const obj: any = {} + if (message.key !== "") { + obj.key = message.key + } + if (message.value !== false) { + obj.value = message.value + } + return obj + }, + + create, I>>(base?: I): ClineRulesToggles_TogglesEntry { + return ClineRulesToggles_TogglesEntry.fromPartial(base ?? ({} as any)) + }, + fromPartial, I>>(object: I): ClineRulesToggles_TogglesEntry { + const message = createBaseClineRulesToggles_TogglesEntry() + message.key = object.key ?? "" + message.value = object.value ?? false + return message + }, +} + +function createBaseToggleClineRules(): ToggleClineRules { + return { globalClineRulesToggles: undefined, localClineRulesToggles: undefined } +} + +export const ToggleClineRules: MessageFns = { + encode(message: ToggleClineRules, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.globalClineRulesToggles !== undefined) { + ClineRulesToggles.encode(message.globalClineRulesToggles, writer.uint32(10).fork()).join() + } + if (message.localClineRulesToggles !== undefined) { + ClineRulesToggles.encode(message.localClineRulesToggles, writer.uint32(18).fork()).join() + } + return writer + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ToggleClineRules { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = createBaseToggleClineRules() + while (reader.pos < end) { + const tag = reader.uint32() + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break + } + + message.globalClineRulesToggles = ClineRulesToggles.decode(reader, reader.uint32()) + continue + } + case 2: { + if (tag !== 18) { + break + } + + message.localClineRulesToggles = ClineRulesToggles.decode(reader, reader.uint32()) + continue + } + } + if ((tag & 7) === 4 || tag === 0) { + break + } + reader.skip(tag & 7) + } + return message + }, + + fromJSON(object: any): ToggleClineRules { + return { + globalClineRulesToggles: isSet(object.globalClineRulesToggles) + ? ClineRulesToggles.fromJSON(object.globalClineRulesToggles) + : undefined, + localClineRulesToggles: isSet(object.localClineRulesToggles) + ? ClineRulesToggles.fromJSON(object.localClineRulesToggles) + : undefined, + } + }, + + toJSON(message: ToggleClineRules): unknown { + const obj: any = {} + if (message.globalClineRulesToggles !== undefined) { + obj.globalClineRulesToggles = ClineRulesToggles.toJSON(message.globalClineRulesToggles) + } + if (message.localClineRulesToggles !== undefined) { + obj.localClineRulesToggles = ClineRulesToggles.toJSON(message.localClineRulesToggles) + } + return obj + }, + + create, I>>(base?: I): ToggleClineRules { + return ToggleClineRules.fromPartial(base ?? ({} as any)) + }, + fromPartial, I>>(object: I): ToggleClineRules { + const message = createBaseToggleClineRules() + message.globalClineRulesToggles = + object.globalClineRulesToggles !== undefined && object.globalClineRulesToggles !== null + ? ClineRulesToggles.fromPartial(object.globalClineRulesToggles) + : undefined + message.localClineRulesToggles = + object.localClineRulesToggles !== undefined && object.localClineRulesToggles !== null + ? ClineRulesToggles.fromPartial(object.localClineRulesToggles) + : undefined + return message + }, +} + /** Service for file-related operations */ export type FileServiceDefinition = typeof FileServiceDefinition export const FileServiceDefinition = { @@ -987,6 +1364,15 @@ export const FileServiceDefinition = { responseStream: false, options: {}, }, + /** Toggle a Cline rule (enable or disable) */ + toggleClineRule: { + name: "toggleClineRule", + requestType: ToggleClineRuleRequest, + requestStream: false, + responseType: ToggleClineRules, + responseStream: false, + options: {}, + }, }, } as const @@ -1007,6 +1393,10 @@ export type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } +function isObject(value: any): boolean { + return typeof value === "object" && value !== null +} + function isSet(value: any): boolean { return value !== null && value !== undefined } diff --git a/src/standalone/server-setup.ts b/src/standalone/server-setup.ts index b499cecd..b9896e35 100644 --- a/src/standalone/server-setup.ts +++ b/src/standalone/server-setup.ts @@ -29,6 +29,7 @@ import { searchCommits } from "../core/controller/file/searchCommits" import { selectImages } from "../core/controller/file/selectImages" import { getRelativePaths } from "../core/controller/file/getRelativePaths" import { searchFiles } from "../core/controller/file/searchFiles" +import { toggleClineRule } from "../core/controller/file/toggleClineRule" // Mcp Service import { toggleMcpServer } from "../core/controller/mcp/toggleMcpServer" @@ -114,6 +115,7 @@ export function addServices( selectImages: wrapper(selectImages, controller), getRelativePaths: wrapper(getRelativePaths, controller), searchFiles: wrapper(searchFiles, controller), + toggleClineRule: wrapper(toggleClineRule, controller), }) // Mcp Service diff --git a/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx b/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx index 9ef7038b..73e433ee 100644 --- a/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx +++ b/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx @@ -3,6 +3,7 @@ import { useClickAway, useWindowSize } from "react-use" import { useExtensionState } from "@/context/ExtensionStateContext" import { CODE_BLOCK_BG_COLOR } from "@/components/common/CodeBlock" import { vscode } from "@/utils/vscode" +import { FileServiceClient } from "@/services/grpc-client" import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" import RulesToggleList from "./RulesToggleList" import Tooltip from "@/components/common/Tooltip" @@ -15,6 +16,8 @@ const ClineRulesToggleModal: React.FC = () => { localCursorRulesToggles = {}, localWindsurfRulesToggles = {}, workflowToggles = {}, + setGlobalClineRulesToggles, + setLocalClineRulesToggles, } = useExtensionState() const [isVisible, setIsVisible] = useState(false) const buttonRef = useRef(null) @@ -52,14 +55,25 @@ const ClineRulesToggleModal: React.FC = () => { .map(([path, enabled]): [string, boolean] => [path, enabled as boolean]) .sort(([a], [b]) => a.localeCompare(b)) - // Handle toggle rule + // Handle toggle rule using gRPC const toggleRule = (isGlobal: boolean, rulePath: string, enabled: boolean) => { - vscode.postMessage({ - type: "toggleClineRule", + FileServiceClient.toggleClineRule({ isGlobal, rulePath, enabled, }) + .then((response) => { + // Update the local state with the response + if (response.globalClineRulesToggles?.toggles) { + setGlobalClineRulesToggles(response.globalClineRulesToggles.toggles) + } + if (response.localClineRulesToggles?.toggles) { + setLocalClineRulesToggles(response.localClineRulesToggles.toggles) + } + }) + .catch((error) => { + console.error("Error toggling Cline rule:", error) + }) } const toggleCursorRule = (rulePath: string, enabled: boolean) => { diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index 27ea1c62..c96e7a8d 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -51,6 +51,8 @@ interface ExtensionStateContextType extends ExtensionState { setShellIntegrationTimeout: (value: number) => void setChatSettings: (value: ChatSettings) => void setMcpServers: (value: McpServer[]) => void + setGlobalClineRulesToggles: (toggles: Record) => void + setLocalClineRulesToggles: (toggles: Record) => void // Navigation state setters setShowMcp: (value: boolean) => void @@ -514,6 +516,16 @@ export const ExtensionStateContextProvider: React.FC<{ mcpMarketplaceEnabled: state.mcpMarketplaceEnabled, }) }, + setGlobalClineRulesToggles: (toggles) => + setState((prevState) => ({ + ...prevState, + globalClineRulesToggles: toggles, + })), + setLocalClineRulesToggles: (toggles) => + setState((prevState) => ({ + ...prevState, + localClineRulesToggles: toggles, + })), setMcpTab, } From 086879d149d72618a1fe500e2306228de96e6886 Mon Sep 17 00:00:00 2001 From: canvrno <46584286+canvrno@users.noreply.github.com> Date: Tue, 20 May 2025 13:10:47 -0700 Subject: [PATCH 11/85] [PROTOBUS] Move scrollToSetting to protobus (#3648) * scrollToSetting protobus migration * one small change --- .changeset/old-crews-reply.md | 5 ++++ proto/build-proto.js | 1 + proto/ui.proto | 14 +++++++++ src/core/controller/grpc-service-config.ts | 5 ++++ src/core/controller/index.ts | 7 ----- src/core/controller/ui/index.ts | 22 ++++++++++++++ src/core/controller/ui/methods.ts | 12 ++++++++ src/core/controller/ui/scrollToSettings.ts | 15 ++++++++++ src/shared/ExtensionMessage.ts | 1 - src/shared/WebviewMessage.ts | 1 - src/shared/proto/ui.ts | 28 +++++++++++++++++ src/standalone/server-setup.ts | 8 +++++ .../browser/BrowserSettingsMenu.tsx | 13 ++++---- .../src/components/settings/SettingsView.tsx | 30 ++++++++++--------- webview-ui/src/services/grpc-client.ts | 3 ++ 15 files changed, 136 insertions(+), 29 deletions(-) create mode 100644 .changeset/old-crews-reply.md create mode 100644 proto/ui.proto create mode 100644 src/core/controller/ui/index.ts create mode 100644 src/core/controller/ui/methods.ts create mode 100644 src/core/controller/ui/scrollToSettings.ts create mode 100644 src/shared/proto/ui.ts diff --git a/.changeset/old-crews-reply.md b/.changeset/old-crews-reply.md new file mode 100644 index 00000000..72bc5fdb --- /dev/null +++ b/.changeset/old-crews-reply.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +scrollToSetting protobus migration diff --git a/proto/build-proto.js b/proto/build-proto.js index d3a5e8e9..fc7de676 100755 --- a/proto/build-proto.js +++ b/proto/build-proto.js @@ -30,6 +30,7 @@ const serviceNameMap = { web: "cline.WebService", models: "cline.ModelsService", slash: "cline.SlashService", + ui: "cline.UiService", // Add new services here - no other code changes needed! } const serviceDirs = Object.keys(serviceNameMap).map((serviceKey) => path.join(ROOT_DIR, "src", "core", "controller", serviceKey)) diff --git a/proto/ui.proto b/proto/ui.proto new file mode 100644 index 00000000..48bd8aef --- /dev/null +++ b/proto/ui.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +package cline; +option java_package = "bot.cline.proto"; +option java_multiple_files = true; + +import "common.proto"; + +// UiService provides methods for managing UI interactions +service UiService { + // Scrolls to a specific settings section in the settings view + rpc scrollToSettings(StringRequest) returns (Empty); +} + diff --git a/src/core/controller/grpc-service-config.ts b/src/core/controller/grpc-service-config.ts index 82af03f1..136f2c9c 100644 --- a/src/core/controller/grpc-service-config.ts +++ b/src/core/controller/grpc-service-config.ts @@ -13,6 +13,7 @@ import { handleTaskServiceRequest, handleTaskServiceStreamingRequest } from "./t import { handleWebServiceRequest, handleWebServiceStreamingRequest } from "./web/index" import { handleModelsServiceRequest, handleModelsServiceStreamingRequest } from "./models/index" import { handleSlashServiceRequest, handleSlashServiceStreamingRequest } from "./slash/index" +import { handleUiServiceRequest, handleUiServiceStreamingRequest } from "./ui/index" /** * Configuration for a service handler @@ -72,4 +73,8 @@ export const serviceHandlers: Record = { requestHandler: handleSlashServiceRequest, streamingHandler: handleSlashServiceStreamingRequest, }, + "cline.UiService": { + requestHandler: handleUiServiceRequest, + streamingHandler: handleUiServiceStreamingRequest, + }, } diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 46bbce60..69c8970b 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -479,13 +479,6 @@ export class Controller { }) break } - case "scrollToSettings": { - await this.postMessageToWebview({ - type: "scrollToSettings", - text: message.text, - }) - break - } case "telemetrySetting": { if (message.telemetrySetting) { await this.updateTelemetrySetting(message.telemetrySetting) diff --git a/src/core/controller/ui/index.ts b/src/core/controller/ui/index.ts new file mode 100644 index 00000000..d97ded27 --- /dev/null +++ b/src/core/controller/ui/index.ts @@ -0,0 +1,22 @@ +// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY +// Generated by proto/build-proto.js + +import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" +import { StreamingResponseHandler } from "../grpc-handler" +import { registerAllMethods } from "./methods" + +// Create ui service registry +const uiService = createServiceRegistry("ui") + +// Export the method handler types and registration function +export type UiMethodHandler = ServiceMethodHandler +export type UiStreamingMethodHandler = StreamingMethodHandler +export const registerMethod = uiService.registerMethod + +// Export the request handlers +export const handleUiServiceRequest = uiService.handleRequest +export const handleUiServiceStreamingRequest = uiService.handleStreamingRequest +export const isStreamingMethod = uiService.isStreamingMethod + +// Register all ui methods +registerAllMethods() diff --git a/src/core/controller/ui/methods.ts b/src/core/controller/ui/methods.ts new file mode 100644 index 00000000..71d14ea5 --- /dev/null +++ b/src/core/controller/ui/methods.ts @@ -0,0 +1,12 @@ +// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY +// Generated by proto/build-proto.js + +// Import all method implementations +import { registerMethod } from "./index" +import { scrollToSettings } from "./scrollToSettings" + +// Register all ui service methods +export function registerAllMethods(): void { + // Register each method with the registry + registerMethod("scrollToSettings", scrollToSettings) +} diff --git a/src/core/controller/ui/scrollToSettings.ts b/src/core/controller/ui/scrollToSettings.ts new file mode 100644 index 00000000..0b3569be --- /dev/null +++ b/src/core/controller/ui/scrollToSettings.ts @@ -0,0 +1,15 @@ +import { Controller } from ".." +import { StringRequest } from "../../../shared/proto/common" + +/** + * Executes a scroll to settings action + * @param controller The controller instance + * @param request The request containing the ID of the settings section to scroll to + * @returns An object with action and value fields for the UI to process + */ +export async function scrollToSettings(controller: Controller, request: StringRequest): Promise> { + return { + action: "scrollToSettings", + value: request.value || "", + } +} diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index 268e8f69..e60fdc26 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -40,7 +40,6 @@ export interface ExtensionMessage { | "totalTasksSize" | "addToInput" | "browserConnectionResult" - | "scrollToSettings" | "browserRelaunchResult" | "fileSearchResults" | "grpc_response" // New type for gRPC responses diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 77d387a9..06785caa 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -41,7 +41,6 @@ export interface WebviewMessage { | "optionsResponse" | "requestTotalTasksSize" | "relaunchChromeDebugMode" - | "scrollToSettings" | "searchFiles" | "grpc_request" | "grpc_request_cancel" diff --git a/src/shared/proto/ui.ts b/src/shared/proto/ui.ts new file mode 100644 index 00000000..caeef0ed --- /dev/null +++ b/src/shared/proto/ui.ts @@ -0,0 +1,28 @@ +// Code generated by protoc-gen-ts_proto. DO NOT EDIT. +// versions: +// protoc-gen-ts_proto v2.7.0 +// protoc v3.19.1 +// source: ui.proto + +/* eslint-disable */ +import { Empty, StringRequest } from "./common" + +export const protobufPackage = "cline" + +/** UiService provides methods for managing UI interactions */ +export type UiServiceDefinition = typeof UiServiceDefinition +export const UiServiceDefinition = { + name: "UiService", + fullName: "cline.UiService", + methods: { + /** Scrolls to a specific settings section in the settings view */ + scrollToSettings: { + name: "scrollToSettings", + requestType: StringRequest, + requestStream: false, + responseType: Empty, + responseStream: false, + options: {}, + }, + }, +} as const diff --git a/src/standalone/server-setup.ts b/src/standalone/server-setup.ts index b9896e35..01222ce5 100644 --- a/src/standalone/server-setup.ts +++ b/src/standalone/server-setup.ts @@ -72,6 +72,9 @@ import { askResponse } from "../core/controller/task/askResponse" import { taskFeedback } from "../core/controller/task/taskFeedback" import { taskCompletionViewChanges } from "../core/controller/task/taskCompletionViewChanges" +// Ui Service +import { scrollToSettings } from "../core/controller/ui/scrollToSettings" + // Web Service import { checkIsImageUrl } from "../core/controller/web/checkIsImageUrl" import { fetchOpenGraphData } from "../core/controller/web/fetchOpenGraphData" @@ -169,6 +172,11 @@ export function addServices( taskCompletionViewChanges: wrapper(taskCompletionViewChanges, controller), }) + // Ui Service + server.addService(proto.cline.UiService.service, { + scrollToSettings: wrapper(scrollToSettings, controller), + }) + // Web Service server.addService(proto.cline.WebService.service, { checkIsImageUrl: wrapper(checkIsImageUrl, controller), diff --git a/webview-ui/src/components/browser/BrowserSettingsMenu.tsx b/webview-ui/src/components/browser/BrowserSettingsMenu.tsx index 74a7091b..aba6e9c9 100644 --- a/webview-ui/src/components/browser/BrowserSettingsMenu.tsx +++ b/webview-ui/src/components/browser/BrowserSettingsMenu.tsx @@ -4,7 +4,7 @@ import styled from "styled-components" import { useExtensionState } from "@/context/ExtensionStateContext" import { vscode } from "@/utils/vscode" import { CODE_BLOCK_BG_COLOR } from "../common/CodeBlock" -import { BrowserServiceClient } from "../../services/grpc-client" +import { BrowserServiceClient, UiServiceClient } from "../../services/grpc-client" interface ConnectionInfo { isConnected: boolean @@ -71,11 +71,12 @@ export const BrowserSettingsMenu = () => { }) // After a short delay, send a message to scroll to browser settings - setTimeout(() => { - vscode.postMessage({ - type: "scrollToSettings", - text: "browser-settings-section", - }) + setTimeout(async () => { + try { + await UiServiceClient.scrollToSettings({ value: "browser-settings-section" }) + } catch (error) { + console.error("Error scrolling to browser settings:", error) + } }, 300) // Give the settings panel time to open } diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index 81764225..7d970208 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -123,23 +123,25 @@ const SettingsView = ({ onDone }: SettingsViewProps) => { setPendingTabChange(null) } break - case "scrollToSettings": - setTimeout(() => { - const elementId = message.text - if (elementId) { - const element = document.getElementById(elementId) - if (element) { - element.scrollIntoView({ behavior: "smooth" }) + case "grpc_response": + if (message.grpc_response?.message?.action === "scrollToSettings") { + setTimeout(() => { + const elementId = message.grpc_response?.message?.value + if (elementId) { + const element = document.getElementById(elementId) + if (element) { + element.scrollIntoView({ behavior: "smooth" }) - element.style.transition = "background-color 0.5s ease" - element.style.backgroundColor = "var(--vscode-textPreformat-background)" + element.style.transition = "background-color 0.5s ease" + element.style.backgroundColor = "var(--vscode-textPreformat-background)" - setTimeout(() => { - element.style.backgroundColor = "transparent" - }, 1200) + setTimeout(() => { + element.style.backgroundColor = "transparent" + }, 1200) + } } - } - }, 300) + }, 300) + } break } }, diff --git a/webview-ui/src/services/grpc-client.ts b/webview-ui/src/services/grpc-client.ts index d5e83aa5..6a73f76a 100644 --- a/webview-ui/src/services/grpc-client.ts +++ b/webview-ui/src/services/grpc-client.ts @@ -12,6 +12,7 @@ import { TaskServiceDefinition } from "@shared/proto/task" import { WebServiceDefinition } from "@shared/proto/web" import { ModelsServiceDefinition } from "@shared/proto/models" import { SlashServiceDefinition } from "@shared/proto/slash" +import { UiServiceDefinition } from "@shared/proto/ui" const AccountServiceClient = createGrpcClient(AccountServiceDefinition) const BrowserServiceClient = createGrpcClient(BrowserServiceDefinition) @@ -23,6 +24,7 @@ const TaskServiceClient = createGrpcClient(TaskServiceDefinition) const WebServiceClient = createGrpcClient(WebServiceDefinition) const ModelsServiceClient = createGrpcClient(ModelsServiceDefinition) const SlashServiceClient = createGrpcClient(SlashServiceDefinition) +const UiServiceClient = createGrpcClient(UiServiceDefinition) export { AccountServiceClient, @@ -35,4 +37,5 @@ export { WebServiceClient, ModelsServiceClient, SlashServiceClient, + UiServiceClient, } From 14a056ed3e5eae006253e659fad79108f675da96 Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Tue, 20 May 2025 14:45:48 -0700 Subject: [PATCH 12/85] Migrate toggleCursorRule protobus (#3676) * migrate toggleCursorRule * changeset --------- Co-authored-by: Elephant Lumps --- .changeset/sour-ravens-sin.md | 5 + proto/file.proto | 10 ++ src/core/controller/file/methods.ts | 2 + src/core/controller/file/toggleCursorRule.ts | 34 ++++++ src/core/controller/index.ts | 13 -- src/shared/WebviewMessage.ts | 1 - src/shared/proto/file.ts | 111 ++++++++++++++++++ src/standalone/server-setup.ts | 2 + .../cline-rules/ClineRulesToggleModal.tsx | 13 +- .../src/context/ExtensionStateContext.tsx | 6 + 10 files changed, 181 insertions(+), 16 deletions(-) create mode 100644 .changeset/sour-ravens-sin.md create mode 100644 src/core/controller/file/toggleCursorRule.ts diff --git a/.changeset/sour-ravens-sin.md b/.changeset/sour-ravens-sin.md new file mode 100644 index 00000000..da9f7c43 --- /dev/null +++ b/.changeset/sour-ravens-sin.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Migrate toggleCursorRule to protobus diff --git a/proto/file.proto b/proto/file.proto index 16b83585..946b6b17 100644 --- a/proto/file.proto +++ b/proto/file.proto @@ -37,6 +37,9 @@ service FileService { // Toggle a Cline rule (enable or disable) rpc toggleClineRule(ToggleClineRuleRequest) returns (ToggleClineRules); + + // Toggle a Cursor rule (enable or disable) + rpc toggleCursorRule(ToggleCursorRuleRequest) returns (ClineRulesToggles); } // Request to convert a list of URIs to relative paths @@ -119,3 +122,10 @@ message ToggleClineRules { ClineRulesToggles global_cline_rules_toggles = 1; ClineRulesToggles local_cline_rules_toggles = 2; } + +// Request to toggle a Cursor rule +message ToggleCursorRuleRequest { + Metadata metadata = 1; + string rule_path = 2; // Path to the rule file + bool enabled = 3; // Whether to enable or disable the rule +} diff --git a/src/core/controller/file/methods.ts b/src/core/controller/file/methods.ts index 8c1f60c4..080a3358 100644 --- a/src/core/controller/file/methods.ts +++ b/src/core/controller/file/methods.ts @@ -13,6 +13,7 @@ import { searchCommits } from "./searchCommits" import { searchFiles } from "./searchFiles" import { selectImages } from "./selectImages" import { toggleClineRule } from "./toggleClineRule" +import { toggleCursorRule } from "./toggleCursorRule" // Register all file service methods export function registerAllMethods(): void { @@ -27,4 +28,5 @@ export function registerAllMethods(): void { registerMethod("searchFiles", searchFiles) registerMethod("selectImages", selectImages) registerMethod("toggleClineRule", toggleClineRule) + registerMethod("toggleCursorRule", toggleCursorRule) } diff --git a/src/core/controller/file/toggleCursorRule.ts b/src/core/controller/file/toggleCursorRule.ts new file mode 100644 index 00000000..59fc0ae1 --- /dev/null +++ b/src/core/controller/file/toggleCursorRule.ts @@ -0,0 +1,34 @@ +import type { ToggleCursorRuleRequest, ClineRulesToggles } from "../../../shared/proto/file" +import type { Controller } from "../index" +import { getWorkspaceState, updateWorkspaceState } from "../../../core/storage/state" +import { ClineRulesToggles as AppClineRulesToggles } from "@shared/cline-rules" + +/** + * Toggles a Cursor rule (enable or disable) + * @param controller The controller instance + * @param request The toggle request + * @returns The updated Cursor rule toggles + */ +export async function toggleCursorRule(controller: Controller, request: ToggleCursorRuleRequest): Promise { + const { rulePath, enabled } = request + + if (!rulePath || typeof enabled !== "boolean") { + console.error("toggleCursorRule: Missing or invalid parameters", { + rulePath, + enabled: typeof enabled === "boolean" ? enabled : `Invalid: ${typeof enabled}`, + }) + throw new Error("Missing or invalid parameters for toggleCursorRule") + } + + // Update the toggles in workspace state + const toggles = ((await getWorkspaceState(controller.context, "localCursorRulesToggles")) as AppClineRulesToggles) || {} + toggles[rulePath] = enabled + await updateWorkspaceState(controller.context, "localCursorRulesToggles", toggles) + + // Get the current state to return in the response + const cursorToggles = ((await getWorkspaceState(controller.context, "localCursorRulesToggles")) as AppClineRulesToggles) || {} + + return { + toggles: cursorToggles, + } +} diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 69c8970b..e09e4288 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -422,19 +422,6 @@ export class Controller { } break } - case "toggleCursorRule": { - const { rulePath, enabled } = message - if (rulePath && typeof enabled === "boolean") { - const toggles = - ((await getWorkspaceState(this.context, "localCursorRulesToggles")) as ClineRulesToggles) || {} - toggles[rulePath] = enabled - await updateWorkspaceState(this.context, "localCursorRulesToggles", toggles) - await this.postStateToWebview() - } else { - console.error("toggleCursorRule: Missing or invalid parameters") - } - break - } case "toggleWorkflow": { const { workflowPath, enabled } = message if (workflowPath && typeof enabled === "boolean") { diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 06785caa..487d52f9 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -44,7 +44,6 @@ export interface WebviewMessage { | "searchFiles" | "grpc_request" | "grpc_request_cancel" - | "toggleCursorRule" | "toggleWindsurfRule" | "toggleWorkflow" | "updateTerminalConnectionTimeout" diff --git a/src/shared/proto/file.ts b/src/shared/proto/file.ts index 733ed155..0324eb99 100644 --- a/src/shared/proto/file.ts +++ b/src/shared/proto/file.ts @@ -114,6 +114,15 @@ export interface ToggleClineRules { localClineRulesToggles?: ClineRulesToggles | undefined } +/** Request to toggle a Cursor rule */ +export interface ToggleCursorRuleRequest { + metadata?: Metadata | undefined + /** Path to the rule file */ + rulePath: string + /** Whether to enable or disable the rule */ + enabled: boolean +} + function createBaseRelativePathsRequest(): RelativePathsRequest { return { metadata: undefined, uris: [] } } @@ -1277,6 +1286,99 @@ export const ToggleClineRules: MessageFns = { }, } +function createBaseToggleCursorRuleRequest(): ToggleCursorRuleRequest { + return { metadata: undefined, rulePath: "", enabled: false } +} + +export const ToggleCursorRuleRequest: MessageFns = { + encode(message: ToggleCursorRuleRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.metadata !== undefined) { + Metadata.encode(message.metadata, writer.uint32(10).fork()).join() + } + if (message.rulePath !== "") { + writer.uint32(18).string(message.rulePath) + } + if (message.enabled !== false) { + writer.uint32(24).bool(message.enabled) + } + return writer + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ToggleCursorRuleRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = createBaseToggleCursorRuleRequest() + while (reader.pos < end) { + const tag = reader.uint32() + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break + } + + message.metadata = Metadata.decode(reader, reader.uint32()) + continue + } + case 2: { + if (tag !== 18) { + break + } + + message.rulePath = reader.string() + continue + } + case 3: { + if (tag !== 24) { + break + } + + message.enabled = reader.bool() + continue + } + } + if ((tag & 7) === 4 || tag === 0) { + break + } + reader.skip(tag & 7) + } + return message + }, + + fromJSON(object: any): ToggleCursorRuleRequest { + return { + metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, + rulePath: isSet(object.rulePath) ? globalThis.String(object.rulePath) : "", + enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false, + } + }, + + toJSON(message: ToggleCursorRuleRequest): unknown { + const obj: any = {} + if (message.metadata !== undefined) { + obj.metadata = Metadata.toJSON(message.metadata) + } + if (message.rulePath !== "") { + obj.rulePath = message.rulePath + } + if (message.enabled !== false) { + obj.enabled = message.enabled + } + return obj + }, + + create, I>>(base?: I): ToggleCursorRuleRequest { + return ToggleCursorRuleRequest.fromPartial(base ?? ({} as any)) + }, + fromPartial, I>>(object: I): ToggleCursorRuleRequest { + const message = createBaseToggleCursorRuleRequest() + message.metadata = + object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined + message.rulePath = object.rulePath ?? "" + message.enabled = object.enabled ?? false + return message + }, +} + /** Service for file-related operations */ export type FileServiceDefinition = typeof FileServiceDefinition export const FileServiceDefinition = { @@ -1373,6 +1475,15 @@ export const FileServiceDefinition = { responseStream: false, options: {}, }, + /** Toggle a Cursor rule (enable or disable) */ + toggleCursorRule: { + name: "toggleCursorRule", + requestType: ToggleCursorRuleRequest, + requestStream: false, + responseType: ClineRulesToggles, + responseStream: false, + options: {}, + }, }, } as const diff --git a/src/standalone/server-setup.ts b/src/standalone/server-setup.ts index 01222ce5..261603ef 100644 --- a/src/standalone/server-setup.ts +++ b/src/standalone/server-setup.ts @@ -30,6 +30,7 @@ import { selectImages } from "../core/controller/file/selectImages" import { getRelativePaths } from "../core/controller/file/getRelativePaths" import { searchFiles } from "../core/controller/file/searchFiles" import { toggleClineRule } from "../core/controller/file/toggleClineRule" +import { toggleCursorRule } from "../core/controller/file/toggleCursorRule" // Mcp Service import { toggleMcpServer } from "../core/controller/mcp/toggleMcpServer" @@ -119,6 +120,7 @@ export function addServices( getRelativePaths: wrapper(getRelativePaths, controller), searchFiles: wrapper(searchFiles, controller), toggleClineRule: wrapper(toggleClineRule, controller), + toggleCursorRule: wrapper(toggleCursorRule, controller), }) // Mcp Service diff --git a/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx b/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx index 73e433ee..824c23b1 100644 --- a/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx +++ b/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx @@ -18,6 +18,7 @@ const ClineRulesToggleModal: React.FC = () => { workflowToggles = {}, setGlobalClineRulesToggles, setLocalClineRulesToggles, + setLocalCursorRulesToggles, } = useExtensionState() const [isVisible, setIsVisible] = useState(false) const buttonRef = useRef(null) @@ -77,11 +78,19 @@ const ClineRulesToggleModal: React.FC = () => { } const toggleCursorRule = (rulePath: string, enabled: boolean) => { - vscode.postMessage({ - type: "toggleCursorRule", + FileServiceClient.toggleCursorRule({ rulePath, enabled, }) + .then((response) => { + // Update the local state with the response + if (response.toggles) { + setLocalCursorRulesToggles(response.toggles) + } + }) + .catch((error) => { + console.error("Error toggling Cursor rule:", error) + }) } const toggleWindsurfRule = (rulePath: string, enabled: boolean) => { diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index c96e7a8d..4f3d1cbd 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -53,6 +53,7 @@ interface ExtensionStateContextType extends ExtensionState { setMcpServers: (value: McpServer[]) => void setGlobalClineRulesToggles: (toggles: Record) => void setLocalClineRulesToggles: (toggles: Record) => void + setLocalCursorRulesToggles: (toggles: Record) => void // Navigation state setters setShowMcp: (value: boolean) => void @@ -526,6 +527,11 @@ export const ExtensionStateContextProvider: React.FC<{ ...prevState, localClineRulesToggles: toggles, })), + setLocalCursorRulesToggles: (toggles) => + setState((prevState) => ({ + ...prevState, + localCursorRulesToggles: toggles, + })), setMcpTab, } From 6b243ee826f72708a3837ff5d5a9d26f3cf33df2 Mon Sep 17 00:00:00 2001 From: Ara Date: Wed, 21 May 2025 02:23:14 +0400 Subject: [PATCH 13/85] Remind VS code users of clines existence(Open Cline on AutoUpdate+KeyboardShortcuts+Lightbulb icons) (#3640) * Focus cline when on update * Focus cline when on update * Focus cline when on update * Focus cline when on update * Focus cline when on update * Focus cline when on update * Focus cline when on update * Focus cline when on update * Focus cline when on update * Focus cline when on update * Focus cline when on update * Focus cline when on update --------- Co-authored-by: Cline Evaluation --- .changeset/tame-windows-compete.md | 5 + package.json | 18 +++ src/core/webview/index.ts | 22 +++ src/extension.ts | 225 +++++++++++++++++++++++++---- 4 files changed, 239 insertions(+), 31 deletions(-) create mode 100644 .changeset/tame-windows-compete.md diff --git a/.changeset/tame-windows-compete.md b/.changeset/tame-windows-compete.md new file mode 100644 index 00000000..d8f7138a --- /dev/null +++ b/.changeset/tame-windows-compete.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Remind VS code users of clines existence(Open Cline on AutoUpdate+KeyboardShortcuts+Lightbulb icons) diff --git a/package.json b/package.json index 370aa500..cdad8405 100644 --- a/package.json +++ b/package.json @@ -126,6 +126,16 @@ "title": "Generate Commit Message with Cline", "category": "Cline", "icon": "$(robot)" + }, + { + "command": "cline.explainCode", + "title": "Explain with Cline", + "category": "Cline" + }, + { + "command": "cline.improveCode", + "title": "Improve with Cline", + "category": "Cline" } ], "keybindings": [ @@ -140,6 +150,14 @@ { "command": "cline.generateGitCommitMessage", "when": "scmProvider == git" + }, + { + "command": "cline.focusChatInput", + "key": "cmd+'", + "mac": "cmd+'", + "win": "ctrl+'", + "linux": "ctrl+'", + "when": "!editorHasSelection" } ], "menus": { diff --git a/src/core/webview/index.ts b/src/core/webview/index.ts index 4d02e736..fc26a7ac 100644 --- a/src/core/webview/index.ts +++ b/src/core/webview/index.ts @@ -149,6 +149,28 @@ export class WebviewProvider implements vscode.WebviewViewProvider { this.controller.clearTask() this.outputChannel.appendLine("Webview view resolved") + + // Set the title to include the keyboard shortcut + if (this.view && "title" in this.view) { + // Check if the view object has a title property + const isMac = process.platform === "darwin" + const shortcutDisplay = isMac ? " (⌘+')" : " (Ctrl+')" + const baseTitle = this.context.extension.packageJSON.displayName || "Cline" + const newTitleWithShortcut = `${baseTitle}${shortcutDisplay}` + + const currentTitle = this.view.title + + if (typeof currentTitle === "string") { + if (!currentTitle.includes(shortcutDisplay)) { + // Title exists and is a string, but doesn't have the shortcut + this.view.title = newTitleWithShortcut + } + // If it includes shortcutDisplay, do nothing + } else { + // Title is undefined or not a string (e.g., for sidebar initially) + this.view.title = newTitleWithShortcut + } + } } } diff --git a/src/extension.ts b/src/extension.ts index 5d0b47c7..9a2903da 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -28,7 +28,7 @@ let outputChannel: vscode.OutputChannel // This method is called when your extension is activated // Your extension is activated the very first time the command is executed -export function activate(context: vscode.ExtensionContext) { +export async function activate(context: vscode.ExtensionContext) { outputChannel = vscode.window.createOutputChannel("Cline") context.subscriptions.push(outputChannel) @@ -36,6 +36,9 @@ export function activate(context: vscode.ExtensionContext) { Logger.initialize(outputChannel) Logger.log("Cline extension activated") + // Version checking for autoupdate notification + const currentVersion = context.extension.packageJSON.version + const previousVersion = context.globalState.get("clineVersion") const sidebarWebview = new WebviewProvider(context, outputChannel) // Initialize test mode and add disposables to context @@ -49,6 +52,29 @@ export function activate(context: vscode.ExtensionContext) { }), ) + // Perform post-update actions if necessary + try { + if (!previousVersion || currentVersion !== previousVersion) { + Logger.log(`Cline version changed: ${previousVersion} -> ${currentVersion}. First run or update detected.`) + const lastShownPopupNotificationVersion = context.globalState.get("clineLastPopupNotificationVersion") + + if (currentVersion !== lastShownPopupNotificationVersion && previousVersion) { + // Show VS Code popup notification as this version hasn't been notified yet without doing it for fresh installs + const message = `Cline has been updated to v${currentVersion}` + await vscode.commands.executeCommand("claude-dev.SidebarProvider.focus") + await new Promise((resolve) => setTimeout(resolve, 200)) + vscode.window.showInformationMessage(message) + // Record that we've shown the popup for this version. + await context.globalState.update("clineLastPopupNotificationVersion", currentVersion) + } + // Always update the main version tracker for the next launch. + await context.globalState.update("clineVersion", currentVersion) + } + } catch (error) { + const errorMessage = error instanceof Error ? error.message : String(error) + console.error(`Error during post-update actions: ${errorMessage}, Stack trace: ${error.stack}`) + } + context.subscriptions.push( vscode.commands.registerCommand("cline.plusButtonClicked", async (webview: any) => { const openChat = async (instance?: WebviewProvider) => { @@ -257,6 +283,8 @@ export function activate(context: vscode.ExtensionContext) { context.subscriptions.push( vscode.commands.registerCommand("cline.addToChat", async (range?: vscode.Range, diagnostics?: vscode.Diagnostic[]) => { + await vscode.commands.executeCommand("cline.focusChatInput") // Ensure Cline is visible and input focused + await pWaitFor(() => !!WebviewProvider.getVisibleInstance()) const editor = vscode.window.activeTextEditor if (!editor) { return @@ -336,50 +364,100 @@ export function activate(context: vscode.ExtensionContext) { }), ) + const CONTEXT_LINES_TO_EXPAND = 3 + const START_OF_LINE_CHAR_INDEX = 0 + const LINE_COUNT_ADJUSTMENT_FOR_ZERO_INDEXING = 1 + // Register code action provider context.subscriptions.push( vscode.languages.registerCodeActionsProvider( "*", new (class implements vscode.CodeActionProvider { - public static readonly providedCodeActionKinds = [vscode.CodeActionKind.QuickFix] + public static readonly providedCodeActionKinds = [vscode.CodeActionKind.QuickFix, vscode.CodeActionKind.Refactor] provideCodeActions( document: vscode.TextDocument, range: vscode.Range, context: vscode.CodeActionContext, ): vscode.CodeAction[] { - // Expand range to include surrounding 3 lines - const expandedRange = new vscode.Range( - Math.max(0, range.start.line - 3), - 0, - Math.min(document.lineCount - 1, range.end.line + 3), - document.lineAt(Math.min(document.lineCount - 1, range.end.line + 3)).text.length, - ) + const actions: vscode.CodeAction[] = [] + const editor = vscode.window.activeTextEditor // Get active editor for selection check + // Expand range to include surrounding 3 lines or use selection if broader + const selection = editor?.selection + let expandedRange = range + if ( + editor && + selection && + !selection.isEmpty && + selection.contains(range.start) && + selection.contains(range.end) + ) { + expandedRange = selection + } else { + expandedRange = new vscode.Range( + Math.max(0, range.start.line - CONTEXT_LINES_TO_EXPAND), + START_OF_LINE_CHAR_INDEX, + Math.min( + document.lineCount - LINE_COUNT_ADJUSTMENT_FOR_ZERO_INDEXING, + range.end.line + CONTEXT_LINES_TO_EXPAND, + ), + document.lineAt( + Math.min( + document.lineCount - LINE_COUNT_ADJUSTMENT_FOR_ZERO_INDEXING, + range.end.line + CONTEXT_LINES_TO_EXPAND, + ), + ).text.length, + ) + } + + // Add to Cline (Always available) const addAction = new vscode.CodeAction("Add to Cline", vscode.CodeActionKind.QuickFix) addAction.command = { command: "cline.addToChat", title: "Add to Cline", arguments: [expandedRange, context.diagnostics], } + actions.push(addAction) - const fixAction = new vscode.CodeAction("Fix with Cline", vscode.CodeActionKind.QuickFix) - fixAction.command = { - command: "cline.fixWithCline", - title: "Fix with Cline", - arguments: [expandedRange, context.diagnostics], + // Explain with Cline (Always available) + const explainAction = new vscode.CodeAction("Explain with Cline", vscode.CodeActionKind.RefactorExtract) // Using a refactor kind + explainAction.command = { + command: "cline.explainCode", + title: "Explain with Cline", + arguments: [expandedRange], } + actions.push(explainAction) - // Only show actions when there are errors + // Improve with Cline (Always available) + const improveAction = new vscode.CodeAction("Improve with Cline", vscode.CodeActionKind.RefactorRewrite) // Using a refactor kind + improveAction.command = { + command: "cline.improveCode", + title: "Improve with Cline", + arguments: [expandedRange], + } + actions.push(improveAction) + + // Fix with Cline (Only if diagnostics exist) if (context.diagnostics.length > 0) { - return [addAction, fixAction] - } else { - return [] + const fixAction = new vscode.CodeAction("Fix with Cline", vscode.CodeActionKind.QuickFix) + fixAction.isPreferred = true + fixAction.command = { + command: "cline.fixWithCline", + title: "Fix with Cline", + arguments: [expandedRange, context.diagnostics], + } + actions.push(fixAction) } + return actions } })(), { - providedCodeActionKinds: [vscode.CodeActionKind.QuickFix], + providedCodeActionKinds: [ + vscode.CodeActionKind.QuickFix, + vscode.CodeActionKind.RefactorExtract, + vscode.CodeActionKind.RefactorRewrite, + ], }, ), ) @@ -406,21 +484,106 @@ export function activate(context: vscode.ExtensionContext) { }), ) + context.subscriptions.push( + vscode.commands.registerCommand("cline.explainCode", async (range: vscode.Range) => { + await vscode.commands.executeCommand("cline.focusChatInput") // Ensure Cline is visible and input focused + await pWaitFor(() => !!WebviewProvider.getVisibleInstance()) + const editor = vscode.window.activeTextEditor + if (!editor) { + return + } + const selectedText = editor.document.getText(range) + if (!selectedText.trim()) { + vscode.window.showInformationMessage("Please select some code to explain.") + return + } + const filePath = editor.document.uri.fsPath + const visibleWebview = WebviewProvider.getVisibleInstance() + const fileMention = visibleWebview?.controller.getFileMentionFromPath(filePath) || filePath + const prompt = `Explain the following code from ${fileMention}:\n\`\`\`${editor.document.languageId}\n${selectedText}\n\`\`\`` + await visibleWebview?.controller.initTask(prompt) + }), + ) + + context.subscriptions.push( + vscode.commands.registerCommand("cline.improveCode", async (range: vscode.Range) => { + await vscode.commands.executeCommand("cline.focusChatInput") // Ensure Cline is visible and input focused + await pWaitFor(() => !!WebviewProvider.getVisibleInstance()) + const editor = vscode.window.activeTextEditor + if (!editor) { + return + } + const selectedText = editor.document.getText(range) + if (!selectedText.trim()) { + vscode.window.showInformationMessage("Please select some code to improve.") + return + } + const filePath = editor.document.uri.fsPath + const visibleWebview = WebviewProvider.getVisibleInstance() + const fileMention = visibleWebview?.controller.getFileMentionFromPath(filePath) || filePath + const prompt = `Improve the following code from ${fileMention} (e.g., suggest refactorings, optimizations, or better practices):\n\`\`\`${editor.document.languageId}\n${selectedText}\n\`\`\`` + await visibleWebview?.controller.initTask(prompt) + }), + ) + // Register the focusChatInput command handler context.subscriptions.push( - vscode.commands.registerCommand("cline.focusChatInput", () => { - let visibleWebview = WebviewProvider.getVisibleInstance() - if (!visibleWebview) { - vscode.commands.executeCommand("claude-dev.SidebarProvider.focus") - visibleWebview = WebviewProvider.getSidebarInstance() - // showing the extension will call didBecomeVisible which focuses it already - // but it doesn't focus if a tab is selected which focusChatInput accounts for - } + vscode.commands.registerCommand("cline.focusChatInput", async () => { + let activeWebviewProvider: WebviewProvider | undefined = WebviewProvider.getVisibleInstance() - visibleWebview?.controller.postMessageToWebview({ - type: "action", - action: "focusChatInput", - }) + // If a tab is visible and active, ensure it's fully revealed (might be redundant but safe) + if (activeWebviewProvider?.view && activeWebviewProvider.view.hasOwnProperty("reveal")) { + const panelView = activeWebviewProvider.view as vscode.WebviewPanel + panelView.reveal(panelView.viewColumn) + } else if (!activeWebviewProvider) { + // No webview is currently visible, try to activate the sidebar + await vscode.commands.executeCommand("claude-dev.SidebarProvider.focus") + await new Promise((resolve) => setTimeout(resolve, 200)) // Allow time for focus + activeWebviewProvider = WebviewProvider.getSidebarInstance() + + if (!activeWebviewProvider) { + // Sidebar didn't become active (might be closed or not in current view container) + // Check for existing tab panels + const tabInstances = WebviewProvider.getTabInstances() + if (tabInstances.length > 0) { + const potentialTabInstance = tabInstances[tabInstances.length - 1] // Get the most recent one + if (potentialTabInstance.view && potentialTabInstance.view.hasOwnProperty("reveal")) { + const panelView = potentialTabInstance.view as vscode.WebviewPanel + panelView.reveal(panelView.viewColumn) + activeWebviewProvider = potentialTabInstance + } + } + } + + if (!activeWebviewProvider) { + // No existing Cline view found at all, open a new tab + await vscode.commands.executeCommand("cline.openInNewTab") + // After openInNewTab, a new webview is created. We need to get this new instance. + // It might take a moment for it to register. + await pWaitFor( + () => { + const visibleInstance = WebviewProvider.getVisibleInstance() + // Ensure a boolean is returned + return !!(visibleInstance?.view && visibleInstance.view.hasOwnProperty("reveal")) + }, + { timeout: 2000 }, + ) + activeWebviewProvider = WebviewProvider.getVisibleInstance() + } + } + // At this point, activeWebviewProvider should be the one we want to send the message to. + // It could still be undefined if opening a new tab failed or timed out. + if (activeWebviewProvider) { + activeWebviewProvider.controller.postMessageToWebview({ + type: "action", + action: "focusChatInput", + }) + } else { + console.error("FocusChatInput: Could not find or activate a Cline webview to focus.") + vscode.window.showErrorMessage( + "Could not activate Cline view. Please try opening it manually from the Activity Bar.", + ) + } }), ) From 78c3c5eff2f133c0b9167e7a49868568e8566ba3 Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Tue, 20 May 2025 15:25:46 -0700 Subject: [PATCH 14/85] Migrate toggle tool auto approve protobus (#3614) * migrate toggleToolAutoApprove * changset --------- Co-authored-by: Elephant Lumps --- .changeset/good-dingos-try.md | 5 + proto/mcp.proto | 8 ++ src/core/controller/index.ts | 15 --- src/core/controller/mcp/methods.ts | 2 + .../controller/mcp/toggleToolAutoApprove.ts | 23 ++++ src/services/mcp/McpHub.ts | 52 ++++++++ src/shared/WebviewMessage.ts | 1 - src/shared/proto/mcp.ts | 124 ++++++++++++++++++ src/standalone/server-setup.ts | 2 + .../tabs/installed/server-row/McpToolRow.tsx | 17 ++- .../tabs/installed/server-row/ServerRow.tsx | 10 +- 11 files changed, 236 insertions(+), 23 deletions(-) create mode 100644 .changeset/good-dingos-try.md create mode 100644 src/core/controller/mcp/toggleToolAutoApprove.ts diff --git a/.changeset/good-dingos-try.md b/.changeset/good-dingos-try.md new file mode 100644 index 00000000..9a12131c --- /dev/null +++ b/.changeset/good-dingos-try.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Migrate toggleToolAutoApprove to protobus diff --git a/proto/mcp.proto b/proto/mcp.proto index 572728bd..8cec7644 100644 --- a/proto/mcp.proto +++ b/proto/mcp.proto @@ -13,6 +13,7 @@ service McpService { rpc downloadMcp(StringRequest) returns (Empty); rpc restartMcpServer(StringRequest) returns (McpServers); rpc deleteMcpServer(StringRequest) returns (McpServers); + rpc toggleToolAutoApprove(ToggleToolAutoApproveRequest) returns (McpServers); } message ToggleMcpServerRequest { @@ -33,6 +34,13 @@ message AddRemoteMcpServerRequest { string server_url = 3; } +message ToggleToolAutoApproveRequest { + Metadata metadata = 1; + string server_name = 2; + repeated string tool_names = 3; + bool auto_approve = 4; +} + message McpTool { string name = 1; optional string description = 2; diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index e09e4288..f816d3fe 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -394,21 +394,6 @@ export class Controller { // break // } - case "toggleToolAutoApprove": { - try { - await this.mcpHub?.toggleToolAutoApprove(message.serverName!, message.toolNames!, message.autoApprove!) - } catch (error) { - if (message.toolNames?.length === 1) { - console.error( - `Failed to toggle auto-approve for server ${message.serverName} with tool ${message.toolNames[0]}:`, - error, - ) - } else { - console.error(`Failed to toggle auto-approve tools for server ${message.serverName}:`, error) - } - } - break - } case "toggleWindsurfRule": { const { rulePath, enabled } = message if (rulePath && typeof enabled === "boolean") { diff --git a/src/core/controller/mcp/methods.ts b/src/core/controller/mcp/methods.ts index 6f1455d4..175e88f8 100644 --- a/src/core/controller/mcp/methods.ts +++ b/src/core/controller/mcp/methods.ts @@ -8,6 +8,7 @@ import { deleteMcpServer } from "./deleteMcpServer" import { downloadMcp } from "./downloadMcp" import { restartMcpServer } from "./restartMcpServer" import { toggleMcpServer } from "./toggleMcpServer" +import { toggleToolAutoApprove } from "./toggleToolAutoApprove" import { updateMcpTimeout } from "./updateMcpTimeout" // Register all mcp service methods @@ -18,5 +19,6 @@ export function registerAllMethods(): void { registerMethod("downloadMcp", downloadMcp) registerMethod("restartMcpServer", restartMcpServer) registerMethod("toggleMcpServer", toggleMcpServer) + registerMethod("toggleToolAutoApprove", toggleToolAutoApprove) registerMethod("updateMcpTimeout", updateMcpTimeout) } diff --git a/src/core/controller/mcp/toggleToolAutoApprove.ts b/src/core/controller/mcp/toggleToolAutoApprove.ts new file mode 100644 index 00000000..9e968dc5 --- /dev/null +++ b/src/core/controller/mcp/toggleToolAutoApprove.ts @@ -0,0 +1,23 @@ +import type { ToggleToolAutoApproveRequest, McpServers } from "@shared/proto/mcp" +import type { Controller } from "../index" +import { convertMcpServersToProtoMcpServers } from "@shared/proto-conversions/mcp/mcp-server-conversion" + +/** + * Toggles auto-approve setting for MCP server tools + * @param controller The controller instance + * @param request The toggle tool auto-approve request + * @returns Updated list of MCP servers + */ +export async function toggleToolAutoApprove(controller: Controller, request: ToggleToolAutoApproveRequest): Promise { + try { + // Call the RPC variant that returns the servers directly + const mcpServers = + (await controller.mcpHub?.toggleToolAutoApproveRPC(request.serverName, request.toolNames, request.autoApprove)) || [] + + // Convert application types to proto types + return { mcpServers: convertMcpServersToProtoMcpServers(mcpServers) } + } catch (error) { + console.error(`Failed to toggle tool auto-approve for ${request.serverName}:`, error) + throw error + } +} diff --git a/src/services/mcp/McpHub.ts b/src/services/mcp/McpHub.ts index 40fe03e5..1cff318e 100644 --- a/src/services/mcp/McpHub.ts +++ b/src/services/mcp/McpHub.ts @@ -793,6 +793,58 @@ export class McpHub { ) } + /** + * RPC variant of toggleToolAutoApprove that returns the updated servers instead of notifying the webview + * @param serverName The name of the MCP server + * @param toolNames Array of tool names to toggle auto-approve for + * @param shouldAllow Whether to enable or disable auto-approve + * @returns Array of updated MCP servers + */ + async toggleToolAutoApproveRPC(serverName: string, toolNames: string[], shouldAllow: boolean): Promise { + try { + const settingsPath = await this.getMcpSettingsFilePath() + const content = await fs.readFile(settingsPath, "utf-8") + const config = JSON.parse(content) + + // Initialize autoApprove if it doesn't exist + if (!config.mcpServers[serverName].autoApprove) { + config.mcpServers[serverName].autoApprove = [] + } + + const autoApprove = config.mcpServers[serverName].autoApprove + for (const toolName of toolNames) { + const toolIndex = autoApprove.indexOf(toolName) + + if (shouldAllow && toolIndex === -1) { + // Add tool to autoApprove list + autoApprove.push(toolName) + } else if (!shouldAllow && toolIndex !== -1) { + // Remove tool from autoApprove list + autoApprove.splice(toolIndex, 1) + } + } + + await fs.writeFile(settingsPath, JSON.stringify(config, null, 2)) + + // Update the tools list to reflect the change + const connection = this.connections.find((conn) => conn.server.name === serverName) + if (connection && connection.server.tools) { + // Update the autoApprove property of each tool in the in-memory server object + connection.server.tools = connection.server.tools.map((tool) => ({ + ...tool, + autoApprove: autoApprove.includes(tool.name), + })) + } + + // Return sorted servers without notifying webview + const serverOrder = Object.keys(config.mcpServers || {}) + return this.getSortedMcpServers(serverOrder) + } catch (error) { + console.error("Failed to update autoApprove settings:", error) + throw error // Re-throw to ensure the error is properly handled + } + } + async toggleToolAutoApprove(serverName: string, toolNames: string[], shouldAllow: boolean): Promise { try { const settingsPath = await this.getMcpSettingsFilePath() diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 487d52f9..28c85f18 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -24,7 +24,6 @@ export interface WebviewMessage { | "browserRelaunchResult" | "openExtensionSettings" | "requestVsCodeLmModels" - | "toggleToolAutoApprove" | "showAccountViewClicked" | "authStateChanged" | "authCallback" diff --git a/src/shared/proto/mcp.ts b/src/shared/proto/mcp.ts index a4b9563b..d257b4e5 100644 --- a/src/shared/proto/mcp.ts +++ b/src/shared/proto/mcp.ts @@ -71,6 +71,13 @@ export interface AddRemoteMcpServerRequest { serverUrl: string } +export interface ToggleToolAutoApproveRequest { + metadata?: Metadata | undefined + serverName: string + toolNames: string[] + autoApprove: boolean +} + export interface McpTool { name: string description?: string | undefined @@ -387,6 +394,115 @@ export const AddRemoteMcpServerRequest: MessageFns = }, } +function createBaseToggleToolAutoApproveRequest(): ToggleToolAutoApproveRequest { + return { metadata: undefined, serverName: "", toolNames: [], autoApprove: false } +} + +export const ToggleToolAutoApproveRequest: MessageFns = { + encode(message: ToggleToolAutoApproveRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.metadata !== undefined) { + Metadata.encode(message.metadata, writer.uint32(10).fork()).join() + } + if (message.serverName !== "") { + writer.uint32(18).string(message.serverName) + } + for (const v of message.toolNames) { + writer.uint32(26).string(v!) + } + if (message.autoApprove !== false) { + writer.uint32(32).bool(message.autoApprove) + } + return writer + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ToggleToolAutoApproveRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = createBaseToggleToolAutoApproveRequest() + while (reader.pos < end) { + const tag = reader.uint32() + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break + } + + message.metadata = Metadata.decode(reader, reader.uint32()) + continue + } + case 2: { + if (tag !== 18) { + break + } + + message.serverName = reader.string() + continue + } + case 3: { + if (tag !== 26) { + break + } + + message.toolNames.push(reader.string()) + continue + } + case 4: { + if (tag !== 32) { + break + } + + message.autoApprove = reader.bool() + continue + } + } + if ((tag & 7) === 4 || tag === 0) { + break + } + reader.skip(tag & 7) + } + return message + }, + + fromJSON(object: any): ToggleToolAutoApproveRequest { + return { + metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, + serverName: isSet(object.serverName) ? globalThis.String(object.serverName) : "", + toolNames: globalThis.Array.isArray(object?.toolNames) ? object.toolNames.map((e: any) => globalThis.String(e)) : [], + autoApprove: isSet(object.autoApprove) ? globalThis.Boolean(object.autoApprove) : false, + } + }, + + toJSON(message: ToggleToolAutoApproveRequest): unknown { + const obj: any = {} + if (message.metadata !== undefined) { + obj.metadata = Metadata.toJSON(message.metadata) + } + if (message.serverName !== "") { + obj.serverName = message.serverName + } + if (message.toolNames?.length) { + obj.toolNames = message.toolNames + } + if (message.autoApprove !== false) { + obj.autoApprove = message.autoApprove + } + return obj + }, + + create, I>>(base?: I): ToggleToolAutoApproveRequest { + return ToggleToolAutoApproveRequest.fromPartial(base ?? ({} as any)) + }, + fromPartial, I>>(object: I): ToggleToolAutoApproveRequest { + const message = createBaseToggleToolAutoApproveRequest() + message.metadata = + object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined + message.serverName = object.serverName ?? "" + message.toolNames = object.toolNames?.map((e) => e) || [] + message.autoApprove = object.autoApprove ?? false + return message + }, +} + function createBaseMcpTool(): McpTool { return { name: "", description: undefined, inputSchema: undefined, autoApprove: undefined } } @@ -1028,6 +1144,14 @@ export const McpServiceDefinition = { responseStream: false, options: {}, }, + toggleToolAutoApprove: { + name: "toggleToolAutoApprove", + requestType: ToggleToolAutoApproveRequest, + requestStream: false, + responseType: McpServers, + responseStream: false, + options: {}, + }, }, } as const diff --git a/src/standalone/server-setup.ts b/src/standalone/server-setup.ts index 261603ef..89b61f5d 100644 --- a/src/standalone/server-setup.ts +++ b/src/standalone/server-setup.ts @@ -39,6 +39,7 @@ import { addRemoteMcpServer } from "../core/controller/mcp/addRemoteMcpServer" import { downloadMcp } from "../core/controller/mcp/downloadMcp" import { restartMcpServer } from "../core/controller/mcp/restartMcpServer" import { deleteMcpServer } from "../core/controller/mcp/deleteMcpServer" +import { toggleToolAutoApprove } from "../core/controller/mcp/toggleToolAutoApprove" // Models Service import { getOllamaModels } from "../core/controller/models/getOllamaModels" @@ -131,6 +132,7 @@ export function addServices( downloadMcp: wrapper(downloadMcp, controller), restartMcpServer: wrapper(restartMcpServer, controller), deleteMcpServer: wrapper(deleteMcpServer, controller), + toggleToolAutoApprove: wrapper(toggleToolAutoApprove, controller), }) // Models Service diff --git a/webview-ui/src/components/mcp/configuration/tabs/installed/server-row/McpToolRow.tsx b/webview-ui/src/components/mcp/configuration/tabs/installed/server-row/McpToolRow.tsx index bc59bf58..24ea9386 100644 --- a/webview-ui/src/components/mcp/configuration/tabs/installed/server-row/McpToolRow.tsx +++ b/webview-ui/src/components/mcp/configuration/tabs/installed/server-row/McpToolRow.tsx @@ -1,7 +1,8 @@ import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react" import { McpTool } from "@shared/mcp" -import { vscode } from "@/utils/vscode" import { useExtensionState } from "@/context/ExtensionStateContext" +import { McpServiceClient } from "@/services/grpc-client" +import { convertProtoMcpServersToMcpServers } from "@shared/proto-conversions/mcp/mcp-server-conversion" type McpToolRowProps = { tool: McpTool @@ -11,20 +12,26 @@ type McpToolRowProps = { const McpToolRow = ({ tool, serverName }: McpToolRowProps) => { const { autoApprovalSettings } = useExtensionState() + const { setMcpServers } = useExtensionState() + // Accept the event object const handleAutoApproveChange = (event: any) => { - // Only proceed if the event was triggered by a direct user interaction - if (!serverName) { return } - vscode.postMessage({ - type: "toggleToolAutoApprove", + McpServiceClient.toggleToolAutoApprove({ serverName, toolNames: [tool.name], autoApprove: !tool.autoApprove, }) + .then((response) => { + const mcpServers = convertProtoMcpServersToMcpServers(response.mcpServers) + setMcpServers(mcpServers) + }) + .catch((error) => { + console.error("Error toggling tool auto-approve", error) + }) } return (
{ if (!server.name) return - vscode.postMessage({ - type: "toggleToolAutoApprove", + McpServiceClient.toggleToolAutoApprove({ serverName: server.name, toolNames: server.tools?.map((tool) => tool.name) || [], autoApprove: !server.tools?.every((tool) => tool.autoApprove), }) + .then((response) => { + const mcpServers = convertProtoMcpServersToMcpServers(response.mcpServers) + setMcpServers(mcpServers) + }) + .catch((error) => { + console.error("Error toggling all tools auto-approve", error) + }) } const handleToggleMcpServer = () => { From e6da7c7282649e82c118d324013496e8daad8507 Mon Sep 17 00:00:00 2001 From: canvrno <46584286+canvrno@users.noreply.github.com> Date: Tue, 20 May 2025 16:21:24 -0700 Subject: [PATCH 15/85] [PROTOBUS] Move browserRelaunchResult to protobus (#3675) * browserRelaunchResult protobus migration * one small change * cleanup * Removed status bool, used common message --- .changeset/spotty-jeans-march.md | 5 ++++ package-lock.json | 2 +- proto/browser.proto | 1 + src/core/controller/browser/methods.ts | 2 ++ .../browser/relaunchChromeDebugMode.ts | 27 ++++++++++++++++++ src/core/controller/index.ts | 5 ---- src/services/browser/BrowserSession.ts | 14 ++-------- src/shared/ExtensionMessage.ts | 1 - src/shared/WebviewMessage.ts | 3 -- src/shared/proto/browser.ts | 10 ++++++- src/standalone/server-setup.ts | 2 ++ .../settings/BrowserSettingsSection.tsx | 28 +++++++++++-------- 12 files changed, 67 insertions(+), 33 deletions(-) create mode 100644 .changeset/spotty-jeans-march.md create mode 100644 src/core/controller/browser/relaunchChromeDebugMode.ts diff --git a/.changeset/spotty-jeans-march.md b/.changeset/spotty-jeans-march.md new file mode 100644 index 00000000..1db0691b --- /dev/null +++ b/.changeset/spotty-jeans-march.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +browserRelaunchResult protobus migration diff --git a/package-lock.json b/package-lock.json index 9428e81d..c44b69cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44188,4 +44188,4 @@ "dev": true } } -} \ No newline at end of file +} diff --git a/proto/browser.proto b/proto/browser.proto index 0f26b19d..cef58729 100644 --- a/proto/browser.proto +++ b/proto/browser.proto @@ -12,6 +12,7 @@ service BrowserService { rpc discoverBrowser(EmptyRequest) returns (BrowserConnection); rpc getDetectedChromePath(EmptyRequest) returns (ChromePath); rpc updateBrowserSettings(UpdateBrowserSettingsRequest) returns (Boolean); + rpc relaunchChromeDebugMode(EmptyRequest) returns (String); } message BrowserConnectionInfo { diff --git a/src/core/controller/browser/methods.ts b/src/core/controller/browser/methods.ts index d268ef9a..4800191d 100644 --- a/src/core/controller/browser/methods.ts +++ b/src/core/controller/browser/methods.ts @@ -6,6 +6,7 @@ import { registerMethod } from "./index" import { discoverBrowser } from "./discoverBrowser" import { getBrowserConnectionInfo } from "./getBrowserConnectionInfo" import { getDetectedChromePath } from "./getDetectedChromePath" +import { relaunchChromeDebugMode } from "./relaunchChromeDebugMode" import { testBrowserConnection } from "./testBrowserConnection" import { updateBrowserSettings } from "./updateBrowserSettings" @@ -15,6 +16,7 @@ export function registerAllMethods(): void { registerMethod("discoverBrowser", discoverBrowser) registerMethod("getBrowserConnectionInfo", getBrowserConnectionInfo) registerMethod("getDetectedChromePath", getDetectedChromePath) + registerMethod("relaunchChromeDebugMode", relaunchChromeDebugMode) registerMethod("testBrowserConnection", testBrowserConnection) registerMethod("updateBrowserSettings", updateBrowserSettings) } diff --git a/src/core/controller/browser/relaunchChromeDebugMode.ts b/src/core/controller/browser/relaunchChromeDebugMode.ts new file mode 100644 index 00000000..6fd1e0c7 --- /dev/null +++ b/src/core/controller/browser/relaunchChromeDebugMode.ts @@ -0,0 +1,27 @@ +import { EmptyRequest, String as StringMessage } from "../../../shared/proto/common" +import { Controller } from "../index" +import { BrowserSession } from "../../../services/browser/BrowserSession" + +/** + * Relaunch Chrome in debug mode + * @param controller The controller instance + * @param request The empty request message + * @returns The browser relaunch result as a string message + */ +export async function relaunchChromeDebugMode(controller: Controller, request: EmptyRequest): Promise { + try { + const { browserSettings } = await controller.getStateToPostToWebview() + const browserSession = new BrowserSession(controller.context, browserSettings) + + // Relaunch Chrome in debug mode + await browserSession.relaunchChromeDebugMode(controller) + + // The actual result will be sent via postMessageToWebview in the BrowserSession.relaunchChromeDebugMode method + // Here we just return a message as a placeholder + return { + value: "Chrome relaunch initiated", + } + } catch (error) { + throw new Error(`Error relaunching Chrome: ${error instanceof Error ? error.message : globalThis.String(error)}`) + } +} diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index f816d3fe..7a5b6ae4 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -313,11 +313,6 @@ export class Controller { text: message.text, }) break - case "relaunchChromeDebugMode": - const { browserSettings } = await getAllExtensionState(this.context) - const browserSession = new BrowserSession(this.context, browserSettings) - await browserSession.relaunchChromeDebugMode(this) - break case "didShowAnnouncement": await updateGlobalState(this.context, "lastShownAnnouncementId", this.latestAnnouncementId) await this.postStateToWebview() diff --git a/src/services/browser/BrowserSession.ts b/src/services/browser/BrowserSession.ts index 360c78a7..6f4b9c98 100644 --- a/src/services/browser/BrowserSession.ts +++ b/src/services/browser/BrowserSession.ts @@ -123,7 +123,7 @@ export class BrowserSession { return stats } - async relaunchChromeDebugMode(controller: Controller) { + async relaunchChromeDebugMode(controller: Controller): Promise { try { const userDataDir = path.join(os.tmpdir(), "chrome-debug-profile") const installation = chromeLauncher.Launcher.getFirstInstallation() @@ -159,17 +159,9 @@ export class BrowserSession { throw new Error("Chrome was launched but debug port is not responding") } - controller?.postMessageToWebview({ - type: "browserRelaunchResult", - success: true, - text: `Browser successfully launched with debug mode\nUsing: ${installation}`, - }) + return `Browser successfully launched with debug mode\nUsing: ${installation}` } catch (error) { - controller?.postMessageToWebview({ - type: "browserRelaunchResult", - success: false, - text: `Failed to relaunch Chrome: ${error instanceof Error ? error.message : String(error)}`, - }) + throw new Error(`Failed to relaunch Chrome: ${error instanceof Error ? error.message : globalThis.String(error)}`) } } diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index e60fdc26..b5532bb8 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -40,7 +40,6 @@ export interface ExtensionMessage { | "totalTasksSize" | "addToInput" | "browserConnectionResult" - | "browserRelaunchResult" | "fileSearchResults" | "grpc_response" // New type for gRPC responses | "setActiveQuote" diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 28c85f18..ac819449 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -21,7 +21,6 @@ export interface WebviewMessage { | "refreshClineRules" | "openMcpSettings" | "autoApprovalSettings" - | "browserRelaunchResult" | "openExtensionSettings" | "requestVsCodeLmModels" | "showAccountViewClicked" @@ -39,7 +38,6 @@ export interface WebviewMessage { | "fetchUserCreditsData" | "optionsResponse" | "requestTotalTasksSize" - | "relaunchChromeDebugMode" | "searchFiles" | "grpc_request" | "grpc_request_cancel" @@ -48,7 +46,6 @@ export interface WebviewMessage { | "updateTerminalConnectionTimeout" | "setActiveQuote" - // | "relaunchChromeDebugMode" text?: string disabled?: boolean apiConfiguration?: ApiConfiguration diff --git a/src/shared/proto/browser.ts b/src/shared/proto/browser.ts index 8458d957..a810aa6d 100644 --- a/src/shared/proto/browser.ts +++ b/src/shared/proto/browser.ts @@ -6,7 +6,7 @@ /* eslint-disable */ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { Boolean, EmptyRequest, Metadata, StringRequest } from "./common" +import { Boolean, EmptyRequest, Metadata, String, StringRequest } from "./common" export const protobufPackage = "cline" @@ -714,6 +714,14 @@ export const BrowserServiceDefinition = { responseStream: false, options: {}, }, + relaunchChromeDebugMode: { + name: "relaunchChromeDebugMode", + requestType: EmptyRequest, + requestStream: false, + responseType: String, + responseStream: false, + options: {}, + }, }, } as const diff --git a/src/standalone/server-setup.ts b/src/standalone/server-setup.ts index 89b61f5d..b6f6701a 100644 --- a/src/standalone/server-setup.ts +++ b/src/standalone/server-setup.ts @@ -14,6 +14,7 @@ import { testBrowserConnection } from "../core/controller/browser/testBrowserCon import { discoverBrowser } from "../core/controller/browser/discoverBrowser" import { getDetectedChromePath } from "../core/controller/browser/getDetectedChromePath" import { updateBrowserSettings } from "../core/controller/browser/updateBrowserSettings" +import { relaunchChromeDebugMode } from "../core/controller/browser/relaunchChromeDebugMode" // Checkpoints Service import { checkpointDiff } from "../core/controller/checkpoints/checkpointDiff" @@ -101,6 +102,7 @@ export function addServices( discoverBrowser: wrapper(discoverBrowser, controller), getDetectedChromePath: wrapper(getDetectedChromePath, controller), updateBrowserSettings: wrapper(updateBrowserSettings, controller), + relaunchChromeDebugMode: wrapper(relaunchChromeDebugMode, controller), }) // Checkpoints Service diff --git a/webview-ui/src/components/settings/BrowserSettingsSection.tsx b/webview-ui/src/components/settings/BrowserSettingsSection.tsx index 1699dbde..d89be140 100644 --- a/webview-ui/src/components/settings/BrowserSettingsSection.tsx +++ b/webview-ui/src/components/settings/BrowserSettingsSection.tsx @@ -3,7 +3,6 @@ import { VSCodeButton, VSCodeCheckbox, VSCodeDropdown, VSCodeOption, VSCodeTextF import debounce from "debounce" import { BROWSER_VIEWPORT_PRESETS } from "../../../../src/shared/BrowserSettings" import { useExtensionState } from "../../context/ExtensionStateContext" -import { vscode } from "../../utils/vscode" import styled from "styled-components" import { BrowserServiceClient } from "../../services/grpc-client" @@ -60,19 +59,13 @@ export const BrowserSettingsSection: React.FC = () => { const [isBundled, setIsBundled] = useState(false) const [detectedChromePath, setDetectedChromePath] = useState(null) - // Listen for browser connection test results and relaunch results + // Listen for browser connection test results useEffect(() => { const handleMessage = (event: MessageEvent) => { const message = event.data if (message.type === "browserConnectionResult") { setConnectionStatus(message.success) setIsCheckingConnection(false) - } else if (message.type === "browserRelaunchResult") { - setRelaunchResult({ - success: message.success, - message: message.text, - }) - setDebugMode(false) } } @@ -349,9 +342,22 @@ export const BrowserSettingsSection: React.FC = () => { setRelaunchResult(null) // The connection status will be automatically updated by our polling - vscode.postMessage({ - type: "relaunchChromeDebugMode", - }) + BrowserServiceClient.relaunchChromeDebugMode({}) + .then((result) => { + setRelaunchResult({ + success: result.success, + message: result.message, + }) + setDebugMode(false) + }) + .catch((error) => { + console.error("Error relaunching Chrome:", error) + setRelaunchResult({ + success: false, + message: `Error relaunching Chrome: ${error.message}`, + }) + setDebugMode(false) + }) } // Determine if we should show the relaunch button From c7c1d37379167d92294e0968d4e12fd70f89ded1 Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Tue, 20 May 2025 16:29:16 -0700 Subject: [PATCH 16/85] Migrate setActiveQuote message to protobus (#3668) * migrate setActiveQuote * changeset --------- Co-authored-by: Elephant Lumps --- .changeset/famous-shoes-beam.md | 5 +++++ src/shared/ExtensionMessage.ts | 1 - src/shared/WebviewMessage.ts | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .changeset/famous-shoes-beam.md diff --git a/.changeset/famous-shoes-beam.md b/.changeset/famous-shoes-beam.md new file mode 100644 index 00000000..6b2e4e9b --- /dev/null +++ b/.changeset/famous-shoes-beam.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Migrate setActiveQuote to protobus diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index b5532bb8..3bf5cac9 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -42,7 +42,6 @@ export interface ExtensionMessage { | "browserConnectionResult" | "fileSearchResults" | "grpc_response" // New type for gRPC responses - | "setActiveQuote" text?: string action?: | "chatButtonClicked" diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index ac819449..77f287a8 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -44,7 +44,6 @@ export interface WebviewMessage { | "toggleWindsurfRule" | "toggleWorkflow" | "updateTerminalConnectionTimeout" - | "setActiveQuote" text?: string disabled?: boolean From aff78bda7c04e6f64ef95ad7eb98b961b0053cbf Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Tue, 20 May 2025 23:30:15 +0000 Subject: [PATCH 17/85] Fix build-protos script on windows (#3670) --- proto/build-proto.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/proto/build-proto.js b/proto/build-proto.js index fc7de676..c9144ddf 100755 --- a/proto/build-proto.js +++ b/proto/build-proto.js @@ -10,12 +10,16 @@ import chalk from "chalk" import { createRequire } from "module" const require = createRequire(import.meta.url) const protoc = path.join(require.resolve("grpc-tools"), "../bin/protoc") -const tsProtoPlugin = require.resolve("ts-proto/protoc-gen-ts_proto") const __filename = fileURLToPath(import.meta.url) const SCRIPT_DIR = path.dirname(__filename) const ROOT_DIR = path.resolve(SCRIPT_DIR, "..") +const isWindows = process.platform === "win32" +const tsProtoPlugin = isWindows + ? path.join(ROOT_DIR, "node_modules", ".bin", "protoc-gen-ts_proto.cmd") // Use the .bin directory path for Windows + : require.resolve("ts-proto/protoc-gen-ts_proto") + // List of gRPC services // To add a new service, simply add it to this map and run this script // The service handler will be automatically discovered and used by grpc-handler.ts @@ -56,7 +60,7 @@ async function main() { // Process all proto files console.log(chalk.cyan("Processing proto files from"), SCRIPT_DIR) - const protoFiles = await globby("*.proto", { cwd: SCRIPT_DIR, absolute: true }) + const protoFiles = await globby("*.proto", { cwd: SCRIPT_DIR, realpath: true }) // Build the protoc command with proper path handling for cross-platform const tsProtocCommand = [ From f0e352489f6190051df789a002619ab2d654b6d5 Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Tue, 20 May 2025 16:55:53 -0700 Subject: [PATCH 18/85] Migrate toggleWindsurfRule protobus (#3677) * migrate toggleWindsurfRules * changeset --------- Co-authored-by: Elephant Lumps --- .changeset/silver-seals-care.md | 5 + proto/file.proto | 10 ++ src/core/controller/file/methods.ts | 2 + .../controller/file/toggleWindsurfRule.ts | 30 +++++ src/core/controller/index.ts | 13 -- src/shared/WebviewMessage.ts | 1 - src/shared/proto/file.ts | 111 ++++++++++++++++++ src/standalone/server-setup.ts | 2 + .../cline-rules/ClineRulesToggleModal.tsx | 15 ++- .../src/context/ExtensionStateContext.tsx | 6 + 10 files changed, 178 insertions(+), 17 deletions(-) create mode 100644 .changeset/silver-seals-care.md create mode 100644 src/core/controller/file/toggleWindsurfRule.ts diff --git a/.changeset/silver-seals-care.md b/.changeset/silver-seals-care.md new file mode 100644 index 00000000..6848d837 --- /dev/null +++ b/.changeset/silver-seals-care.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Migrate toggleWindsurfRule to protobus diff --git a/proto/file.proto b/proto/file.proto index 946b6b17..f2fa6e0d 100644 --- a/proto/file.proto +++ b/proto/file.proto @@ -40,6 +40,16 @@ service FileService { // Toggle a Cursor rule (enable or disable) rpc toggleCursorRule(ToggleCursorRuleRequest) returns (ClineRulesToggles); + + // Toggle a Windsurf rule (enable or disable) + rpc toggleWindsurfRule(ToggleWindsurfRuleRequest) returns (ClineRulesToggles); +} + +// Request to toggle a Windsurf rule +message ToggleWindsurfRuleRequest { + Metadata metadata = 1; + string rule_path = 2; // Path to the rule file + bool enabled = 3; // Whether to enable or disable the rule } // Request to convert a list of URIs to relative paths diff --git a/src/core/controller/file/methods.ts b/src/core/controller/file/methods.ts index 080a3358..94bbb1b7 100644 --- a/src/core/controller/file/methods.ts +++ b/src/core/controller/file/methods.ts @@ -14,6 +14,7 @@ import { searchFiles } from "./searchFiles" import { selectImages } from "./selectImages" import { toggleClineRule } from "./toggleClineRule" import { toggleCursorRule } from "./toggleCursorRule" +import { toggleWindsurfRule } from "./toggleWindsurfRule" // Register all file service methods export function registerAllMethods(): void { @@ -29,4 +30,5 @@ export function registerAllMethods(): void { registerMethod("selectImages", selectImages) registerMethod("toggleClineRule", toggleClineRule) registerMethod("toggleCursorRule", toggleCursorRule) + registerMethod("toggleWindsurfRule", toggleWindsurfRule) } diff --git a/src/core/controller/file/toggleWindsurfRule.ts b/src/core/controller/file/toggleWindsurfRule.ts new file mode 100644 index 00000000..1d1a0852 --- /dev/null +++ b/src/core/controller/file/toggleWindsurfRule.ts @@ -0,0 +1,30 @@ +import type { ToggleWindsurfRuleRequest, ClineRulesToggles } from "../../../shared/proto/file" +import type { Controller } from "../index" +import { getWorkspaceState, updateWorkspaceState } from "../../../core/storage/state" +import { ClineRulesToggles as AppClineRulesToggles } from "@shared/cline-rules" + +/** + * Toggles a Windsurf rule (enable or disable) + * @param controller The controller instance + * @param request The toggle request + * @returns The updated Windsurf rule toggles + */ +export async function toggleWindsurfRule(controller: Controller, request: ToggleWindsurfRuleRequest): Promise { + const { rulePath, enabled } = request + + if (!rulePath || typeof enabled !== "boolean") { + console.error("toggleWindsurfRule: Missing or invalid parameters", { + rulePath, + enabled: typeof enabled === "boolean" ? enabled : `Invalid: ${typeof enabled}`, + }) + throw new Error("Missing or invalid parameters for toggleWindsurfRule") + } + + // Update the toggles + const toggles = ((await getWorkspaceState(controller.context, "localWindsurfRulesToggles")) as AppClineRulesToggles) || {} + toggles[rulePath] = enabled + await updateWorkspaceState(controller.context, "localWindsurfRulesToggles", toggles) + + // Return the toggles directly + return { toggles: toggles } +} diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 7a5b6ae4..fb455384 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -389,19 +389,6 @@ export class Controller { // break // } - case "toggleWindsurfRule": { - const { rulePath, enabled } = message - if (rulePath && typeof enabled === "boolean") { - const toggles = - ((await getWorkspaceState(this.context, "localWindsurfRulesToggles")) as ClineRulesToggles) || {} - toggles[rulePath] = enabled - await updateWorkspaceState(this.context, "localWindsurfRulesToggles", toggles) - await this.postStateToWebview() - } else { - console.error("toggleWindsurfRule: Missing or invalid parameters") - } - break - } case "toggleWorkflow": { const { workflowPath, enabled } = message if (workflowPath && typeof enabled === "boolean") { diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 77f287a8..c072a2cf 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -41,7 +41,6 @@ export interface WebviewMessage { | "searchFiles" | "grpc_request" | "grpc_request_cancel" - | "toggleWindsurfRule" | "toggleWorkflow" | "updateTerminalConnectionTimeout" diff --git a/src/shared/proto/file.ts b/src/shared/proto/file.ts index 0324eb99..85a7ed38 100644 --- a/src/shared/proto/file.ts +++ b/src/shared/proto/file.ts @@ -10,6 +10,15 @@ import { Empty, EmptyRequest, Metadata, StringArray, StringRequest } from "./com export const protobufPackage = "cline" +/** Request to toggle a Windsurf rule */ +export interface ToggleWindsurfRuleRequest { + metadata?: Metadata | undefined + /** Path to the rule file */ + rulePath: string + /** Whether to enable or disable the rule */ + enabled: boolean +} + /** Request to convert a list of URIs to relative paths */ export interface RelativePathsRequest { metadata?: Metadata | undefined @@ -123,6 +132,99 @@ export interface ToggleCursorRuleRequest { enabled: boolean } +function createBaseToggleWindsurfRuleRequest(): ToggleWindsurfRuleRequest { + return { metadata: undefined, rulePath: "", enabled: false } +} + +export const ToggleWindsurfRuleRequest: MessageFns = { + encode(message: ToggleWindsurfRuleRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.metadata !== undefined) { + Metadata.encode(message.metadata, writer.uint32(10).fork()).join() + } + if (message.rulePath !== "") { + writer.uint32(18).string(message.rulePath) + } + if (message.enabled !== false) { + writer.uint32(24).bool(message.enabled) + } + return writer + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ToggleWindsurfRuleRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = createBaseToggleWindsurfRuleRequest() + while (reader.pos < end) { + const tag = reader.uint32() + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break + } + + message.metadata = Metadata.decode(reader, reader.uint32()) + continue + } + case 2: { + if (tag !== 18) { + break + } + + message.rulePath = reader.string() + continue + } + case 3: { + if (tag !== 24) { + break + } + + message.enabled = reader.bool() + continue + } + } + if ((tag & 7) === 4 || tag === 0) { + break + } + reader.skip(tag & 7) + } + return message + }, + + fromJSON(object: any): ToggleWindsurfRuleRequest { + return { + metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, + rulePath: isSet(object.rulePath) ? globalThis.String(object.rulePath) : "", + enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false, + } + }, + + toJSON(message: ToggleWindsurfRuleRequest): unknown { + const obj: any = {} + if (message.metadata !== undefined) { + obj.metadata = Metadata.toJSON(message.metadata) + } + if (message.rulePath !== "") { + obj.rulePath = message.rulePath + } + if (message.enabled !== false) { + obj.enabled = message.enabled + } + return obj + }, + + create, I>>(base?: I): ToggleWindsurfRuleRequest { + return ToggleWindsurfRuleRequest.fromPartial(base ?? ({} as any)) + }, + fromPartial, I>>(object: I): ToggleWindsurfRuleRequest { + const message = createBaseToggleWindsurfRuleRequest() + message.metadata = + object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined + message.rulePath = object.rulePath ?? "" + message.enabled = object.enabled ?? false + return message + }, +} + function createBaseRelativePathsRequest(): RelativePathsRequest { return { metadata: undefined, uris: [] } } @@ -1484,6 +1586,15 @@ export const FileServiceDefinition = { responseStream: false, options: {}, }, + /** Toggle a Windsurf rule (enable or disable) */ + toggleWindsurfRule: { + name: "toggleWindsurfRule", + requestType: ToggleWindsurfRuleRequest, + requestStream: false, + responseType: ClineRulesToggles, + responseStream: false, + options: {}, + }, }, } as const diff --git a/src/standalone/server-setup.ts b/src/standalone/server-setup.ts index b6f6701a..4a25bf80 100644 --- a/src/standalone/server-setup.ts +++ b/src/standalone/server-setup.ts @@ -32,6 +32,7 @@ import { getRelativePaths } from "../core/controller/file/getRelativePaths" import { searchFiles } from "../core/controller/file/searchFiles" import { toggleClineRule } from "../core/controller/file/toggleClineRule" import { toggleCursorRule } from "../core/controller/file/toggleCursorRule" +import { toggleWindsurfRule } from "../core/controller/file/toggleWindsurfRule" // Mcp Service import { toggleMcpServer } from "../core/controller/mcp/toggleMcpServer" @@ -124,6 +125,7 @@ export function addServices( searchFiles: wrapper(searchFiles, controller), toggleClineRule: wrapper(toggleClineRule, controller), toggleCursorRule: wrapper(toggleCursorRule, controller), + toggleWindsurfRule: wrapper(toggleWindsurfRule, controller), }) // Mcp Service diff --git a/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx b/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx index 824c23b1..b547ab2c 100644 --- a/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx +++ b/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx @@ -8,6 +8,7 @@ import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" import RulesToggleList from "./RulesToggleList" import Tooltip from "@/components/common/Tooltip" import styled from "styled-components" +import { ClineRulesToggles, ToggleWindsurfRuleRequest } from "@shared/proto/file" const ClineRulesToggleModal: React.FC = () => { const { @@ -19,6 +20,7 @@ const ClineRulesToggleModal: React.FC = () => { setGlobalClineRulesToggles, setLocalClineRulesToggles, setLocalCursorRulesToggles, + setLocalWindsurfRulesToggles, } = useExtensionState() const [isVisible, setIsVisible] = useState(false) const buttonRef = useRef(null) @@ -94,11 +96,18 @@ const ClineRulesToggleModal: React.FC = () => { } const toggleWindsurfRule = (rulePath: string, enabled: boolean) => { - vscode.postMessage({ - type: "toggleWindsurfRule", + FileServiceClient.toggleWindsurfRule({ rulePath, enabled, - }) + } as ToggleWindsurfRuleRequest) + .then((response: ClineRulesToggles) => { + if (response.toggles) { + setLocalWindsurfRulesToggles(response.toggles) + } + }) + .catch((error) => { + console.error("Error toggling Windsurf rule:", error) + }) } const toggleWorkflow = (workflowPath: string, enabled: boolean) => { diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index 4f3d1cbd..c8f85a0d 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -54,6 +54,7 @@ interface ExtensionStateContextType extends ExtensionState { setGlobalClineRulesToggles: (toggles: Record) => void setLocalClineRulesToggles: (toggles: Record) => void setLocalCursorRulesToggles: (toggles: Record) => void + setLocalWindsurfRulesToggles: (toggles: Record) => void // Navigation state setters setShowMcp: (value: boolean) => void @@ -532,6 +533,11 @@ export const ExtensionStateContextProvider: React.FC<{ ...prevState, localCursorRulesToggles: toggles, })), + setLocalWindsurfRulesToggles: (toggles) => + setState((prevState) => ({ + ...prevState, + localWindsurfRulesToggles: toggles, + })), setMcpTab, } From 7fe7605a85051b15773d2595ee0a7676a9ce4ad8 Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Tue, 20 May 2025 17:10:33 -0700 Subject: [PATCH 19/85] Migrate updateTerminalConnectionTimeout protobus (#3669) * migrate setActiveQuote * changeset * migrate updateTerminalConnectionTimeout * changeset --------- Co-authored-by: Elephant Lumps --- .changeset/loud-worms-applaud.md | 5 ++++ proto/state.proto | 1 + src/core/controller/index.ts | 15 ----------- src/core/controller/state/methods.ts | 2 ++ .../state/updateTerminalConnectionTimeout.ts | 27 +++++++++++++++++++ src/shared/WebviewMessage.ts | 1 - src/shared/proto/state.ts | 10 ++++++- src/standalone/server-setup.ts | 2 ++ .../settings/TerminalSettingsSection.tsx | 19 ++++++++----- 9 files changed, 59 insertions(+), 23 deletions(-) create mode 100644 .changeset/loud-worms-applaud.md create mode 100644 src/core/controller/state/updateTerminalConnectionTimeout.ts diff --git a/.changeset/loud-worms-applaud.md b/.changeset/loud-worms-applaud.md new file mode 100644 index 00000000..64ee6081 --- /dev/null +++ b/.changeset/loud-worms-applaud.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Migrate updateTerminalConnectionTimeout to protobus diff --git a/proto/state.proto b/proto/state.proto index cb4cfda3..d7120a1e 100644 --- a/proto/state.proto +++ b/proto/state.proto @@ -9,6 +9,7 @@ service StateService { rpc toggleFavoriteModel(StringRequest) returns (Empty); rpc resetState(EmptyRequest) returns (Empty); rpc togglePlanActMode(TogglePlanActModeRequest) returns (Empty); + rpc updateTerminalConnectionTimeout(Int64Request) returns (Int64); } message State { diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index fb455384..b3ecfdf1 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -516,21 +516,6 @@ export class Controller { break } - case "updateTerminalConnectionTimeout": { - if (message.shellIntegrationTimeout !== undefined) { - const timeout = message.shellIntegrationTimeout - - if (typeof timeout === "number" && !isNaN(timeout) && timeout > 0) { - await updateGlobalState(this.context, "shellIntegrationTimeout", timeout) - await this.postStateToWebview() - } else { - console.warn( - `Invalid shell integration timeout value received: ${timeout}. ` + `Expected a positive number.`, - ) - } - } - break - } // Add more switch case statements here as more webview message commands // are created within the webview context (i.e. inside media/main.js) } diff --git a/src/core/controller/state/methods.ts b/src/core/controller/state/methods.ts index 8ab69921..f6fe3be2 100644 --- a/src/core/controller/state/methods.ts +++ b/src/core/controller/state/methods.ts @@ -8,6 +8,7 @@ import { resetState } from "./resetState" import { subscribeToState } from "./subscribeToState" import { toggleFavoriteModel } from "./toggleFavoriteModel" import { togglePlanActMode } from "./togglePlanActMode" +import { updateTerminalConnectionTimeout } from "./updateTerminalConnectionTimeout" // Streaming methods for this service export const streamingMethods = ["subscribeToState"] @@ -20,4 +21,5 @@ export function registerAllMethods(): void { registerMethod("subscribeToState", subscribeToState, { isStreaming: true }) registerMethod("toggleFavoriteModel", toggleFavoriteModel) registerMethod("togglePlanActMode", togglePlanActMode) + registerMethod("updateTerminalConnectionTimeout", updateTerminalConnectionTimeout) } diff --git a/src/core/controller/state/updateTerminalConnectionTimeout.ts b/src/core/controller/state/updateTerminalConnectionTimeout.ts new file mode 100644 index 00000000..3d9ba4c1 --- /dev/null +++ b/src/core/controller/state/updateTerminalConnectionTimeout.ts @@ -0,0 +1,27 @@ +import { Controller } from ".." +import { Int64, Int64Request } from "../../../shared/proto/common" +import { updateGlobalState } from "../../storage/state" + +/** + * Updates the terminal connection timeout setting + * @param controller The controller instance + * @param request The request containing the timeout value in milliseconds + * @returns The updated timeout value + */ +export async function updateTerminalConnectionTimeout(controller: Controller, request: Int64Request): Promise { + try { + const timeout = request.value + + if (typeof timeout === "number" && !isNaN(timeout) && timeout > 0) { + // Update the global state directly + await updateGlobalState(controller.context, "shellIntegrationTimeout", timeout) + return { value: timeout } + } else { + console.warn(`Invalid shell integration timeout value received: ${timeout}. Expected a positive number.`) + throw new Error("Invalid timeout value. Expected a positive number.") + } + } catch (error) { + console.error(`Failed to update terminal connection timeout: ${error}`) + throw error + } +} diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index c072a2cf..d33ef015 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -42,7 +42,6 @@ export interface WebviewMessage { | "grpc_request" | "grpc_request_cancel" | "toggleWorkflow" - | "updateTerminalConnectionTimeout" text?: string disabled?: boolean diff --git a/src/shared/proto/state.ts b/src/shared/proto/state.ts index de3c8676..cc230ad6 100644 --- a/src/shared/proto/state.ts +++ b/src/shared/proto/state.ts @@ -6,7 +6,7 @@ /* eslint-disable */ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { Empty, EmptyRequest, Metadata, StringRequest } from "./common" +import { Empty, EmptyRequest, Int64, Int64Request, Metadata, StringRequest } from "./common" export const protobufPackage = "cline" @@ -436,6 +436,14 @@ export const StateServiceDefinition = { responseStream: false, options: {}, }, + updateTerminalConnectionTimeout: { + name: "updateTerminalConnectionTimeout", + requestType: Int64Request, + requestStream: false, + responseType: Int64, + responseStream: false, + options: {}, + }, }, } as const diff --git a/src/standalone/server-setup.ts b/src/standalone/server-setup.ts index 4a25bf80..2fd89fdc 100644 --- a/src/standalone/server-setup.ts +++ b/src/standalone/server-setup.ts @@ -61,6 +61,7 @@ import { subscribeToState } from "../core/controller/state/subscribeToState" import { toggleFavoriteModel } from "../core/controller/state/toggleFavoriteModel" import { resetState } from "../core/controller/state/resetState" import { togglePlanActMode } from "../core/controller/state/togglePlanActMode" +import { updateTerminalConnectionTimeout } from "../core/controller/state/updateTerminalConnectionTimeout" // Task Service import { cancelTask } from "../core/controller/task/cancelTask" @@ -162,6 +163,7 @@ export function addServices( toggleFavoriteModel: wrapper(toggleFavoriteModel, controller), resetState: wrapper(resetState, controller), togglePlanActMode: wrapper(togglePlanActMode, controller), + updateTerminalConnectionTimeout: wrapper(updateTerminalConnectionTimeout, controller), }) // Task Service diff --git a/webview-ui/src/components/settings/TerminalSettingsSection.tsx b/webview-ui/src/components/settings/TerminalSettingsSection.tsx index f55f83da..cedd81ba 100644 --- a/webview-ui/src/components/settings/TerminalSettingsSection.tsx +++ b/webview-ui/src/components/settings/TerminalSettingsSection.tsx @@ -1,7 +1,8 @@ import React, { useState } from "react" import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react" import { useExtensionState } from "@/context/ExtensionStateContext" -import { vscode } from "@/utils/vscode" +import { StateServiceClient } from "@/services/grpc-client" +import { Int64, Int64Request } from "@shared/proto/common" export const TerminalSettingsSection: React.FC = () => { const { shellIntegrationTimeout, setShellIntegrationTimeout } = useExtensionState() @@ -26,11 +27,17 @@ export const TerminalSettingsSection: React.FC = () => { // Update local state setShellIntegrationTimeout(timeout) - // Send to extension - vscode.postMessage({ - type: "updateTerminalConnectionTimeout", - shellIntegrationTimeout: timeout, - }) + // Send to extension using gRPC + StateServiceClient.updateTerminalConnectionTimeout({ + value: timeout, + } as Int64Request) + .then((response: Int64) => { + setShellIntegrationTimeout(response.value) + setInputValue((response.value / 1000).toString()) + }) + .catch((error) => { + console.error("Failed to update terminal connection timeout:", error) + }) } const handleInputBlur = () => { From fe13ce8d6f711887877b7a95882efa2bb429c720 Mon Sep 17 00:00:00 2001 From: omercelik Date: Wed, 21 May 2025 01:24:00 +0100 Subject: [PATCH 20/85] feat: added gemini flash 05-20 (#3680) * feat: added gemini flash 05-20 * feat: added gemini flash 2.5 05-20 to gemini models also * Create funny-adults-tease.md --- .changeset/funny-adults-tease.md | 5 +++++ src/shared/api.ts | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .changeset/funny-adults-tease.md diff --git a/.changeset/funny-adults-tease.md b/.changeset/funny-adults-tease.md new file mode 100644 index 00000000..181bdf71 --- /dev/null +++ b/.changeset/funny-adults-tease.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +feat: added gemini flash 05-20 diff --git a/src/shared/api.ts b/src/shared/api.ts index a7597d85..b424cf54 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -483,6 +483,19 @@ export const vertexModels = { outputPrice: 3.5, }, }, + "gemini-2.5-flash-preview-05-20": { + maxTokens: 65536, + contextWindow: 1_048_576, + supportsImages: true, + supportsPromptCache: false, + supportsGlobalEndpoint: true, + inputPrice: 0.15, + outputPrice: 0.6, + thinkingConfig: { + maxBudget: 24576, + outputPrice: 3.5, + }, + }, "gemini-2.0-flash-thinking-exp-01-21": { maxTokens: 65_536, contextWindow: 1_048_576, @@ -601,6 +614,18 @@ export const geminiModels = { }, ], }, + "gemini-2.5-flash-preview-05-20": { + maxTokens: 65536, + contextWindow: 1_048_576, + supportsImages: true, + supportsPromptCache: false, + inputPrice: 0.15, + outputPrice: 0.6, + thinkingConfig: { + maxBudget: 24576, + outputPrice: 3.5, + }, + }, "gemini-2.5-flash-preview-04-17": { maxTokens: 65536, contextWindow: 1_048_576, From 08d4240e70849b4b153b439ee7b9d423ed691944 Mon Sep 17 00:00:00 2001 From: canvrno <46584286+canvrno@users.noreply.github.com> Date: Tue, 20 May 2025 17:40:16 -0700 Subject: [PATCH 21/85] [PROTOBUS] Move openMention to protobus (#3607) * openMention protobus migration * Cleanup and comments * rebase --- .changeset/seven-dingos-appear.md | 5 +++++ proto/file.proto | 3 +++ src/core/controller/file/methods.ts | 2 ++ src/core/controller/file/openMention.ts | 14 ++++++++++++++ src/core/controller/index.ts | 4 ---- src/shared/WebviewMessage.ts | 1 - src/shared/proto/file.ts | 9 +++++++++ src/standalone/server-setup.ts | 2 ++ webview-ui/src/components/chat/TaskHeader.tsx | 4 ++-- 9 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 .changeset/seven-dingos-appear.md create mode 100644 src/core/controller/file/openMention.ts diff --git a/.changeset/seven-dingos-appear.md b/.changeset/seven-dingos-appear.md new file mode 100644 index 00000000..e6b35585 --- /dev/null +++ b/.changeset/seven-dingos-appear.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +openMention protobus migration diff --git a/proto/file.proto b/proto/file.proto index f2fa6e0d..5ce50d87 100644 --- a/proto/file.proto +++ b/proto/file.proto @@ -16,6 +16,9 @@ service FileService { // Opens an image in the system viewer rpc openImage(StringRequest) returns (Empty); + + // Opens a mention (file, path, git commit, problem, terminal, or URL) + rpc openMention(StringRequest) returns (Empty); // Deletes a rule file from either global or workspace rules directory rpc deleteRuleFile(RuleFileRequest) returns (RuleFile); diff --git a/src/core/controller/file/methods.ts b/src/core/controller/file/methods.ts index 94bbb1b7..6740e242 100644 --- a/src/core/controller/file/methods.ts +++ b/src/core/controller/file/methods.ts @@ -9,6 +9,7 @@ import { deleteRuleFile } from "./deleteRuleFile" import { getRelativePaths } from "./getRelativePaths" import { openFile } from "./openFile" import { openImage } from "./openImage" +import { openMention } from "./openMention" import { searchCommits } from "./searchCommits" import { searchFiles } from "./searchFiles" import { selectImages } from "./selectImages" @@ -25,6 +26,7 @@ export function registerAllMethods(): void { registerMethod("getRelativePaths", getRelativePaths) registerMethod("openFile", openFile) registerMethod("openImage", openImage) + registerMethod("openMention", openMention) registerMethod("searchCommits", searchCommits) registerMethod("searchFiles", searchFiles) registerMethod("selectImages", selectImages) diff --git a/src/core/controller/file/openMention.ts b/src/core/controller/file/openMention.ts new file mode 100644 index 00000000..ad996e47 --- /dev/null +++ b/src/core/controller/file/openMention.ts @@ -0,0 +1,14 @@ +import { Controller } from ".." +import { Empty, StringRequest } from "../../../shared/proto/common" +import { openMention as coreOpenMention } from "../../mentions" + +/** + * Opens a mention (file path, problem, terminal, or URL) + * @param controller The controller instance + * @param request The string request containing the mention text + * @returns Empty response + */ +export async function openMention(controller: Controller, request: StringRequest): Promise { + coreOpenMention(request.value) + return Empty.create() +} diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index b3ecfdf1..a77c677f 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -32,7 +32,6 @@ import { fileExistsAtPath } from "@utils/fs" import { getWorkingState } from "@utils/git" import { extractCommitMessage } from "@integrations/git/commit-message-generator" import { getTotalTasksSize } from "@utils/storage" -import { openMention } from "../mentions" import { ensureMcpServersDirectoryExists, ensureSettingsDirectoryExists, GlobalFileNames } from "../storage/disk" import { getAllExtensionState, @@ -328,9 +327,6 @@ export class Controller { vscode.env.openExternal(vscode.Uri.parse(message.url)) } break - case "openMention": - openMention(message.text) - break case "showAccountViewClicked": { await this.postMessageToWebview({ type: "action", action: "accountButtonClicked" }) break diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index d33ef015..4938f338 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -16,7 +16,6 @@ export interface WebviewMessage { | "reportBug" | "didShowAnnouncement" | "openInBrowser" - | "openMention" | "showChatView" | "refreshClineRules" | "openMcpSettings" diff --git a/src/shared/proto/file.ts b/src/shared/proto/file.ts index 85a7ed38..43c4b153 100644 --- a/src/shared/proto/file.ts +++ b/src/shared/proto/file.ts @@ -1514,6 +1514,15 @@ export const FileServiceDefinition = { responseStream: false, options: {}, }, + /** Opens a mention (file, path, git commit, problem, terminal, or URL) */ + openMention: { + name: "openMention", + requestType: StringRequest, + requestStream: false, + responseType: Empty, + responseStream: false, + options: {}, + }, /** Deletes a rule file from either global or workspace rules directory */ deleteRuleFile: { name: "deleteRuleFile", diff --git a/src/standalone/server-setup.ts b/src/standalone/server-setup.ts index 2fd89fdc..ef22135c 100644 --- a/src/standalone/server-setup.ts +++ b/src/standalone/server-setup.ts @@ -24,6 +24,7 @@ import { checkpointRestore } from "../core/controller/checkpoints/checkpointRest import { copyToClipboard } from "../core/controller/file/copyToClipboard" import { openFile } from "../core/controller/file/openFile" import { openImage } from "../core/controller/file/openImage" +import { openMention } from "../core/controller/file/openMention" import { deleteRuleFile } from "../core/controller/file/deleteRuleFile" import { createRuleFile } from "../core/controller/file/createRuleFile" import { searchCommits } from "../core/controller/file/searchCommits" @@ -118,6 +119,7 @@ export function addServices( copyToClipboard: wrapper(copyToClipboard, controller), openFile: wrapper(openFile, controller), openImage: wrapper(openImage, controller), + openMention: wrapper(openMention, controller), deleteRuleFile: wrapper(deleteRuleFile, controller), createRuleFile: wrapper(createRuleFile, controller), searchCommits: wrapper(searchCommits, controller), diff --git a/webview-ui/src/components/chat/TaskHeader.tsx b/webview-ui/src/components/chat/TaskHeader.tsx index baa9276f..5d8ba761 100644 --- a/webview-ui/src/components/chat/TaskHeader.tsx +++ b/webview-ui/src/components/chat/TaskHeader.tsx @@ -11,7 +11,7 @@ import Thumbnails from "@/components/common/Thumbnails" import { normalizeApiConfiguration } from "@/components/settings/ApiOptions" import { validateSlashCommand } from "@/utils/slash-commands" import TaskTimeline from "./TaskTimeline" -import { TaskServiceClient } from "@/services/grpc-client" +import { TaskServiceClient, FileServiceClient } from "@/services/grpc-client" import HeroTooltip from "@/components/common/HeroTooltip" interface TaskHeaderProps { @@ -597,7 +597,7 @@ export const highlightMentions = (text: string, withShadow = true) => { key={index} className={withShadow ? "mention-context-highlight-with-shadow" : "mention-context-highlight"} style={{ cursor: "pointer" }} - onClick={() => vscode.postMessage({ type: "openMention", text: part })}> + onClick={() => FileServiceClient.openMention({ value: part })}> @{part} ) From 1de02e9ab26a94b92988145a302967f4430f3230 Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Tue, 20 May 2025 17:47:06 -0700 Subject: [PATCH 22/85] Migrate silentlyRefreshMcpMarketplace protobus (#3628) * migrate silentlyRefreshMcpMarketplace * changeset --------- Co-authored-by: Elephant Lumps --- .changeset/six-carpets-teach.md | 5 + proto/mcp.proto | 26 + src/core/controller/index.ts | 52 +- src/core/controller/mcp/methods.ts | 2 + .../controller/mcp/refreshMcpMarketplace.ts | 27 ++ src/shared/WebviewMessage.ts | 1 - src/shared/proto/mcp.ts | 448 +++++++++++++++++- src/standalone/server-setup.ts | 2 + .../configuration/McpConfigurationView.tsx | 14 +- .../src/context/ExtensionStateContext.tsx | 2 + 10 files changed, 572 insertions(+), 7 deletions(-) create mode 100644 .changeset/six-carpets-teach.md create mode 100644 src/core/controller/mcp/refreshMcpMarketplace.ts diff --git a/.changeset/six-carpets-teach.md b/.changeset/six-carpets-teach.md new file mode 100644 index 00000000..7617ee65 --- /dev/null +++ b/.changeset/six-carpets-teach.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Migrate silentlyRefreshMcpMarketplace to protobus diff --git a/proto/mcp.proto b/proto/mcp.proto index 8cec7644..6b87bb69 100644 --- a/proto/mcp.proto +++ b/proto/mcp.proto @@ -14,6 +14,7 @@ service McpService { rpc restartMcpServer(StringRequest) returns (McpServers); rpc deleteMcpServer(StringRequest) returns (McpServers); rpc toggleToolAutoApprove(ToggleToolAutoApproveRequest) returns (McpServers); + rpc refreshMcpMarketplace(EmptyRequest) returns (McpMarketplaceCatalog); } message ToggleMcpServerRequest { @@ -85,3 +86,28 @@ message McpServer { message McpServers { repeated McpServer mcp_servers = 1; } + +message McpMarketplaceItem { + string mcp_id = 1; + string github_url = 2; + string name = 3; + string author = 4; + string description = 5; + string codicon_icon = 6; + string logo_url = 7; + string category = 8; + repeated string tags = 9; + bool requires_api_key = 10; + optional string readme_content = 11; + optional string llms_installation_content = 12; + bool is_recommended = 13; + int32 github_stars = 14; + int32 download_count = 15; + string created_at = 16; + string updated_at = 17; + string last_github_sync = 18; +} + +message McpMarketplaceCatalog { + repeated McpMarketplaceItem items = 1; +} diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index a77c677f..eb5f0ed6 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -346,10 +346,6 @@ export class Controller { await this.fetchMcpMarketplace(message.bool) break } - case "silentlyRefreshMcpMarketplace": { - await this.silentlyRefreshMcpMarketplace() - break - } // case "openMcpMarketplaceServerDetails": { // if (message.text) { // const response = await fetch(`https://api.cline.bot/v1/mcp/marketplace/item?mcpId=${message.mcpId}`) @@ -827,6 +823,40 @@ export class Controller { } } + private async fetchMcpMarketplaceFromApiRPC(silent: boolean = false): Promise { + try { + const response = await axios.get("https://api.cline.bot/v1/mcp/marketplace", { + headers: { + "Content-Type": "application/json", + }, + }) + + if (!response.data) { + throw new Error("Invalid response from MCP marketplace API") + } + + const catalog: McpMarketplaceCatalog = { + items: (response.data || []).map((item: any) => ({ + ...item, + githubStars: item.githubStars ?? 0, + downloadCount: item.downloadCount ?? 0, + tags: item.tags ?? [], + })), + } + + // Store in global state + await updateGlobalState(this.context, "mcpMarketplaceCatalog", catalog) + return catalog + } catch (error) { + console.error("Failed to fetch MCP marketplace:", error) + if (!silent) { + const errorMessage = error instanceof Error ? error.message : "Failed to fetch MCP marketplace" + throw new Error(errorMessage) + } + return undefined + } + } + async silentlyRefreshMcpMarketplace() { try { const catalog = await this.fetchMcpMarketplaceFromApi(true) @@ -841,6 +871,20 @@ export class Controller { } } + /** + * RPC variant that silently refreshes the MCP marketplace catalog and returns the result + * Unlike silentlyRefreshMcpMarketplace, this doesn't post a message to the webview + * @returns MCP marketplace catalog or undefined if refresh failed + */ + async silentlyRefreshMcpMarketplaceRPC() { + try { + return await this.fetchMcpMarketplaceFromApiRPC(true) + } catch (error) { + console.error("Failed to silently refresh MCP marketplace (RPC):", error) + return undefined + } + } + private async fetchMcpMarketplace(forceRefresh: boolean = false) { try { // Check if we have cached data diff --git a/src/core/controller/mcp/methods.ts b/src/core/controller/mcp/methods.ts index 175e88f8..3cdf6bb6 100644 --- a/src/core/controller/mcp/methods.ts +++ b/src/core/controller/mcp/methods.ts @@ -6,6 +6,7 @@ import { registerMethod } from "./index" import { addRemoteMcpServer } from "./addRemoteMcpServer" import { deleteMcpServer } from "./deleteMcpServer" import { downloadMcp } from "./downloadMcp" +import { refreshMcpMarketplace } from "./refreshMcpMarketplace" import { restartMcpServer } from "./restartMcpServer" import { toggleMcpServer } from "./toggleMcpServer" import { toggleToolAutoApprove } from "./toggleToolAutoApprove" @@ -17,6 +18,7 @@ export function registerAllMethods(): void { registerMethod("addRemoteMcpServer", addRemoteMcpServer) registerMethod("deleteMcpServer", deleteMcpServer) registerMethod("downloadMcp", downloadMcp) + registerMethod("refreshMcpMarketplace", refreshMcpMarketplace) registerMethod("restartMcpServer", restartMcpServer) registerMethod("toggleMcpServer", toggleMcpServer) registerMethod("toggleToolAutoApprove", toggleToolAutoApprove) diff --git a/src/core/controller/mcp/refreshMcpMarketplace.ts b/src/core/controller/mcp/refreshMcpMarketplace.ts new file mode 100644 index 00000000..ffd7cf1e --- /dev/null +++ b/src/core/controller/mcp/refreshMcpMarketplace.ts @@ -0,0 +1,27 @@ +import type { EmptyRequest } from "../../../shared/proto/common" +import type { McpMarketplaceCatalog } from "../../../shared/proto/mcp" +import type { Controller } from "../index" + +/** + * RPC handler that silently refreshes the MCP marketplace catalog + * @param controller Controller instance + * @param _request Empty request + * @returns MCP marketplace catalog + */ +export async function refreshMcpMarketplace(controller: Controller, _request: EmptyRequest): Promise { + try { + // Call the RPC variant which returns the result directly + const catalog = await controller.silentlyRefreshMcpMarketplaceRPC() + + if (catalog) { + // Types are structurally identical, use direct type assertion + return catalog as McpMarketplaceCatalog + } + + // Return empty catalog if nothing was fetched + return { items: [] } + } catch (error) { + console.error("Failed to refresh MCP marketplace:", error) + return { items: [] } + } +} diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 4938f338..f8cb73ef 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -26,7 +26,6 @@ export interface WebviewMessage { | "authStateChanged" | "authCallback" | "fetchMcpMarketplace" - | "silentlyRefreshMcpMarketplace" | "searchCommits" | "fetchLatestMcpServersFromHub" | "telemetrySetting" diff --git a/src/shared/proto/mcp.ts b/src/shared/proto/mcp.ts index d257b4e5..7b0f6620 100644 --- a/src/shared/proto/mcp.ts +++ b/src/shared/proto/mcp.ts @@ -6,7 +6,7 @@ /* eslint-disable */ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { Empty, Metadata, StringRequest } from "./common" +import { Empty, EmptyRequest, Metadata, StringRequest } from "./common" export const protobufPackage = "cline" @@ -115,6 +115,31 @@ export interface McpServers { mcpServers: McpServer[] } +export interface McpMarketplaceItem { + mcpId: string + githubUrl: string + name: string + author: string + description: string + codiconIcon: string + logoUrl: string + category: string + tags: string[] + requiresApiKey: boolean + readmeContent?: string | undefined + llmsInstallationContent?: string | undefined + isRecommended: boolean + githubStars: number + downloadCount: number + createdAt: string + updatedAt: string + lastGithubSync: string +} + +export interface McpMarketplaceCatalog { + items: McpMarketplaceItem[] +} + function createBaseToggleMcpServerRequest(): ToggleMcpServerRequest { return { metadata: undefined, serverName: "", disabled: false } } @@ -1091,6 +1116,419 @@ export const McpServers: MessageFns = { }, } +function createBaseMcpMarketplaceItem(): McpMarketplaceItem { + return { + mcpId: "", + githubUrl: "", + name: "", + author: "", + description: "", + codiconIcon: "", + logoUrl: "", + category: "", + tags: [], + requiresApiKey: false, + readmeContent: undefined, + llmsInstallationContent: undefined, + isRecommended: false, + githubStars: 0, + downloadCount: 0, + createdAt: "", + updatedAt: "", + lastGithubSync: "", + } +} + +export const McpMarketplaceItem: MessageFns = { + encode(message: McpMarketplaceItem, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.mcpId !== "") { + writer.uint32(10).string(message.mcpId) + } + if (message.githubUrl !== "") { + writer.uint32(18).string(message.githubUrl) + } + if (message.name !== "") { + writer.uint32(26).string(message.name) + } + if (message.author !== "") { + writer.uint32(34).string(message.author) + } + if (message.description !== "") { + writer.uint32(42).string(message.description) + } + if (message.codiconIcon !== "") { + writer.uint32(50).string(message.codiconIcon) + } + if (message.logoUrl !== "") { + writer.uint32(58).string(message.logoUrl) + } + if (message.category !== "") { + writer.uint32(66).string(message.category) + } + for (const v of message.tags) { + writer.uint32(74).string(v!) + } + if (message.requiresApiKey !== false) { + writer.uint32(80).bool(message.requiresApiKey) + } + if (message.readmeContent !== undefined) { + writer.uint32(90).string(message.readmeContent) + } + if (message.llmsInstallationContent !== undefined) { + writer.uint32(98).string(message.llmsInstallationContent) + } + if (message.isRecommended !== false) { + writer.uint32(104).bool(message.isRecommended) + } + if (message.githubStars !== 0) { + writer.uint32(112).int32(message.githubStars) + } + if (message.downloadCount !== 0) { + writer.uint32(120).int32(message.downloadCount) + } + if (message.createdAt !== "") { + writer.uint32(130).string(message.createdAt) + } + if (message.updatedAt !== "") { + writer.uint32(138).string(message.updatedAt) + } + if (message.lastGithubSync !== "") { + writer.uint32(146).string(message.lastGithubSync) + } + return writer + }, + + decode(input: BinaryReader | Uint8Array, length?: number): McpMarketplaceItem { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = createBaseMcpMarketplaceItem() + while (reader.pos < end) { + const tag = reader.uint32() + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break + } + + message.mcpId = reader.string() + continue + } + case 2: { + if (tag !== 18) { + break + } + + message.githubUrl = reader.string() + continue + } + case 3: { + if (tag !== 26) { + break + } + + message.name = reader.string() + continue + } + case 4: { + if (tag !== 34) { + break + } + + message.author = reader.string() + continue + } + case 5: { + if (tag !== 42) { + break + } + + message.description = reader.string() + continue + } + case 6: { + if (tag !== 50) { + break + } + + message.codiconIcon = reader.string() + continue + } + case 7: { + if (tag !== 58) { + break + } + + message.logoUrl = reader.string() + continue + } + case 8: { + if (tag !== 66) { + break + } + + message.category = reader.string() + continue + } + case 9: { + if (tag !== 74) { + break + } + + message.tags.push(reader.string()) + continue + } + case 10: { + if (tag !== 80) { + break + } + + message.requiresApiKey = reader.bool() + continue + } + case 11: { + if (tag !== 90) { + break + } + + message.readmeContent = reader.string() + continue + } + case 12: { + if (tag !== 98) { + break + } + + message.llmsInstallationContent = reader.string() + continue + } + case 13: { + if (tag !== 104) { + break + } + + message.isRecommended = reader.bool() + continue + } + case 14: { + if (tag !== 112) { + break + } + + message.githubStars = reader.int32() + continue + } + case 15: { + if (tag !== 120) { + break + } + + message.downloadCount = reader.int32() + continue + } + case 16: { + if (tag !== 130) { + break + } + + message.createdAt = reader.string() + continue + } + case 17: { + if (tag !== 138) { + break + } + + message.updatedAt = reader.string() + continue + } + case 18: { + if (tag !== 146) { + break + } + + message.lastGithubSync = reader.string() + continue + } + } + if ((tag & 7) === 4 || tag === 0) { + break + } + reader.skip(tag & 7) + } + return message + }, + + fromJSON(object: any): McpMarketplaceItem { + return { + mcpId: isSet(object.mcpId) ? globalThis.String(object.mcpId) : "", + githubUrl: isSet(object.githubUrl) ? globalThis.String(object.githubUrl) : "", + name: isSet(object.name) ? globalThis.String(object.name) : "", + author: isSet(object.author) ? globalThis.String(object.author) : "", + description: isSet(object.description) ? globalThis.String(object.description) : "", + codiconIcon: isSet(object.codiconIcon) ? globalThis.String(object.codiconIcon) : "", + logoUrl: isSet(object.logoUrl) ? globalThis.String(object.logoUrl) : "", + category: isSet(object.category) ? globalThis.String(object.category) : "", + tags: globalThis.Array.isArray(object?.tags) ? object.tags.map((e: any) => globalThis.String(e)) : [], + requiresApiKey: isSet(object.requiresApiKey) ? globalThis.Boolean(object.requiresApiKey) : false, + readmeContent: isSet(object.readmeContent) ? globalThis.String(object.readmeContent) : undefined, + llmsInstallationContent: isSet(object.llmsInstallationContent) + ? globalThis.String(object.llmsInstallationContent) + : undefined, + isRecommended: isSet(object.isRecommended) ? globalThis.Boolean(object.isRecommended) : false, + githubStars: isSet(object.githubStars) ? globalThis.Number(object.githubStars) : 0, + downloadCount: isSet(object.downloadCount) ? globalThis.Number(object.downloadCount) : 0, + createdAt: isSet(object.createdAt) ? globalThis.String(object.createdAt) : "", + updatedAt: isSet(object.updatedAt) ? globalThis.String(object.updatedAt) : "", + lastGithubSync: isSet(object.lastGithubSync) ? globalThis.String(object.lastGithubSync) : "", + } + }, + + toJSON(message: McpMarketplaceItem): unknown { + const obj: any = {} + if (message.mcpId !== "") { + obj.mcpId = message.mcpId + } + if (message.githubUrl !== "") { + obj.githubUrl = message.githubUrl + } + if (message.name !== "") { + obj.name = message.name + } + if (message.author !== "") { + obj.author = message.author + } + if (message.description !== "") { + obj.description = message.description + } + if (message.codiconIcon !== "") { + obj.codiconIcon = message.codiconIcon + } + if (message.logoUrl !== "") { + obj.logoUrl = message.logoUrl + } + if (message.category !== "") { + obj.category = message.category + } + if (message.tags?.length) { + obj.tags = message.tags + } + if (message.requiresApiKey !== false) { + obj.requiresApiKey = message.requiresApiKey + } + if (message.readmeContent !== undefined) { + obj.readmeContent = message.readmeContent + } + if (message.llmsInstallationContent !== undefined) { + obj.llmsInstallationContent = message.llmsInstallationContent + } + if (message.isRecommended !== false) { + obj.isRecommended = message.isRecommended + } + if (message.githubStars !== 0) { + obj.githubStars = Math.round(message.githubStars) + } + if (message.downloadCount !== 0) { + obj.downloadCount = Math.round(message.downloadCount) + } + if (message.createdAt !== "") { + obj.createdAt = message.createdAt + } + if (message.updatedAt !== "") { + obj.updatedAt = message.updatedAt + } + if (message.lastGithubSync !== "") { + obj.lastGithubSync = message.lastGithubSync + } + return obj + }, + + create, I>>(base?: I): McpMarketplaceItem { + return McpMarketplaceItem.fromPartial(base ?? ({} as any)) + }, + fromPartial, I>>(object: I): McpMarketplaceItem { + const message = createBaseMcpMarketplaceItem() + message.mcpId = object.mcpId ?? "" + message.githubUrl = object.githubUrl ?? "" + message.name = object.name ?? "" + message.author = object.author ?? "" + message.description = object.description ?? "" + message.codiconIcon = object.codiconIcon ?? "" + message.logoUrl = object.logoUrl ?? "" + message.category = object.category ?? "" + message.tags = object.tags?.map((e) => e) || [] + message.requiresApiKey = object.requiresApiKey ?? false + message.readmeContent = object.readmeContent ?? undefined + message.llmsInstallationContent = object.llmsInstallationContent ?? undefined + message.isRecommended = object.isRecommended ?? false + message.githubStars = object.githubStars ?? 0 + message.downloadCount = object.downloadCount ?? 0 + message.createdAt = object.createdAt ?? "" + message.updatedAt = object.updatedAt ?? "" + message.lastGithubSync = object.lastGithubSync ?? "" + return message + }, +} + +function createBaseMcpMarketplaceCatalog(): McpMarketplaceCatalog { + return { items: [] } +} + +export const McpMarketplaceCatalog: MessageFns = { + encode(message: McpMarketplaceCatalog, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + for (const v of message.items) { + McpMarketplaceItem.encode(v!, writer.uint32(10).fork()).join() + } + return writer + }, + + decode(input: BinaryReader | Uint8Array, length?: number): McpMarketplaceCatalog { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = createBaseMcpMarketplaceCatalog() + while (reader.pos < end) { + const tag = reader.uint32() + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break + } + + message.items.push(McpMarketplaceItem.decode(reader, reader.uint32())) + continue + } + } + if ((tag & 7) === 4 || tag === 0) { + break + } + reader.skip(tag & 7) + } + return message + }, + + fromJSON(object: any): McpMarketplaceCatalog { + return { + items: globalThis.Array.isArray(object?.items) ? object.items.map((e: any) => McpMarketplaceItem.fromJSON(e)) : [], + } + }, + + toJSON(message: McpMarketplaceCatalog): unknown { + const obj: any = {} + if (message.items?.length) { + obj.items = message.items.map((e) => McpMarketplaceItem.toJSON(e)) + } + return obj + }, + + create, I>>(base?: I): McpMarketplaceCatalog { + return McpMarketplaceCatalog.fromPartial(base ?? ({} as any)) + }, + fromPartial, I>>(object: I): McpMarketplaceCatalog { + const message = createBaseMcpMarketplaceCatalog() + message.items = object.items?.map((e) => McpMarketplaceItem.fromPartial(e)) || [] + return message + }, +} + export type McpServiceDefinition = typeof McpServiceDefinition export const McpServiceDefinition = { name: "McpService", @@ -1152,6 +1590,14 @@ export const McpServiceDefinition = { responseStream: false, options: {}, }, + refreshMcpMarketplace: { + name: "refreshMcpMarketplace", + requestType: EmptyRequest, + requestStream: false, + responseType: McpMarketplaceCatalog, + responseStream: false, + options: {}, + }, }, } as const diff --git a/src/standalone/server-setup.ts b/src/standalone/server-setup.ts index ef22135c..7be6af22 100644 --- a/src/standalone/server-setup.ts +++ b/src/standalone/server-setup.ts @@ -43,6 +43,7 @@ import { downloadMcp } from "../core/controller/mcp/downloadMcp" import { restartMcpServer } from "../core/controller/mcp/restartMcpServer" import { deleteMcpServer } from "../core/controller/mcp/deleteMcpServer" import { toggleToolAutoApprove } from "../core/controller/mcp/toggleToolAutoApprove" +import { refreshMcpMarketplace } from "../core/controller/mcp/refreshMcpMarketplace" // Models Service import { getOllamaModels } from "../core/controller/models/getOllamaModels" @@ -140,6 +141,7 @@ export function addServices( restartMcpServer: wrapper(restartMcpServer, controller), deleteMcpServer: wrapper(deleteMcpServer, controller), toggleToolAutoApprove: wrapper(toggleToolAutoApprove, controller), + refreshMcpMarketplace: wrapper(refreshMcpMarketplace, controller), }) // Models Service diff --git a/webview-ui/src/components/mcp/configuration/McpConfigurationView.tsx b/webview-ui/src/components/mcp/configuration/McpConfigurationView.tsx index c7396bbf..5b2a4b58 100644 --- a/webview-ui/src/components/mcp/configuration/McpConfigurationView.tsx +++ b/webview-ui/src/components/mcp/configuration/McpConfigurationView.tsx @@ -3,6 +3,7 @@ import { useEffect, useState } from "react" import styled from "styled-components" import { useExtensionState } from "@/context/ExtensionStateContext" import { vscode } from "@/utils/vscode" +import { McpServiceClient } from "@/services/grpc-client" import AddRemoteServerForm from "./tabs/add-server/AddRemoteServerForm" import McpMarketplaceView from "./tabs/marketplace/McpMarketplaceView" import InstalledServersView from "./tabs/installed/InstalledServersView" @@ -28,9 +29,20 @@ const McpConfigurationView = ({ onDone, initialTab }: McpViewProps) => { } }, [mcpMarketplaceEnabled, activeTab]) + // Get setter for MCP marketplace catalog from context + const { setMcpMarketplaceCatalog } = useExtensionState() + useEffect(() => { if (mcpMarketplaceEnabled) { - vscode.postMessage({ type: "silentlyRefreshMcpMarketplace" }) + McpServiceClient.refreshMcpMarketplace({}) + .then((response) => { + // Types are structurally identical, use response directly + setMcpMarketplaceCatalog(response) + }) + .catch((error) => { + console.error("Error refreshing MCP marketplace:", error) + }) + vscode.postMessage({ type: "fetchLatestMcpServersFromHub" }) } }, [mcpMarketplaceEnabled]) diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index c8f85a0d..5d54f751 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -55,6 +55,7 @@ interface ExtensionStateContextType extends ExtensionState { setLocalClineRulesToggles: (toggles: Record) => void setLocalCursorRulesToggles: (toggles: Record) => void setLocalWindsurfRulesToggles: (toggles: Record) => void + setMcpMarketplaceCatalog: (value: McpMarketplaceCatalog) => void // Navigation state setters setShowMcp: (value: boolean) => void @@ -500,6 +501,7 @@ export const ExtensionStateContextProvider: React.FC<{ shellIntegrationTimeout: value, })), setMcpServers: (mcpServers: McpServer[]) => setMcpServers(mcpServers), + setMcpMarketplaceCatalog: (catalog: McpMarketplaceCatalog) => setMcpMarketplaceCatalog(catalog), setShowMcp, closeMcpView, setChatSettings: (value) => { From b737911cdc8a65d2878b8151f2bf8129fdbe5e3b Mon Sep 17 00:00:00 2001 From: Ara Date: Wed, 21 May 2025 05:14:50 +0400 Subject: [PATCH 23/85] Fix: Temporary revert in protobus changes in toggle plan and act mode (#3683) * Fix: Temporary revert protobus changes for Toggle plan and act mode * Fix: Temporary revert protobus changes for Toggle plan and act mode --------- Co-authored-by: Cline Evaluation --- .changeset/nice-cobras-pretend.md | 5 +++++ src/core/controller/index.ts | 5 +++++ src/shared/WebviewMessage.ts | 1 + webview-ui/src/components/chat/ChatTextArea.tsx | 3 ++- webview-ui/src/components/settings/SettingsView.tsx | 3 ++- 5 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .changeset/nice-cobras-pretend.md diff --git a/.changeset/nice-cobras-pretend.md b/.changeset/nice-cobras-pretend.md new file mode 100644 index 00000000..8ef1e1ef --- /dev/null +++ b/.changeset/nice-cobras-pretend.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Fixing bug in toggle plan and act diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index eb5f0ed6..f40104c2 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -305,6 +305,11 @@ export class Controller { } } break + case "togglePlanActMode": + if (message.chatSettings) { + await this.togglePlanActModeWithChatSettings(message.chatSettings, message.chatContent) + } + break case "optionsResponse": await this.postMessageToWebview({ type: "invoke", diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index f8cb73ef..ac72e608 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -20,6 +20,7 @@ export interface WebviewMessage { | "refreshClineRules" | "openMcpSettings" | "autoApprovalSettings" + | "togglePlanActMode" | "openExtensionSettings" | "requestVsCodeLmModels" | "showAccountViewClicked" diff --git a/webview-ui/src/components/chat/ChatTextArea.tsx b/webview-ui/src/components/chat/ChatTextArea.tsx index c92f74f1..cd45c342 100644 --- a/webview-ui/src/components/chat/ChatTextArea.tsx +++ b/webview-ui/src/components/chat/ChatTextArea.tsx @@ -966,7 +966,8 @@ const ChatTextArea = forwardRef( } setTimeout(() => { const newMode = chatSettings.mode === "plan" ? "act" : "plan" - StateServiceClient.togglePlanActMode({ + vscode.postMessage({ + type: "togglePlanActMode", chatSettings: { mode: newMode, }, diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index 7d970208..4fdeffc5 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -115,7 +115,8 @@ const SettingsView = ({ onDone }: SettingsViewProps) => { switch (message.type) { case "didUpdateSettings": if (pendingTabChange) { - StateServiceClient.togglePlanActMode({ + vscode.postMessage({ + type: "togglePlanActMode", chatSettings: { mode: pendingTabChange, }, From 693880905106a7e193a8c3883976b833839a9d4b Mon Sep 17 00:00:00 2001 From: Ara Date: Wed, 21 May 2025 05:39:36 +0400 Subject: [PATCH 24/85] Fix: edge case of changing language in settings (#3681) * Fix: edge case of changing language in settings * Fix: Temporary revert protobus changes for Toggle plan and act mode --------- Co-authored-by: Cline Evaluation --- .changeset/five-bikes-impress.md | 5 +++++ package-lock.json | 4 ++-- webview-ui/src/components/chat/ChatTextArea.tsx | 2 ++ webview-ui/src/components/settings/SettingsView.tsx | 2 ++ 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .changeset/five-bikes-impress.md diff --git a/.changeset/five-bikes-impress.md b/.changeset/five-bikes-impress.md new file mode 100644 index 00000000..470dc207 --- /dev/null +++ b/.changeset/five-bikes-impress.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Fix edge case of changing language in settings diff --git a/package-lock.json b/package-lock.json index c44b69cf..e9178aa3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "claude-dev", - "version": "3.16.0", + "version": "3.16.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "claude-dev", - "version": "3.16.0", + "version": "3.16.1", "license": "Apache-2.0", "dependencies": { "@anthropic-ai/bedrock-sdk": "^0.12.4", diff --git a/webview-ui/src/components/chat/ChatTextArea.tsx b/webview-ui/src/components/chat/ChatTextArea.tsx index cd45c342..d3552c45 100644 --- a/webview-ui/src/components/chat/ChatTextArea.tsx +++ b/webview-ui/src/components/chat/ChatTextArea.tsx @@ -970,6 +970,8 @@ const ChatTextArea = forwardRef( type: "togglePlanActMode", chatSettings: { mode: newMode, + preferredLanguage: chatSettings.preferredLanguage, + openAIReasoningEffort: chatSettings.openAIReasoningEffort, }, chatContent: { message: inputValue.trim() ? inputValue : undefined, diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index 4fdeffc5..8f8397eb 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -119,6 +119,8 @@ const SettingsView = ({ onDone }: SettingsViewProps) => { type: "togglePlanActMode", chatSettings: { mode: pendingTabChange, + preferredLanguage: chatSettings.preferredLanguage, + openAIReasoningEffort: chatSettings.openAIReasoningEffort, }, }) setPendingTabChange(null) From debcbd537fe221ff6f3e7567323cd8e9bf838ac8 Mon Sep 17 00:00:00 2001 From: pashpashpash Date: Tue, 20 May 2025 18:40:44 -0700 Subject: [PATCH 25/85] Docs (#3682) * pr-review workflow * docs * at mentions * titles --------- Co-authored-by: Cline Evaluation --- .clinerules/workflows/pr-review.md | 351 ++++++++++++++++++ docs/docs.json | 13 +- docs/features/at-mentions/file-mentions.mdx | 45 +++ docs/features/at-mentions/folder-mentions.mdx | 58 +++ docs/features/at-mentions/git-mentions.mdx | 84 +++++ docs/features/at-mentions/overview.mdx | 108 ++++++ .../features/at-mentions/problem-mentions.mdx | 52 +++ .../at-mentions/terminal-mentions.mdx | 60 +++ docs/features/at-mentions/url-mentions.mdx | 65 ++++ .../plan-and-act.mdx} | 61 +-- docs/features/slash-commands/workflows.mdx | 128 ++++++- 11 files changed, 996 insertions(+), 29 deletions(-) create mode 100644 .clinerules/workflows/pr-review.md create mode 100644 docs/features/at-mentions/file-mentions.mdx create mode 100644 docs/features/at-mentions/folder-mentions.mdx create mode 100644 docs/features/at-mentions/git-mentions.mdx create mode 100644 docs/features/at-mentions/overview.mdx create mode 100644 docs/features/at-mentions/problem-mentions.mdx create mode 100644 docs/features/at-mentions/terminal-mentions.mdx create mode 100644 docs/features/at-mentions/url-mentions.mdx rename docs/{exploring-clines-tools/plan-and-act-modes-a-guide-to-effective-ai-development.mdx => features/plan-and-act.mdx} (63%) diff --git a/.clinerules/workflows/pr-review.md b/.clinerules/workflows/pr-review.md new file mode 100644 index 00000000..9b13bb65 --- /dev/null +++ b/.clinerules/workflows/pr-review.md @@ -0,0 +1,351 @@ +You have access to the `gh` terminal command. I already authenticated it for you. Please review it to use the PR that I asked you to review. You're already in the `cline` repo. + + +# GitHub PR Review Process - Detailed Sequence of Steps + +## 1. Gather PR Information +1. Get the PR title, description, and comments: + ```bash + gh pr view --json title,body,comments + ``` + +2. Get the full diff of the PR: + ```bash + gh pr diff + ``` + +## 2. Understand the Context +1. Identify which files were modified in the PR: + ```bash + gh pr view --json files + ``` + +2. Examine the original files in the main branch to understand the context: + ```xml + + path/to/file + + ``` + +3. For specific sections of a file, you can use search_files: + ```xml + + path/to/directory + search term + *.ts + + ``` + +## 3. Analyze the Changes +1. For each modified file, understand: + - What was changed + - Why it was changed (based on PR description) + - How it affects the codebase + - Potential side effects + +2. Look for: + - Code quality issues + - Potential bugs + - Performance implications + - Security concerns + - Test coverage + +## 4. Ask for User Confirmation +1. Before making a decision, ask the user if you should approve the PR, providing your assessment and justification: + ```xml + + Based on my review of PR #, I recommend [approving/requesting changes]. Here's my justification: + + [Detailed justification with key points about the PR quality, implementation, and any concerns] + + Would you like me to proceed with this recommendation? + ["Yes, approve the PR", "Yes, request changes", "No, I'd like to discuss further"] + + ``` + +## 5. Ask if User Wants a Comment Drafted +1. After the user decides on approval/rejection, ask if they would like a comment drafted: + ```xml + + Would you like me to draft a comment for this PR that you can copy and paste? + ["Yes, please draft a comment", "No, I'll handle the comment myself"] + + ``` + +2. If the user wants a comment drafted, provide a well-structured comment they can copy: + ``` + Thank you for this PR! Here's my assessment: + + [Detailed assessment with key points about the PR quality, implementation, and any suggestions] + + [Include specific feedback on code quality, functionality, and testing] + ``` + +## 6. Make a Decision +1. Approve the PR if it meets quality standards: + ```bash + # For single-line comments: + gh pr review --approve --body "Your approval message" + + # For multi-line comments with proper whitespace formatting: + cat << EOF | gh pr review --approve --body-file - + Thanks @username for this PR! The implementation looks good. + + I particularly like how you've handled X and Y. + + Great work! + EOF + ``` + +2. Request changes if improvements are needed: + ```bash + # For single-line comments: + gh pr review --request-changes --body "Your feedback message" + + # For multi-line comments with proper whitespace formatting: + cat << EOF | gh pr review --request-changes --body-file - + Thanks @username for this PR! + + The implementation looks promising, but there are a few things to address: + + 1. Issue one + 2. Issue two + + Please make these changes and we can merge this. + EOF + ``` + + Note: The `cat << EOF | ... --body-file -` approach preserves all whitespace and formatting without requiring temporary files. The `-` parameter tells the command to read from standard input. + + + +# Example PR Review Process + +Let's walk through a real example of reviewing PR #3627 which fixes the thinking mode calculation for Claude 3.7 models. + +## Step 1: Gather PR Information + +```bash +# Get PR details +gh pr view 3627 --json title,body,comments + +# Get the full diff +gh pr diff 3627 +``` + +## Step 2: Understand the Context + +```xml +# Examine the original files to understand what's being changed + +src/shared/api.ts + + +# Look at the ThinkingBudgetSlider component implementation + +webview-ui/src/components/settings/ThinkingBudgetSlider.tsx + + +# Check how thinking mode is currently handled in API providers + +src/api/providers +reasoningOn +*.ts + +``` + +## Step 3: Analyze the Changes + +From the PR information and code examination, we can see that: + +1. The PR fixes an issue with the thinking mode budget calculation for Claude 3.7 models +2. Currently, the thinking budget is incorrectly calculated as 80% of maxTokens (8192), resulting in 6553 tokens +3. Claude 3.7 actually supports a much larger thinking budget (up to 64000 tokens) +4. The PR adds a `thinkingConfig` property with `maxBudget: 64000` to model definitions +5. It updates API handlers to use this value when reasoning mode is enabled +6. It enhances the slider component to calculate max values based on model-specific percentages +7. Comprehensive tests were added to verify the calculations + +## Step 4: Ask for User Confirmation + +```xml + +Based on my review of PR #3627, I recommend approving this PR. Here's my justification: + +1. The PR correctly fixes the thinking mode budget calculation for Claude 3.7 models +2. It properly implements the thinkingConfig.maxBudget property (64000) for Claude 3.7 models +3. It applies the appropriate percentage (50%) for the slider calculation +4. The changes are well-tested with comprehensive unit tests +5. The implementation is clean and follows the project's coding standards +6. The PR includes helpful screenshots demonstrating the fix + +Would you like me to proceed with approving this PR? +["Yes, approve the PR", "No, I'd like to discuss further", "Let me review it myself first"] + +``` + +## Step 5: Ask if User Wants a Comment Drafted + +```xml + +Would you like me to draft a comment for this PR that you can copy and paste? +["Yes, please draft a comment", "No, I'll handle the comment myself"] + +``` + +## Step 6: Make a Decision + +```bash +# Option 1: Simple one-line comment +gh pr review 3627 --approve --body "This PR looks good! It correctly fixes the thinking mode budget calculation for Claude 3.7 models." + +# Option 2: Multi-line comment with proper whitespace formatting +cat << EOF | gh pr review 3627 --approve --body-file - +This PR looks good! It correctly fixes the thinking mode budget calculation for Claude 3.7 models. + +I particularly like: +1. The proper implementation of thinkingConfig.maxBudget property (64000) +2. The appropriate percentage (50%) for the slider calculation +3. The comprehensive unit tests +4. The clean implementation that follows project coding standards + +Great work! +EOF +``` + + + +# Common GitHub CLI Commands for PR Review + +## Basic PR Commands +```bash +# List open PRs +gh pr list + +# View a specific PR +gh pr view + +# View PR with specific fields +gh pr view --json title,body,comments,files,commits + +# Check PR status +gh pr status +``` + +## Diff and File Commands +```bash +# Get the full diff of a PR +gh pr diff + +# List files changed in a PR +gh pr view --json files + +# Check out a PR locally +gh pr checkout +``` + +## Review Commands +```bash +# Approve a PR (single-line comment) +gh pr review --approve --body "Your approval message" + +# Approve a PR (multi-line comment with proper whitespace) +cat << EOF | gh pr review --approve --body-file - +Your multi-line +approval message with + +proper whitespace formatting +EOF + +# Request changes on a PR (single-line comment) +gh pr review --request-changes --body "Your feedback message" + +# Request changes on a PR (multi-line comment with proper whitespace) +cat << EOF | gh pr review --request-changes --body-file - +Your multi-line +change request with + +proper whitespace formatting +EOF + +# Add a comment review (without approval/rejection) +gh pr review --comment --body "Your comment message" + +# Add a comment review with proper whitespace +cat << EOF | gh pr review --comment --body-file - +Your multi-line +comment with + +proper whitespace formatting +EOF +``` + +## Additional Commands +```bash +# View PR checks status +gh pr checks + +# View PR commits +gh pr view --json commits + +# Merge a PR (if you have permission) +gh pr merge --merge +``` + + + +When reviewing a PR, please talk normally and like a friendly reviwer. You should keep it short, and start out by thanking the author of the pr and @ mentioning them. + +Whether or not you approve the PR, you should then give a quick summary of the changes without being too verbose or definitive, staying humble like that this is your understanding of the changes. Kind of how I'm talking to you right now. + +If you have any suggestions, or things that need to be changed, request changes instead of approving the PR. + +Leaving inline comments in code is good, but only do so if you have something specific to say about the code. And make sure you leave those comments first, and then request changes in the PR with a short comment explaining the overall theme of what you're asking them to change. + + + + +Looks good, though we should make this generic for all providers & models at some point + + +Will this work for models that may not match across OR/Gemini? Like the thinking models? + + +This looks great! I like how you've handled the global endpoint support - adding it to the ModelInfo interface makes total sense since it's just another capability flag, similar to how we handle other model features. + +The filtered model list approach is clean and will be easier to maintain than hardcoding which models work with global endpoints. And bumping the genai library was obviously needed for this to work. + +Thanks for adding the docs about the limitations too - good for users to know they can't use context caches with global endpoints but might get fewer 429 errors. + + +This is awesome. Thanks @scottsus. + +My main concern though - does this work for all the possible VS Code themes? We struggled with this initially which is why it's not super styled currently. Please test and share screenshots with the different themes to make sure before we can merge + + +Hey, the PR looks good overall but I'm concerned about removing those timeouts. Those were probably there for a reason - VSCode's UI can be finicky with timing. + +Could you add back the timeouts after focusing the sidebar? Something like: + +```typescript +await vscode.commands.executeCommand("claude-dev.SidebarProvider.focus") +await setTimeoutPromise(100) // Give UI time to update +visibleWebview = WebviewProvider.getSidebarInstance() +``` + + +Heya @alejandropta thanks for working on this! + +A few notes: +1 - Adding additional info to the environment variables is fairly problematic because env variables get appended to **every single message**. I don't think this is justifiable for a somewhat niche use case. +2 - Adding this option to settings to include that could be an option, but we want our options to be simple and straightforward for new users +3 - We're working on revisualizing the way our settings page is displayed/organized, and this could potentially be reconciled once that is in and our settings page is more clearly delineated. + +So until the settings page is update, and this is added to settings in a way that's clean and doesn't confuse new users, I don't think we can merge this. Please bear with us. + + +Also, don't forget to add a changeset since this fixes a user-facing bug. + +The architectural change is solid - moving the focus logic to the command handlers makes sense. Just don't want to introduce subtle timing issues by removing those timeouts. + + diff --git a/docs/docs.json b/docs/docs.json index 4ae24579..a001816d 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -74,6 +74,7 @@ { "group": "Features", "pages": [ + "features/plan-and-act", "features/cline-rules", "features/slash-commands/workflows", { @@ -84,6 +85,17 @@ "features/slash-commands/smol", "features/slash-commands/report-bug" ] + }, + { + "group": "@ Mentions", + "pages": [ + "features/at-mentions/overview", + "features/at-mentions/file-mentions", + "features/at-mentions/terminal-mentions", + "features/at-mentions/problem-mentions", + "features/at-mentions/git-mentions", + "features/at-mentions/url-mentions" + ] } ] }, @@ -91,7 +103,6 @@ "group": "Exploring Cline's Tools", "pages": [ "exploring-clines-tools/cline-tools-guide", - "exploring-clines-tools/plan-and-act-modes-a-guide-to-effective-ai-development", "exploring-clines-tools/checkpoints", "exploring-clines-tools/new-task-tool", "exploring-clines-tools/remote-browser-support", diff --git a/docs/features/at-mentions/file-mentions.mdx b/docs/features/at-mentions/file-mentions.mdx new file mode 100644 index 00000000..907bfde8 --- /dev/null +++ b/docs/features/at-mentions/file-mentions.mdx @@ -0,0 +1,45 @@ +--- +title: "File Mentions" +sidebarTitle: "File Mentions" +--- + +File mentions let you pull any file from your workspace directly into your conversation with Cline. No more copying and pasting code snippets - just type `@/` and point to the file you need help with. + +When you type `@/` in the chat, Cline shows your workspace files. Navigate through folders, select the file you want, and it's instantly available to Cline - complete with all imports, related functions, and surrounding context. + +I use file mentions constantly when debugging. Instead of trying to figure out which parts of my code to copy over, I just reference the file directly: + +``` +I'm getting this error when my form submits: @terminal + +Here's my component: @/src/components/ContactForm.jsx + +And the API endpoint: @/src/api/contact.js + +What am I missing? +``` + +This gives Cline everything it needs - the error message, the component code, and the API endpoint - all without me having to copy anything. Cline can see imports, dependencies, and all the surrounding context that might be causing the issue. + +File mentions shine when you're dealing with complex bugs that span multiple files. Before, I'd have to carefully copy each relevant file, making sure I didn't miss anything important. Now I just reference each file with `@/` and Cline gets the complete picture. + +Next time you're stuck on a problem, try using file mentions instead of copying code. You'll save time and get better answers because Cline has all the context it needs. + +## How It Works Under the Hood + +When you use a file mention in your message, here's what happens behind the scenes: + +1. When you send your message, Cline detects the `@/path/to/file` pattern in your text +2. The extension resolves the file path relative to your workspace root +3. It checks if the file is binary (like an image) or text-based +4. For text files, it reads the complete file content +5. The file content is appended to your message in a structured format: + ``` + + [Complete file content] + + ``` +6. This enhanced message with the embedded file content is sent to the AI +7. The AI can now "see" the complete file content as if you had copied and pasted it + +This seamless process happens automatically whenever you use a file mention, giving the AI full context without you having to manually copy anything. diff --git a/docs/features/at-mentions/folder-mentions.mdx b/docs/features/at-mentions/folder-mentions.mdx new file mode 100644 index 00000000..41187f2e --- /dev/null +++ b/docs/features/at-mentions/folder-mentions.mdx @@ -0,0 +1,58 @@ +--- +title: "Folder Mentions" +sidebarTitle: "Folder Mentions" +--- + +Folder mentions let you bring entire directories into your conversation with Cline. Just type `@/` followed by a folder path ending with a slash, and Cline gets access to the folder structure and its contents. + +When you type `@/` in chat, Cline shows your workspace files and folders. Navigate to the folder you want, make sure to include the trailing slash, and Cline will see the folder's structure and contents. + +I use folder mentions when I need help understanding or refactoring a whole section of my codebase. Instead of referencing individual files one by one, I can just point to the entire directory: + +``` +I'm trying to understand how the authentication flow works in my app. +Can you explain the structure and relationships between the files in @/src/auth/? +``` + +Cline can then see all the files in the auth directory, their contents, and how they relate to each other. This gives it the full context to explain complex interactions between multiple files. + +Folder mentions are also perfect for getting help with project organization. When I'm unsure if my project structure makes sense, I'll ask Cline to review it: + +``` +I'm setting up a new React project. Does this folder structure make sense? @/src/ +What would you change to make it more maintainable as the project grows? +``` + +Next time you're working with multiple related files, try using folder mentions instead of referencing each file individually. You'll get more comprehensive help because Cline can see the bigger picture of how everything fits together. + +## How It Works Under the Hood + +When you use a folder mention in your message, here's what happens behind the scenes: + +1. When you send your message, Cline detects the `@/path/to/folder/` pattern (with trailing slash) in your text +2. The extension resolves the folder path relative to your workspace root +3. It calls `fs.readdir()` to get a list of all files and subdirectories in that folder +4. For each file in the directory, it checks if it's binary or text-based +5. For text files, it extracts the complete content +6. The folder structure and file contents are appended to your message in a structured format: + + ``` + + ├── file1.txt + ├── file2.js + └── subfolder/ + + + [File content] + + + + [File content] + + + ``` + +7. This enhanced message with the embedded folder structure and file contents is sent to the AI +8. The AI can now "see" both the directory structure and the content of files within that directory + +This process happens automatically whenever you use a folder mention, giving the AI a comprehensive view of your project structure and file contents. diff --git a/docs/features/at-mentions/git-mentions.mdx b/docs/features/at-mentions/git-mentions.mdx new file mode 100644 index 00000000..cf2ef199 --- /dev/null +++ b/docs/features/at-mentions/git-mentions.mdx @@ -0,0 +1,84 @@ +--- +title: "Git Mentions" +sidebarTitle: "Git Mentions" +--- + +Git mentions let you bring your repository's history and changes directly into your conversation with Cline. You can reference uncommitted changes with `@git-changes` or specific commits with `@[commit-hash]`. + +When you type `@` in chat, you can select "Git Changes" from the menu or type `@git-changes` directly. For specific commits, type `@` followed by the commit hash (at least 7 characters). Cline will immediately see the git status, diffs, commit messages, and other relevant information. + +I use git mentions constantly when I'm trying to understand code changes or troubleshoot issues introduced by recent commits. Instead of trying to copy and paste diffs or commit logs, I just ask: + +``` +I think this commit broke our authentication flow: @a1b2c3d + +Can you explain what changed and why it might be causing the issue? +``` + +This gives Cline the complete commit information, including the commit message, author, date, and the full diff. Cline can then analyze exactly what changed and how it might affect other parts of the codebase. + +The `@git-changes` mention is perfect when you're working on changes and want feedback before committing: + +``` +Here are my current changes: @git-changes + +I'm trying to implement a new feature for user profiles. Does my approach make sense? +Are there any potential issues or improvements you'd suggest? +``` + +This shows Cline all your uncommitted changes, including new files, modified files, and their diffs. Cline can then review your changes and provide feedback on your implementation. + +Git mentions are especially powerful when combined with file mentions. When I'm investigating a bug, I'll often reference both: + +``` +I think this commit introduced a bug: @a1b2c3d + +Here's the current implementation: @/src/components/Auth.jsx + +How can I fix the issue while preserving the intended functionality? +``` + +Next time you're working with code changes or investigating issues, try using git mentions instead of manually describing or copying changes. You'll get more accurate help because Cline can see exactly what changed and in what context. + +## How It Works Under the Hood + +When you use git mentions in your message, here's what happens behind the scenes: + +### For Git Changes (`@git-changes`) + +1. When you send your message, Cline detects the `@git-changes` pattern in your text +2. The extension runs git commands to get the current working state of your repository +3. It captures the output of `git status` and `git diff` to see all uncommitted changes +4. This information is appended to your message in a structured format: + + ``` + + On branch main + Changes not staged for commit: + modified: src/components/Button.jsx + modified: src/styles/main.css + + [Complete diff output with all changes] + + ``` + +### For Specific Commits (`@[commit-hash]`) + +1. When you send your message, Cline detects the `@` followed by a commit hash pattern +2. The extension runs `git show` and related commands to get information about that commit +3. It retrieves the commit message, author, date, and the complete diff +4. This information is appended to your message in a structured format: + + ``` + + commit a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t + Author: Developer Name + Date: Mon May 20 14:30:45 2025 -0700 + + Fix authentication bug in login form + + [Complete diff output showing all changes in the commit] + + ``` + +This process happens automatically whenever you use git mentions, giving the AI complete visibility into your code changes without you having to copy and paste diffs or commit logs. diff --git a/docs/features/at-mentions/overview.mdx b/docs/features/at-mentions/overview.mdx new file mode 100644 index 00000000..7848dab0 --- /dev/null +++ b/docs/features/at-mentions/overview.mdx @@ -0,0 +1,108 @@ +--- +title: "@ MentionsOverview" +sidebarTitle: "Overview" +--- + +@ mentions are one of Cline's most powerful features, letting you seamlessly bring external context into your conversations. Instead of copying and pasting code, error messages, or documentation, you can simply reference them with an @ symbol. + + + @ Mentions Overview + + +When you type `@` in the chat input, Cline shows a menu of available mention types. These mentions let you reference files, folders, problems, terminal output, git changes, and even web content directly in your conversations. + +## Available @ Mentions + +Cline supports several types of @ mentions, each designed to bring different kinds of context into your conversations: + + + Reference any file in your workspace with `@/path/to/file`. Cline sees the complete file content, including imports, related + functions, and surrounding context. + + + + Reference entire directories with `@/path/to/folder/`. Cline sees the folder structure and all file contents, perfect for + understanding complex interactions between multiple files. + + + + Use `@problems` to show Cline all the errors and warnings in your workspace. Cline sees the complete list with file locations + and error messages. + + + + Use `@terminal` to share your recent terminal output. Cline sees the complete output with formatting preserved, perfect for + debugging build errors or test failures. + + + + Reference uncommitted changes with `@git-changes` or specific commits with `@[commit-hash]`. Cline sees the complete diff, + commit message, and other relevant information. + + + + Reference web content with `@https://example.com`. Cline fetches and sees the complete webpage content, perfect for + referencing documentation or GitHub issues. + + +## Why @ Mentions Matter + +@ mentions transform how you interact with Cline by: + +1. **Eliminating copy-paste**: No more copying and pasting code, error messages, or terminal output. Just reference them directly. + +2. **Preserving context**: Cline sees the complete context, including imports, related functions, and surrounding code that might be relevant. + +3. **Maintaining formatting**: Terminal output, error messages, and web content keep their formatting, making them easier to understand. + +4. **Enabling complex workflows**: Combine multiple @ mentions to give Cline a complete picture of your problem: + + ``` + I'm getting these errors: @problems + + Here's my component: @/src/components/Form.jsx + And the API endpoint: @/src/api/users.js + + The error happens when I submit: @terminal + + I think this commit might have caused it: @a1b2c3d + ``` + +## Getting Started + +To use @ mentions: + +1. Type `@` in the chat input +2. Select the type of mention from the menu or continue typing +3. For files and folders, navigate through your workspace structure +4. Send your message as usual + +Cline will automatically process the mentions and include the referenced content in the context sent to the AI. + +Try using @ mentions in your next conversation with Cline - you'll be amazed at how much more efficient and effective your interactions become when you can seamlessly bring in external context. + +## How It Works Under the Hood + +When you use @ mentions in your messages, there's a sophisticated process happening behind the scenes: + +1. **Detection**: When you send a message, Cline scans the text for @ mention patterns using regular expressions +2. **Processing**: For each detected mention, Cline: + - Determines the mention type (file, folder, problems, terminal, git, URL) + - Fetches the relevant content (file contents, terminal output, etc.) + - Formats the content appropriately +3. **Enhancement**: The original message is enhanced with structured data: + + ``` + Your original message with @/path/to/file + + + [Complete file content] + + ``` + +4. **Context Inclusion**: This enhanced message with all the embedded content is sent to the AI model +5. **Seamless Response**: The AI can now "see" all the referenced content as if you had manually copied and pasted it + +This entire process happens automatically and seamlessly whenever you use @ mentions, giving the AI complete context without you having to manually copy anything. + +Each type of @ mention has its own specific implementation details, which you can find in their respective documentation pages. diff --git a/docs/features/at-mentions/problem-mentions.mdx b/docs/features/at-mentions/problem-mentions.mdx new file mode 100644 index 00000000..bb857710 --- /dev/null +++ b/docs/features/at-mentions/problem-mentions.mdx @@ -0,0 +1,52 @@ +--- +title: "Problem Mentions" +sidebarTitle: "Problem Mentions" +--- + +The problems mention gives Cline instant access to all the errors and warnings in your workspace. Just type `@problems` and Cline can see every diagnostic issue VSCode has detected. + +When you type `@` in chat, select "Problems" from the menu or just type `@problems` directly. Cline will immediately see all the errors and warnings from your workspace, complete with file locations and error messages. + +I use the problems mention constantly when I'm stuck on build errors or TypeScript issues. Instead of trying to describe the errors or copy them one by one, I just ask: + +``` +I'm getting these TypeScript errors and I'm not sure how to fix them: @problems + +Can you help me understand what's wrong and how to fix it? +``` + +This gives Cline the complete list of errors with their exact locations and messages. Cline can then analyze the patterns across multiple errors and suggest comprehensive solutions. + +The problems mention is especially powerful when combined with file mentions. When I'm dealing with complex type errors, I'll reference both: + +``` +I'm getting these type errors: @problems + +Here's my component: @/src/components/DataTable.tsx +And the types file: @/src/types/api.ts + +How can I fix these issues? +``` + +This approach gives Cline everything it needs - the exact errors, the component code, and the type definitions - all without me having to copy anything manually. + +Next time you're stuck on errors, try using `@problems` instead of copying error messages. You'll get more accurate help because Cline can see the complete error context and locations. + +## How It Works Under the Hood + +When you use the problems mention in your message, here's what happens behind the scenes: + +1. When you send your message, Cline detects the `@problems` pattern in your text +2. The extension calls VSCode's built-in `vscode.languages.getDiagnostics()` API to get all errors and warnings +3. It formats these diagnostics into a structured text representation with file paths, line numbers, and error messages +4. The formatted problems list is appended to your message in a structured format: + ``` + + /path/to/file.js:10:5 - error TS2322: Type 'string' is not assignable to type 'number'. + /path/to/file.js:15:3 - warning: This variable is never used. + + ``` +5. This enhanced message with the embedded diagnostics is sent to the AI +6. The AI can now "see" all the errors and warnings in your workspace, complete with their locations and messages + +This process happens automatically whenever you use the problems mention, giving the AI a comprehensive view of all the issues in your workspace without you having to copy them manually. diff --git a/docs/features/at-mentions/terminal-mentions.mdx b/docs/features/at-mentions/terminal-mentions.mdx new file mode 100644 index 00000000..b80b4d13 --- /dev/null +++ b/docs/features/at-mentions/terminal-mentions.mdx @@ -0,0 +1,60 @@ +--- +title: "Terminal Mentions" +sidebarTitle: "Terminal Mentions" +--- + +The terminal mention lets you bring your terminal output directly into your conversation with Cline. Just type `@terminal` and Cline can see the recent output from your terminal. + +When you type `@` in chat, select "Terminal" from the menu or just type `@terminal` directly. Cline will immediately see the recent output from your active terminal, including error messages, build logs, or command results. + +I use the terminal mention all the time when I'm dealing with build errors, test failures, or debugging output. Instead of trying to copy and paste terminal output (which often loses formatting), I just ask: + +``` +I'm getting this error when running my tests: @terminal + +What's causing this and how can I fix it? +``` + +This gives Cline the complete terminal output with all its formatting intact. Cline can then analyze the error messages, stack traces, and surrounding context to provide more accurate help. + +The terminal mention is especially powerful when combined with file mentions. When I'm debugging a failed API call, I'll reference both: + +``` +I'm getting this error when calling my API: @terminal + +Here's my API client code: @/src/api/client.js +And the endpoint implementation: @/src/server/routes/users.js + +What am I doing wrong? +``` + +This approach gives Cline everything it needs - the exact error output, the client code, and the server implementation - all without me having to copy anything manually. + +Next time you're running into issues with command output or build errors, try using `@terminal` instead of copying the output. You'll get more accurate help because Cline can see the complete terminal context with proper formatting. + +## How It Works Under the Hood + +When you use the terminal mention in your message, here's what happens behind the scenes: + +1. When you send your message, Cline detects the `@terminal` pattern in your text +2. The extension calls `getLatestTerminalOutput()` which accesses VSCode's terminal API +3. It captures the recent output buffer from your active terminal +4. The terminal output is appended to your message in a structured format: + + ``` + + $ npm run test + > project@1.0.0 test + > jest + + FAIL src/components/__tests__/Button.test.js + ● Button component › renders correctly + + [Complete terminal output with formatting preserved] + + ``` + +5. This enhanced message with the embedded terminal output is sent to the AI +6. The AI can now "see" the complete terminal output with all formatting preserved + +This process happens automatically whenever you use the terminal mention, giving the AI access to your command results, error messages, and other terminal output without you having to copy it manually. diff --git a/docs/features/at-mentions/url-mentions.mdx b/docs/features/at-mentions/url-mentions.mdx new file mode 100644 index 00000000..5a4321d2 --- /dev/null +++ b/docs/features/at-mentions/url-mentions.mdx @@ -0,0 +1,65 @@ +--- +title: "URL Mentions" +sidebarTitle: "URL Mentions" +--- + +URL mentions let you bring web content directly into your conversation with Cline. Just type `@` followed by any URL, and Cline can see the content of that webpage without you having to copy and paste anything. + +When you type `@` in chat followed by a URL (like `@https://example.com`), Cline will fetch the content of that webpage and include it in the context. This works for documentation pages, GitHub issues, Stack Overflow questions, or any other web content you want to reference. + +I use URL mentions constantly when I'm working with external APIs or libraries. Instead of trying to explain how an API works or copying documentation snippets, I just reference the docs directly: + +``` +I'm trying to implement authentication with this API: @https://api.example.com/docs/auth + +Can you help me write the code to get an access token based on these docs? +``` + +This gives Cline the complete documentation page, so it can see all the authentication requirements, endpoints, parameters, and examples. Cline can then provide more accurate and comprehensive help based on the official documentation. + +URL mentions are especially useful for referencing GitHub issues or discussions: + +``` +I'm trying to fix this issue in our project: @https://github.com/our-org/our-repo/issues/123 + +Here's my current implementation: @/src/components/Feature.jsx + +What changes do I need to make to address the issue? +``` + +This shows Cline the complete GitHub issue, including the description, comments, and any code snippets or screenshots. Cline can then help you implement a solution that directly addresses the reported issue. + +Next time you're working with external documentation or online resources, try using URL mentions instead of copying and pasting content. You'll get more accurate help because Cline can see the complete context of the webpage, including formatting, code examples, and surrounding information. + +## How It Works Under the Hood + +When you use a URL mention in your message, here's what happens behind the scenes: + +1. When you send your message, Cline detects the `@http://...` or `@https://...` pattern in your text +2. The extension launches a headless browser (Puppeteer) in the background +3. It navigates to the URL and waits for the page to load completely +4. The browser captures the page content, including text, formatting, and code examples +5. The content is converted to a Markdown format that preserves the structure +6. This content is appended to your message in a structured format: + + ``` + + # Example API Documentation + + ## Authentication + + To authenticate with the API, you need to... + + const token = await api.authenticate({ + username: 'user', + password: 'pass' + }); + + [Complete webpage content in Markdown format] + + ``` + +7. The browser is then closed to free up resources +8. This enhanced message with the embedded webpage content is sent to the AI + +This process happens automatically whenever you use a URL mention, giving the AI access to the complete content of the webpage without you having to copy and paste anything. diff --git a/docs/exploring-clines-tools/plan-and-act-modes-a-guide-to-effective-ai-development.mdx b/docs/features/plan-and-act.mdx similarity index 63% rename from docs/exploring-clines-tools/plan-and-act-modes-a-guide-to-effective-ai-development.mdx rename to docs/features/plan-and-act.mdx index 4a2fc3d9..d258e9c6 100644 --- a/docs/exploring-clines-tools/plan-and-act-modes-a-guide-to-effective-ai-development.mdx +++ b/docs/features/plan-and-act.mdx @@ -1,9 +1,8 @@ --- -title: "Plan & Act Modes: A Guide to Effective AI Development" +title: "Plan & Act" +sidebarTitle: "Plan & Act" --- -## Overview - Plan & Act modes represent Cline's approach to structured AI development, emphasizing thoughtful planning before implementation. This dual-mode system helps developers create more maintainable, accurate code while reducing iteration time. @@ -13,21 +12,23 @@ Plan & Act modes represent Cline's approach to structured AI development, emphas /> -### Understanding the Modes +#### Plan Mode: Think First -#### Plan Mode +Plan mode is where you and Cline figure out what you're trying to build and how you'll build it. In this mode, Cline: -- Optimized for context gathering and strategy -- Cannot make changes to your codebase -- Focused on understanding requirements and creating implementation plans -- Enables full file reading for comprehensive project understanding +- Can read your entire codebase to understand the context +- Won't make any changes to your files +- Focuses on understanding requirements and creating a strategy +- Helps identify potential issues before you write a single line of code -#### Act Mode +#### Act Mode: Build It -- Streamlined for implementation based on established plans -- Has access to all of Cline's building capabilities -- Maintains context from the planning phase -- Can execute changes to your codebase +Once you've got a plan, you switch to Act mode. Now Cline: + +- Has all the building capabilities at its disposal +- Can make changes to your codebase +- Still remembers everything from your planning session +- Executes the strategy you worked out together Act mode capabilities @@ -35,6 +36,14 @@ Plan & Act modes represent Cline's approach to structured AI development, emphas ### Workflow Guide +When I'm working on a new feature or fixing a complex bug, here's what works for me: + +1. I start in Plan mode and tell Cline what I want to build +2. Cline helps me explore the codebase, looking at relevant files +3. Together we figure out the best approach, considering edge cases and potential issues +4. When I'm confident in our plan, I switch to Act mode +5. Cline implements the solution based on our planning + #### 1. Start with Plan Mode Begin every significant development task in Plan mode: @@ -113,19 +122,21 @@ Complex projects often require multiple plan-act cycles: ### Common Patterns -#### When to Use Plan Mode +#### When to Use Each Mode -- Starting new features -- Debugging complex issues -- Architectural decisions -- Requirements analysis +I've found Plan mode works best when: -#### When to Use Act Mode +- Starting something new where the approach isn't obvious +- Debugging a tricky issue where I'm not sure what's wrong +- Making architectural decisions that will affect multiple parts of the codebase +- Trying to understand a complex workflow or feature -- Implementing agreed solutions -- Making routine changes -- Following established patterns -- Executing test cases +And Act mode is perfect for: + +- Implementing a solution we've already planned out +- Making routine changes where the approach is clear +- Following established patterns in the codebase +- Running tests and making minor adjustments Mode usage patterns @@ -142,4 +153,4 @@ Share your experiences and improvements: --- -Remember: The time invested in planning pays dividends in implementation quality and maintenance efficiency +Remember: The time invested in planning pays dividends in implementation quality and maintenance efficiency. diff --git a/docs/features/slash-commands/workflows.mdx b/docs/features/slash-commands/workflows.mdx index 92fa4964..a701717e 100644 --- a/docs/features/slash-commands/workflows.mdx +++ b/docs/features/slash-commands/workflows.mdx @@ -133,13 +133,39 @@ You have access to the `gh` terminal command. I already authenticated it for you 1. Approve the PR if it meets quality standards: ```bash + # For single-line comments: gh pr review --approve --body "Your approval message" + + # For multi-line comments with proper whitespace formatting: + cat << EOF | gh pr review --approve --body-file - + Thanks @username for this PR! The implementation looks good. + + I particularly like how you've handled X and Y. + + Great work! + EOF ``` 2. Request changes if improvements are needed: + ```bash + # For single-line comments: gh pr review --request-changes --body "Your feedback message" + + # For multi-line comments with proper whitespace formatting: + cat << EOF | gh pr review --request-changes --body-file - + Thanks @username for this PR! + + The implementation looks promising, but there are a few things to address: + + 1. Issue one + 2. Issue two + + Please make these changes and we can merge this. + EOF ``` + + Note: The `cat << EOF | ... --body-file -` approach preserves all whitespace and formatting without requiring temporary files. The `-` parameter tells the command to read from standard input. @@ -221,7 +247,21 @@ Would you like me to proceed with approving this PR? ## Step 6: Make a Decision ```bash -gh pr review 3627 --approve --body "This PR looks good! It correctly fixes the thinking mode budget calculation for Claude 3.7 models by using the appropriate maxBudget value (64000) and applying the right percentage (50%) for the slider. The changes are well-tested and the implementation is clean." +# Option 1: Simple one-line comment +gh pr review 3627 --approve --body "This PR looks good! It correctly fixes the thinking mode budget calculation for Claude 3.7 models." + +# Option 2: Multi-line comment with proper whitespace formatting +cat << EOF | gh pr review 3627 --approve --body-file - +This PR looks good! It correctly fixes the thinking mode budget calculation for Claude 3.7 models. + +I particularly like: +1. The proper implementation of thinkingConfig.maxBudget property (64000) +2. The appropriate percentage (50%) for the slider calculation +3. The comprehensive unit tests +4. The clean implementation that follows project coding standards + +Great work! +EOF ``` @@ -262,14 +302,38 @@ gh pr checkout ## Review Commands ```bash -# Approve a PR +# Approve a PR (single-line comment) gh pr review --approve --body "Your approval message" -# Request changes on a PR +# Approve a PR (multi-line comment with proper whitespace) +cat << EOF | gh pr review --approve --body-file - +Your multi-line +approval message with + +proper whitespace formatting +EOF + +# Request changes on a PR (single-line comment) gh pr review --request-changes --body "Your feedback message" +# Request changes on a PR (multi-line comment with proper whitespace) +cat << EOF | gh pr review --request-changes --body-file - +Your multi-line +change request with + +proper whitespace formatting +EOF + # Add a comment review (without approval/rejection) gh pr review --comment --body "Your comment message" + +# Add a comment review with proper whitespace +cat << EOF | gh pr review --comment --body-file - +Your multi-line +comment with + +proper whitespace formatting +EOF ``` ## Additional Commands @@ -286,6 +350,64 @@ gh pr merge --merge ``` + + +When reviewing a PR, please talk normally and like a friendly reviwer. You should keep it short, and start out by thanking the author of the pr and @ mentioning them. + +Whether or not you approve the PR, you should then give a quick summary of the changes without being too verbose or definitive, staying humble like that this is your understanding of the changes. Kind of how I'm talking to you right now. + +If you have any suggestions, or things that need to be changed, request changes instead of approving the PR. + +Leaving inline comments in code is good, but only do so if you have something specific to say about the code. And make sure you leave those comments first, and then request changes in the PR with a short comment explaining the overall theme of what you're asking them to change. + + + + +Looks good, though we should make this generic for all providers & models at some point + + +Will this work for models that may not match across OR/Gemini? Like the thinking models? + + +This looks great! I like how you've handled the global endpoint support - adding it to the ModelInfo interface makes total sense since it's just another capability flag, similar to how we handle other model features. + +The filtered model list approach is clean and will be easier to maintain than hardcoding which models work with global endpoints. And bumping the genai library was obviously needed for this to work. + +Thanks for adding the docs about the limitations too - good for users to know they can't use context caches with global endpoints but might get fewer 429 errors. + + +This is awesome. Thanks @scottsus. + +My main concern though - does this work for all the possible VS Code themes? We struggled with this initially which is why it's not super styled currently. Please test and share screenshots with the different themes to make sure before we can merge + + +Hey, the PR looks good overall but I'm concerned about removing those timeouts. Those were probably there for a reason - VSCode's UI can be finicky with timing. + +Could you add back the timeouts after focusing the sidebar? Something like: + +```typescript +await vscode.commands.executeCommand("claude-dev.SidebarProvider.focus") +await setTimeoutPromise(100) // Give UI time to update +visibleWebview = WebviewProvider.getSidebarInstance() +``` + + + +Heya @alejandropta thanks for working on this! + +A few notes: +1 - Adding additional info to the environment variables is fairly problematic because env variables get appended to **every single message**. I don't think this is justifiable for a somewhat niche use case. +2 - Adding this option to settings to include that could be an option, but we want our options to be simple and straightforward for new users +3 - We're working on revisualizing the way our settings page is displayed/organized, and this could potentially be reconciled once that is in and our settings page is more clearly delineated. + +So until the settings page is update, and this is added to settings in a way that's clean and doesn't confuse new users, I don't think we can merge this. Please bear with us. + + +Also, don't forget to add a changeset since this fixes a user-facing bug. + +The architectural change is solid - moving the focus logic to the command handlers makes sense. Just don't want to introduce subtle timing issues by removing those timeouts. + + ```` When I get a new PR to review, I used to manually gather context: checking the PR description, examining the diff, looking at surrounding files, and finally forming an opinion. Now I just: From 1a66f6467940c788179f245c4d3612b2b1f5bf75 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 07:26:00 +0530 Subject: [PATCH 26/85] v3.16.2 Release Notes v3.16.2 Release Notes --- .changeset/blue-moons-mate.md | 5 ----- .changeset/famous-shoes-beam.md | 5 ----- .changeset/five-bikes-impress.md | 5 ----- .changeset/funny-adults-tease.md | 5 ----- .changeset/good-dingos-try.md | 5 ----- .changeset/hot-dodos-rhyme.md | 5 ----- .changeset/hungry-worms-draw.md | 5 ----- .changeset/little-gifts-invite.md | 5 ----- .changeset/long-zebras-yawn.md | 5 ----- .changeset/loud-worms-applaud.md | 5 ----- .changeset/nice-cobras-pretend.md | 5 ----- .changeset/old-crews-reply.md | 5 ----- .changeset/pink-deers-burn.md | 5 ----- .changeset/seven-dingos-appear.md | 5 ----- .changeset/silver-seals-care.md | 5 ----- .changeset/six-candles-check.md | 5 ----- .changeset/six-carpets-teach.md | 5 ----- .changeset/sour-ravens-sin.md | 5 ----- .changeset/spotty-jeans-march.md | 5 ----- .changeset/tame-windows-compete.md | 5 ----- .changeset/wild-gifts-switch.md | 5 ----- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 24 files changed, 10 insertions(+), 108 deletions(-) delete mode 100644 .changeset/blue-moons-mate.md delete mode 100644 .changeset/famous-shoes-beam.md delete mode 100644 .changeset/five-bikes-impress.md delete mode 100644 .changeset/funny-adults-tease.md delete mode 100644 .changeset/good-dingos-try.md delete mode 100644 .changeset/hot-dodos-rhyme.md delete mode 100644 .changeset/hungry-worms-draw.md delete mode 100644 .changeset/little-gifts-invite.md delete mode 100644 .changeset/long-zebras-yawn.md delete mode 100644 .changeset/loud-worms-applaud.md delete mode 100644 .changeset/nice-cobras-pretend.md delete mode 100644 .changeset/old-crews-reply.md delete mode 100644 .changeset/pink-deers-burn.md delete mode 100644 .changeset/seven-dingos-appear.md delete mode 100644 .changeset/silver-seals-care.md delete mode 100644 .changeset/six-candles-check.md delete mode 100644 .changeset/six-carpets-teach.md delete mode 100644 .changeset/sour-ravens-sin.md delete mode 100644 .changeset/spotty-jeans-march.md delete mode 100644 .changeset/tame-windows-compete.md delete mode 100644 .changeset/wild-gifts-switch.md diff --git a/.changeset/blue-moons-mate.md b/.changeset/blue-moons-mate.md deleted file mode 100644 index e097959d..00000000 --- a/.changeset/blue-moons-mate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Put all the navigation state and message handling and navigation functions in the extension state context instead of the app.tsx diff --git a/.changeset/famous-shoes-beam.md b/.changeset/famous-shoes-beam.md deleted file mode 100644 index 6b2e4e9b..00000000 --- a/.changeset/famous-shoes-beam.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Migrate setActiveQuote to protobus diff --git a/.changeset/five-bikes-impress.md b/.changeset/five-bikes-impress.md deleted file mode 100644 index 470dc207..00000000 --- a/.changeset/five-bikes-impress.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Fix edge case of changing language in settings diff --git a/.changeset/funny-adults-tease.md b/.changeset/funny-adults-tease.md deleted file mode 100644 index 181bdf71..00000000 --- a/.changeset/funny-adults-tease.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -feat: added gemini flash 05-20 diff --git a/.changeset/good-dingos-try.md b/.changeset/good-dingos-try.md deleted file mode 100644 index 9a12131c..00000000 --- a/.changeset/good-dingos-try.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Migrate toggleToolAutoApprove to protobus diff --git a/.changeset/hot-dodos-rhyme.md b/.changeset/hot-dodos-rhyme.md deleted file mode 100644 index ee14905c..00000000 --- a/.changeset/hot-dodos-rhyme.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -togglePlanActMode protobus migration diff --git a/.changeset/hungry-worms-draw.md b/.changeset/hungry-worms-draw.md deleted file mode 100644 index 6112af0b..00000000 --- a/.changeset/hungry-worms-draw.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Migrate toggleClineRule to protobus diff --git a/.changeset/little-gifts-invite.md b/.changeset/little-gifts-invite.md deleted file mode 100644 index 057a91ca..00000000 --- a/.changeset/little-gifts-invite.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -taskCompletionViewChanges protobus migration diff --git a/.changeset/long-zebras-yawn.md b/.changeset/long-zebras-yawn.md deleted file mode 100644 index c38e0860..00000000 --- a/.changeset/long-zebras-yawn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -copyToClipboard protobus migration diff --git a/.changeset/loud-worms-applaud.md b/.changeset/loud-worms-applaud.md deleted file mode 100644 index 64ee6081..00000000 --- a/.changeset/loud-worms-applaud.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Migrate updateTerminalConnectionTimeout to protobus diff --git a/.changeset/nice-cobras-pretend.md b/.changeset/nice-cobras-pretend.md deleted file mode 100644 index 8ef1e1ef..00000000 --- a/.changeset/nice-cobras-pretend.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Fixing bug in toggle plan and act diff --git a/.changeset/old-crews-reply.md b/.changeset/old-crews-reply.md deleted file mode 100644 index 72bc5fdb..00000000 --- a/.changeset/old-crews-reply.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -scrollToSetting protobus migration diff --git a/.changeset/pink-deers-burn.md b/.changeset/pink-deers-burn.md deleted file mode 100644 index f018cf44..00000000 --- a/.changeset/pink-deers-burn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -migrate accountLogoutClicked to protobus diff --git a/.changeset/seven-dingos-appear.md b/.changeset/seven-dingos-appear.md deleted file mode 100644 index e6b35585..00000000 --- a/.changeset/seven-dingos-appear.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -openMention protobus migration diff --git a/.changeset/silver-seals-care.md b/.changeset/silver-seals-care.md deleted file mode 100644 index 6848d837..00000000 --- a/.changeset/silver-seals-care.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Migrate toggleWindsurfRule to protobus diff --git a/.changeset/six-candles-check.md b/.changeset/six-candles-check.md deleted file mode 100644 index 97db6092..00000000 --- a/.changeset/six-candles-check.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Migrate restartMcpServer to protobus diff --git a/.changeset/six-carpets-teach.md b/.changeset/six-carpets-teach.md deleted file mode 100644 index 7617ee65..00000000 --- a/.changeset/six-carpets-teach.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Migrate silentlyRefreshMcpMarketplace to protobus diff --git a/.changeset/sour-ravens-sin.md b/.changeset/sour-ravens-sin.md deleted file mode 100644 index da9f7c43..00000000 --- a/.changeset/sour-ravens-sin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Migrate toggleCursorRule to protobus diff --git a/.changeset/spotty-jeans-march.md b/.changeset/spotty-jeans-march.md deleted file mode 100644 index 1db0691b..00000000 --- a/.changeset/spotty-jeans-march.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -browserRelaunchResult protobus migration diff --git a/.changeset/tame-windows-compete.md b/.changeset/tame-windows-compete.md deleted file mode 100644 index d8f7138a..00000000 --- a/.changeset/tame-windows-compete.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Remind VS code users of clines existence(Open Cline on AutoUpdate+KeyboardShortcuts+Lightbulb icons) diff --git a/.changeset/wild-gifts-switch.md b/.changeset/wild-gifts-switch.md deleted file mode 100644 index 6f57308b..00000000 --- a/.changeset/wild-gifts-switch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Migrate the deleteMcpServer message to protobus diff --git a/CHANGELOG.md b/CHANGELOG.md index b881ce25..452268b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.16.2] + +- Add support for Gemini 2.5 Flash Preview 05-20 model to Vertex AI provider with massive 1M token context window (Thanks @omercelik!) +- Add keyboard shortcut (Cmd+') to quickly focus Cline from anywhere in VS Code +- Add lightbulb actions for selected text with options to "Add to Cline", "Explain with Cline", and "Improve with Cline" +- Automatically focus Cline window after extension updates + ## [3.16.1] - Add Enable auto approve toggle switch, allowing users to easily turn auto-approve functionality on or off without losing their action settings diff --git a/package-lock.json b/package-lock.json index e9178aa3..93f3aaf2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "claude-dev", - "version": "3.16.1", + "version": "3.16.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "claude-dev", - "version": "3.16.1", + "version": "3.16.2", "license": "Apache-2.0", "dependencies": { "@anthropic-ai/bedrock-sdk": "^0.12.4", diff --git a/package.json b/package.json index cdad8405..8d84a4f8 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "claude-dev", "displayName": "Cline", "description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.", - "version": "3.16.1", + "version": "3.16.2", "icon": "assets/icons/icon.png", "engines": { "vscode": "^1.84.0" From c6dbbdb43d792a28a55280d102ad67632d3373f3 Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Tue, 20 May 2025 21:09:38 -0700 Subject: [PATCH 27/85] Migrate openSettings protobus (#3684) * use navigation directly for openSettings * changeset --------- Co-authored-by: Elephant Lumps --- .changeset/cold-rice-exist.md | 5 +++++ src/core/controller/index.ts | 7 ------- src/shared/WebviewMessage.ts | 1 - webview-ui/src/components/browser/BrowserSettingsMenu.tsx | 8 +++----- webview-ui/src/components/common/TelemetryBanner.tsx | 5 ++++- 5 files changed, 12 insertions(+), 14 deletions(-) create mode 100644 .changeset/cold-rice-exist.md diff --git a/.changeset/cold-rice-exist.md b/.changeset/cold-rice-exist.md new file mode 100644 index 00000000..0e1e147d --- /dev/null +++ b/.changeset/cold-rice-exist.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Migrate openSettings message to use state navigation handlers diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index f40104c2..5eb36ff2 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -423,13 +423,6 @@ export class Controller { break } // telemetry - case "openSettings": { - await this.postMessageToWebview({ - type: "action", - action: "settingsButtonClicked", - }) - break - } case "telemetrySetting": { if (message.telemetrySetting) { await this.updateTelemetrySetting(message.telemetrySetting) diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index ac72e608..6ae6c882 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -30,7 +30,6 @@ export interface WebviewMessage { | "searchCommits" | "fetchLatestMcpServersFromHub" | "telemetrySetting" - | "openSettings" | "invoke" | "updateSettings" | "clearAllTaskHistory" diff --git a/webview-ui/src/components/browser/BrowserSettingsMenu.tsx b/webview-ui/src/components/browser/BrowserSettingsMenu.tsx index aba6e9c9..8b69fb24 100644 --- a/webview-ui/src/components/browser/BrowserSettingsMenu.tsx +++ b/webview-ui/src/components/browser/BrowserSettingsMenu.tsx @@ -13,7 +13,7 @@ interface ConnectionInfo { } export const BrowserSettingsMenu = () => { - const { browserSettings } = useExtensionState() + const { browserSettings, navigateToSettings } = useExtensionState() const containerRef = useRef(null) const [showInfoPopover, setShowInfoPopover] = useState(false) const [connectionInfo, setConnectionInfo] = useState({ @@ -65,10 +65,8 @@ export const BrowserSettingsMenu = () => { }, [showInfoPopover]) const openBrowserSettings = () => { - // First open the settings panel - vscode.postMessage({ - type: "openSettings", - }) + // First open the settings panel using direct navigation + navigateToSettings() // After a short delay, send a message to scroll to browser settings setTimeout(async () => { diff --git a/webview-ui/src/components/common/TelemetryBanner.tsx b/webview-ui/src/components/common/TelemetryBanner.tsx index 92966bb0..bd7d11a5 100644 --- a/webview-ui/src/components/common/TelemetryBanner.tsx +++ b/webview-ui/src/components/common/TelemetryBanner.tsx @@ -1,6 +1,7 @@ import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react" import { memo, useState } from "react" import styled from "styled-components" +import { useExtensionState } from "@/context/ExtensionStateContext" import { vscode } from "@/utils/vscode" import { TelemetrySetting } from "@shared/TelemetrySetting" @@ -45,9 +46,11 @@ const ButtonContainer = styled.div` ` const TelemetryBanner = () => { + const { navigateToSettings } = useExtensionState() + const handleOpenSettings = () => { handleClose() - vscode.postMessage({ type: "openSettings" }) + navigateToSettings() } const handleClose = () => { From 65a63952e367a0cfcc391f5ff9c5e0bf559944ad Mon Sep 17 00:00:00 2001 From: pashpashpash Date: Tue, 20 May 2025 21:18:41 -0700 Subject: [PATCH 28/85] adding release workflow (#3646) From 36c0192bd29fc56b74da0b3eeeb0b80d907968ad Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Tue, 20 May 2025 22:58:34 -0700 Subject: [PATCH 29/85] Migrate refreshClineRules protobus (#3690) * migrate refreshClineRules * changeset --------- Co-authored-by: Elephant Lumps --- .changeset/eight-sheep-remember.md | 5 + proto/file.proto | 12 ++ src/core/controller/file/methods.ts | 2 + src/core/controller/file/refreshRules.ts | 32 ++++ src/core/controller/index.ts | 6 - src/shared/WebviewMessage.ts | 1 - src/shared/proto/file.ts | 171 ++++++++++++++++++ src/standalone/server-setup.ts | 2 + .../cline-rules/ClineRulesToggleModal.tsx | 27 ++- .../src/context/ExtensionStateContext.tsx | 6 + 10 files changed, 255 insertions(+), 9 deletions(-) create mode 100644 .changeset/eight-sheep-remember.md create mode 100644 src/core/controller/file/refreshRules.ts diff --git a/.changeset/eight-sheep-remember.md b/.changeset/eight-sheep-remember.md new file mode 100644 index 00000000..33d51c8b --- /dev/null +++ b/.changeset/eight-sheep-remember.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Migrate refreshClineRules to protobus diff --git a/proto/file.proto b/proto/file.proto index 5ce50d87..a6866942 100644 --- a/proto/file.proto +++ b/proto/file.proto @@ -46,6 +46,18 @@ service FileService { // Toggle a Windsurf rule (enable or disable) rpc toggleWindsurfRule(ToggleWindsurfRuleRequest) returns (ClineRulesToggles); + + // Refreshes all rule toggles (Cline, External, and Workflows) + rpc refreshRules(EmptyRequest) returns (RefreshedRules); +} + +// Response for refreshRules operation +message RefreshedRules { + ClineRulesToggles global_cline_rules_toggles = 1; + ClineRulesToggles local_cline_rules_toggles = 2; + ClineRulesToggles local_cursor_rules_toggles = 3; + ClineRulesToggles local_windsurf_rules_toggles = 4; + ClineRulesToggles workflow_toggles = 5; } // Request to toggle a Windsurf rule diff --git a/src/core/controller/file/methods.ts b/src/core/controller/file/methods.ts index 6740e242..55dc01aa 100644 --- a/src/core/controller/file/methods.ts +++ b/src/core/controller/file/methods.ts @@ -10,6 +10,7 @@ import { getRelativePaths } from "./getRelativePaths" import { openFile } from "./openFile" import { openImage } from "./openImage" import { openMention } from "./openMention" +import { refreshRules } from "./refreshRules" import { searchCommits } from "./searchCommits" import { searchFiles } from "./searchFiles" import { selectImages } from "./selectImages" @@ -27,6 +28,7 @@ export function registerAllMethods(): void { registerMethod("openFile", openFile) registerMethod("openImage", openImage) registerMethod("openMention", openMention) + registerMethod("refreshRules", refreshRules) registerMethod("searchCommits", searchCommits) registerMethod("searchFiles", searchFiles) registerMethod("selectImages", selectImages) diff --git a/src/core/controller/file/refreshRules.ts b/src/core/controller/file/refreshRules.ts new file mode 100644 index 00000000..1b897b01 --- /dev/null +++ b/src/core/controller/file/refreshRules.ts @@ -0,0 +1,32 @@ +import { EmptyRequest } from "@shared/proto/common" +import { RefreshedRules } from "@shared/proto/file" +import type { Controller } from "../index" +import { refreshClineRulesToggles } from "@core/context/instructions/user-instructions/cline-rules" +import { refreshExternalRulesToggles } from "@core/context/instructions/user-instructions/external-rules" +import { refreshWorkflowToggles } from "@core/context/instructions/user-instructions/workflows" +import { cwd } from "@core/task" + +/** + * Refreshes all rule toggles (Cline, External, and Workflows) + * @param controller The controller instance + * @param _request The empty request + * @returns RefreshedRules containing updated toggles for all rule types + */ +export async function refreshRules(controller: Controller, _request: EmptyRequest): Promise { + try { + const { globalToggles, localToggles } = await refreshClineRulesToggles(controller.context, cwd) + const { cursorLocalToggles, windsurfLocalToggles } = await refreshExternalRulesToggles(controller.context, cwd) + const workflowToggles = await refreshWorkflowToggles(controller.context, cwd) + + return { + globalClineRulesToggles: { toggles: globalToggles }, + localClineRulesToggles: { toggles: localToggles }, + localCursorRulesToggles: { toggles: cursorLocalToggles }, + localWindsurfRulesToggles: { toggles: windsurfLocalToggles }, + workflowToggles: { toggles: workflowToggles }, + } + } catch (error) { + console.error("Failed to refresh rules:", error) + throw error + } +} diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 5eb36ff2..8cb3db18 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -321,12 +321,6 @@ export class Controller { await updateGlobalState(this.context, "lastShownAnnouncementId", this.latestAnnouncementId) await this.postStateToWebview() break - case "refreshClineRules": - await refreshClineRulesToggles(this.context, cwd) - await refreshExternalRulesToggles(this.context, cwd) - await refreshWorkflowToggles(this.context, cwd) - await this.postStateToWebview() - break case "openInBrowser": if (message.url) { vscode.env.openExternal(vscode.Uri.parse(message.url)) diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 6ae6c882..5faa639c 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -17,7 +17,6 @@ export interface WebviewMessage { | "didShowAnnouncement" | "openInBrowser" | "showChatView" - | "refreshClineRules" | "openMcpSettings" | "autoApprovalSettings" | "togglePlanActMode" diff --git a/src/shared/proto/file.ts b/src/shared/proto/file.ts index 43c4b153..1f5377cd 100644 --- a/src/shared/proto/file.ts +++ b/src/shared/proto/file.ts @@ -10,6 +10,15 @@ import { Empty, EmptyRequest, Metadata, StringArray, StringRequest } from "./com export const protobufPackage = "cline" +/** Response for refreshRules operation */ +export interface RefreshedRules { + globalClineRulesToggles?: ClineRulesToggles | undefined + localClineRulesToggles?: ClineRulesToggles | undefined + localCursorRulesToggles?: ClineRulesToggles | undefined + localWindsurfRulesToggles?: ClineRulesToggles | undefined + workflowToggles?: ClineRulesToggles | undefined +} + /** Request to toggle a Windsurf rule */ export interface ToggleWindsurfRuleRequest { metadata?: Metadata | undefined @@ -132,6 +141,159 @@ export interface ToggleCursorRuleRequest { enabled: boolean } +function createBaseRefreshedRules(): RefreshedRules { + return { + globalClineRulesToggles: undefined, + localClineRulesToggles: undefined, + localCursorRulesToggles: undefined, + localWindsurfRulesToggles: undefined, + workflowToggles: undefined, + } +} + +export const RefreshedRules: MessageFns = { + encode(message: RefreshedRules, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.globalClineRulesToggles !== undefined) { + ClineRulesToggles.encode(message.globalClineRulesToggles, writer.uint32(10).fork()).join() + } + if (message.localClineRulesToggles !== undefined) { + ClineRulesToggles.encode(message.localClineRulesToggles, writer.uint32(18).fork()).join() + } + if (message.localCursorRulesToggles !== undefined) { + ClineRulesToggles.encode(message.localCursorRulesToggles, writer.uint32(26).fork()).join() + } + if (message.localWindsurfRulesToggles !== undefined) { + ClineRulesToggles.encode(message.localWindsurfRulesToggles, writer.uint32(34).fork()).join() + } + if (message.workflowToggles !== undefined) { + ClineRulesToggles.encode(message.workflowToggles, writer.uint32(42).fork()).join() + } + return writer + }, + + decode(input: BinaryReader | Uint8Array, length?: number): RefreshedRules { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input) + let end = length === undefined ? reader.len : reader.pos + length + const message = createBaseRefreshedRules() + while (reader.pos < end) { + const tag = reader.uint32() + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break + } + + message.globalClineRulesToggles = ClineRulesToggles.decode(reader, reader.uint32()) + continue + } + case 2: { + if (tag !== 18) { + break + } + + message.localClineRulesToggles = ClineRulesToggles.decode(reader, reader.uint32()) + continue + } + case 3: { + if (tag !== 26) { + break + } + + message.localCursorRulesToggles = ClineRulesToggles.decode(reader, reader.uint32()) + continue + } + case 4: { + if (tag !== 34) { + break + } + + message.localWindsurfRulesToggles = ClineRulesToggles.decode(reader, reader.uint32()) + continue + } + case 5: { + if (tag !== 42) { + break + } + + message.workflowToggles = ClineRulesToggles.decode(reader, reader.uint32()) + continue + } + } + if ((tag & 7) === 4 || tag === 0) { + break + } + reader.skip(tag & 7) + } + return message + }, + + fromJSON(object: any): RefreshedRules { + return { + globalClineRulesToggles: isSet(object.globalClineRulesToggles) + ? ClineRulesToggles.fromJSON(object.globalClineRulesToggles) + : undefined, + localClineRulesToggles: isSet(object.localClineRulesToggles) + ? ClineRulesToggles.fromJSON(object.localClineRulesToggles) + : undefined, + localCursorRulesToggles: isSet(object.localCursorRulesToggles) + ? ClineRulesToggles.fromJSON(object.localCursorRulesToggles) + : undefined, + localWindsurfRulesToggles: isSet(object.localWindsurfRulesToggles) + ? ClineRulesToggles.fromJSON(object.localWindsurfRulesToggles) + : undefined, + workflowToggles: isSet(object.workflowToggles) ? ClineRulesToggles.fromJSON(object.workflowToggles) : undefined, + } + }, + + toJSON(message: RefreshedRules): unknown { + const obj: any = {} + if (message.globalClineRulesToggles !== undefined) { + obj.globalClineRulesToggles = ClineRulesToggles.toJSON(message.globalClineRulesToggles) + } + if (message.localClineRulesToggles !== undefined) { + obj.localClineRulesToggles = ClineRulesToggles.toJSON(message.localClineRulesToggles) + } + if (message.localCursorRulesToggles !== undefined) { + obj.localCursorRulesToggles = ClineRulesToggles.toJSON(message.localCursorRulesToggles) + } + if (message.localWindsurfRulesToggles !== undefined) { + obj.localWindsurfRulesToggles = ClineRulesToggles.toJSON(message.localWindsurfRulesToggles) + } + if (message.workflowToggles !== undefined) { + obj.workflowToggles = ClineRulesToggles.toJSON(message.workflowToggles) + } + return obj + }, + + create, I>>(base?: I): RefreshedRules { + return RefreshedRules.fromPartial(base ?? ({} as any)) + }, + fromPartial, I>>(object: I): RefreshedRules { + const message = createBaseRefreshedRules() + message.globalClineRulesToggles = + object.globalClineRulesToggles !== undefined && object.globalClineRulesToggles !== null + ? ClineRulesToggles.fromPartial(object.globalClineRulesToggles) + : undefined + message.localClineRulesToggles = + object.localClineRulesToggles !== undefined && object.localClineRulesToggles !== null + ? ClineRulesToggles.fromPartial(object.localClineRulesToggles) + : undefined + message.localCursorRulesToggles = + object.localCursorRulesToggles !== undefined && object.localCursorRulesToggles !== null + ? ClineRulesToggles.fromPartial(object.localCursorRulesToggles) + : undefined + message.localWindsurfRulesToggles = + object.localWindsurfRulesToggles !== undefined && object.localWindsurfRulesToggles !== null + ? ClineRulesToggles.fromPartial(object.localWindsurfRulesToggles) + : undefined + message.workflowToggles = + object.workflowToggles !== undefined && object.workflowToggles !== null + ? ClineRulesToggles.fromPartial(object.workflowToggles) + : undefined + return message + }, +} + function createBaseToggleWindsurfRuleRequest(): ToggleWindsurfRuleRequest { return { metadata: undefined, rulePath: "", enabled: false } } @@ -1604,6 +1766,15 @@ export const FileServiceDefinition = { responseStream: false, options: {}, }, + /** Refreshes all rule toggles (Cline, External, and Workflows) */ + refreshRules: { + name: "refreshRules", + requestType: EmptyRequest, + requestStream: false, + responseType: RefreshedRules, + responseStream: false, + options: {}, + }, }, } as const diff --git a/src/standalone/server-setup.ts b/src/standalone/server-setup.ts index 7be6af22..960eb0a4 100644 --- a/src/standalone/server-setup.ts +++ b/src/standalone/server-setup.ts @@ -34,6 +34,7 @@ import { searchFiles } from "../core/controller/file/searchFiles" import { toggleClineRule } from "../core/controller/file/toggleClineRule" import { toggleCursorRule } from "../core/controller/file/toggleCursorRule" import { toggleWindsurfRule } from "../core/controller/file/toggleWindsurfRule" +import { refreshRules } from "../core/controller/file/refreshRules" // Mcp Service import { toggleMcpServer } from "../core/controller/mcp/toggleMcpServer" @@ -130,6 +131,7 @@ export function addServices( toggleClineRule: wrapper(toggleClineRule, controller), toggleCursorRule: wrapper(toggleCursorRule, controller), toggleWindsurfRule: wrapper(toggleWindsurfRule, controller), + refreshRules: wrapper(refreshRules, controller), }) // Mcp Service diff --git a/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx b/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx index b547ab2c..41da5c85 100644 --- a/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx +++ b/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx @@ -8,7 +8,8 @@ import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" import RulesToggleList from "./RulesToggleList" import Tooltip from "@/components/common/Tooltip" import styled from "styled-components" -import { ClineRulesToggles, ToggleWindsurfRuleRequest } from "@shared/proto/file" +import { ClineRulesToggles, RefreshedRules, ToggleWindsurfRuleRequest } from "@shared/proto/file" +import { EmptyRequest } from "@shared/proto/common" const ClineRulesToggleModal: React.FC = () => { const { @@ -21,6 +22,7 @@ const ClineRulesToggleModal: React.FC = () => { setLocalClineRulesToggles, setLocalCursorRulesToggles, setLocalWindsurfRulesToggles, + setWorkflowToggles, } = useExtensionState() const [isVisible, setIsVisible] = useState(false) const buttonRef = useRef(null) @@ -32,7 +34,28 @@ const ClineRulesToggleModal: React.FC = () => { useEffect(() => { if (isVisible) { - vscode.postMessage({ type: "refreshClineRules" }) + FileServiceClient.refreshRules({} as EmptyRequest) + .then((response: RefreshedRules) => { + // Update state with the response data using all available setters + if (response.globalClineRulesToggles?.toggles) { + setGlobalClineRulesToggles(response.globalClineRulesToggles.toggles) + } + if (response.localClineRulesToggles?.toggles) { + setLocalClineRulesToggles(response.localClineRulesToggles.toggles) + } + if (response.localCursorRulesToggles?.toggles) { + setLocalCursorRulesToggles(response.localCursorRulesToggles.toggles) + } + if (response.localWindsurfRulesToggles?.toggles) { + setLocalWindsurfRulesToggles(response.localWindsurfRulesToggles.toggles) + } + if (response.workflowToggles?.toggles) { + setWorkflowToggles(response.workflowToggles.toggles) + } + }) + .catch((error) => { + console.error("Failed to refresh rules:", error) + }) } }, [isVisible]) diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index 5d54f751..6091077e 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -55,6 +55,7 @@ interface ExtensionStateContextType extends ExtensionState { setLocalClineRulesToggles: (toggles: Record) => void setLocalCursorRulesToggles: (toggles: Record) => void setLocalWindsurfRulesToggles: (toggles: Record) => void + setWorkflowToggles: (toggles: Record) => void setMcpMarketplaceCatalog: (value: McpMarketplaceCatalog) => void // Navigation state setters @@ -540,6 +541,11 @@ export const ExtensionStateContextProvider: React.FC<{ ...prevState, localWindsurfRulesToggles: toggles, })), + setWorkflowToggles: (toggles) => + setState((prevState) => ({ + ...prevState, + workflowToggles: toggles, + })), setMcpTab, } From 0870c65fa5bc14e13b77ee38aa54cb3023195730 Mon Sep 17 00:00:00 2001 From: pashpashpash Date: Wed, 21 May 2025 00:59:25 -0700 Subject: [PATCH 30/85] moar docs (#3689) * title * crosslinking and commands * better * fixing * fixing inaccuracies * language * images --------- Co-authored-by: Cline Evaluation --- docs/docs.json | 38 ++++-- docs/exploring-clines-tools/checkpoints.mdx | 114 ---------------- docs/exploring-clines-tools/new-task-tool.mdx | 5 + .../exploring-clines-tools/slash-commands.mdx | 57 -------- docs/features/at-mentions/overview.mdx | 28 ++-- docs/features/auto-approve.mdx | 59 ++++++++ docs/features/checkpoints.mdx | 79 +++++++++++ .../commands-and-shortcuts/code-commands.mdx | 129 ++++++++++++++++++ .../git-integration.mdx | 71 ++++++++++ .../keyboard-shortcuts.mdx | 103 ++++++++++++++ .../commands-and-shortcuts/overview.mdx | 65 +++++++++ .../terminal-integration.mdx | 81 +++++++++++ docs/features/drag-and-drop.mdx | 14 ++ docs/features/editing-messages.mdx | 67 +++++++++ docs/features/plan-and-act.mdx | 2 +- docs/features/slash-commands/workflows.mdx | 8 +- 16 files changed, 722 insertions(+), 198 deletions(-) delete mode 100644 docs/exploring-clines-tools/checkpoints.mdx delete mode 100644 docs/exploring-clines-tools/slash-commands.mdx create mode 100644 docs/features/auto-approve.mdx create mode 100644 docs/features/checkpoints.mdx create mode 100644 docs/features/commands-and-shortcuts/code-commands.mdx create mode 100644 docs/features/commands-and-shortcuts/git-integration.mdx create mode 100644 docs/features/commands-and-shortcuts/keyboard-shortcuts.mdx create mode 100644 docs/features/commands-and-shortcuts/overview.mdx create mode 100644 docs/features/commands-and-shortcuts/terminal-integration.mdx create mode 100644 docs/features/drag-and-drop.mdx create mode 100644 docs/features/editing-messages.mdx diff --git a/docs/docs.json b/docs/docs.json index a001816d..a7088036 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -74,18 +74,13 @@ { "group": "Features", "pages": [ - "features/plan-and-act", + "features/auto-approve", + "features/checkpoints", "features/cline-rules", + "features/drag-and-drop", + "features/plan-and-act", "features/slash-commands/workflows", - { - "group": "Slash Commands", - "pages": [ - "features/slash-commands/new-task", - "features/slash-commands/new-rule", - "features/slash-commands/smol", - "features/slash-commands/report-bug" - ] - }, + "features/editing-messages", { "group": "@ Mentions", "pages": [ @@ -96,6 +91,25 @@ "features/at-mentions/git-mentions", "features/at-mentions/url-mentions" ] + }, + { + "group": "Slash Commands", + "pages": [ + "features/slash-commands/new-task", + "features/slash-commands/new-rule", + "features/slash-commands/smol", + "features/slash-commands/report-bug" + ] + }, + { + "group": "Commands & Shortcuts", + "pages": [ + "features/commands-and-shortcuts/overview", + "features/commands-and-shortcuts/code-commands", + "features/commands-and-shortcuts/terminal-integration", + "features/commands-and-shortcuts/git-integration", + "features/commands-and-shortcuts/keyboard-shortcuts" + ] } ] }, @@ -103,10 +117,8 @@ "group": "Exploring Cline's Tools", "pages": [ "exploring-clines-tools/cline-tools-guide", - "exploring-clines-tools/checkpoints", "exploring-clines-tools/new-task-tool", - "exploring-clines-tools/remote-browser-support", - "exploring-clines-tools/slash-commands" + "exploring-clines-tools/remote-browser-support" ] }, { diff --git a/docs/exploring-clines-tools/checkpoints.mdx b/docs/exploring-clines-tools/checkpoints.mdx deleted file mode 100644 index 15f5a7b6..00000000 --- a/docs/exploring-clines-tools/checkpoints.mdx +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: "Checkpoints and Messages" -description: "When working with AI coding assistants, it's easy to lose control as they make rapid changes to your codebase. That's why we built Checkpoints - your safety net for experimenting confidently." ---- - -Checkpoints automatically save snapshots of your workspace after each step in a task. This powerful feature lets you: - -- Track and review changes made during a task -- Roll back to any previous point if needed -- Experiment confidently with auto-approve mode -- Maintain full control over your workspace - -### ⚙️ How Checkpoints Work - -Cline creates a checkpoint after each tool use (file edits, commands, etc.). These checkpoints: - -- Work alongside your Git workflow without interference -- Maintain context between restores -- Use a shadow Git repository to track changes - -For example, if you're working on a feature and Cline makes multiple file changes, each change creates a checkpoint. This means you can review each modification and, if needed, roll back to any point without affecting your main Git repository. - -#### Viewing Changes & Restoring to Checkpoint - -After each tool use, you can: - -1. Click the "Compare" button to see modified files -2. Click the "Restore" button to open restore options - - - Checkpoint comparison and restore options - - -#### Rolling Back - -To restore to a previous point: - -1. Click the "Restore" button next to any step -2. Choose from three options: - - **Restore Task and Workspace**: Reset both codebase and task to that point - - **Restore Task Only**: Keep codebase changes but revert task context - - **Restore Workspace Only**: Reset codebase while preserving task context - -Example: If Cline makes changes you don't like while styling a component, you can use "Restore Workspace Only" to revert the code changes while keeping the conversation context, allowing you to try a different approach. - -### 💡 Use Cases - -Checkpoints let you be more experimental with Cline. While human coding is often methodical and iterative, AI can make substantial changes quickly. Checkpoints help you track these changes and revert if needed. - -#### 1. Using Auto-Approve Mode - -- Provides safety net for rapid iterations -- Makes it easy to undo unexpected results - -#### 2. Testing Different Approaches - -- Try multiple solutions confidently -- Compare different implementations -- Quickly revert to working states -- Ideal for exploring different design patterns or architectural approaches - - - Checkpoint restore demo - - -### ✨ Best Practices - -1. Use checkpoints as safety nets when experimenting -2. Leverage auto-approve mode more confidently, knowing you can always roll back -3. Restore selectively based on needs: - - - Use "Restore Task and Workspace" for a fresh start, reversing changes to files and the task conversation. - - Use "Restore Task Only" to try different prompts, but leave all files as they exist - - Use "Restore Workspace Only" to attempt different implementations, or prune context from the task - -🛟 Checkpoints are your safety net when working with Cline, enabling you to experiment freely while maintaining full control over your codebase. Whether you're refactoring a complex component, trying different implementation approaches, or using auto-approve mode for rapid development, checkpoints ensure you can always review changes and roll back if needed. - -#### 🗑️ Deleting Checkpoints - -You can delete all checkpoints by using the **"Delete All History"** button in the task history menu. Note that this will also delete all tasks. Checkpoints are stored in VS Code's globalStorage. - ---- - -## Editing Messages - -Cline allows you to edit chat messages in a task after they've been submitted (with the exception of the message that started the task). - -Perhaps you didn't get the results you wanted, thought of a better way to phrase your request, or need to add more information. Editing your message allows you to re-submit a request without starting over or restoring your files or workspace with checkpoints. There are two Restore options: - -- **"Restore Chat"** restores just the task state and re-submits an API request to your provider with your edited message. - -- **"Restore All"** restores both the task state and workspace state before re-submitting an API request. "Workspace state" refers to the condition of your workspace (files, content, etc.) at different points in the conversation. - -**Interactive Editing:** - -- Messages can be clicked to enter edit mode -- Cline automatically selects all text when entering edit mode - -**Keyboard Shortcuts:** - -- Escape: Exit edit mode -- Enter: Restore just the task -- Cmd/Ctrl + Enter: Restore the task and workspace -- Shift + Enter: Insert new line / line break - - - Message editing interface - diff --git a/docs/exploring-clines-tools/new-task-tool.mdx b/docs/exploring-clines-tools/new-task-tool.mdx index 99e99580..92ac9f8b 100644 --- a/docs/exploring-clines-tools/new-task-tool.mdx +++ b/docs/exploring-clines-tools/new-task-tool.mdx @@ -29,6 +29,11 @@ As a quick alternative to Cline suggesting the `newtask` tool or defining comple - **Action:** Cline will propose creating a new task, typically suggesting context based on the current session (similar to its default behavior when using the tool). You will still get the `ask_followup_question` prompt to confirm and potentially modify the context before the new task is created. - **Benefit:** Provides a fast, user-initiated way to leverage the `new_task` functionality for branching explorations or managing long sessions without waiting for Cline to suggest it. + + For more details on using the `/newtask` slash command, see the [New Task Command](/features/slash-commands/new-task) + documentation. + + #### Default Behavior (Without `.clinerules`) By default, without specific `.clinerules` dictating its behavior: diff --git a/docs/exploring-clines-tools/slash-commands.mdx b/docs/exploring-clines-tools/slash-commands.mdx deleted file mode 100644 index 840106ee..00000000 --- a/docs/exploring-clines-tools/slash-commands.mdx +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: "Slash Commands" ---- - -#### Overview - -Cline provides slash commands as a quick way to invoke specific tools or actions directly from the chat input, offering shortcuts for common operations. This page details the available slash commands and their usage. - -#### /newtask - -The `/newtask` slash command provides a fast, user-initiated way to leverage the `new_task` tool's functionality for branching explorations or managing long sessions without waiting for Cline to suggest it. - -**Functionality:** - -1. **Initiation:** Typing `/newtask` in the chat input signals Cline to prepare for starting a new task session. -2. **Context Proposal:** Cline proposes creating a new task and typically suggests context to preload based on the current session (summarizing key aspects like current work, technical concepts, relevant files, problems solved, and next steps). -3. **User Confirmation:** You will receive a confirmation prompt (via the `ask_followup_question` tool) displaying the proposed context. You can approve it directly or modify the context before the new task begins. -4. **New Session:** Upon confirmation, Cline ends the current task session and immediately starts a new one, preloaded with the approved context. - -**Benefit:** Allows you to cleanly branch your work or start a new phase while carrying over essential background information ("knowledge transfer") without manual copying or losing the thread of the previous session. - -#### /smol (alias /compact) - -The `/smol` slash command (with `/compact` as an alias) allows you to condense the chat history **within your current task**. This is useful when a conversation becomes very long, potentially impacting performance or making it harder for the model to maintain focus. - -**Functionality:** - -1. **Initiation:** Typing `/smol` or `/compact` tells Cline you want to condense the current chat history. You can optionally add instructions after the command to guide the summarization process (e.g., `/smol focus only on the database changes` or `/smol be concise, use bullet points`). -2. **Summarization:** Cline analyzes the conversation history, considering any additional instructions provided, and generates a summary focusing on key elements: recent discussion points, important decisions, technical concepts, relevant files, problems solved, and planned next steps. Cline determines the appropriate length and detail for the summary. It retains the beginning and very recent parts of the chat while summarizing the middle sections. -3. **User Confirmation:** Cline presents this generated summary to you via a confirmation prompt and asks if it accurately reflects the essential context. -4. **Condensing:** If you approve the summary, Cline replaces the summarized middle portion of the chat history in its active context with the generated summary. This reduces the overall token count for subsequent interactions within the _same task_. -5. **Feedback:** If you reject the summary or provide feedback, Cline will retain the original history and incorporate your feedback for future actions. - -**Benefit:** Helps maintain focus and manage token usage during very long, continuous tasks (like deep debugging or extended feature development) without needing to start an entirely new task session. Allows user guidance on the summarization focus. - -#### When to Use Which? - -Choosing between `/newtask` and `/smol` depends on your goal: - -- Use `/smol` (or `/compact`) when: - - You want to continue the **same task**, but the chat history has become very long or costly. - - You need to reduce token usage for upcoming interactions within the current workflow. - - Example: Deep debugging session where you want to summarize previous steps before continuing. -- Use `/newtask` when: - - You have finished one phase of work and want to start a **fresh, related task**. - - You want to branch your exploration while preserving key context from the previous session. - - Example: Moving from developing Feature A to starting work on Feature B, carrying over relevant architectural decisions. - -#### Why Manage Context? - -While Cline supports large context windows, actively managing context using tools and commands like `/newtask` and `/smol` is often beneficial: - -- **Performance:** Large language models can sometimes experience performance degradation or lose focus when context windows become extremely full (e.g., over 50-75% capacity, depending on the model). Condensing or resetting context can help maintain optimal performance. -- **Relevance:** Summarizing or starting fresh ensures the most relevant information is prioritized in the context window. -- **Cost:** Reducing the number of tokens sent to the model in each turn can help manage costs, especially with more expensive models. - -Using `/newtask` and `/smol` provides you with direct control over the conversation context, allowing for more efficient and effective interaction with Cline. diff --git a/docs/features/at-mentions/overview.mdx b/docs/features/at-mentions/overview.mdx index 7848dab0..8cd3ed0b 100644 --- a/docs/features/at-mentions/overview.mdx +++ b/docs/features/at-mentions/overview.mdx @@ -1,5 +1,5 @@ --- -title: "@ MentionsOverview" +title: "@ Mentions Overview" sidebarTitle: "Overview" --- @@ -15,35 +15,45 @@ When you type `@` in the chat input, Cline shows a menu of available mention typ Cline supports several types of @ mentions, each designed to bring different kinds of context into your conversations: - - Reference any file in your workspace with `@/path/to/file`. Cline sees the complete file content, including imports, related - functions, and surrounding context. - + + + Reference any file in your workspace with `@/path/to/file`. Cline sees the complete file content, including imports, related + functions, and surrounding context. + + +{" "} Reference entire directories with `@/path/to/folder/`. Cline sees the folder structure and all file contents, perfect for understanding complex interactions between multiple files. +{" "} + Use `@problems` to show Cline all the errors and warnings in your workspace. Cline sees the complete list with file locations and error messages. +{" "} + Use `@terminal` to share your recent terminal output. Cline sees the complete output with formatting preserved, perfect for debugging build errors or test failures. +{" "} + Reference uncommitted changes with `@git-changes` or specific commits with `@[commit-hash]`. Cline sees the complete diff, commit message, and other relevant information. - - Reference web content with `@https://example.com`. Cline fetches and sees the complete webpage content, perfect for - referencing documentation or GitHub issues. - + + Reference web content with `@https://example.com`. Cline fetches and sees the complete webpage content, perfect for + referencing documentation or GitHub issues. + + ## Why @ Mentions Matter diff --git a/docs/features/auto-approve.mdx b/docs/features/auto-approve.mdx new file mode 100644 index 00000000..cbff43e5 --- /dev/null +++ b/docs/features/auto-approve.mdx @@ -0,0 +1,59 @@ +The Auto Approve menu lets you set fine-grained permissions on what you allow Cline to do in an automated way. + + + Auto Approve + + +## How it works + +By default, Cline will ask for your permission before calling any tool, including reading or writing files. + +If you want to allow Cline to do something without asking, you can set the Auto Approve permission for that tool. + +## Permission Options + +- **Read project files** + + - Allows Cline to read files within your current workspace without asking + - **Read all files** + - Extends read permission to files outside your workspace (system files, config files, etc.) + +- **Edit project files** + + - Allows Cline to modify files within your current workspace without confirmation + - **Edit all files** + - Extends modification permission to files outside your workspace + +- **Execute safe commands** + + - Allows execution of terminal commands that the model deems non-destructive + - **Execute all commands** + - Permits execution of any terminal command without asking + +- **Use the browser** + + - Allows Cline to use the browser tool to fetch web content + +- **Use MCP servers** + + - Permits connection to and usage of MCP servers for extended functionality + +- **Maximum requests** + - Sets the number of consecutive automated actions Cline can take before requiring your input + +## Best Practices + +Personally, I like to keep auto-editing disabled because it gives me a chance to review changes every step of the way. + +For most serious development workflows, I recommend starting with: + +- Auto-approving read access to project files +- Setting a reasonable maximum request limit (10-20) + +This gives Cline enough freedom to explore your codebase without constant interruptions, while still requiring permission for edits or potentially destructive actions. + +As you build more trust in Cline's capabilities with your specific projects, you can gradually increase the permissions to match your comfort level. + +Remember that you can always adjust these settings as your needs change - tighten permissions for critical production work, or loosen them when prototyping and exploring. + +You can even use the quick "star" actions to quickly toggle your auto-approved selections on and off as you go. diff --git a/docs/features/checkpoints.mdx b/docs/features/checkpoints.mdx new file mode 100644 index 00000000..1455463f --- /dev/null +++ b/docs/features/checkpoints.mdx @@ -0,0 +1,79 @@ +--- +title: "Checkpoints" +sidebarTitle: "Checkpoints" +--- + +Checkpoints automatically save snapshots of your workspace after each step in a task. This feature lets you track changes, roll back when needed, and experiment confidently with your code. + +## How Checkpoints Work + +Cline creates a checkpoint after each tool use (file edits, commands, etc.). These checkpoints: + +- Work alongside your Git workflow without interference +- Maintain context between restores +- Use a shadow Git repository to track changes + +For example, if you're working on a feature and Cline makes multiple file changes, each change creates a checkpoint. This means you can review each modification and, if needed, roll back to any point without affecting your main Git repository. + +## Viewing Changes & Restoring + +After each tool use, you can: + +1. Click the "Compare" button to see modified files +2. Click the "Restore" button to open restore options + + + Checkpoint comparison and restore options + + +## Restore Options + +To restore to a previous point: + +1. Click the "Restore" button next to any step +2. Choose from three options: + - **Restore Task and Workspace**: Reset both codebase and task to that point + - **Restore Task Only**: Keep codebase changes but revert task context + - **Restore Workspace Only**: Reset codebase while preserving task context + +Example: If Cline makes changes you don't like while styling a component, you can use "Restore Workspace Only" to revert the code changes while keeping the conversation context, allowing you to try a different approach. + + + Checkpoint restore demo + + +## Use Cases + +Checkpoints let you be more experimental with Cline. While human coding is often methodical and iterative, AI can make substantial changes quickly. Checkpoints help you track these changes and revert if needed. + +### Using Auto-Approve Mode + +- Provides safety net for rapid iterations +- Makes it easy to undo unexpected results + +### Testing Different Approaches + +- Try multiple solutions confidently +- Compare different implementations +- Quickly revert to working states +- Ideal for exploring different design patterns or architectural approaches + +## Best Practices + +1. Use checkpoints as safety nets when experimenting +2. Leverage auto-approve mode more confidently, knowing you can always roll back +3. Restore selectively based on needs: + - Use "Restore Task and Workspace" for a fresh start + - Use "Restore Task Only" to try different prompts, but keep file changes + - Use "Restore Workspace Only" to attempt different implementations while preserving conversation context + +## Relationship with Message Editing + +The [message editing feature](/features/editing-messages) uses checkpoints under the hood when you select the "Restore All" option. This allows you to not only edit and resubmit your message but also restore your workspace to the state it was in at that point in the conversation. + +## Deleting Checkpoints + +You can delete all checkpoints by using the **"Delete All History"** button in the task history menu. Note that this will also delete all tasks. Checkpoints are stored in VS Code's globalStorage. diff --git a/docs/features/commands-and-shortcuts/code-commands.mdx b/docs/features/commands-and-shortcuts/code-commands.mdx new file mode 100644 index 00000000..a11119d7 --- /dev/null +++ b/docs/features/commands-and-shortcuts/code-commands.mdx @@ -0,0 +1,129 @@ +--- +title: "Code Commands" +sidebarTitle: "Code Commands" +--- + +Cline's code commands bring AI assistance directly into your editor, letting you interact with your code without leaving your workflow. With a simple right-click, you can add code to Cline, and through the lightbulb menu, you can fix errors, get explanations, or improve your code. + +## Available Code Commands + +When you interact with code in your editor, you can access Cline commands in two ways: + +### Right-Click Context Menu + +When you right-click on selected code, you'll see: + + + Right Click Menu + + +#### Add to Cline + +The "Add to Cline" command sends your selected code to the Cline chat panel. This is perfect for: + +- Asking questions about specific code snippets +- Requesting improvements or optimizations +- Getting explanations of complex logic + +When you use this command, Cline automatically includes: + +- The file path (as a file mention) +- The selected code with proper formatting +- The programming language for accurate syntax highlighting + +### Lightbulb Menu (Code Actions) + +When you see a lightbulb icon in your editor, click it to access these Cline commands: + + + Lightbulb Menu + + +#### Fix with Cline + +The "Fix with Cline" command appears in the lightbulb menu when your code has errors or warnings. This command: + +1. Captures the selected code +2. Identifies the errors or warnings from VSCode's diagnostics +3. Sends both to Cline with a request to fix the issues +4. Provides a solution that addresses the specific problems + +This is incredibly useful for quickly resolving syntax errors, linter warnings, or type issues without having to manually describe the problem. + +#### Explain with Cline + +The "Explain with Cline" command helps you understand complex code. When you select code and use this command from the lightbulb menu, Cline: + +1. Analyzes the selected code +2. Provides a clear explanation of what the code does +3. Breaks down complex logic into understandable parts +4. Highlights important patterns or techniques used + +#### Improve with Cline + +The "Improve with Cline" command helps you enhance your code. When you select code and use this command from the lightbulb menu, Cline: + +1. Analyzes the selected code for potential improvements +2. Suggests optimizations, refactorings, or better practices +3. Explains the reasoning behind the suggested changes +4. Provides improved code that maintains the original functionality + +## How to Use Code Commands + +Using Cline's code commands is simple: + +### For Right-Click Commands: + +1. Select the code you want to work with +2. Right-click to open the context menu +3. Choose "Add to Cline" +4. View the result in the Cline chat panel + +### For Lightbulb Menu Commands: + +1. Select the code you want to work with +2. Look for the lightbulb icon that appears in the editor gutter +3. Click the lightbulb to see available actions +4. Choose the appropriate Cline command (Fix, Explain, or Improve) +5. View the result in the Cline chat panel + +After using any command, you can: + +- Ask follow-up questions +- Request modifications to the solution +- Apply the changes back to your code + +## How It Works Under the Hood + +When you use a code command, here's what happens behind the scenes: + +1. **Code Selection**: The extension captures your selected code and its context +2. **Metadata Collection**: Cline gathers important metadata: + + - File path and name + - Programming language + - Any associated diagnostics (errors/warnings) + - Surrounding code context when relevant + +3. **Command Processing**: + + - For "Add to Cline," the code is formatted and sent to the chat panel + - For "Fix with Cline," the code and diagnostics are analyzed and a fix is generated + - For "Explain with Cline," the code is analyzed to provide a clear explanation + - For "Improve with Cline," the code is analyzed for potential optimizations and improvements + +4. **Integration with Chat**: The results appear in the Cline chat panel, where you can: + - See the AI's response + - Ask follow-up questions + - Apply suggested changes + +This seamless integration between your editor and Cline's AI capabilities makes it easy to get assistance without disrupting your coding flow. + +## Tips for Effective Use + +- **Select complete logical units**: When possible, select entire functions, classes, or modules to give Cline complete context +- **Include imports**: For language-specific help, include relevant imports so Cline understands dependencies +- **Combine with @ mentions**: For complex issues, use code commands along with file or problem mentions for more context +- **Use keyboard shortcuts**: Speed up your workflow by [assigning keyboard shortcuts](/features/commands-and-shortcuts/keyboard-shortcuts) to common code commands + +Next time you're struggling with a piece of code, try using Cline's code commands instead of switching to a separate chat interface. You'll be amazed at how much more efficient your workflow becomes when AI assistance is integrated directly into your editor. diff --git a/docs/features/commands-and-shortcuts/git-integration.mdx b/docs/features/commands-and-shortcuts/git-integration.mdx new file mode 100644 index 00000000..6b7903d4 --- /dev/null +++ b/docs/features/commands-and-shortcuts/git-integration.mdx @@ -0,0 +1,71 @@ +--- +title: "Generate Commit Message" +sidebarTitle: "Generate Commit Message" +--- + +Cline's Git integration brings AI assistance directly to your version control workflow. Generate commit messages without leaving your editor. + +## Generate Commit Message + +One of the most useful Git integrations is the ability to automatically generate meaningful commit messages: + + + Generate Commit Message with Cline + + +1. Make your changes and stage them in Git +2. Click the robot icon in the Source Control view or run the "Generate Commit Message with Cline" command +3. Cline analyzes your changes and generates a descriptive commit message +4. The message is automatically inserted into the commit message input box + +The generated commit messages: + +- Start with a concise summary (50-72 characters) +- Use imperative mood (e.g., "Add feature" not "Added feature") +- Describe what was changed and why +- Follow Git best practices + +This feature saves time and ensures your commit history is consistent and informative. + + + For information about using `@git-changes` and `@[commit-hash]` mentions in your chat messages, see the [Git + Mentions](/features/at-mentions/git-mentions) documentation. + + +## How It Works + +When you use Cline's commit message generation feature, here's what happens behind the scenes: + +1. Cline retrieves the current Git diff using `getWorkingState()` +2. It formats this diff into a specialized prompt for the AI +3. The AI analyzes the changes and generates an appropriate commit message +4. The message is extracted and inserted into the Git commit message input box + +This process uses your current Cline API configuration, so the quality of the generated messages matches your chosen AI model. + +## Tips for Effective Use + +- **Generate commit messages for complex changes**: The AI excels at summarizing multiple related changes into a coherent message. + +- **Review and edit generated messages**: While the AI generates high-quality messages, it's always good practice to review and adjust them if needed. + +- **Stage related changes together**: For the best results, stage related changes together so the AI can generate a cohesive message. + +- **Use for consistent commit history**: Using the generate commit message feature helps maintain a consistent style across your commit history. + +## How It Works Under the Hood + +The commit message generation leverages VSCode's Git extension API to access repository information: + +1. When you trigger the command: + - Cline gets the current diff + - It sends this to the AI with specific instructions for commit message formatting + - It parses the AI's response + - It accesses the Git extension API to set the commit message + +This integration with Git makes it easy to generate high-quality commit messages without disrupting your workflow. + +Next time you're struggling to write a good commit message, try using Cline's commit message generation. You'll save time and improve your version control workflow with AI assistance right where you need it. diff --git a/docs/features/commands-and-shortcuts/keyboard-shortcuts.mdx b/docs/features/commands-and-shortcuts/keyboard-shortcuts.mdx new file mode 100644 index 00000000..6bd6fc4b --- /dev/null +++ b/docs/features/commands-and-shortcuts/keyboard-shortcuts.mdx @@ -0,0 +1,103 @@ +--- +title: "Keyboard Shortcuts" +sidebarTitle: "Keyboard Shortcuts" +--- + +Cline's keyboard shortcuts let you access AI assistance without taking your hands off the keyboard. Speed up your workflow by using hotkeys for common Cline actions. + +## Default Keyboard Shortcuts + +Cline comes with the following built-in keyboard shortcuts to streamline your workflow: + +| Action | Windows/Linux | macOS | Condition | Description | +| ----------------------- | ------------- | ------- | ---------------------------- | ----------------------------------------- | +| Add to Cline | `Ctrl+'` | `Cmd+'` | When text is selected | Adds selected code to Cline chat | +| Focus Chat Input | `Ctrl+'` | `Cmd+'` | When no text is selected | Focuses the Cline chat input field | +| Generate Commit Message | (unset) | (unset) | When Git is the SCM provider | Available through the Source Control view | + +## Available Commands for Custom Shortcuts + +While Cline has only a few default keyboard shortcuts, you can assign your own shortcuts to any of these commands: + +| Command ID | Description | +| ---------------------------------------------------------------------------------------- | --------------------------------------------- | +| [`cline.openInNewTab`](/features/commands-and-shortcuts/overview) | Opens Cline in a new editor tab | +| [`cline.addToChat`](/features/commands-and-shortcuts/code-commands) | Adds selected code to Cline chat | +| [`cline.addTerminalOutputToChat`](/features/commands-and-shortcuts/terminal-integration) | Adds terminal output to Cline | +| `cline.focusChatInput` | Focuses the Cline chat input field | +| [`cline.generateGitCommitMessage`](/features/commands-and-shortcuts/git-integration) | Generates a commit message for staged changes | +| [`cline.explainCode`](/features/commands-and-shortcuts/code-commands) | Explains selected code | +| [`cline.improveCode`](/features/commands-and-shortcuts/code-commands) | Suggests improvements for selected code | +| [`cline.fixWithCline`](/features/commands-and-shortcuts/code-commands) | Fixes code with errors | +| `claude-dev.SidebarProvider.focus` | Opens and focuses the Cline sidebar | + +## Customizing Keyboard Shortcuts + +You can customize Cline's keyboard shortcuts to match your preferences: + +1. Open the Keyboard Shortcuts editor in VSCode: + + - Press `Ctrl+K Ctrl+S` (Windows/Linux) or `Cmd+K Cmd+S` (macOS) + - Or go to File > Preferences > Keyboard Shortcuts + +2. Search for "Cline" to see all available commands + +3. Click on the pencil icon next to any command to change its shortcut + +4. Press the keys you want to assign to that command + +5. Press Enter to save the new shortcut + +## Suggested Custom Shortcuts + +Here are some suggested shortcuts you might find useful: + +| Action | Suggested Shortcut | Command ID | Description | +| --------------------- | ------------------------------ | ----------------------------------------- | ----------------------------- | +| Open Cline Sidebar | `Ctrl+Shift+C` / `Cmd+Shift+C` | `claude-dev.SidebarProvider.focus` | Opens the Cline sidebar panel | +| New Task | `Alt+N` | `cline.plusButtonClicked` | Starts a new Cline task | +| Add Terminal to Cline | `Alt+T` | `cline.addTerminalOutputToChat` | Adds terminal output to Cline | +| Clear Current Task | `Alt+C` | (Requires custom keybinding to UI action) | Clears the current task | + +## Keyboard-Only Workflow + +With the right shortcuts, you can use Cline without ever touching the mouse: + +1. Select code with keyboard navigation (`Shift+Arrow` keys) +2. Send to Cline with `Ctrl+'` / `Cmd+'` +3. Type your question and press Enter +4. Review the response and apply suggestions + +## Editor Integration Shortcuts + +Cline's keyboard shortcuts integrate seamlessly with VSCode's built-in shortcuts: + +- Use VSCode's selection shortcuts (`Ctrl+L` / `Cmd+L` to select line, etc.) before sending code to Cline +- Combine with VSCode's split editor shortcuts to view code and Cline side by side +- Use VSCode's terminal focus shortcut (`` Ctrl+` `` / `` Cmd+` ``) before capturing terminal output + +## Tips for Effective Use + +- **Learn the default shortcut first**: The `Ctrl+'` / `Cmd+'` shortcut is versatile - it adds selected code to chat when text is selected, or focuses the chat input when nothing is selected +- **Create muscle memory**: Use keyboard shortcuts consistently to build habits +- **Customize for your workflow**: Assign shortcuts to commands you use frequently +- **Consider ergonomics**: Choose shortcuts that are comfortable for your keyboard layout + +Keyboard shortcuts may seem like a small optimization, but they can significantly speed up your workflow when using Cline regularly. By keeping your hands on the keyboard, you maintain your coding flow while still getting AI assistance exactly when you need it. + +## How to Find All Available Commands + +To see all Cline commands that can be assigned shortcuts: + +1. Open the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`) +2. Type "Cline" to filter the list +3. Browse the available commands + + + Editor Integration Overview + + +This helps you discover features you might not have known about and assign shortcuts to the ones you use most frequently. diff --git a/docs/features/commands-and-shortcuts/overview.mdx b/docs/features/commands-and-shortcuts/overview.mdx new file mode 100644 index 00000000..ccc437c7 --- /dev/null +++ b/docs/features/commands-and-shortcuts/overview.mdx @@ -0,0 +1,65 @@ +--- +title: "Commands & Shortcuts Overview" +sidebarTitle: "Overview" +--- + +Cline integrates directly into VSCode's interface, letting you access AI assistance without disrupting your workflow. These integrations appear as commands in context menus, keyboard shortcuts, and quick fixes throughout the editor. + + + Editor Integration Overview + + +### What are Editor Integrations? + +Editor integrations are commands and shortcuts that let you use Cline right where you're working. Instead of switching to the Cline panel first, you can select code, right-click, and immediately send it to Cline for help. +These integrations appear in different places throughout VSCode: + +- In the editor context menu (right-click menu) - "Add to Cline" +- In the terminal context menu - "Add to Cline" +- In the Source Control view - "Generate Commit Message" +- As keyboard shortcuts - Various Cline commands +- As Quick Fix options (lightbulb menu) - "Fix with Cline", "Explain with Cline", "Improve with Cline" + +### Available Editor Integrations + +Cline offers several editor integrations, each designed to enhance different aspects of your development workflow: + + + + Right-click on code to add it to Cline, or use the lightbulb menu to fix errors, explain code, or improve it. Cline sees the complete code context, including imports and surrounding functions. + + +{" "} + + + Add terminal output to Cline with a right-click or use `@terminal` mentions. Perfect for debugging build errors, test + failures, or runtime issues. + + +{" "} + + + Generate commit messages, explain diffs, or analyze changes with Cline's Git integration. Cline understands your version + control context. + + +{" "} + + + Speed up your workflow with keyboard shortcuts for common Cline actions. Quickly add code to chat, fix errors, or improve your code. + + + +### How They Work + +When you use these commands, Cline: + +- Captures the relevant context (selected code, file path, terminal output, etc.) +- Focuses the Cline interface +- Creates a conversation with the captured context +- In some cases, automatically generates a suggested prompt + +Behind the scenes, these commands use VSCode's extension API to register commands, access editor state, and control VSCode's interface. diff --git a/docs/features/commands-and-shortcuts/terminal-integration.mdx b/docs/features/commands-and-shortcuts/terminal-integration.mdx new file mode 100644 index 00000000..a453f5f7 --- /dev/null +++ b/docs/features/commands-and-shortcuts/terminal-integration.mdx @@ -0,0 +1,81 @@ +--- +title: "Terminal Integration" +sidebarTitle: "Terminal Integration" +--- + +Cline's terminal integration lets you bring your terminal output directly into your conversations with Cline. Instead of copying and pasting error messages or command results, you can send them to Cline with a simple right-click in the terminal. + + + Terminal Integration + + +## Right-Click Terminal Integration + +When you're working in the VSCode terminal and see output you want to discuss with Cline: + +1. Right-click in the terminal +2. Select "Add to Cline" from the context menu +3. The terminal output is immediately sent to the Cline chat panel + +This is perfect for: + +- Debugging build errors +- Understanding test failures +- Analyzing command output +- Getting help with error messages + +The right-click terminal integration is especially useful when you're already working in the terminal and encounter an issue. + +Instead of switching context to the Cline chat panel and typing a description of the problem, you can send the terminal output directly to Cline with just a couple of clicks. + +Alternatively, you can use the [`@terminal`](/features/at-mentions/terminal-mentions) mention to send the full terminal output to Cline. + + + For information about using `@terminal` mentions in your chat messages, see the [Terminal + Mentions](/features/at-mentions/terminal-mentions) documentation. + + +## How Terminal Integration Works + +When you use the right-click terminal integration, Cline: + +1. Captures the terminal output with all formatting preserved +2. Includes the complete context, including command history and results +3. Formats it appropriately for the AI to understand +4. Enables the AI to see exactly what you're seeing + +This gives Cline the full context it needs to provide accurate help with terminal-related issues. + +## Behind the Scenes + +The terminal integration uses a clever technique to capture terminal output: + +1. When you trigger the integration, Cline: + + - Temporarily saves your current clipboard content + - Selects all terminal content (or uses your existing selection) + - Copies it to the clipboard + - Reads the clipboard to get the terminal content + - Restores your original clipboard content + +2. The terminal content is then: + - Formatted with proper syntax highlighting + - Added to your message or sent as a new message + - Enhanced with additional context when needed + +This approach ensures that all terminal output, including colors and formatting, is accurately captured without affecting your clipboard. + +## Tips for Effective Use + +- **Use terminal integration for error messages**: When you encounter an error in the terminal, sending it to Cline often results in faster resolution than trying to describe the error. + +- **Select specific output when needed**: By default, the integration captures all terminal content, but you can also select specific lines before right-clicking to focus on just the relevant output. + +- **Combine with file mentions**: After sending terminal output to Cline, you can enhance your question by mentioning relevant files using the @ mentions feature. + +- **Use for build and test output**: Terminal integration is particularly useful for understanding complex build errors or test failures that span multiple lines. + +Next time you're staring at a cryptic error message in your terminal, try using Cline's terminal integration instead of copying and pasting. You'll get more accurate help because Cline can see the complete terminal context with proper formatting. diff --git a/docs/features/drag-and-drop.mdx b/docs/features/drag-and-drop.mdx new file mode 100644 index 00000000..97803fb7 --- /dev/null +++ b/docs/features/drag-and-drop.mdx @@ -0,0 +1,14 @@ +--- +title: "Drag & Drop" +sidebarTitle: "Drag & Drop" +--- + +Dragging and dropping files into Cline is a quick way to add images, code, and other files to your conversations. + +Due to VS Code quirks, to drag and drop files into the Cline chat input, you need to hold `Shift` while dragging. + +Dragging and dropping workspace files into Cline will automatically create a [file mention](/features/at-mentions/file-mentions). This allows you to reference the file in your conversation without needing to type out the path. + +### Supported File Types + +Cline supports dragging external images from your file system, as well as files from your workspace. diff --git a/docs/features/editing-messages.mdx b/docs/features/editing-messages.mdx new file mode 100644 index 00000000..8697537d --- /dev/null +++ b/docs/features/editing-messages.mdx @@ -0,0 +1,67 @@ +--- +title: "Editing Messages" +sidebarTitle: "Editing Messages" +--- + +Cline allows you to edit chat messages in a task after they've been submitted. This feature lets you refine your requests without starting a new task, helping you get better results with minimal disruption to your workflow. + +## When to Edit Messages + +You might want to edit a message when: + +- You didn't get the results you wanted +- You thought of a better way to phrase your request +- You need to add more information or context +- You made a typo or error in your original message + +## How to Edit Messages + +1. Click on any message in the conversation (except the initial task message) +2. Edit the text as needed +3. Use the restore options to resubmit your request + + + Message editing interface + + +## Restore Options + +When you edit a message, you have two options for restoring: + +### Restore Chat + +The "Restore Chat" option: + +- Restores just the task state +- Re-submits an API request with your edited message +- Preserves all file changes made up to that point +- Is useful when you want to keep the current state of your workspace + +### Restore All + +The "Restore All" option: + +- Restores both the task state and workspace state +- Re-submits an API request with your edited message +- Reverts your workspace to how it was at that point in the conversation +- Uses [checkpoints](/features/checkpoints) under the hood to restore your workspace +- Is useful when you want to try a completely different approach + +## Keyboard Shortcuts + +When editing a message, you can use these keyboard shortcuts: + +- **Escape**: Exit edit mode without making changes +- **Enter**: Restore just the task (equivalent to "Restore Chat") +- **Cmd/Ctrl + Enter**: Restore the task and workspace (equivalent to "Restore All") +- **Shift + Enter**: Insert a new line / line break in your message + +## Best Practices + +- Use message editing for minor adjustments to your requests +- For major changes in direction, consider starting a new task +- When using "Restore All," be aware that any file changes made after that message will be reverted +- Edit messages closer to the beginning of a conversation to avoid losing significant progress diff --git a/docs/features/plan-and-act.mdx b/docs/features/plan-and-act.mdx index d258e9c6..830fac41 100644 --- a/docs/features/plan-and-act.mdx +++ b/docs/features/plan-and-act.mdx @@ -117,7 +117,7 @@ Complex projects often require multiple plan-act cycles: - Use Plan mode to explore edge cases before implementation - Switch back to Plan when encountering unexpected complexity -- Leverage file reading to validate assumptions early +- Leverage [file reading](/features/at-mentions/file-mentions) to validate assumptions early - Have Cline write markdown files of the plan for future reference ### Common Patterns diff --git a/docs/features/slash-commands/workflows.mdx b/docs/features/slash-commands/workflows.mdx index a701717e..f7f9e934 100644 --- a/docs/features/slash-commands/workflows.mdx +++ b/docs/features/slash-commands/workflows.mdx @@ -9,7 +9,7 @@ To invoke a workflow, type `/[workflow-name.md]` in the chat. ## How to Create and Use Workflows -Workflows live alongside Cline Rules. Creating one is straightforward: +Workflows live alongside [Cline Rules](/features/cline-rules). Creating one is straightforward: Workflows tab in Cline @@ -22,9 +22,9 @@ Workflows live alongside Cline Rules. Creating one is straightforward: The real power comes from how you structure your workflow files. You can: -- Leverage Cline's built-in tools like `ask_followup_question`, `read_file`, and `search_files` +- Leverage Cline's [built-in tools](/exploring-clines-tools/cline-tools-guide) like `ask_followup_question`, `read_file`, `search_files`, and `new_task` - Use command-line tools you already have installed like `gh` or `docker` -- Reference external MCP tool calls like Slack or Whatsapp +- Reference external [MCP tool calls](/mcp/mcp-overview) like Slack or Whatsapp - Chain multiple actions together in a specific sequence ## Real-world Example @@ -416,7 +416,7 @@ When I get a new PR to review, I used to manually gather context: checking the P 2. Paste in the PR number 3. Let Cline handle everything else -My workflow uses the `gh` command-line tool to: +My workflow uses the `gh` command-line tool and Cline's built in `ask_followup_question` to: - Pull the PR description and comments - Examine the diff From 8356e058c1c2efcb0c8ec13bec624bed55b1f155 Mon Sep 17 00:00:00 2001 From: Alejandro Peral Taboada <62059840+alejandropta@users.noreply.github.com> Date: Wed, 21 May 2025 19:17:26 +0200 Subject: [PATCH 31/85] feat: support streameable http transport (#3413) * feat: support Stremeable Http transport * feat: add http to rpc method --- .changeset/rare-flowers-switch.md | 5 +++++ esbuild.js | 8 ------- package-lock.json | 34 ++++++++++++++--------------- package.json | 2 +- src/services/mcp/McpHub.ts | 36 ++++++++++++++++++------------- 5 files changed, 44 insertions(+), 41 deletions(-) create mode 100644 .changeset/rare-flowers-switch.md diff --git a/.changeset/rare-flowers-switch.md b/.changeset/rare-flowers-switch.md new file mode 100644 index 00000000..fbd52a89 --- /dev/null +++ b/.changeset/rare-flowers-switch.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Support Streameable Http Transport for MCPs diff --git a/esbuild.js b/esbuild.js index a71a07ae..a8ec230f 100644 --- a/esbuild.js +++ b/esbuild.js @@ -134,14 +134,6 @@ const baseConfig = { aliasResolverPlugin, /* add to the end of plugins array */ esbuildProblemMatcherPlugin, - { - name: "alias-plugin", - setup(build) { - build.onResolve({ filter: /^pkce-challenge$/ }, (args) => { - return { path: require.resolve("pkce-challenge/dist/index.browser.js") } - }) - }, - }, ], format: "cjs", sourcesContent: false, diff --git a/package-lock.json b/package-lock.json index 93f3aaf2..84d36b21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "@grpc/grpc-js": "^1.9.15", "@grpc/reflection": "^1.0.4", "@mistralai/mistralai": "^1.5.0", - "@modelcontextprotocol/sdk": "^1.7.0", + "@modelcontextprotocol/sdk": "^1.11.1", "@opentelemetry/api": "^1.4.1", "@opentelemetry/exporter-trace-otlp-http": "^0.39.1", "@opentelemetry/resources": "^1.30.1", @@ -7600,17 +7600,17 @@ "license": "BSD-2-Clause" }, "node_modules/@modelcontextprotocol/sdk": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.7.0.tgz", - "integrity": "sha512-IYPe/FLpvF3IZrd/f5p5ffmWhMc3aEMuM2wGJASDqC2Ge7qatVCdbfPx3n/5xFeb19xN0j/911M2AaFuircsWA==", - "license": "MIT", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.11.1.tgz", + "integrity": "sha512-9LfmxKTb1v+vUS1/emSk1f5ePmTLkb9Le9AxOB5T0XM59EUumwcS45z05h7aiZx3GI0Bl7mjb3FMEglYj+acuQ==", "dependencies": { "content-type": "^1.0.5", "cors": "^2.8.5", + "cross-spawn": "^7.0.3", "eventsource": "^3.0.2", "express": "^5.0.1", "express-rate-limit": "^7.5.0", - "pkce-challenge": "^4.1.0", + "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", "zod": "^3.23.8", "zod-to-json-schema": "^3.24.1" @@ -21465,10 +21465,9 @@ } }, "node_modules/pkce-challenge": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-4.1.0.tgz", - "integrity": "sha512-ZBmhE1C9LcPoH9XZSdwiPtbPHZROwAnMy+kIFQVrnMCxY4Cudlz3gBOpzilgc0jOgRaiT3sIWfpMomW2ar2orQ==", - "license": "MIT", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.0.tgz", + "integrity": "sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==", "engines": { "node": ">=16.20.0" } @@ -31509,16 +31508,17 @@ "integrity": "sha512-Y28PR25bHXUg88kCV7nivXrP2Nj2RueZ3/l/jdx6J9f8J4nsEGcgX0Qe6lt7Pa+J79+kPiJU3LguR6O/6zrLOw==" }, "@modelcontextprotocol/sdk": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.7.0.tgz", - "integrity": "sha512-IYPe/FLpvF3IZrd/f5p5ffmWhMc3aEMuM2wGJASDqC2Ge7qatVCdbfPx3n/5xFeb19xN0j/911M2AaFuircsWA==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.11.1.tgz", + "integrity": "sha512-9LfmxKTb1v+vUS1/emSk1f5ePmTLkb9Le9AxOB5T0XM59EUumwcS45z05h7aiZx3GI0Bl7mjb3FMEglYj+acuQ==", "requires": { "content-type": "^1.0.5", "cors": "^2.8.5", + "cross-spawn": "^7.0.3", "eventsource": "^3.0.2", "express": "^5.0.1", "express-rate-limit": "^7.5.0", - "pkce-challenge": "^4.1.0", + "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", "zod": "^3.23.8", "zod-to-json-schema": "^3.24.1" @@ -41248,9 +41248,9 @@ "dev": true }, "pkce-challenge": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-4.1.0.tgz", - "integrity": "sha512-ZBmhE1C9LcPoH9XZSdwiPtbPHZROwAnMy+kIFQVrnMCxY4Cudlz3gBOpzilgc0jOgRaiT3sIWfpMomW2ar2orQ==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.0.tgz", + "integrity": "sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==" }, "pony-cause": { "version": "1.1.1", diff --git a/package.json b/package.json index 8d84a4f8..e9b5d3f2 100644 --- a/package.json +++ b/package.json @@ -341,7 +341,7 @@ "@grpc/grpc-js": "^1.9.15", "@grpc/reflection": "^1.0.4", "@mistralai/mistralai": "^1.5.0", - "@modelcontextprotocol/sdk": "^1.7.0", + "@modelcontextprotocol/sdk": "^1.11.1", "@opentelemetry/api": "^1.4.1", "@opentelemetry/exporter-trace-otlp-http": "^0.39.1", "@opentelemetry/resources": "^1.30.1", diff --git a/src/services/mcp/McpHub.ts b/src/services/mcp/McpHub.ts index 1cff318e..96e86a65 100644 --- a/src/services/mcp/McpHub.ts +++ b/src/services/mcp/McpHub.ts @@ -30,6 +30,7 @@ import { arePathsEqual } from "@utils/path" import { secondsToMs } from "@utils/time" import { GlobalFileNames } from "@core/storage/disk" import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js" +import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js" import { ExtensionMessage } from "@shared/ExtensionMessage" // Default timeout for internal MCP data requests in milliseconds; is not the same as the user facing timeout stored as DEFAULT_MCP_TIMEOUT_SECONDS @@ -38,10 +39,10 @@ const DEFAULT_REQUEST_TIMEOUT_MS = 5000 export type McpConnection = { server: McpServer client: Client - transport: StdioClientTransport | SSEClientTransport + transport: StdioClientTransport | SSEClientTransport | StreamableHTTPClientTransport } -export type McpTransportType = "stdio" | "sse" +export type McpTransportType = "stdio" | "sse" | "http" export type McpServerConfig = z.infer @@ -54,22 +55,23 @@ const BaseConfigSchema = z.object({ }) const SseConfigSchema = BaseConfigSchema.extend({ + transportType: z.literal("sse"), url: z.string().url(), -}).transform((config) => ({ - ...config, - transportType: "sse" as const, -})) +}) const StdioConfigSchema = BaseConfigSchema.extend({ + transportType: z.literal("stdio"), command: z.string(), args: z.array(z.string()).optional(), env: z.record(z.string()).optional(), -}).transform((config) => ({ - ...config, - transportType: "stdio" as const, -})) +}) -const ServerConfigSchema = z.union([StdioConfigSchema, SseConfigSchema]) +const StreamableHTTPConfigSchema = BaseConfigSchema.extend({ + transportType: z.literal("http"), + url: z.string().url(), +}) + +const ServerConfigSchema = z.discriminatedUnion("transportType", [StdioConfigSchema, SseConfigSchema, StreamableHTTPConfigSchema]) const McpSettingsSchema = z.object({ mcpServers: z.record(ServerConfigSchema), @@ -183,7 +185,7 @@ export class McpHub { private async connectToServerRPC( name: string, - config: z.infer | z.infer, + config: z.infer | z.infer | z.infer, ): Promise { // Remove existing connection if it exists (should never happen, the connection should be deleted beforehand) this.connections = this.connections.filter((conn) => conn.server.name !== name) @@ -200,10 +202,12 @@ export class McpHub { }, ) - let transport: StdioClientTransport | SSEClientTransport + let transport: StdioClientTransport | SSEClientTransport | StreamableHTTPClientTransport if (config.transportType === "sse") { transport = new SSEClientTransport(new URL(config.url), {}) + } else if (config.transportType === "http") { + transport = new StreamableHTTPClientTransport(new URL(config.url), {}) } else { transport = new StdioClientTransport({ command: config.command, @@ -297,7 +301,7 @@ export class McpHub { private async connectToServer( name: string, - config: z.infer | z.infer, + config: z.infer | z.infer | z.infer, ): Promise { // Remove existing connection if it exists (should never happen, the connection should be deleted beforehand) this.connections = this.connections.filter((conn) => conn.server.name !== name) @@ -314,10 +318,12 @@ export class McpHub { }, ) - let transport: StdioClientTransport | SSEClientTransport + let transport: StdioClientTransport | SSEClientTransport | StreamableHTTPClientTransport if (config.transportType === "sse") { transport = new SSEClientTransport(new URL(config.url), {}) + } else if (config.transportType === "http") { + transport = new StreamableHTTPClientTransport(new URL(config.url), {}) } else { transport = new StdioClientTransport({ command: config.command, From 9f192768bc4e7e0e20bc6e5aacd0fb5a4acd8f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Barreiro?= <52393857+BarreiroT@users.noreply.github.com> Date: Wed, 21 May 2025 21:50:39 +0200 Subject: [PATCH 32/85] fix: handle mistral sdk api errors (#3698) --- .changeset/slimy-bees-fail.md | 5 +++++ src/api/providers/mistral.ts | 24 +++++++++++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 .changeset/slimy-bees-fail.md diff --git a/.changeset/slimy-bees-fail.md b/.changeset/slimy-bees-fail.md new file mode 100644 index 00000000..210eaad2 --- /dev/null +++ b/.changeset/slimy-bees-fail.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Handle Mistral SDK API errors diff --git a/src/api/providers/mistral.ts b/src/api/providers/mistral.ts index 9bcd8c06..b1ece0d9 100644 --- a/src/api/providers/mistral.ts +++ b/src/api/providers/mistral.ts @@ -19,13 +19,23 @@ export class MistralHandler implements ApiHandler { @withRetry() async *createMessage(systemPrompt: string, messages: Anthropic.Messages.MessageParam[]): ApiStream { - const stream = await this.client.chat.stream({ - model: this.getModel().id, - // max_completion_tokens: this.getModel().info.maxTokens, - temperature: 0, - messages: [{ role: "system", content: systemPrompt }, ...convertToMistralMessages(messages)], - stream: true, - }) + const stream = await this.client.chat + .stream({ + model: this.getModel().id, + // max_completion_tokens: this.getModel().info.maxTokens, + temperature: 0, + messages: [{ role: "system", content: systemPrompt }, ...convertToMistralMessages(messages)], + stream: true, + }) + .catch((err) => { + // The Mistal SDK uses statusCode instead of status + // However, if they introduce status for something, I don't want to override it + if ("statusCode" in err && !("status" in err)) { + err.status = err.statusCode + } + + throw err + }) for await (const chunk of stream) { const delta = chunk.data.choices[0]?.delta From b669dfbc7e695872b1cdb9cac4537aa07ef8d605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Barreiro?= <52393857+BarreiroT@users.noreply.github.com> Date: Wed, 21 May 2025 21:53:35 +0200 Subject: [PATCH 33/85] feat: Add devstrall-small-2505 to the Mistral model list (#3697) * Add devstrall-small-2505 to the Mistral model list * update context information and set as default --- .changeset/strong-lizards-greet.md | 5 +++++ src/shared/api.ts | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .changeset/strong-lizards-greet.md diff --git a/.changeset/strong-lizards-greet.md b/.changeset/strong-lizards-greet.md new file mode 100644 index 00000000..00a180ce --- /dev/null +++ b/.changeset/strong-lizards-greet.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Add devstral-small to the Mistral model list diff --git a/src/shared/api.ts b/src/shared/api.ts index b424cf54..74efb013 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -1392,7 +1392,7 @@ export const doubaoModels = { // Mistral // https://docs.mistral.ai/getting-started/models/models_overview/ export type MistralModelId = keyof typeof mistralModels -export const mistralDefaultModelId: MistralModelId = "codestral-2501" +export const mistralDefaultModelId: MistralModelId = "devstral-small-2505" export const mistralModels = { "mistral-large-2411": { maxTokens: 131_000, @@ -1482,6 +1482,14 @@ export const mistralModels = { inputPrice: 0.3, outputPrice: 0.9, }, + "devstral-small-2505": { + maxTokens: 128_000, + contextWindow: 131_072, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0.1, + outputPrice: 0.3, + }, } as const satisfies Record // LiteLLM From 47eacdc545c5660e8441fced2ba84c6b13ffeb3e Mon Sep 17 00:00:00 2001 From: pashpashpash Date: Wed, 21 May 2025 13:11:28 -0700 Subject: [PATCH 34/85] Pashpashpash/rules links (#3701) * adding docs links to rules modal * changeset --------- Co-authored-by: Cline Evaluation --- .changeset/fast-days-poke.md | 5 +++++ .../cline-rules/ClineRulesToggleModal.tsx | 18 +++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 .changeset/fast-days-poke.md diff --git a/.changeset/fast-days-poke.md b/.changeset/fast-days-poke.md new file mode 100644 index 00000000..e15d1774 --- /dev/null +++ b/.changeset/fast-days-poke.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Added documentation links to rules & workflows UI diff --git a/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx b/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx index 41da5c85..e0dbd4be 100644 --- a/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx +++ b/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx @@ -4,7 +4,7 @@ import { useExtensionState } from "@/context/ExtensionStateContext" import { CODE_BLOCK_BG_COLOR } from "@/components/common/CodeBlock" import { vscode } from "@/utils/vscode" import { FileServiceClient } from "@/services/grpc-client" -import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" +import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react" import RulesToggleList from "./RulesToggleList" import Tooltip from "@/components/common/Tooltip" import styled from "styled-components" @@ -222,7 +222,13 @@ const ClineRulesToggleModal: React.FC = () => { {currentView === "rules" ? (

Rules allow you to provide Cline with system-level guidance. Think of them as a persistent way to - include context and preferences for your projects or globally for every conversation. + include context and preferences for your projects or globally for every conversation.{" "} + + Docs +

) : (

@@ -233,7 +239,13 @@ const ClineRulesToggleModal: React.FC = () => { text-[var(--vscode-foreground)] font-bold"> /workflow-name {" "} - in the chat. + in the chat.{" "} + + Docs +

)}
From eae28f1cee74c45bb880df88bd69758593ecaf92 Mon Sep 17 00:00:00 2001 From: Ara Date: Thu, 22 May 2025 00:11:35 +0400 Subject: [PATCH 35/85] Fixing Typescript type errors in MCP hub (#3700) * Fixing Typescript type errors in MCP hub * Fixing Typescript type errors in MCP hub --------- Co-authored-by: Cline Evaluation --- .changeset/cuddly-worms-peel.md | 5 +++++ src/services/mcp/McpHub.ts | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .changeset/cuddly-worms-peel.md diff --git a/.changeset/cuddly-worms-peel.md b/.changeset/cuddly-worms-peel.md new file mode 100644 index 00000000..d336ffc1 --- /dev/null +++ b/.changeset/cuddly-worms-peel.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Fix Typescript type errors in MCP hub diff --git a/src/services/mcp/McpHub.ts b/src/services/mcp/McpHub.ts index 96e86a65..9c81e957 100644 --- a/src/services/mcp/McpHub.ts +++ b/src/services/mcp/McpHub.ts @@ -784,7 +784,7 @@ export class McpHub { console.error(`Failed to parse timeout configuration for server ${serverName}: ${error}`) } - return await connection.client.request( + const result = await connection.client.request( { method: "tools/call", params: { @@ -797,6 +797,11 @@ export class McpHub { timeout, }, ) + + return { + ...result, + content: result.content ?? [], + } } /** From e2da226c10959f63f021f7a82d168234cb53d1bd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 13:26:45 -0700 Subject: [PATCH 36/85] v3.16.3 Release Notes v3.16.3 Release Notes --- .changeset/cold-rice-exist.md | 5 ----- .changeset/cuddly-worms-peel.md | 5 ----- .changeset/eight-sheep-remember.md | 5 ----- .changeset/fast-days-poke.md | 5 ----- .changeset/rare-flowers-switch.md | 5 ----- .changeset/slimy-bees-fail.md | 5 ----- .changeset/strong-lizards-greet.md | 5 ----- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 10 files changed, 10 insertions(+), 38 deletions(-) delete mode 100644 .changeset/cold-rice-exist.md delete mode 100644 .changeset/cuddly-worms-peel.md delete mode 100644 .changeset/eight-sheep-remember.md delete mode 100644 .changeset/fast-days-poke.md delete mode 100644 .changeset/rare-flowers-switch.md delete mode 100644 .changeset/slimy-bees-fail.md delete mode 100644 .changeset/strong-lizards-greet.md diff --git a/.changeset/cold-rice-exist.md b/.changeset/cold-rice-exist.md deleted file mode 100644 index 0e1e147d..00000000 --- a/.changeset/cold-rice-exist.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Migrate openSettings message to use state navigation handlers diff --git a/.changeset/cuddly-worms-peel.md b/.changeset/cuddly-worms-peel.md deleted file mode 100644 index d336ffc1..00000000 --- a/.changeset/cuddly-worms-peel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Fix Typescript type errors in MCP hub diff --git a/.changeset/eight-sheep-remember.md b/.changeset/eight-sheep-remember.md deleted file mode 100644 index 33d51c8b..00000000 --- a/.changeset/eight-sheep-remember.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Migrate refreshClineRules to protobus diff --git a/.changeset/fast-days-poke.md b/.changeset/fast-days-poke.md deleted file mode 100644 index e15d1774..00000000 --- a/.changeset/fast-days-poke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Added documentation links to rules & workflows UI diff --git a/.changeset/rare-flowers-switch.md b/.changeset/rare-flowers-switch.md deleted file mode 100644 index fbd52a89..00000000 --- a/.changeset/rare-flowers-switch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Support Streameable Http Transport for MCPs diff --git a/.changeset/slimy-bees-fail.md b/.changeset/slimy-bees-fail.md deleted file mode 100644 index 210eaad2..00000000 --- a/.changeset/slimy-bees-fail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Handle Mistral SDK API errors diff --git a/.changeset/strong-lizards-greet.md b/.changeset/strong-lizards-greet.md deleted file mode 100644 index 00a180ce..00000000 --- a/.changeset/strong-lizards-greet.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Add devstral-small to the Mistral model list diff --git a/CHANGELOG.md b/CHANGELOG.md index 452268b3..97b8e57b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.16.3] + +- Add devstral-small-2505 to the Mistral model list, a new specialized coding model from Mistral AI (Thanks @BarreiroT!) +- Add documentation links to rules & workflows UI +- Add support for Streameable HTTP Transport for MCPs (Thanks @alejandropta!) +- Improve error handling for Mistral SDK API + ## [3.16.2] - Add support for Gemini 2.5 Flash Preview 05-20 model to Vertex AI provider with massive 1M token context window (Thanks @omercelik!) diff --git a/package-lock.json b/package-lock.json index 84d36b21..ba847096 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "claude-dev", - "version": "3.16.2", + "version": "3.16.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "claude-dev", - "version": "3.16.2", + "version": "3.16.3", "license": "Apache-2.0", "dependencies": { "@anthropic-ai/bedrock-sdk": "^0.12.4", diff --git a/package.json b/package.json index e9b5d3f2..f2cc022f 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "claude-dev", "displayName": "Cline", "description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.", - "version": "3.16.2", + "version": "3.16.3", "icon": "assets/icons/icon.png", "engines": { "vscode": "^1.84.0" From cd927ae279a84bb2c33a3ba3e2b358c7720c1352 Mon Sep 17 00:00:00 2001 From: Andrei Eternal Date: Wed, 21 May 2025 14:39:46 -0700 Subject: [PATCH 37/85] gitignore protobuf generated files & git rm (#3661) --- .gitignore | 8 + package.json | 4 +- src/core/controller/account/index.ts | 22 - src/core/controller/account/methods.ts | 14 - src/core/controller/browser/index.ts | 22 - src/core/controller/browser/methods.ts | 22 - src/core/controller/checkpoints/index.ts | 22 - src/core/controller/checkpoints/methods.ts | 14 - src/core/controller/file/index.ts | 22 - src/core/controller/file/methods.ts | 38 - src/core/controller/grpc-service-config.ts | 80 - src/core/controller/mcp/index.ts | 22 - src/core/controller/mcp/methods.ts | 26 - src/core/controller/models/index.ts | 22 - src/core/controller/models/methods.ts | 22 - src/core/controller/slash/index.ts | 22 - src/core/controller/slash/methods.ts | 14 - src/core/controller/state/index.ts | 22 - src/core/controller/state/methods.ts | 25 - src/core/controller/task/index.ts | 22 - src/core/controller/task/methods.ts | 34 - src/core/controller/web/index.ts | 22 - src/core/controller/web/methods.ts | 14 - src/shared/proto/account.ts | 44 - src/shared/proto/browser.ts | 756 -------- src/shared/proto/checkpoints.ts | 192 --- src/shared/proto/common.ts | 934 ---------- src/shared/proto/file.ts | 1813 -------------------- src/shared/proto/mcp.ts | 1632 ------------------ src/shared/proto/models.ts | 773 --------- src/shared/proto/slash.ts | 36 - src/shared/proto/state.ts | 478 ------ src/shared/proto/task.ts | 1241 -------------- src/shared/proto/web.ts | 295 ---- src/standalone/server-setup.ts | 201 --- webview-ui/src/services/grpc-client.ts | 41 - 36 files changed, 10 insertions(+), 8961 deletions(-) delete mode 100644 src/core/controller/account/index.ts delete mode 100644 src/core/controller/account/methods.ts delete mode 100644 src/core/controller/browser/index.ts delete mode 100644 src/core/controller/browser/methods.ts delete mode 100644 src/core/controller/checkpoints/index.ts delete mode 100644 src/core/controller/checkpoints/methods.ts delete mode 100644 src/core/controller/file/index.ts delete mode 100644 src/core/controller/file/methods.ts delete mode 100644 src/core/controller/grpc-service-config.ts delete mode 100644 src/core/controller/mcp/index.ts delete mode 100644 src/core/controller/mcp/methods.ts delete mode 100644 src/core/controller/models/index.ts delete mode 100644 src/core/controller/models/methods.ts delete mode 100644 src/core/controller/slash/index.ts delete mode 100644 src/core/controller/slash/methods.ts delete mode 100644 src/core/controller/state/index.ts delete mode 100644 src/core/controller/state/methods.ts delete mode 100644 src/core/controller/task/index.ts delete mode 100644 src/core/controller/task/methods.ts delete mode 100644 src/core/controller/web/index.ts delete mode 100644 src/core/controller/web/methods.ts delete mode 100644 src/shared/proto/account.ts delete mode 100644 src/shared/proto/browser.ts delete mode 100644 src/shared/proto/checkpoints.ts delete mode 100644 src/shared/proto/common.ts delete mode 100644 src/shared/proto/file.ts delete mode 100644 src/shared/proto/mcp.ts delete mode 100644 src/shared/proto/models.ts delete mode 100644 src/shared/proto/slash.ts delete mode 100644 src/shared/proto/state.ts delete mode 100644 src/shared/proto/task.ts delete mode 100644 src/shared/proto/web.ts delete mode 100644 src/standalone/server-setup.ts delete mode 100644 webview-ui/src/services/grpc-client.ts diff --git a/.gitignore b/.gitignore index bbbe5c20..6d463252 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,11 @@ coverage !.github/scripts/coverage/ *evals.env + +# Generated proto files +src/shared/proto/*.ts +src/core/controller/*/methods.ts +src/core/controller/*/index.ts +src/core/controller/grpc-service-config.ts +webview-ui/src/services/grpc-client.ts +src/standalone/server-setup.ts diff --git a/package.json b/package.json index f2cc022f..e5988945 100644 --- a/package.json +++ b/package.json @@ -260,7 +260,7 @@ "scripts": { "vscode:prepublish": "npm run package", "compile": "npm run check-types && npm run lint && node esbuild.js", - "compile-standalone": "npm run protos && npm run check-types && npm run lint && node esbuild.js --standalone", + "compile-standalone": "npm run check-types && npm run lint && node esbuild.js --standalone", "postcompile-standalone": "node scripts/package-standalone.mjs", "watch": "npm-run-all -p watch:*", "watch:esbuild": "node esbuild.js --watch", @@ -271,7 +271,7 @@ "compile-tests": "node ./scripts/build-tests.js", "watch-tests": "tsc -p . -w --outDir out", "pretest": "npm run compile-tests && npm run compile && npm run lint", - "check-types": "tsc --noEmit", + "check-types": "npm run protos && tsc --noEmit", "lint": "eslint src --ext ts && eslint webview-ui/src --ext ts", "format": "prettier . --check", "format:fix": "prettier . --write", diff --git a/src/core/controller/account/index.ts b/src/core/controller/account/index.ts deleted file mode 100644 index 6ec7c2da..00000000 --- a/src/core/controller/account/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create account service registry -const accountService = createServiceRegistry("account") - -// Export the method handler types and registration function -export type AccountMethodHandler = ServiceMethodHandler -export type AccountStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = accountService.registerMethod - -// Export the request handlers -export const handleAccountServiceRequest = accountService.handleRequest -export const handleAccountServiceStreamingRequest = accountService.handleStreamingRequest -export const isStreamingMethod = accountService.isStreamingMethod - -// Register all account methods -registerAllMethods() diff --git a/src/core/controller/account/methods.ts b/src/core/controller/account/methods.ts deleted file mode 100644 index 287c3fe6..00000000 --- a/src/core/controller/account/methods.ts +++ /dev/null @@ -1,14 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { accountLoginClicked } from "./accountLoginClicked" -import { accountLogoutClicked } from "./accountLogoutClicked" - -// Register all account service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("accountLoginClicked", accountLoginClicked) - registerMethod("accountLogoutClicked", accountLogoutClicked) -} diff --git a/src/core/controller/browser/index.ts b/src/core/controller/browser/index.ts deleted file mode 100644 index 6edfd242..00000000 --- a/src/core/controller/browser/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create browser service registry -const browserService = createServiceRegistry("browser") - -// Export the method handler types and registration function -export type BrowserMethodHandler = ServiceMethodHandler -export type BrowserStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = browserService.registerMethod - -// Export the request handlers -export const handleBrowserServiceRequest = browserService.handleRequest -export const handleBrowserServiceStreamingRequest = browserService.handleStreamingRequest -export const isStreamingMethod = browserService.isStreamingMethod - -// Register all browser methods -registerAllMethods() diff --git a/src/core/controller/browser/methods.ts b/src/core/controller/browser/methods.ts deleted file mode 100644 index 4800191d..00000000 --- a/src/core/controller/browser/methods.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { discoverBrowser } from "./discoverBrowser" -import { getBrowserConnectionInfo } from "./getBrowserConnectionInfo" -import { getDetectedChromePath } from "./getDetectedChromePath" -import { relaunchChromeDebugMode } from "./relaunchChromeDebugMode" -import { testBrowserConnection } from "./testBrowserConnection" -import { updateBrowserSettings } from "./updateBrowserSettings" - -// Register all browser service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("discoverBrowser", discoverBrowser) - registerMethod("getBrowserConnectionInfo", getBrowserConnectionInfo) - registerMethod("getDetectedChromePath", getDetectedChromePath) - registerMethod("relaunchChromeDebugMode", relaunchChromeDebugMode) - registerMethod("testBrowserConnection", testBrowserConnection) - registerMethod("updateBrowserSettings", updateBrowserSettings) -} diff --git a/src/core/controller/checkpoints/index.ts b/src/core/controller/checkpoints/index.ts deleted file mode 100644 index 33fc6953..00000000 --- a/src/core/controller/checkpoints/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create checkpoints service registry -const checkpointsService = createServiceRegistry("checkpoints") - -// Export the method handler types and registration function -export type CheckpointsMethodHandler = ServiceMethodHandler -export type CheckpointsStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = checkpointsService.registerMethod - -// Export the request handlers -export const handleCheckpointsServiceRequest = checkpointsService.handleRequest -export const handleCheckpointsServiceStreamingRequest = checkpointsService.handleStreamingRequest -export const isStreamingMethod = checkpointsService.isStreamingMethod - -// Register all checkpoints methods -registerAllMethods() diff --git a/src/core/controller/checkpoints/methods.ts b/src/core/controller/checkpoints/methods.ts deleted file mode 100644 index 64bb2886..00000000 --- a/src/core/controller/checkpoints/methods.ts +++ /dev/null @@ -1,14 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { checkpointDiff } from "./checkpointDiff" -import { checkpointRestore } from "./checkpointRestore" - -// Register all checkpoints service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("checkpointDiff", checkpointDiff) - registerMethod("checkpointRestore", checkpointRestore) -} diff --git a/src/core/controller/file/index.ts b/src/core/controller/file/index.ts deleted file mode 100644 index daa6e632..00000000 --- a/src/core/controller/file/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create file service registry -const fileService = createServiceRegistry("file") - -// Export the method handler types and registration function -export type FileMethodHandler = ServiceMethodHandler -export type FileStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = fileService.registerMethod - -// Export the request handlers -export const handleFileServiceRequest = fileService.handleRequest -export const handleFileServiceStreamingRequest = fileService.handleStreamingRequest -export const isStreamingMethod = fileService.isStreamingMethod - -// Register all file methods -registerAllMethods() diff --git a/src/core/controller/file/methods.ts b/src/core/controller/file/methods.ts deleted file mode 100644 index 55dc01aa..00000000 --- a/src/core/controller/file/methods.ts +++ /dev/null @@ -1,38 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { copyToClipboard } from "./copyToClipboard" -import { createRuleFile } from "./createRuleFile" -import { deleteRuleFile } from "./deleteRuleFile" -import { getRelativePaths } from "./getRelativePaths" -import { openFile } from "./openFile" -import { openImage } from "./openImage" -import { openMention } from "./openMention" -import { refreshRules } from "./refreshRules" -import { searchCommits } from "./searchCommits" -import { searchFiles } from "./searchFiles" -import { selectImages } from "./selectImages" -import { toggleClineRule } from "./toggleClineRule" -import { toggleCursorRule } from "./toggleCursorRule" -import { toggleWindsurfRule } from "./toggleWindsurfRule" - -// Register all file service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("copyToClipboard", copyToClipboard) - registerMethod("createRuleFile", createRuleFile) - registerMethod("deleteRuleFile", deleteRuleFile) - registerMethod("getRelativePaths", getRelativePaths) - registerMethod("openFile", openFile) - registerMethod("openImage", openImage) - registerMethod("openMention", openMention) - registerMethod("refreshRules", refreshRules) - registerMethod("searchCommits", searchCommits) - registerMethod("searchFiles", searchFiles) - registerMethod("selectImages", selectImages) - registerMethod("toggleClineRule", toggleClineRule) - registerMethod("toggleCursorRule", toggleCursorRule) - registerMethod("toggleWindsurfRule", toggleWindsurfRule) -} diff --git a/src/core/controller/grpc-service-config.ts b/src/core/controller/grpc-service-config.ts deleted file mode 100644 index 136f2c9c..00000000 --- a/src/core/controller/grpc-service-config.ts +++ /dev/null @@ -1,80 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { Controller } from "./index" -import { StreamingResponseHandler } from "./grpc-handler" -import { handleAccountServiceRequest, handleAccountServiceStreamingRequest } from "./account/index" -import { handleBrowserServiceRequest, handleBrowserServiceStreamingRequest } from "./browser/index" -import { handleCheckpointsServiceRequest, handleCheckpointsServiceStreamingRequest } from "./checkpoints/index" -import { handleFileServiceRequest, handleFileServiceStreamingRequest } from "./file/index" -import { handleMcpServiceRequest, handleMcpServiceStreamingRequest } from "./mcp/index" -import { handleStateServiceRequest, handleStateServiceStreamingRequest } from "./state/index" -import { handleTaskServiceRequest, handleTaskServiceStreamingRequest } from "./task/index" -import { handleWebServiceRequest, handleWebServiceStreamingRequest } from "./web/index" -import { handleModelsServiceRequest, handleModelsServiceStreamingRequest } from "./models/index" -import { handleSlashServiceRequest, handleSlashServiceStreamingRequest } from "./slash/index" -import { handleUiServiceRequest, handleUiServiceStreamingRequest } from "./ui/index" - -/** - * Configuration for a service handler - */ -export interface ServiceHandlerConfig { - requestHandler: (controller: Controller, method: string, message: any) => Promise - streamingHandler: ( - controller: Controller, - method: string, - message: any, - responseStream: StreamingResponseHandler, - requestId?: string, - ) => Promise -} - -/** - * Map of service names to their handler configurations - */ -export const serviceHandlers: Record = { - "cline.AccountService": { - requestHandler: handleAccountServiceRequest, - streamingHandler: handleAccountServiceStreamingRequest, - }, - "cline.BrowserService": { - requestHandler: handleBrowserServiceRequest, - streamingHandler: handleBrowserServiceStreamingRequest, - }, - "cline.CheckpointsService": { - requestHandler: handleCheckpointsServiceRequest, - streamingHandler: handleCheckpointsServiceStreamingRequest, - }, - "cline.FileService": { - requestHandler: handleFileServiceRequest, - streamingHandler: handleFileServiceStreamingRequest, - }, - "cline.McpService": { - requestHandler: handleMcpServiceRequest, - streamingHandler: handleMcpServiceStreamingRequest, - }, - "cline.StateService": { - requestHandler: handleStateServiceRequest, - streamingHandler: handleStateServiceStreamingRequest, - }, - "cline.TaskService": { - requestHandler: handleTaskServiceRequest, - streamingHandler: handleTaskServiceStreamingRequest, - }, - "cline.WebService": { - requestHandler: handleWebServiceRequest, - streamingHandler: handleWebServiceStreamingRequest, - }, - "cline.ModelsService": { - requestHandler: handleModelsServiceRequest, - streamingHandler: handleModelsServiceStreamingRequest, - }, - "cline.SlashService": { - requestHandler: handleSlashServiceRequest, - streamingHandler: handleSlashServiceStreamingRequest, - }, - "cline.UiService": { - requestHandler: handleUiServiceRequest, - streamingHandler: handleUiServiceStreamingRequest, - }, -} diff --git a/src/core/controller/mcp/index.ts b/src/core/controller/mcp/index.ts deleted file mode 100644 index af2a8775..00000000 --- a/src/core/controller/mcp/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create mcp service registry -const mcpService = createServiceRegistry("mcp") - -// Export the method handler types and registration function -export type McpMethodHandler = ServiceMethodHandler -export type McpStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = mcpService.registerMethod - -// Export the request handlers -export const handleMcpServiceRequest = mcpService.handleRequest -export const handleMcpServiceStreamingRequest = mcpService.handleStreamingRequest -export const isStreamingMethod = mcpService.isStreamingMethod - -// Register all mcp methods -registerAllMethods() diff --git a/src/core/controller/mcp/methods.ts b/src/core/controller/mcp/methods.ts deleted file mode 100644 index 3cdf6bb6..00000000 --- a/src/core/controller/mcp/methods.ts +++ /dev/null @@ -1,26 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { addRemoteMcpServer } from "./addRemoteMcpServer" -import { deleteMcpServer } from "./deleteMcpServer" -import { downloadMcp } from "./downloadMcp" -import { refreshMcpMarketplace } from "./refreshMcpMarketplace" -import { restartMcpServer } from "./restartMcpServer" -import { toggleMcpServer } from "./toggleMcpServer" -import { toggleToolAutoApprove } from "./toggleToolAutoApprove" -import { updateMcpTimeout } from "./updateMcpTimeout" - -// Register all mcp service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("addRemoteMcpServer", addRemoteMcpServer) - registerMethod("deleteMcpServer", deleteMcpServer) - registerMethod("downloadMcp", downloadMcp) - registerMethod("refreshMcpMarketplace", refreshMcpMarketplace) - registerMethod("restartMcpServer", restartMcpServer) - registerMethod("toggleMcpServer", toggleMcpServer) - registerMethod("toggleToolAutoApprove", toggleToolAutoApprove) - registerMethod("updateMcpTimeout", updateMcpTimeout) -} diff --git a/src/core/controller/models/index.ts b/src/core/controller/models/index.ts deleted file mode 100644 index c2b269f7..00000000 --- a/src/core/controller/models/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create models service registry -const modelsService = createServiceRegistry("models") - -// Export the method handler types and registration function -export type ModelsMethodHandler = ServiceMethodHandler -export type ModelsStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = modelsService.registerMethod - -// Export the request handlers -export const handleModelsServiceRequest = modelsService.handleRequest -export const handleModelsServiceStreamingRequest = modelsService.handleStreamingRequest -export const isStreamingMethod = modelsService.isStreamingMethod - -// Register all models methods -registerAllMethods() diff --git a/src/core/controller/models/methods.ts b/src/core/controller/models/methods.ts deleted file mode 100644 index 68a48971..00000000 --- a/src/core/controller/models/methods.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { getLmStudioModels } from "./getLmStudioModels" -import { getOllamaModels } from "./getOllamaModels" -import { getVsCodeLmModels } from "./getVsCodeLmModels" -import { refreshOpenAiModels } from "./refreshOpenAiModels" -import { refreshOpenRouterModels } from "./refreshOpenRouterModels" -import { refreshRequestyModels } from "./refreshRequestyModels" - -// Register all models service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("getLmStudioModels", getLmStudioModels) - registerMethod("getOllamaModels", getOllamaModels) - registerMethod("getVsCodeLmModels", getVsCodeLmModels) - registerMethod("refreshOpenAiModels", refreshOpenAiModels) - registerMethod("refreshOpenRouterModels", refreshOpenRouterModels) - registerMethod("refreshRequestyModels", refreshRequestyModels) -} diff --git a/src/core/controller/slash/index.ts b/src/core/controller/slash/index.ts deleted file mode 100644 index dd4b3f53..00000000 --- a/src/core/controller/slash/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create slash service registry -const slashService = createServiceRegistry("slash") - -// Export the method handler types and registration function -export type SlashMethodHandler = ServiceMethodHandler -export type SlashStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = slashService.registerMethod - -// Export the request handlers -export const handleSlashServiceRequest = slashService.handleRequest -export const handleSlashServiceStreamingRequest = slashService.handleStreamingRequest -export const isStreamingMethod = slashService.isStreamingMethod - -// Register all slash methods -registerAllMethods() diff --git a/src/core/controller/slash/methods.ts b/src/core/controller/slash/methods.ts deleted file mode 100644 index 9bfdb098..00000000 --- a/src/core/controller/slash/methods.ts +++ /dev/null @@ -1,14 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { condense } from "./condense" -import { reportBug } from "./reportBug" - -// Register all slash service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("condense", condense) - registerMethod("reportBug", reportBug) -} diff --git a/src/core/controller/state/index.ts b/src/core/controller/state/index.ts deleted file mode 100644 index 1ba9cbbb..00000000 --- a/src/core/controller/state/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create state service registry -const stateService = createServiceRegistry("state") - -// Export the method handler types and registration function -export type StateMethodHandler = ServiceMethodHandler -export type StateStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = stateService.registerMethod - -// Export the request handlers -export const handleStateServiceRequest = stateService.handleRequest -export const handleStateServiceStreamingRequest = stateService.handleStreamingRequest -export const isStreamingMethod = stateService.isStreamingMethod - -// Register all state methods -registerAllMethods() diff --git a/src/core/controller/state/methods.ts b/src/core/controller/state/methods.ts deleted file mode 100644 index f6fe3be2..00000000 --- a/src/core/controller/state/methods.ts +++ /dev/null @@ -1,25 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { getLatestState } from "./getLatestState" -import { resetState } from "./resetState" -import { subscribeToState } from "./subscribeToState" -import { toggleFavoriteModel } from "./toggleFavoriteModel" -import { togglePlanActMode } from "./togglePlanActMode" -import { updateTerminalConnectionTimeout } from "./updateTerminalConnectionTimeout" - -// Streaming methods for this service -export const streamingMethods = ["subscribeToState"] - -// Register all state service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("getLatestState", getLatestState) - registerMethod("resetState", resetState) - registerMethod("subscribeToState", subscribeToState, { isStreaming: true }) - registerMethod("toggleFavoriteModel", toggleFavoriteModel) - registerMethod("togglePlanActMode", togglePlanActMode) - registerMethod("updateTerminalConnectionTimeout", updateTerminalConnectionTimeout) -} diff --git a/src/core/controller/task/index.ts b/src/core/controller/task/index.ts deleted file mode 100644 index e50616fe..00000000 --- a/src/core/controller/task/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create task service registry -const taskService = createServiceRegistry("task") - -// Export the method handler types and registration function -export type TaskMethodHandler = ServiceMethodHandler -export type TaskStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = taskService.registerMethod - -// Export the request handlers -export const handleTaskServiceRequest = taskService.handleRequest -export const handleTaskServiceStreamingRequest = taskService.handleStreamingRequest -export const isStreamingMethod = taskService.isStreamingMethod - -// Register all task methods -registerAllMethods() diff --git a/src/core/controller/task/methods.ts b/src/core/controller/task/methods.ts deleted file mode 100644 index ec70ff0f..00000000 --- a/src/core/controller/task/methods.ts +++ /dev/null @@ -1,34 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { askResponse } from "./askResponse" -import { cancelTask } from "./cancelTask" -import { clearTask } from "./clearTask" -import { deleteNonFavoritedTasks } from "./deleteNonFavoritedTasks" -import { deleteTasksWithIds } from "./deleteTasksWithIds" -import { exportTaskWithId } from "./exportTaskWithId" -import { getTaskHistory } from "./getTaskHistory" -import { newTask } from "./newTask" -import { showTaskWithId } from "./showTaskWithId" -import { taskCompletionViewChanges } from "./taskCompletionViewChanges" -import { taskFeedback } from "./taskFeedback" -import { toggleTaskFavorite } from "./toggleTaskFavorite" - -// Register all task service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("askResponse", askResponse) - registerMethod("cancelTask", cancelTask) - registerMethod("clearTask", clearTask) - registerMethod("deleteNonFavoritedTasks", deleteNonFavoritedTasks) - registerMethod("deleteTasksWithIds", deleteTasksWithIds) - registerMethod("exportTaskWithId", exportTaskWithId) - registerMethod("getTaskHistory", getTaskHistory) - registerMethod("newTask", newTask) - registerMethod("showTaskWithId", showTaskWithId) - registerMethod("taskCompletionViewChanges", taskCompletionViewChanges) - registerMethod("taskFeedback", taskFeedback) - registerMethod("toggleTaskFavorite", toggleTaskFavorite) -} diff --git a/src/core/controller/web/index.ts b/src/core/controller/web/index.ts deleted file mode 100644 index 5c2ad8bb..00000000 --- a/src/core/controller/web/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create web service registry -const webService = createServiceRegistry("web") - -// Export the method handler types and registration function -export type WebMethodHandler = ServiceMethodHandler -export type WebStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = webService.registerMethod - -// Export the request handlers -export const handleWebServiceRequest = webService.handleRequest -export const handleWebServiceStreamingRequest = webService.handleStreamingRequest -export const isStreamingMethod = webService.isStreamingMethod - -// Register all web methods -registerAllMethods() diff --git a/src/core/controller/web/methods.ts b/src/core/controller/web/methods.ts deleted file mode 100644 index f0ab0eea..00000000 --- a/src/core/controller/web/methods.ts +++ /dev/null @@ -1,14 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { checkIsImageUrl } from "./checkIsImageUrl" -import { fetchOpenGraphData } from "./fetchOpenGraphData" - -// Register all web service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("checkIsImageUrl", checkIsImageUrl) - registerMethod("fetchOpenGraphData", fetchOpenGraphData) -} diff --git a/src/shared/proto/account.ts b/src/shared/proto/account.ts deleted file mode 100644 index 471e546f..00000000 --- a/src/shared/proto/account.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: account.proto - -/* eslint-disable */ -import { Empty, EmptyRequest, String } from "./common" - -export const protobufPackage = "cline" - -/** Service for account-related operations */ -export type AccountServiceDefinition = typeof AccountServiceDefinition -export const AccountServiceDefinition = { - name: "AccountService", - fullName: "cline.AccountService", - methods: { - /** - * Handles the user clicking the login link in the UI. - * Generates a secure nonce for state validation, stores it in secrets, - * and opens the authentication URL in the external browser. - */ - accountLoginClicked: { - name: "accountLoginClicked", - requestType: EmptyRequest, - requestStream: false, - responseType: String, - responseStream: false, - options: {}, - }, - /** - * Handles the user clicking the logout button in the UI. - * Clears API keys and user state. - */ - accountLogoutClicked: { - name: "accountLogoutClicked", - requestType: EmptyRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - }, -} as const diff --git a/src/shared/proto/browser.ts b/src/shared/proto/browser.ts deleted file mode 100644 index a810aa6d..00000000 --- a/src/shared/proto/browser.ts +++ /dev/null @@ -1,756 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: browser.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { Boolean, EmptyRequest, Metadata, String, StringRequest } from "./common" - -export const protobufPackage = "cline" - -export interface BrowserConnectionInfo { - isConnected: boolean - isRemote: boolean - host?: string | undefined -} - -export interface BrowserConnection { - success: boolean - message: string - endpoint?: string | undefined -} - -export interface ChromePath { - path: string - isBundled: boolean -} - -export interface Viewport { - width: number - height: number -} - -export interface BrowserSettings { - viewport?: Viewport | undefined - remoteBrowserHost?: string | undefined - remoteBrowserEnabled?: boolean | undefined - chromeExecutablePath?: string | undefined - disableToolUse?: boolean | undefined -} - -export interface UpdateBrowserSettingsRequest { - metadata?: Metadata | undefined - viewport?: Viewport | undefined - remoteBrowserHost?: string | undefined - remoteBrowserEnabled?: boolean | undefined - chromeExecutablePath?: string | undefined - disableToolUse?: boolean | undefined -} - -function createBaseBrowserConnectionInfo(): BrowserConnectionInfo { - return { isConnected: false, isRemote: false, host: undefined } -} - -export const BrowserConnectionInfo: MessageFns = { - encode(message: BrowserConnectionInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.isConnected !== false) { - writer.uint32(8).bool(message.isConnected) - } - if (message.isRemote !== false) { - writer.uint32(16).bool(message.isRemote) - } - if (message.host !== undefined) { - writer.uint32(26).string(message.host) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): BrowserConnectionInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseBrowserConnectionInfo() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.isConnected = reader.bool() - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.isRemote = reader.bool() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.host = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): BrowserConnectionInfo { - return { - isConnected: isSet(object.isConnected) ? globalThis.Boolean(object.isConnected) : false, - isRemote: isSet(object.isRemote) ? globalThis.Boolean(object.isRemote) : false, - host: isSet(object.host) ? globalThis.String(object.host) : undefined, - } - }, - - toJSON(message: BrowserConnectionInfo): unknown { - const obj: any = {} - if (message.isConnected !== false) { - obj.isConnected = message.isConnected - } - if (message.isRemote !== false) { - obj.isRemote = message.isRemote - } - if (message.host !== undefined) { - obj.host = message.host - } - return obj - }, - - create, I>>(base?: I): BrowserConnectionInfo { - return BrowserConnectionInfo.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): BrowserConnectionInfo { - const message = createBaseBrowserConnectionInfo() - message.isConnected = object.isConnected ?? false - message.isRemote = object.isRemote ?? false - message.host = object.host ?? undefined - return message - }, -} - -function createBaseBrowserConnection(): BrowserConnection { - return { success: false, message: "", endpoint: undefined } -} - -export const BrowserConnection: MessageFns = { - encode(message: BrowserConnection, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.success !== false) { - writer.uint32(8).bool(message.success) - } - if (message.message !== "") { - writer.uint32(18).string(message.message) - } - if (message.endpoint !== undefined) { - writer.uint32(26).string(message.endpoint) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): BrowserConnection { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseBrowserConnection() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.success = reader.bool() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.message = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.endpoint = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): BrowserConnection { - return { - success: isSet(object.success) ? globalThis.Boolean(object.success) : false, - message: isSet(object.message) ? globalThis.String(object.message) : "", - endpoint: isSet(object.endpoint) ? globalThis.String(object.endpoint) : undefined, - } - }, - - toJSON(message: BrowserConnection): unknown { - const obj: any = {} - if (message.success !== false) { - obj.success = message.success - } - if (message.message !== "") { - obj.message = message.message - } - if (message.endpoint !== undefined) { - obj.endpoint = message.endpoint - } - return obj - }, - - create, I>>(base?: I): BrowserConnection { - return BrowserConnection.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): BrowserConnection { - const message = createBaseBrowserConnection() - message.success = object.success ?? false - message.message = object.message ?? "" - message.endpoint = object.endpoint ?? undefined - return message - }, -} - -function createBaseChromePath(): ChromePath { - return { path: "", isBundled: false } -} - -export const ChromePath: MessageFns = { - encode(message: ChromePath, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.path !== "") { - writer.uint32(10).string(message.path) - } - if (message.isBundled !== false) { - writer.uint32(16).bool(message.isBundled) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ChromePath { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseChromePath() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.path = reader.string() - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.isBundled = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ChromePath { - return { - path: isSet(object.path) ? globalThis.String(object.path) : "", - isBundled: isSet(object.isBundled) ? globalThis.Boolean(object.isBundled) : false, - } - }, - - toJSON(message: ChromePath): unknown { - const obj: any = {} - if (message.path !== "") { - obj.path = message.path - } - if (message.isBundled !== false) { - obj.isBundled = message.isBundled - } - return obj - }, - - create, I>>(base?: I): ChromePath { - return ChromePath.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ChromePath { - const message = createBaseChromePath() - message.path = object.path ?? "" - message.isBundled = object.isBundled ?? false - return message - }, -} - -function createBaseViewport(): Viewport { - return { width: 0, height: 0 } -} - -export const Viewport: MessageFns = { - encode(message: Viewport, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.width !== 0) { - writer.uint32(8).int32(message.width) - } - if (message.height !== 0) { - writer.uint32(16).int32(message.height) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Viewport { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseViewport() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.width = reader.int32() - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.height = reader.int32() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): Viewport { - return { - width: isSet(object.width) ? globalThis.Number(object.width) : 0, - height: isSet(object.height) ? globalThis.Number(object.height) : 0, - } - }, - - toJSON(message: Viewport): unknown { - const obj: any = {} - if (message.width !== 0) { - obj.width = Math.round(message.width) - } - if (message.height !== 0) { - obj.height = Math.round(message.height) - } - return obj - }, - - create, I>>(base?: I): Viewport { - return Viewport.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): Viewport { - const message = createBaseViewport() - message.width = object.width ?? 0 - message.height = object.height ?? 0 - return message - }, -} - -function createBaseBrowserSettings(): BrowserSettings { - return { - viewport: undefined, - remoteBrowserHost: undefined, - remoteBrowserEnabled: undefined, - chromeExecutablePath: undefined, - disableToolUse: undefined, - } -} - -export const BrowserSettings: MessageFns = { - encode(message: BrowserSettings, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.viewport !== undefined) { - Viewport.encode(message.viewport, writer.uint32(10).fork()).join() - } - if (message.remoteBrowserHost !== undefined) { - writer.uint32(18).string(message.remoteBrowserHost) - } - if (message.remoteBrowserEnabled !== undefined) { - writer.uint32(24).bool(message.remoteBrowserEnabled) - } - if (message.chromeExecutablePath !== undefined) { - writer.uint32(34).string(message.chromeExecutablePath) - } - if (message.disableToolUse !== undefined) { - writer.uint32(40).bool(message.disableToolUse) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): BrowserSettings { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseBrowserSettings() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.viewport = Viewport.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.remoteBrowserHost = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.remoteBrowserEnabled = reader.bool() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.chromeExecutablePath = reader.string() - continue - } - case 5: { - if (tag !== 40) { - break - } - - message.disableToolUse = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): BrowserSettings { - return { - viewport: isSet(object.viewport) ? Viewport.fromJSON(object.viewport) : undefined, - remoteBrowserHost: isSet(object.remoteBrowserHost) ? globalThis.String(object.remoteBrowserHost) : undefined, - remoteBrowserEnabled: isSet(object.remoteBrowserEnabled) - ? globalThis.Boolean(object.remoteBrowserEnabled) - : undefined, - chromeExecutablePath: isSet(object.chromeExecutablePath) ? globalThis.String(object.chromeExecutablePath) : undefined, - disableToolUse: isSet(object.disableToolUse) ? globalThis.Boolean(object.disableToolUse) : undefined, - } - }, - - toJSON(message: BrowserSettings): unknown { - const obj: any = {} - if (message.viewport !== undefined) { - obj.viewport = Viewport.toJSON(message.viewport) - } - if (message.remoteBrowserHost !== undefined) { - obj.remoteBrowserHost = message.remoteBrowserHost - } - if (message.remoteBrowserEnabled !== undefined) { - obj.remoteBrowserEnabled = message.remoteBrowserEnabled - } - if (message.chromeExecutablePath !== undefined) { - obj.chromeExecutablePath = message.chromeExecutablePath - } - if (message.disableToolUse !== undefined) { - obj.disableToolUse = message.disableToolUse - } - return obj - }, - - create, I>>(base?: I): BrowserSettings { - return BrowserSettings.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): BrowserSettings { - const message = createBaseBrowserSettings() - message.viewport = - object.viewport !== undefined && object.viewport !== null ? Viewport.fromPartial(object.viewport) : undefined - message.remoteBrowserHost = object.remoteBrowserHost ?? undefined - message.remoteBrowserEnabled = object.remoteBrowserEnabled ?? undefined - message.chromeExecutablePath = object.chromeExecutablePath ?? undefined - message.disableToolUse = object.disableToolUse ?? undefined - return message - }, -} - -function createBaseUpdateBrowserSettingsRequest(): UpdateBrowserSettingsRequest { - return { - metadata: undefined, - viewport: undefined, - remoteBrowserHost: undefined, - remoteBrowserEnabled: undefined, - chromeExecutablePath: undefined, - disableToolUse: undefined, - } -} - -export const UpdateBrowserSettingsRequest: MessageFns = { - encode(message: UpdateBrowserSettingsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.viewport !== undefined) { - Viewport.encode(message.viewport, writer.uint32(18).fork()).join() - } - if (message.remoteBrowserHost !== undefined) { - writer.uint32(26).string(message.remoteBrowserHost) - } - if (message.remoteBrowserEnabled !== undefined) { - writer.uint32(32).bool(message.remoteBrowserEnabled) - } - if (message.chromeExecutablePath !== undefined) { - writer.uint32(42).string(message.chromeExecutablePath) - } - if (message.disableToolUse !== undefined) { - writer.uint32(48).bool(message.disableToolUse) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): UpdateBrowserSettingsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseUpdateBrowserSettingsRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.viewport = Viewport.decode(reader, reader.uint32()) - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.remoteBrowserHost = reader.string() - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.remoteBrowserEnabled = reader.bool() - continue - } - case 5: { - if (tag !== 42) { - break - } - - message.chromeExecutablePath = reader.string() - continue - } - case 6: { - if (tag !== 48) { - break - } - - message.disableToolUse = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): UpdateBrowserSettingsRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - viewport: isSet(object.viewport) ? Viewport.fromJSON(object.viewport) : undefined, - remoteBrowserHost: isSet(object.remoteBrowserHost) ? globalThis.String(object.remoteBrowserHost) : undefined, - remoteBrowserEnabled: isSet(object.remoteBrowserEnabled) - ? globalThis.Boolean(object.remoteBrowserEnabled) - : undefined, - chromeExecutablePath: isSet(object.chromeExecutablePath) ? globalThis.String(object.chromeExecutablePath) : undefined, - disableToolUse: isSet(object.disableToolUse) ? globalThis.Boolean(object.disableToolUse) : undefined, - } - }, - - toJSON(message: UpdateBrowserSettingsRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.viewport !== undefined) { - obj.viewport = Viewport.toJSON(message.viewport) - } - if (message.remoteBrowserHost !== undefined) { - obj.remoteBrowserHost = message.remoteBrowserHost - } - if (message.remoteBrowserEnabled !== undefined) { - obj.remoteBrowserEnabled = message.remoteBrowserEnabled - } - if (message.chromeExecutablePath !== undefined) { - obj.chromeExecutablePath = message.chromeExecutablePath - } - if (message.disableToolUse !== undefined) { - obj.disableToolUse = message.disableToolUse - } - return obj - }, - - create, I>>(base?: I): UpdateBrowserSettingsRequest { - return UpdateBrowserSettingsRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): UpdateBrowserSettingsRequest { - const message = createBaseUpdateBrowserSettingsRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.viewport = - object.viewport !== undefined && object.viewport !== null ? Viewport.fromPartial(object.viewport) : undefined - message.remoteBrowserHost = object.remoteBrowserHost ?? undefined - message.remoteBrowserEnabled = object.remoteBrowserEnabled ?? undefined - message.chromeExecutablePath = object.chromeExecutablePath ?? undefined - message.disableToolUse = object.disableToolUse ?? undefined - return message - }, -} - -export type BrowserServiceDefinition = typeof BrowserServiceDefinition -export const BrowserServiceDefinition = { - name: "BrowserService", - fullName: "cline.BrowserService", - methods: { - getBrowserConnectionInfo: { - name: "getBrowserConnectionInfo", - requestType: EmptyRequest, - requestStream: false, - responseType: BrowserConnectionInfo, - responseStream: false, - options: {}, - }, - testBrowserConnection: { - name: "testBrowserConnection", - requestType: StringRequest, - requestStream: false, - responseType: BrowserConnection, - responseStream: false, - options: {}, - }, - discoverBrowser: { - name: "discoverBrowser", - requestType: EmptyRequest, - requestStream: false, - responseType: BrowserConnection, - responseStream: false, - options: {}, - }, - getDetectedChromePath: { - name: "getDetectedChromePath", - requestType: EmptyRequest, - requestStream: false, - responseType: ChromePath, - responseStream: false, - options: {}, - }, - updateBrowserSettings: { - name: "updateBrowserSettings", - requestType: UpdateBrowserSettingsRequest, - requestStream: false, - responseType: Boolean, - responseStream: false, - options: {}, - }, - relaunchChromeDebugMode: { - name: "relaunchChromeDebugMode", - requestType: EmptyRequest, - requestStream: false, - responseType: String, - responseStream: false, - options: {}, - }, - }, -} as const - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined - -export type DeepPartial = T extends Builtin - ? T - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial - -type KeysOfUnion = T extends T ? keyof T : never -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } - -function isSet(value: any): boolean { - return value !== null && value !== undefined -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter - decode(input: BinaryReader | Uint8Array, length?: number): T - fromJSON(object: any): T - toJSON(message: T): unknown - create, I>>(base?: I): T - fromPartial, I>>(object: I): T -} diff --git a/src/shared/proto/checkpoints.ts b/src/shared/proto/checkpoints.ts deleted file mode 100644 index fe62d8f2..00000000 --- a/src/shared/proto/checkpoints.ts +++ /dev/null @@ -1,192 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: checkpoints.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { Empty, Int64Request, Metadata } from "./common" - -export const protobufPackage = "cline" - -export interface CheckpointRestoreRequest { - metadata?: Metadata | undefined - number: number - restoreType: string - offset?: number | undefined -} - -function createBaseCheckpointRestoreRequest(): CheckpointRestoreRequest { - return { metadata: undefined, number: 0, restoreType: "", offset: undefined } -} - -export const CheckpointRestoreRequest: MessageFns = { - encode(message: CheckpointRestoreRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.number !== 0) { - writer.uint32(16).int64(message.number) - } - if (message.restoreType !== "") { - writer.uint32(26).string(message.restoreType) - } - if (message.offset !== undefined) { - writer.uint32(32).int64(message.offset) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): CheckpointRestoreRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseCheckpointRestoreRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.number = longToNumber(reader.int64()) - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.restoreType = reader.string() - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.offset = longToNumber(reader.int64()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): CheckpointRestoreRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - number: isSet(object.number) ? globalThis.Number(object.number) : 0, - restoreType: isSet(object.restoreType) ? globalThis.String(object.restoreType) : "", - offset: isSet(object.offset) ? globalThis.Number(object.offset) : undefined, - } - }, - - toJSON(message: CheckpointRestoreRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.number !== 0) { - obj.number = Math.round(message.number) - } - if (message.restoreType !== "") { - obj.restoreType = message.restoreType - } - if (message.offset !== undefined) { - obj.offset = Math.round(message.offset) - } - return obj - }, - - create, I>>(base?: I): CheckpointRestoreRequest { - return CheckpointRestoreRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): CheckpointRestoreRequest { - const message = createBaseCheckpointRestoreRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.number = object.number ?? 0 - message.restoreType = object.restoreType ?? "" - message.offset = object.offset ?? undefined - return message - }, -} - -export type CheckpointsServiceDefinition = typeof CheckpointsServiceDefinition -export const CheckpointsServiceDefinition = { - name: "CheckpointsService", - fullName: "cline.CheckpointsService", - methods: { - checkpointDiff: { - name: "checkpointDiff", - requestType: Int64Request, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - checkpointRestore: { - name: "checkpointRestore", - requestType: CheckpointRestoreRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - }, -} as const - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined - -export type DeepPartial = T extends Builtin - ? T - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial - -type KeysOfUnion = T extends T ? keyof T : never -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } - -function longToNumber(int64: { toString(): string }): number { - const num = globalThis.Number(int64.toString()) - if (num > globalThis.Number.MAX_SAFE_INTEGER) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER") - } - if (num < globalThis.Number.MIN_SAFE_INTEGER) { - throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER") - } - return num -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter - decode(input: BinaryReader | Uint8Array, length?: number): T - fromJSON(object: any): T - toJSON(message: T): unknown - create, I>>(base?: I): T - fromPartial, I>>(object: I): T -} diff --git a/src/shared/proto/common.ts b/src/shared/proto/common.ts deleted file mode 100644 index 2bdac92f..00000000 --- a/src/shared/proto/common.ts +++ /dev/null @@ -1,934 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: common.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" - -export const protobufPackage = "cline" - -export interface Metadata {} - -export interface EmptyRequest { - metadata?: Metadata | undefined -} - -export interface Empty {} - -export interface StringRequest { - metadata?: Metadata | undefined - value: string -} - -export interface StringArrayRequest { - metadata?: Metadata | undefined - value: string[] -} - -export interface String { - value: string -} - -export interface Int64Request { - metadata?: Metadata | undefined - value: number -} - -export interface Int64 { - value: number -} - -export interface BytesRequest { - metadata?: Metadata | undefined - value: Buffer -} - -export interface Bytes { - value: Buffer -} - -export interface BooleanRequest { - metadata?: Metadata | undefined - value: boolean -} - -export interface Boolean { - value: boolean -} - -export interface StringArray { - values: string[] -} - -function createBaseMetadata(): Metadata { - return {} -} - -export const Metadata: MessageFns = { - encode(_: Metadata, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Metadata { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseMetadata() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(_: any): Metadata { - return {} - }, - - toJSON(_: Metadata): unknown { - const obj: any = {} - return obj - }, - - create, I>>(base?: I): Metadata { - return Metadata.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(_: I): Metadata { - const message = createBaseMetadata() - return message - }, -} - -function createBaseEmptyRequest(): EmptyRequest { - return { metadata: undefined } -} - -export const EmptyRequest: MessageFns = { - encode(message: EmptyRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): EmptyRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseEmptyRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): EmptyRequest { - return { metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined } - }, - - toJSON(message: EmptyRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - return obj - }, - - create, I>>(base?: I): EmptyRequest { - return EmptyRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): EmptyRequest { - const message = createBaseEmptyRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - return message - }, -} - -function createBaseEmpty(): Empty { - return {} -} - -export const Empty: MessageFns = { - encode(_: Empty, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Empty { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseEmpty() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(_: any): Empty { - return {} - }, - - toJSON(_: Empty): unknown { - const obj: any = {} - return obj - }, - - create, I>>(base?: I): Empty { - return Empty.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(_: I): Empty { - const message = createBaseEmpty() - return message - }, -} - -function createBaseStringRequest(): StringRequest { - return { metadata: undefined, value: "" } -} - -export const StringRequest: MessageFns = { - encode(message: StringRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.value !== "") { - writer.uint32(18).string(message.value) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): StringRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseStringRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.value = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): StringRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - value: isSet(object.value) ? globalThis.String(object.value) : "", - } - }, - - toJSON(message: StringRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.value !== "") { - obj.value = message.value - } - return obj - }, - - create, I>>(base?: I): StringRequest { - return StringRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): StringRequest { - const message = createBaseStringRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.value = object.value ?? "" - return message - }, -} - -function createBaseStringArrayRequest(): StringArrayRequest { - return { metadata: undefined, value: [] } -} - -export const StringArrayRequest: MessageFns = { - encode(message: StringArrayRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - for (const v of message.value) { - writer.uint32(18).string(v!) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): StringArrayRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseStringArrayRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.value.push(reader.string()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): StringArrayRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - value: globalThis.Array.isArray(object?.value) ? object.value.map((e: any) => globalThis.String(e)) : [], - } - }, - - toJSON(message: StringArrayRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.value?.length) { - obj.value = message.value - } - return obj - }, - - create, I>>(base?: I): StringArrayRequest { - return StringArrayRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): StringArrayRequest { - const message = createBaseStringArrayRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.value = object.value?.map((e) => e) || [] - return message - }, -} - -function createBaseString(): String { - return { value: "" } -} - -export const String: MessageFns = { - encode(message: String, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.value !== "") { - writer.uint32(10).string(message.value) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): String { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseString() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.value = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): String { - return { value: isSet(object.value) ? globalThis.String(object.value) : "" } - }, - - toJSON(message: String): unknown { - const obj: any = {} - if (message.value !== "") { - obj.value = message.value - } - return obj - }, - - create, I>>(base?: I): String { - return String.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): String { - const message = createBaseString() - message.value = object.value ?? "" - return message - }, -} - -function createBaseInt64Request(): Int64Request { - return { metadata: undefined, value: 0 } -} - -export const Int64Request: MessageFns = { - encode(message: Int64Request, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.value !== 0) { - writer.uint32(16).int64(message.value) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Int64Request { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseInt64Request() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.value = longToNumber(reader.int64()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): Int64Request { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - value: isSet(object.value) ? globalThis.Number(object.value) : 0, - } - }, - - toJSON(message: Int64Request): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.value !== 0) { - obj.value = Math.round(message.value) - } - return obj - }, - - create, I>>(base?: I): Int64Request { - return Int64Request.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): Int64Request { - const message = createBaseInt64Request() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.value = object.value ?? 0 - return message - }, -} - -function createBaseInt64(): Int64 { - return { value: 0 } -} - -export const Int64: MessageFns = { - encode(message: Int64, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.value !== 0) { - writer.uint32(8).int64(message.value) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Int64 { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseInt64() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.value = longToNumber(reader.int64()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): Int64 { - return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 } - }, - - toJSON(message: Int64): unknown { - const obj: any = {} - if (message.value !== 0) { - obj.value = Math.round(message.value) - } - return obj - }, - - create, I>>(base?: I): Int64 { - return Int64.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): Int64 { - const message = createBaseInt64() - message.value = object.value ?? 0 - return message - }, -} - -function createBaseBytesRequest(): BytesRequest { - return { metadata: undefined, value: Buffer.alloc(0) } -} - -export const BytesRequest: MessageFns = { - encode(message: BytesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): BytesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseBytesRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.value = Buffer.from(reader.bytes()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): BytesRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - value: isSet(object.value) ? Buffer.from(bytesFromBase64(object.value)) : Buffer.alloc(0), - } - }, - - toJSON(message: BytesRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.value.length !== 0) { - obj.value = base64FromBytes(message.value) - } - return obj - }, - - create, I>>(base?: I): BytesRequest { - return BytesRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): BytesRequest { - const message = createBaseBytesRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.value = object.value ?? Buffer.alloc(0) - return message - }, -} - -function createBaseBytes(): Bytes { - return { value: Buffer.alloc(0) } -} - -export const Bytes: MessageFns = { - encode(message: Bytes, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.value.length !== 0) { - writer.uint32(10).bytes(message.value) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Bytes { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseBytes() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.value = Buffer.from(reader.bytes()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): Bytes { - return { value: isSet(object.value) ? Buffer.from(bytesFromBase64(object.value)) : Buffer.alloc(0) } - }, - - toJSON(message: Bytes): unknown { - const obj: any = {} - if (message.value.length !== 0) { - obj.value = base64FromBytes(message.value) - } - return obj - }, - - create, I>>(base?: I): Bytes { - return Bytes.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): Bytes { - const message = createBaseBytes() - message.value = object.value ?? Buffer.alloc(0) - return message - }, -} - -function createBaseBooleanRequest(): BooleanRequest { - return { metadata: undefined, value: false } -} - -export const BooleanRequest: MessageFns = { - encode(message: BooleanRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.value !== false) { - writer.uint32(16).bool(message.value) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): BooleanRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseBooleanRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.value = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): BooleanRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - value: isSet(object.value) ? globalThis.Boolean(object.value) : false, - } - }, - - toJSON(message: BooleanRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.value !== false) { - obj.value = message.value - } - return obj - }, - - create, I>>(base?: I): BooleanRequest { - return BooleanRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): BooleanRequest { - const message = createBaseBooleanRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.value = object.value ?? false - return message - }, -} - -function createBaseBoolean(): Boolean { - return { value: false } -} - -export const Boolean: MessageFns = { - encode(message: Boolean, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.value !== false) { - writer.uint32(8).bool(message.value) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Boolean { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseBoolean() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.value = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): Boolean { - return { value: isSet(object.value) ? globalThis.Boolean(object.value) : false } - }, - - toJSON(message: Boolean): unknown { - const obj: any = {} - if (message.value !== false) { - obj.value = message.value - } - return obj - }, - - create, I>>(base?: I): Boolean { - return Boolean.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): Boolean { - const message = createBaseBoolean() - message.value = object.value ?? false - return message - }, -} - -function createBaseStringArray(): StringArray { - return { values: [] } -} - -export const StringArray: MessageFns = { - encode(message: StringArray, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - for (const v of message.values) { - writer.uint32(10).string(v!) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): StringArray { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseStringArray() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.values.push(reader.string()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): StringArray { - return { - values: globalThis.Array.isArray(object?.values) ? object.values.map((e: any) => globalThis.String(e)) : [], - } - }, - - toJSON(message: StringArray): unknown { - const obj: any = {} - if (message.values?.length) { - obj.values = message.values - } - return obj - }, - - create, I>>(base?: I): StringArray { - return StringArray.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): StringArray { - const message = createBaseStringArray() - message.values = object.values?.map((e) => e) || [] - return message - }, -} - -function bytesFromBase64(b64: string): Uint8Array { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")) -} - -function base64FromBytes(arr: Uint8Array): string { - return globalThis.Buffer.from(arr).toString("base64") -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined - -export type DeepPartial = T extends Builtin - ? T - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial - -type KeysOfUnion = T extends T ? keyof T : never -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } - -function longToNumber(int64: { toString(): string }): number { - const num = globalThis.Number(int64.toString()) - if (num > globalThis.Number.MAX_SAFE_INTEGER) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER") - } - if (num < globalThis.Number.MIN_SAFE_INTEGER) { - throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER") - } - return num -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter - decode(input: BinaryReader | Uint8Array, length?: number): T - fromJSON(object: any): T - toJSON(message: T): unknown - create, I>>(base?: I): T - fromPartial, I>>(object: I): T -} diff --git a/src/shared/proto/file.ts b/src/shared/proto/file.ts deleted file mode 100644 index 1f5377cd..00000000 --- a/src/shared/proto/file.ts +++ /dev/null @@ -1,1813 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: file.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { Empty, EmptyRequest, Metadata, StringArray, StringRequest } from "./common" - -export const protobufPackage = "cline" - -/** Response for refreshRules operation */ -export interface RefreshedRules { - globalClineRulesToggles?: ClineRulesToggles | undefined - localClineRulesToggles?: ClineRulesToggles | undefined - localCursorRulesToggles?: ClineRulesToggles | undefined - localWindsurfRulesToggles?: ClineRulesToggles | undefined - workflowToggles?: ClineRulesToggles | undefined -} - -/** Request to toggle a Windsurf rule */ -export interface ToggleWindsurfRuleRequest { - metadata?: Metadata | undefined - /** Path to the rule file */ - rulePath: string - /** Whether to enable or disable the rule */ - enabled: boolean -} - -/** Request to convert a list of URIs to relative paths */ -export interface RelativePathsRequest { - metadata?: Metadata | undefined - uris: string[] -} - -/** Response containing the converted relative paths */ -export interface RelativePaths { - paths: string[] -} - -/** Request for file search operations */ -export interface FileSearchRequest { - metadata?: Metadata | undefined - /** Search query string */ - query: string - /** Optional request ID for tracking requests */ - mentionsRequestId?: string | undefined - /** Optional limit for results (default: 20) */ - limit?: number | undefined -} - -/** Result for file search operations */ -export interface FileSearchResults { - /** Array of file/folder results */ - results: FileInfo[] - /** Echo of the request ID for tracking */ - mentionsRequestId?: string | undefined -} - -/** File information structure for search results */ -export interface FileInfo { - /** Relative path from workspace root */ - path: string - /** "file" or "folder" */ - type: string - /** Display name (usually basename) */ - label?: string | undefined -} - -/** Response for searchCommits */ -export interface GitCommits { - commits: GitCommit[] -} - -/** Represents a Git commit */ -export interface GitCommit { - hash: string - shortHash: string - subject: string - author: string - date: string -} - -/** Unified request for all rule file operations */ -export interface RuleFileRequest { - metadata?: Metadata | undefined - /** Common field for all operations */ - isGlobal: boolean - /** Path field for deleteRuleFile (optional) */ - rulePath?: string | undefined - /** Filename field for createRuleFile (optional) */ - filename?: string | undefined - /** Type of the file to create (optional) */ - type?: string | undefined -} - -/** Result for rule file operations with meaningful data only */ -export interface RuleFile { - /** Path to the rule file */ - filePath: string - /** Filename for display purposes */ - displayName: string - /** For createRuleFile, indicates if file already existed */ - alreadyExists: boolean -} - -/** Request to toggle a Cline rule */ -export interface ToggleClineRuleRequest { - metadata?: Metadata | undefined - /** Whether this is a global rule or workspace rule */ - isGlobal: boolean - /** Path to the rule file */ - rulePath: string - /** Whether to enable or disable the rule */ - enabled: boolean -} - -/** Maps from filepath to enabled/disabled status, matching app's ClineRulesToggles type */ -export interface ClineRulesToggles { - toggles: { [key: string]: boolean } -} - -export interface ClineRulesToggles_TogglesEntry { - key: string - value: boolean -} - -/** Response for toggleClineRule operation */ -export interface ToggleClineRules { - globalClineRulesToggles?: ClineRulesToggles | undefined - localClineRulesToggles?: ClineRulesToggles | undefined -} - -/** Request to toggle a Cursor rule */ -export interface ToggleCursorRuleRequest { - metadata?: Metadata | undefined - /** Path to the rule file */ - rulePath: string - /** Whether to enable or disable the rule */ - enabled: boolean -} - -function createBaseRefreshedRules(): RefreshedRules { - return { - globalClineRulesToggles: undefined, - localClineRulesToggles: undefined, - localCursorRulesToggles: undefined, - localWindsurfRulesToggles: undefined, - workflowToggles: undefined, - } -} - -export const RefreshedRules: MessageFns = { - encode(message: RefreshedRules, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.globalClineRulesToggles !== undefined) { - ClineRulesToggles.encode(message.globalClineRulesToggles, writer.uint32(10).fork()).join() - } - if (message.localClineRulesToggles !== undefined) { - ClineRulesToggles.encode(message.localClineRulesToggles, writer.uint32(18).fork()).join() - } - if (message.localCursorRulesToggles !== undefined) { - ClineRulesToggles.encode(message.localCursorRulesToggles, writer.uint32(26).fork()).join() - } - if (message.localWindsurfRulesToggles !== undefined) { - ClineRulesToggles.encode(message.localWindsurfRulesToggles, writer.uint32(34).fork()).join() - } - if (message.workflowToggles !== undefined) { - ClineRulesToggles.encode(message.workflowToggles, writer.uint32(42).fork()).join() - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): RefreshedRules { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseRefreshedRules() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.globalClineRulesToggles = ClineRulesToggles.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.localClineRulesToggles = ClineRulesToggles.decode(reader, reader.uint32()) - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.localCursorRulesToggles = ClineRulesToggles.decode(reader, reader.uint32()) - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.localWindsurfRulesToggles = ClineRulesToggles.decode(reader, reader.uint32()) - continue - } - case 5: { - if (tag !== 42) { - break - } - - message.workflowToggles = ClineRulesToggles.decode(reader, reader.uint32()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): RefreshedRules { - return { - globalClineRulesToggles: isSet(object.globalClineRulesToggles) - ? ClineRulesToggles.fromJSON(object.globalClineRulesToggles) - : undefined, - localClineRulesToggles: isSet(object.localClineRulesToggles) - ? ClineRulesToggles.fromJSON(object.localClineRulesToggles) - : undefined, - localCursorRulesToggles: isSet(object.localCursorRulesToggles) - ? ClineRulesToggles.fromJSON(object.localCursorRulesToggles) - : undefined, - localWindsurfRulesToggles: isSet(object.localWindsurfRulesToggles) - ? ClineRulesToggles.fromJSON(object.localWindsurfRulesToggles) - : undefined, - workflowToggles: isSet(object.workflowToggles) ? ClineRulesToggles.fromJSON(object.workflowToggles) : undefined, - } - }, - - toJSON(message: RefreshedRules): unknown { - const obj: any = {} - if (message.globalClineRulesToggles !== undefined) { - obj.globalClineRulesToggles = ClineRulesToggles.toJSON(message.globalClineRulesToggles) - } - if (message.localClineRulesToggles !== undefined) { - obj.localClineRulesToggles = ClineRulesToggles.toJSON(message.localClineRulesToggles) - } - if (message.localCursorRulesToggles !== undefined) { - obj.localCursorRulesToggles = ClineRulesToggles.toJSON(message.localCursorRulesToggles) - } - if (message.localWindsurfRulesToggles !== undefined) { - obj.localWindsurfRulesToggles = ClineRulesToggles.toJSON(message.localWindsurfRulesToggles) - } - if (message.workflowToggles !== undefined) { - obj.workflowToggles = ClineRulesToggles.toJSON(message.workflowToggles) - } - return obj - }, - - create, I>>(base?: I): RefreshedRules { - return RefreshedRules.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): RefreshedRules { - const message = createBaseRefreshedRules() - message.globalClineRulesToggles = - object.globalClineRulesToggles !== undefined && object.globalClineRulesToggles !== null - ? ClineRulesToggles.fromPartial(object.globalClineRulesToggles) - : undefined - message.localClineRulesToggles = - object.localClineRulesToggles !== undefined && object.localClineRulesToggles !== null - ? ClineRulesToggles.fromPartial(object.localClineRulesToggles) - : undefined - message.localCursorRulesToggles = - object.localCursorRulesToggles !== undefined && object.localCursorRulesToggles !== null - ? ClineRulesToggles.fromPartial(object.localCursorRulesToggles) - : undefined - message.localWindsurfRulesToggles = - object.localWindsurfRulesToggles !== undefined && object.localWindsurfRulesToggles !== null - ? ClineRulesToggles.fromPartial(object.localWindsurfRulesToggles) - : undefined - message.workflowToggles = - object.workflowToggles !== undefined && object.workflowToggles !== null - ? ClineRulesToggles.fromPartial(object.workflowToggles) - : undefined - return message - }, -} - -function createBaseToggleWindsurfRuleRequest(): ToggleWindsurfRuleRequest { - return { metadata: undefined, rulePath: "", enabled: false } -} - -export const ToggleWindsurfRuleRequest: MessageFns = { - encode(message: ToggleWindsurfRuleRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.rulePath !== "") { - writer.uint32(18).string(message.rulePath) - } - if (message.enabled !== false) { - writer.uint32(24).bool(message.enabled) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ToggleWindsurfRuleRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseToggleWindsurfRuleRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.rulePath = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.enabled = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ToggleWindsurfRuleRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - rulePath: isSet(object.rulePath) ? globalThis.String(object.rulePath) : "", - enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false, - } - }, - - toJSON(message: ToggleWindsurfRuleRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.rulePath !== "") { - obj.rulePath = message.rulePath - } - if (message.enabled !== false) { - obj.enabled = message.enabled - } - return obj - }, - - create, I>>(base?: I): ToggleWindsurfRuleRequest { - return ToggleWindsurfRuleRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ToggleWindsurfRuleRequest { - const message = createBaseToggleWindsurfRuleRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.rulePath = object.rulePath ?? "" - message.enabled = object.enabled ?? false - return message - }, -} - -function createBaseRelativePathsRequest(): RelativePathsRequest { - return { metadata: undefined, uris: [] } -} - -export const RelativePathsRequest: MessageFns = { - encode(message: RelativePathsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - for (const v of message.uris) { - writer.uint32(18).string(v!) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): RelativePathsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseRelativePathsRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.uris.push(reader.string()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): RelativePathsRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - uris: globalThis.Array.isArray(object?.uris) ? object.uris.map((e: any) => globalThis.String(e)) : [], - } - }, - - toJSON(message: RelativePathsRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.uris?.length) { - obj.uris = message.uris - } - return obj - }, - - create, I>>(base?: I): RelativePathsRequest { - return RelativePathsRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): RelativePathsRequest { - const message = createBaseRelativePathsRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.uris = object.uris?.map((e) => e) || [] - return message - }, -} - -function createBaseRelativePaths(): RelativePaths { - return { paths: [] } -} - -export const RelativePaths: MessageFns = { - encode(message: RelativePaths, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - for (const v of message.paths) { - writer.uint32(10).string(v!) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): RelativePaths { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseRelativePaths() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.paths.push(reader.string()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): RelativePaths { - return { paths: globalThis.Array.isArray(object?.paths) ? object.paths.map((e: any) => globalThis.String(e)) : [] } - }, - - toJSON(message: RelativePaths): unknown { - const obj: any = {} - if (message.paths?.length) { - obj.paths = message.paths - } - return obj - }, - - create, I>>(base?: I): RelativePaths { - return RelativePaths.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): RelativePaths { - const message = createBaseRelativePaths() - message.paths = object.paths?.map((e) => e) || [] - return message - }, -} - -function createBaseFileSearchRequest(): FileSearchRequest { - return { metadata: undefined, query: "", mentionsRequestId: undefined, limit: undefined } -} - -export const FileSearchRequest: MessageFns = { - encode(message: FileSearchRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.query !== "") { - writer.uint32(18).string(message.query) - } - if (message.mentionsRequestId !== undefined) { - writer.uint32(26).string(message.mentionsRequestId) - } - if (message.limit !== undefined) { - writer.uint32(32).int32(message.limit) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): FileSearchRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseFileSearchRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.query = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.mentionsRequestId = reader.string() - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.limit = reader.int32() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): FileSearchRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - query: isSet(object.query) ? globalThis.String(object.query) : "", - mentionsRequestId: isSet(object.mentionsRequestId) ? globalThis.String(object.mentionsRequestId) : undefined, - limit: isSet(object.limit) ? globalThis.Number(object.limit) : undefined, - } - }, - - toJSON(message: FileSearchRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.query !== "") { - obj.query = message.query - } - if (message.mentionsRequestId !== undefined) { - obj.mentionsRequestId = message.mentionsRequestId - } - if (message.limit !== undefined) { - obj.limit = Math.round(message.limit) - } - return obj - }, - - create, I>>(base?: I): FileSearchRequest { - return FileSearchRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): FileSearchRequest { - const message = createBaseFileSearchRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.query = object.query ?? "" - message.mentionsRequestId = object.mentionsRequestId ?? undefined - message.limit = object.limit ?? undefined - return message - }, -} - -function createBaseFileSearchResults(): FileSearchResults { - return { results: [], mentionsRequestId: undefined } -} - -export const FileSearchResults: MessageFns = { - encode(message: FileSearchResults, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - for (const v of message.results) { - FileInfo.encode(v!, writer.uint32(10).fork()).join() - } - if (message.mentionsRequestId !== undefined) { - writer.uint32(18).string(message.mentionsRequestId) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): FileSearchResults { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseFileSearchResults() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.results.push(FileInfo.decode(reader, reader.uint32())) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.mentionsRequestId = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): FileSearchResults { - return { - results: globalThis.Array.isArray(object?.results) ? object.results.map((e: any) => FileInfo.fromJSON(e)) : [], - mentionsRequestId: isSet(object.mentionsRequestId) ? globalThis.String(object.mentionsRequestId) : undefined, - } - }, - - toJSON(message: FileSearchResults): unknown { - const obj: any = {} - if (message.results?.length) { - obj.results = message.results.map((e) => FileInfo.toJSON(e)) - } - if (message.mentionsRequestId !== undefined) { - obj.mentionsRequestId = message.mentionsRequestId - } - return obj - }, - - create, I>>(base?: I): FileSearchResults { - return FileSearchResults.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): FileSearchResults { - const message = createBaseFileSearchResults() - message.results = object.results?.map((e) => FileInfo.fromPartial(e)) || [] - message.mentionsRequestId = object.mentionsRequestId ?? undefined - return message - }, -} - -function createBaseFileInfo(): FileInfo { - return { path: "", type: "", label: undefined } -} - -export const FileInfo: MessageFns = { - encode(message: FileInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.path !== "") { - writer.uint32(10).string(message.path) - } - if (message.type !== "") { - writer.uint32(18).string(message.type) - } - if (message.label !== undefined) { - writer.uint32(26).string(message.label) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): FileInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseFileInfo() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.path = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.type = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.label = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): FileInfo { - return { - path: isSet(object.path) ? globalThis.String(object.path) : "", - type: isSet(object.type) ? globalThis.String(object.type) : "", - label: isSet(object.label) ? globalThis.String(object.label) : undefined, - } - }, - - toJSON(message: FileInfo): unknown { - const obj: any = {} - if (message.path !== "") { - obj.path = message.path - } - if (message.type !== "") { - obj.type = message.type - } - if (message.label !== undefined) { - obj.label = message.label - } - return obj - }, - - create, I>>(base?: I): FileInfo { - return FileInfo.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): FileInfo { - const message = createBaseFileInfo() - message.path = object.path ?? "" - message.type = object.type ?? "" - message.label = object.label ?? undefined - return message - }, -} - -function createBaseGitCommits(): GitCommits { - return { commits: [] } -} - -export const GitCommits: MessageFns = { - encode(message: GitCommits, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - for (const v of message.commits) { - GitCommit.encode(v!, writer.uint32(10).fork()).join() - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): GitCommits { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseGitCommits() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.commits.push(GitCommit.decode(reader, reader.uint32())) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): GitCommits { - return { - commits: globalThis.Array.isArray(object?.commits) ? object.commits.map((e: any) => GitCommit.fromJSON(e)) : [], - } - }, - - toJSON(message: GitCommits): unknown { - const obj: any = {} - if (message.commits?.length) { - obj.commits = message.commits.map((e) => GitCommit.toJSON(e)) - } - return obj - }, - - create, I>>(base?: I): GitCommits { - return GitCommits.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): GitCommits { - const message = createBaseGitCommits() - message.commits = object.commits?.map((e) => GitCommit.fromPartial(e)) || [] - return message - }, -} - -function createBaseGitCommit(): GitCommit { - return { hash: "", shortHash: "", subject: "", author: "", date: "" } -} - -export const GitCommit: MessageFns = { - encode(message: GitCommit, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.hash !== "") { - writer.uint32(10).string(message.hash) - } - if (message.shortHash !== "") { - writer.uint32(18).string(message.shortHash) - } - if (message.subject !== "") { - writer.uint32(26).string(message.subject) - } - if (message.author !== "") { - writer.uint32(34).string(message.author) - } - if (message.date !== "") { - writer.uint32(42).string(message.date) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): GitCommit { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseGitCommit() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.hash = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.shortHash = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.subject = reader.string() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.author = reader.string() - continue - } - case 5: { - if (tag !== 42) { - break - } - - message.date = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): GitCommit { - return { - hash: isSet(object.hash) ? globalThis.String(object.hash) : "", - shortHash: isSet(object.shortHash) ? globalThis.String(object.shortHash) : "", - subject: isSet(object.subject) ? globalThis.String(object.subject) : "", - author: isSet(object.author) ? globalThis.String(object.author) : "", - date: isSet(object.date) ? globalThis.String(object.date) : "", - } - }, - - toJSON(message: GitCommit): unknown { - const obj: any = {} - if (message.hash !== "") { - obj.hash = message.hash - } - if (message.shortHash !== "") { - obj.shortHash = message.shortHash - } - if (message.subject !== "") { - obj.subject = message.subject - } - if (message.author !== "") { - obj.author = message.author - } - if (message.date !== "") { - obj.date = message.date - } - return obj - }, - - create, I>>(base?: I): GitCommit { - return GitCommit.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): GitCommit { - const message = createBaseGitCommit() - message.hash = object.hash ?? "" - message.shortHash = object.shortHash ?? "" - message.subject = object.subject ?? "" - message.author = object.author ?? "" - message.date = object.date ?? "" - return message - }, -} - -function createBaseRuleFileRequest(): RuleFileRequest { - return { metadata: undefined, isGlobal: false, rulePath: undefined, filename: undefined, type: undefined } -} - -export const RuleFileRequest: MessageFns = { - encode(message: RuleFileRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.isGlobal !== false) { - writer.uint32(16).bool(message.isGlobal) - } - if (message.rulePath !== undefined) { - writer.uint32(26).string(message.rulePath) - } - if (message.filename !== undefined) { - writer.uint32(34).string(message.filename) - } - if (message.type !== undefined) { - writer.uint32(42).string(message.type) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): RuleFileRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseRuleFileRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.isGlobal = reader.bool() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.rulePath = reader.string() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.filename = reader.string() - continue - } - case 5: { - if (tag !== 42) { - break - } - - message.type = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): RuleFileRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - isGlobal: isSet(object.isGlobal) ? globalThis.Boolean(object.isGlobal) : false, - rulePath: isSet(object.rulePath) ? globalThis.String(object.rulePath) : undefined, - filename: isSet(object.filename) ? globalThis.String(object.filename) : undefined, - type: isSet(object.type) ? globalThis.String(object.type) : undefined, - } - }, - - toJSON(message: RuleFileRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.isGlobal !== false) { - obj.isGlobal = message.isGlobal - } - if (message.rulePath !== undefined) { - obj.rulePath = message.rulePath - } - if (message.filename !== undefined) { - obj.filename = message.filename - } - if (message.type !== undefined) { - obj.type = message.type - } - return obj - }, - - create, I>>(base?: I): RuleFileRequest { - return RuleFileRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): RuleFileRequest { - const message = createBaseRuleFileRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.isGlobal = object.isGlobal ?? false - message.rulePath = object.rulePath ?? undefined - message.filename = object.filename ?? undefined - message.type = object.type ?? undefined - return message - }, -} - -function createBaseRuleFile(): RuleFile { - return { filePath: "", displayName: "", alreadyExists: false } -} - -export const RuleFile: MessageFns = { - encode(message: RuleFile, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.filePath !== "") { - writer.uint32(10).string(message.filePath) - } - if (message.displayName !== "") { - writer.uint32(18).string(message.displayName) - } - if (message.alreadyExists !== false) { - writer.uint32(24).bool(message.alreadyExists) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): RuleFile { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseRuleFile() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.filePath = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.displayName = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.alreadyExists = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): RuleFile { - return { - filePath: isSet(object.filePath) ? globalThis.String(object.filePath) : "", - displayName: isSet(object.displayName) ? globalThis.String(object.displayName) : "", - alreadyExists: isSet(object.alreadyExists) ? globalThis.Boolean(object.alreadyExists) : false, - } - }, - - toJSON(message: RuleFile): unknown { - const obj: any = {} - if (message.filePath !== "") { - obj.filePath = message.filePath - } - if (message.displayName !== "") { - obj.displayName = message.displayName - } - if (message.alreadyExists !== false) { - obj.alreadyExists = message.alreadyExists - } - return obj - }, - - create, I>>(base?: I): RuleFile { - return RuleFile.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): RuleFile { - const message = createBaseRuleFile() - message.filePath = object.filePath ?? "" - message.displayName = object.displayName ?? "" - message.alreadyExists = object.alreadyExists ?? false - return message - }, -} - -function createBaseToggleClineRuleRequest(): ToggleClineRuleRequest { - return { metadata: undefined, isGlobal: false, rulePath: "", enabled: false } -} - -export const ToggleClineRuleRequest: MessageFns = { - encode(message: ToggleClineRuleRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.isGlobal !== false) { - writer.uint32(16).bool(message.isGlobal) - } - if (message.rulePath !== "") { - writer.uint32(26).string(message.rulePath) - } - if (message.enabled !== false) { - writer.uint32(32).bool(message.enabled) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ToggleClineRuleRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseToggleClineRuleRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.isGlobal = reader.bool() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.rulePath = reader.string() - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.enabled = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ToggleClineRuleRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - isGlobal: isSet(object.isGlobal) ? globalThis.Boolean(object.isGlobal) : false, - rulePath: isSet(object.rulePath) ? globalThis.String(object.rulePath) : "", - enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false, - } - }, - - toJSON(message: ToggleClineRuleRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.isGlobal !== false) { - obj.isGlobal = message.isGlobal - } - if (message.rulePath !== "") { - obj.rulePath = message.rulePath - } - if (message.enabled !== false) { - obj.enabled = message.enabled - } - return obj - }, - - create, I>>(base?: I): ToggleClineRuleRequest { - return ToggleClineRuleRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ToggleClineRuleRequest { - const message = createBaseToggleClineRuleRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.isGlobal = object.isGlobal ?? false - message.rulePath = object.rulePath ?? "" - message.enabled = object.enabled ?? false - return message - }, -} - -function createBaseClineRulesToggles(): ClineRulesToggles { - return { toggles: {} } -} - -export const ClineRulesToggles: MessageFns = { - encode(message: ClineRulesToggles, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - Object.entries(message.toggles).forEach(([key, value]) => { - ClineRulesToggles_TogglesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join() - }) - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ClineRulesToggles { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseClineRulesToggles() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - const entry1 = ClineRulesToggles_TogglesEntry.decode(reader, reader.uint32()) - if (entry1.value !== undefined) { - message.toggles[entry1.key] = entry1.value - } - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ClineRulesToggles { - return { - toggles: isObject(object.toggles) - ? Object.entries(object.toggles).reduce<{ [key: string]: boolean }>((acc, [key, value]) => { - acc[key] = Boolean(value) - return acc - }, {}) - : {}, - } - }, - - toJSON(message: ClineRulesToggles): unknown { - const obj: any = {} - if (message.toggles) { - const entries = Object.entries(message.toggles) - if (entries.length > 0) { - obj.toggles = {} - entries.forEach(([k, v]) => { - obj.toggles[k] = v - }) - } - } - return obj - }, - - create, I>>(base?: I): ClineRulesToggles { - return ClineRulesToggles.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ClineRulesToggles { - const message = createBaseClineRulesToggles() - message.toggles = Object.entries(object.toggles ?? {}).reduce<{ [key: string]: boolean }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = globalThis.Boolean(value) - } - return acc - }, {}) - return message - }, -} - -function createBaseClineRulesToggles_TogglesEntry(): ClineRulesToggles_TogglesEntry { - return { key: "", value: false } -} - -export const ClineRulesToggles_TogglesEntry: MessageFns = { - encode(message: ClineRulesToggles_TogglesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.key !== "") { - writer.uint32(10).string(message.key) - } - if (message.value !== false) { - writer.uint32(16).bool(message.value) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ClineRulesToggles_TogglesEntry { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseClineRulesToggles_TogglesEntry() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.key = reader.string() - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.value = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ClineRulesToggles_TogglesEntry { - return { - key: isSet(object.key) ? globalThis.String(object.key) : "", - value: isSet(object.value) ? globalThis.Boolean(object.value) : false, - } - }, - - toJSON(message: ClineRulesToggles_TogglesEntry): unknown { - const obj: any = {} - if (message.key !== "") { - obj.key = message.key - } - if (message.value !== false) { - obj.value = message.value - } - return obj - }, - - create, I>>(base?: I): ClineRulesToggles_TogglesEntry { - return ClineRulesToggles_TogglesEntry.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ClineRulesToggles_TogglesEntry { - const message = createBaseClineRulesToggles_TogglesEntry() - message.key = object.key ?? "" - message.value = object.value ?? false - return message - }, -} - -function createBaseToggleClineRules(): ToggleClineRules { - return { globalClineRulesToggles: undefined, localClineRulesToggles: undefined } -} - -export const ToggleClineRules: MessageFns = { - encode(message: ToggleClineRules, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.globalClineRulesToggles !== undefined) { - ClineRulesToggles.encode(message.globalClineRulesToggles, writer.uint32(10).fork()).join() - } - if (message.localClineRulesToggles !== undefined) { - ClineRulesToggles.encode(message.localClineRulesToggles, writer.uint32(18).fork()).join() - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ToggleClineRules { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseToggleClineRules() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.globalClineRulesToggles = ClineRulesToggles.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.localClineRulesToggles = ClineRulesToggles.decode(reader, reader.uint32()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ToggleClineRules { - return { - globalClineRulesToggles: isSet(object.globalClineRulesToggles) - ? ClineRulesToggles.fromJSON(object.globalClineRulesToggles) - : undefined, - localClineRulesToggles: isSet(object.localClineRulesToggles) - ? ClineRulesToggles.fromJSON(object.localClineRulesToggles) - : undefined, - } - }, - - toJSON(message: ToggleClineRules): unknown { - const obj: any = {} - if (message.globalClineRulesToggles !== undefined) { - obj.globalClineRulesToggles = ClineRulesToggles.toJSON(message.globalClineRulesToggles) - } - if (message.localClineRulesToggles !== undefined) { - obj.localClineRulesToggles = ClineRulesToggles.toJSON(message.localClineRulesToggles) - } - return obj - }, - - create, I>>(base?: I): ToggleClineRules { - return ToggleClineRules.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ToggleClineRules { - const message = createBaseToggleClineRules() - message.globalClineRulesToggles = - object.globalClineRulesToggles !== undefined && object.globalClineRulesToggles !== null - ? ClineRulesToggles.fromPartial(object.globalClineRulesToggles) - : undefined - message.localClineRulesToggles = - object.localClineRulesToggles !== undefined && object.localClineRulesToggles !== null - ? ClineRulesToggles.fromPartial(object.localClineRulesToggles) - : undefined - return message - }, -} - -function createBaseToggleCursorRuleRequest(): ToggleCursorRuleRequest { - return { metadata: undefined, rulePath: "", enabled: false } -} - -export const ToggleCursorRuleRequest: MessageFns = { - encode(message: ToggleCursorRuleRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.rulePath !== "") { - writer.uint32(18).string(message.rulePath) - } - if (message.enabled !== false) { - writer.uint32(24).bool(message.enabled) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ToggleCursorRuleRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseToggleCursorRuleRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.rulePath = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.enabled = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ToggleCursorRuleRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - rulePath: isSet(object.rulePath) ? globalThis.String(object.rulePath) : "", - enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false, - } - }, - - toJSON(message: ToggleCursorRuleRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.rulePath !== "") { - obj.rulePath = message.rulePath - } - if (message.enabled !== false) { - obj.enabled = message.enabled - } - return obj - }, - - create, I>>(base?: I): ToggleCursorRuleRequest { - return ToggleCursorRuleRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ToggleCursorRuleRequest { - const message = createBaseToggleCursorRuleRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.rulePath = object.rulePath ?? "" - message.enabled = object.enabled ?? false - return message - }, -} - -/** Service for file-related operations */ -export type FileServiceDefinition = typeof FileServiceDefinition -export const FileServiceDefinition = { - name: "FileService", - fullName: "cline.FileService", - methods: { - /** Copies text to clipboard */ - copyToClipboard: { - name: "copyToClipboard", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Opens a file in the editor */ - openFile: { - name: "openFile", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Opens an image in the system viewer */ - openImage: { - name: "openImage", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Opens a mention (file, path, git commit, problem, terminal, or URL) */ - openMention: { - name: "openMention", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Deletes a rule file from either global or workspace rules directory */ - deleteRuleFile: { - name: "deleteRuleFile", - requestType: RuleFileRequest, - requestStream: false, - responseType: RuleFile, - responseStream: false, - options: {}, - }, - /** Creates a rule file from either global or workspace rules directory */ - createRuleFile: { - name: "createRuleFile", - requestType: RuleFileRequest, - requestStream: false, - responseType: RuleFile, - responseStream: false, - options: {}, - }, - /** Search git commits in the workspace */ - searchCommits: { - name: "searchCommits", - requestType: StringRequest, - requestStream: false, - responseType: GitCommits, - responseStream: false, - options: {}, - }, - /** Select images from the file system and return as data URLs */ - selectImages: { - name: "selectImages", - requestType: EmptyRequest, - requestStream: false, - responseType: StringArray, - responseStream: false, - options: {}, - }, - /** Convert URIs to workspace-relative paths */ - getRelativePaths: { - name: "getRelativePaths", - requestType: RelativePathsRequest, - requestStream: false, - responseType: RelativePaths, - responseStream: false, - options: {}, - }, - /** Search for files in the workspace with fuzzy matching */ - searchFiles: { - name: "searchFiles", - requestType: FileSearchRequest, - requestStream: false, - responseType: FileSearchResults, - responseStream: false, - options: {}, - }, - /** Toggle a Cline rule (enable or disable) */ - toggleClineRule: { - name: "toggleClineRule", - requestType: ToggleClineRuleRequest, - requestStream: false, - responseType: ToggleClineRules, - responseStream: false, - options: {}, - }, - /** Toggle a Cursor rule (enable or disable) */ - toggleCursorRule: { - name: "toggleCursorRule", - requestType: ToggleCursorRuleRequest, - requestStream: false, - responseType: ClineRulesToggles, - responseStream: false, - options: {}, - }, - /** Toggle a Windsurf rule (enable or disable) */ - toggleWindsurfRule: { - name: "toggleWindsurfRule", - requestType: ToggleWindsurfRuleRequest, - requestStream: false, - responseType: ClineRulesToggles, - responseStream: false, - options: {}, - }, - /** Refreshes all rule toggles (Cline, External, and Workflows) */ - refreshRules: { - name: "refreshRules", - requestType: EmptyRequest, - requestStream: false, - responseType: RefreshedRules, - responseStream: false, - options: {}, - }, - }, -} as const - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined - -export type DeepPartial = T extends Builtin - ? T - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial - -type KeysOfUnion = T extends T ? keyof T : never -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } - -function isObject(value: any): boolean { - return typeof value === "object" && value !== null -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter - decode(input: BinaryReader | Uint8Array, length?: number): T - fromJSON(object: any): T - toJSON(message: T): unknown - create, I>>(base?: I): T - fromPartial, I>>(object: I): T -} diff --git a/src/shared/proto/mcp.ts b/src/shared/proto/mcp.ts deleted file mode 100644 index 7b0f6620..00000000 --- a/src/shared/proto/mcp.ts +++ /dev/null @@ -1,1632 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: mcp.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { Empty, EmptyRequest, Metadata, StringRequest } from "./common" - -export const protobufPackage = "cline" - -export enum McpServerStatus { - /** - * MCP_SERVER_STATUS_DISCONNECTED - Protobuf enums (in proto3) must have a zero value defined, which serves as the default if the field isn't explicitly set. - * To align with the required nature of the TypeScript type and avoid an unnecessary UNSPECIFIED state, we map one of the existing statuses to this zero value. - */ - MCP_SERVER_STATUS_DISCONNECTED = 0, - MCP_SERVER_STATUS_CONNECTED = 1, - MCP_SERVER_STATUS_CONNECTING = 2, - UNRECOGNIZED = -1, -} - -export function mcpServerStatusFromJSON(object: any): McpServerStatus { - switch (object) { - case 0: - case "MCP_SERVER_STATUS_DISCONNECTED": - return McpServerStatus.MCP_SERVER_STATUS_DISCONNECTED - case 1: - case "MCP_SERVER_STATUS_CONNECTED": - return McpServerStatus.MCP_SERVER_STATUS_CONNECTED - case 2: - case "MCP_SERVER_STATUS_CONNECTING": - return McpServerStatus.MCP_SERVER_STATUS_CONNECTING - case -1: - case "UNRECOGNIZED": - default: - return McpServerStatus.UNRECOGNIZED - } -} - -export function mcpServerStatusToJSON(object: McpServerStatus): string { - switch (object) { - case McpServerStatus.MCP_SERVER_STATUS_DISCONNECTED: - return "MCP_SERVER_STATUS_DISCONNECTED" - case McpServerStatus.MCP_SERVER_STATUS_CONNECTED: - return "MCP_SERVER_STATUS_CONNECTED" - case McpServerStatus.MCP_SERVER_STATUS_CONNECTING: - return "MCP_SERVER_STATUS_CONNECTING" - case McpServerStatus.UNRECOGNIZED: - default: - return "UNRECOGNIZED" - } -} - -export interface ToggleMcpServerRequest { - metadata?: Metadata | undefined - serverName: string - disabled: boolean -} - -export interface UpdateMcpTimeoutRequest { - metadata?: Metadata | undefined - serverName: string - timeout: number -} - -export interface AddRemoteMcpServerRequest { - metadata?: Metadata | undefined - serverName: string - serverUrl: string -} - -export interface ToggleToolAutoApproveRequest { - metadata?: Metadata | undefined - serverName: string - toolNames: string[] - autoApprove: boolean -} - -export interface McpTool { - name: string - description?: string | undefined - inputSchema?: string | undefined - autoApprove?: boolean | undefined -} - -export interface McpResource { - uri: string - name: string - mimeType?: string | undefined - description?: string | undefined -} - -export interface McpResourceTemplate { - uriTemplate: string - name: string - mimeType?: string | undefined - description?: string | undefined -} - -export interface McpServer { - name: string - config: string - status: McpServerStatus - error?: string | undefined - tools: McpTool[] - resources: McpResource[] - resourceTemplates: McpResourceTemplate[] - disabled?: boolean | undefined - timeout?: number | undefined -} - -export interface McpServers { - mcpServers: McpServer[] -} - -export interface McpMarketplaceItem { - mcpId: string - githubUrl: string - name: string - author: string - description: string - codiconIcon: string - logoUrl: string - category: string - tags: string[] - requiresApiKey: boolean - readmeContent?: string | undefined - llmsInstallationContent?: string | undefined - isRecommended: boolean - githubStars: number - downloadCount: number - createdAt: string - updatedAt: string - lastGithubSync: string -} - -export interface McpMarketplaceCatalog { - items: McpMarketplaceItem[] -} - -function createBaseToggleMcpServerRequest(): ToggleMcpServerRequest { - return { metadata: undefined, serverName: "", disabled: false } -} - -export const ToggleMcpServerRequest: MessageFns = { - encode(message: ToggleMcpServerRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.serverName !== "") { - writer.uint32(18).string(message.serverName) - } - if (message.disabled !== false) { - writer.uint32(24).bool(message.disabled) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ToggleMcpServerRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseToggleMcpServerRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.serverName = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.disabled = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ToggleMcpServerRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - serverName: isSet(object.serverName) ? globalThis.String(object.serverName) : "", - disabled: isSet(object.disabled) ? globalThis.Boolean(object.disabled) : false, - } - }, - - toJSON(message: ToggleMcpServerRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.serverName !== "") { - obj.serverName = message.serverName - } - if (message.disabled !== false) { - obj.disabled = message.disabled - } - return obj - }, - - create, I>>(base?: I): ToggleMcpServerRequest { - return ToggleMcpServerRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ToggleMcpServerRequest { - const message = createBaseToggleMcpServerRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.serverName = object.serverName ?? "" - message.disabled = object.disabled ?? false - return message - }, -} - -function createBaseUpdateMcpTimeoutRequest(): UpdateMcpTimeoutRequest { - return { metadata: undefined, serverName: "", timeout: 0 } -} - -export const UpdateMcpTimeoutRequest: MessageFns = { - encode(message: UpdateMcpTimeoutRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.serverName !== "") { - writer.uint32(18).string(message.serverName) - } - if (message.timeout !== 0) { - writer.uint32(24).int32(message.timeout) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): UpdateMcpTimeoutRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseUpdateMcpTimeoutRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.serverName = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.timeout = reader.int32() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): UpdateMcpTimeoutRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - serverName: isSet(object.serverName) ? globalThis.String(object.serverName) : "", - timeout: isSet(object.timeout) ? globalThis.Number(object.timeout) : 0, - } - }, - - toJSON(message: UpdateMcpTimeoutRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.serverName !== "") { - obj.serverName = message.serverName - } - if (message.timeout !== 0) { - obj.timeout = Math.round(message.timeout) - } - return obj - }, - - create, I>>(base?: I): UpdateMcpTimeoutRequest { - return UpdateMcpTimeoutRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): UpdateMcpTimeoutRequest { - const message = createBaseUpdateMcpTimeoutRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.serverName = object.serverName ?? "" - message.timeout = object.timeout ?? 0 - return message - }, -} - -function createBaseAddRemoteMcpServerRequest(): AddRemoteMcpServerRequest { - return { metadata: undefined, serverName: "", serverUrl: "" } -} - -export const AddRemoteMcpServerRequest: MessageFns = { - encode(message: AddRemoteMcpServerRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.serverName !== "") { - writer.uint32(18).string(message.serverName) - } - if (message.serverUrl !== "") { - writer.uint32(26).string(message.serverUrl) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): AddRemoteMcpServerRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseAddRemoteMcpServerRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.serverName = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.serverUrl = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): AddRemoteMcpServerRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - serverName: isSet(object.serverName) ? globalThis.String(object.serverName) : "", - serverUrl: isSet(object.serverUrl) ? globalThis.String(object.serverUrl) : "", - } - }, - - toJSON(message: AddRemoteMcpServerRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.serverName !== "") { - obj.serverName = message.serverName - } - if (message.serverUrl !== "") { - obj.serverUrl = message.serverUrl - } - return obj - }, - - create, I>>(base?: I): AddRemoteMcpServerRequest { - return AddRemoteMcpServerRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): AddRemoteMcpServerRequest { - const message = createBaseAddRemoteMcpServerRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.serverName = object.serverName ?? "" - message.serverUrl = object.serverUrl ?? "" - return message - }, -} - -function createBaseToggleToolAutoApproveRequest(): ToggleToolAutoApproveRequest { - return { metadata: undefined, serverName: "", toolNames: [], autoApprove: false } -} - -export const ToggleToolAutoApproveRequest: MessageFns = { - encode(message: ToggleToolAutoApproveRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.serverName !== "") { - writer.uint32(18).string(message.serverName) - } - for (const v of message.toolNames) { - writer.uint32(26).string(v!) - } - if (message.autoApprove !== false) { - writer.uint32(32).bool(message.autoApprove) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ToggleToolAutoApproveRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseToggleToolAutoApproveRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.serverName = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.toolNames.push(reader.string()) - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.autoApprove = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ToggleToolAutoApproveRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - serverName: isSet(object.serverName) ? globalThis.String(object.serverName) : "", - toolNames: globalThis.Array.isArray(object?.toolNames) ? object.toolNames.map((e: any) => globalThis.String(e)) : [], - autoApprove: isSet(object.autoApprove) ? globalThis.Boolean(object.autoApprove) : false, - } - }, - - toJSON(message: ToggleToolAutoApproveRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.serverName !== "") { - obj.serverName = message.serverName - } - if (message.toolNames?.length) { - obj.toolNames = message.toolNames - } - if (message.autoApprove !== false) { - obj.autoApprove = message.autoApprove - } - return obj - }, - - create, I>>(base?: I): ToggleToolAutoApproveRequest { - return ToggleToolAutoApproveRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ToggleToolAutoApproveRequest { - const message = createBaseToggleToolAutoApproveRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.serverName = object.serverName ?? "" - message.toolNames = object.toolNames?.map((e) => e) || [] - message.autoApprove = object.autoApprove ?? false - return message - }, -} - -function createBaseMcpTool(): McpTool { - return { name: "", description: undefined, inputSchema: undefined, autoApprove: undefined } -} - -export const McpTool: MessageFns = { - encode(message: McpTool, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name) - } - if (message.description !== undefined) { - writer.uint32(18).string(message.description) - } - if (message.inputSchema !== undefined) { - writer.uint32(26).string(message.inputSchema) - } - if (message.autoApprove !== undefined) { - writer.uint32(32).bool(message.autoApprove) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): McpTool { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseMcpTool() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.name = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.description = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.inputSchema = reader.string() - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.autoApprove = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): McpTool { - return { - name: isSet(object.name) ? globalThis.String(object.name) : "", - description: isSet(object.description) ? globalThis.String(object.description) : undefined, - inputSchema: isSet(object.inputSchema) ? globalThis.String(object.inputSchema) : undefined, - autoApprove: isSet(object.autoApprove) ? globalThis.Boolean(object.autoApprove) : undefined, - } - }, - - toJSON(message: McpTool): unknown { - const obj: any = {} - if (message.name !== "") { - obj.name = message.name - } - if (message.description !== undefined) { - obj.description = message.description - } - if (message.inputSchema !== undefined) { - obj.inputSchema = message.inputSchema - } - if (message.autoApprove !== undefined) { - obj.autoApprove = message.autoApprove - } - return obj - }, - - create, I>>(base?: I): McpTool { - return McpTool.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): McpTool { - const message = createBaseMcpTool() - message.name = object.name ?? "" - message.description = object.description ?? undefined - message.inputSchema = object.inputSchema ?? undefined - message.autoApprove = object.autoApprove ?? undefined - return message - }, -} - -function createBaseMcpResource(): McpResource { - return { uri: "", name: "", mimeType: undefined, description: undefined } -} - -export const McpResource: MessageFns = { - encode(message: McpResource, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.uri !== "") { - writer.uint32(10).string(message.uri) - } - if (message.name !== "") { - writer.uint32(18).string(message.name) - } - if (message.mimeType !== undefined) { - writer.uint32(26).string(message.mimeType) - } - if (message.description !== undefined) { - writer.uint32(34).string(message.description) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): McpResource { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseMcpResource() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.uri = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.name = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.mimeType = reader.string() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.description = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): McpResource { - return { - uri: isSet(object.uri) ? globalThis.String(object.uri) : "", - name: isSet(object.name) ? globalThis.String(object.name) : "", - mimeType: isSet(object.mimeType) ? globalThis.String(object.mimeType) : undefined, - description: isSet(object.description) ? globalThis.String(object.description) : undefined, - } - }, - - toJSON(message: McpResource): unknown { - const obj: any = {} - if (message.uri !== "") { - obj.uri = message.uri - } - if (message.name !== "") { - obj.name = message.name - } - if (message.mimeType !== undefined) { - obj.mimeType = message.mimeType - } - if (message.description !== undefined) { - obj.description = message.description - } - return obj - }, - - create, I>>(base?: I): McpResource { - return McpResource.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): McpResource { - const message = createBaseMcpResource() - message.uri = object.uri ?? "" - message.name = object.name ?? "" - message.mimeType = object.mimeType ?? undefined - message.description = object.description ?? undefined - return message - }, -} - -function createBaseMcpResourceTemplate(): McpResourceTemplate { - return { uriTemplate: "", name: "", mimeType: undefined, description: undefined } -} - -export const McpResourceTemplate: MessageFns = { - encode(message: McpResourceTemplate, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.uriTemplate !== "") { - writer.uint32(10).string(message.uriTemplate) - } - if (message.name !== "") { - writer.uint32(18).string(message.name) - } - if (message.mimeType !== undefined) { - writer.uint32(26).string(message.mimeType) - } - if (message.description !== undefined) { - writer.uint32(34).string(message.description) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): McpResourceTemplate { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseMcpResourceTemplate() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.uriTemplate = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.name = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.mimeType = reader.string() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.description = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): McpResourceTemplate { - return { - uriTemplate: isSet(object.uriTemplate) ? globalThis.String(object.uriTemplate) : "", - name: isSet(object.name) ? globalThis.String(object.name) : "", - mimeType: isSet(object.mimeType) ? globalThis.String(object.mimeType) : undefined, - description: isSet(object.description) ? globalThis.String(object.description) : undefined, - } - }, - - toJSON(message: McpResourceTemplate): unknown { - const obj: any = {} - if (message.uriTemplate !== "") { - obj.uriTemplate = message.uriTemplate - } - if (message.name !== "") { - obj.name = message.name - } - if (message.mimeType !== undefined) { - obj.mimeType = message.mimeType - } - if (message.description !== undefined) { - obj.description = message.description - } - return obj - }, - - create, I>>(base?: I): McpResourceTemplate { - return McpResourceTemplate.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): McpResourceTemplate { - const message = createBaseMcpResourceTemplate() - message.uriTemplate = object.uriTemplate ?? "" - message.name = object.name ?? "" - message.mimeType = object.mimeType ?? undefined - message.description = object.description ?? undefined - return message - }, -} - -function createBaseMcpServer(): McpServer { - return { - name: "", - config: "", - status: 0, - error: undefined, - tools: [], - resources: [], - resourceTemplates: [], - disabled: undefined, - timeout: undefined, - } -} - -export const McpServer: MessageFns = { - encode(message: McpServer, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name) - } - if (message.config !== "") { - writer.uint32(18).string(message.config) - } - if (message.status !== 0) { - writer.uint32(24).int32(message.status) - } - if (message.error !== undefined) { - writer.uint32(34).string(message.error) - } - for (const v of message.tools) { - McpTool.encode(v!, writer.uint32(42).fork()).join() - } - for (const v of message.resources) { - McpResource.encode(v!, writer.uint32(50).fork()).join() - } - for (const v of message.resourceTemplates) { - McpResourceTemplate.encode(v!, writer.uint32(58).fork()).join() - } - if (message.disabled !== undefined) { - writer.uint32(64).bool(message.disabled) - } - if (message.timeout !== undefined) { - writer.uint32(72).int32(message.timeout) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): McpServer { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseMcpServer() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.name = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.config = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.status = reader.int32() as any - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.error = reader.string() - continue - } - case 5: { - if (tag !== 42) { - break - } - - message.tools.push(McpTool.decode(reader, reader.uint32())) - continue - } - case 6: { - if (tag !== 50) { - break - } - - message.resources.push(McpResource.decode(reader, reader.uint32())) - continue - } - case 7: { - if (tag !== 58) { - break - } - - message.resourceTemplates.push(McpResourceTemplate.decode(reader, reader.uint32())) - continue - } - case 8: { - if (tag !== 64) { - break - } - - message.disabled = reader.bool() - continue - } - case 9: { - if (tag !== 72) { - break - } - - message.timeout = reader.int32() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): McpServer { - return { - name: isSet(object.name) ? globalThis.String(object.name) : "", - config: isSet(object.config) ? globalThis.String(object.config) : "", - status: isSet(object.status) ? mcpServerStatusFromJSON(object.status) : 0, - error: isSet(object.error) ? globalThis.String(object.error) : undefined, - tools: globalThis.Array.isArray(object?.tools) ? object.tools.map((e: any) => McpTool.fromJSON(e)) : [], - resources: globalThis.Array.isArray(object?.resources) - ? object.resources.map((e: any) => McpResource.fromJSON(e)) - : [], - resourceTemplates: globalThis.Array.isArray(object?.resourceTemplates) - ? object.resourceTemplates.map((e: any) => McpResourceTemplate.fromJSON(e)) - : [], - disabled: isSet(object.disabled) ? globalThis.Boolean(object.disabled) : undefined, - timeout: isSet(object.timeout) ? globalThis.Number(object.timeout) : undefined, - } - }, - - toJSON(message: McpServer): unknown { - const obj: any = {} - if (message.name !== "") { - obj.name = message.name - } - if (message.config !== "") { - obj.config = message.config - } - if (message.status !== 0) { - obj.status = mcpServerStatusToJSON(message.status) - } - if (message.error !== undefined) { - obj.error = message.error - } - if (message.tools?.length) { - obj.tools = message.tools.map((e) => McpTool.toJSON(e)) - } - if (message.resources?.length) { - obj.resources = message.resources.map((e) => McpResource.toJSON(e)) - } - if (message.resourceTemplates?.length) { - obj.resourceTemplates = message.resourceTemplates.map((e) => McpResourceTemplate.toJSON(e)) - } - if (message.disabled !== undefined) { - obj.disabled = message.disabled - } - if (message.timeout !== undefined) { - obj.timeout = Math.round(message.timeout) - } - return obj - }, - - create, I>>(base?: I): McpServer { - return McpServer.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): McpServer { - const message = createBaseMcpServer() - message.name = object.name ?? "" - message.config = object.config ?? "" - message.status = object.status ?? 0 - message.error = object.error ?? undefined - message.tools = object.tools?.map((e) => McpTool.fromPartial(e)) || [] - message.resources = object.resources?.map((e) => McpResource.fromPartial(e)) || [] - message.resourceTemplates = object.resourceTemplates?.map((e) => McpResourceTemplate.fromPartial(e)) || [] - message.disabled = object.disabled ?? undefined - message.timeout = object.timeout ?? undefined - return message - }, -} - -function createBaseMcpServers(): McpServers { - return { mcpServers: [] } -} - -export const McpServers: MessageFns = { - encode(message: McpServers, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - for (const v of message.mcpServers) { - McpServer.encode(v!, writer.uint32(10).fork()).join() - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): McpServers { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseMcpServers() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.mcpServers.push(McpServer.decode(reader, reader.uint32())) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): McpServers { - return { - mcpServers: globalThis.Array.isArray(object?.mcpServers) - ? object.mcpServers.map((e: any) => McpServer.fromJSON(e)) - : [], - } - }, - - toJSON(message: McpServers): unknown { - const obj: any = {} - if (message.mcpServers?.length) { - obj.mcpServers = message.mcpServers.map((e) => McpServer.toJSON(e)) - } - return obj - }, - - create, I>>(base?: I): McpServers { - return McpServers.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): McpServers { - const message = createBaseMcpServers() - message.mcpServers = object.mcpServers?.map((e) => McpServer.fromPartial(e)) || [] - return message - }, -} - -function createBaseMcpMarketplaceItem(): McpMarketplaceItem { - return { - mcpId: "", - githubUrl: "", - name: "", - author: "", - description: "", - codiconIcon: "", - logoUrl: "", - category: "", - tags: [], - requiresApiKey: false, - readmeContent: undefined, - llmsInstallationContent: undefined, - isRecommended: false, - githubStars: 0, - downloadCount: 0, - createdAt: "", - updatedAt: "", - lastGithubSync: "", - } -} - -export const McpMarketplaceItem: MessageFns = { - encode(message: McpMarketplaceItem, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.mcpId !== "") { - writer.uint32(10).string(message.mcpId) - } - if (message.githubUrl !== "") { - writer.uint32(18).string(message.githubUrl) - } - if (message.name !== "") { - writer.uint32(26).string(message.name) - } - if (message.author !== "") { - writer.uint32(34).string(message.author) - } - if (message.description !== "") { - writer.uint32(42).string(message.description) - } - if (message.codiconIcon !== "") { - writer.uint32(50).string(message.codiconIcon) - } - if (message.logoUrl !== "") { - writer.uint32(58).string(message.logoUrl) - } - if (message.category !== "") { - writer.uint32(66).string(message.category) - } - for (const v of message.tags) { - writer.uint32(74).string(v!) - } - if (message.requiresApiKey !== false) { - writer.uint32(80).bool(message.requiresApiKey) - } - if (message.readmeContent !== undefined) { - writer.uint32(90).string(message.readmeContent) - } - if (message.llmsInstallationContent !== undefined) { - writer.uint32(98).string(message.llmsInstallationContent) - } - if (message.isRecommended !== false) { - writer.uint32(104).bool(message.isRecommended) - } - if (message.githubStars !== 0) { - writer.uint32(112).int32(message.githubStars) - } - if (message.downloadCount !== 0) { - writer.uint32(120).int32(message.downloadCount) - } - if (message.createdAt !== "") { - writer.uint32(130).string(message.createdAt) - } - if (message.updatedAt !== "") { - writer.uint32(138).string(message.updatedAt) - } - if (message.lastGithubSync !== "") { - writer.uint32(146).string(message.lastGithubSync) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): McpMarketplaceItem { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseMcpMarketplaceItem() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.mcpId = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.githubUrl = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.name = reader.string() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.author = reader.string() - continue - } - case 5: { - if (tag !== 42) { - break - } - - message.description = reader.string() - continue - } - case 6: { - if (tag !== 50) { - break - } - - message.codiconIcon = reader.string() - continue - } - case 7: { - if (tag !== 58) { - break - } - - message.logoUrl = reader.string() - continue - } - case 8: { - if (tag !== 66) { - break - } - - message.category = reader.string() - continue - } - case 9: { - if (tag !== 74) { - break - } - - message.tags.push(reader.string()) - continue - } - case 10: { - if (tag !== 80) { - break - } - - message.requiresApiKey = reader.bool() - continue - } - case 11: { - if (tag !== 90) { - break - } - - message.readmeContent = reader.string() - continue - } - case 12: { - if (tag !== 98) { - break - } - - message.llmsInstallationContent = reader.string() - continue - } - case 13: { - if (tag !== 104) { - break - } - - message.isRecommended = reader.bool() - continue - } - case 14: { - if (tag !== 112) { - break - } - - message.githubStars = reader.int32() - continue - } - case 15: { - if (tag !== 120) { - break - } - - message.downloadCount = reader.int32() - continue - } - case 16: { - if (tag !== 130) { - break - } - - message.createdAt = reader.string() - continue - } - case 17: { - if (tag !== 138) { - break - } - - message.updatedAt = reader.string() - continue - } - case 18: { - if (tag !== 146) { - break - } - - message.lastGithubSync = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): McpMarketplaceItem { - return { - mcpId: isSet(object.mcpId) ? globalThis.String(object.mcpId) : "", - githubUrl: isSet(object.githubUrl) ? globalThis.String(object.githubUrl) : "", - name: isSet(object.name) ? globalThis.String(object.name) : "", - author: isSet(object.author) ? globalThis.String(object.author) : "", - description: isSet(object.description) ? globalThis.String(object.description) : "", - codiconIcon: isSet(object.codiconIcon) ? globalThis.String(object.codiconIcon) : "", - logoUrl: isSet(object.logoUrl) ? globalThis.String(object.logoUrl) : "", - category: isSet(object.category) ? globalThis.String(object.category) : "", - tags: globalThis.Array.isArray(object?.tags) ? object.tags.map((e: any) => globalThis.String(e)) : [], - requiresApiKey: isSet(object.requiresApiKey) ? globalThis.Boolean(object.requiresApiKey) : false, - readmeContent: isSet(object.readmeContent) ? globalThis.String(object.readmeContent) : undefined, - llmsInstallationContent: isSet(object.llmsInstallationContent) - ? globalThis.String(object.llmsInstallationContent) - : undefined, - isRecommended: isSet(object.isRecommended) ? globalThis.Boolean(object.isRecommended) : false, - githubStars: isSet(object.githubStars) ? globalThis.Number(object.githubStars) : 0, - downloadCount: isSet(object.downloadCount) ? globalThis.Number(object.downloadCount) : 0, - createdAt: isSet(object.createdAt) ? globalThis.String(object.createdAt) : "", - updatedAt: isSet(object.updatedAt) ? globalThis.String(object.updatedAt) : "", - lastGithubSync: isSet(object.lastGithubSync) ? globalThis.String(object.lastGithubSync) : "", - } - }, - - toJSON(message: McpMarketplaceItem): unknown { - const obj: any = {} - if (message.mcpId !== "") { - obj.mcpId = message.mcpId - } - if (message.githubUrl !== "") { - obj.githubUrl = message.githubUrl - } - if (message.name !== "") { - obj.name = message.name - } - if (message.author !== "") { - obj.author = message.author - } - if (message.description !== "") { - obj.description = message.description - } - if (message.codiconIcon !== "") { - obj.codiconIcon = message.codiconIcon - } - if (message.logoUrl !== "") { - obj.logoUrl = message.logoUrl - } - if (message.category !== "") { - obj.category = message.category - } - if (message.tags?.length) { - obj.tags = message.tags - } - if (message.requiresApiKey !== false) { - obj.requiresApiKey = message.requiresApiKey - } - if (message.readmeContent !== undefined) { - obj.readmeContent = message.readmeContent - } - if (message.llmsInstallationContent !== undefined) { - obj.llmsInstallationContent = message.llmsInstallationContent - } - if (message.isRecommended !== false) { - obj.isRecommended = message.isRecommended - } - if (message.githubStars !== 0) { - obj.githubStars = Math.round(message.githubStars) - } - if (message.downloadCount !== 0) { - obj.downloadCount = Math.round(message.downloadCount) - } - if (message.createdAt !== "") { - obj.createdAt = message.createdAt - } - if (message.updatedAt !== "") { - obj.updatedAt = message.updatedAt - } - if (message.lastGithubSync !== "") { - obj.lastGithubSync = message.lastGithubSync - } - return obj - }, - - create, I>>(base?: I): McpMarketplaceItem { - return McpMarketplaceItem.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): McpMarketplaceItem { - const message = createBaseMcpMarketplaceItem() - message.mcpId = object.mcpId ?? "" - message.githubUrl = object.githubUrl ?? "" - message.name = object.name ?? "" - message.author = object.author ?? "" - message.description = object.description ?? "" - message.codiconIcon = object.codiconIcon ?? "" - message.logoUrl = object.logoUrl ?? "" - message.category = object.category ?? "" - message.tags = object.tags?.map((e) => e) || [] - message.requiresApiKey = object.requiresApiKey ?? false - message.readmeContent = object.readmeContent ?? undefined - message.llmsInstallationContent = object.llmsInstallationContent ?? undefined - message.isRecommended = object.isRecommended ?? false - message.githubStars = object.githubStars ?? 0 - message.downloadCount = object.downloadCount ?? 0 - message.createdAt = object.createdAt ?? "" - message.updatedAt = object.updatedAt ?? "" - message.lastGithubSync = object.lastGithubSync ?? "" - return message - }, -} - -function createBaseMcpMarketplaceCatalog(): McpMarketplaceCatalog { - return { items: [] } -} - -export const McpMarketplaceCatalog: MessageFns = { - encode(message: McpMarketplaceCatalog, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - for (const v of message.items) { - McpMarketplaceItem.encode(v!, writer.uint32(10).fork()).join() - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): McpMarketplaceCatalog { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseMcpMarketplaceCatalog() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.items.push(McpMarketplaceItem.decode(reader, reader.uint32())) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): McpMarketplaceCatalog { - return { - items: globalThis.Array.isArray(object?.items) ? object.items.map((e: any) => McpMarketplaceItem.fromJSON(e)) : [], - } - }, - - toJSON(message: McpMarketplaceCatalog): unknown { - const obj: any = {} - if (message.items?.length) { - obj.items = message.items.map((e) => McpMarketplaceItem.toJSON(e)) - } - return obj - }, - - create, I>>(base?: I): McpMarketplaceCatalog { - return McpMarketplaceCatalog.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): McpMarketplaceCatalog { - const message = createBaseMcpMarketplaceCatalog() - message.items = object.items?.map((e) => McpMarketplaceItem.fromPartial(e)) || [] - return message - }, -} - -export type McpServiceDefinition = typeof McpServiceDefinition -export const McpServiceDefinition = { - name: "McpService", - fullName: "cline.McpService", - methods: { - toggleMcpServer: { - name: "toggleMcpServer", - requestType: ToggleMcpServerRequest, - requestStream: false, - responseType: McpServers, - responseStream: false, - options: {}, - }, - updateMcpTimeout: { - name: "updateMcpTimeout", - requestType: UpdateMcpTimeoutRequest, - requestStream: false, - responseType: McpServers, - responseStream: false, - options: {}, - }, - addRemoteMcpServer: { - name: "addRemoteMcpServer", - requestType: AddRemoteMcpServerRequest, - requestStream: false, - responseType: McpServers, - responseStream: false, - options: {}, - }, - downloadMcp: { - name: "downloadMcp", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - restartMcpServer: { - name: "restartMcpServer", - requestType: StringRequest, - requestStream: false, - responseType: McpServers, - responseStream: false, - options: {}, - }, - deleteMcpServer: { - name: "deleteMcpServer", - requestType: StringRequest, - requestStream: false, - responseType: McpServers, - responseStream: false, - options: {}, - }, - toggleToolAutoApprove: { - name: "toggleToolAutoApprove", - requestType: ToggleToolAutoApproveRequest, - requestStream: false, - responseType: McpServers, - responseStream: false, - options: {}, - }, - refreshMcpMarketplace: { - name: "refreshMcpMarketplace", - requestType: EmptyRequest, - requestStream: false, - responseType: McpMarketplaceCatalog, - responseStream: false, - options: {}, - }, - }, -} as const - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined - -export type DeepPartial = T extends Builtin - ? T - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial - -type KeysOfUnion = T extends T ? keyof T : never -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } - -function isSet(value: any): boolean { - return value !== null && value !== undefined -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter - decode(input: BinaryReader | Uint8Array, length?: number): T - fromJSON(object: any): T - toJSON(message: T): unknown - create, I>>(base?: I): T - fromPartial, I>>(object: I): T -} diff --git a/src/shared/proto/models.ts b/src/shared/proto/models.ts deleted file mode 100644 index 6ccb0956..00000000 --- a/src/shared/proto/models.ts +++ /dev/null @@ -1,773 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: models.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { EmptyRequest, Metadata, StringArray, StringRequest } from "./common" - -export const protobufPackage = "cline" - -/** List of VS Code LM models */ -export interface VsCodeLmModelsArray { - models: VsCodeLmModel[] -} - -/** Structure representing a VS Code LM model */ -export interface VsCodeLmModel { - vendor: string - family: string - version: string - id: string -} - -/** For OpenRouterCompatibleModelInfo structure in OpenRouterModels */ -export interface OpenRouterModelInfo { - maxTokens: number - contextWindow: number - supportsImages: boolean - supportsPromptCache: boolean - inputPrice: number - outputPrice: number - cacheWritesPrice: number - cacheReadsPrice: number - description: string -} - -/** Shared response message for model information */ -export interface OpenRouterCompatibleModelInfo { - models: { [key: string]: OpenRouterModelInfo } -} - -export interface OpenRouterCompatibleModelInfo_ModelsEntry { - key: string - value?: OpenRouterModelInfo | undefined -} - -/** Request for fetching OpenAI models */ -export interface OpenAiModelsRequest { - metadata?: Metadata | undefined - baseUrl: string - apiKey: string -} - -function createBaseVsCodeLmModelsArray(): VsCodeLmModelsArray { - return { models: [] } -} - -export const VsCodeLmModelsArray: MessageFns = { - encode(message: VsCodeLmModelsArray, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - for (const v of message.models) { - VsCodeLmModel.encode(v!, writer.uint32(10).fork()).join() - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): VsCodeLmModelsArray { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseVsCodeLmModelsArray() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.models.push(VsCodeLmModel.decode(reader, reader.uint32())) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): VsCodeLmModelsArray { - return { - models: globalThis.Array.isArray(object?.models) ? object.models.map((e: any) => VsCodeLmModel.fromJSON(e)) : [], - } - }, - - toJSON(message: VsCodeLmModelsArray): unknown { - const obj: any = {} - if (message.models?.length) { - obj.models = message.models.map((e) => VsCodeLmModel.toJSON(e)) - } - return obj - }, - - create, I>>(base?: I): VsCodeLmModelsArray { - return VsCodeLmModelsArray.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): VsCodeLmModelsArray { - const message = createBaseVsCodeLmModelsArray() - message.models = object.models?.map((e) => VsCodeLmModel.fromPartial(e)) || [] - return message - }, -} - -function createBaseVsCodeLmModel(): VsCodeLmModel { - return { vendor: "", family: "", version: "", id: "" } -} - -export const VsCodeLmModel: MessageFns = { - encode(message: VsCodeLmModel, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.vendor !== "") { - writer.uint32(10).string(message.vendor) - } - if (message.family !== "") { - writer.uint32(18).string(message.family) - } - if (message.version !== "") { - writer.uint32(26).string(message.version) - } - if (message.id !== "") { - writer.uint32(34).string(message.id) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): VsCodeLmModel { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseVsCodeLmModel() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.vendor = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.family = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.version = reader.string() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.id = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): VsCodeLmModel { - return { - vendor: isSet(object.vendor) ? globalThis.String(object.vendor) : "", - family: isSet(object.family) ? globalThis.String(object.family) : "", - version: isSet(object.version) ? globalThis.String(object.version) : "", - id: isSet(object.id) ? globalThis.String(object.id) : "", - } - }, - - toJSON(message: VsCodeLmModel): unknown { - const obj: any = {} - if (message.vendor !== "") { - obj.vendor = message.vendor - } - if (message.family !== "") { - obj.family = message.family - } - if (message.version !== "") { - obj.version = message.version - } - if (message.id !== "") { - obj.id = message.id - } - return obj - }, - - create, I>>(base?: I): VsCodeLmModel { - return VsCodeLmModel.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): VsCodeLmModel { - const message = createBaseVsCodeLmModel() - message.vendor = object.vendor ?? "" - message.family = object.family ?? "" - message.version = object.version ?? "" - message.id = object.id ?? "" - return message - }, -} - -function createBaseOpenRouterModelInfo(): OpenRouterModelInfo { - return { - maxTokens: 0, - contextWindow: 0, - supportsImages: false, - supportsPromptCache: false, - inputPrice: 0, - outputPrice: 0, - cacheWritesPrice: 0, - cacheReadsPrice: 0, - description: "", - } -} - -export const OpenRouterModelInfo: MessageFns = { - encode(message: OpenRouterModelInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.maxTokens !== 0) { - writer.uint32(8).int32(message.maxTokens) - } - if (message.contextWindow !== 0) { - writer.uint32(16).int32(message.contextWindow) - } - if (message.supportsImages !== false) { - writer.uint32(24).bool(message.supportsImages) - } - if (message.supportsPromptCache !== false) { - writer.uint32(32).bool(message.supportsPromptCache) - } - if (message.inputPrice !== 0) { - writer.uint32(41).double(message.inputPrice) - } - if (message.outputPrice !== 0) { - writer.uint32(49).double(message.outputPrice) - } - if (message.cacheWritesPrice !== 0) { - writer.uint32(57).double(message.cacheWritesPrice) - } - if (message.cacheReadsPrice !== 0) { - writer.uint32(65).double(message.cacheReadsPrice) - } - if (message.description !== "") { - writer.uint32(74).string(message.description) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): OpenRouterModelInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseOpenRouterModelInfo() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.maxTokens = reader.int32() - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.contextWindow = reader.int32() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.supportsImages = reader.bool() - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.supportsPromptCache = reader.bool() - continue - } - case 5: { - if (tag !== 41) { - break - } - - message.inputPrice = reader.double() - continue - } - case 6: { - if (tag !== 49) { - break - } - - message.outputPrice = reader.double() - continue - } - case 7: { - if (tag !== 57) { - break - } - - message.cacheWritesPrice = reader.double() - continue - } - case 8: { - if (tag !== 65) { - break - } - - message.cacheReadsPrice = reader.double() - continue - } - case 9: { - if (tag !== 74) { - break - } - - message.description = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): OpenRouterModelInfo { - return { - maxTokens: isSet(object.maxTokens) ? globalThis.Number(object.maxTokens) : 0, - contextWindow: isSet(object.contextWindow) ? globalThis.Number(object.contextWindow) : 0, - supportsImages: isSet(object.supportsImages) ? globalThis.Boolean(object.supportsImages) : false, - supportsPromptCache: isSet(object.supportsPromptCache) ? globalThis.Boolean(object.supportsPromptCache) : false, - inputPrice: isSet(object.inputPrice) ? globalThis.Number(object.inputPrice) : 0, - outputPrice: isSet(object.outputPrice) ? globalThis.Number(object.outputPrice) : 0, - cacheWritesPrice: isSet(object.cacheWritesPrice) ? globalThis.Number(object.cacheWritesPrice) : 0, - cacheReadsPrice: isSet(object.cacheReadsPrice) ? globalThis.Number(object.cacheReadsPrice) : 0, - description: isSet(object.description) ? globalThis.String(object.description) : "", - } - }, - - toJSON(message: OpenRouterModelInfo): unknown { - const obj: any = {} - if (message.maxTokens !== 0) { - obj.maxTokens = Math.round(message.maxTokens) - } - if (message.contextWindow !== 0) { - obj.contextWindow = Math.round(message.contextWindow) - } - if (message.supportsImages !== false) { - obj.supportsImages = message.supportsImages - } - if (message.supportsPromptCache !== false) { - obj.supportsPromptCache = message.supportsPromptCache - } - if (message.inputPrice !== 0) { - obj.inputPrice = message.inputPrice - } - if (message.outputPrice !== 0) { - obj.outputPrice = message.outputPrice - } - if (message.cacheWritesPrice !== 0) { - obj.cacheWritesPrice = message.cacheWritesPrice - } - if (message.cacheReadsPrice !== 0) { - obj.cacheReadsPrice = message.cacheReadsPrice - } - if (message.description !== "") { - obj.description = message.description - } - return obj - }, - - create, I>>(base?: I): OpenRouterModelInfo { - return OpenRouterModelInfo.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): OpenRouterModelInfo { - const message = createBaseOpenRouterModelInfo() - message.maxTokens = object.maxTokens ?? 0 - message.contextWindow = object.contextWindow ?? 0 - message.supportsImages = object.supportsImages ?? false - message.supportsPromptCache = object.supportsPromptCache ?? false - message.inputPrice = object.inputPrice ?? 0 - message.outputPrice = object.outputPrice ?? 0 - message.cacheWritesPrice = object.cacheWritesPrice ?? 0 - message.cacheReadsPrice = object.cacheReadsPrice ?? 0 - message.description = object.description ?? "" - return message - }, -} - -function createBaseOpenRouterCompatibleModelInfo(): OpenRouterCompatibleModelInfo { - return { models: {} } -} - -export const OpenRouterCompatibleModelInfo: MessageFns = { - encode(message: OpenRouterCompatibleModelInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - Object.entries(message.models).forEach(([key, value]) => { - OpenRouterCompatibleModelInfo_ModelsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join() - }) - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): OpenRouterCompatibleModelInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseOpenRouterCompatibleModelInfo() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - const entry1 = OpenRouterCompatibleModelInfo_ModelsEntry.decode(reader, reader.uint32()) - if (entry1.value !== undefined) { - message.models[entry1.key] = entry1.value - } - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): OpenRouterCompatibleModelInfo { - return { - models: isObject(object.models) - ? Object.entries(object.models).reduce<{ [key: string]: OpenRouterModelInfo }>((acc, [key, value]) => { - acc[key] = OpenRouterModelInfo.fromJSON(value) - return acc - }, {}) - : {}, - } - }, - - toJSON(message: OpenRouterCompatibleModelInfo): unknown { - const obj: any = {} - if (message.models) { - const entries = Object.entries(message.models) - if (entries.length > 0) { - obj.models = {} - entries.forEach(([k, v]) => { - obj.models[k] = OpenRouterModelInfo.toJSON(v) - }) - } - } - return obj - }, - - create, I>>(base?: I): OpenRouterCompatibleModelInfo { - return OpenRouterCompatibleModelInfo.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): OpenRouterCompatibleModelInfo { - const message = createBaseOpenRouterCompatibleModelInfo() - message.models = Object.entries(object.models ?? {}).reduce<{ [key: string]: OpenRouterModelInfo }>( - (acc, [key, value]) => { - if (value !== undefined) { - acc[key] = OpenRouterModelInfo.fromPartial(value) - } - return acc - }, - {}, - ) - return message - }, -} - -function createBaseOpenRouterCompatibleModelInfo_ModelsEntry(): OpenRouterCompatibleModelInfo_ModelsEntry { - return { key: "", value: undefined } -} - -export const OpenRouterCompatibleModelInfo_ModelsEntry: MessageFns = { - encode(message: OpenRouterCompatibleModelInfo_ModelsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.key !== "") { - writer.uint32(10).string(message.key) - } - if (message.value !== undefined) { - OpenRouterModelInfo.encode(message.value, writer.uint32(18).fork()).join() - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): OpenRouterCompatibleModelInfo_ModelsEntry { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseOpenRouterCompatibleModelInfo_ModelsEntry() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.key = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.value = OpenRouterModelInfo.decode(reader, reader.uint32()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): OpenRouterCompatibleModelInfo_ModelsEntry { - return { - key: isSet(object.key) ? globalThis.String(object.key) : "", - value: isSet(object.value) ? OpenRouterModelInfo.fromJSON(object.value) : undefined, - } - }, - - toJSON(message: OpenRouterCompatibleModelInfo_ModelsEntry): unknown { - const obj: any = {} - if (message.key !== "") { - obj.key = message.key - } - if (message.value !== undefined) { - obj.value = OpenRouterModelInfo.toJSON(message.value) - } - return obj - }, - - create, I>>( - base?: I, - ): OpenRouterCompatibleModelInfo_ModelsEntry { - return OpenRouterCompatibleModelInfo_ModelsEntry.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>( - object: I, - ): OpenRouterCompatibleModelInfo_ModelsEntry { - const message = createBaseOpenRouterCompatibleModelInfo_ModelsEntry() - message.key = object.key ?? "" - message.value = - object.value !== undefined && object.value !== null ? OpenRouterModelInfo.fromPartial(object.value) : undefined - return message - }, -} - -function createBaseOpenAiModelsRequest(): OpenAiModelsRequest { - return { metadata: undefined, baseUrl: "", apiKey: "" } -} - -export const OpenAiModelsRequest: MessageFns = { - encode(message: OpenAiModelsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.baseUrl !== "") { - writer.uint32(18).string(message.baseUrl) - } - if (message.apiKey !== "") { - writer.uint32(26).string(message.apiKey) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): OpenAiModelsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseOpenAiModelsRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.baseUrl = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.apiKey = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): OpenAiModelsRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - baseUrl: isSet(object.baseUrl) ? globalThis.String(object.baseUrl) : "", - apiKey: isSet(object.apiKey) ? globalThis.String(object.apiKey) : "", - } - }, - - toJSON(message: OpenAiModelsRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.baseUrl !== "") { - obj.baseUrl = message.baseUrl - } - if (message.apiKey !== "") { - obj.apiKey = message.apiKey - } - return obj - }, - - create, I>>(base?: I): OpenAiModelsRequest { - return OpenAiModelsRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): OpenAiModelsRequest { - const message = createBaseOpenAiModelsRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.baseUrl = object.baseUrl ?? "" - message.apiKey = object.apiKey ?? "" - return message - }, -} - -/** Service for model-related operations */ -export type ModelsServiceDefinition = typeof ModelsServiceDefinition -export const ModelsServiceDefinition = { - name: "ModelsService", - fullName: "cline.ModelsService", - methods: { - /** Fetches available models from Ollama */ - getOllamaModels: { - name: "getOllamaModels", - requestType: StringRequest, - requestStream: false, - responseType: StringArray, - responseStream: false, - options: {}, - }, - /** Fetches available models from LM Studio */ - getLmStudioModels: { - name: "getLmStudioModels", - requestType: StringRequest, - requestStream: false, - responseType: StringArray, - responseStream: false, - options: {}, - }, - /** Fetches available models from VS Code LM API */ - getVsCodeLmModels: { - name: "getVsCodeLmModels", - requestType: EmptyRequest, - requestStream: false, - responseType: VsCodeLmModelsArray, - responseStream: false, - options: {}, - }, - /** Refreshes and returns OpenRouter models */ - refreshOpenRouterModels: { - name: "refreshOpenRouterModels", - requestType: EmptyRequest, - requestStream: false, - responseType: OpenRouterCompatibleModelInfo, - responseStream: false, - options: {}, - }, - /** Refreshes and returns OpenAI models */ - refreshOpenAiModels: { - name: "refreshOpenAiModels", - requestType: OpenAiModelsRequest, - requestStream: false, - responseType: StringArray, - responseStream: false, - options: {}, - }, - /** Refreshes and returns Requesty models */ - refreshRequestyModels: { - name: "refreshRequestyModels", - requestType: EmptyRequest, - requestStream: false, - responseType: OpenRouterCompatibleModelInfo, - responseStream: false, - options: {}, - }, - }, -} as const - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined - -export type DeepPartial = T extends Builtin - ? T - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial - -type KeysOfUnion = T extends T ? keyof T : never -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } - -function isObject(value: any): boolean { - return typeof value === "object" && value !== null -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter - decode(input: BinaryReader | Uint8Array, length?: number): T - fromJSON(object: any): T - toJSON(message: T): unknown - create, I>>(base?: I): T - fromPartial, I>>(object: I): T -} diff --git a/src/shared/proto/slash.ts b/src/shared/proto/slash.ts deleted file mode 100644 index 81176870..00000000 --- a/src/shared/proto/slash.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: slash.proto - -/* eslint-disable */ -import { Empty, StringRequest } from "./common" - -export const protobufPackage = "cline" - -/** SlashService provides methods for managing slash */ -export type SlashServiceDefinition = typeof SlashServiceDefinition -export const SlashServiceDefinition = { - name: "SlashService", - fullName: "cline.SlashService", - methods: { - /** Sends button click message */ - reportBug: { - name: "reportBug", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - condense: { - name: "condense", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - }, -} as const diff --git a/src/shared/proto/state.ts b/src/shared/proto/state.ts deleted file mode 100644 index cc230ad6..00000000 --- a/src/shared/proto/state.ts +++ /dev/null @@ -1,478 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: state.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { Empty, EmptyRequest, Int64, Int64Request, Metadata, StringRequest } from "./common" - -export const protobufPackage = "cline" - -export enum PlanActMode { - PLAN = 0, - ACT = 1, - UNRECOGNIZED = -1, -} - -export function planActModeFromJSON(object: any): PlanActMode { - switch (object) { - case 0: - case "PLAN": - return PlanActMode.PLAN - case 1: - case "ACT": - return PlanActMode.ACT - case -1: - case "UNRECOGNIZED": - default: - return PlanActMode.UNRECOGNIZED - } -} - -export function planActModeToJSON(object: PlanActMode): string { - switch (object) { - case PlanActMode.PLAN: - return "PLAN" - case PlanActMode.ACT: - return "ACT" - case PlanActMode.UNRECOGNIZED: - default: - return "UNRECOGNIZED" - } -} - -export interface State { - stateJson: string -} - -export interface TogglePlanActModeRequest { - metadata?: Metadata | undefined - chatSettings?: ChatSettings | undefined - chatContent?: ChatContent | undefined -} - -export interface ChatSettings { - mode: PlanActMode - preferredLanguage?: string | undefined - openAiReasoningEffort?: string | undefined -} - -export interface ChatContent { - message?: string | undefined - images: string[] -} - -function createBaseState(): State { - return { stateJson: "" } -} - -export const State: MessageFns = { - encode(message: State, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.stateJson !== "") { - writer.uint32(10).string(message.stateJson) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): State { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseState() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.stateJson = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): State { - return { stateJson: isSet(object.stateJson) ? globalThis.String(object.stateJson) : "" } - }, - - toJSON(message: State): unknown { - const obj: any = {} - if (message.stateJson !== "") { - obj.stateJson = message.stateJson - } - return obj - }, - - create, I>>(base?: I): State { - return State.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): State { - const message = createBaseState() - message.stateJson = object.stateJson ?? "" - return message - }, -} - -function createBaseTogglePlanActModeRequest(): TogglePlanActModeRequest { - return { metadata: undefined, chatSettings: undefined, chatContent: undefined } -} - -export const TogglePlanActModeRequest: MessageFns = { - encode(message: TogglePlanActModeRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.chatSettings !== undefined) { - ChatSettings.encode(message.chatSettings, writer.uint32(18).fork()).join() - } - if (message.chatContent !== undefined) { - ChatContent.encode(message.chatContent, writer.uint32(26).fork()).join() - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): TogglePlanActModeRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseTogglePlanActModeRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.chatSettings = ChatSettings.decode(reader, reader.uint32()) - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.chatContent = ChatContent.decode(reader, reader.uint32()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): TogglePlanActModeRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - chatSettings: isSet(object.chatSettings) ? ChatSettings.fromJSON(object.chatSettings) : undefined, - chatContent: isSet(object.chatContent) ? ChatContent.fromJSON(object.chatContent) : undefined, - } - }, - - toJSON(message: TogglePlanActModeRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.chatSettings !== undefined) { - obj.chatSettings = ChatSettings.toJSON(message.chatSettings) - } - if (message.chatContent !== undefined) { - obj.chatContent = ChatContent.toJSON(message.chatContent) - } - return obj - }, - - create, I>>(base?: I): TogglePlanActModeRequest { - return TogglePlanActModeRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): TogglePlanActModeRequest { - const message = createBaseTogglePlanActModeRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.chatSettings = - object.chatSettings !== undefined && object.chatSettings !== null - ? ChatSettings.fromPartial(object.chatSettings) - : undefined - message.chatContent = - object.chatContent !== undefined && object.chatContent !== null - ? ChatContent.fromPartial(object.chatContent) - : undefined - return message - }, -} - -function createBaseChatSettings(): ChatSettings { - return { mode: 0, preferredLanguage: undefined, openAiReasoningEffort: undefined } -} - -export const ChatSettings: MessageFns = { - encode(message: ChatSettings, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.mode !== 0) { - writer.uint32(8).int32(message.mode) - } - if (message.preferredLanguage !== undefined) { - writer.uint32(18).string(message.preferredLanguage) - } - if (message.openAiReasoningEffort !== undefined) { - writer.uint32(26).string(message.openAiReasoningEffort) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ChatSettings { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseChatSettings() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.mode = reader.int32() as any - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.preferredLanguage = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.openAiReasoningEffort = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ChatSettings { - return { - mode: isSet(object.mode) ? planActModeFromJSON(object.mode) : 0, - preferredLanguage: isSet(object.preferredLanguage) ? globalThis.String(object.preferredLanguage) : undefined, - openAiReasoningEffort: isSet(object.openAiReasoningEffort) - ? globalThis.String(object.openAiReasoningEffort) - : undefined, - } - }, - - toJSON(message: ChatSettings): unknown { - const obj: any = {} - if (message.mode !== 0) { - obj.mode = planActModeToJSON(message.mode) - } - if (message.preferredLanguage !== undefined) { - obj.preferredLanguage = message.preferredLanguage - } - if (message.openAiReasoningEffort !== undefined) { - obj.openAiReasoningEffort = message.openAiReasoningEffort - } - return obj - }, - - create, I>>(base?: I): ChatSettings { - return ChatSettings.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ChatSettings { - const message = createBaseChatSettings() - message.mode = object.mode ?? 0 - message.preferredLanguage = object.preferredLanguage ?? undefined - message.openAiReasoningEffort = object.openAiReasoningEffort ?? undefined - return message - }, -} - -function createBaseChatContent(): ChatContent { - return { message: undefined, images: [] } -} - -export const ChatContent: MessageFns = { - encode(message: ChatContent, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.message !== undefined) { - writer.uint32(10).string(message.message) - } - for (const v of message.images) { - writer.uint32(18).string(v!) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ChatContent { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseChatContent() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.message = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.images.push(reader.string()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ChatContent { - return { - message: isSet(object.message) ? globalThis.String(object.message) : undefined, - images: globalThis.Array.isArray(object?.images) ? object.images.map((e: any) => globalThis.String(e)) : [], - } - }, - - toJSON(message: ChatContent): unknown { - const obj: any = {} - if (message.message !== undefined) { - obj.message = message.message - } - if (message.images?.length) { - obj.images = message.images - } - return obj - }, - - create, I>>(base?: I): ChatContent { - return ChatContent.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ChatContent { - const message = createBaseChatContent() - message.message = object.message ?? undefined - message.images = object.images?.map((e) => e) || [] - return message - }, -} - -export type StateServiceDefinition = typeof StateServiceDefinition -export const StateServiceDefinition = { - name: "StateService", - fullName: "cline.StateService", - methods: { - getLatestState: { - name: "getLatestState", - requestType: EmptyRequest, - requestStream: false, - responseType: State, - responseStream: false, - options: {}, - }, - subscribeToState: { - name: "subscribeToState", - requestType: EmptyRequest, - requestStream: false, - responseType: State, - responseStream: true, - options: {}, - }, - toggleFavoriteModel: { - name: "toggleFavoriteModel", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - resetState: { - name: "resetState", - requestType: EmptyRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - togglePlanActMode: { - name: "togglePlanActMode", - requestType: TogglePlanActModeRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - updateTerminalConnectionTimeout: { - name: "updateTerminalConnectionTimeout", - requestType: Int64Request, - requestStream: false, - responseType: Int64, - responseStream: false, - options: {}, - }, - }, -} as const - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined - -export type DeepPartial = T extends Builtin - ? T - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial - -type KeysOfUnion = T extends T ? keyof T : never -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } - -function isSet(value: any): boolean { - return value !== null && value !== undefined -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter - decode(input: BinaryReader | Uint8Array, length?: number): T - fromJSON(object: any): T - toJSON(message: T): unknown - create, I>>(base?: I): T - fromPartial, I>>(object: I): T -} diff --git a/src/shared/proto/task.ts b/src/shared/proto/task.ts deleted file mode 100644 index 94c71c63..00000000 --- a/src/shared/proto/task.ts +++ /dev/null @@ -1,1241 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: task.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { Empty, EmptyRequest, Int64Request, Metadata, StringArrayRequest, StringRequest } from "./common" - -export const protobufPackage = "cline" - -/** Request message for creating a new task */ -export interface NewTaskRequest { - metadata?: Metadata | undefined - text: string - images: string[] -} - -/** Request message for toggling task favorite status */ -export interface TaskFavoriteRequest { - metadata?: Metadata | undefined - taskId: string - isFavorited: boolean -} - -/** Response for task details */ -export interface TaskResponse { - id: string - task: string - ts: number - isFavorited: boolean - size: number - totalCost: number - tokensIn: number - tokensOut: number - cacheWrites: number - cacheReads: number -} - -/** Results returned when deleting non-favorited tasks */ -export interface DeleteNonFavoritedTasksResults { - tasksPreserved: number - tasksDeleted: number -} - -/** Request for getting task history with filtering */ -export interface GetTaskHistoryRequest { - metadata?: Metadata | undefined - favoritesOnly: boolean - searchQuery: string - sortBy: string - currentWorkspaceOnly: boolean -} - -/** Response for task history */ -export interface TaskHistoryArray { - tasks: TaskItem[] - totalCount: number -} - -/** Task item details for history list */ -export interface TaskItem { - id: string - task: string - ts: number - isFavorited: boolean - size: number - totalCost: number - tokensIn: number - tokensOut: number - cacheWrites: number - cacheReads: number -} - -/** Request for ask response operation */ -export interface AskResponseRequest { - metadata?: Metadata | undefined - responseType: string - text: string - images: string[] -} - -function createBaseNewTaskRequest(): NewTaskRequest { - return { metadata: undefined, text: "", images: [] } -} - -export const NewTaskRequest: MessageFns = { - encode(message: NewTaskRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.text !== "") { - writer.uint32(18).string(message.text) - } - for (const v of message.images) { - writer.uint32(26).string(v!) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): NewTaskRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseNewTaskRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.text = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.images.push(reader.string()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): NewTaskRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - text: isSet(object.text) ? globalThis.String(object.text) : "", - images: globalThis.Array.isArray(object?.images) ? object.images.map((e: any) => globalThis.String(e)) : [], - } - }, - - toJSON(message: NewTaskRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.text !== "") { - obj.text = message.text - } - if (message.images?.length) { - obj.images = message.images - } - return obj - }, - - create, I>>(base?: I): NewTaskRequest { - return NewTaskRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): NewTaskRequest { - const message = createBaseNewTaskRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.text = object.text ?? "" - message.images = object.images?.map((e) => e) || [] - return message - }, -} - -function createBaseTaskFavoriteRequest(): TaskFavoriteRequest { - return { metadata: undefined, taskId: "", isFavorited: false } -} - -export const TaskFavoriteRequest: MessageFns = { - encode(message: TaskFavoriteRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.taskId !== "") { - writer.uint32(18).string(message.taskId) - } - if (message.isFavorited !== false) { - writer.uint32(24).bool(message.isFavorited) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): TaskFavoriteRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseTaskFavoriteRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.taskId = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.isFavorited = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): TaskFavoriteRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - taskId: isSet(object.taskId) ? globalThis.String(object.taskId) : "", - isFavorited: isSet(object.isFavorited) ? globalThis.Boolean(object.isFavorited) : false, - } - }, - - toJSON(message: TaskFavoriteRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.taskId !== "") { - obj.taskId = message.taskId - } - if (message.isFavorited !== false) { - obj.isFavorited = message.isFavorited - } - return obj - }, - - create, I>>(base?: I): TaskFavoriteRequest { - return TaskFavoriteRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): TaskFavoriteRequest { - const message = createBaseTaskFavoriteRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.taskId = object.taskId ?? "" - message.isFavorited = object.isFavorited ?? false - return message - }, -} - -function createBaseTaskResponse(): TaskResponse { - return { - id: "", - task: "", - ts: 0, - isFavorited: false, - size: 0, - totalCost: 0, - tokensIn: 0, - tokensOut: 0, - cacheWrites: 0, - cacheReads: 0, - } -} - -export const TaskResponse: MessageFns = { - encode(message: TaskResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.id !== "") { - writer.uint32(10).string(message.id) - } - if (message.task !== "") { - writer.uint32(18).string(message.task) - } - if (message.ts !== 0) { - writer.uint32(24).int64(message.ts) - } - if (message.isFavorited !== false) { - writer.uint32(32).bool(message.isFavorited) - } - if (message.size !== 0) { - writer.uint32(40).int64(message.size) - } - if (message.totalCost !== 0) { - writer.uint32(49).double(message.totalCost) - } - if (message.tokensIn !== 0) { - writer.uint32(56).int32(message.tokensIn) - } - if (message.tokensOut !== 0) { - writer.uint32(64).int32(message.tokensOut) - } - if (message.cacheWrites !== 0) { - writer.uint32(72).int32(message.cacheWrites) - } - if (message.cacheReads !== 0) { - writer.uint32(80).int32(message.cacheReads) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): TaskResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseTaskResponse() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.id = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.task = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.ts = longToNumber(reader.int64()) - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.isFavorited = reader.bool() - continue - } - case 5: { - if (tag !== 40) { - break - } - - message.size = longToNumber(reader.int64()) - continue - } - case 6: { - if (tag !== 49) { - break - } - - message.totalCost = reader.double() - continue - } - case 7: { - if (tag !== 56) { - break - } - - message.tokensIn = reader.int32() - continue - } - case 8: { - if (tag !== 64) { - break - } - - message.tokensOut = reader.int32() - continue - } - case 9: { - if (tag !== 72) { - break - } - - message.cacheWrites = reader.int32() - continue - } - case 10: { - if (tag !== 80) { - break - } - - message.cacheReads = reader.int32() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): TaskResponse { - return { - id: isSet(object.id) ? globalThis.String(object.id) : "", - task: isSet(object.task) ? globalThis.String(object.task) : "", - ts: isSet(object.ts) ? globalThis.Number(object.ts) : 0, - isFavorited: isSet(object.isFavorited) ? globalThis.Boolean(object.isFavorited) : false, - size: isSet(object.size) ? globalThis.Number(object.size) : 0, - totalCost: isSet(object.totalCost) ? globalThis.Number(object.totalCost) : 0, - tokensIn: isSet(object.tokensIn) ? globalThis.Number(object.tokensIn) : 0, - tokensOut: isSet(object.tokensOut) ? globalThis.Number(object.tokensOut) : 0, - cacheWrites: isSet(object.cacheWrites) ? globalThis.Number(object.cacheWrites) : 0, - cacheReads: isSet(object.cacheReads) ? globalThis.Number(object.cacheReads) : 0, - } - }, - - toJSON(message: TaskResponse): unknown { - const obj: any = {} - if (message.id !== "") { - obj.id = message.id - } - if (message.task !== "") { - obj.task = message.task - } - if (message.ts !== 0) { - obj.ts = Math.round(message.ts) - } - if (message.isFavorited !== false) { - obj.isFavorited = message.isFavorited - } - if (message.size !== 0) { - obj.size = Math.round(message.size) - } - if (message.totalCost !== 0) { - obj.totalCost = message.totalCost - } - if (message.tokensIn !== 0) { - obj.tokensIn = Math.round(message.tokensIn) - } - if (message.tokensOut !== 0) { - obj.tokensOut = Math.round(message.tokensOut) - } - if (message.cacheWrites !== 0) { - obj.cacheWrites = Math.round(message.cacheWrites) - } - if (message.cacheReads !== 0) { - obj.cacheReads = Math.round(message.cacheReads) - } - return obj - }, - - create, I>>(base?: I): TaskResponse { - return TaskResponse.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): TaskResponse { - const message = createBaseTaskResponse() - message.id = object.id ?? "" - message.task = object.task ?? "" - message.ts = object.ts ?? 0 - message.isFavorited = object.isFavorited ?? false - message.size = object.size ?? 0 - message.totalCost = object.totalCost ?? 0 - message.tokensIn = object.tokensIn ?? 0 - message.tokensOut = object.tokensOut ?? 0 - message.cacheWrites = object.cacheWrites ?? 0 - message.cacheReads = object.cacheReads ?? 0 - return message - }, -} - -function createBaseDeleteNonFavoritedTasksResults(): DeleteNonFavoritedTasksResults { - return { tasksPreserved: 0, tasksDeleted: 0 } -} - -export const DeleteNonFavoritedTasksResults: MessageFns = { - encode(message: DeleteNonFavoritedTasksResults, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.tasksPreserved !== 0) { - writer.uint32(8).int32(message.tasksPreserved) - } - if (message.tasksDeleted !== 0) { - writer.uint32(16).int32(message.tasksDeleted) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): DeleteNonFavoritedTasksResults { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseDeleteNonFavoritedTasksResults() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.tasksPreserved = reader.int32() - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.tasksDeleted = reader.int32() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): DeleteNonFavoritedTasksResults { - return { - tasksPreserved: isSet(object.tasksPreserved) ? globalThis.Number(object.tasksPreserved) : 0, - tasksDeleted: isSet(object.tasksDeleted) ? globalThis.Number(object.tasksDeleted) : 0, - } - }, - - toJSON(message: DeleteNonFavoritedTasksResults): unknown { - const obj: any = {} - if (message.tasksPreserved !== 0) { - obj.tasksPreserved = Math.round(message.tasksPreserved) - } - if (message.tasksDeleted !== 0) { - obj.tasksDeleted = Math.round(message.tasksDeleted) - } - return obj - }, - - create, I>>(base?: I): DeleteNonFavoritedTasksResults { - return DeleteNonFavoritedTasksResults.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): DeleteNonFavoritedTasksResults { - const message = createBaseDeleteNonFavoritedTasksResults() - message.tasksPreserved = object.tasksPreserved ?? 0 - message.tasksDeleted = object.tasksDeleted ?? 0 - return message - }, -} - -function createBaseGetTaskHistoryRequest(): GetTaskHistoryRequest { - return { metadata: undefined, favoritesOnly: false, searchQuery: "", sortBy: "", currentWorkspaceOnly: false } -} - -export const GetTaskHistoryRequest: MessageFns = { - encode(message: GetTaskHistoryRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.favoritesOnly !== false) { - writer.uint32(16).bool(message.favoritesOnly) - } - if (message.searchQuery !== "") { - writer.uint32(26).string(message.searchQuery) - } - if (message.sortBy !== "") { - writer.uint32(34).string(message.sortBy) - } - if (message.currentWorkspaceOnly !== false) { - writer.uint32(40).bool(message.currentWorkspaceOnly) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): GetTaskHistoryRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseGetTaskHistoryRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.favoritesOnly = reader.bool() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.searchQuery = reader.string() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.sortBy = reader.string() - continue - } - case 5: { - if (tag !== 40) { - break - } - - message.currentWorkspaceOnly = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): GetTaskHistoryRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - favoritesOnly: isSet(object.favoritesOnly) ? globalThis.Boolean(object.favoritesOnly) : false, - searchQuery: isSet(object.searchQuery) ? globalThis.String(object.searchQuery) : "", - sortBy: isSet(object.sortBy) ? globalThis.String(object.sortBy) : "", - currentWorkspaceOnly: isSet(object.currentWorkspaceOnly) ? globalThis.Boolean(object.currentWorkspaceOnly) : false, - } - }, - - toJSON(message: GetTaskHistoryRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.favoritesOnly !== false) { - obj.favoritesOnly = message.favoritesOnly - } - if (message.searchQuery !== "") { - obj.searchQuery = message.searchQuery - } - if (message.sortBy !== "") { - obj.sortBy = message.sortBy - } - if (message.currentWorkspaceOnly !== false) { - obj.currentWorkspaceOnly = message.currentWorkspaceOnly - } - return obj - }, - - create, I>>(base?: I): GetTaskHistoryRequest { - return GetTaskHistoryRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): GetTaskHistoryRequest { - const message = createBaseGetTaskHistoryRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.favoritesOnly = object.favoritesOnly ?? false - message.searchQuery = object.searchQuery ?? "" - message.sortBy = object.sortBy ?? "" - message.currentWorkspaceOnly = object.currentWorkspaceOnly ?? false - return message - }, -} - -function createBaseTaskHistoryArray(): TaskHistoryArray { - return { tasks: [], totalCount: 0 } -} - -export const TaskHistoryArray: MessageFns = { - encode(message: TaskHistoryArray, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - for (const v of message.tasks) { - TaskItem.encode(v!, writer.uint32(10).fork()).join() - } - if (message.totalCount !== 0) { - writer.uint32(16).int32(message.totalCount) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): TaskHistoryArray { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseTaskHistoryArray() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.tasks.push(TaskItem.decode(reader, reader.uint32())) - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.totalCount = reader.int32() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): TaskHistoryArray { - return { - tasks: globalThis.Array.isArray(object?.tasks) ? object.tasks.map((e: any) => TaskItem.fromJSON(e)) : [], - totalCount: isSet(object.totalCount) ? globalThis.Number(object.totalCount) : 0, - } - }, - - toJSON(message: TaskHistoryArray): unknown { - const obj: any = {} - if (message.tasks?.length) { - obj.tasks = message.tasks.map((e) => TaskItem.toJSON(e)) - } - if (message.totalCount !== 0) { - obj.totalCount = Math.round(message.totalCount) - } - return obj - }, - - create, I>>(base?: I): TaskHistoryArray { - return TaskHistoryArray.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): TaskHistoryArray { - const message = createBaseTaskHistoryArray() - message.tasks = object.tasks?.map((e) => TaskItem.fromPartial(e)) || [] - message.totalCount = object.totalCount ?? 0 - return message - }, -} - -function createBaseTaskItem(): TaskItem { - return { - id: "", - task: "", - ts: 0, - isFavorited: false, - size: 0, - totalCost: 0, - tokensIn: 0, - tokensOut: 0, - cacheWrites: 0, - cacheReads: 0, - } -} - -export const TaskItem: MessageFns = { - encode(message: TaskItem, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.id !== "") { - writer.uint32(10).string(message.id) - } - if (message.task !== "") { - writer.uint32(18).string(message.task) - } - if (message.ts !== 0) { - writer.uint32(24).int64(message.ts) - } - if (message.isFavorited !== false) { - writer.uint32(32).bool(message.isFavorited) - } - if (message.size !== 0) { - writer.uint32(40).int64(message.size) - } - if (message.totalCost !== 0) { - writer.uint32(49).double(message.totalCost) - } - if (message.tokensIn !== 0) { - writer.uint32(56).int32(message.tokensIn) - } - if (message.tokensOut !== 0) { - writer.uint32(64).int32(message.tokensOut) - } - if (message.cacheWrites !== 0) { - writer.uint32(72).int32(message.cacheWrites) - } - if (message.cacheReads !== 0) { - writer.uint32(80).int32(message.cacheReads) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): TaskItem { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseTaskItem() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.id = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.task = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.ts = longToNumber(reader.int64()) - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.isFavorited = reader.bool() - continue - } - case 5: { - if (tag !== 40) { - break - } - - message.size = longToNumber(reader.int64()) - continue - } - case 6: { - if (tag !== 49) { - break - } - - message.totalCost = reader.double() - continue - } - case 7: { - if (tag !== 56) { - break - } - - message.tokensIn = reader.int32() - continue - } - case 8: { - if (tag !== 64) { - break - } - - message.tokensOut = reader.int32() - continue - } - case 9: { - if (tag !== 72) { - break - } - - message.cacheWrites = reader.int32() - continue - } - case 10: { - if (tag !== 80) { - break - } - - message.cacheReads = reader.int32() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): TaskItem { - return { - id: isSet(object.id) ? globalThis.String(object.id) : "", - task: isSet(object.task) ? globalThis.String(object.task) : "", - ts: isSet(object.ts) ? globalThis.Number(object.ts) : 0, - isFavorited: isSet(object.isFavorited) ? globalThis.Boolean(object.isFavorited) : false, - size: isSet(object.size) ? globalThis.Number(object.size) : 0, - totalCost: isSet(object.totalCost) ? globalThis.Number(object.totalCost) : 0, - tokensIn: isSet(object.tokensIn) ? globalThis.Number(object.tokensIn) : 0, - tokensOut: isSet(object.tokensOut) ? globalThis.Number(object.tokensOut) : 0, - cacheWrites: isSet(object.cacheWrites) ? globalThis.Number(object.cacheWrites) : 0, - cacheReads: isSet(object.cacheReads) ? globalThis.Number(object.cacheReads) : 0, - } - }, - - toJSON(message: TaskItem): unknown { - const obj: any = {} - if (message.id !== "") { - obj.id = message.id - } - if (message.task !== "") { - obj.task = message.task - } - if (message.ts !== 0) { - obj.ts = Math.round(message.ts) - } - if (message.isFavorited !== false) { - obj.isFavorited = message.isFavorited - } - if (message.size !== 0) { - obj.size = Math.round(message.size) - } - if (message.totalCost !== 0) { - obj.totalCost = message.totalCost - } - if (message.tokensIn !== 0) { - obj.tokensIn = Math.round(message.tokensIn) - } - if (message.tokensOut !== 0) { - obj.tokensOut = Math.round(message.tokensOut) - } - if (message.cacheWrites !== 0) { - obj.cacheWrites = Math.round(message.cacheWrites) - } - if (message.cacheReads !== 0) { - obj.cacheReads = Math.round(message.cacheReads) - } - return obj - }, - - create, I>>(base?: I): TaskItem { - return TaskItem.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): TaskItem { - const message = createBaseTaskItem() - message.id = object.id ?? "" - message.task = object.task ?? "" - message.ts = object.ts ?? 0 - message.isFavorited = object.isFavorited ?? false - message.size = object.size ?? 0 - message.totalCost = object.totalCost ?? 0 - message.tokensIn = object.tokensIn ?? 0 - message.tokensOut = object.tokensOut ?? 0 - message.cacheWrites = object.cacheWrites ?? 0 - message.cacheReads = object.cacheReads ?? 0 - return message - }, -} - -function createBaseAskResponseRequest(): AskResponseRequest { - return { metadata: undefined, responseType: "", text: "", images: [] } -} - -export const AskResponseRequest: MessageFns = { - encode(message: AskResponseRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.responseType !== "") { - writer.uint32(18).string(message.responseType) - } - if (message.text !== "") { - writer.uint32(26).string(message.text) - } - for (const v of message.images) { - writer.uint32(34).string(v!) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): AskResponseRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseAskResponseRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.responseType = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.text = reader.string() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.images.push(reader.string()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): AskResponseRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - responseType: isSet(object.responseType) ? globalThis.String(object.responseType) : "", - text: isSet(object.text) ? globalThis.String(object.text) : "", - images: globalThis.Array.isArray(object?.images) ? object.images.map((e: any) => globalThis.String(e)) : [], - } - }, - - toJSON(message: AskResponseRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.responseType !== "") { - obj.responseType = message.responseType - } - if (message.text !== "") { - obj.text = message.text - } - if (message.images?.length) { - obj.images = message.images - } - return obj - }, - - create, I>>(base?: I): AskResponseRequest { - return AskResponseRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): AskResponseRequest { - const message = createBaseAskResponseRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.responseType = object.responseType ?? "" - message.text = object.text ?? "" - message.images = object.images?.map((e) => e) || [] - return message - }, -} - -export type TaskServiceDefinition = typeof TaskServiceDefinition -export const TaskServiceDefinition = { - name: "TaskService", - fullName: "cline.TaskService", - methods: { - /** Cancels the currently running task */ - cancelTask: { - name: "cancelTask", - requestType: EmptyRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Clears the current task */ - clearTask: { - name: "clearTask", - requestType: EmptyRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Deletes multiple tasks with the given IDs */ - deleteTasksWithIds: { - name: "deleteTasksWithIds", - requestType: StringArrayRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Creates a new task with the given text and optional images */ - newTask: { - name: "newTask", - requestType: NewTaskRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Shows a task with the specified ID */ - showTaskWithId: { - name: "showTaskWithId", - requestType: StringRequest, - requestStream: false, - responseType: TaskResponse, - responseStream: false, - options: {}, - }, - /** Exports a task with the given ID to markdown */ - exportTaskWithId: { - name: "exportTaskWithId", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Toggles the favorite status of a task */ - toggleTaskFavorite: { - name: "toggleTaskFavorite", - requestType: TaskFavoriteRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Deletes all non-favorited tasks */ - deleteNonFavoritedTasks: { - name: "deleteNonFavoritedTasks", - requestType: EmptyRequest, - requestStream: false, - responseType: DeleteNonFavoritedTasksResults, - responseStream: false, - options: {}, - }, - /** Gets filtered task history */ - getTaskHistory: { - name: "getTaskHistory", - requestType: GetTaskHistoryRequest, - requestStream: false, - responseType: TaskHistoryArray, - responseStream: false, - options: {}, - }, - /** Sends a response to a previous ask operation */ - askResponse: { - name: "askResponse", - requestType: AskResponseRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Records task feedback (thumbs up/down) */ - taskFeedback: { - name: "taskFeedback", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Shows task completion changes diff in a view */ - taskCompletionViewChanges: { - name: "taskCompletionViewChanges", - requestType: Int64Request, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - }, -} as const - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined - -export type DeepPartial = T extends Builtin - ? T - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial - -type KeysOfUnion = T extends T ? keyof T : never -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } - -function longToNumber(int64: { toString(): string }): number { - const num = globalThis.Number(int64.toString()) - if (num > globalThis.Number.MAX_SAFE_INTEGER) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER") - } - if (num < globalThis.Number.MIN_SAFE_INTEGER) { - throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER") - } - return num -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter - decode(input: BinaryReader | Uint8Array, length?: number): T - fromJSON(object: any): T - toJSON(message: T): unknown - create, I>>(base?: I): T - fromPartial, I>>(object: I): T -} diff --git a/src/shared/proto/web.ts b/src/shared/proto/web.ts deleted file mode 100644 index 44478ab7..00000000 --- a/src/shared/proto/web.ts +++ /dev/null @@ -1,295 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: web.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { StringRequest } from "./common" - -export const protobufPackage = "cline" - -export interface IsImageUrl { - isImage: boolean - url: string -} - -export interface OpenGraphData { - title: string - description: string - image: string - url: string - siteName: string - type: string -} - -function createBaseIsImageUrl(): IsImageUrl { - return { isImage: false, url: "" } -} - -export const IsImageUrl: MessageFns = { - encode(message: IsImageUrl, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.isImage !== false) { - writer.uint32(8).bool(message.isImage) - } - if (message.url !== "") { - writer.uint32(18).string(message.url) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): IsImageUrl { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseIsImageUrl() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.isImage = reader.bool() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.url = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): IsImageUrl { - return { - isImage: isSet(object.isImage) ? globalThis.Boolean(object.isImage) : false, - url: isSet(object.url) ? globalThis.String(object.url) : "", - } - }, - - toJSON(message: IsImageUrl): unknown { - const obj: any = {} - if (message.isImage !== false) { - obj.isImage = message.isImage - } - if (message.url !== "") { - obj.url = message.url - } - return obj - }, - - create, I>>(base?: I): IsImageUrl { - return IsImageUrl.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): IsImageUrl { - const message = createBaseIsImageUrl() - message.isImage = object.isImage ?? false - message.url = object.url ?? "" - return message - }, -} - -function createBaseOpenGraphData(): OpenGraphData { - return { title: "", description: "", image: "", url: "", siteName: "", type: "" } -} - -export const OpenGraphData: MessageFns = { - encode(message: OpenGraphData, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title) - } - if (message.description !== "") { - writer.uint32(18).string(message.description) - } - if (message.image !== "") { - writer.uint32(26).string(message.image) - } - if (message.url !== "") { - writer.uint32(34).string(message.url) - } - if (message.siteName !== "") { - writer.uint32(42).string(message.siteName) - } - if (message.type !== "") { - writer.uint32(50).string(message.type) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): OpenGraphData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseOpenGraphData() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.title = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.description = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.image = reader.string() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.url = reader.string() - continue - } - case 5: { - if (tag !== 42) { - break - } - - message.siteName = reader.string() - continue - } - case 6: { - if (tag !== 50) { - break - } - - message.type = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): OpenGraphData { - return { - title: isSet(object.title) ? globalThis.String(object.title) : "", - description: isSet(object.description) ? globalThis.String(object.description) : "", - image: isSet(object.image) ? globalThis.String(object.image) : "", - url: isSet(object.url) ? globalThis.String(object.url) : "", - siteName: isSet(object.siteName) ? globalThis.String(object.siteName) : "", - type: isSet(object.type) ? globalThis.String(object.type) : "", - } - }, - - toJSON(message: OpenGraphData): unknown { - const obj: any = {} - if (message.title !== "") { - obj.title = message.title - } - if (message.description !== "") { - obj.description = message.description - } - if (message.image !== "") { - obj.image = message.image - } - if (message.url !== "") { - obj.url = message.url - } - if (message.siteName !== "") { - obj.siteName = message.siteName - } - if (message.type !== "") { - obj.type = message.type - } - return obj - }, - - create, I>>(base?: I): OpenGraphData { - return OpenGraphData.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): OpenGraphData { - const message = createBaseOpenGraphData() - message.title = object.title ?? "" - message.description = object.description ?? "" - message.image = object.image ?? "" - message.url = object.url ?? "" - message.siteName = object.siteName ?? "" - message.type = object.type ?? "" - return message - }, -} - -export type WebServiceDefinition = typeof WebServiceDefinition -export const WebServiceDefinition = { - name: "WebService", - fullName: "cline.WebService", - methods: { - checkIsImageUrl: { - name: "checkIsImageUrl", - requestType: StringRequest, - requestStream: false, - responseType: IsImageUrl, - responseStream: false, - options: {}, - }, - fetchOpenGraphData: { - name: "fetchOpenGraphData", - requestType: StringRequest, - requestStream: false, - responseType: OpenGraphData, - responseStream: false, - options: {}, - }, - }, -} as const - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined - -export type DeepPartial = T extends Builtin - ? T - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial - -type KeysOfUnion = T extends T ? keyof T : never -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } - -function isSet(value: any): boolean { - return value !== null && value !== undefined -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter - decode(input: BinaryReader | Uint8Array, length?: number): T - fromJSON(object: any): T - toJSON(message: T): unknown - create, I>>(base?: I): T - fromPartial, I>>(object: I): T -} diff --git a/src/standalone/server-setup.ts b/src/standalone/server-setup.ts deleted file mode 100644 index 960eb0a4..00000000 --- a/src/standalone/server-setup.ts +++ /dev/null @@ -1,201 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! -// Generated by generate-server-setup.mjs -import * as grpc from "@grpc/grpc-js" -import { Controller } from "../core/controller" -import { GrpcHandlerWrapper, GrpcStreamingResponseHandlerWrapper } from "./grpc-types" - -// Account Service -import { accountLoginClicked } from "../core/controller/account/accountLoginClicked" -import { accountLogoutClicked } from "../core/controller/account/accountLogoutClicked" - -// Browser Service -import { getBrowserConnectionInfo } from "../core/controller/browser/getBrowserConnectionInfo" -import { testBrowserConnection } from "../core/controller/browser/testBrowserConnection" -import { discoverBrowser } from "../core/controller/browser/discoverBrowser" -import { getDetectedChromePath } from "../core/controller/browser/getDetectedChromePath" -import { updateBrowserSettings } from "../core/controller/browser/updateBrowserSettings" -import { relaunchChromeDebugMode } from "../core/controller/browser/relaunchChromeDebugMode" - -// Checkpoints Service -import { checkpointDiff } from "../core/controller/checkpoints/checkpointDiff" -import { checkpointRestore } from "../core/controller/checkpoints/checkpointRestore" - -// File Service -import { copyToClipboard } from "../core/controller/file/copyToClipboard" -import { openFile } from "../core/controller/file/openFile" -import { openImage } from "../core/controller/file/openImage" -import { openMention } from "../core/controller/file/openMention" -import { deleteRuleFile } from "../core/controller/file/deleteRuleFile" -import { createRuleFile } from "../core/controller/file/createRuleFile" -import { searchCommits } from "../core/controller/file/searchCommits" -import { selectImages } from "../core/controller/file/selectImages" -import { getRelativePaths } from "../core/controller/file/getRelativePaths" -import { searchFiles } from "../core/controller/file/searchFiles" -import { toggleClineRule } from "../core/controller/file/toggleClineRule" -import { toggleCursorRule } from "../core/controller/file/toggleCursorRule" -import { toggleWindsurfRule } from "../core/controller/file/toggleWindsurfRule" -import { refreshRules } from "../core/controller/file/refreshRules" - -// Mcp Service -import { toggleMcpServer } from "../core/controller/mcp/toggleMcpServer" -import { updateMcpTimeout } from "../core/controller/mcp/updateMcpTimeout" -import { addRemoteMcpServer } from "../core/controller/mcp/addRemoteMcpServer" -import { downloadMcp } from "../core/controller/mcp/downloadMcp" -import { restartMcpServer } from "../core/controller/mcp/restartMcpServer" -import { deleteMcpServer } from "../core/controller/mcp/deleteMcpServer" -import { toggleToolAutoApprove } from "../core/controller/mcp/toggleToolAutoApprove" -import { refreshMcpMarketplace } from "../core/controller/mcp/refreshMcpMarketplace" - -// Models Service -import { getOllamaModels } from "../core/controller/models/getOllamaModels" -import { getLmStudioModels } from "../core/controller/models/getLmStudioModels" -import { getVsCodeLmModels } from "../core/controller/models/getVsCodeLmModels" -import { refreshOpenRouterModels } from "../core/controller/models/refreshOpenRouterModels" -import { refreshOpenAiModels } from "../core/controller/models/refreshOpenAiModels" -import { refreshRequestyModels } from "../core/controller/models/refreshRequestyModels" - -// Slash Service -import { reportBug } from "../core/controller/slash/reportBug" -import { condense } from "../core/controller/slash/condense" - -// State Service -import { getLatestState } from "../core/controller/state/getLatestState" -import { subscribeToState } from "../core/controller/state/subscribeToState" -import { toggleFavoriteModel } from "../core/controller/state/toggleFavoriteModel" -import { resetState } from "../core/controller/state/resetState" -import { togglePlanActMode } from "../core/controller/state/togglePlanActMode" -import { updateTerminalConnectionTimeout } from "../core/controller/state/updateTerminalConnectionTimeout" - -// Task Service -import { cancelTask } from "../core/controller/task/cancelTask" -import { clearTask } from "../core/controller/task/clearTask" -import { deleteTasksWithIds } from "../core/controller/task/deleteTasksWithIds" -import { newTask } from "../core/controller/task/newTask" -import { showTaskWithId } from "../core/controller/task/showTaskWithId" -import { exportTaskWithId } from "../core/controller/task/exportTaskWithId" -import { toggleTaskFavorite } from "../core/controller/task/toggleTaskFavorite" -import { deleteNonFavoritedTasks } from "../core/controller/task/deleteNonFavoritedTasks" -import { getTaskHistory } from "../core/controller/task/getTaskHistory" -import { askResponse } from "../core/controller/task/askResponse" -import { taskFeedback } from "../core/controller/task/taskFeedback" -import { taskCompletionViewChanges } from "../core/controller/task/taskCompletionViewChanges" - -// Ui Service -import { scrollToSettings } from "../core/controller/ui/scrollToSettings" - -// Web Service -import { checkIsImageUrl } from "../core/controller/web/checkIsImageUrl" -import { fetchOpenGraphData } from "../core/controller/web/fetchOpenGraphData" - -export function addServices( - server: grpc.Server, - proto: any, - controller: Controller, - wrapper: GrpcHandlerWrapper, - wrapStreamingResponse: GrpcStreamingResponseHandlerWrapper, -): void { - // Account Service - server.addService(proto.cline.AccountService.service, { - accountLoginClicked: wrapper(accountLoginClicked, controller), - accountLogoutClicked: wrapper(accountLogoutClicked, controller), - }) - - // Browser Service - server.addService(proto.cline.BrowserService.service, { - getBrowserConnectionInfo: wrapper(getBrowserConnectionInfo, controller), - testBrowserConnection: wrapper(testBrowserConnection, controller), - discoverBrowser: wrapper(discoverBrowser, controller), - getDetectedChromePath: wrapper(getDetectedChromePath, controller), - updateBrowserSettings: wrapper(updateBrowserSettings, controller), - relaunchChromeDebugMode: wrapper(relaunchChromeDebugMode, controller), - }) - - // Checkpoints Service - server.addService(proto.cline.CheckpointsService.service, { - checkpointDiff: wrapper(checkpointDiff, controller), - checkpointRestore: wrapper(checkpointRestore, controller), - }) - - // File Service - server.addService(proto.cline.FileService.service, { - copyToClipboard: wrapper(copyToClipboard, controller), - openFile: wrapper(openFile, controller), - openImage: wrapper(openImage, controller), - openMention: wrapper(openMention, controller), - deleteRuleFile: wrapper(deleteRuleFile, controller), - createRuleFile: wrapper(createRuleFile, controller), - searchCommits: wrapper(searchCommits, controller), - selectImages: wrapper(selectImages, controller), - getRelativePaths: wrapper(getRelativePaths, controller), - searchFiles: wrapper(searchFiles, controller), - toggleClineRule: wrapper(toggleClineRule, controller), - toggleCursorRule: wrapper(toggleCursorRule, controller), - toggleWindsurfRule: wrapper(toggleWindsurfRule, controller), - refreshRules: wrapper(refreshRules, controller), - }) - - // Mcp Service - server.addService(proto.cline.McpService.service, { - toggleMcpServer: wrapper(toggleMcpServer, controller), - updateMcpTimeout: wrapper(updateMcpTimeout, controller), - addRemoteMcpServer: wrapper(addRemoteMcpServer, controller), - downloadMcp: wrapper(downloadMcp, controller), - restartMcpServer: wrapper(restartMcpServer, controller), - deleteMcpServer: wrapper(deleteMcpServer, controller), - toggleToolAutoApprove: wrapper(toggleToolAutoApprove, controller), - refreshMcpMarketplace: wrapper(refreshMcpMarketplace, controller), - }) - - // Models Service - server.addService(proto.cline.ModelsService.service, { - getOllamaModels: wrapper(getOllamaModels, controller), - getLmStudioModels: wrapper(getLmStudioModels, controller), - getVsCodeLmModels: wrapper(getVsCodeLmModels, controller), - refreshOpenRouterModels: wrapper(refreshOpenRouterModels, controller), - refreshOpenAiModels: wrapper(refreshOpenAiModels, controller), - refreshRequestyModels: wrapper(refreshRequestyModels, controller), - }) - - // Slash Service - server.addService(proto.cline.SlashService.service, { - reportBug: wrapper(reportBug, controller), - condense: wrapper(condense, controller), - }) - - // State Service - server.addService(proto.cline.StateService.service, { - getLatestState: wrapper(getLatestState, controller), - subscribeToState: wrapStreamingResponse(subscribeToState, controller), - toggleFavoriteModel: wrapper(toggleFavoriteModel, controller), - resetState: wrapper(resetState, controller), - togglePlanActMode: wrapper(togglePlanActMode, controller), - updateTerminalConnectionTimeout: wrapper(updateTerminalConnectionTimeout, controller), - }) - - // Task Service - server.addService(proto.cline.TaskService.service, { - cancelTask: wrapper(cancelTask, controller), - clearTask: wrapper(clearTask, controller), - deleteTasksWithIds: wrapper(deleteTasksWithIds, controller), - newTask: wrapper(newTask, controller), - showTaskWithId: wrapper(showTaskWithId, controller), - exportTaskWithId: wrapper(exportTaskWithId, controller), - toggleTaskFavorite: wrapper(toggleTaskFavorite, controller), - deleteNonFavoritedTasks: wrapper(deleteNonFavoritedTasks, controller), - getTaskHistory: wrapper(getTaskHistory, controller), - askResponse: wrapper(askResponse, controller), - taskFeedback: wrapper(taskFeedback, controller), - taskCompletionViewChanges: wrapper(taskCompletionViewChanges, controller), - }) - - // Ui Service - server.addService(proto.cline.UiService.service, { - scrollToSettings: wrapper(scrollToSettings, controller), - }) - - // Web Service - server.addService(proto.cline.WebService.service, { - checkIsImageUrl: wrapper(checkIsImageUrl, controller), - fetchOpenGraphData: wrapper(fetchOpenGraphData, controller), - }) -} diff --git a/webview-ui/src/services/grpc-client.ts b/webview-ui/src/services/grpc-client.ts deleted file mode 100644 index 6a73f76a..00000000 --- a/webview-ui/src/services/grpc-client.ts +++ /dev/null @@ -1,41 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createGrpcClient } from "./grpc-client-base" -import { AccountServiceDefinition } from "@shared/proto/account" -import { BrowserServiceDefinition } from "@shared/proto/browser" -import { CheckpointsServiceDefinition } from "@shared/proto/checkpoints" -import { FileServiceDefinition } from "@shared/proto/file" -import { McpServiceDefinition } from "@shared/proto/mcp" -import { StateServiceDefinition } from "@shared/proto/state" -import { TaskServiceDefinition } from "@shared/proto/task" -import { WebServiceDefinition } from "@shared/proto/web" -import { ModelsServiceDefinition } from "@shared/proto/models" -import { SlashServiceDefinition } from "@shared/proto/slash" -import { UiServiceDefinition } from "@shared/proto/ui" - -const AccountServiceClient = createGrpcClient(AccountServiceDefinition) -const BrowserServiceClient = createGrpcClient(BrowserServiceDefinition) -const CheckpointsServiceClient = createGrpcClient(CheckpointsServiceDefinition) -const FileServiceClient = createGrpcClient(FileServiceDefinition) -const McpServiceClient = createGrpcClient(McpServiceDefinition) -const StateServiceClient = createGrpcClient(StateServiceDefinition) -const TaskServiceClient = createGrpcClient(TaskServiceDefinition) -const WebServiceClient = createGrpcClient(WebServiceDefinition) -const ModelsServiceClient = createGrpcClient(ModelsServiceDefinition) -const SlashServiceClient = createGrpcClient(SlashServiceDefinition) -const UiServiceClient = createGrpcClient(UiServiceDefinition) - -export { - AccountServiceClient, - BrowserServiceClient, - CheckpointsServiceClient, - FileServiceClient, - McpServiceClient, - StateServiceClient, - TaskServiceClient, - WebServiceClient, - ModelsServiceClient, - SlashServiceClient, - UiServiceClient, -} From b97e57fd4ec2eb28bb78531c7ceb364582f4129a Mon Sep 17 00:00:00 2001 From: Akim Tsvigun <36672861+Aktsvigun@users.noreply.github.com> Date: Thu, 22 May 2025 00:40:44 +0100 Subject: [PATCH 38/85] Integration with Nebius AI Studio (#2789) * Integration with Nebius AI Studio added * changeset added * tests fixed * Nebius naming changed * bugs fixed * styling fixed * minor bug fixed * Remove obsolete ClineProvider.ts file that was causing build errors * redundant 'Model' section removed for Nebius * feat: add Nebius AI Studio to the list of inference providers (#2789) - replace `nebiusModelId` to `apiModelId` - add our latest models - fix `getModel` method - fix spaces and the link to Nebius AI Studio api keys - delete extra code - add a couple of tests --------- Co-authored-by: Akim Tsvigun Co-authored-by: Albert Abdulmanov --- .changeset/poor-fireants-move.md | 5 ++ src/api/index.ts | 3 + src/api/providers/nebius.ts | 69 ++++++++++++++ src/core/storage/state-keys.ts | 1 + src/core/storage/state.ts | 6 ++ src/shared/api.ts | 89 +++++++++++++++++++ .../src/components/chat/ChatTextArea.tsx | 1 + .../src/components/settings/ApiOptions.tsx | 56 ++++++++++++ .../settings/__tests__/APIOptions.spec.tsx | 36 ++++++++ .../src/context/ExtensionStateContext.tsx | 1 + webview-ui/src/utils/validate.ts | 5 ++ 11 files changed, 272 insertions(+) create mode 100644 .changeset/poor-fireants-move.md create mode 100644 src/api/providers/nebius.ts diff --git a/.changeset/poor-fireants-move.md b/.changeset/poor-fireants-move.md new file mode 100644 index 00000000..442d7e7a --- /dev/null +++ b/.changeset/poor-fireants-move.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +integration with nebius ai studio diff --git a/src/api/index.ts b/src/api/index.ts index fbda6020..5b4ae31c 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -13,6 +13,7 @@ import { ApiStream, ApiStreamUsageChunk } from "./transform/stream" import { DeepSeekHandler } from "./providers/deepseek" import { RequestyHandler } from "./providers/requesty" import { TogetherHandler } from "./providers/together" +import { NebiusHandler } from "./providers/nebius" import { QwenHandler } from "./providers/qwen" import { MistralHandler } from "./providers/mistral" import { DoubaoHandler } from "./providers/doubao" @@ -75,6 +76,8 @@ export function buildApiHandler(configuration: ApiConfiguration): ApiHandler { return new ClineHandler(options) case "litellm": return new LiteLlmHandler(options) + case "nebius": + return new NebiusHandler(options) case "asksage": return new AskSageHandler(options) case "xai": diff --git a/src/api/providers/nebius.ts b/src/api/providers/nebius.ts new file mode 100644 index 00000000..ad3b694f --- /dev/null +++ b/src/api/providers/nebius.ts @@ -0,0 +1,69 @@ +import { Anthropic } from "@anthropic-ai/sdk" +import OpenAI from "openai" +import { withRetry } from "../retry" +import { ApiHandler } from "../index" +import { convertToOpenAiMessages } from "../transform/openai-format" +import { ApiStream } from "../transform/stream" +import { convertToR1Format } from "../transform/r1-format" +import { nebiusDefaultModelId, nebiusModels, type ModelInfo, type ApiHandlerOptions, type NebiusModelId } from "../../shared/api" + +export class NebiusHandler implements ApiHandler { + private client: OpenAI + + constructor(private readonly options: ApiHandlerOptions) { + this.client = new OpenAI({ + baseURL: "https://api.studio.nebius.ai/v1", + apiKey: this.options.nebiusApiKey, + }) + } + + @withRetry() + async *createMessage(systemPrompt: string, messages: Anthropic.Messages.MessageParam[]): ApiStream { + const model = this.getModel() + + const openAiMessages: OpenAI.Chat.ChatCompletionMessageParam[] = model.id.includes("DeepSeek-R1") + ? convertToR1Format([{ role: "user", content: systemPrompt }, ...messages]) + : [{ role: "system", content: systemPrompt }, ...convertToOpenAiMessages(messages)] + + const stream = await this.client.chat.completions.create({ + model: model.id, + messages: openAiMessages, + temperature: 0, + stream: true, + stream_options: { include_usage: true }, + }) + for await (const chunk of stream) { + const delta = chunk.choices[0]?.delta + if (delta?.content) { + yield { + type: "text", + text: delta.content, + } + } + + if (delta && "reasoning_content" in delta && delta.reasoning_content) { + yield { + type: "reasoning", + reasoning: (delta.reasoning_content as string | undefined) || "", + } + } + + if (chunk.usage) { + yield { + type: "usage", + inputTokens: chunk.usage.prompt_tokens || 0, + outputTokens: chunk.usage.completion_tokens || 0, + } + } + } + } + + getModel(): { id: string; info: ModelInfo } { + const modelId = this.options.apiModelId + + if (modelId !== undefined && modelId in nebiusModels) { + return { id: modelId, info: nebiusModels[modelId as NebiusModelId] } + } + return { id: nebiusDefaultModelId, info: nebiusModels[nebiusDefaultModelId] } + } +} diff --git a/src/core/storage/state-keys.ts b/src/core/storage/state-keys.ts index 1fb89ceb..3c73219f 100644 --- a/src/core/storage/state-keys.ts +++ b/src/core/storage/state-keys.ts @@ -19,6 +19,7 @@ export type SecretKey = | "authNonce" | "asksageApiKey" | "xaiApiKey" + | "nebiusApiKey" | "sambanovaApiKey" export type GlobalStateKey = diff --git a/src/core/storage/state.ts b/src/core/storage/state.ts index 0f6d366e..795f1799 100644 --- a/src/core/storage/state.ts +++ b/src/core/storage/state.ts @@ -155,6 +155,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { thinkingBudgetTokens, reasoningEffort, sambanovaApiKey, + nebiusApiKey, planActSeparateModelsSettingRaw, favoritedModelIds, globalClineRulesToggles, @@ -242,6 +243,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { getGlobalState(context, "thinkingBudgetTokens") as Promise, getGlobalState(context, "reasoningEffort") as Promise, getSecret(context, "sambanovaApiKey") as Promise, + getSecret(context, "nebiusApiKey") as Promise, getGlobalState(context, "planActSeparateModelsSetting") as Promise, getGlobalState(context, "favoritedModelIds") as Promise, getGlobalState(context, "globalClineRulesToggles") as Promise, @@ -353,6 +355,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { asksageApiUrl, xaiApiKey, sambanovaApiKey, + nebiusApiKey, favoritedModelIds, requestTimeoutMs, }, @@ -445,6 +448,7 @@ export async function updateApiConfiguration(context: vscode.ExtensionContext, a reasoningEffort, clineApiKey, sambanovaApiKey, + nebiusApiKey, favoritedModelIds, } = apiConfiguration await updateGlobalState(context, "apiProvider", apiProvider) @@ -505,6 +509,7 @@ export async function updateApiConfiguration(context: vscode.ExtensionContext, a await updateGlobalState(context, "reasoningEffort", reasoningEffort) await storeSecret(context, "clineApiKey", clineApiKey) await storeSecret(context, "sambanovaApiKey", sambanovaApiKey) + await storeSecret(context, "nebiusApiKey", nebiusApiKey) await updateGlobalState(context, "favoritedModelIds", favoritedModelIds) await updateGlobalState(context, "requestTimeoutMs", apiConfiguration.requestTimeoutMs) } @@ -534,6 +539,7 @@ export async function resetExtensionState(context: vscode.ExtensionContext) { "asksageApiKey", "xaiApiKey", "sambanovaApiKey", + "nebiusApiKey", ] for (const key of secretKeys) { await storeSecret(context, key, undefined) diff --git a/src/shared/api.ts b/src/shared/api.ts index 74efb013..0e41610f 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -19,6 +19,7 @@ export type ApiProvider = | "vscode-lm" | "cline" | "litellm" + | "nebius" | "fireworks" | "asksage" | "xai" @@ -81,6 +82,7 @@ export interface ApiHandlerOptions { azureApiVersion?: string vsCodeLmModelSelector?: LanguageModelChatSelector qwenApiLine?: string + nebiusApiKey?: string asksageApiUrl?: string asksageApiKey?: string xaiApiKey?: string @@ -1560,6 +1562,93 @@ export const askSageModels = { }, } +// Nebius AI Studio +// https://docs.nebius.com/studio/inference/models +export const nebiusModels = { + "deepseek-ai/DeepSeek-V3": { + maxTokens: 32_000, + contextWindow: 96_000, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0.5, + outputPrice: 1.5, + }, + "deepseek-ai/DeepSeek-V3-0324-fast": { + maxTokens: 128_000, + contextWindow: 128_000, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 2, + outputPrice: 6, + }, + "deepseek-ai/DeepSeek-R1": { + maxTokens: 32_000, + contextWindow: 96_000, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0.8, + outputPrice: 2.4, + }, + "deepseek-ai/DeepSeek-R1-fast": { + maxTokens: 32_000, + contextWindow: 96_000, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 2, + outputPrice: 6, + }, + "meta-llama/Llama-3.3-70B-Instruct-fast": { + maxTokens: 32_000, + contextWindow: 96_000, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0.25, + outputPrice: 0.75, + }, + "Qwen/Qwen2.5-32B-Instruct-fast": { + maxTokens: 8_192, + contextWindow: 32_768, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0.13, + outputPrice: 0.4, + }, + "Qwen/Qwen2.5-Coder-32B-Instruct-fast": { + maxTokens: 128_000, + contextWindow: 128_000, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0.1, + outputPrice: 0.3, + }, + "Qwen/Qwen3-4B-fast": { + maxTokens: 32_000, + contextWindow: 41_000, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0.08, + outputPrice: 0.24, + }, + "Qwen/Qwen3-30B-A3B-fast": { + maxTokens: 32_000, + contextWindow: 41_000, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0.3, + outputPrice: 0.9, + }, + "Qwen/Qwen3-235B-A22B": { + maxTokens: 32_000, + contextWindow: 41_000, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0.2, + outputPrice: 0.6, + }, +} as const satisfies Record +export type NebiusModelId = keyof typeof nebiusModels +export const nebiusDefaultModelId = "Qwen/Qwen2.5-32B-Instruct-fast" satisfies NebiusModelId + // X AI // https://docs.x.ai/docs/api-reference export type XAIModelId = keyof typeof xaiModels diff --git a/webview-ui/src/components/chat/ChatTextArea.tsx b/webview-ui/src/components/chat/ChatTextArea.tsx index d3552c45..2410c37f 100644 --- a/webview-ui/src/components/chat/ChatTextArea.tsx +++ b/webview-ui/src/components/chat/ChatTextArea.tsx @@ -1071,6 +1071,7 @@ const ChatTextArea = forwardRef( case "litellm": return `${selectedProvider}:${apiConfiguration.liteLlmModelId}` case "requesty": + return `${selectedProvider}:${apiConfiguration.requestyModelId}` case "anthropic": case "openrouter": default: diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx index cc35f51f..9bbea830 100644 --- a/webview-ui/src/components/settings/ApiOptions.tsx +++ b/webview-ui/src/components/settings/ApiOptions.tsx @@ -47,6 +47,8 @@ import { askSageDefaultURL, xaiDefaultModelId, xaiModels, + nebiusModels, + nebiusDefaultModelId, sambanovaModels, sambanovaDefaultModelId, doubaoModels, @@ -324,6 +326,7 @@ const ApiOptions = ({ LM Studio Ollama LiteLLM + Nebius AI Studio AskSage xAI SambaNova @@ -1884,6 +1887,52 @@ const ApiOptions = ({
)} + {selectedProvider === "nebius" && ( +
+ + Nebius API Key + +

+ This key is stored locally and only used to make API requests from this extension.{" "} + {!apiConfiguration?.nebiusApiKey && ( + + You can get a Nebius API key by signing up here.{" "} + + )} + + (Note: Cline uses complex prompts and works best with Claude + models. Less capable models may not work as expected.) + +

+
+ )} + + {apiErrorMessage && ( +

+ {apiErrorMessage} +

+ )} + {selectedProvider === "xai" && (
+ + (Note: Cline uses complex prompts and works best with Claude + models. Less capable models may not work as expected.) + This key is stored locally and only used to make API requests from this extension. {!apiConfiguration?.xaiApiKey && ( @@ -2072,6 +2125,7 @@ const ApiOptions = ({ {selectedProvider === "asksage" && createDropdown(askSageModels)} {selectedProvider === "xai" && createDropdown(xaiModels)} {selectedProvider === "sambanova" && createDropdown(sambanovaModels)} + {selectedProvider === "nebius" && createDropdown(nebiusModels)} {((selectedProvider === "anthropic" && selectedModelId === "claude-3-7-sonnet-20250219") || @@ -2488,6 +2542,8 @@ export function normalizeApiConfiguration(apiConfiguration?: ApiConfiguration): } case "xai": return getProviderData(xaiModels, xaiDefaultModelId) + case "nebius": + return getProviderData(nebiusModels, nebiusDefaultModelId) case "sambanova": return getProviderData(sambanovaModels, sambanovaDefaultModelId) default: diff --git a/webview-ui/src/components/settings/__tests__/APIOptions.spec.tsx b/webview-ui/src/components/settings/__tests__/APIOptions.spec.tsx index aeae5ca8..82749332 100644 --- a/webview-ui/src/components/settings/__tests__/APIOptions.spec.tsx +++ b/webview-ui/src/components/settings/__tests__/APIOptions.spec.tsx @@ -200,3 +200,39 @@ describe("OpenApiInfoOptions", () => { expect(modelInput).toBeInTheDocument() }) }) + +describe("ApiOptions Component", () => { + vi.clearAllMocks() + const mockPostMessage = vi.fn() + + beforeEach(() => { + //@ts-expect-error - vscode is not defined in the global namespace in test environment + global.vscode = { postMessage: mockPostMessage } + + mockExtensionState({ + apiProvider: "nebius", + nebiusApiKey: "", + }) + }) + + it("renders Nebius API Key input", () => { + render( + + + , + ) + const apiKeyInput = screen.getByPlaceholderText("Enter API Key...") + expect(apiKeyInput).toBeInTheDocument() + }) + + it("renders Nebius Model ID select with a default model", () => { + render( + + + , + ) + const modelIdSelect = screen.getByLabelText("Model") + expect(modelIdSelect).toBeInTheDocument() + expect(modelIdSelect).toHaveValue("Qwen/Qwen2.5-32B-Instruct-fast") + }) +}) diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index 6091077e..e3cf6820 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -246,6 +246,7 @@ export const ExtensionStateContextProvider: React.FC<{ config.asksageApiKey, config.xaiApiKey, config.sambanovaApiKey, + config.nebiusApiKey, ].some((key) => key !== undefined) : false diff --git a/webview-ui/src/utils/validate.ts b/webview-ui/src/utils/validate.ts index d93d7eb8..ecfcbec1 100644 --- a/webview-ui/src/utils/validate.ts +++ b/webview-ui/src/utils/validate.ts @@ -98,6 +98,11 @@ export function validateApiConfiguration(apiConfiguration?: ApiConfiguration): s return "You must provide a valid model selector." } break + case "nebius": + if (!apiConfiguration.nebiusApiKey) { + return "You must provide a valid API key or choose a different provider." + } + break case "asksage": if (!apiConfiguration.asksageApiKey) { return "You must provide a valid API key or choose a different provider." From 02002860ca8b865c1220f155adedec008fdc2950 Mon Sep 17 00:00:00 2001 From: pashpashpash Date: Wed, 21 May 2025 18:11:17 -0700 Subject: [PATCH 39/85] when the assistant says to act mode we render a custom highlight with hotkey suggestion (#3708) * when the assistant says to act mode we render a custom highlight with hotkey suggestion * changeset * console --------- Co-authored-by: Cline Evaluation --- .changeset/beige-drinks-chew.md | 5 + .../src/components/common/MarkdownBlock.tsx | 105 ++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 .changeset/beige-drinks-chew.md diff --git a/.changeset/beige-drinks-chew.md b/.changeset/beige-drinks-chew.md new file mode 100644 index 00000000..eb9cfb48 --- /dev/null +++ b/.changeset/beige-drinks-chew.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +when the assistant says to act mode we render a custom highlight with hotkey suggestion diff --git a/webview-ui/src/components/common/MarkdownBlock.tsx b/webview-ui/src/components/common/MarkdownBlock.tsx index 87d4480e..7fecb042 100644 --- a/webview-ui/src/components/common/MarkdownBlock.tsx +++ b/webview-ui/src/components/common/MarkdownBlock.tsx @@ -10,6 +10,27 @@ import type { Node } from "unist" import { useExtensionState } from "@/context/ExtensionStateContext" import { CODE_BLOCK_BG_COLOR } from "@/components/common/CodeBlock" import MermaidBlock from "@/components/common/MermaidBlock" +import { vscode } from "@/utils/vscode" + +// Styled component for Act Mode text with more specific styling +const ActModeHighlight: React.FC = () => ( + { + vscode.postMessage({ + type: "togglePlanActMode", + chatSettings: { + mode: "act", + }, + }) + }} + title="Click to toggle to Act Mode" + className="text-[var(--vscode-textLink-foreground)] hover:opacity-90 cursor-pointer inline-flex items-center gap-1"> +
+
+
+ Act Mode (⌘⇧A) + +) interface MarkdownBlockProps { markdown?: string @@ -55,6 +76,68 @@ const remarkUrlToLink = () => { } } +/** + * Custom remark plugin that highlights "to Act Mode" mentions and adds keyboard shortcut hint + */ +const remarkHighlightActMode = () => { + return (tree: Node) => { + visit(tree, "text", (node: any, index, parent) => { + // Case-insensitive regex to match "to Act Mode" in various capitalizations + // Using word boundaries to avoid matching within words + // Added negative lookahead to avoid matching if already followed by the shortcut + const actModeRegex = /\bto\s+Act\s+Mode\b(?!\s*\(⌘⇧A\))/i + + if (!node.value.match(actModeRegex)) return + + // Split the text by the matches + const parts = node.value.split(actModeRegex) + const matches = node.value.match(actModeRegex) + + if (!matches || parts.length <= 1) return + + const children: any[] = [] + + parts.forEach((part: string, i: number) => { + // Add the text before the match + if (part) children.push({ type: "text", value: part }) + + // Add the match, but only make "Act Mode" bold (not the "to" part) + if (matches[i]) { + // Extract "to" and "Act Mode" parts + const matchText = matches[i] + const toIndex = matchText.toLowerCase().indexOf("to") + const actModeIndex = matchText.toLowerCase().indexOf("act mode", toIndex + 2) + + if (toIndex !== -1 && actModeIndex !== -1) { + // Add "to" as regular text + const toPart = matchText.substring(toIndex, actModeIndex).trim() + children.push({ type: "text", value: toPart + " " }) + + // Add "Act Mode" as bold with keyboard shortcut + const actModePart = matchText.substring(actModeIndex) + children.push({ + type: "strong", + children: [{ type: "text", value: `${actModePart} (⌘⇧A)` }], + }) + } else { + // Fallback if we can't parse it correctly + children.push({ type: "text", value: matchText + " " }) + children.push({ + type: "strong", + children: [{ type: "text", value: `(⌘⇧A)` }], + }) + } + } + }) + + // Replace the original text node with our new nodes + if (parent) { + parent.children.splice(index, 1, ...children) + } + }) + } +} + /** * Custom remark plugin that prevents filenames with extensions from being parsed as bold text * For example: __init__.py should not be rendered as bold "init" followed by ".py" @@ -286,6 +369,7 @@ const MarkdownBlock = memo(({ markdown }: MarkdownBlockProps) => { remarkPlugins: [ remarkPreventBoldFilenames, remarkUrlToLink, + remarkHighlightActMode, remarkMath, () => { return (tree) => { @@ -329,6 +413,27 @@ const MarkdownBlock = memo(({ markdown }: MarkdownBlockProps) => { } return }, + strong: (props: ComponentProps<"strong">) => { + // Check if this is an "Act Mode" strong element by looking for the keyboard shortcut + // Handle both string children and array of children cases + const childrenText = React.Children.toArray(props.children) + .map((child) => { + if (typeof child === "string") return child + if (typeof child === "object" && "props" in child && child.props.children) + return String(child.props.children) + return "" + }) + .join("") + + // Case-insensitive check for "Act Mode (⌘⇧A)" pattern + // This ensures we only style the exact "Act Mode" mentions with keyboard shortcut + // Using case-insensitive flag to catch all capitalization variations + if (/^act mode\s*\(⌘⇧A\)$/i.test(childrenText)) { + return + } + + return + }, }, }, }) From f16120fbfc63f878c8f04afdccd48f9272ba6ed5 Mon Sep 17 00:00:00 2001 From: wangyijing130 Date: Thu, 22 May 2025 10:13:01 +0800 Subject: [PATCH 40/85] fix the display from filename if type is windows (#3554) Co-authored-by: wangyj20 --- webview-ui/src/components/cline-rules/RuleRow.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webview-ui/src/components/cline-rules/RuleRow.tsx b/webview-ui/src/components/cline-rules/RuleRow.tsx index 11a7a7f9..4cd46f17 100644 --- a/webview-ui/src/components/cline-rules/RuleRow.tsx +++ b/webview-ui/src/components/cline-rules/RuleRow.tsx @@ -9,8 +9,10 @@ const RuleRow: React.FC<{ ruleType: string toggleRule: (rulePath: string, enabled: boolean) => void }> = ({ rulePath, enabled, isGlobal, toggleRule, ruleType }) => { + // Check if the path type is Windows + const win32Path = /^[a-zA-Z]:\\/.test(rulePath) // Get the filename from the path for display - const displayName = rulePath.split("/").pop() || rulePath + const displayName = rulePath.split(win32Path ? "\\" : "/").pop() || rulePath const getRuleTypeIcon = () => { switch (ruleType) { From c3b556ddce5828fbe8dd6036fa54ee2f9ad655e0 Mon Sep 17 00:00:00 2001 From: Ara Date: Thu, 22 May 2025 06:38:16 +0400 Subject: [PATCH 41/85] Remove Advanced settings banner from MCP (#3713) * Remove MCP Settings banner * Remove Advnaced Settings banner --------- Co-authored-by: Cline Evaluation --- .changeset/odd-seahorses-raise.md | 5 +++++ .../tabs/installed/InstalledServersView.tsx | 13 ------------- 2 files changed, 5 insertions(+), 13 deletions(-) create mode 100644 .changeset/odd-seahorses-raise.md diff --git a/.changeset/odd-seahorses-raise.md b/.changeset/odd-seahorses-raise.md new file mode 100644 index 00000000..4433ed65 --- /dev/null +++ b/.changeset/odd-seahorses-raise.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Remove advanced settings banner diff --git a/webview-ui/src/components/mcp/configuration/tabs/installed/InstalledServersView.tsx b/webview-ui/src/components/mcp/configuration/tabs/installed/InstalledServersView.tsx index 94807e99..52092c66 100644 --- a/webview-ui/src/components/mcp/configuration/tabs/installed/InstalledServersView.tsx +++ b/webview-ui/src/components/mcp/configuration/tabs/installed/InstalledServersView.tsx @@ -42,19 +42,6 @@ const InstalledServersView = () => { Configure MCP Servers - -
- { - vscode.postMessage({ - type: "openExtensionSettings", - text: "cline.mcp", - }) - }} - style={{ fontSize: "12px" }}> - Advanced MCP Settings - -
) From 58f80d4d165e02bc439f8648e716fc37d71276d4 Mon Sep 17 00:00:00 2001 From: Toshii <94262432+0xToshii@users.noreply.github.com> Date: Wed, 21 May 2025 20:24:50 -0700 Subject: [PATCH 42/85] NO MORE PROTO (#3715) * delete ui proto * changeset --- .changeset/sharp-wolves-switch.md | 5 +++++ src/shared/proto/ui.ts | 28 ---------------------------- 2 files changed, 5 insertions(+), 28 deletions(-) create mode 100644 .changeset/sharp-wolves-switch.md delete mode 100644 src/shared/proto/ui.ts diff --git a/.changeset/sharp-wolves-switch.md b/.changeset/sharp-wolves-switch.md new file mode 100644 index 00000000..5ef297a2 --- /dev/null +++ b/.changeset/sharp-wolves-switch.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +remove proto file diff --git a/src/shared/proto/ui.ts b/src/shared/proto/ui.ts deleted file mode 100644 index caeef0ed..00000000 --- a/src/shared/proto/ui.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: ui.proto - -/* eslint-disable */ -import { Empty, StringRequest } from "./common" - -export const protobufPackage = "cline" - -/** UiService provides methods for managing UI interactions */ -export type UiServiceDefinition = typeof UiServiceDefinition -export const UiServiceDefinition = { - name: "UiService", - fullName: "cline.UiService", - methods: { - /** Scrolls to a specific settings section in the settings view */ - scrollToSettings: { - name: "scrollToSettings", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - }, -} as const From efb6ae1529cdfd01bd1320af21e07c28f94066e5 Mon Sep 17 00:00:00 2001 From: Ara Date: Thu, 22 May 2025 10:37:16 +0400 Subject: [PATCH 43/85] Changing Title wording for cline extension (#3712) Co-authored-by: Cline Evaluation --- .changeset/strong-crews-rush.md | 5 +++++ package.json | 17 +++++++++++++++-- src/core/controller/ui/index.ts | 2 +- src/core/controller/ui/methods.ts | 2 +- src/core/webview/index.ts | 22 +--------------------- 5 files changed, 23 insertions(+), 25 deletions(-) create mode 100644 .changeset/strong-crews-rush.md diff --git a/.changeset/strong-crews-rush.md b/.changeset/strong-crews-rush.md new file mode 100644 index 00000000..992f9d76 --- /dev/null +++ b/.changeset/strong-crews-rush.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Change the extension title name wording diff --git a/package.json b/package.json index e5988945..f24bc64d 100644 --- a/package.json +++ b/package.json @@ -50,8 +50,21 @@ "activitybar": [ { "id": "claude-dev-ActivityBar", - "title": "Cline", - "icon": "assets/icons/icon.svg" + "title": "Cline (⌘+')", + "icon": "assets/icons/icon.svg", + "when": "isMac" + }, + { + "id": "claude-dev-ActivityBar", + "title": "Cline (Ctrl+')", + "icon": "assets/icons/icon.svg", + "when": "isWindows" + }, + { + "id": "claude-dev-ActivityBar", + "title": "Cline (Ctrl+')", + "icon": "assets/icons/icon.svg", + "when": "isLinux || !isMac && !isWindows" } ] }, diff --git a/src/core/controller/ui/index.ts b/src/core/controller/ui/index.ts index d97ded27..00a6baa4 100644 --- a/src/core/controller/ui/index.ts +++ b/src/core/controller/ui/index.ts @@ -19,4 +19,4 @@ export const handleUiServiceStreamingRequest = uiService.handleStreamingRequest export const isStreamingMethod = uiService.isStreamingMethod // Register all ui methods -registerAllMethods() +registerAllMethods() \ No newline at end of file diff --git a/src/core/controller/ui/methods.ts b/src/core/controller/ui/methods.ts index 71d14ea5..552794d4 100644 --- a/src/core/controller/ui/methods.ts +++ b/src/core/controller/ui/methods.ts @@ -9,4 +9,4 @@ import { scrollToSettings } from "./scrollToSettings" export function registerAllMethods(): void { // Register each method with the registry registerMethod("scrollToSettings", scrollToSettings) -} +} \ No newline at end of file diff --git a/src/core/webview/index.ts b/src/core/webview/index.ts index fc26a7ac..b276427d 100644 --- a/src/core/webview/index.ts +++ b/src/core/webview/index.ts @@ -150,27 +150,7 @@ export class WebviewProvider implements vscode.WebviewViewProvider { this.outputChannel.appendLine("Webview view resolved") - // Set the title to include the keyboard shortcut - if (this.view && "title" in this.view) { - // Check if the view object has a title property - const isMac = process.platform === "darwin" - const shortcutDisplay = isMac ? " (⌘+')" : " (Ctrl+')" - const baseTitle = this.context.extension.packageJSON.displayName || "Cline" - const newTitleWithShortcut = `${baseTitle}${shortcutDisplay}` - - const currentTitle = this.view.title - - if (typeof currentTitle === "string") { - if (!currentTitle.includes(shortcutDisplay)) { - // Title exists and is a string, but doesn't have the shortcut - this.view.title = newTitleWithShortcut - } - // If it includes shortcutDisplay, do nothing - } else { - // Title is undefined or not a string (e.g., for sidebar initially) - this.view.title = newTitleWithShortcut - } - } + // Title setting logic removed to allow VSCode to use the container title primarily. } } From c511b91a0992d1db084c93bcc14633d3971fb6ba Mon Sep 17 00:00:00 2001 From: pashpashpash Date: Wed, 21 May 2025 23:46:24 -0700 Subject: [PATCH 44/85] New settings page, inspired by Yellow Bat and Roo <3 (#3720) * new settings view tabs * making sure things scroll * tidying up * changeset * py * bringing back mcp settings button --------- Co-authored-by: Cline Evaluation --- .changeset/brown-pugs-help.md | 5 + webview-ui/package-lock.json | 113 ++-- webview-ui/package.json | 3 + .../browser/BrowserSettingsMenu.tsx | 2 +- webview-ui/src/components/common/Tab.tsx | 93 +++ .../tabs/installed/InstalledServersView.tsx | 25 +- .../settings/BrowserSettingsSection.tsx | 6 +- .../settings/FeatureSettingsSection.tsx | 3 +- .../settings/PreferredLanguageSetting.tsx | 2 +- .../src/components/settings/Section.tsx | 10 + .../src/components/settings/SectionHeader.tsx | 25 + .../src/components/settings/SettingsView.tsx | 583 +++++++++++++----- .../settings/TerminalSettingsSection.tsx | 5 +- webview-ui/src/utils/cn.ts | 13 + 14 files changed, 668 insertions(+), 220 deletions(-) create mode 100644 .changeset/brown-pugs-help.md create mode 100644 webview-ui/src/components/common/Tab.tsx create mode 100644 webview-ui/src/components/settings/Section.tsx create mode 100644 webview-ui/src/components/settings/SectionHeader.tsx create mode 100644 webview-ui/src/utils/cn.ts diff --git a/.changeset/brown-pugs-help.md b/.changeset/brown-pugs-help.md new file mode 100644 index 00000000..16ac12f3 --- /dev/null +++ b/.changeset/brown-pugs-help.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +New settings page split into tabs diff --git a/webview-ui/package-lock.json b/webview-ui/package-lock.json index 3aa194dc..bb491134 100644 --- a/webview-ui/package-lock.json +++ b/webview-ui/package-lock.json @@ -11,6 +11,7 @@ "@floating-ui/react": "^0.27.4", "@heroui/react": "^2.8.0-beta.2", "@vscode/webview-ui-toolkit": "^1.4.0", + "clsx": "^2.1.1", "debounce": "^2.1.1", "dompurify": "^3.2.4", "fast-deep-equal": "^3.1.3", @@ -19,6 +20,7 @@ "fuse.js": "^7.0.0", "fzf": "^0.5.2", "katex": "^0.16.22", + "lucide-react": "^0.511.0", "mermaid": "^11.4.1", "package.json": "^2.0.1", "posthog-js": "^1.224.0", @@ -37,6 +39,7 @@ "remark-math": "^6.0.0", "remark-stringify": "^11.0.0", "styled-components": "^6.1.15", + "tailwind-merge": "^3.3.0", "unified": "^11.0.5", "uuid": "^9.0.1" }, @@ -2513,6 +2516,14 @@ "react": ">=18 || >=19.0.0-rc.0" } }, + "node_modules/@heroui/system-rsc/node_modules/clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "engines": { + "node": ">=6" + } + }, "node_modules/@heroui/table": { "version": "2.2.17-beta.2", "resolved": "https://registry.npmjs.org/@heroui/table/-/table-2.2.17-beta.2.tgz", @@ -2590,6 +2601,23 @@ "tailwindcss": ">=4.0.0" } }, + "node_modules/@heroui/theme/node_modules/clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/@heroui/theme/node_modules/tailwind-merge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.0.2.tgz", + "integrity": "sha512-l7z+OYZ7mu3DTqrL88RiKrKIqO3NcpEO8V/Od04bNpvk0kiIFndGEoqfuzvj4yuhRkHKjRkII2z+KS2HfPcSxw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, "node_modules/@heroui/toast": { "version": "2.0.8-beta.2", "resolved": "https://registry.npmjs.org/@heroui/toast/-/toast-2.0.8-beta.2.tgz", @@ -3615,15 +3643,6 @@ "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@react-aria/focus/node_modules/clsx": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", - "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/@react-aria/form": { "version": "3.0.14", "resolved": "https://registry.npmjs.org/@react-aria/form/-/form-3.0.14.tgz", @@ -3839,15 +3858,6 @@ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@react-aria/grid/node_modules/clsx": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", - "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/@react-aria/i18n": { "version": "3.12.7", "resolved": "https://registry.npmjs.org/@react-aria/i18n/-/i18n-3.12.7.tgz", @@ -3970,15 +3980,6 @@ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@react-aria/landmark/node_modules/clsx": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", - "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/@react-aria/link": { "version": "3.7.10", "resolved": "https://registry.npmjs.org/@react-aria/link/-/link-3.7.10.tgz", @@ -4290,15 +4291,6 @@ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@react-aria/spinbutton/node_modules/clsx": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", - "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/@react-aria/ssr": { "version": "3.9.7", "resolved": "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.9.7.tgz", @@ -4535,15 +4527,6 @@ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@react-aria/toggle/node_modules/clsx": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", - "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/@react-aria/toolbar": { "version": "3.0.0-beta.14", "resolved": "https://registry.npmjs.org/@react-aria/toolbar/-/toolbar-3.0.0-beta.14.tgz", @@ -4597,15 +4580,6 @@ "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@react-aria/utils/node_modules/clsx": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", - "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/@react-aria/visually-hidden": { "version": "3.8.21", "resolved": "https://registry.npmjs.org/@react-aria/visually-hidden/-/visually-hidden-3.8.21.tgz", @@ -8278,10 +8252,9 @@ } }, "node_modules/clsx": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", - "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", - "license": "MIT", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", "engines": { "node": ">=6" } @@ -12487,6 +12460,14 @@ "dev": true, "license": "ISC" }, + "node_modules/lucide-react": { + "version": "0.511.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.511.0.tgz", + "integrity": "sha512-VK5a2ydJ7xm8GvBeKLS9mu1pVK6ucef9780JVUjw6bAjJL/QXnd4Y0p7SPeOUMC27YhzNCZvm5d/QX0Tp3rc0w==", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/lz-string": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", @@ -15865,10 +15846,9 @@ "license": "MIT" }, "node_modules/tailwind-merge": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.0.2.tgz", - "integrity": "sha512-l7z+OYZ7mu3DTqrL88RiKrKIqO3NcpEO8V/Od04bNpvk0kiIFndGEoqfuzvj4yuhRkHKjRkII2z+KS2HfPcSxw==", - "license": "MIT", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.3.0.tgz", + "integrity": "sha512-fyW/pEfcQSiigd5SNn0nApUOxx0zB/dm6UDU/rEwc2c3sX2smWUNbapHv+QRqLGVp9GWX3THIa7MUGPo+YkDzQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/dcastil" @@ -15890,6 +15870,15 @@ "tailwindcss": "*" } }, + "node_modules/tailwind-variants/node_modules/tailwind-merge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.0.2.tgz", + "integrity": "sha512-l7z+OYZ7mu3DTqrL88RiKrKIqO3NcpEO8V/Od04bNpvk0kiIFndGEoqfuzvj4yuhRkHKjRkII2z+KS2HfPcSxw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, "node_modules/tailwindcss": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.5.tgz", diff --git a/webview-ui/package.json b/webview-ui/package.json index ed058aab..f239cd0c 100644 --- a/webview-ui/package.json +++ b/webview-ui/package.json @@ -18,6 +18,7 @@ "@floating-ui/react": "^0.27.4", "@heroui/react": "^2.8.0-beta.2", "@vscode/webview-ui-toolkit": "^1.4.0", + "clsx": "^2.1.1", "debounce": "^2.1.1", "dompurify": "^3.2.4", "fast-deep-equal": "^3.1.3", @@ -26,6 +27,7 @@ "fuse.js": "^7.0.0", "fzf": "^0.5.2", "katex": "^0.16.22", + "lucide-react": "^0.511.0", "mermaid": "^11.4.1", "package.json": "^2.0.1", "posthog-js": "^1.224.0", @@ -44,6 +46,7 @@ "remark-math": "^6.0.0", "remark-stringify": "^11.0.0", "styled-components": "^6.1.15", + "tailwind-merge": "^3.3.0", "unified": "^11.0.5", "uuid": "^9.0.1" }, diff --git a/webview-ui/src/components/browser/BrowserSettingsMenu.tsx b/webview-ui/src/components/browser/BrowserSettingsMenu.tsx index 8b69fb24..90dd372d 100644 --- a/webview-ui/src/components/browser/BrowserSettingsMenu.tsx +++ b/webview-ui/src/components/browser/BrowserSettingsMenu.tsx @@ -71,7 +71,7 @@ export const BrowserSettingsMenu = () => { // After a short delay, send a message to scroll to browser settings setTimeout(async () => { try { - await UiServiceClient.scrollToSettings({ value: "browser-settings-section" }) + await UiServiceClient.scrollToSettings({ value: "browser" }) } catch (error) { console.error("Error scrolling to browser settings:", error) } diff --git a/webview-ui/src/components/common/Tab.tsx b/webview-ui/src/components/common/Tab.tsx new file mode 100644 index 00000000..8ba8c6f6 --- /dev/null +++ b/webview-ui/src/components/common/Tab.tsx @@ -0,0 +1,93 @@ +import React, { HTMLAttributes, useCallback, forwardRef } from "react" + +import { useExtensionState } from "@/context/ExtensionStateContext" +import { cn } from "@/utils/cn" + +type TabProps = HTMLAttributes + +export const Tab = ({ className, children, ...props }: TabProps) => ( +
+ {children} +
+) + +export const TabHeader = ({ className, children, ...props }: TabProps) => ( +
+ {children} +
+) + +export const TabContent = ({ className, children, ...props }: TabProps) => { + const onWheel = useCallback((e: React.WheelEvent) => { + const target = e.target as HTMLElement + + // Prevent scrolling if the target is a listbox or option + // (e.g. selects, dropdowns, etc). + if (target.role === "listbox" || target.role === "option") { + return + } + + e.currentTarget.scrollTop += e.deltaY + }, []) + + return ( +
+ {children} +
+ ) +} + +export const TabList = forwardRef< + HTMLDivElement, + HTMLAttributes & { + value: string + onValueChange: (value: string) => void + } +>(({ children, className, value, onValueChange, ...props }, ref) => { + const handleTabSelect = useCallback( + (tabValue: string) => { + console.log("Tab selected:", tabValue) + onValueChange(tabValue) + }, + [onValueChange], + ) + + return ( +
+ {React.Children.map(children, (child) => { + if (React.isValidElement(child)) { + // Make sure we're passing the correct props to the TabTrigger + return React.cloneElement(child as React.ReactElement, { + isSelected: child.props.value === value, + onSelect: () => handleTabSelect(child.props.value), + }) + } + return child + })} +
+ ) +}) + +export const TabTrigger = forwardRef< + HTMLButtonElement, + React.ButtonHTMLAttributes & { + value: string + isSelected?: boolean + onSelect?: () => void + } +>(({ children, className, value, isSelected, onSelect, ...props }, ref) => { + // Ensure we're using the value prop correctly + return ( + + ) +}) diff --git a/webview-ui/src/components/mcp/configuration/tabs/installed/InstalledServersView.tsx b/webview-ui/src/components/mcp/configuration/tabs/installed/InstalledServersView.tsx index 52092c66..dc792743 100644 --- a/webview-ui/src/components/mcp/configuration/tabs/installed/InstalledServersView.tsx +++ b/webview-ui/src/components/mcp/configuration/tabs/installed/InstalledServersView.tsx @@ -1,9 +1,12 @@ import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react" import { vscode } from "@/utils/vscode" import { useExtensionState } from "@/context/ExtensionStateContext" + +import { UiServiceClient } from "@/services/grpc-client" + import ServersToggleList from "./ServersToggleList" const InstalledServersView = () => { - const { mcpServers: servers } = useExtensionState() + const { mcpServers: servers, navigateToSettings } = useExtensionState() return (
@@ -42,6 +45,26 @@ const InstalledServersView = () => { Configure MCP Servers + +
+ { + // First open the settings panel using direct navigation + navigateToSettings() + + // After a short delay, send a message to scroll to browser settings + setTimeout(async () => { + try { + await UiServiceClient.scrollToSettings({ value: "features" }) + } catch (error) { + console.error("Error scrolling to mcp settings:", error) + } + }, 300) + }} + style={{ fontSize: "12px" }}> + Advanced MCP Settings + +
) diff --git a/webview-ui/src/components/settings/BrowserSettingsSection.tsx b/webview-ui/src/components/settings/BrowserSettingsSection.tsx index d89be140..e37534ce 100644 --- a/webview-ui/src/components/settings/BrowserSettingsSection.tsx +++ b/webview-ui/src/components/settings/BrowserSettingsSection.tsx @@ -366,11 +366,7 @@ export const BrowserSettingsSection: React.FC = () => { const isSubSettingsOpen = !(browserSettings.disableToolUse || false) return ( -
-

Browser Settings

- +
{/* Master Toggle */}
{ } = useExtensionState() return ( -
-

Feature Settings

+
= ({ chatSettings, setChatSettings }) => { return ( -
+
diff --git a/webview-ui/src/components/settings/Section.tsx b/webview-ui/src/components/settings/Section.tsx new file mode 100644 index 00000000..cb9e859c --- /dev/null +++ b/webview-ui/src/components/settings/Section.tsx @@ -0,0 +1,10 @@ +import { HTMLAttributes } from "react" +import { cn } from "@/utils/cn" + +type SectionProps = HTMLAttributes + +export const Section = ({ className, ...props }: SectionProps) => ( +
+) + +export default Section diff --git a/webview-ui/src/components/settings/SectionHeader.tsx b/webview-ui/src/components/settings/SectionHeader.tsx new file mode 100644 index 00000000..51ccac80 --- /dev/null +++ b/webview-ui/src/components/settings/SectionHeader.tsx @@ -0,0 +1,25 @@ +import { HTMLAttributes } from "react" +import { cn } from "@/utils/cn" + +import { OPENROUTER_MODEL_PICKER_Z_INDEX } from "./OpenRouterModelPicker" + +type SectionHeaderProps = HTMLAttributes & { + children: React.ReactNode + description?: string +} + +export const SectionHeader = ({ description, children, className, ...props }: SectionHeaderProps) => { + return ( +
+

{children}

+ {description &&

{description}

} +
+ ) +} + +export default SectionHeader diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index 8f8397eb..41c9dd2c 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -6,7 +6,24 @@ import { VSCodeOption, VSCodeTextArea, } from "@vscode/webview-ui-toolkit/react" -import { memo, useCallback, useEffect, useState } from "react" +import { memo, useCallback, useEffect, useState, useRef } from "react" +import { + Settings, + Webhook, + CheckCheck, + SquareMousePointer, + GitBranch, + Bell, + Database, + SquareTerminal, + FlaskConical, + Globe, + Info, + LucideIcon, +} from "lucide-react" +import HeroTooltip from "@/components/common/HeroTooltip" +import SectionHeader from "./SectionHeader" +import Section from "./Section" import PreferredLanguageSetting from "./PreferredLanguageSetting" // Added import import { OpenAIReasoningEffort } from "@shared/ChatSettings" import { useExtensionState } from "@/context/ExtensionStateContext" @@ -22,13 +39,91 @@ import FeatureSettingsSection from "./FeatureSettingsSection" import BrowserSettingsSection from "./BrowserSettingsSection" import TerminalSettingsSection from "./TerminalSettingsSection" import { FEATURE_FLAGS } from "@shared/services/feature-flags/feature-flags" +import { Tab, TabContent, TabHeader, TabList, TabTrigger } from "../common/Tab" +import { cn } from "@/utils/cn" const { IS_DEV } = process.env +// Styles for the tab system +const settingsTabsContainer = "flex flex-1 overflow-hidden [&.narrow_.tab-label]:hidden" +const settingsTabList = + "w-48 data-[compact=true]:w-12 flex-shrink-0 flex flex-col overflow-y-auto overflow-x-hidden border-r border-[var(--vscode-sideBar-background)]" +const settingsTabTrigger = + "whitespace-nowrap overflow-hidden min-w-0 h-12 px-4 py-3 box-border flex items-center border-l-2 border-transparent text-[var(--vscode-foreground)] opacity-70 bg-transparent hover:bg-[var(--vscode-list-hoverBackground)] data-[compact=true]:w-12 data-[compact=true]:p-4 cursor-pointer" +const settingsTabTriggerActive = + "opacity-100 border-l-2 border-l-[var(--vscode-focusBorder)] border-t-0 border-r-0 border-b-0 bg-[var(--vscode-list-activeSelectionBackground)]" + +// Tab definitions +interface SettingsTab { + id: string + name: string + tooltipText: string + headerText: string + icon: LucideIcon +} + +export const SETTINGS_TABS: SettingsTab[] = [ + { + id: "api-config", + name: "API Configuration", + tooltipText: "API Configuration", + headerText: "API Configuration", + icon: Webhook, + }, + { + id: "general", + name: "General", + tooltipText: "General Settings", + headerText: "General Settings", + icon: Settings, + }, + { + id: "features", + name: "Features", + tooltipText: "Feature Settings", + headerText: "Feature Settings", + icon: CheckCheck, + }, + { + id: "browser", + name: "Browser", + tooltipText: "Browser Settings", + headerText: "Browser Settings", + icon: SquareMousePointer, + }, + { + id: "terminal", + name: "Terminal", + tooltipText: "Terminal Settings", + headerText: "Terminal Settings", + icon: SquareTerminal, + }, + // Only show in dev mode + ...(IS_DEV + ? [ + { + id: "debug", + name: "Debug", + tooltipText: "Debug Tools", + headerText: "Debug", + icon: FlaskConical, + }, + ] + : []), + { + id: "about", + name: "About", + tooltipText: "About Cline", + headerText: "About", + icon: Info, + }, +] + type SettingsViewProps = { onDone: () => void + targetSection?: string } -const SettingsView = ({ onDone }: SettingsViewProps) => { +const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { const { apiConfiguration, version, @@ -126,24 +221,35 @@ const SettingsView = ({ onDone }: SettingsViewProps) => { setPendingTabChange(null) } break + // Handle tab navigation through targetSection prop instead case "grpc_response": if (message.grpc_response?.message?.action === "scrollToSettings") { - setTimeout(() => { - const elementId = message.grpc_response?.message?.value - if (elementId) { - const element = document.getElementById(elementId) - if (element) { - element.scrollIntoView({ behavior: "smooth" }) + const tabId = message.grpc_response?.message?.value + if (tabId) { + console.log("Opening settings tab from GRPC response:", tabId) + // Check if the value corresponds to a valid tab ID + const isValidTabId = SETTINGS_TABS.some((tab) => tab.id === tabId) - element.style.transition = "background-color 0.5s ease" - element.style.backgroundColor = "var(--vscode-textPreformat-background)" + if (isValidTabId) { + // Set the active tab directly + setActiveTab(tabId) + } else { + // Fall back to the old behavior of scrolling to an element + setTimeout(() => { + const element = document.getElementById(tabId) + if (element) { + element.scrollIntoView({ behavior: "smooth" }) - setTimeout(() => { - element.style.backgroundColor = "transparent" - }, 1200) - } + element.style.transition = "background-color 0.5s ease" + element.style.backgroundColor = "var(--vscode-textPreformat-background)" + + setTimeout(() => { + element.style.backgroundColor = "transparent" + }, 1200) + } + }, 300) } - }, 300) + } } break } @@ -161,7 +267,7 @@ const SettingsView = ({ onDone }: SettingsViewProps) => { } } - const handleTabChange = (tab: "plan" | "act") => { + const handlePlanActModeChange = (tab: "plan" | "act") => { if (tab === chatSettings.mode) { return } @@ -169,136 +275,325 @@ const SettingsView = ({ onDone }: SettingsViewProps) => { handleSubmit(true) } + // Track active tab + const [activeTab, setActiveTab] = useState(targetSection || SETTINGS_TABS[0].id) + + // Update active tab when targetSection changes + useEffect(() => { + if (targetSection) { + setActiveTab(targetSection) + } + }, [targetSection]) + + // Enhanced tab change handler with debugging + const handleTabChange = useCallback( + (tabId: string) => { + console.log("Tab change requested:", tabId, "Current:", activeTab) + setActiveTab(tabId) + }, + [activeTab], + ) + + // Debug tab changes + useEffect(() => { + console.log("Active tab changed to:", activeTab) + }, [activeTab]) + + // Track whether we're in compact mode + const [isCompactMode, setIsCompactMode] = useState(false) + const containerRef = useRef(null) + + // Setup resize observer to detect when we should switch to compact mode + useEffect(() => { + if (!containerRef.current) return + + const observer = new ResizeObserver((entries) => { + for (const entry of entries) { + // If container width is less than 500px, switch to compact mode + setIsCompactMode(entry.contentRect.width < 500) + } + }) + + observer.observe(containerRef.current) + + return () => { + observer?.disconnect() + } + }, []) + return ( -
-
-

Settings

- handleSubmit(false)}>Save + + +
+

Settings

+
+
+ handleSubmit(false)}>Save +
+
+ + {/* Vertical tabs layout */} +
+ {/* Tab sidebar */} + + {SETTINGS_TABS.map((tab) => + isCompactMode ? ( + +
{ + console.log("Compact tab clicked:", tab.id) + handleTabChange(tab.id) + }}> +
+ + {tab.name} +
+
+
+ ) : ( + +
+ + {tab.name} +
+
+ ), + )} +
+ + {/* Helper function to render section header */} + {(() => { + const renderSectionHeader = (tabId: string) => { + const tab = SETTINGS_TABS.find((t) => t.id === tabId) + if (!tab) return null + + return ( + +
+ {(() => { + const Icon = tab.icon + return + })()} +
{tab.headerText}
+
+
+ ) + } + + return ( + + {/* API Configuration Tab */} + {activeTab === "api-config" && ( +
+ {renderSectionHeader("api-config")} +
+ {/* Tabs container */} + {planActSeparateModelsSetting ? ( +
+
+ handlePlanActModeChange("plan")}> + Plan Mode + + handlePlanActModeChange("act")}> + Act Mode + +
+ + {/* Content container */} +
+ +
+
+ ) : ( + + )} + +
+ { + const checked = e.target.checked === true + setPlanActSeparateModelsSetting(checked) + }}> + Use different models for Plan and Act modes + +

+ Switching between Plan and Act mode will persist the API and model used in the + previous mode. This may be helpful e.g. when using a strong reasoning model to + architect a plan for a cheaper coding model to act on. +

+
+ +
+ setCustomInstructions(e.target?.value ?? "")}> + Custom Instructions + +

+ These instructions are added to the end of the system prompt sent with every + request. +

+
+
+
+ )} + + {/* General Settings Tab */} + {activeTab === "general" && ( +
+ {renderSectionHeader("general")} +
+ {chatSettings && ( + + )} + +
+ { + const checked = e.target.checked === true + setTelemetrySetting(checked ? "enabled" : "disabled") + }}> + Allow anonymous error and usage reporting + +

+ Help improve Cline by sending anonymous usage data and error reports. No code, + prompts, or personal information are ever sent. See our{" "} + + telemetry overview + {" "} + and{" "} + + privacy policy + {" "} + for more details. +

+
+
+
+ )} + + {/* Feature Settings Tab */} + {activeTab === "features" && ( +
+ {renderSectionHeader("features")} +
+ +
+
+ )} + + {/* Browser Settings Tab */} + {activeTab === "browser" && ( +
+ {renderSectionHeader("browser")} +
+ +
+
+ )} + + {/* Terminal Settings Tab */} + {activeTab === "terminal" && ( +
+ {renderSectionHeader("terminal")} +
+ +
+
+ )} + + {/* Debug Tab (only in dev mode) */} + {IS_DEV && activeTab === "debug" && ( +
+ {renderSectionHeader("debug")} +
+ + Reset State + +

+ This will reset all global state and secret storage in the extension. +

+
+
+ )} + + {/* About Tab */} + {activeTab === "about" && ( +
+ {renderSectionHeader("about")} +
+
+

+ If you have any questions or feedback, feel free to open an issue at{" "} + + https://github.com/cline/cline + +

+

v{version}

+
+
+
+ )} +
+ ) + })()}
-
- {/* Tabs container */} - {planActSeparateModelsSetting ? ( -
-
- handleTabChange("plan")}> - Plan Mode - - handleTabChange("act")}> - Act Mode - -
- - {/* Content container */} -
- -
-
- ) : ( - - )} - -
- setCustomInstructions(e.target?.value ?? "")}> - Custom Instructions - -

- These instructions are added to the end of the system prompt sent with every request. -

-
- - {chatSettings && } - -
- { - const checked = e.target.checked === true - setPlanActSeparateModelsSetting(checked) - }}> - Use different models for Plan and Act modes - -

- Switching between Plan and Act mode will persist the API and model used in the previous mode. This may be - helpful e.g. when using a strong reasoning model to architect a plan for a cheaper coding model to act on. -

-
- -
- { - const checked = e.target.checked === true - setTelemetrySetting(checked ? "enabled" : "disabled") - }}> - Allow anonymous error and usage reporting - -

- Help improve Cline by sending anonymous usage data and error reports. No code, prompts, or personal - information are ever sent. See our{" "} - - telemetry overview - {" "} - and{" "} - - privacy policy - {" "} - for more details. -

-
- - {/* Feature Settings Section */} - - - {/* Browser Settings Section */} - - - {/* Terminal Settings Section */} - - - {IS_DEV && ( - <> -
Debug
- - Reset State - -

- This will reset all global state and secret storage in the extension. -

- - )} - -
-

- If you have any questions or feedback, feel free to open an issue at{" "} - - https://github.com/cline/cline - -

-

v{version}

-
-
-
+ ) } diff --git a/webview-ui/src/components/settings/TerminalSettingsSection.tsx b/webview-ui/src/components/settings/TerminalSettingsSection.tsx index cedd81ba..e1730189 100644 --- a/webview-ui/src/components/settings/TerminalSettingsSection.tsx +++ b/webview-ui/src/components/settings/TerminalSettingsSection.tsx @@ -49,10 +49,7 @@ export const TerminalSettingsSection: React.FC = () => { } return ( -
-

Terminal Settings

+

  • - Workflows: Create and manage workflow files that can be injected into conversations via slash commands, - making it easy to automate repetitive tasks. + Claude 4 Models: Now with support for Anthropic Claude Sonnet 4 and Claude Opus 4 in both Anthropic and + Vertex providers.
  • - Collapsible Task List: Hide your recent tasks when sharing your screen to keep your prompts private. + New Settings Page: Redesigned settings, now split into tabs for easier navigation and a cleaner + experience.
  • - Global Endpoint for Vertex AI: Improved availability and reduced rate limiting errors for Vertex AI - users. -
  • -
  • - New User Experience: Special components and guidance for new users to help them get started with Cline. -
  • -
  • - UI Improvements: Fixed loading states and improved settings organization for a smoother experience. + Nebius AI Studio: Added Nebius AI Studio as a new provider. (Thanks @Aktsvigun!)
@@ -73,6 +67,26 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => { "text-[var(--vscode-foreground)] mb-0.5 -rotate-180 data-[open=true]:-rotate-90 rtl:rotate-0 rtl:data-[open=true]:-rotate-90", }}>
    +
  • + Workflows: Create and manage workflow files that can be injected into conversations via slash + commands, making it easy to automate repetitive tasks. +
  • +
  • + Collapsible Task List: Hide your recent tasks when sharing your screen to keep your prompts + private. +
  • +
  • + Global Endpoint for Vertex AI: Improved availability and reduced rate limiting errors for + Vertex AI users. +
  • +
  • + New User Experience: Special components and guidance for new users to help them get started + with Cline. +
  • +
  • + UI Improvements: Fixed loading states and improved settings organization for a smoother + experience. +
  • Task Timeline: See the history of your coding journey with a visual timeline of checkpoints.
  • diff --git a/webview-ui/src/services/grpc-client.ts b/webview-ui/src/services/grpc-client.ts new file mode 100644 index 00000000..6a73f76a --- /dev/null +++ b/webview-ui/src/services/grpc-client.ts @@ -0,0 +1,41 @@ +// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY +// Generated by proto/build-proto.js + +import { createGrpcClient } from "./grpc-client-base" +import { AccountServiceDefinition } from "@shared/proto/account" +import { BrowserServiceDefinition } from "@shared/proto/browser" +import { CheckpointsServiceDefinition } from "@shared/proto/checkpoints" +import { FileServiceDefinition } from "@shared/proto/file" +import { McpServiceDefinition } from "@shared/proto/mcp" +import { StateServiceDefinition } from "@shared/proto/state" +import { TaskServiceDefinition } from "@shared/proto/task" +import { WebServiceDefinition } from "@shared/proto/web" +import { ModelsServiceDefinition } from "@shared/proto/models" +import { SlashServiceDefinition } from "@shared/proto/slash" +import { UiServiceDefinition } from "@shared/proto/ui" + +const AccountServiceClient = createGrpcClient(AccountServiceDefinition) +const BrowserServiceClient = createGrpcClient(BrowserServiceDefinition) +const CheckpointsServiceClient = createGrpcClient(CheckpointsServiceDefinition) +const FileServiceClient = createGrpcClient(FileServiceDefinition) +const McpServiceClient = createGrpcClient(McpServiceDefinition) +const StateServiceClient = createGrpcClient(StateServiceDefinition) +const TaskServiceClient = createGrpcClient(TaskServiceDefinition) +const WebServiceClient = createGrpcClient(WebServiceDefinition) +const ModelsServiceClient = createGrpcClient(ModelsServiceDefinition) +const SlashServiceClient = createGrpcClient(SlashServiceDefinition) +const UiServiceClient = createGrpcClient(UiServiceDefinition) + +export { + AccountServiceClient, + BrowserServiceClient, + CheckpointsServiceClient, + FileServiceClient, + McpServiceClient, + StateServiceClient, + TaskServiceClient, + WebServiceClient, + ModelsServiceClient, + SlashServiceClient, + UiServiceClient, +} From 07a2daa8278f8d9476e45dd36d952891f19990c7 Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Thu, 22 May 2025 12:03:21 -0700 Subject: [PATCH 55/85] Put protos back in gitignore (#3739) * put protos back in gitignore * changeset --------- Co-authored-by: Elephant Lumps --- .changeset/silent-flies-smash.md | 5 +++++ .gitignore | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 .changeset/silent-flies-smash.md diff --git a/.changeset/silent-flies-smash.md b/.changeset/silent-flies-smash.md new file mode 100644 index 00000000..a177e900 --- /dev/null +++ b/.changeset/silent-flies-smash.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Put protos back in .gitignore diff --git a/.gitignore b/.gitignore index 00558441..6d463252 100644 --- a/.gitignore +++ b/.gitignore @@ -22,9 +22,9 @@ coverage *evals.env # Generated proto files -# src/shared/proto/*.ts -# src/core/controller/*/methods.ts -# src/core/controller/*/index.ts -# src/core/controller/grpc-service-config.ts -# webview-ui/src/services/grpc-client.ts -# src/standalone/server-setup.ts +src/shared/proto/*.ts +src/core/controller/*/methods.ts +src/core/controller/*/index.ts +src/core/controller/grpc-service-config.ts +webview-ui/src/services/grpc-client.ts +src/standalone/server-setup.ts From 32f200e83791c1c79423c0ed3f1a01d60a2dd3a9 Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Thu, 22 May 2025 12:44:33 -0700 Subject: [PATCH 56/85] Prompt caching Claude 4 Openrouter/Cline (#3722) * add prompt caching and suggested models * wording * change wording again * remove opus recommended --------- Co-authored-by: Elephant Lumps --- .changeset/strong-dolphins-lay.md | 5 +++++ src/api/transform/openrouter-stream.ts | 6 ++++++ src/core/controller/models/refreshOpenRouterModels.ts | 2 ++ src/core/controller/ui/index.ts | 2 +- src/core/controller/ui/methods.ts | 2 +- src/shared/api.ts | 4 ++-- .../src/components/settings/OpenRouterModelPicker.tsx | 11 ++++++----- 7 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 .changeset/strong-dolphins-lay.md diff --git a/.changeset/strong-dolphins-lay.md b/.changeset/strong-dolphins-lay.md new file mode 100644 index 00000000..1b90e104 --- /dev/null +++ b/.changeset/strong-dolphins-lay.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Add prompt caching for Claude 4 models on Cline and Openrouter providers diff --git a/src/api/transform/openrouter-stream.ts b/src/api/transform/openrouter-stream.ts index e3887752..edc38334 100644 --- a/src/api/transform/openrouter-stream.ts +++ b/src/api/transform/openrouter-stream.ts @@ -23,6 +23,8 @@ export async function createOpenRouterStream( // this was initially specifically for claude models (some models may 'support prompt caching' automatically without this) // handles direct model.id match logic switch (model.id) { + case "anthropic/claude-sonnet-4": + case "anthropic/claude-opus-4": case "anthropic/claude-3.7-sonnet": case "anthropic/claude-3.7-sonnet:beta": case "anthropic/claude-3.7-sonnet:thinking": @@ -79,6 +81,8 @@ export async function createOpenRouterStream( // (models usually default to max tokens allowed) let maxTokens: number | undefined switch (model.id) { + case "anthropic/claude-sonnet-4": + case "anthropic/claude-opus-4": case "anthropic/claude-3.7-sonnet": case "anthropic/claude-3.7-sonnet:beta": case "anthropic/claude-3.7-sonnet:thinking": @@ -112,6 +116,8 @@ export async function createOpenRouterStream( let reasoning: { max_tokens: number } | undefined = undefined switch (model.id) { + case "anthropic/claude-sonnet-4": + case "anthropic/claude-opus-4": case "anthropic/claude-3.7-sonnet": case "anthropic/claude-3.7-sonnet:beta": case "anthropic/claude-3.7-sonnet:thinking": diff --git a/src/core/controller/models/refreshOpenRouterModels.ts b/src/core/controller/models/refreshOpenRouterModels.ts index 412c04b5..7d5480e9 100644 --- a/src/core/controller/models/refreshOpenRouterModels.ts +++ b/src/core/controller/models/refreshOpenRouterModels.ts @@ -43,6 +43,8 @@ export async function refreshOpenRouterModels( } switch (rawModel.id) { + case "anthropic/claude-sonnet-4": + case "anthropic/claude-opus-4": case "anthropic/claude-3-7-sonnet": case "anthropic/claude-3-7-sonnet:beta": case "anthropic/claude-3.7-sonnet": diff --git a/src/core/controller/ui/index.ts b/src/core/controller/ui/index.ts index d97ded27..00a6baa4 100644 --- a/src/core/controller/ui/index.ts +++ b/src/core/controller/ui/index.ts @@ -19,4 +19,4 @@ export const handleUiServiceStreamingRequest = uiService.handleStreamingRequest export const isStreamingMethod = uiService.isStreamingMethod // Register all ui methods -registerAllMethods() +registerAllMethods() \ No newline at end of file diff --git a/src/core/controller/ui/methods.ts b/src/core/controller/ui/methods.ts index e779ee05..a3d0c1ef 100644 --- a/src/core/controller/ui/methods.ts +++ b/src/core/controller/ui/methods.ts @@ -11,4 +11,4 @@ export function registerAllMethods(): void { // Register each method with the registry registerMethod("onDidShowAnnouncement", onDidShowAnnouncement) registerMethod("scrollToSettings", scrollToSettings) -} +} \ No newline at end of file diff --git a/src/shared/api.ts b/src/shared/api.ts index f3a36413..2f42d1de 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -338,7 +338,7 @@ export const bedrockModels = { // OpenRouter // https://openrouter.ai/models?order=newest&supported_parameters=tools -export const openRouterDefaultModelId = "anthropic/claude-3.7-sonnet" // will always exist in openRouterModels +export const openRouterDefaultModelId = "anthropic/claude-sonnet-4" // will always exist in openRouterModels export const openRouterDefaultModelInfo: ModelInfo = { maxTokens: 8192, contextWindow: 200_000, @@ -350,7 +350,7 @@ export const openRouterDefaultModelInfo: ModelInfo = { cacheWritesPrice: 3.75, cacheReadsPrice: 0.3, description: - "Claude 3.7 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities. It introduces a hybrid reasoning approach, allowing users to choose between rapid responses and extended, step-by-step processing for complex tasks. The model demonstrates notable improvements in coding, particularly in front-end development and full-stack updates, and excels in agentic workflows, where it can autonomously navigate multi-step processes. \n\nClaude 3.7 Sonnet maintains performance parity with its predecessor in standard mode while offering an extended reasoning mode for enhanced accuracy in math, coding, and instruction-following tasks.\n\nRead more at the [blog post here](https://www.anthropic.com/news/claude-3-7-sonnet)", + "Claude 4 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities. It introduces a hybrid reasoning approach, allowing users to choose between rapid responses and extended, step-by-step processing for complex tasks. The model demonstrates notable improvements in coding, particularly in front-end development and full-stack updates, and excels in agentic workflows, where it can autonomously navigate multi-step processes. \n\nClaude 4 Sonnet maintains performance parity with its predecessor in standard mode while offering an extended reasoning mode for enhanced accuracy in math, coding, and instruction-following tasks.\n\nRead more at the [blog post here](https://www.anthropic.com/news/claude-4)", } // Vertex AI // https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-claude diff --git a/webview-ui/src/components/settings/OpenRouterModelPicker.tsx b/webview-ui/src/components/settings/OpenRouterModelPicker.tsx index 40f398c5..4d80bb44 100644 --- a/webview-ui/src/components/settings/OpenRouterModelPicker.tsx +++ b/webview-ui/src/components/settings/OpenRouterModelPicker.tsx @@ -7,7 +7,6 @@ import styled from "styled-components" import { openRouterDefaultModelId } from "@shared/api" import { useExtensionState } from "@/context/ExtensionStateContext" import { ModelsServiceClient, StateServiceClient } from "@/services/grpc-client" -import { vscode } from "@/utils/vscode" import { highlight } from "../history/HistoryView" import { ModelInfoView, normalizeApiConfiguration } from "./ApiOptions" import { CODE_BLOCK_BG_COLOR } from "@/components/common/CodeBlock" @@ -42,8 +41,8 @@ export interface OpenRouterModelPickerProps { // Featured models for Cline provider const featuredModels = [ { - id: "anthropic/claude-3.7-sonnet", - description: "Leading model for agentic coding", + id: "anthropic/claude-sonnet-4", + description: "Best model for agentic coding", label: "Best", }, { @@ -199,6 +198,8 @@ const OpenRouterModelPicker: React.FC = ({ isPopup } const showBudgetSlider = useMemo(() => { return ( + selectedModelId?.toLowerCase().includes("claude-sonnet-4") || + selectedModelId?.toLowerCase().includes("claude-opus-4") || selectedModelId?.toLowerCase().includes("claude-3-7-sonnet") || selectedModelId?.toLowerCase().includes("claude-3.7-sonnet") || selectedModelId?.toLowerCase().includes("claude-3.7-sonnet:thinking") @@ -335,8 +336,8 @@ const OpenRouterModelPicker: React.FC = ({ isPopup } If you're unsure which model to choose, Cline works best with{" "} handleModelChange("anthropic/claude-3.7-sonnet")}> - anthropic/claude-3.7-sonnet. + onClick={() => handleModelChange("anthropic/claude-sonnet-4")}> + anthropic/claude-sonnet-4. You can also try searching "free" for no-cost options currently available. From 346c1f7eff3f172b6b79fde72899a04c4940424f Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Thu, 22 May 2025 12:47:23 -0700 Subject: [PATCH 57/85] Opus 4 max tokens (#3735) * anthropic opus max tokens increased * changeset --------- Co-authored-by: Elephant Lumps --- .changeset/pink-chicken-collect.md | 5 +++++ src/shared/api.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/pink-chicken-collect.md diff --git a/.changeset/pink-chicken-collect.md b/.changeset/pink-chicken-collect.md new file mode 100644 index 00000000..87a8b7de --- /dev/null +++ b/.changeset/pink-chicken-collect.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Increase max tokens anthropic opus diff --git a/src/shared/api.ts b/src/shared/api.ts index 2f42d1de..28858f6f 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -152,7 +152,7 @@ export const anthropicModels = { cacheReadsPrice: 0.3, }, "claude-opus-4-20250514": { - maxTokens: 4096, + maxTokens: 8192, contextWindow: 200_000, supportsImages: true, supportsPromptCache: true, From cea93d9e98734b8b0fdd96e40e09f49fb38eee59 Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Thu, 22 May 2025 12:56:27 -0700 Subject: [PATCH 58/85] Update package script (#3738) * add protos files (#3736) Co-authored-by: Elephant Lumps * change package script --------- Co-authored-by: Elephant Lumps --- package.json | 2 +- src/core/controller/ui/index.ts | 2 +- src/core/controller/ui/methods.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e12659d5..4b376aca 100644 --- a/package.json +++ b/package.json @@ -278,7 +278,7 @@ "watch": "npm-run-all -p watch:*", "watch:esbuild": "node esbuild.js --watch", "watch:tsc": "tsc --noEmit --watch --project tsconfig.json", - "package": "npm run build:webview && npm run check-types && npm run lint && node esbuild.js --production", + "package": "npm run check-types && npm run build:webview && npm run lint && node esbuild.js --production", "protos": "node proto/build-proto.js && node scripts/generate-server-setup.mjs", "postprotos": "prettier src/shared/proto src/core/controller webview-ui/src/services src/standalone/server-setup.ts --write --log-level silent", "compile-tests": "node ./scripts/build-tests.js", diff --git a/src/core/controller/ui/index.ts b/src/core/controller/ui/index.ts index 00a6baa4..d97ded27 100644 --- a/src/core/controller/ui/index.ts +++ b/src/core/controller/ui/index.ts @@ -19,4 +19,4 @@ export const handleUiServiceStreamingRequest = uiService.handleStreamingRequest export const isStreamingMethod = uiService.isStreamingMethod // Register all ui methods -registerAllMethods() \ No newline at end of file +registerAllMethods() diff --git a/src/core/controller/ui/methods.ts b/src/core/controller/ui/methods.ts index a3d0c1ef..e779ee05 100644 --- a/src/core/controller/ui/methods.ts +++ b/src/core/controller/ui/methods.ts @@ -11,4 +11,4 @@ export function registerAllMethods(): void { // Register each method with the registry registerMethod("onDidShowAnnouncement", onDidShowAnnouncement) registerMethod("scrollToSettings", scrollToSettings) -} \ No newline at end of file +} From a718cc950efc165c9d7f841fa8c151da2e291159 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 23 May 2025 01:37:38 +0530 Subject: [PATCH 59/85] v3.17.1 Release Notes v3.17.1 Release Notes --- .changeset/pink-chicken-collect.md | 5 ----- .changeset/silent-flies-smash.md | 5 ----- .changeset/strong-dolphins-lay.md | 5 ----- CHANGELOG.md | 5 +++++ package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 8 insertions(+), 18 deletions(-) delete mode 100644 .changeset/pink-chicken-collect.md delete mode 100644 .changeset/silent-flies-smash.md delete mode 100644 .changeset/strong-dolphins-lay.md diff --git a/.changeset/pink-chicken-collect.md b/.changeset/pink-chicken-collect.md deleted file mode 100644 index 87a8b7de..00000000 --- a/.changeset/pink-chicken-collect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Increase max tokens anthropic opus diff --git a/.changeset/silent-flies-smash.md b/.changeset/silent-flies-smash.md deleted file mode 100644 index a177e900..00000000 --- a/.changeset/silent-flies-smash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Put protos back in .gitignore diff --git a/.changeset/strong-dolphins-lay.md b/.changeset/strong-dolphins-lay.md deleted file mode 100644 index 1b90e104..00000000 --- a/.changeset/strong-dolphins-lay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Add prompt caching for Claude 4 models on Cline and Openrouter providers diff --git a/CHANGELOG.md b/CHANGELOG.md index 23fa0a77..af812140 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## [3.17.1] + +- Add prompt caching for Claude 4 models on Cline and OpenRouter providers +- Increase max tokens for Claude Opus 4 from 4096 to 8192 + ## [3.17.0] - Add support for Anthropic Claude Sonnet 4 and Claude Opus 4 in both Anthropic and Vertex providers diff --git a/package-lock.json b/package-lock.json index 325a0d9d..432257ec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "claude-dev", - "version": "3.17.0", + "version": "3.17.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "claude-dev", - "version": "3.17.0", + "version": "3.17.1", "license": "Apache-2.0", "dependencies": { "@anthropic-ai/bedrock-sdk": "^0.12.4", diff --git a/package.json b/package.json index 4b376aca..46e8e502 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "claude-dev", "displayName": "Cline", "description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.", - "version": "3.17.0", + "version": "3.17.1", "icon": "assets/icons/icon.png", "engines": { "vscode": "^1.84.0" From 1fd137b6843336b367c851bf1424f488c4a47d47 Mon Sep 17 00:00:00 2001 From: pashpashpash Date: Thu, 22 May 2025 14:25:38 -0700 Subject: [PATCH 60/85] z-index-fix on settings page (#3748) Co-authored-by: Cline Evaluation --- webview-ui/src/components/settings/SectionHeader.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webview-ui/src/components/settings/SectionHeader.tsx b/webview-ui/src/components/settings/SectionHeader.tsx index 51ccac80..3f196faa 100644 --- a/webview-ui/src/components/settings/SectionHeader.tsx +++ b/webview-ui/src/components/settings/SectionHeader.tsx @@ -12,10 +12,11 @@ export const SectionHeader = ({ description, children, className, ...props }: Se return (
    + {...props} + style={{ zIndex: OPENROUTER_MODEL_PICKER_Z_INDEX + 20 }}>

    {children}

    {description &&

    {description}

    }
    From dbb5ac265d9d9d50a4d4cdc79dd12e4d598f5354 Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Thu, 22 May 2025 15:08:12 -0700 Subject: [PATCH 61/85] Claude 4 rest of updates (#3749) * add protos files (#3736) Co-authored-by: Elephant Lumps * change package script * rest of updates for vertex / bedrock --------- Co-authored-by: Elephant Lumps --- src/api/providers/bedrock.ts | 6 ++- src/api/providers/requesty.ts | 5 ++- src/api/providers/vertex.ts | 7 ++- src/shared/api.ts | 44 ++++++++++++++++++- .../src/components/settings/ApiOptions.tsx | 27 ++++++++---- 5 files changed, 76 insertions(+), 13 deletions(-) diff --git a/src/api/providers/bedrock.ts b/src/api/providers/bedrock.ts index 8e281f70..57e1b9a7 100644 --- a/src/api/providers/bedrock.ts +++ b/src/api/providers/bedrock.ts @@ -47,7 +47,11 @@ export class AwsBedrockHandler implements ApiHandler { } const budget_tokens = this.options.thinkingBudgetTokens || 0 - const reasoningOn = baseModelId.includes("3-7") && budget_tokens !== 0 ? true : false + const reasoningOn = + (baseModelId.includes("3-7") || baseModelId.includes("sonnet-4") || baseModelId.includes("opus-4")) && + budget_tokens !== 0 + ? true + : false // Get model info and message indices for caching const userMsgIndices = messages.reduce((acc, msg, index) => (msg.role === "user" ? [...acc, index] : acc), [] as number[]) diff --git a/src/api/providers/requesty.ts b/src/api/providers/requesty.ts index 43470c1c..21bc9a64 100644 --- a/src/api/providers/requesty.ts +++ b/src/api/providers/requesty.ts @@ -51,7 +51,10 @@ export class RequestyHandler implements ApiHandler { thinkingBudget > 0 ? { thinking: { type: "enabled", budget_tokens: thinkingBudget } } : { thinking: { type: "disabled" } } - const thinkingArgs = model.id.includes("claude-3-7-sonnet") ? thinking : {} + const thinkingArgs = + model.id.includes("claude-3-7-sonnet") || model.id.includes("claude-sonnet-4") || model.id.includes("claude-opus-4") + ? thinking + : {} // @ts-ignore-next-line const stream = await this.client.chat.completions.create({ diff --git a/src/api/providers/vertex.ts b/src/api/providers/vertex.ts index fb77ab7b..e06233d6 100644 --- a/src/api/providers/vertex.ts +++ b/src/api/providers/vertex.ts @@ -41,10 +41,15 @@ export class VertexHandler implements ApiHandler { // Claude implementation let budget_tokens = this.options.thinkingBudgetTokens || 0 - const reasoningOn = modelId.includes("3-7") && budget_tokens !== 0 ? true : false + const reasoningOn = + (modelId.includes("3-7") || modelId.includes("sonnet-4") || modelId.includes("opus-4")) && budget_tokens !== 0 + ? true + : false let stream switch (modelId) { + case "claude-sonnet-4@20250514": + case "claude-opus-4@20250514": case "claude-3-7-sonnet@20250219": case "claude-3-5-sonnet-v2@20241022": case "claude-3-5-sonnet@20240620": diff --git a/src/shared/api.ts b/src/shared/api.ts index 28858f6f..5ef15c10 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -218,8 +218,28 @@ export const anthropicModels = { // AWS Bedrock // https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html export type BedrockModelId = keyof typeof bedrockModels -export const bedrockDefaultModelId: BedrockModelId = "anthropic.claude-3-7-sonnet-20250219-v1:0" +export const bedrockDefaultModelId: BedrockModelId = "anthropic.claude-sonnet-4-20250514-v1:0" export const bedrockModels = { + "anthropic.claude-sonnet-4-20250514-v1:0": { + maxTokens: 8192, + contextWindow: 200_000, + supportsImages: true, + supportsPromptCache: true, + inputPrice: 3.0, + outputPrice: 15.0, + cacheWritesPrice: 3.75, + cacheReadsPrice: 0.3, + }, + "anthropic.claude-opus-4-20250514-v1:0": { + maxTokens: 8192, + contextWindow: 200_000, + supportsImages: true, + supportsPromptCache: true, + inputPrice: 15.0, + outputPrice: 75.0, + cacheWritesPrice: 18.75, + cacheReadsPrice: 1.5, + }, "amazon.nova-premier-v1:0": { maxTokens: 10_000, contextWindow: 1_000_000, @@ -356,8 +376,28 @@ export const openRouterDefaultModelInfo: ModelInfo = { // https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-claude // https://cloud.google.com/vertex-ai/generative-ai/pricing#partner-models export type VertexModelId = keyof typeof vertexModels -export const vertexDefaultModelId: VertexModelId = "claude-3-7-sonnet@20250219" +export const vertexDefaultModelId: VertexModelId = "claude-sonnet-4@20250514" export const vertexModels = { + "claude-sonnet-4@20250514": { + maxTokens: 8192, + contextWindow: 200_000, + supportsImages: true, + supportsPromptCache: true, + inputPrice: 3.0, + outputPrice: 15.0, + cacheWritesPrice: 3.75, + cacheReadsPrice: 0.3, + }, + "claude-opus-4@20250514": { + maxTokens: 8192, + contextWindow: 200_000, + supportsImages: true, + supportsPromptCache: true, + inputPrice: 15.0, + outputPrice: 75.0, + cacheWritesPrice: 18.75, + cacheReadsPrice: 1.5, + }, "claude-3-7-sonnet@20250219": { maxTokens: 8192, contextWindow: 200_000, diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx index 21f3d02e..b0890550 100644 --- a/webview-ui/src/components/settings/ApiOptions.tsx +++ b/webview-ui/src/components/settings/ApiOptions.tsx @@ -55,7 +55,6 @@ import { doubaoDefaultModelId, liteLlmModelInfoSaneDefaults, } from "@shared/api" -import { ExtensionMessage } from "@shared/ExtensionMessage" import { useExtensionState } from "@/context/ExtensionStateContext" import { vscode } from "@/utils/vscode" import { ModelsServiceClient } from "@/services/grpc-client" @@ -894,8 +893,14 @@ const ApiOptions = ({
)} {(selectedModelId === "anthropic.claude-3-7-sonnet-20250219-v1:0" || + selectedModelId === "anthropic.claude-sonnet-4-20250514-v1:0" || + selectedModelId === "anthropic.claude-opus-4-20250514-v1:0" || (apiConfiguration?.awsBedrockCustomSelected && - apiConfiguration?.awsBedrockCustomModelBaseId === "anthropic.claude-3-7-sonnet-20250219-v1:0")) && ( + apiConfiguration?.awsBedrockCustomModelBaseId === "anthropic.claude-3-7-sonnet-20250219-v1:0") || + (apiConfiguration?.awsBedrockCustomSelected && + apiConfiguration?.awsBedrockCustomModelBaseId === "anthropic.claude-sonnet-4-20250514-v1:0") || + (apiConfiguration?.awsBedrockCustomSelected && + apiConfiguration?.awsBedrockCustomModelBaseId === "anthropic.claude-opus-4-20250514-v1:0")) && ( )} + placeholder={"e.g. anthropic/claude-sonnet-4-20250514"}> Model ID @@ -1682,7 +1687,7 @@ const ApiOptions = ({ marginTop: "5px", color: "var(--vscode-descriptionForeground)", }}> - Extended thinking is available for models as Sonnet-3-7, o3-mini, Deepseek R1, etc. More info on{" "} + Extended thinking is available for models such as Sonnet-4, o3-mini, Deepseek R1, etc. More info on{" "} @@ -2128,13 +2133,19 @@ const ApiOptions = ({ {selectedProvider === "nebius" && createDropdown(nebiusModels)} - {((selectedProvider === "anthropic" && + {(selectedProvider === "anthropic" && (selectedModelId === "claude-3-7-sonnet-20250219" || selectedModelId === "claude-sonnet-4-20250514" || selectedModelId === "claude-opus-4-20250514")) || - (selectedProvider === "vertex" && selectedModelId === "claude-3-7-sonnet@20250219")) && ( - - )} + (selectedProvider === "vertex" && + (selectedModelId === "claude-3-7-sonnet@20250219" || + selectedModelId === "claude-sonnet-4@20250514" || + selectedModelId === "claude-opus-4@20250514") && ( + + ))} {selectedProvider === "xai" && selectedModelId.includes("3-mini") && ( <> From 624fb8c8a114d63b7cbe5e3365348153501cb96d Mon Sep 17 00:00:00 2001 From: David Nanyan <41910751+DaveFres@users.noreply.github.com> Date: Thu, 22 May 2025 15:33:05 -0700 Subject: [PATCH 62/85] [ISSUE-3707] Fix issue with process env (#3741) * [ISSUE-3707] Fix issue with process env * Add tests --- .changeset/sour-boxes-hang.md | 5 + src/api/providers/__tests__/bedrock.test.ts | 145 ++++++++++++++++++++ src/api/providers/bedrock.ts | 114 ++++++++------- 3 files changed, 215 insertions(+), 49 deletions(-) create mode 100644 .changeset/sour-boxes-hang.md create mode 100644 src/api/providers/__tests__/bedrock.test.ts diff --git a/.changeset/sour-boxes-hang.md b/.changeset/sour-boxes-hang.md new file mode 100644 index 00000000..9e705084 --- /dev/null +++ b/.changeset/sour-boxes-hang.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Fix issue with process.env for bedrock diff --git a/src/api/providers/__tests__/bedrock.test.ts b/src/api/providers/__tests__/bedrock.test.ts new file mode 100644 index 00000000..9de25412 --- /dev/null +++ b/src/api/providers/__tests__/bedrock.test.ts @@ -0,0 +1,145 @@ +import "should" +import { AwsBedrockHandler } from "../bedrock" +import { ApiHandlerOptions } from "@shared/api" + +describe("AwsBedrockHandler", () => { + describe("withTempEnv", () => { + // Store original env vars for cleanup + const originalEnv: Record = {} + + beforeEach(() => { + // Store original values before each test + originalEnv.TEST_VAR = process.env.TEST_VAR + originalEnv.ANOTHER_VAR = process.env.ANOTHER_VAR + originalEnv.VAR1 = process.env.VAR1 + originalEnv.VAR2 = process.env.VAR2 + originalEnv.VAR3 = process.env.VAR3 + originalEnv.UNDEFINED_VAR = process.env.UNDEFINED_VAR + }) + + afterEach(() => { + // Restore original values after each test + Object.entries(originalEnv).forEach(([key, value]) => { + if (value === undefined) { + delete process.env[key] + } else { + process.env[key] = value + } + }) + }) + + it("should restore original environment variables after operation", async () => { + // Set initial environment + process.env.TEST_VAR = "original" + process.env.ANOTHER_VAR = "another" + + // Store original values + const originalTestVar = process.env.TEST_VAR + const originalAnotherVar = process.env.ANOTHER_VAR + + await AwsBedrockHandler["withTempEnv"]( + () => { + process.env.TEST_VAR = "modified" + delete process.env.ANOTHER_VAR + }, + async () => { + // Verify environment is modified + process.env.TEST_VAR!.should.equal("modified") + should.not.exist(process.env.ANOTHER_VAR) + return "test" + }, + ) + + // Verify environment is restored + process.env.TEST_VAR!.should.equal(originalTestVar) + process.env.ANOTHER_VAR!.should.equal(originalAnotherVar) + }) + + it("should handle undefined environment variables", async () => { + await AwsBedrockHandler["withTempEnv"]( + () => { + delete process.env.UNDEFINED_VAR + }, + async () => { + should.not.exist(process.env.UNDEFINED_VAR) + return "test" + }, + ) + + // Verify undefined variable is not present + should.not.exist(process.env.UNDEFINED_VAR) + }) + + it("should handle errors and still restore environment", async () => { + // Set initial environment + process.env.TEST_VAR = "original" + + try { + await AwsBedrockHandler["withTempEnv"]( + () => { + process.env.TEST_VAR = "modified" + }, + async () => { + throw new Error("Test error") + }, + ) + should.fail(null, null, "Expected error was not thrown", "throw") + } catch (error) { + ;(error as Error).message.should.equal("Test error") + } + + // Verify environment is restored even after error + process.env.TEST_VAR!.should.equal("original") + }) + + it("should handle multiple environment variable changes", async () => { + // Set initial environment + process.env.VAR1 = "original1" + process.env.VAR2 = "original2" + process.env.VAR3 = "original3" + + // Store original values + const originalVar1 = process.env.VAR1 + const originalVar2 = process.env.VAR2 + const originalVar3 = process.env.VAR3 + + await AwsBedrockHandler["withTempEnv"]( + () => { + process.env.VAR1 = "modified1" + process.env.VAR2 = "modified2" + delete process.env.VAR3 + }, + async () => { + // Verify environment is modified + process.env.VAR1!.should.equal("modified1") + process.env.VAR2!.should.equal("modified2") + should.not.exist(process.env.VAR3) + return "test" + }, + ) + + // Verify environment is restored + process.env.VAR1!.should.equal(originalVar1) + process.env.VAR2!.should.equal(originalVar2) + process.env.VAR3!.should.equal(originalVar3) + }) + + it("should work with AWS_PROFILE", async () => { + process.env["AWS_PROFILE"] = "test-profile" + + const preAWSProfile = process.env["AWS_PROFILE"] + + await AwsBedrockHandler["withTempEnv"]( + () => { + delete process.env["AWS_PROFILE"] + }, + async () => { + should.not.exist(process.env["AWS_PROFILE"]) + return "test" + }, + ) + + process.env["AWS_PROFILE"]!.should.equal(preAWSProfile) + }) + }) +}) diff --git a/src/api/providers/bedrock.ts b/src/api/providers/bedrock.ts index 57e1b9a7..f6a61c9c 100644 --- a/src/api/providers/bedrock.ts +++ b/src/api/providers/bedrock.ts @@ -62,56 +62,62 @@ export class AwsBedrockHandler implements ApiHandler { // initialization, and allowing for session renewal if necessary as well const client = await this.getAnthropicClient() - // AWS SDK prioritizes AWS_PROFILE over AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair - // If this is set as an env variable already (ie. from ~/.zshrc) it will override credentials configured by Cline - const previousEnv = process.env - delete process.env["AWS_PROFILE"] - const stream = await client.messages.create({ - model: modelId, - max_tokens: model.info.maxTokens || 8192, - thinking: reasoningOn ? { type: "enabled", budget_tokens: budget_tokens } : undefined, - temperature: reasoningOn ? undefined : 0, - system: [ - { - text: systemPrompt, - type: "text", - ...(this.options.awsBedrockUsePromptCache === true && { - cache_control: { type: "ephemeral" }, - }), - }, - ], - messages: messages.map((message, index) => { - if (index === lastUserMsgIndex || index === secondLastMsgUserIndex) { - return { - ...message, - content: - typeof message.content === "string" - ? [ - { - type: "text", - text: message.content, - ...(this.options.awsBedrockUsePromptCache === true && { - cache_control: { type: "ephemeral" }, - }), - }, - ] - : message.content.map((content, contentIndex) => - contentIndex === message.content.length - 1 - ? { - ...content, + // Use withTempEnv to ensure environment variables are properly restored + const stream = await AwsBedrockHandler.withTempEnv( + () => { + // AWS SDK prioritizes AWS_PROFILE over AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair + // If this is set as an env variable already (ie. from ~/.zshrc) it will override credentials configured by Cline + // Temporarily remove AWS_PROFILE to ensure our credentials are used + delete process.env["AWS_PROFILE"] + }, + async () => { + return await client.messages.create({ + model: modelId, + max_tokens: model.info.maxTokens || 8192, + thinking: reasoningOn ? { type: "enabled", budget_tokens: budget_tokens } : undefined, + temperature: reasoningOn ? undefined : 0, + system: [ + { + text: systemPrompt, + type: "text", + ...(this.options.awsBedrockUsePromptCache === true && { + cache_control: { type: "ephemeral" }, + }), + }, + ], + messages: messages.map((message, index) => { + if (index === lastUserMsgIndex || index === secondLastMsgUserIndex) { + return { + ...message, + content: + typeof message.content === "string" + ? [ + { + type: "text", + text: message.content, ...(this.options.awsBedrockUsePromptCache === true && { cache_control: { type: "ephemeral" }, }), - } - : content, - ), - } - } - return message - }), - stream: true, - }) - process.env = previousEnv + }, + ] + : message.content.map((content, contentIndex) => + contentIndex === message.content.length - 1 + ? { + ...content, + ...(this.options.awsBedrockUsePromptCache === true && { + cache_control: { type: "ephemeral" }, + }), + } + : content, + ), + } + } + return message + }), + stream: true, + }) + }, + ) for await (const chunk of stream) { switch (chunk.type) { @@ -301,13 +307,23 @@ export class AwsBedrockHandler implements ApiHandler { } private static async withTempEnv(updateEnv: () => void, fn: () => Promise): Promise { - const previousEnv = { ...process.env } + const previousEnv = Object.assign({}, process.env) try { updateEnv() return await fn() } finally { - process.env = previousEnv + // Restore the previous environment + // First clear any new variables that might have been added + for (const key in process.env) { + if (!(key in previousEnv)) { + delete process.env[key] + } + } + // Then restore all previous values + for (const key in previousEnv) { + process.env[key] = previousEnv[key] + } } } From f3ae1340cf6190627504a27f6e1663ab241b828b Mon Sep 17 00:00:00 2001 From: Toshii <94262432+0xToshii@users.noreply.github.com> Date: Thu, 22 May 2025 15:34:51 -0700 Subject: [PATCH 63/85] global workflows (#3709) * backend global workflows * base * nit * protos * base 2 * ui * Delete proto file * changeset --- .changeset/warm-yaks-lay.md | 5 ++ proto/file.proto | 3 +- .../user-instructions/rule-helpers.ts | 24 +++++-- .../user-instructions/workflows.ts | 21 ++++-- src/core/controller/file/refreshRules.ts | 5 +- src/core/controller/index.ts | 33 +++++++--- src/core/slash-commands/index.ts | 20 ++++-- src/core/storage/disk.ts | 11 ++++ src/core/storage/state-keys.ts | 1 + src/core/storage/state.ts | 3 + src/core/task/index.ts | 5 +- src/shared/ExtensionMessage.ts | 3 +- .../src/components/chat/ChatTextArea.tsx | 25 ++++++-- .../src/components/chat/SlashCommandMenu.tsx | 8 ++- .../cline-rules/ClineRulesToggleModal.tsx | 64 +++++++++++++------ .../src/context/ExtensionStateContext.tsx | 18 ++++-- webview-ui/src/utils/slash-commands.ts | 63 ++++++++++++++---- 17 files changed, 237 insertions(+), 75 deletions(-) create mode 100644 .changeset/warm-yaks-lay.md diff --git a/.changeset/warm-yaks-lay.md b/.changeset/warm-yaks-lay.md new file mode 100644 index 00000000..53db3d09 --- /dev/null +++ b/.changeset/warm-yaks-lay.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +add global workflows diff --git a/proto/file.proto b/proto/file.proto index a6866942..4b09984d 100644 --- a/proto/file.proto +++ b/proto/file.proto @@ -57,7 +57,8 @@ message RefreshedRules { ClineRulesToggles local_cline_rules_toggles = 2; ClineRulesToggles local_cursor_rules_toggles = 3; ClineRulesToggles local_windsurf_rules_toggles = 4; - ClineRulesToggles workflow_toggles = 5; + ClineRulesToggles local_workflow_toggles = 5; + ClineRulesToggles global_workflow_toggles = 6; } // Request to toggle a Windsurf rule diff --git a/src/core/context/instructions/user-instructions/rule-helpers.ts b/src/core/context/instructions/user-instructions/rule-helpers.ts index b25d5156..7005bd20 100644 --- a/src/core/context/instructions/user-instructions/rule-helpers.ts +++ b/src/core/context/instructions/user-instructions/rule-helpers.ts @@ -1,5 +1,5 @@ import { fileExistsAtPath, isDirectory, readDirectory } from "@utils/fs" -import { ensureRulesDirectoryExists, GlobalFileNames } from "@core/storage/disk" +import { ensureRulesDirectoryExists, ensureWorkflowsDirectoryExists, GlobalFileNames } from "@core/storage/disk" import { getGlobalState, getWorkspaceState, updateGlobalState, updateWorkspaceState } from "@core/storage/state" import * as path from "path" import fs from "fs/promises" @@ -172,9 +172,13 @@ export const createRuleFile = async (isGlobal: boolean, filename: string, cwd: s try { let filePath: string if (isGlobal) { - // global means its implicitly clinerules - const globalClineRulesFilePath = await ensureRulesDirectoryExists() - filePath = path.join(globalClineRulesFilePath, filename) + if (type === "workflow") { + const globalClineWorkflowFilePath = await ensureWorkflowsDirectoryExists() + filePath = path.join(globalClineWorkflowFilePath, filename) + } else { + const globalClineRulesFilePath = await ensureRulesDirectoryExists() + filePath = path.join(globalClineRulesFilePath, filename) + } } else { const localClineRulesFilePath = path.resolve(cwd, GlobalFileNames.clineRules) @@ -243,9 +247,15 @@ export async function deleteRuleFile( // Update the appropriate toggles if (isGlobal) { - const toggles = ((await getGlobalState(context, "globalClineRulesToggles")) as ClineRulesToggles) || {} - delete toggles[rulePath] - await updateGlobalState(context, "globalClineRulesToggles", toggles) + if (type === "workflow") { + const toggles = ((await getGlobalState(context, "globalWorkflowToggles")) as ClineRulesToggles) || {} + delete toggles[rulePath] + await updateGlobalState(context, "globalWorkflowToggles", toggles) + } else { + const toggles = ((await getGlobalState(context, "globalClineRulesToggles")) as ClineRulesToggles) || {} + delete toggles[rulePath] + await updateGlobalState(context, "globalClineRulesToggles", toggles) + } } else { if (type === "workflow") { const toggles = ((await getWorkspaceState(context, "workflowToggles")) as ClineRulesToggles) || {} diff --git a/src/core/context/instructions/user-instructions/workflows.ts b/src/core/context/instructions/user-instructions/workflows.ts index 94e4d545..268a5dad 100644 --- a/src/core/context/instructions/user-instructions/workflows.ts +++ b/src/core/context/instructions/user-instructions/workflows.ts @@ -1,7 +1,7 @@ import path from "path" -import { GlobalFileNames } from "@core/storage/disk" +import { GlobalFileNames, ensureWorkflowsDirectoryExists } from "@core/storage/disk" import { ClineRulesToggles } from "@shared/cline-rules" -import { getWorkspaceState, updateWorkspaceState } from "@core/storage/state" +import { getWorkspaceState, updateWorkspaceState, getGlobalState, updateGlobalState } from "@core/storage/state" import * as vscode from "vscode" import { synchronizeRuleToggles } from "@core/context/instructions/user-instructions/rule-helpers" @@ -11,10 +11,23 @@ import { synchronizeRuleToggles } from "@core/context/instructions/user-instruct export async function refreshWorkflowToggles( context: vscode.ExtensionContext, workingDirectory: string, -): Promise { +): Promise<{ + globalWorkflowToggles: ClineRulesToggles + localWorkflowToggles: ClineRulesToggles +}> { + // Global workflows + const globalWorkflowToggles = ((await getGlobalState(context, "globalWorkflowToggles")) as ClineRulesToggles) || {} + const globalClineWorkflowsFilePath = await ensureWorkflowsDirectoryExists() + const updatedGlobalWorkflowToggles = await synchronizeRuleToggles(globalClineWorkflowsFilePath, globalWorkflowToggles) + await updateGlobalState(context, "globalWorkflowToggles", updatedGlobalWorkflowToggles) + const workflowRulesToggles = ((await getWorkspaceState(context, "workflowToggles")) as ClineRulesToggles) || {} const workflowsDirPath = path.resolve(workingDirectory, GlobalFileNames.workflows) const updatedWorkflowToggles = await synchronizeRuleToggles(workflowsDirPath, workflowRulesToggles) await updateWorkspaceState(context, "workflowToggles", updatedWorkflowToggles) - return updatedWorkflowToggles + + return { + globalWorkflowToggles: updatedGlobalWorkflowToggles, + localWorkflowToggles: updatedWorkflowToggles, + } } diff --git a/src/core/controller/file/refreshRules.ts b/src/core/controller/file/refreshRules.ts index 1b897b01..c56c6d38 100644 --- a/src/core/controller/file/refreshRules.ts +++ b/src/core/controller/file/refreshRules.ts @@ -16,14 +16,15 @@ export async function refreshRules(controller: Controller, _request: EmptyReques try { const { globalToggles, localToggles } = await refreshClineRulesToggles(controller.context, cwd) const { cursorLocalToggles, windsurfLocalToggles } = await refreshExternalRulesToggles(controller.context, cwd) - const workflowToggles = await refreshWorkflowToggles(controller.context, cwd) + const { localWorkflowToggles, globalWorkflowToggles } = await refreshWorkflowToggles(controller.context, cwd) return { globalClineRulesToggles: { toggles: globalToggles }, localClineRulesToggles: { toggles: localToggles }, localCursorRulesToggles: { toggles: cursorLocalToggles }, localWindsurfRulesToggles: { toggles: windsurfLocalToggles }, - workflowToggles: { toggles: workflowToggles }, + localWorkflowToggles: { toggles: localWorkflowToggles }, + globalWorkflowToggles: { toggles: globalWorkflowToggles }, } } catch (error) { console.error("Failed to refresh rules:", error) diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 66cbf12b..7ee106d0 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -32,7 +32,12 @@ import { fileExistsAtPath } from "@utils/fs" import { getWorkingState } from "@utils/git" import { extractCommitMessage } from "@integrations/git/commit-message-generator" import { getTotalTasksSize } from "@utils/storage" -import { ensureMcpServersDirectoryExists, ensureSettingsDirectoryExists, GlobalFileNames } from "../storage/disk" +import { + ensureMcpServersDirectoryExists, + ensureSettingsDirectoryExists, + GlobalFileNames, + ensureWorkflowsDirectoryExists, +} from "../storage/disk" import { getAllExtensionState, getGlobalState, @@ -358,12 +363,20 @@ export class Controller { // break // } case "toggleWorkflow": { - const { workflowPath, enabled } = message - if (workflowPath && typeof enabled === "boolean") { - const toggles = ((await getWorkspaceState(this.context, "workflowToggles")) as ClineRulesToggles) || {} - toggles[workflowPath] = enabled - await updateWorkspaceState(this.context, "workflowToggles", toggles) - await this.postStateToWebview() + const { workflowPath, enabled, isGlobal } = message + if (workflowPath && typeof enabled === "boolean" && typeof isGlobal === "boolean") { + if (isGlobal) { + const globalWorkflowToggles = + ((await getGlobalState(this.context, "globalWorkflowToggles")) as ClineRulesToggles) || {} + globalWorkflowToggles[workflowPath] = enabled + await updateGlobalState(this.context, "globalWorkflowToggles", globalWorkflowToggles) + await this.postStateToWebview() + } else { + const toggles = ((await getWorkspaceState(this.context, "workflowToggles")) as ClineRulesToggles) || {} + toggles[workflowPath] = enabled + await updateWorkspaceState(this.context, "workflowToggles", toggles) + await this.postStateToWebview() + } } break } @@ -1236,6 +1249,7 @@ export class Controller { planActSeparateModelsSetting, enableCheckpointsSetting, globalClineRulesToggles, + globalWorkflowToggles, shellIntegrationTimeout, isNewUser, } = await getAllExtensionState(this.context) @@ -1249,7 +1263,7 @@ export class Controller { const localCursorRulesToggles = ((await getWorkspaceState(this.context, "localCursorRulesToggles")) as ClineRulesToggles) || {} - const workflowToggles = ((await getWorkspaceState(this.context, "workflowToggles")) as ClineRulesToggles) || {} + const localWorkflowToggles = ((await getWorkspaceState(this.context, "workflowToggles")) as ClineRulesToggles) || {} return { version: this.context.extension?.packageJSON?.version ?? "", @@ -1278,7 +1292,8 @@ export class Controller { localClineRulesToggles: localClineRulesToggles || {}, localWindsurfRulesToggles: localWindsurfRulesToggles || {}, localCursorRulesToggles: localCursorRulesToggles || {}, - workflowToggles: workflowToggles || {}, + localWorkflowToggles: localWorkflowToggles || {}, + globalWorkflowToggles: globalWorkflowToggles || {}, shellIntegrationTimeout, isNewUser, } diff --git a/src/core/slash-commands/index.ts b/src/core/slash-commands/index.ts index dddc2de5..759a59bd 100644 --- a/src/core/slash-commands/index.ts +++ b/src/core/slash-commands/index.ts @@ -8,7 +8,8 @@ import fs from "fs/promises" */ export async function parseSlashCommands( text: string, - workflowToggles: ClineRulesToggles, + localWorkflowToggles: ClineRulesToggles, + globalWorkflowToggles: ClineRulesToggles, ): Promise<{ processedText: string; needsClinerulesFileCheck: boolean }> { const SUPPORTED_DEFAULT_COMMANDS = ["newtask", "smol", "compact", "newrule", "reportbug"] @@ -58,18 +59,29 @@ export async function parseSlashCommands( return { processedText: processedText, needsClinerulesFileCheck: commandName === "newrule" ? true : false } } - // in practice we want to minimize this work, so we only do it if theres a possible match - const enabledWorkflows = Object.entries(workflowToggles) + const globalWorkflows = Object.entries(globalWorkflowToggles) .filter(([_, enabled]) => enabled) .map(([filePath, _]) => { const fileName = filePath.replace(/^.*[/\\]/, "") - return { fullPath: filePath, fileName: fileName, } }) + const localWorkflows = Object.entries(localWorkflowToggles) + .filter(([_, enabled]) => enabled) + .map(([filePath, _]) => { + const fileName = filePath.replace(/^.*[/\\]/, "") + return { + fullPath: filePath, + fileName: fileName, + } + }) + + // local workflows have precedence over global workflows + const enabledWorkflows = [...localWorkflows, ...globalWorkflows] + // Then check if the command matches any enabled workflow filename const matchingWorkflow = enabledWorkflows.find((workflow) => workflow.fileName === commandName) diff --git a/src/core/storage/disk.ts b/src/core/storage/disk.ts index 78f1b0ec..fdaa7f06 100644 --- a/src/core/storage/disk.ts +++ b/src/core/storage/disk.ts @@ -76,6 +76,17 @@ export async function ensureRulesDirectoryExists(): Promise { return clineRulesDir } +export async function ensureWorkflowsDirectoryExists(): Promise { + const userDocumentsPath = await getDocumentsPath() + const clineWorkflowsDir = path.join(userDocumentsPath, "Cline", "Workflows") + try { + await fs.mkdir(clineWorkflowsDir, { recursive: true }) + } catch (error) { + return path.join(os.homedir(), "Documents", "Cline", "Workflows") // in case creating a directory in documents fails for whatever reason (e.g. permissions) - this is fine because we will fail gracefully with a path that does not exist + } + return clineWorkflowsDir +} + export async function ensureMcpServersDirectoryExists(): Promise { const userDocumentsPath = await getDocumentsPath() const mcpServersDir = path.join(userDocumentsPath, "Cline", "MCP") diff --git a/src/core/storage/state-keys.ts b/src/core/storage/state-keys.ts index 3c73219f..2a45bca9 100644 --- a/src/core/storage/state-keys.ts +++ b/src/core/storage/state-keys.ts @@ -55,6 +55,7 @@ export type GlobalStateKey = | "openRouterProviderSorting" | "autoApprovalSettings" | "globalClineRulesToggles" + | "globalWorkflowToggles" | "browserSettings" | "chatSettings" | "vsCodeLmModelSelector" diff --git a/src/core/storage/state.ts b/src/core/storage/state.ts index 795f1799..cb386266 100644 --- a/src/core/storage/state.ts +++ b/src/core/storage/state.ts @@ -163,6 +163,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { shellIntegrationTimeout, enableCheckpointsSettingRaw, mcpMarketplaceEnabledRaw, + globalWorkflowToggles, ] = await Promise.all([ getGlobalState(context, "isNewUser") as Promise, getGlobalState(context, "apiProvider") as Promise, @@ -251,6 +252,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { getGlobalState(context, "shellIntegrationTimeout") as Promise, getGlobalState(context, "enableCheckpointsSetting") as Promise, getGlobalState(context, "mcpMarketplaceEnabled") as Promise, + getGlobalState(context, "globalWorkflowToggles") as Promise, fetch, ]) @@ -385,6 +387,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { planActSeparateModelsSetting, enableCheckpointsSetting: enableCheckpointsSetting, shellIntegrationTimeout: shellIntegrationTimeout || 4000, + globalWorkflowToggles: globalWorkflowToggles || {}, } } diff --git a/src/core/task/index.ts b/src/core/task/index.ts index 2df6b91b..eb49f9bf 100644 --- a/src/core/task/index.ts +++ b/src/core/task/index.ts @@ -4117,7 +4117,7 @@ export class Task { // Track if we need to check clinerulesFile let needsClinerulesFileCheck = false - const workflowToggles = await refreshWorkflowToggles(this.getContext(), cwd) + const { localWorkflowToggles, globalWorkflowToggles } = await refreshWorkflowToggles(this.getContext(), cwd) const processUserContent = async () => { // This is a temporary solution to dynamically load context mentions from tool results. It checks for the presence of tags that indicate that the tool was rejected and feedback was provided (see formatToolDeniedFeedback, attemptCompletion, executeCommand, and consecutiveMistakeCount >= 3) or "" (see askFollowupQuestion), we place all user generated content in these tags so they can effectively be used as markers for when we should parse mentions). However if we allow multiple tools responses in the future, we will need to parse mentions specifically within the user content tags. @@ -4143,7 +4143,8 @@ export class Task { // when parsing slash commands, we still want to allow the user to provide their desired context const { processedText, needsClinerulesFileCheck: needsCheck } = await parseSlashCommands( parsedText, - workflowToggles, + localWorkflowToggles, + globalWorkflowToggles, ) if (needsCheck) { diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index 3bf5cac9..48a4b631 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -140,7 +140,8 @@ export interface ExtensionState { vscMachineId: string globalClineRulesToggles: ClineRulesToggles localClineRulesToggles: ClineRulesToggles - workflowToggles: ClineRulesToggles + localWorkflowToggles: ClineRulesToggles + globalWorkflowToggles: ClineRulesToggles localCursorRulesToggles: ClineRulesToggles localWindsurfRulesToggles: ClineRulesToggles } diff --git a/webview-ui/src/components/chat/ChatTextArea.tsx b/webview-ui/src/components/chat/ChatTextArea.tsx index 10abcc95..8f0fc0c0 100644 --- a/webview-ui/src/components/chat/ChatTextArea.tsx +++ b/webview-ui/src/components/chat/ChatTextArea.tsx @@ -260,7 +260,15 @@ const ChatTextArea = forwardRef( }, ref, ) => { - const { filePaths, chatSettings, apiConfiguration, openRouterModels, platform, workflowToggles } = useExtensionState() + const { + filePaths, + chatSettings, + apiConfiguration, + openRouterModels, + platform, + localWorkflowToggles, + globalWorkflowToggles, + } = useExtensionState() const [isTextAreaFocused, setIsTextAreaFocused] = useState(false) const [isDraggingOver, setIsDraggingOver] = useState(false) const [gitCommits, setGitCommits] = useState([]) @@ -484,7 +492,11 @@ const ChatTextArea = forwardRef( setSelectedSlashCommandsIndex((prevIndex) => { const direction = event.key === "ArrowUp" ? -1 : 1 // Get commands with workflow toggles - const allCommands = getMatchingSlashCommands(slashCommandsQuery, workflowToggles) + const allCommands = getMatchingSlashCommands( + slashCommandsQuery, + localWorkflowToggles, + globalWorkflowToggles, + ) if (allCommands.length === 0) { return prevIndex @@ -502,7 +514,7 @@ const ChatTextArea = forwardRef( if ((event.key === "Enter" || event.key === "Tab") && selectedSlashCommandsIndex !== -1) { event.preventDefault() - const commands = getMatchingSlashCommands(slashCommandsQuery, workflowToggles) + const commands = getMatchingSlashCommands(slashCommandsQuery, localWorkflowToggles, globalWorkflowToggles) if (commands.length > 0) { handleSlashCommandsSelect(commands[selectedSlashCommandsIndex]) } @@ -905,7 +917,7 @@ const ChatTextArea = forwardRef( // extract and validate the exact command text const commandText = processedText.substring(slashIndex + 1, endIndex) - const isValidCommand = validateSlashCommand(commandText, workflowToggles) + const isValidCommand = validateSlashCommand(commandText, localWorkflowToggles, globalWorkflowToggles) if (isValidCommand) { const fullCommand = processedText.substring(slashIndex, endIndex) // includes slash @@ -918,7 +930,7 @@ const ChatTextArea = forwardRef( highlightLayerRef.current.innerHTML = processedText highlightLayerRef.current.scrollTop = textAreaRef.current.scrollTop highlightLayerRef.current.scrollLeft = textAreaRef.current.scrollLeft - }, [workflowToggles]) + }, [localWorkflowToggles, globalWorkflowToggles]) useLayoutEffect(() => { updateHighlights() @@ -1400,7 +1412,8 @@ const ChatTextArea = forwardRef( setSelectedIndex={setSelectedSlashCommandsIndex} onMouseDown={handleMenuMouseDown} query={slashCommandsQuery} - workflowToggles={workflowToggles} + localWorkflowToggles={localWorkflowToggles} + globalWorkflowToggles={globalWorkflowToggles} /> )} diff --git a/webview-ui/src/components/chat/SlashCommandMenu.tsx b/webview-ui/src/components/chat/SlashCommandMenu.tsx index e5c18ecd..5f366b8f 100644 --- a/webview-ui/src/components/chat/SlashCommandMenu.tsx +++ b/webview-ui/src/components/chat/SlashCommandMenu.tsx @@ -7,7 +7,8 @@ interface SlashCommandMenuProps { setSelectedIndex: (index: number) => void onMouseDown: () => void query: string - workflowToggles?: Record + localWorkflowToggles?: Record + globalWorkflowToggles?: Record } const SlashCommandMenu: React.FC = ({ @@ -16,7 +17,8 @@ const SlashCommandMenu: React.FC = ({ setSelectedIndex, onMouseDown, query, - workflowToggles = {}, + localWorkflowToggles = {}, + globalWorkflowToggles = {}, }) => { const menuRef = useRef(null) @@ -44,7 +46,7 @@ const SlashCommandMenu: React.FC = ({ }, [selectedIndex]) // Filter commands based on query - const filteredCommands = getMatchingSlashCommands(query, workflowToggles) + const filteredCommands = getMatchingSlashCommands(query, localWorkflowToggles, globalWorkflowToggles) const defaultCommands = filteredCommands.filter((cmd) => cmd.section === "default" || !cmd.section) const workflowCommands = filteredCommands.filter((cmd) => cmd.section === "custom") diff --git a/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx b/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx index e0dbd4be..35ee1517 100644 --- a/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx +++ b/webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx @@ -17,12 +17,14 @@ const ClineRulesToggleModal: React.FC = () => { localClineRulesToggles = {}, localCursorRulesToggles = {}, localWindsurfRulesToggles = {}, - workflowToggles = {}, + localWorkflowToggles = {}, + globalWorkflowToggles = {}, setGlobalClineRulesToggles, setLocalClineRulesToggles, setLocalCursorRulesToggles, setLocalWindsurfRulesToggles, - setWorkflowToggles, + setLocalWorkflowToggles, + setGlobalWorkflowToggles, } = useExtensionState() const [isVisible, setIsVisible] = useState(false) const buttonRef = useRef(null) @@ -49,8 +51,11 @@ const ClineRulesToggleModal: React.FC = () => { if (response.localWindsurfRulesToggles?.toggles) { setLocalWindsurfRulesToggles(response.localWindsurfRulesToggles.toggles) } - if (response.workflowToggles?.toggles) { - setWorkflowToggles(response.workflowToggles.toggles) + if (response.localWorkflowToggles?.toggles) { + setLocalWorkflowToggles(response.localWorkflowToggles.toggles) + } + if (response.globalWorkflowToggles?.toggles) { + setGlobalWorkflowToggles(response.globalWorkflowToggles.toggles) } }) .catch((error) => { @@ -77,7 +82,11 @@ const ClineRulesToggleModal: React.FC = () => { .map(([path, enabled]): [string, boolean] => [path, enabled as boolean]) .sort(([a], [b]) => a.localeCompare(b)) - const workflows = Object.entries(workflowToggles || {}) + const localWorkflows = Object.entries(localWorkflowToggles || {}) + .map(([path, enabled]): [string, boolean] => [path, enabled as boolean]) + .sort(([a], [b]) => a.localeCompare(b)) + + const globalWorkflows = Object.entries(globalWorkflowToggles || {}) .map(([path, enabled]): [string, boolean] => [path, enabled as boolean]) .sort(([a], [b]) => a.localeCompare(b)) @@ -133,11 +142,12 @@ const ClineRulesToggleModal: React.FC = () => { }) } - const toggleWorkflow = (workflowPath: string, enabled: boolean) => { + const toggleWorkflow = (isGlobal: boolean, workflowPath: string, enabled: boolean) => { vscode.postMessage({ type: "toggleWorkflow", workflowPath, enabled, + isGlobal, }) } @@ -299,19 +309,35 @@ const ClineRulesToggleModal: React.FC = () => { ) : ( - /* Workflows section */ -
-
Workspace Workflows
- -
+ <> + {/* Global Workflows Section */} +
+
Global Workflows
+ toggleWorkflow(true, rulePath, enabled)} + listGap="small" + isGlobal={true} + ruleType={"workflow"} + showNewRule={true} + showNoRules={false} + /> +
+ + {/* Local Workflows Section */} +
+
Workspace Workflows
+ toggleWorkflow(false, rulePath, enabled)} + listGap="small" + isGlobal={false} + ruleType={"workflow"} + showNewRule={true} + showNoRules={false} + /> +
+ )} )} diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index d8455df2..6433c99b 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -56,7 +56,8 @@ interface ExtensionStateContextType extends ExtensionState { setLocalClineRulesToggles: (toggles: Record) => void setLocalCursorRulesToggles: (toggles: Record) => void setLocalWindsurfRulesToggles: (toggles: Record) => void - setWorkflowToggles: (toggles: Record) => void + setLocalWorkflowToggles: (toggles: Record) => void + setGlobalWorkflowToggles: (toggles: Record) => void setMcpMarketplaceCatalog: (value: McpMarketplaceCatalog) => void // Navigation state setters @@ -162,7 +163,8 @@ export const ExtensionStateContextProvider: React.FC<{ localClineRulesToggles: {}, localCursorRulesToggles: {}, localWindsurfRulesToggles: {}, - workflowToggles: {}, + localWorkflowToggles: {}, + globalWorkflowToggles: {}, shellIntegrationTimeout: 4000, // default timeout for shell integration isNewUser: false, }) @@ -448,7 +450,8 @@ export const ExtensionStateContextProvider: React.FC<{ localClineRulesToggles: state.localClineRulesToggles || {}, localCursorRulesToggles: state.localCursorRulesToggles || {}, localWindsurfRulesToggles: state.localWindsurfRulesToggles || {}, - workflowToggles: state.workflowToggles || {}, + localWorkflowToggles: state.localWorkflowToggles || {}, + globalWorkflowToggles: state.globalWorkflowToggles || {}, enableCheckpointsSetting: state.enableCheckpointsSetting, // Navigation functions @@ -544,10 +547,15 @@ export const ExtensionStateContextProvider: React.FC<{ ...prevState, localWindsurfRulesToggles: toggles, })), - setWorkflowToggles: (toggles) => + setLocalWorkflowToggles: (toggles) => setState((prevState) => ({ ...prevState, - workflowToggles: toggles, + localWorkflowToggles: toggles, + })), + setGlobalWorkflowToggles: (toggles) => + setState((prevState) => ({ + ...prevState, + globalWorkflowToggles: toggles, })), setMcpTab, } diff --git a/webview-ui/src/utils/slash-commands.ts b/webview-ui/src/utils/slash-commands.ts index 7cd94a72..a7f155a0 100644 --- a/webview-ui/src/utils/slash-commands.ts +++ b/webview-ui/src/utils/slash-commands.ts @@ -27,19 +27,50 @@ export const DEFAULT_SLASH_COMMANDS: SlashCommand[] = [ }, ] -export function getWorkflowCommands(workflowToggles: Record): SlashCommand[] { - return Object.entries(workflowToggles) +export function getWorkflowCommands( + localWorkflowToggles: Record, + globalWorkflowToggles: Record, +): SlashCommand[] { + const { workflows: localWorkflows, nameSet: localWorkflowNames } = Object.entries(localWorkflowToggles) .filter(([_, enabled]) => enabled) - .map(([filePath, _]) => { - // potentially remove the file extension if there is one, but this would then require - // that we prevent users from having the same fname with different extensions + .reduce( + (acc, [filePath, _]) => { + const fileName = filePath.replace(/^.*[/\\]/, "") + + // Add to array of workflows + acc.workflows.push({ + name: fileName, + section: "custom", + } as SlashCommand) + + // Add to set of names + acc.nameSet.add(fileName) + + return acc + }, + { workflows: [] as SlashCommand[], nameSet: new Set() }, + ) + + const globalWorkflows = Object.entries(globalWorkflowToggles) + .filter(([_, enabled]) => enabled) + .flatMap(([filePath, _]) => { const fileName = filePath.replace(/^.*[/\\]/, "") - return { - name: fileName, - section: "custom", + // skip if a local workflow with the same name exists + if (localWorkflowNames.has(fileName)) { + return [] } + + return [ + { + name: fileName, + section: "custom", + }, + ] as SlashCommand[] }) + + const workflows = [...localWorkflows, ...globalWorkflows] + return workflows } // Regex for detecting slash commands in text @@ -102,8 +133,12 @@ export function shouldShowSlashCommandsMenu(text: string, cursorPosition: number /** * Gets filtered slash commands that match the current input */ -export function getMatchingSlashCommands(query: string, workflowToggles: Record = {}): SlashCommand[] { - const workflowCommands = getWorkflowCommands(workflowToggles) +export function getMatchingSlashCommands( + query: string, + localWorkflowToggles: Record = {}, + globalWorkflowToggles: Record = {}, +): SlashCommand[] { + const workflowCommands = getWorkflowCommands(localWorkflowToggles, globalWorkflowToggles) const allCommands = [...DEFAULT_SLASH_COMMANDS, ...workflowCommands] if (!query) { @@ -134,12 +169,16 @@ export function insertSlashCommand(text: string, commandName: string): { newValu * Determines the validation state of a slash command * Returns partial if we have a partial match against valid commands, or full for full match */ -export function validateSlashCommand(command: string, workflowToggles: Record = {}): "full" | "partial" | null { +export function validateSlashCommand( + command: string, + localWorkflowToggles: Record = {}, + globalWorkflowToggles: Record = {}, +): "full" | "partial" | null { if (!command) { return null } - const workflowCommands = getWorkflowCommands(workflowToggles) + const workflowCommands = getWorkflowCommands(localWorkflowToggles, globalWorkflowToggles) const allCommands = [...DEFAULT_SLASH_COMMANDS, ...workflowCommands] // case sensitive matching From cdf368c21c2a1960cd8cfec60e7ac3394367ffaa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 15:43:07 -0700 Subject: [PATCH 64/85] v3.17.2 Release Notes v3.17.2 Release Notes --- .changeset/sour-boxes-hang.md | 5 ----- .changeset/warm-yaks-lay.md | 5 ----- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 10 insertions(+), 13 deletions(-) delete mode 100644 .changeset/sour-boxes-hang.md delete mode 100644 .changeset/warm-yaks-lay.md diff --git a/.changeset/sour-boxes-hang.md b/.changeset/sour-boxes-hang.md deleted file mode 100644 index 9e705084..00000000 --- a/.changeset/sour-boxes-hang.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Fix issue with process.env for bedrock diff --git a/.changeset/warm-yaks-lay.md b/.changeset/warm-yaks-lay.md deleted file mode 100644 index 53db3d09..00000000 --- a/.changeset/warm-yaks-lay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -add global workflows diff --git a/CHANGELOG.md b/CHANGELOG.md index af812140..e9df11a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.17.2] + +- Add support for Claude 4 models (Sonnet 4 and Opus 4) in AWS Bedrock and Vertex AI providers +- Add support for global workflows, allowing workflows to be shared across workspaces with local workflows taking precedence +- Fix settings page z-index UI issues that caused display problems +- Fix AWS Bedrock environment variable handling to properly restore process.env after API calls (Thanks @DaveFres!) + ## [3.17.1] - Add prompt caching for Claude 4 models on Cline and OpenRouter providers diff --git a/package-lock.json b/package-lock.json index 432257ec..2486685d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "claude-dev", - "version": "3.17.1", + "version": "3.17.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "claude-dev", - "version": "3.17.1", + "version": "3.17.2", "license": "Apache-2.0", "dependencies": { "@anthropic-ai/bedrock-sdk": "^0.12.4", diff --git a/package.json b/package.json index 46e8e502..58e61ee8 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "claude-dev", "displayName": "Cline", "description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.", - "version": "3.17.1", + "version": "3.17.2", "icon": "assets/icons/icon.png", "engines": { "vscode": "^1.84.0" From 14a0c605508112883dfe6d68f3aacd350e28859b Mon Sep 17 00:00:00 2001 From: limitx0 <38377176+limitx0@users.noreply.github.com> Date: Fri, 23 May 2025 06:53:15 +0800 Subject: [PATCH 65/85] Fix the Syntax in zh-tw/README.md to Improve Text Rendering (#3724) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update zh-tw/README.md Correct the Markdown syntax to properly display bold text. * Update zh-tw/README.md Insert line breaks for each item listed under ### 新增上下文. --- locales/zh-tw/README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/locales/zh-tw/README.md b/locales/zh-tw/README.md index 3fb2f4a0..cfd7490b 100644 --- a/locales/zh-tw/README.md +++ b/locales/zh-tw/README.md @@ -108,10 +108,13 @@ Cline 可以直接在您的編輯器中建立和編輯檔案,並顯示變更 ### 新增上下文 -**`@url`:**貼上網址讓擴充套件擷取並轉換為 Markdown,當您想給 Cline 最新文件時很有用 -**`@problems`:**新增工作區的錯誤和警告(「問題」面板)給 Cline 修正 -**`@file`:**新增檔案內容,讓您不必浪費 API 請求來核准讀取檔案(+ 輸入以搜尋檔案) -**`@folder`:**一次新增整個資料夾的檔案,讓您的工作流程更快速 +**`@url`**:貼上網址讓擴充套件擷取並轉換為 Markdown,當您想給 Cline 最新文件時很有用 + +**`@problems`**:新增工作區的錯誤和警告(「問題」面板)給 Cline 修正 + +**`@file`**:新增檔案內容,讓您不必浪費 API 請求來核准讀取檔案(+ 輸入以搜尋檔案) + +**`@folder`**:一次新增整個資料夾的檔案,讓您的工作流程更快速
From 2cedcc5a58ab8cf5658a04abf2b351c6e58cd99f Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Thu, 22 May 2025 23:18:08 +0000 Subject: [PATCH 66/85] Add vscode CSS properties to the script get-vscode-usages.sh (#3752) The script will report which vscode CSS vars are being used in the webview, as well the uses of the vscode SDK. --- scripts/get-vscode-usages.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/get-vscode-usages.sh b/scripts/get-vscode-usages.sh index 02c2d120..79b40cb6 100755 --- a/scripts/get-vscode-usages.sh +++ b/scripts/get-vscode-usages.sh @@ -3,7 +3,8 @@ set -eu DIR=${1:-src/} DEST_DIR=dist-standalone -DEST=dist-standalone/vscode-uses.txt +SDK_DEST=$DEST_DIR/vscode-sdk-uses.txt +CSS_DEST=$DEST_DIR/vscode-css-uses.txt mkdir -p $DEST_DIR { @@ -11,8 +12,16 @@ git grep -h 'vscode\.' $DIR | grep -Ev '//.*vscode' | # remove commented out code sed 's|.*vscode\.|vscode.|'| # remove everything before vscode. sed 's/[^a-zA-Z0-9_.].*$//' | # remove everything after last identifier -sort | uniq > $DEST +sort | uniq > $SDK_DEST } +echo Wrote uses of the vscode SDK to $(realpath $SDK_DEST) -echo Done, wrote uses of the vscode SDK to $(realpath $DEST) +{ +grep -rh -- --vscode- webview-ui/build/ | +sed 's/--vscode/\n--vscode/g' | # One var per line +grep -- --vscode | # Remove lines that don't have vars. +sed 's/[),"\\].*$//' | # remove from the end of the var name to the end of the line. +sort | uniq > $CSS_DEST +} +echo Wrote vscode vars used to $(realpath $CSS_DEST) From 45974ac9258be5e23bf43c6c512bfef6b3b63dcb Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Thu, 22 May 2025 19:26:07 -0700 Subject: [PATCH 67/85] fix: replace_in_file tool consistently failing with Claude 4 Sonnet due to a few specific quirks (#3757) --- src/core/prompts/system.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/prompts/system.ts b/src/core/prompts/system.ts index 3ba3b736..3243367e 100644 --- a/src/core/prompts/system.ts +++ b/src/core/prompts/system.ts @@ -604,6 +604,7 @@ RULES - Before executing commands, check the "Actively Running Terminals" section in environment_details. If present, consider how these active processes might impact your task. For example, if a local development server is already running, you wouldn't need to start it again. If no active terminals are listed, proceed with command execution as normal. - When using the replace_in_file tool, you must include complete lines in your SEARCH blocks, not partial lines. The system requires exact line matches and cannot match partial lines. For example, if you want to match a line containing "const x = 5;", your SEARCH block must include the entire line, not just "x = 5" or other fragments. - When using the replace_in_file tool, if you use multiple SEARCH/REPLACE blocks, list them in the order they appear in the file. For example if you need to make changes to both line 10 and line 50, first include the SEARCH/REPLACE block for line 10, followed by the SEARCH/REPLACE block for line 50. +- When using the replace_in_file tool, Do NOT add extra characters to the markers (e.g., <<<<<<< SEARCH> is INVALID). Do NOT forget to use the closing >>>>>>> REPLACE marker. Do NOT modify the marker format in any way. Malformed XML will cause complete tool failure and break the entire editing process. - It is critical you wait for the user's response after each tool use, in order to confirm the success of the tool use. For example, if asked to make a todo app, you would create a file, wait for the user's response it was created successfully, then create another file if needed, wait for the user's response it was created successfully, etc.${ supportsBrowserUse ? " Then if you want to test your work, you might use browser_action to launch the site, wait for the user's response confirming the site was launched along with a screenshot, then perhaps e.g., click a button to test functionality if needed, wait for the user's response confirming the button was clicked along with a screenshot of the new state, before finally closing the browser." From 9b248ad6c2e912d7f5cc3838d51c62b42dded001 Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Thu, 22 May 2025 19:29:54 -0700 Subject: [PATCH 68/85] Update package version (#3758) * Update package version * Create sour-lies-hear.md --- .changeset/sour-lies-hear.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/sour-lies-hear.md diff --git a/.changeset/sour-lies-hear.md b/.changeset/sour-lies-hear.md new file mode 100644 index 00000000..11081dd4 --- /dev/null +++ b/.changeset/sour-lies-hear.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Update package version diff --git a/package.json b/package.json index 58e61ee8..df76c74d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "claude-dev", "displayName": "Cline", "description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.", - "version": "3.17.2", + "version": "3.17.3", "icon": "assets/icons/icon.png", "engines": { "vscode": "^1.84.0" From 67f4caf2fef6bf7fc266fffaa10deeac2e2d2efa Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Thu, 22 May 2025 19:34:12 -0700 Subject: [PATCH 69/85] Revert package version to 3.17.2 in package.json (#3760) * Revert package version to 3.17.2 in package.json * Create red-pears-do.md --- .changeset/red-pears-do.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/red-pears-do.md diff --git a/.changeset/red-pears-do.md b/.changeset/red-pears-do.md new file mode 100644 index 00000000..20dcb6ff --- /dev/null +++ b/.changeset/red-pears-do.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Revert package version to 3.17.2 in package.json diff --git a/package.json b/package.json index df76c74d..58e61ee8 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "claude-dev", "displayName": "Cline", "description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.", - "version": "3.17.3", + "version": "3.17.2", "icon": "assets/icons/icon.png", "engines": { "vscode": "^1.84.0" From 2d390b56f611de7087ea972caebc3507b2b7e73a Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Thu, 22 May 2025 19:44:16 -0700 Subject: [PATCH 70/85] v3.17.3 Release Notes (#3761) * changeset version bump * Updating CHANGELOG.md format --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions --- .changeset/red-pears-do.md | 5 ----- .changeset/sour-lies-hear.md | 5 ----- CHANGELOG.md | 4 ++++ package.json | 2 +- 4 files changed, 5 insertions(+), 11 deletions(-) delete mode 100644 .changeset/red-pears-do.md delete mode 100644 .changeset/sour-lies-hear.md diff --git a/.changeset/red-pears-do.md b/.changeset/red-pears-do.md deleted file mode 100644 index 20dcb6ff..00000000 --- a/.changeset/red-pears-do.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Revert package version to 3.17.2 in package.json diff --git a/.changeset/sour-lies-hear.md b/.changeset/sour-lies-hear.md deleted file mode 100644 index 11081dd4..00000000 --- a/.changeset/sour-lies-hear.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Update package version diff --git a/CHANGELOG.md b/CHANGELOG.md index e9df11a5..93c22f4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [3.17.3] + +- Fix diff edit errors with Claude 4 models + ## [3.17.2] - Add support for Claude 4 models (Sonnet 4 and Opus 4) in AWS Bedrock and Vertex AI providers diff --git a/package.json b/package.json index 58e61ee8..df76c74d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "claude-dev", "displayName": "Cline", "description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.", - "version": "3.17.2", + "version": "3.17.3", "icon": "assets/icons/icon.png", "engines": { "vscode": "^1.84.0" From 7f3eb926ee078baee3588ddc722bcd0fcbadf8aa Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Thu, 22 May 2025 20:08:42 -0700 Subject: [PATCH 71/85] Thinking budget slider rendering (#3762) * render thinking budget slider * changeset --------- Co-authored-by: Elephant Lumps --- .changeset/gentle-stingrays-hope.md | 5 ++++ .../src/components/settings/ApiOptions.tsx | 29 +++++++++++-------- 2 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 .changeset/gentle-stingrays-hope.md diff --git a/.changeset/gentle-stingrays-hope.md b/.changeset/gentle-stingrays-hope.md new file mode 100644 index 00000000..9371b3e5 --- /dev/null +++ b/.changeset/gentle-stingrays-hope.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Fix thinking budget slider rendering diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx index b0890550..a41a90b2 100644 --- a/webview-ui/src/components/settings/ApiOptions.tsx +++ b/webview-ui/src/components/settings/ApiOptions.tsx @@ -2133,19 +2133,25 @@ const ApiOptions = ({ {selectedProvider === "nebius" && createDropdown(nebiusModels)} - {(selectedProvider === "anthropic" && + {selectedProvider === "anthropic" && (selectedModelId === "claude-3-7-sonnet-20250219" || selectedModelId === "claude-sonnet-4-20250514" || - selectedModelId === "claude-opus-4-20250514")) || - (selectedProvider === "vertex" && - (selectedModelId === "claude-3-7-sonnet@20250219" || - selectedModelId === "claude-sonnet-4@20250514" || - selectedModelId === "claude-opus-4@20250514") && ( - - ))} + selectedModelId === "claude-opus-4-20250514") && ( + + )} + + {selectedProvider === "vertex" && + (selectedModelId === "claude-3-7-sonnet@20250219" || + selectedModelId === "claude-sonnet-4@20250514" || + selectedModelId === "claude-opus-4@20250514") && ( + + )} {selectedProvider === "xai" && selectedModelId.includes("3-mini") && ( <> @@ -2198,7 +2204,6 @@ const ApiOptions = ({ )} )} - Date: Thu, 22 May 2025 20:11:20 -0700 Subject: [PATCH 72/85] Changeset version bump (#3763) * changeset version bump * Updating CHANGELOG.md format * Update CHANGELOG.md --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> --- .changeset/gentle-stingrays-hope.md | 5 ----- CHANGELOG.md | 4 ++++ package.json | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 .changeset/gentle-stingrays-hope.md diff --git a/.changeset/gentle-stingrays-hope.md b/.changeset/gentle-stingrays-hope.md deleted file mode 100644 index 9371b3e5..00000000 --- a/.changeset/gentle-stingrays-hope.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Fix thinking budget slider rendering diff --git a/CHANGELOG.md b/CHANGELOG.md index 93c22f4f..6fde7b24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [3.17.4] + +- Fix thinking budget slider for Claude 4 + ## [3.17.3] - Fix diff edit errors with Claude 4 models diff --git a/package.json b/package.json index df76c74d..6d18967a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "claude-dev", "displayName": "Cline", "description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.", - "version": "3.17.3", + "version": "3.17.4", "icon": "assets/icons/icon.png", "engines": { "vscode": "^1.84.0" From f2ffe26aaf8f36f9ed901651e6a13b59258de9ed Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Fri, 23 May 2025 09:46:04 -0700 Subject: [PATCH 73/85] fix: add instruction to use valid SEARCH/REPLACE markers when diff edit fails (#3776) * fix: add instruction to use valid SEARCH/REPLACE markers when diff edit fails * Create proud-trains-give.md --- .changeset/proud-trains-give.md | 5 +++++ src/core/prompts/responses.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/proud-trains-give.md diff --git a/.changeset/proud-trains-give.md b/.changeset/proud-trains-give.md new file mode 100644 index 00000000..282f335d --- /dev/null +++ b/.changeset/proud-trains-give.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +fix: add instruction to use valid SEARCH/REPLACE markers when diff edit fails diff --git a/src/core/prompts/responses.ts b/src/core/prompts/responses.ts index 429034d7..afdb9a73 100644 --- a/src/core/prompts/responses.ts +++ b/src/core/prompts/responses.ts @@ -196,7 +196,7 @@ Otherwise, if you have not completed the task and do not need additional informa `${newProblemsMessage}`, diffError: (relPath: string, originalContent: string | undefined) => - `This is likely because the SEARCH block content doesn't match exactly with what's in the file, or if you used multiple SEARCH/REPLACE blocks they may not have been in the order they appear in the file.\n\n` + + `This is likely because the SEARCH block content doesn't match exactly with what's in the file, or if you used multiple SEARCH/REPLACE blocks they may not have been in the order they appear in the file. (Please also ensure that when using the replace_in_file tool, Do NOT add extra characters to the markers (e.g., <<<<<<< SEARCH> is INVALID). Do NOT forget to use the closing >>>>>>> REPLACE marker. Do NOT modify the marker format in any way. Malformed XML will cause complete tool failure and break the entire editing process.)\n\n` + `The file was reverted to its original state:\n\n` + `\n${originalContent}\n\n\n` + `Now that you have the latest state of the file, try the operation again with fewer, more precise SEARCH blocks. For large files especially, it may be prudent to try to limit yourself to <5 SEARCH/REPLACE blocks at a time, then wait for the user to respond with the result of the operation before following up with another replace_in_file call to make additional edits.\n(If you run into this error 3 times in a row, you may use the write_to_file tool as a fallback.)`, From b9551c960aafc9d30e80eb40506d89a2923f3764 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 23 May 2025 09:50:58 -0700 Subject: [PATCH 74/85] v3.17.5 Release Notes (#3777) * changeset version bump * Updating CHANGELOG.md format * Update CHANGELOG.md --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> --- .changeset/proud-trains-give.md | 5 ----- CHANGELOG.md | 4 ++++ package.json | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 .changeset/proud-trains-give.md diff --git a/.changeset/proud-trains-give.md b/.changeset/proud-trains-give.md deleted file mode 100644 index 282f335d..00000000 --- a/.changeset/proud-trains-give.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -fix: add instruction to use valid SEARCH/REPLACE markers when diff edit fails diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fde7b24..50e55caf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [3.17.5] + +- Fix issue with Claude 4 models where after several conversation turns, it would start making invalid diff edits + ## [3.17.4] - Fix thinking budget slider for Claude 4 diff --git a/package.json b/package.json index 6d18967a..a8d4059c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "claude-dev", "displayName": "Cline", "description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.", - "version": "3.17.4", + "version": "3.17.5", "icon": "assets/icons/icon.png", "engines": { "vscode": "^1.84.0" From cf0af8a3f0ee0c68db51e29d832efa42f0cbd74c Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Fri, 23 May 2025 14:46:53 -0700 Subject: [PATCH 75/85] Migrate openMcpSettings protobus (#3778) * migrate openMcpSettings * changeset --------- Co-authored-by: Elephant Lumps --- .changeset/popular-wombats-tap.md | 5 +++++ proto/mcp.proto | 1 + src/core/controller/index.ts | 7 ------- src/core/controller/mcp/openMcpSettings.ts | 17 +++++++++++++++++ src/shared/WebviewMessage.ts | 1 - .../tabs/add-server/AddLocalServerForm.tsx | 6 ++++-- .../tabs/add-server/AddRemoteServerForm.tsx | 5 +++-- .../tabs/installed/InstalledServersView.tsx | 7 ++++--- 8 files changed, 34 insertions(+), 15 deletions(-) create mode 100644 .changeset/popular-wombats-tap.md create mode 100644 src/core/controller/mcp/openMcpSettings.ts diff --git a/.changeset/popular-wombats-tap.md b/.changeset/popular-wombats-tap.md new file mode 100644 index 00000000..d4eac451 --- /dev/null +++ b/.changeset/popular-wombats-tap.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Migrate openMcpSettings to protobus diff --git a/proto/mcp.proto b/proto/mcp.proto index 6b87bb69..4417695d 100644 --- a/proto/mcp.proto +++ b/proto/mcp.proto @@ -15,6 +15,7 @@ service McpService { rpc deleteMcpServer(StringRequest) returns (McpServers); rpc toggleToolAutoApprove(ToggleToolAutoApproveRequest) returns (McpServers); rpc refreshMcpMarketplace(EmptyRequest) returns (McpMarketplaceCatalog); + rpc openMcpSettings(EmptyRequest) returns (Empty); } message ToggleMcpServerRequest { diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 7ee106d0..00619f7a 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -316,13 +316,6 @@ export class Controller { await this.fetchUserCreditsData() break } - case "openMcpSettings": { - const mcpSettingsFilePath = await this.mcpHub?.getMcpSettingsFilePath() - if (mcpSettingsFilePath) { - await handleFileServiceRequest(this, "openFile", { value: mcpSettingsFilePath }) - } - break - } case "fetchMcpMarketplace": { await this.fetchMcpMarketplace(message.bool) break diff --git a/src/core/controller/mcp/openMcpSettings.ts b/src/core/controller/mcp/openMcpSettings.ts new file mode 100644 index 00000000..9261030f --- /dev/null +++ b/src/core/controller/mcp/openMcpSettings.ts @@ -0,0 +1,17 @@ +import { Controller } from ".." +import { Empty, EmptyRequest } from "@shared/proto/common" +import { openFile as openFileIntegration } from "@integrations/misc/open-file" + +/** + * Opens the MCP settings file in the editor + * @param controller The controller instance + * @param _request Empty request + * @returns Empty response + */ +export async function openMcpSettings(controller: Controller, _request: EmptyRequest): Promise { + const mcpSettingsFilePath = await controller.mcpHub?.getMcpSettingsFilePath() + if (mcpSettingsFilePath) { + await openFileIntegration(mcpSettingsFilePath) + } + return Empty.create() +} diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 205071cc..9ad718f0 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -15,7 +15,6 @@ export interface WebviewMessage { | "reportBug" | "openInBrowser" | "showChatView" - | "openMcpSettings" | "openExtensionSettings" | "requestVsCodeLmModels" | "showAccountViewClicked" diff --git a/webview-ui/src/components/mcp/configuration/tabs/add-server/AddLocalServerForm.tsx b/webview-ui/src/components/mcp/configuration/tabs/add-server/AddLocalServerForm.tsx index 76347ab2..b2bb6a84 100644 --- a/webview-ui/src/components/mcp/configuration/tabs/add-server/AddLocalServerForm.tsx +++ b/webview-ui/src/components/mcp/configuration/tabs/add-server/AddLocalServerForm.tsx @@ -1,7 +1,7 @@ import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react" -import { vscode } from "@/utils/vscode" import styled from "styled-components" import { LINKS } from "@/constants" +import { McpServiceClient } from "@/services/grpc-client" type AddLocalServerFormProps = { onServerAdded: () => void @@ -22,7 +22,9 @@ const AddLocalServerForm = ({ onServerAdded }: AddLocalServerFormProps) => { appearance="primary" style={{ width: "100%", marginBottom: "5px", marginTop: 8 }} onClick={() => { - vscode.postMessage({ type: "openMcpSettings" }) + McpServiceClient.openMcpSettings({}).catch((error) => { + console.error("Error opening MCP settings:", error) + }) }}> Open cline_mcp_settings.json diff --git a/webview-ui/src/components/mcp/configuration/tabs/add-server/AddRemoteServerForm.tsx b/webview-ui/src/components/mcp/configuration/tabs/add-server/AddRemoteServerForm.tsx index d92983a4..51bcd784 100644 --- a/webview-ui/src/components/mcp/configuration/tabs/add-server/AddRemoteServerForm.tsx +++ b/webview-ui/src/components/mcp/configuration/tabs/add-server/AddRemoteServerForm.tsx @@ -1,5 +1,4 @@ import { useRef, useState } from "react" -import { vscode } from "@/utils/vscode" import { VSCodeButton, VSCodeLink, VSCodeTextField } from "@vscode/webview-ui-toolkit/react" import { LINKS } from "@/constants" import { McpServiceClient } from "@/services/grpc-client" @@ -116,7 +115,9 @@ const AddRemoteServerForm = ({ onServerAdded }: { onServerAdded: () => void }) = appearance="secondary" style={{ width: "100%", marginBottom: "5px", marginTop: 15 }} onClick={() => { - vscode.postMessage({ type: "openMcpSettings" }) + McpServiceClient.openMcpSettings({}).catch((error) => { + console.error("Error opening MCP settings:", error) + }) }}> Edit Configuration diff --git a/webview-ui/src/components/mcp/configuration/tabs/installed/InstalledServersView.tsx b/webview-ui/src/components/mcp/configuration/tabs/installed/InstalledServersView.tsx index dc792743..b724ec9c 100644 --- a/webview-ui/src/components/mcp/configuration/tabs/installed/InstalledServersView.tsx +++ b/webview-ui/src/components/mcp/configuration/tabs/installed/InstalledServersView.tsx @@ -1,8 +1,7 @@ import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react" -import { vscode } from "@/utils/vscode" import { useExtensionState } from "@/context/ExtensionStateContext" -import { UiServiceClient } from "@/services/grpc-client" +import { UiServiceClient, McpServiceClient } from "@/services/grpc-client" import ServersToggleList from "./ServersToggleList" const InstalledServersView = () => { @@ -40,7 +39,9 @@ const InstalledServersView = () => { appearance="secondary" style={{ width: "100%", marginBottom: "5px" }} onClick={() => { - vscode.postMessage({ type: "openMcpSettings" }) + McpServiceClient.openMcpSettings({}).catch((error) => { + console.error("Error opening MCP settings:", error) + }) }}> Configure MCP Servers From 7f641072d46adda1e6a0adc1c689a7907aa30e34 Mon Sep 17 00:00:00 2001 From: Ara Date: Sat, 24 May 2025 03:32:12 +0400 Subject: [PATCH 76/85] Adds telemetry to record the usage of keyboard and lightbulb icon shortcuts in Cline (#3695) * Fix: Temporary revert protobus changes for Toggle plan and act mode * Adding telemetry * Adding telemetry * Adding telemetry * Adding telemetry * Adding telemetry --------- Co-authored-by: Cline Evaluation --- .changeset/five-bikes-impress.md | 5 +++++ src/extension.ts | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changeset/five-bikes-impress.md diff --git a/.changeset/five-bikes-impress.md b/.changeset/five-bikes-impress.md new file mode 100644 index 00000000..96e80e32 --- /dev/null +++ b/.changeset/five-bikes-impress.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Adding Telemetry for button clicks diff --git a/src/extension.ts b/src/extension.ts index 9a2903da..57799d94 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -310,6 +310,7 @@ export async function activate(context: vscode.ExtensionContext) { languageId, Array.isArray(diagnostics) ? diagnostics : undefined, ) + telemetryService.captureButtonClick("codeAction_addToChat", visibleWebview?.controller.task?.taskId, true) }), ) @@ -481,6 +482,7 @@ export async function activate(context: vscode.ExtensionContext) { // Send to sidebar provider with diagnostics const visibleWebview = WebviewProvider.getVisibleInstance() await visibleWebview?.controller.fixWithCline(selectedText, filePath, languageId, diagnostics) + telemetryService.captureButtonClick("codeAction_fixWithCline", visibleWebview?.controller.task?.taskId, true) }), ) @@ -502,6 +504,7 @@ export async function activate(context: vscode.ExtensionContext) { const fileMention = visibleWebview?.controller.getFileMentionFromPath(filePath) || filePath const prompt = `Explain the following code from ${fileMention}:\n\`\`\`${editor.document.languageId}\n${selectedText}\n\`\`\`` await visibleWebview?.controller.initTask(prompt) + telemetryService.captureButtonClick("codeAction_explainCode", visibleWebview?.controller.task?.taskId, true) }), ) @@ -523,6 +526,7 @@ export async function activate(context: vscode.ExtensionContext) { const fileMention = visibleWebview?.controller.getFileMentionFromPath(filePath) || filePath const prompt = `Improve the following code from ${fileMention} (e.g., suggest refactorings, optimizations, or better practices):\n\`\`\`${editor.document.languageId}\n${selectedText}\n\`\`\`` await visibleWebview?.controller.initTask(prompt) + telemetryService.captureButtonClick("codeAction_improveCode", visibleWebview?.controller.task?.taskId, true) }), ) @@ -584,6 +588,7 @@ export async function activate(context: vscode.ExtensionContext) { "Could not activate Cline view. Please try opening it manually from the Activity Bar.", ) } + telemetryService.captureButtonClick("command_focusChatInput", activeWebviewProvider?.controller.task?.taskId, true) }), ) From 9f1b01b561e531dc2985dbfbedbe8d23ef5c0dd8 Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Fri, 23 May 2025 18:20:55 -0700 Subject: [PATCH 77/85] Migrate openExtensionSettings protobus (#3786) * Stop tracking auto-generated files, respect .gitignore * migrate openExtensionSettings * changeset * remove comment * Stop tracking auto-generated files, respect .gitignore --------- Co-authored-by: Elephant Lumps --- .changeset/cold-rings-share.md | 5 + src/core/controller/account/index.ts | 22 - src/core/controller/account/methods.ts | 14 - src/core/controller/browser/index.ts | 22 - src/core/controller/browser/methods.ts | 22 - src/core/controller/checkpoints/index.ts | 22 - src/core/controller/checkpoints/methods.ts | 14 - src/core/controller/file/index.ts | 22 - src/core/controller/file/methods.ts | 38 - src/core/controller/grpc-service-config.ts | 80 - src/core/controller/index.ts | 8 - src/core/controller/mcp/index.ts | 22 - src/core/controller/mcp/methods.ts | 26 - src/core/controller/models/index.ts | 22 - src/core/controller/models/methods.ts | 22 - src/core/controller/slash/index.ts | 22 - src/core/controller/slash/methods.ts | 14 - src/core/controller/state/index.ts | 22 - src/core/controller/state/methods.ts | 27 - src/core/controller/task/index.ts | 22 - src/core/controller/task/methods.ts | 34 - src/core/controller/ui/index.ts | 22 - src/core/controller/ui/methods.ts | 14 - src/core/controller/web/index.ts | 22 - src/core/controller/web/methods.ts | 14 - src/shared/WebviewMessage.ts | 1 - src/shared/proto/account.ts | 44 - src/shared/proto/browser.ts | 756 ------- src/shared/proto/checkpoints.ts | 192 -- src/shared/proto/common.ts | 934 --------- src/shared/proto/file.ts | 1813 ----------------- src/shared/proto/mcp.ts | 1632 --------------- src/shared/proto/models.ts | 773 ------- src/shared/proto/slash.ts | 36 - src/shared/proto/state.ts | 859 -------- src/shared/proto/task.ts | 1241 ----------- src/shared/proto/ui.ts | 37 - src/shared/proto/web.ts | 295 --- src/standalone/server-setup.ts | 205 -- webview-ui/src/components/chat/TaskHeader.tsx | 30 +- webview-ui/src/services/grpc-client.ts | 41 - 41 files changed, 22 insertions(+), 9441 deletions(-) create mode 100644 .changeset/cold-rings-share.md delete mode 100644 src/core/controller/account/index.ts delete mode 100644 src/core/controller/account/methods.ts delete mode 100644 src/core/controller/browser/index.ts delete mode 100644 src/core/controller/browser/methods.ts delete mode 100644 src/core/controller/checkpoints/index.ts delete mode 100644 src/core/controller/checkpoints/methods.ts delete mode 100644 src/core/controller/file/index.ts delete mode 100644 src/core/controller/file/methods.ts delete mode 100644 src/core/controller/grpc-service-config.ts delete mode 100644 src/core/controller/mcp/index.ts delete mode 100644 src/core/controller/mcp/methods.ts delete mode 100644 src/core/controller/models/index.ts delete mode 100644 src/core/controller/models/methods.ts delete mode 100644 src/core/controller/slash/index.ts delete mode 100644 src/core/controller/slash/methods.ts delete mode 100644 src/core/controller/state/index.ts delete mode 100644 src/core/controller/state/methods.ts delete mode 100644 src/core/controller/task/index.ts delete mode 100644 src/core/controller/task/methods.ts delete mode 100644 src/core/controller/ui/index.ts delete mode 100644 src/core/controller/ui/methods.ts delete mode 100644 src/core/controller/web/index.ts delete mode 100644 src/core/controller/web/methods.ts delete mode 100644 src/shared/proto/account.ts delete mode 100644 src/shared/proto/browser.ts delete mode 100644 src/shared/proto/checkpoints.ts delete mode 100644 src/shared/proto/common.ts delete mode 100644 src/shared/proto/file.ts delete mode 100644 src/shared/proto/mcp.ts delete mode 100644 src/shared/proto/models.ts delete mode 100644 src/shared/proto/slash.ts delete mode 100644 src/shared/proto/state.ts delete mode 100644 src/shared/proto/task.ts delete mode 100644 src/shared/proto/ui.ts delete mode 100644 src/shared/proto/web.ts delete mode 100644 src/standalone/server-setup.ts delete mode 100644 webview-ui/src/services/grpc-client.ts diff --git a/.changeset/cold-rings-share.md b/.changeset/cold-rings-share.md new file mode 100644 index 00000000..967eacad --- /dev/null +++ b/.changeset/cold-rings-share.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Migrate openExtensionSettings to protobus diff --git a/src/core/controller/account/index.ts b/src/core/controller/account/index.ts deleted file mode 100644 index 6ec7c2da..00000000 --- a/src/core/controller/account/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create account service registry -const accountService = createServiceRegistry("account") - -// Export the method handler types and registration function -export type AccountMethodHandler = ServiceMethodHandler -export type AccountStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = accountService.registerMethod - -// Export the request handlers -export const handleAccountServiceRequest = accountService.handleRequest -export const handleAccountServiceStreamingRequest = accountService.handleStreamingRequest -export const isStreamingMethod = accountService.isStreamingMethod - -// Register all account methods -registerAllMethods() diff --git a/src/core/controller/account/methods.ts b/src/core/controller/account/methods.ts deleted file mode 100644 index 287c3fe6..00000000 --- a/src/core/controller/account/methods.ts +++ /dev/null @@ -1,14 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { accountLoginClicked } from "./accountLoginClicked" -import { accountLogoutClicked } from "./accountLogoutClicked" - -// Register all account service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("accountLoginClicked", accountLoginClicked) - registerMethod("accountLogoutClicked", accountLogoutClicked) -} diff --git a/src/core/controller/browser/index.ts b/src/core/controller/browser/index.ts deleted file mode 100644 index 6edfd242..00000000 --- a/src/core/controller/browser/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create browser service registry -const browserService = createServiceRegistry("browser") - -// Export the method handler types and registration function -export type BrowserMethodHandler = ServiceMethodHandler -export type BrowserStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = browserService.registerMethod - -// Export the request handlers -export const handleBrowserServiceRequest = browserService.handleRequest -export const handleBrowserServiceStreamingRequest = browserService.handleStreamingRequest -export const isStreamingMethod = browserService.isStreamingMethod - -// Register all browser methods -registerAllMethods() diff --git a/src/core/controller/browser/methods.ts b/src/core/controller/browser/methods.ts deleted file mode 100644 index 4800191d..00000000 --- a/src/core/controller/browser/methods.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { discoverBrowser } from "./discoverBrowser" -import { getBrowserConnectionInfo } from "./getBrowserConnectionInfo" -import { getDetectedChromePath } from "./getDetectedChromePath" -import { relaunchChromeDebugMode } from "./relaunchChromeDebugMode" -import { testBrowserConnection } from "./testBrowserConnection" -import { updateBrowserSettings } from "./updateBrowserSettings" - -// Register all browser service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("discoverBrowser", discoverBrowser) - registerMethod("getBrowserConnectionInfo", getBrowserConnectionInfo) - registerMethod("getDetectedChromePath", getDetectedChromePath) - registerMethod("relaunchChromeDebugMode", relaunchChromeDebugMode) - registerMethod("testBrowserConnection", testBrowserConnection) - registerMethod("updateBrowserSettings", updateBrowserSettings) -} diff --git a/src/core/controller/checkpoints/index.ts b/src/core/controller/checkpoints/index.ts deleted file mode 100644 index 33fc6953..00000000 --- a/src/core/controller/checkpoints/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create checkpoints service registry -const checkpointsService = createServiceRegistry("checkpoints") - -// Export the method handler types and registration function -export type CheckpointsMethodHandler = ServiceMethodHandler -export type CheckpointsStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = checkpointsService.registerMethod - -// Export the request handlers -export const handleCheckpointsServiceRequest = checkpointsService.handleRequest -export const handleCheckpointsServiceStreamingRequest = checkpointsService.handleStreamingRequest -export const isStreamingMethod = checkpointsService.isStreamingMethod - -// Register all checkpoints methods -registerAllMethods() diff --git a/src/core/controller/checkpoints/methods.ts b/src/core/controller/checkpoints/methods.ts deleted file mode 100644 index 64bb2886..00000000 --- a/src/core/controller/checkpoints/methods.ts +++ /dev/null @@ -1,14 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { checkpointDiff } from "./checkpointDiff" -import { checkpointRestore } from "./checkpointRestore" - -// Register all checkpoints service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("checkpointDiff", checkpointDiff) - registerMethod("checkpointRestore", checkpointRestore) -} diff --git a/src/core/controller/file/index.ts b/src/core/controller/file/index.ts deleted file mode 100644 index daa6e632..00000000 --- a/src/core/controller/file/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create file service registry -const fileService = createServiceRegistry("file") - -// Export the method handler types and registration function -export type FileMethodHandler = ServiceMethodHandler -export type FileStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = fileService.registerMethod - -// Export the request handlers -export const handleFileServiceRequest = fileService.handleRequest -export const handleFileServiceStreamingRequest = fileService.handleStreamingRequest -export const isStreamingMethod = fileService.isStreamingMethod - -// Register all file methods -registerAllMethods() diff --git a/src/core/controller/file/methods.ts b/src/core/controller/file/methods.ts deleted file mode 100644 index 55dc01aa..00000000 --- a/src/core/controller/file/methods.ts +++ /dev/null @@ -1,38 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { copyToClipboard } from "./copyToClipboard" -import { createRuleFile } from "./createRuleFile" -import { deleteRuleFile } from "./deleteRuleFile" -import { getRelativePaths } from "./getRelativePaths" -import { openFile } from "./openFile" -import { openImage } from "./openImage" -import { openMention } from "./openMention" -import { refreshRules } from "./refreshRules" -import { searchCommits } from "./searchCommits" -import { searchFiles } from "./searchFiles" -import { selectImages } from "./selectImages" -import { toggleClineRule } from "./toggleClineRule" -import { toggleCursorRule } from "./toggleCursorRule" -import { toggleWindsurfRule } from "./toggleWindsurfRule" - -// Register all file service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("copyToClipboard", copyToClipboard) - registerMethod("createRuleFile", createRuleFile) - registerMethod("deleteRuleFile", deleteRuleFile) - registerMethod("getRelativePaths", getRelativePaths) - registerMethod("openFile", openFile) - registerMethod("openImage", openImage) - registerMethod("openMention", openMention) - registerMethod("refreshRules", refreshRules) - registerMethod("searchCommits", searchCommits) - registerMethod("searchFiles", searchFiles) - registerMethod("selectImages", selectImages) - registerMethod("toggleClineRule", toggleClineRule) - registerMethod("toggleCursorRule", toggleCursorRule) - registerMethod("toggleWindsurfRule", toggleWindsurfRule) -} diff --git a/src/core/controller/grpc-service-config.ts b/src/core/controller/grpc-service-config.ts deleted file mode 100644 index 136f2c9c..00000000 --- a/src/core/controller/grpc-service-config.ts +++ /dev/null @@ -1,80 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { Controller } from "./index" -import { StreamingResponseHandler } from "./grpc-handler" -import { handleAccountServiceRequest, handleAccountServiceStreamingRequest } from "./account/index" -import { handleBrowserServiceRequest, handleBrowserServiceStreamingRequest } from "./browser/index" -import { handleCheckpointsServiceRequest, handleCheckpointsServiceStreamingRequest } from "./checkpoints/index" -import { handleFileServiceRequest, handleFileServiceStreamingRequest } from "./file/index" -import { handleMcpServiceRequest, handleMcpServiceStreamingRequest } from "./mcp/index" -import { handleStateServiceRequest, handleStateServiceStreamingRequest } from "./state/index" -import { handleTaskServiceRequest, handleTaskServiceStreamingRequest } from "./task/index" -import { handleWebServiceRequest, handleWebServiceStreamingRequest } from "./web/index" -import { handleModelsServiceRequest, handleModelsServiceStreamingRequest } from "./models/index" -import { handleSlashServiceRequest, handleSlashServiceStreamingRequest } from "./slash/index" -import { handleUiServiceRequest, handleUiServiceStreamingRequest } from "./ui/index" - -/** - * Configuration for a service handler - */ -export interface ServiceHandlerConfig { - requestHandler: (controller: Controller, method: string, message: any) => Promise - streamingHandler: ( - controller: Controller, - method: string, - message: any, - responseStream: StreamingResponseHandler, - requestId?: string, - ) => Promise -} - -/** - * Map of service names to their handler configurations - */ -export const serviceHandlers: Record = { - "cline.AccountService": { - requestHandler: handleAccountServiceRequest, - streamingHandler: handleAccountServiceStreamingRequest, - }, - "cline.BrowserService": { - requestHandler: handleBrowserServiceRequest, - streamingHandler: handleBrowserServiceStreamingRequest, - }, - "cline.CheckpointsService": { - requestHandler: handleCheckpointsServiceRequest, - streamingHandler: handleCheckpointsServiceStreamingRequest, - }, - "cline.FileService": { - requestHandler: handleFileServiceRequest, - streamingHandler: handleFileServiceStreamingRequest, - }, - "cline.McpService": { - requestHandler: handleMcpServiceRequest, - streamingHandler: handleMcpServiceStreamingRequest, - }, - "cline.StateService": { - requestHandler: handleStateServiceRequest, - streamingHandler: handleStateServiceStreamingRequest, - }, - "cline.TaskService": { - requestHandler: handleTaskServiceRequest, - streamingHandler: handleTaskServiceStreamingRequest, - }, - "cline.WebService": { - requestHandler: handleWebServiceRequest, - streamingHandler: handleWebServiceStreamingRequest, - }, - "cline.ModelsService": { - requestHandler: handleModelsServiceRequest, - streamingHandler: handleModelsServiceStreamingRequest, - }, - "cline.SlashService": { - requestHandler: handleSlashServiceRequest, - streamingHandler: handleSlashServiceStreamingRequest, - }, - "cline.UiService": { - requestHandler: handleUiServiceRequest, - streamingHandler: handleUiServiceStreamingRequest, - }, -} diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 00619f7a..93f33b6a 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -382,14 +382,6 @@ export class Controller { this.mcpHub?.sendLatestMcpServers() break } - case "openExtensionSettings": { - const settingsFilter = message.text || "" - await vscode.commands.executeCommand( - "workbench.action.openSettings", - `@ext:saoudrizwan.claude-dev ${settingsFilter}`.trim(), // trim whitespace if no settings filter - ) - break - } case "invoke": { if (message.text) { await this.postMessageToWebview({ diff --git a/src/core/controller/mcp/index.ts b/src/core/controller/mcp/index.ts deleted file mode 100644 index af2a8775..00000000 --- a/src/core/controller/mcp/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create mcp service registry -const mcpService = createServiceRegistry("mcp") - -// Export the method handler types and registration function -export type McpMethodHandler = ServiceMethodHandler -export type McpStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = mcpService.registerMethod - -// Export the request handlers -export const handleMcpServiceRequest = mcpService.handleRequest -export const handleMcpServiceStreamingRequest = mcpService.handleStreamingRequest -export const isStreamingMethod = mcpService.isStreamingMethod - -// Register all mcp methods -registerAllMethods() diff --git a/src/core/controller/mcp/methods.ts b/src/core/controller/mcp/methods.ts deleted file mode 100644 index 3cdf6bb6..00000000 --- a/src/core/controller/mcp/methods.ts +++ /dev/null @@ -1,26 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { addRemoteMcpServer } from "./addRemoteMcpServer" -import { deleteMcpServer } from "./deleteMcpServer" -import { downloadMcp } from "./downloadMcp" -import { refreshMcpMarketplace } from "./refreshMcpMarketplace" -import { restartMcpServer } from "./restartMcpServer" -import { toggleMcpServer } from "./toggleMcpServer" -import { toggleToolAutoApprove } from "./toggleToolAutoApprove" -import { updateMcpTimeout } from "./updateMcpTimeout" - -// Register all mcp service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("addRemoteMcpServer", addRemoteMcpServer) - registerMethod("deleteMcpServer", deleteMcpServer) - registerMethod("downloadMcp", downloadMcp) - registerMethod("refreshMcpMarketplace", refreshMcpMarketplace) - registerMethod("restartMcpServer", restartMcpServer) - registerMethod("toggleMcpServer", toggleMcpServer) - registerMethod("toggleToolAutoApprove", toggleToolAutoApprove) - registerMethod("updateMcpTimeout", updateMcpTimeout) -} diff --git a/src/core/controller/models/index.ts b/src/core/controller/models/index.ts deleted file mode 100644 index c2b269f7..00000000 --- a/src/core/controller/models/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create models service registry -const modelsService = createServiceRegistry("models") - -// Export the method handler types and registration function -export type ModelsMethodHandler = ServiceMethodHandler -export type ModelsStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = modelsService.registerMethod - -// Export the request handlers -export const handleModelsServiceRequest = modelsService.handleRequest -export const handleModelsServiceStreamingRequest = modelsService.handleStreamingRequest -export const isStreamingMethod = modelsService.isStreamingMethod - -// Register all models methods -registerAllMethods() diff --git a/src/core/controller/models/methods.ts b/src/core/controller/models/methods.ts deleted file mode 100644 index 68a48971..00000000 --- a/src/core/controller/models/methods.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { getLmStudioModels } from "./getLmStudioModels" -import { getOllamaModels } from "./getOllamaModels" -import { getVsCodeLmModels } from "./getVsCodeLmModels" -import { refreshOpenAiModels } from "./refreshOpenAiModels" -import { refreshOpenRouterModels } from "./refreshOpenRouterModels" -import { refreshRequestyModels } from "./refreshRequestyModels" - -// Register all models service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("getLmStudioModels", getLmStudioModels) - registerMethod("getOllamaModels", getOllamaModels) - registerMethod("getVsCodeLmModels", getVsCodeLmModels) - registerMethod("refreshOpenAiModels", refreshOpenAiModels) - registerMethod("refreshOpenRouterModels", refreshOpenRouterModels) - registerMethod("refreshRequestyModels", refreshRequestyModels) -} diff --git a/src/core/controller/slash/index.ts b/src/core/controller/slash/index.ts deleted file mode 100644 index dd4b3f53..00000000 --- a/src/core/controller/slash/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create slash service registry -const slashService = createServiceRegistry("slash") - -// Export the method handler types and registration function -export type SlashMethodHandler = ServiceMethodHandler -export type SlashStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = slashService.registerMethod - -// Export the request handlers -export const handleSlashServiceRequest = slashService.handleRequest -export const handleSlashServiceStreamingRequest = slashService.handleStreamingRequest -export const isStreamingMethod = slashService.isStreamingMethod - -// Register all slash methods -registerAllMethods() diff --git a/src/core/controller/slash/methods.ts b/src/core/controller/slash/methods.ts deleted file mode 100644 index 9bfdb098..00000000 --- a/src/core/controller/slash/methods.ts +++ /dev/null @@ -1,14 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { condense } from "./condense" -import { reportBug } from "./reportBug" - -// Register all slash service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("condense", condense) - registerMethod("reportBug", reportBug) -} diff --git a/src/core/controller/state/index.ts b/src/core/controller/state/index.ts deleted file mode 100644 index 1ba9cbbb..00000000 --- a/src/core/controller/state/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create state service registry -const stateService = createServiceRegistry("state") - -// Export the method handler types and registration function -export type StateMethodHandler = ServiceMethodHandler -export type StateStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = stateService.registerMethod - -// Export the request handlers -export const handleStateServiceRequest = stateService.handleRequest -export const handleStateServiceStreamingRequest = stateService.handleStreamingRequest -export const isStreamingMethod = stateService.isStreamingMethod - -// Register all state methods -registerAllMethods() diff --git a/src/core/controller/state/methods.ts b/src/core/controller/state/methods.ts deleted file mode 100644 index 4146460c..00000000 --- a/src/core/controller/state/methods.ts +++ /dev/null @@ -1,27 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { getLatestState } from "./getLatestState" -import { resetState } from "./resetState" -import { subscribeToState } from "./subscribeToState" -import { toggleFavoriteModel } from "./toggleFavoriteModel" -import { togglePlanActMode } from "./togglePlanActMode" -import { updateAutoApprovalSettings } from "./updateAutoApprovalSettings" -import { updateTerminalConnectionTimeout } from "./updateTerminalConnectionTimeout" - -// Streaming methods for this service -export const streamingMethods = ["subscribeToState"] - -// Register all state service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("getLatestState", getLatestState) - registerMethod("resetState", resetState) - registerMethod("subscribeToState", subscribeToState, { isStreaming: true }) - registerMethod("toggleFavoriteModel", toggleFavoriteModel) - registerMethod("togglePlanActMode", togglePlanActMode) - registerMethod("updateAutoApprovalSettings", updateAutoApprovalSettings) - registerMethod("updateTerminalConnectionTimeout", updateTerminalConnectionTimeout) -} diff --git a/src/core/controller/task/index.ts b/src/core/controller/task/index.ts deleted file mode 100644 index e50616fe..00000000 --- a/src/core/controller/task/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create task service registry -const taskService = createServiceRegistry("task") - -// Export the method handler types and registration function -export type TaskMethodHandler = ServiceMethodHandler -export type TaskStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = taskService.registerMethod - -// Export the request handlers -export const handleTaskServiceRequest = taskService.handleRequest -export const handleTaskServiceStreamingRequest = taskService.handleStreamingRequest -export const isStreamingMethod = taskService.isStreamingMethod - -// Register all task methods -registerAllMethods() diff --git a/src/core/controller/task/methods.ts b/src/core/controller/task/methods.ts deleted file mode 100644 index ec70ff0f..00000000 --- a/src/core/controller/task/methods.ts +++ /dev/null @@ -1,34 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { askResponse } from "./askResponse" -import { cancelTask } from "./cancelTask" -import { clearTask } from "./clearTask" -import { deleteNonFavoritedTasks } from "./deleteNonFavoritedTasks" -import { deleteTasksWithIds } from "./deleteTasksWithIds" -import { exportTaskWithId } from "./exportTaskWithId" -import { getTaskHistory } from "./getTaskHistory" -import { newTask } from "./newTask" -import { showTaskWithId } from "./showTaskWithId" -import { taskCompletionViewChanges } from "./taskCompletionViewChanges" -import { taskFeedback } from "./taskFeedback" -import { toggleTaskFavorite } from "./toggleTaskFavorite" - -// Register all task service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("askResponse", askResponse) - registerMethod("cancelTask", cancelTask) - registerMethod("clearTask", clearTask) - registerMethod("deleteNonFavoritedTasks", deleteNonFavoritedTasks) - registerMethod("deleteTasksWithIds", deleteTasksWithIds) - registerMethod("exportTaskWithId", exportTaskWithId) - registerMethod("getTaskHistory", getTaskHistory) - registerMethod("newTask", newTask) - registerMethod("showTaskWithId", showTaskWithId) - registerMethod("taskCompletionViewChanges", taskCompletionViewChanges) - registerMethod("taskFeedback", taskFeedback) - registerMethod("toggleTaskFavorite", toggleTaskFavorite) -} diff --git a/src/core/controller/ui/index.ts b/src/core/controller/ui/index.ts deleted file mode 100644 index d97ded27..00000000 --- a/src/core/controller/ui/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create ui service registry -const uiService = createServiceRegistry("ui") - -// Export the method handler types and registration function -export type UiMethodHandler = ServiceMethodHandler -export type UiStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = uiService.registerMethod - -// Export the request handlers -export const handleUiServiceRequest = uiService.handleRequest -export const handleUiServiceStreamingRequest = uiService.handleStreamingRequest -export const isStreamingMethod = uiService.isStreamingMethod - -// Register all ui methods -registerAllMethods() diff --git a/src/core/controller/ui/methods.ts b/src/core/controller/ui/methods.ts deleted file mode 100644 index e779ee05..00000000 --- a/src/core/controller/ui/methods.ts +++ /dev/null @@ -1,14 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { onDidShowAnnouncement } from "./onDidShowAnnouncement" -import { scrollToSettings } from "./scrollToSettings" - -// Register all ui service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("onDidShowAnnouncement", onDidShowAnnouncement) - registerMethod("scrollToSettings", scrollToSettings) -} diff --git a/src/core/controller/web/index.ts b/src/core/controller/web/index.ts deleted file mode 100644 index 5c2ad8bb..00000000 --- a/src/core/controller/web/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createServiceRegistry, ServiceMethodHandler, StreamingMethodHandler } from "../grpc-service" -import { StreamingResponseHandler } from "../grpc-handler" -import { registerAllMethods } from "./methods" - -// Create web service registry -const webService = createServiceRegistry("web") - -// Export the method handler types and registration function -export type WebMethodHandler = ServiceMethodHandler -export type WebStreamingMethodHandler = StreamingMethodHandler -export const registerMethod = webService.registerMethod - -// Export the request handlers -export const handleWebServiceRequest = webService.handleRequest -export const handleWebServiceStreamingRequest = webService.handleStreamingRequest -export const isStreamingMethod = webService.isStreamingMethod - -// Register all web methods -registerAllMethods() diff --git a/src/core/controller/web/methods.ts b/src/core/controller/web/methods.ts deleted file mode 100644 index f0ab0eea..00000000 --- a/src/core/controller/web/methods.ts +++ /dev/null @@ -1,14 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -// Import all method implementations -import { registerMethod } from "./index" -import { checkIsImageUrl } from "./checkIsImageUrl" -import { fetchOpenGraphData } from "./fetchOpenGraphData" - -// Register all web service methods -export function registerAllMethods(): void { - // Register each method with the registry - registerMethod("checkIsImageUrl", checkIsImageUrl) - registerMethod("fetchOpenGraphData", fetchOpenGraphData) -} diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 9ad718f0..9ac2aa89 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -15,7 +15,6 @@ export interface WebviewMessage { | "reportBug" | "openInBrowser" | "showChatView" - | "openExtensionSettings" | "requestVsCodeLmModels" | "showAccountViewClicked" | "authStateChanged" diff --git a/src/shared/proto/account.ts b/src/shared/proto/account.ts deleted file mode 100644 index 471e546f..00000000 --- a/src/shared/proto/account.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: account.proto - -/* eslint-disable */ -import { Empty, EmptyRequest, String } from "./common" - -export const protobufPackage = "cline" - -/** Service for account-related operations */ -export type AccountServiceDefinition = typeof AccountServiceDefinition -export const AccountServiceDefinition = { - name: "AccountService", - fullName: "cline.AccountService", - methods: { - /** - * Handles the user clicking the login link in the UI. - * Generates a secure nonce for state validation, stores it in secrets, - * and opens the authentication URL in the external browser. - */ - accountLoginClicked: { - name: "accountLoginClicked", - requestType: EmptyRequest, - requestStream: false, - responseType: String, - responseStream: false, - options: {}, - }, - /** - * Handles the user clicking the logout button in the UI. - * Clears API keys and user state. - */ - accountLogoutClicked: { - name: "accountLogoutClicked", - requestType: EmptyRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - }, -} as const diff --git a/src/shared/proto/browser.ts b/src/shared/proto/browser.ts deleted file mode 100644 index a810aa6d..00000000 --- a/src/shared/proto/browser.ts +++ /dev/null @@ -1,756 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: browser.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { Boolean, EmptyRequest, Metadata, String, StringRequest } from "./common" - -export const protobufPackage = "cline" - -export interface BrowserConnectionInfo { - isConnected: boolean - isRemote: boolean - host?: string | undefined -} - -export interface BrowserConnection { - success: boolean - message: string - endpoint?: string | undefined -} - -export interface ChromePath { - path: string - isBundled: boolean -} - -export interface Viewport { - width: number - height: number -} - -export interface BrowserSettings { - viewport?: Viewport | undefined - remoteBrowserHost?: string | undefined - remoteBrowserEnabled?: boolean | undefined - chromeExecutablePath?: string | undefined - disableToolUse?: boolean | undefined -} - -export interface UpdateBrowserSettingsRequest { - metadata?: Metadata | undefined - viewport?: Viewport | undefined - remoteBrowserHost?: string | undefined - remoteBrowserEnabled?: boolean | undefined - chromeExecutablePath?: string | undefined - disableToolUse?: boolean | undefined -} - -function createBaseBrowserConnectionInfo(): BrowserConnectionInfo { - return { isConnected: false, isRemote: false, host: undefined } -} - -export const BrowserConnectionInfo: MessageFns = { - encode(message: BrowserConnectionInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.isConnected !== false) { - writer.uint32(8).bool(message.isConnected) - } - if (message.isRemote !== false) { - writer.uint32(16).bool(message.isRemote) - } - if (message.host !== undefined) { - writer.uint32(26).string(message.host) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): BrowserConnectionInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseBrowserConnectionInfo() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.isConnected = reader.bool() - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.isRemote = reader.bool() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.host = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): BrowserConnectionInfo { - return { - isConnected: isSet(object.isConnected) ? globalThis.Boolean(object.isConnected) : false, - isRemote: isSet(object.isRemote) ? globalThis.Boolean(object.isRemote) : false, - host: isSet(object.host) ? globalThis.String(object.host) : undefined, - } - }, - - toJSON(message: BrowserConnectionInfo): unknown { - const obj: any = {} - if (message.isConnected !== false) { - obj.isConnected = message.isConnected - } - if (message.isRemote !== false) { - obj.isRemote = message.isRemote - } - if (message.host !== undefined) { - obj.host = message.host - } - return obj - }, - - create, I>>(base?: I): BrowserConnectionInfo { - return BrowserConnectionInfo.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): BrowserConnectionInfo { - const message = createBaseBrowserConnectionInfo() - message.isConnected = object.isConnected ?? false - message.isRemote = object.isRemote ?? false - message.host = object.host ?? undefined - return message - }, -} - -function createBaseBrowserConnection(): BrowserConnection { - return { success: false, message: "", endpoint: undefined } -} - -export const BrowserConnection: MessageFns = { - encode(message: BrowserConnection, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.success !== false) { - writer.uint32(8).bool(message.success) - } - if (message.message !== "") { - writer.uint32(18).string(message.message) - } - if (message.endpoint !== undefined) { - writer.uint32(26).string(message.endpoint) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): BrowserConnection { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseBrowserConnection() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.success = reader.bool() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.message = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.endpoint = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): BrowserConnection { - return { - success: isSet(object.success) ? globalThis.Boolean(object.success) : false, - message: isSet(object.message) ? globalThis.String(object.message) : "", - endpoint: isSet(object.endpoint) ? globalThis.String(object.endpoint) : undefined, - } - }, - - toJSON(message: BrowserConnection): unknown { - const obj: any = {} - if (message.success !== false) { - obj.success = message.success - } - if (message.message !== "") { - obj.message = message.message - } - if (message.endpoint !== undefined) { - obj.endpoint = message.endpoint - } - return obj - }, - - create, I>>(base?: I): BrowserConnection { - return BrowserConnection.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): BrowserConnection { - const message = createBaseBrowserConnection() - message.success = object.success ?? false - message.message = object.message ?? "" - message.endpoint = object.endpoint ?? undefined - return message - }, -} - -function createBaseChromePath(): ChromePath { - return { path: "", isBundled: false } -} - -export const ChromePath: MessageFns = { - encode(message: ChromePath, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.path !== "") { - writer.uint32(10).string(message.path) - } - if (message.isBundled !== false) { - writer.uint32(16).bool(message.isBundled) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ChromePath { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseChromePath() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.path = reader.string() - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.isBundled = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ChromePath { - return { - path: isSet(object.path) ? globalThis.String(object.path) : "", - isBundled: isSet(object.isBundled) ? globalThis.Boolean(object.isBundled) : false, - } - }, - - toJSON(message: ChromePath): unknown { - const obj: any = {} - if (message.path !== "") { - obj.path = message.path - } - if (message.isBundled !== false) { - obj.isBundled = message.isBundled - } - return obj - }, - - create, I>>(base?: I): ChromePath { - return ChromePath.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ChromePath { - const message = createBaseChromePath() - message.path = object.path ?? "" - message.isBundled = object.isBundled ?? false - return message - }, -} - -function createBaseViewport(): Viewport { - return { width: 0, height: 0 } -} - -export const Viewport: MessageFns = { - encode(message: Viewport, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.width !== 0) { - writer.uint32(8).int32(message.width) - } - if (message.height !== 0) { - writer.uint32(16).int32(message.height) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Viewport { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseViewport() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.width = reader.int32() - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.height = reader.int32() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): Viewport { - return { - width: isSet(object.width) ? globalThis.Number(object.width) : 0, - height: isSet(object.height) ? globalThis.Number(object.height) : 0, - } - }, - - toJSON(message: Viewport): unknown { - const obj: any = {} - if (message.width !== 0) { - obj.width = Math.round(message.width) - } - if (message.height !== 0) { - obj.height = Math.round(message.height) - } - return obj - }, - - create, I>>(base?: I): Viewport { - return Viewport.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): Viewport { - const message = createBaseViewport() - message.width = object.width ?? 0 - message.height = object.height ?? 0 - return message - }, -} - -function createBaseBrowserSettings(): BrowserSettings { - return { - viewport: undefined, - remoteBrowserHost: undefined, - remoteBrowserEnabled: undefined, - chromeExecutablePath: undefined, - disableToolUse: undefined, - } -} - -export const BrowserSettings: MessageFns = { - encode(message: BrowserSettings, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.viewport !== undefined) { - Viewport.encode(message.viewport, writer.uint32(10).fork()).join() - } - if (message.remoteBrowserHost !== undefined) { - writer.uint32(18).string(message.remoteBrowserHost) - } - if (message.remoteBrowserEnabled !== undefined) { - writer.uint32(24).bool(message.remoteBrowserEnabled) - } - if (message.chromeExecutablePath !== undefined) { - writer.uint32(34).string(message.chromeExecutablePath) - } - if (message.disableToolUse !== undefined) { - writer.uint32(40).bool(message.disableToolUse) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): BrowserSettings { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseBrowserSettings() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.viewport = Viewport.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.remoteBrowserHost = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.remoteBrowserEnabled = reader.bool() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.chromeExecutablePath = reader.string() - continue - } - case 5: { - if (tag !== 40) { - break - } - - message.disableToolUse = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): BrowserSettings { - return { - viewport: isSet(object.viewport) ? Viewport.fromJSON(object.viewport) : undefined, - remoteBrowserHost: isSet(object.remoteBrowserHost) ? globalThis.String(object.remoteBrowserHost) : undefined, - remoteBrowserEnabled: isSet(object.remoteBrowserEnabled) - ? globalThis.Boolean(object.remoteBrowserEnabled) - : undefined, - chromeExecutablePath: isSet(object.chromeExecutablePath) ? globalThis.String(object.chromeExecutablePath) : undefined, - disableToolUse: isSet(object.disableToolUse) ? globalThis.Boolean(object.disableToolUse) : undefined, - } - }, - - toJSON(message: BrowserSettings): unknown { - const obj: any = {} - if (message.viewport !== undefined) { - obj.viewport = Viewport.toJSON(message.viewport) - } - if (message.remoteBrowserHost !== undefined) { - obj.remoteBrowserHost = message.remoteBrowserHost - } - if (message.remoteBrowserEnabled !== undefined) { - obj.remoteBrowserEnabled = message.remoteBrowserEnabled - } - if (message.chromeExecutablePath !== undefined) { - obj.chromeExecutablePath = message.chromeExecutablePath - } - if (message.disableToolUse !== undefined) { - obj.disableToolUse = message.disableToolUse - } - return obj - }, - - create, I>>(base?: I): BrowserSettings { - return BrowserSettings.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): BrowserSettings { - const message = createBaseBrowserSettings() - message.viewport = - object.viewport !== undefined && object.viewport !== null ? Viewport.fromPartial(object.viewport) : undefined - message.remoteBrowserHost = object.remoteBrowserHost ?? undefined - message.remoteBrowserEnabled = object.remoteBrowserEnabled ?? undefined - message.chromeExecutablePath = object.chromeExecutablePath ?? undefined - message.disableToolUse = object.disableToolUse ?? undefined - return message - }, -} - -function createBaseUpdateBrowserSettingsRequest(): UpdateBrowserSettingsRequest { - return { - metadata: undefined, - viewport: undefined, - remoteBrowserHost: undefined, - remoteBrowserEnabled: undefined, - chromeExecutablePath: undefined, - disableToolUse: undefined, - } -} - -export const UpdateBrowserSettingsRequest: MessageFns = { - encode(message: UpdateBrowserSettingsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.viewport !== undefined) { - Viewport.encode(message.viewport, writer.uint32(18).fork()).join() - } - if (message.remoteBrowserHost !== undefined) { - writer.uint32(26).string(message.remoteBrowserHost) - } - if (message.remoteBrowserEnabled !== undefined) { - writer.uint32(32).bool(message.remoteBrowserEnabled) - } - if (message.chromeExecutablePath !== undefined) { - writer.uint32(42).string(message.chromeExecutablePath) - } - if (message.disableToolUse !== undefined) { - writer.uint32(48).bool(message.disableToolUse) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): UpdateBrowserSettingsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseUpdateBrowserSettingsRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.viewport = Viewport.decode(reader, reader.uint32()) - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.remoteBrowserHost = reader.string() - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.remoteBrowserEnabled = reader.bool() - continue - } - case 5: { - if (tag !== 42) { - break - } - - message.chromeExecutablePath = reader.string() - continue - } - case 6: { - if (tag !== 48) { - break - } - - message.disableToolUse = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): UpdateBrowserSettingsRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - viewport: isSet(object.viewport) ? Viewport.fromJSON(object.viewport) : undefined, - remoteBrowserHost: isSet(object.remoteBrowserHost) ? globalThis.String(object.remoteBrowserHost) : undefined, - remoteBrowserEnabled: isSet(object.remoteBrowserEnabled) - ? globalThis.Boolean(object.remoteBrowserEnabled) - : undefined, - chromeExecutablePath: isSet(object.chromeExecutablePath) ? globalThis.String(object.chromeExecutablePath) : undefined, - disableToolUse: isSet(object.disableToolUse) ? globalThis.Boolean(object.disableToolUse) : undefined, - } - }, - - toJSON(message: UpdateBrowserSettingsRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.viewport !== undefined) { - obj.viewport = Viewport.toJSON(message.viewport) - } - if (message.remoteBrowserHost !== undefined) { - obj.remoteBrowserHost = message.remoteBrowserHost - } - if (message.remoteBrowserEnabled !== undefined) { - obj.remoteBrowserEnabled = message.remoteBrowserEnabled - } - if (message.chromeExecutablePath !== undefined) { - obj.chromeExecutablePath = message.chromeExecutablePath - } - if (message.disableToolUse !== undefined) { - obj.disableToolUse = message.disableToolUse - } - return obj - }, - - create, I>>(base?: I): UpdateBrowserSettingsRequest { - return UpdateBrowserSettingsRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): UpdateBrowserSettingsRequest { - const message = createBaseUpdateBrowserSettingsRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.viewport = - object.viewport !== undefined && object.viewport !== null ? Viewport.fromPartial(object.viewport) : undefined - message.remoteBrowserHost = object.remoteBrowserHost ?? undefined - message.remoteBrowserEnabled = object.remoteBrowserEnabled ?? undefined - message.chromeExecutablePath = object.chromeExecutablePath ?? undefined - message.disableToolUse = object.disableToolUse ?? undefined - return message - }, -} - -export type BrowserServiceDefinition = typeof BrowserServiceDefinition -export const BrowserServiceDefinition = { - name: "BrowserService", - fullName: "cline.BrowserService", - methods: { - getBrowserConnectionInfo: { - name: "getBrowserConnectionInfo", - requestType: EmptyRequest, - requestStream: false, - responseType: BrowserConnectionInfo, - responseStream: false, - options: {}, - }, - testBrowserConnection: { - name: "testBrowserConnection", - requestType: StringRequest, - requestStream: false, - responseType: BrowserConnection, - responseStream: false, - options: {}, - }, - discoverBrowser: { - name: "discoverBrowser", - requestType: EmptyRequest, - requestStream: false, - responseType: BrowserConnection, - responseStream: false, - options: {}, - }, - getDetectedChromePath: { - name: "getDetectedChromePath", - requestType: EmptyRequest, - requestStream: false, - responseType: ChromePath, - responseStream: false, - options: {}, - }, - updateBrowserSettings: { - name: "updateBrowserSettings", - requestType: UpdateBrowserSettingsRequest, - requestStream: false, - responseType: Boolean, - responseStream: false, - options: {}, - }, - relaunchChromeDebugMode: { - name: "relaunchChromeDebugMode", - requestType: EmptyRequest, - requestStream: false, - responseType: String, - responseStream: false, - options: {}, - }, - }, -} as const - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined - -export type DeepPartial = T extends Builtin - ? T - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial - -type KeysOfUnion = T extends T ? keyof T : never -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } - -function isSet(value: any): boolean { - return value !== null && value !== undefined -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter - decode(input: BinaryReader | Uint8Array, length?: number): T - fromJSON(object: any): T - toJSON(message: T): unknown - create, I>>(base?: I): T - fromPartial, I>>(object: I): T -} diff --git a/src/shared/proto/checkpoints.ts b/src/shared/proto/checkpoints.ts deleted file mode 100644 index fe62d8f2..00000000 --- a/src/shared/proto/checkpoints.ts +++ /dev/null @@ -1,192 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: checkpoints.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { Empty, Int64Request, Metadata } from "./common" - -export const protobufPackage = "cline" - -export interface CheckpointRestoreRequest { - metadata?: Metadata | undefined - number: number - restoreType: string - offset?: number | undefined -} - -function createBaseCheckpointRestoreRequest(): CheckpointRestoreRequest { - return { metadata: undefined, number: 0, restoreType: "", offset: undefined } -} - -export const CheckpointRestoreRequest: MessageFns = { - encode(message: CheckpointRestoreRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.number !== 0) { - writer.uint32(16).int64(message.number) - } - if (message.restoreType !== "") { - writer.uint32(26).string(message.restoreType) - } - if (message.offset !== undefined) { - writer.uint32(32).int64(message.offset) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): CheckpointRestoreRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseCheckpointRestoreRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.number = longToNumber(reader.int64()) - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.restoreType = reader.string() - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.offset = longToNumber(reader.int64()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): CheckpointRestoreRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - number: isSet(object.number) ? globalThis.Number(object.number) : 0, - restoreType: isSet(object.restoreType) ? globalThis.String(object.restoreType) : "", - offset: isSet(object.offset) ? globalThis.Number(object.offset) : undefined, - } - }, - - toJSON(message: CheckpointRestoreRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.number !== 0) { - obj.number = Math.round(message.number) - } - if (message.restoreType !== "") { - obj.restoreType = message.restoreType - } - if (message.offset !== undefined) { - obj.offset = Math.round(message.offset) - } - return obj - }, - - create, I>>(base?: I): CheckpointRestoreRequest { - return CheckpointRestoreRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): CheckpointRestoreRequest { - const message = createBaseCheckpointRestoreRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.number = object.number ?? 0 - message.restoreType = object.restoreType ?? "" - message.offset = object.offset ?? undefined - return message - }, -} - -export type CheckpointsServiceDefinition = typeof CheckpointsServiceDefinition -export const CheckpointsServiceDefinition = { - name: "CheckpointsService", - fullName: "cline.CheckpointsService", - methods: { - checkpointDiff: { - name: "checkpointDiff", - requestType: Int64Request, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - checkpointRestore: { - name: "checkpointRestore", - requestType: CheckpointRestoreRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - }, -} as const - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined - -export type DeepPartial = T extends Builtin - ? T - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial - -type KeysOfUnion = T extends T ? keyof T : never -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } - -function longToNumber(int64: { toString(): string }): number { - const num = globalThis.Number(int64.toString()) - if (num > globalThis.Number.MAX_SAFE_INTEGER) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER") - } - if (num < globalThis.Number.MIN_SAFE_INTEGER) { - throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER") - } - return num -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter - decode(input: BinaryReader | Uint8Array, length?: number): T - fromJSON(object: any): T - toJSON(message: T): unknown - create, I>>(base?: I): T - fromPartial, I>>(object: I): T -} diff --git a/src/shared/proto/common.ts b/src/shared/proto/common.ts deleted file mode 100644 index 2bdac92f..00000000 --- a/src/shared/proto/common.ts +++ /dev/null @@ -1,934 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: common.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" - -export const protobufPackage = "cline" - -export interface Metadata {} - -export interface EmptyRequest { - metadata?: Metadata | undefined -} - -export interface Empty {} - -export interface StringRequest { - metadata?: Metadata | undefined - value: string -} - -export interface StringArrayRequest { - metadata?: Metadata | undefined - value: string[] -} - -export interface String { - value: string -} - -export interface Int64Request { - metadata?: Metadata | undefined - value: number -} - -export interface Int64 { - value: number -} - -export interface BytesRequest { - metadata?: Metadata | undefined - value: Buffer -} - -export interface Bytes { - value: Buffer -} - -export interface BooleanRequest { - metadata?: Metadata | undefined - value: boolean -} - -export interface Boolean { - value: boolean -} - -export interface StringArray { - values: string[] -} - -function createBaseMetadata(): Metadata { - return {} -} - -export const Metadata: MessageFns = { - encode(_: Metadata, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Metadata { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseMetadata() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(_: any): Metadata { - return {} - }, - - toJSON(_: Metadata): unknown { - const obj: any = {} - return obj - }, - - create, I>>(base?: I): Metadata { - return Metadata.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(_: I): Metadata { - const message = createBaseMetadata() - return message - }, -} - -function createBaseEmptyRequest(): EmptyRequest { - return { metadata: undefined } -} - -export const EmptyRequest: MessageFns = { - encode(message: EmptyRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): EmptyRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseEmptyRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): EmptyRequest { - return { metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined } - }, - - toJSON(message: EmptyRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - return obj - }, - - create, I>>(base?: I): EmptyRequest { - return EmptyRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): EmptyRequest { - const message = createBaseEmptyRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - return message - }, -} - -function createBaseEmpty(): Empty { - return {} -} - -export const Empty: MessageFns = { - encode(_: Empty, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Empty { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseEmpty() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(_: any): Empty { - return {} - }, - - toJSON(_: Empty): unknown { - const obj: any = {} - return obj - }, - - create, I>>(base?: I): Empty { - return Empty.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(_: I): Empty { - const message = createBaseEmpty() - return message - }, -} - -function createBaseStringRequest(): StringRequest { - return { metadata: undefined, value: "" } -} - -export const StringRequest: MessageFns = { - encode(message: StringRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.value !== "") { - writer.uint32(18).string(message.value) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): StringRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseStringRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.value = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): StringRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - value: isSet(object.value) ? globalThis.String(object.value) : "", - } - }, - - toJSON(message: StringRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.value !== "") { - obj.value = message.value - } - return obj - }, - - create, I>>(base?: I): StringRequest { - return StringRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): StringRequest { - const message = createBaseStringRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.value = object.value ?? "" - return message - }, -} - -function createBaseStringArrayRequest(): StringArrayRequest { - return { metadata: undefined, value: [] } -} - -export const StringArrayRequest: MessageFns = { - encode(message: StringArrayRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - for (const v of message.value) { - writer.uint32(18).string(v!) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): StringArrayRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseStringArrayRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.value.push(reader.string()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): StringArrayRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - value: globalThis.Array.isArray(object?.value) ? object.value.map((e: any) => globalThis.String(e)) : [], - } - }, - - toJSON(message: StringArrayRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.value?.length) { - obj.value = message.value - } - return obj - }, - - create, I>>(base?: I): StringArrayRequest { - return StringArrayRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): StringArrayRequest { - const message = createBaseStringArrayRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.value = object.value?.map((e) => e) || [] - return message - }, -} - -function createBaseString(): String { - return { value: "" } -} - -export const String: MessageFns = { - encode(message: String, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.value !== "") { - writer.uint32(10).string(message.value) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): String { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseString() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.value = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): String { - return { value: isSet(object.value) ? globalThis.String(object.value) : "" } - }, - - toJSON(message: String): unknown { - const obj: any = {} - if (message.value !== "") { - obj.value = message.value - } - return obj - }, - - create, I>>(base?: I): String { - return String.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): String { - const message = createBaseString() - message.value = object.value ?? "" - return message - }, -} - -function createBaseInt64Request(): Int64Request { - return { metadata: undefined, value: 0 } -} - -export const Int64Request: MessageFns = { - encode(message: Int64Request, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.value !== 0) { - writer.uint32(16).int64(message.value) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Int64Request { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseInt64Request() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.value = longToNumber(reader.int64()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): Int64Request { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - value: isSet(object.value) ? globalThis.Number(object.value) : 0, - } - }, - - toJSON(message: Int64Request): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.value !== 0) { - obj.value = Math.round(message.value) - } - return obj - }, - - create, I>>(base?: I): Int64Request { - return Int64Request.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): Int64Request { - const message = createBaseInt64Request() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.value = object.value ?? 0 - return message - }, -} - -function createBaseInt64(): Int64 { - return { value: 0 } -} - -export const Int64: MessageFns = { - encode(message: Int64, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.value !== 0) { - writer.uint32(8).int64(message.value) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Int64 { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseInt64() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.value = longToNumber(reader.int64()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): Int64 { - return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 } - }, - - toJSON(message: Int64): unknown { - const obj: any = {} - if (message.value !== 0) { - obj.value = Math.round(message.value) - } - return obj - }, - - create, I>>(base?: I): Int64 { - return Int64.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): Int64 { - const message = createBaseInt64() - message.value = object.value ?? 0 - return message - }, -} - -function createBaseBytesRequest(): BytesRequest { - return { metadata: undefined, value: Buffer.alloc(0) } -} - -export const BytesRequest: MessageFns = { - encode(message: BytesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.value.length !== 0) { - writer.uint32(18).bytes(message.value) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): BytesRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseBytesRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.value = Buffer.from(reader.bytes()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): BytesRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - value: isSet(object.value) ? Buffer.from(bytesFromBase64(object.value)) : Buffer.alloc(0), - } - }, - - toJSON(message: BytesRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.value.length !== 0) { - obj.value = base64FromBytes(message.value) - } - return obj - }, - - create, I>>(base?: I): BytesRequest { - return BytesRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): BytesRequest { - const message = createBaseBytesRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.value = object.value ?? Buffer.alloc(0) - return message - }, -} - -function createBaseBytes(): Bytes { - return { value: Buffer.alloc(0) } -} - -export const Bytes: MessageFns = { - encode(message: Bytes, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.value.length !== 0) { - writer.uint32(10).bytes(message.value) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Bytes { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseBytes() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.value = Buffer.from(reader.bytes()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): Bytes { - return { value: isSet(object.value) ? Buffer.from(bytesFromBase64(object.value)) : Buffer.alloc(0) } - }, - - toJSON(message: Bytes): unknown { - const obj: any = {} - if (message.value.length !== 0) { - obj.value = base64FromBytes(message.value) - } - return obj - }, - - create, I>>(base?: I): Bytes { - return Bytes.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): Bytes { - const message = createBaseBytes() - message.value = object.value ?? Buffer.alloc(0) - return message - }, -} - -function createBaseBooleanRequest(): BooleanRequest { - return { metadata: undefined, value: false } -} - -export const BooleanRequest: MessageFns = { - encode(message: BooleanRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.value !== false) { - writer.uint32(16).bool(message.value) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): BooleanRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseBooleanRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.value = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): BooleanRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - value: isSet(object.value) ? globalThis.Boolean(object.value) : false, - } - }, - - toJSON(message: BooleanRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.value !== false) { - obj.value = message.value - } - return obj - }, - - create, I>>(base?: I): BooleanRequest { - return BooleanRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): BooleanRequest { - const message = createBaseBooleanRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.value = object.value ?? false - return message - }, -} - -function createBaseBoolean(): Boolean { - return { value: false } -} - -export const Boolean: MessageFns = { - encode(message: Boolean, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.value !== false) { - writer.uint32(8).bool(message.value) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Boolean { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseBoolean() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.value = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): Boolean { - return { value: isSet(object.value) ? globalThis.Boolean(object.value) : false } - }, - - toJSON(message: Boolean): unknown { - const obj: any = {} - if (message.value !== false) { - obj.value = message.value - } - return obj - }, - - create, I>>(base?: I): Boolean { - return Boolean.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): Boolean { - const message = createBaseBoolean() - message.value = object.value ?? false - return message - }, -} - -function createBaseStringArray(): StringArray { - return { values: [] } -} - -export const StringArray: MessageFns = { - encode(message: StringArray, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - for (const v of message.values) { - writer.uint32(10).string(v!) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): StringArray { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseStringArray() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.values.push(reader.string()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): StringArray { - return { - values: globalThis.Array.isArray(object?.values) ? object.values.map((e: any) => globalThis.String(e)) : [], - } - }, - - toJSON(message: StringArray): unknown { - const obj: any = {} - if (message.values?.length) { - obj.values = message.values - } - return obj - }, - - create, I>>(base?: I): StringArray { - return StringArray.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): StringArray { - const message = createBaseStringArray() - message.values = object.values?.map((e) => e) || [] - return message - }, -} - -function bytesFromBase64(b64: string): Uint8Array { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")) -} - -function base64FromBytes(arr: Uint8Array): string { - return globalThis.Buffer.from(arr).toString("base64") -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined - -export type DeepPartial = T extends Builtin - ? T - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial - -type KeysOfUnion = T extends T ? keyof T : never -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } - -function longToNumber(int64: { toString(): string }): number { - const num = globalThis.Number(int64.toString()) - if (num > globalThis.Number.MAX_SAFE_INTEGER) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER") - } - if (num < globalThis.Number.MIN_SAFE_INTEGER) { - throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER") - } - return num -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter - decode(input: BinaryReader | Uint8Array, length?: number): T - fromJSON(object: any): T - toJSON(message: T): unknown - create, I>>(base?: I): T - fromPartial, I>>(object: I): T -} diff --git a/src/shared/proto/file.ts b/src/shared/proto/file.ts deleted file mode 100644 index 1f5377cd..00000000 --- a/src/shared/proto/file.ts +++ /dev/null @@ -1,1813 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: file.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { Empty, EmptyRequest, Metadata, StringArray, StringRequest } from "./common" - -export const protobufPackage = "cline" - -/** Response for refreshRules operation */ -export interface RefreshedRules { - globalClineRulesToggles?: ClineRulesToggles | undefined - localClineRulesToggles?: ClineRulesToggles | undefined - localCursorRulesToggles?: ClineRulesToggles | undefined - localWindsurfRulesToggles?: ClineRulesToggles | undefined - workflowToggles?: ClineRulesToggles | undefined -} - -/** Request to toggle a Windsurf rule */ -export interface ToggleWindsurfRuleRequest { - metadata?: Metadata | undefined - /** Path to the rule file */ - rulePath: string - /** Whether to enable or disable the rule */ - enabled: boolean -} - -/** Request to convert a list of URIs to relative paths */ -export interface RelativePathsRequest { - metadata?: Metadata | undefined - uris: string[] -} - -/** Response containing the converted relative paths */ -export interface RelativePaths { - paths: string[] -} - -/** Request for file search operations */ -export interface FileSearchRequest { - metadata?: Metadata | undefined - /** Search query string */ - query: string - /** Optional request ID for tracking requests */ - mentionsRequestId?: string | undefined - /** Optional limit for results (default: 20) */ - limit?: number | undefined -} - -/** Result for file search operations */ -export interface FileSearchResults { - /** Array of file/folder results */ - results: FileInfo[] - /** Echo of the request ID for tracking */ - mentionsRequestId?: string | undefined -} - -/** File information structure for search results */ -export interface FileInfo { - /** Relative path from workspace root */ - path: string - /** "file" or "folder" */ - type: string - /** Display name (usually basename) */ - label?: string | undefined -} - -/** Response for searchCommits */ -export interface GitCommits { - commits: GitCommit[] -} - -/** Represents a Git commit */ -export interface GitCommit { - hash: string - shortHash: string - subject: string - author: string - date: string -} - -/** Unified request for all rule file operations */ -export interface RuleFileRequest { - metadata?: Metadata | undefined - /** Common field for all operations */ - isGlobal: boolean - /** Path field for deleteRuleFile (optional) */ - rulePath?: string | undefined - /** Filename field for createRuleFile (optional) */ - filename?: string | undefined - /** Type of the file to create (optional) */ - type?: string | undefined -} - -/** Result for rule file operations with meaningful data only */ -export interface RuleFile { - /** Path to the rule file */ - filePath: string - /** Filename for display purposes */ - displayName: string - /** For createRuleFile, indicates if file already existed */ - alreadyExists: boolean -} - -/** Request to toggle a Cline rule */ -export interface ToggleClineRuleRequest { - metadata?: Metadata | undefined - /** Whether this is a global rule or workspace rule */ - isGlobal: boolean - /** Path to the rule file */ - rulePath: string - /** Whether to enable or disable the rule */ - enabled: boolean -} - -/** Maps from filepath to enabled/disabled status, matching app's ClineRulesToggles type */ -export interface ClineRulesToggles { - toggles: { [key: string]: boolean } -} - -export interface ClineRulesToggles_TogglesEntry { - key: string - value: boolean -} - -/** Response for toggleClineRule operation */ -export interface ToggleClineRules { - globalClineRulesToggles?: ClineRulesToggles | undefined - localClineRulesToggles?: ClineRulesToggles | undefined -} - -/** Request to toggle a Cursor rule */ -export interface ToggleCursorRuleRequest { - metadata?: Metadata | undefined - /** Path to the rule file */ - rulePath: string - /** Whether to enable or disable the rule */ - enabled: boolean -} - -function createBaseRefreshedRules(): RefreshedRules { - return { - globalClineRulesToggles: undefined, - localClineRulesToggles: undefined, - localCursorRulesToggles: undefined, - localWindsurfRulesToggles: undefined, - workflowToggles: undefined, - } -} - -export const RefreshedRules: MessageFns = { - encode(message: RefreshedRules, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.globalClineRulesToggles !== undefined) { - ClineRulesToggles.encode(message.globalClineRulesToggles, writer.uint32(10).fork()).join() - } - if (message.localClineRulesToggles !== undefined) { - ClineRulesToggles.encode(message.localClineRulesToggles, writer.uint32(18).fork()).join() - } - if (message.localCursorRulesToggles !== undefined) { - ClineRulesToggles.encode(message.localCursorRulesToggles, writer.uint32(26).fork()).join() - } - if (message.localWindsurfRulesToggles !== undefined) { - ClineRulesToggles.encode(message.localWindsurfRulesToggles, writer.uint32(34).fork()).join() - } - if (message.workflowToggles !== undefined) { - ClineRulesToggles.encode(message.workflowToggles, writer.uint32(42).fork()).join() - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): RefreshedRules { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseRefreshedRules() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.globalClineRulesToggles = ClineRulesToggles.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.localClineRulesToggles = ClineRulesToggles.decode(reader, reader.uint32()) - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.localCursorRulesToggles = ClineRulesToggles.decode(reader, reader.uint32()) - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.localWindsurfRulesToggles = ClineRulesToggles.decode(reader, reader.uint32()) - continue - } - case 5: { - if (tag !== 42) { - break - } - - message.workflowToggles = ClineRulesToggles.decode(reader, reader.uint32()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): RefreshedRules { - return { - globalClineRulesToggles: isSet(object.globalClineRulesToggles) - ? ClineRulesToggles.fromJSON(object.globalClineRulesToggles) - : undefined, - localClineRulesToggles: isSet(object.localClineRulesToggles) - ? ClineRulesToggles.fromJSON(object.localClineRulesToggles) - : undefined, - localCursorRulesToggles: isSet(object.localCursorRulesToggles) - ? ClineRulesToggles.fromJSON(object.localCursorRulesToggles) - : undefined, - localWindsurfRulesToggles: isSet(object.localWindsurfRulesToggles) - ? ClineRulesToggles.fromJSON(object.localWindsurfRulesToggles) - : undefined, - workflowToggles: isSet(object.workflowToggles) ? ClineRulesToggles.fromJSON(object.workflowToggles) : undefined, - } - }, - - toJSON(message: RefreshedRules): unknown { - const obj: any = {} - if (message.globalClineRulesToggles !== undefined) { - obj.globalClineRulesToggles = ClineRulesToggles.toJSON(message.globalClineRulesToggles) - } - if (message.localClineRulesToggles !== undefined) { - obj.localClineRulesToggles = ClineRulesToggles.toJSON(message.localClineRulesToggles) - } - if (message.localCursorRulesToggles !== undefined) { - obj.localCursorRulesToggles = ClineRulesToggles.toJSON(message.localCursorRulesToggles) - } - if (message.localWindsurfRulesToggles !== undefined) { - obj.localWindsurfRulesToggles = ClineRulesToggles.toJSON(message.localWindsurfRulesToggles) - } - if (message.workflowToggles !== undefined) { - obj.workflowToggles = ClineRulesToggles.toJSON(message.workflowToggles) - } - return obj - }, - - create, I>>(base?: I): RefreshedRules { - return RefreshedRules.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): RefreshedRules { - const message = createBaseRefreshedRules() - message.globalClineRulesToggles = - object.globalClineRulesToggles !== undefined && object.globalClineRulesToggles !== null - ? ClineRulesToggles.fromPartial(object.globalClineRulesToggles) - : undefined - message.localClineRulesToggles = - object.localClineRulesToggles !== undefined && object.localClineRulesToggles !== null - ? ClineRulesToggles.fromPartial(object.localClineRulesToggles) - : undefined - message.localCursorRulesToggles = - object.localCursorRulesToggles !== undefined && object.localCursorRulesToggles !== null - ? ClineRulesToggles.fromPartial(object.localCursorRulesToggles) - : undefined - message.localWindsurfRulesToggles = - object.localWindsurfRulesToggles !== undefined && object.localWindsurfRulesToggles !== null - ? ClineRulesToggles.fromPartial(object.localWindsurfRulesToggles) - : undefined - message.workflowToggles = - object.workflowToggles !== undefined && object.workflowToggles !== null - ? ClineRulesToggles.fromPartial(object.workflowToggles) - : undefined - return message - }, -} - -function createBaseToggleWindsurfRuleRequest(): ToggleWindsurfRuleRequest { - return { metadata: undefined, rulePath: "", enabled: false } -} - -export const ToggleWindsurfRuleRequest: MessageFns = { - encode(message: ToggleWindsurfRuleRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.rulePath !== "") { - writer.uint32(18).string(message.rulePath) - } - if (message.enabled !== false) { - writer.uint32(24).bool(message.enabled) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ToggleWindsurfRuleRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseToggleWindsurfRuleRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.rulePath = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.enabled = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ToggleWindsurfRuleRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - rulePath: isSet(object.rulePath) ? globalThis.String(object.rulePath) : "", - enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false, - } - }, - - toJSON(message: ToggleWindsurfRuleRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.rulePath !== "") { - obj.rulePath = message.rulePath - } - if (message.enabled !== false) { - obj.enabled = message.enabled - } - return obj - }, - - create, I>>(base?: I): ToggleWindsurfRuleRequest { - return ToggleWindsurfRuleRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ToggleWindsurfRuleRequest { - const message = createBaseToggleWindsurfRuleRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.rulePath = object.rulePath ?? "" - message.enabled = object.enabled ?? false - return message - }, -} - -function createBaseRelativePathsRequest(): RelativePathsRequest { - return { metadata: undefined, uris: [] } -} - -export const RelativePathsRequest: MessageFns = { - encode(message: RelativePathsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - for (const v of message.uris) { - writer.uint32(18).string(v!) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): RelativePathsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseRelativePathsRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.uris.push(reader.string()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): RelativePathsRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - uris: globalThis.Array.isArray(object?.uris) ? object.uris.map((e: any) => globalThis.String(e)) : [], - } - }, - - toJSON(message: RelativePathsRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.uris?.length) { - obj.uris = message.uris - } - return obj - }, - - create, I>>(base?: I): RelativePathsRequest { - return RelativePathsRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): RelativePathsRequest { - const message = createBaseRelativePathsRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.uris = object.uris?.map((e) => e) || [] - return message - }, -} - -function createBaseRelativePaths(): RelativePaths { - return { paths: [] } -} - -export const RelativePaths: MessageFns = { - encode(message: RelativePaths, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - for (const v of message.paths) { - writer.uint32(10).string(v!) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): RelativePaths { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseRelativePaths() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.paths.push(reader.string()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): RelativePaths { - return { paths: globalThis.Array.isArray(object?.paths) ? object.paths.map((e: any) => globalThis.String(e)) : [] } - }, - - toJSON(message: RelativePaths): unknown { - const obj: any = {} - if (message.paths?.length) { - obj.paths = message.paths - } - return obj - }, - - create, I>>(base?: I): RelativePaths { - return RelativePaths.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): RelativePaths { - const message = createBaseRelativePaths() - message.paths = object.paths?.map((e) => e) || [] - return message - }, -} - -function createBaseFileSearchRequest(): FileSearchRequest { - return { metadata: undefined, query: "", mentionsRequestId: undefined, limit: undefined } -} - -export const FileSearchRequest: MessageFns = { - encode(message: FileSearchRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.query !== "") { - writer.uint32(18).string(message.query) - } - if (message.mentionsRequestId !== undefined) { - writer.uint32(26).string(message.mentionsRequestId) - } - if (message.limit !== undefined) { - writer.uint32(32).int32(message.limit) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): FileSearchRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseFileSearchRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.query = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.mentionsRequestId = reader.string() - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.limit = reader.int32() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): FileSearchRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - query: isSet(object.query) ? globalThis.String(object.query) : "", - mentionsRequestId: isSet(object.mentionsRequestId) ? globalThis.String(object.mentionsRequestId) : undefined, - limit: isSet(object.limit) ? globalThis.Number(object.limit) : undefined, - } - }, - - toJSON(message: FileSearchRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.query !== "") { - obj.query = message.query - } - if (message.mentionsRequestId !== undefined) { - obj.mentionsRequestId = message.mentionsRequestId - } - if (message.limit !== undefined) { - obj.limit = Math.round(message.limit) - } - return obj - }, - - create, I>>(base?: I): FileSearchRequest { - return FileSearchRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): FileSearchRequest { - const message = createBaseFileSearchRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.query = object.query ?? "" - message.mentionsRequestId = object.mentionsRequestId ?? undefined - message.limit = object.limit ?? undefined - return message - }, -} - -function createBaseFileSearchResults(): FileSearchResults { - return { results: [], mentionsRequestId: undefined } -} - -export const FileSearchResults: MessageFns = { - encode(message: FileSearchResults, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - for (const v of message.results) { - FileInfo.encode(v!, writer.uint32(10).fork()).join() - } - if (message.mentionsRequestId !== undefined) { - writer.uint32(18).string(message.mentionsRequestId) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): FileSearchResults { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseFileSearchResults() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.results.push(FileInfo.decode(reader, reader.uint32())) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.mentionsRequestId = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): FileSearchResults { - return { - results: globalThis.Array.isArray(object?.results) ? object.results.map((e: any) => FileInfo.fromJSON(e)) : [], - mentionsRequestId: isSet(object.mentionsRequestId) ? globalThis.String(object.mentionsRequestId) : undefined, - } - }, - - toJSON(message: FileSearchResults): unknown { - const obj: any = {} - if (message.results?.length) { - obj.results = message.results.map((e) => FileInfo.toJSON(e)) - } - if (message.mentionsRequestId !== undefined) { - obj.mentionsRequestId = message.mentionsRequestId - } - return obj - }, - - create, I>>(base?: I): FileSearchResults { - return FileSearchResults.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): FileSearchResults { - const message = createBaseFileSearchResults() - message.results = object.results?.map((e) => FileInfo.fromPartial(e)) || [] - message.mentionsRequestId = object.mentionsRequestId ?? undefined - return message - }, -} - -function createBaseFileInfo(): FileInfo { - return { path: "", type: "", label: undefined } -} - -export const FileInfo: MessageFns = { - encode(message: FileInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.path !== "") { - writer.uint32(10).string(message.path) - } - if (message.type !== "") { - writer.uint32(18).string(message.type) - } - if (message.label !== undefined) { - writer.uint32(26).string(message.label) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): FileInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseFileInfo() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.path = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.type = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.label = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): FileInfo { - return { - path: isSet(object.path) ? globalThis.String(object.path) : "", - type: isSet(object.type) ? globalThis.String(object.type) : "", - label: isSet(object.label) ? globalThis.String(object.label) : undefined, - } - }, - - toJSON(message: FileInfo): unknown { - const obj: any = {} - if (message.path !== "") { - obj.path = message.path - } - if (message.type !== "") { - obj.type = message.type - } - if (message.label !== undefined) { - obj.label = message.label - } - return obj - }, - - create, I>>(base?: I): FileInfo { - return FileInfo.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): FileInfo { - const message = createBaseFileInfo() - message.path = object.path ?? "" - message.type = object.type ?? "" - message.label = object.label ?? undefined - return message - }, -} - -function createBaseGitCommits(): GitCommits { - return { commits: [] } -} - -export const GitCommits: MessageFns = { - encode(message: GitCommits, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - for (const v of message.commits) { - GitCommit.encode(v!, writer.uint32(10).fork()).join() - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): GitCommits { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseGitCommits() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.commits.push(GitCommit.decode(reader, reader.uint32())) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): GitCommits { - return { - commits: globalThis.Array.isArray(object?.commits) ? object.commits.map((e: any) => GitCommit.fromJSON(e)) : [], - } - }, - - toJSON(message: GitCommits): unknown { - const obj: any = {} - if (message.commits?.length) { - obj.commits = message.commits.map((e) => GitCommit.toJSON(e)) - } - return obj - }, - - create, I>>(base?: I): GitCommits { - return GitCommits.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): GitCommits { - const message = createBaseGitCommits() - message.commits = object.commits?.map((e) => GitCommit.fromPartial(e)) || [] - return message - }, -} - -function createBaseGitCommit(): GitCommit { - return { hash: "", shortHash: "", subject: "", author: "", date: "" } -} - -export const GitCommit: MessageFns = { - encode(message: GitCommit, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.hash !== "") { - writer.uint32(10).string(message.hash) - } - if (message.shortHash !== "") { - writer.uint32(18).string(message.shortHash) - } - if (message.subject !== "") { - writer.uint32(26).string(message.subject) - } - if (message.author !== "") { - writer.uint32(34).string(message.author) - } - if (message.date !== "") { - writer.uint32(42).string(message.date) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): GitCommit { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseGitCommit() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.hash = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.shortHash = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.subject = reader.string() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.author = reader.string() - continue - } - case 5: { - if (tag !== 42) { - break - } - - message.date = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): GitCommit { - return { - hash: isSet(object.hash) ? globalThis.String(object.hash) : "", - shortHash: isSet(object.shortHash) ? globalThis.String(object.shortHash) : "", - subject: isSet(object.subject) ? globalThis.String(object.subject) : "", - author: isSet(object.author) ? globalThis.String(object.author) : "", - date: isSet(object.date) ? globalThis.String(object.date) : "", - } - }, - - toJSON(message: GitCommit): unknown { - const obj: any = {} - if (message.hash !== "") { - obj.hash = message.hash - } - if (message.shortHash !== "") { - obj.shortHash = message.shortHash - } - if (message.subject !== "") { - obj.subject = message.subject - } - if (message.author !== "") { - obj.author = message.author - } - if (message.date !== "") { - obj.date = message.date - } - return obj - }, - - create, I>>(base?: I): GitCommit { - return GitCommit.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): GitCommit { - const message = createBaseGitCommit() - message.hash = object.hash ?? "" - message.shortHash = object.shortHash ?? "" - message.subject = object.subject ?? "" - message.author = object.author ?? "" - message.date = object.date ?? "" - return message - }, -} - -function createBaseRuleFileRequest(): RuleFileRequest { - return { metadata: undefined, isGlobal: false, rulePath: undefined, filename: undefined, type: undefined } -} - -export const RuleFileRequest: MessageFns = { - encode(message: RuleFileRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.isGlobal !== false) { - writer.uint32(16).bool(message.isGlobal) - } - if (message.rulePath !== undefined) { - writer.uint32(26).string(message.rulePath) - } - if (message.filename !== undefined) { - writer.uint32(34).string(message.filename) - } - if (message.type !== undefined) { - writer.uint32(42).string(message.type) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): RuleFileRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseRuleFileRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.isGlobal = reader.bool() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.rulePath = reader.string() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.filename = reader.string() - continue - } - case 5: { - if (tag !== 42) { - break - } - - message.type = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): RuleFileRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - isGlobal: isSet(object.isGlobal) ? globalThis.Boolean(object.isGlobal) : false, - rulePath: isSet(object.rulePath) ? globalThis.String(object.rulePath) : undefined, - filename: isSet(object.filename) ? globalThis.String(object.filename) : undefined, - type: isSet(object.type) ? globalThis.String(object.type) : undefined, - } - }, - - toJSON(message: RuleFileRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.isGlobal !== false) { - obj.isGlobal = message.isGlobal - } - if (message.rulePath !== undefined) { - obj.rulePath = message.rulePath - } - if (message.filename !== undefined) { - obj.filename = message.filename - } - if (message.type !== undefined) { - obj.type = message.type - } - return obj - }, - - create, I>>(base?: I): RuleFileRequest { - return RuleFileRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): RuleFileRequest { - const message = createBaseRuleFileRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.isGlobal = object.isGlobal ?? false - message.rulePath = object.rulePath ?? undefined - message.filename = object.filename ?? undefined - message.type = object.type ?? undefined - return message - }, -} - -function createBaseRuleFile(): RuleFile { - return { filePath: "", displayName: "", alreadyExists: false } -} - -export const RuleFile: MessageFns = { - encode(message: RuleFile, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.filePath !== "") { - writer.uint32(10).string(message.filePath) - } - if (message.displayName !== "") { - writer.uint32(18).string(message.displayName) - } - if (message.alreadyExists !== false) { - writer.uint32(24).bool(message.alreadyExists) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): RuleFile { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseRuleFile() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.filePath = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.displayName = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.alreadyExists = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): RuleFile { - return { - filePath: isSet(object.filePath) ? globalThis.String(object.filePath) : "", - displayName: isSet(object.displayName) ? globalThis.String(object.displayName) : "", - alreadyExists: isSet(object.alreadyExists) ? globalThis.Boolean(object.alreadyExists) : false, - } - }, - - toJSON(message: RuleFile): unknown { - const obj: any = {} - if (message.filePath !== "") { - obj.filePath = message.filePath - } - if (message.displayName !== "") { - obj.displayName = message.displayName - } - if (message.alreadyExists !== false) { - obj.alreadyExists = message.alreadyExists - } - return obj - }, - - create, I>>(base?: I): RuleFile { - return RuleFile.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): RuleFile { - const message = createBaseRuleFile() - message.filePath = object.filePath ?? "" - message.displayName = object.displayName ?? "" - message.alreadyExists = object.alreadyExists ?? false - return message - }, -} - -function createBaseToggleClineRuleRequest(): ToggleClineRuleRequest { - return { metadata: undefined, isGlobal: false, rulePath: "", enabled: false } -} - -export const ToggleClineRuleRequest: MessageFns = { - encode(message: ToggleClineRuleRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.isGlobal !== false) { - writer.uint32(16).bool(message.isGlobal) - } - if (message.rulePath !== "") { - writer.uint32(26).string(message.rulePath) - } - if (message.enabled !== false) { - writer.uint32(32).bool(message.enabled) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ToggleClineRuleRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseToggleClineRuleRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.isGlobal = reader.bool() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.rulePath = reader.string() - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.enabled = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ToggleClineRuleRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - isGlobal: isSet(object.isGlobal) ? globalThis.Boolean(object.isGlobal) : false, - rulePath: isSet(object.rulePath) ? globalThis.String(object.rulePath) : "", - enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false, - } - }, - - toJSON(message: ToggleClineRuleRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.isGlobal !== false) { - obj.isGlobal = message.isGlobal - } - if (message.rulePath !== "") { - obj.rulePath = message.rulePath - } - if (message.enabled !== false) { - obj.enabled = message.enabled - } - return obj - }, - - create, I>>(base?: I): ToggleClineRuleRequest { - return ToggleClineRuleRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ToggleClineRuleRequest { - const message = createBaseToggleClineRuleRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.isGlobal = object.isGlobal ?? false - message.rulePath = object.rulePath ?? "" - message.enabled = object.enabled ?? false - return message - }, -} - -function createBaseClineRulesToggles(): ClineRulesToggles { - return { toggles: {} } -} - -export const ClineRulesToggles: MessageFns = { - encode(message: ClineRulesToggles, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - Object.entries(message.toggles).forEach(([key, value]) => { - ClineRulesToggles_TogglesEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join() - }) - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ClineRulesToggles { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseClineRulesToggles() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - const entry1 = ClineRulesToggles_TogglesEntry.decode(reader, reader.uint32()) - if (entry1.value !== undefined) { - message.toggles[entry1.key] = entry1.value - } - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ClineRulesToggles { - return { - toggles: isObject(object.toggles) - ? Object.entries(object.toggles).reduce<{ [key: string]: boolean }>((acc, [key, value]) => { - acc[key] = Boolean(value) - return acc - }, {}) - : {}, - } - }, - - toJSON(message: ClineRulesToggles): unknown { - const obj: any = {} - if (message.toggles) { - const entries = Object.entries(message.toggles) - if (entries.length > 0) { - obj.toggles = {} - entries.forEach(([k, v]) => { - obj.toggles[k] = v - }) - } - } - return obj - }, - - create, I>>(base?: I): ClineRulesToggles { - return ClineRulesToggles.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ClineRulesToggles { - const message = createBaseClineRulesToggles() - message.toggles = Object.entries(object.toggles ?? {}).reduce<{ [key: string]: boolean }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = globalThis.Boolean(value) - } - return acc - }, {}) - return message - }, -} - -function createBaseClineRulesToggles_TogglesEntry(): ClineRulesToggles_TogglesEntry { - return { key: "", value: false } -} - -export const ClineRulesToggles_TogglesEntry: MessageFns = { - encode(message: ClineRulesToggles_TogglesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.key !== "") { - writer.uint32(10).string(message.key) - } - if (message.value !== false) { - writer.uint32(16).bool(message.value) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ClineRulesToggles_TogglesEntry { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseClineRulesToggles_TogglesEntry() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.key = reader.string() - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.value = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ClineRulesToggles_TogglesEntry { - return { - key: isSet(object.key) ? globalThis.String(object.key) : "", - value: isSet(object.value) ? globalThis.Boolean(object.value) : false, - } - }, - - toJSON(message: ClineRulesToggles_TogglesEntry): unknown { - const obj: any = {} - if (message.key !== "") { - obj.key = message.key - } - if (message.value !== false) { - obj.value = message.value - } - return obj - }, - - create, I>>(base?: I): ClineRulesToggles_TogglesEntry { - return ClineRulesToggles_TogglesEntry.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ClineRulesToggles_TogglesEntry { - const message = createBaseClineRulesToggles_TogglesEntry() - message.key = object.key ?? "" - message.value = object.value ?? false - return message - }, -} - -function createBaseToggleClineRules(): ToggleClineRules { - return { globalClineRulesToggles: undefined, localClineRulesToggles: undefined } -} - -export const ToggleClineRules: MessageFns = { - encode(message: ToggleClineRules, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.globalClineRulesToggles !== undefined) { - ClineRulesToggles.encode(message.globalClineRulesToggles, writer.uint32(10).fork()).join() - } - if (message.localClineRulesToggles !== undefined) { - ClineRulesToggles.encode(message.localClineRulesToggles, writer.uint32(18).fork()).join() - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ToggleClineRules { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseToggleClineRules() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.globalClineRulesToggles = ClineRulesToggles.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.localClineRulesToggles = ClineRulesToggles.decode(reader, reader.uint32()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ToggleClineRules { - return { - globalClineRulesToggles: isSet(object.globalClineRulesToggles) - ? ClineRulesToggles.fromJSON(object.globalClineRulesToggles) - : undefined, - localClineRulesToggles: isSet(object.localClineRulesToggles) - ? ClineRulesToggles.fromJSON(object.localClineRulesToggles) - : undefined, - } - }, - - toJSON(message: ToggleClineRules): unknown { - const obj: any = {} - if (message.globalClineRulesToggles !== undefined) { - obj.globalClineRulesToggles = ClineRulesToggles.toJSON(message.globalClineRulesToggles) - } - if (message.localClineRulesToggles !== undefined) { - obj.localClineRulesToggles = ClineRulesToggles.toJSON(message.localClineRulesToggles) - } - return obj - }, - - create, I>>(base?: I): ToggleClineRules { - return ToggleClineRules.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ToggleClineRules { - const message = createBaseToggleClineRules() - message.globalClineRulesToggles = - object.globalClineRulesToggles !== undefined && object.globalClineRulesToggles !== null - ? ClineRulesToggles.fromPartial(object.globalClineRulesToggles) - : undefined - message.localClineRulesToggles = - object.localClineRulesToggles !== undefined && object.localClineRulesToggles !== null - ? ClineRulesToggles.fromPartial(object.localClineRulesToggles) - : undefined - return message - }, -} - -function createBaseToggleCursorRuleRequest(): ToggleCursorRuleRequest { - return { metadata: undefined, rulePath: "", enabled: false } -} - -export const ToggleCursorRuleRequest: MessageFns = { - encode(message: ToggleCursorRuleRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.rulePath !== "") { - writer.uint32(18).string(message.rulePath) - } - if (message.enabled !== false) { - writer.uint32(24).bool(message.enabled) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ToggleCursorRuleRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseToggleCursorRuleRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.rulePath = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.enabled = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ToggleCursorRuleRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - rulePath: isSet(object.rulePath) ? globalThis.String(object.rulePath) : "", - enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false, - } - }, - - toJSON(message: ToggleCursorRuleRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.rulePath !== "") { - obj.rulePath = message.rulePath - } - if (message.enabled !== false) { - obj.enabled = message.enabled - } - return obj - }, - - create, I>>(base?: I): ToggleCursorRuleRequest { - return ToggleCursorRuleRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ToggleCursorRuleRequest { - const message = createBaseToggleCursorRuleRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.rulePath = object.rulePath ?? "" - message.enabled = object.enabled ?? false - return message - }, -} - -/** Service for file-related operations */ -export type FileServiceDefinition = typeof FileServiceDefinition -export const FileServiceDefinition = { - name: "FileService", - fullName: "cline.FileService", - methods: { - /** Copies text to clipboard */ - copyToClipboard: { - name: "copyToClipboard", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Opens a file in the editor */ - openFile: { - name: "openFile", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Opens an image in the system viewer */ - openImage: { - name: "openImage", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Opens a mention (file, path, git commit, problem, terminal, or URL) */ - openMention: { - name: "openMention", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Deletes a rule file from either global or workspace rules directory */ - deleteRuleFile: { - name: "deleteRuleFile", - requestType: RuleFileRequest, - requestStream: false, - responseType: RuleFile, - responseStream: false, - options: {}, - }, - /** Creates a rule file from either global or workspace rules directory */ - createRuleFile: { - name: "createRuleFile", - requestType: RuleFileRequest, - requestStream: false, - responseType: RuleFile, - responseStream: false, - options: {}, - }, - /** Search git commits in the workspace */ - searchCommits: { - name: "searchCommits", - requestType: StringRequest, - requestStream: false, - responseType: GitCommits, - responseStream: false, - options: {}, - }, - /** Select images from the file system and return as data URLs */ - selectImages: { - name: "selectImages", - requestType: EmptyRequest, - requestStream: false, - responseType: StringArray, - responseStream: false, - options: {}, - }, - /** Convert URIs to workspace-relative paths */ - getRelativePaths: { - name: "getRelativePaths", - requestType: RelativePathsRequest, - requestStream: false, - responseType: RelativePaths, - responseStream: false, - options: {}, - }, - /** Search for files in the workspace with fuzzy matching */ - searchFiles: { - name: "searchFiles", - requestType: FileSearchRequest, - requestStream: false, - responseType: FileSearchResults, - responseStream: false, - options: {}, - }, - /** Toggle a Cline rule (enable or disable) */ - toggleClineRule: { - name: "toggleClineRule", - requestType: ToggleClineRuleRequest, - requestStream: false, - responseType: ToggleClineRules, - responseStream: false, - options: {}, - }, - /** Toggle a Cursor rule (enable or disable) */ - toggleCursorRule: { - name: "toggleCursorRule", - requestType: ToggleCursorRuleRequest, - requestStream: false, - responseType: ClineRulesToggles, - responseStream: false, - options: {}, - }, - /** Toggle a Windsurf rule (enable or disable) */ - toggleWindsurfRule: { - name: "toggleWindsurfRule", - requestType: ToggleWindsurfRuleRequest, - requestStream: false, - responseType: ClineRulesToggles, - responseStream: false, - options: {}, - }, - /** Refreshes all rule toggles (Cline, External, and Workflows) */ - refreshRules: { - name: "refreshRules", - requestType: EmptyRequest, - requestStream: false, - responseType: RefreshedRules, - responseStream: false, - options: {}, - }, - }, -} as const - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined - -export type DeepPartial = T extends Builtin - ? T - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial - -type KeysOfUnion = T extends T ? keyof T : never -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } - -function isObject(value: any): boolean { - return typeof value === "object" && value !== null -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter - decode(input: BinaryReader | Uint8Array, length?: number): T - fromJSON(object: any): T - toJSON(message: T): unknown - create, I>>(base?: I): T - fromPartial, I>>(object: I): T -} diff --git a/src/shared/proto/mcp.ts b/src/shared/proto/mcp.ts deleted file mode 100644 index 7b0f6620..00000000 --- a/src/shared/proto/mcp.ts +++ /dev/null @@ -1,1632 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: mcp.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { Empty, EmptyRequest, Metadata, StringRequest } from "./common" - -export const protobufPackage = "cline" - -export enum McpServerStatus { - /** - * MCP_SERVER_STATUS_DISCONNECTED - Protobuf enums (in proto3) must have a zero value defined, which serves as the default if the field isn't explicitly set. - * To align with the required nature of the TypeScript type and avoid an unnecessary UNSPECIFIED state, we map one of the existing statuses to this zero value. - */ - MCP_SERVER_STATUS_DISCONNECTED = 0, - MCP_SERVER_STATUS_CONNECTED = 1, - MCP_SERVER_STATUS_CONNECTING = 2, - UNRECOGNIZED = -1, -} - -export function mcpServerStatusFromJSON(object: any): McpServerStatus { - switch (object) { - case 0: - case "MCP_SERVER_STATUS_DISCONNECTED": - return McpServerStatus.MCP_SERVER_STATUS_DISCONNECTED - case 1: - case "MCP_SERVER_STATUS_CONNECTED": - return McpServerStatus.MCP_SERVER_STATUS_CONNECTED - case 2: - case "MCP_SERVER_STATUS_CONNECTING": - return McpServerStatus.MCP_SERVER_STATUS_CONNECTING - case -1: - case "UNRECOGNIZED": - default: - return McpServerStatus.UNRECOGNIZED - } -} - -export function mcpServerStatusToJSON(object: McpServerStatus): string { - switch (object) { - case McpServerStatus.MCP_SERVER_STATUS_DISCONNECTED: - return "MCP_SERVER_STATUS_DISCONNECTED" - case McpServerStatus.MCP_SERVER_STATUS_CONNECTED: - return "MCP_SERVER_STATUS_CONNECTED" - case McpServerStatus.MCP_SERVER_STATUS_CONNECTING: - return "MCP_SERVER_STATUS_CONNECTING" - case McpServerStatus.UNRECOGNIZED: - default: - return "UNRECOGNIZED" - } -} - -export interface ToggleMcpServerRequest { - metadata?: Metadata | undefined - serverName: string - disabled: boolean -} - -export interface UpdateMcpTimeoutRequest { - metadata?: Metadata | undefined - serverName: string - timeout: number -} - -export interface AddRemoteMcpServerRequest { - metadata?: Metadata | undefined - serverName: string - serverUrl: string -} - -export interface ToggleToolAutoApproveRequest { - metadata?: Metadata | undefined - serverName: string - toolNames: string[] - autoApprove: boolean -} - -export interface McpTool { - name: string - description?: string | undefined - inputSchema?: string | undefined - autoApprove?: boolean | undefined -} - -export interface McpResource { - uri: string - name: string - mimeType?: string | undefined - description?: string | undefined -} - -export interface McpResourceTemplate { - uriTemplate: string - name: string - mimeType?: string | undefined - description?: string | undefined -} - -export interface McpServer { - name: string - config: string - status: McpServerStatus - error?: string | undefined - tools: McpTool[] - resources: McpResource[] - resourceTemplates: McpResourceTemplate[] - disabled?: boolean | undefined - timeout?: number | undefined -} - -export interface McpServers { - mcpServers: McpServer[] -} - -export interface McpMarketplaceItem { - mcpId: string - githubUrl: string - name: string - author: string - description: string - codiconIcon: string - logoUrl: string - category: string - tags: string[] - requiresApiKey: boolean - readmeContent?: string | undefined - llmsInstallationContent?: string | undefined - isRecommended: boolean - githubStars: number - downloadCount: number - createdAt: string - updatedAt: string - lastGithubSync: string -} - -export interface McpMarketplaceCatalog { - items: McpMarketplaceItem[] -} - -function createBaseToggleMcpServerRequest(): ToggleMcpServerRequest { - return { metadata: undefined, serverName: "", disabled: false } -} - -export const ToggleMcpServerRequest: MessageFns = { - encode(message: ToggleMcpServerRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.serverName !== "") { - writer.uint32(18).string(message.serverName) - } - if (message.disabled !== false) { - writer.uint32(24).bool(message.disabled) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ToggleMcpServerRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseToggleMcpServerRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.serverName = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.disabled = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ToggleMcpServerRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - serverName: isSet(object.serverName) ? globalThis.String(object.serverName) : "", - disabled: isSet(object.disabled) ? globalThis.Boolean(object.disabled) : false, - } - }, - - toJSON(message: ToggleMcpServerRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.serverName !== "") { - obj.serverName = message.serverName - } - if (message.disabled !== false) { - obj.disabled = message.disabled - } - return obj - }, - - create, I>>(base?: I): ToggleMcpServerRequest { - return ToggleMcpServerRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ToggleMcpServerRequest { - const message = createBaseToggleMcpServerRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.serverName = object.serverName ?? "" - message.disabled = object.disabled ?? false - return message - }, -} - -function createBaseUpdateMcpTimeoutRequest(): UpdateMcpTimeoutRequest { - return { metadata: undefined, serverName: "", timeout: 0 } -} - -export const UpdateMcpTimeoutRequest: MessageFns = { - encode(message: UpdateMcpTimeoutRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.serverName !== "") { - writer.uint32(18).string(message.serverName) - } - if (message.timeout !== 0) { - writer.uint32(24).int32(message.timeout) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): UpdateMcpTimeoutRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseUpdateMcpTimeoutRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.serverName = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.timeout = reader.int32() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): UpdateMcpTimeoutRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - serverName: isSet(object.serverName) ? globalThis.String(object.serverName) : "", - timeout: isSet(object.timeout) ? globalThis.Number(object.timeout) : 0, - } - }, - - toJSON(message: UpdateMcpTimeoutRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.serverName !== "") { - obj.serverName = message.serverName - } - if (message.timeout !== 0) { - obj.timeout = Math.round(message.timeout) - } - return obj - }, - - create, I>>(base?: I): UpdateMcpTimeoutRequest { - return UpdateMcpTimeoutRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): UpdateMcpTimeoutRequest { - const message = createBaseUpdateMcpTimeoutRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.serverName = object.serverName ?? "" - message.timeout = object.timeout ?? 0 - return message - }, -} - -function createBaseAddRemoteMcpServerRequest(): AddRemoteMcpServerRequest { - return { metadata: undefined, serverName: "", serverUrl: "" } -} - -export const AddRemoteMcpServerRequest: MessageFns = { - encode(message: AddRemoteMcpServerRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.serverName !== "") { - writer.uint32(18).string(message.serverName) - } - if (message.serverUrl !== "") { - writer.uint32(26).string(message.serverUrl) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): AddRemoteMcpServerRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseAddRemoteMcpServerRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.serverName = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.serverUrl = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): AddRemoteMcpServerRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - serverName: isSet(object.serverName) ? globalThis.String(object.serverName) : "", - serverUrl: isSet(object.serverUrl) ? globalThis.String(object.serverUrl) : "", - } - }, - - toJSON(message: AddRemoteMcpServerRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.serverName !== "") { - obj.serverName = message.serverName - } - if (message.serverUrl !== "") { - obj.serverUrl = message.serverUrl - } - return obj - }, - - create, I>>(base?: I): AddRemoteMcpServerRequest { - return AddRemoteMcpServerRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): AddRemoteMcpServerRequest { - const message = createBaseAddRemoteMcpServerRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.serverName = object.serverName ?? "" - message.serverUrl = object.serverUrl ?? "" - return message - }, -} - -function createBaseToggleToolAutoApproveRequest(): ToggleToolAutoApproveRequest { - return { metadata: undefined, serverName: "", toolNames: [], autoApprove: false } -} - -export const ToggleToolAutoApproveRequest: MessageFns = { - encode(message: ToggleToolAutoApproveRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.serverName !== "") { - writer.uint32(18).string(message.serverName) - } - for (const v of message.toolNames) { - writer.uint32(26).string(v!) - } - if (message.autoApprove !== false) { - writer.uint32(32).bool(message.autoApprove) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ToggleToolAutoApproveRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseToggleToolAutoApproveRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.serverName = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.toolNames.push(reader.string()) - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.autoApprove = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ToggleToolAutoApproveRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - serverName: isSet(object.serverName) ? globalThis.String(object.serverName) : "", - toolNames: globalThis.Array.isArray(object?.toolNames) ? object.toolNames.map((e: any) => globalThis.String(e)) : [], - autoApprove: isSet(object.autoApprove) ? globalThis.Boolean(object.autoApprove) : false, - } - }, - - toJSON(message: ToggleToolAutoApproveRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.serverName !== "") { - obj.serverName = message.serverName - } - if (message.toolNames?.length) { - obj.toolNames = message.toolNames - } - if (message.autoApprove !== false) { - obj.autoApprove = message.autoApprove - } - return obj - }, - - create, I>>(base?: I): ToggleToolAutoApproveRequest { - return ToggleToolAutoApproveRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ToggleToolAutoApproveRequest { - const message = createBaseToggleToolAutoApproveRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.serverName = object.serverName ?? "" - message.toolNames = object.toolNames?.map((e) => e) || [] - message.autoApprove = object.autoApprove ?? false - return message - }, -} - -function createBaseMcpTool(): McpTool { - return { name: "", description: undefined, inputSchema: undefined, autoApprove: undefined } -} - -export const McpTool: MessageFns = { - encode(message: McpTool, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name) - } - if (message.description !== undefined) { - writer.uint32(18).string(message.description) - } - if (message.inputSchema !== undefined) { - writer.uint32(26).string(message.inputSchema) - } - if (message.autoApprove !== undefined) { - writer.uint32(32).bool(message.autoApprove) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): McpTool { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseMcpTool() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.name = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.description = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.inputSchema = reader.string() - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.autoApprove = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): McpTool { - return { - name: isSet(object.name) ? globalThis.String(object.name) : "", - description: isSet(object.description) ? globalThis.String(object.description) : undefined, - inputSchema: isSet(object.inputSchema) ? globalThis.String(object.inputSchema) : undefined, - autoApprove: isSet(object.autoApprove) ? globalThis.Boolean(object.autoApprove) : undefined, - } - }, - - toJSON(message: McpTool): unknown { - const obj: any = {} - if (message.name !== "") { - obj.name = message.name - } - if (message.description !== undefined) { - obj.description = message.description - } - if (message.inputSchema !== undefined) { - obj.inputSchema = message.inputSchema - } - if (message.autoApprove !== undefined) { - obj.autoApprove = message.autoApprove - } - return obj - }, - - create, I>>(base?: I): McpTool { - return McpTool.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): McpTool { - const message = createBaseMcpTool() - message.name = object.name ?? "" - message.description = object.description ?? undefined - message.inputSchema = object.inputSchema ?? undefined - message.autoApprove = object.autoApprove ?? undefined - return message - }, -} - -function createBaseMcpResource(): McpResource { - return { uri: "", name: "", mimeType: undefined, description: undefined } -} - -export const McpResource: MessageFns = { - encode(message: McpResource, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.uri !== "") { - writer.uint32(10).string(message.uri) - } - if (message.name !== "") { - writer.uint32(18).string(message.name) - } - if (message.mimeType !== undefined) { - writer.uint32(26).string(message.mimeType) - } - if (message.description !== undefined) { - writer.uint32(34).string(message.description) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): McpResource { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseMcpResource() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.uri = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.name = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.mimeType = reader.string() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.description = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): McpResource { - return { - uri: isSet(object.uri) ? globalThis.String(object.uri) : "", - name: isSet(object.name) ? globalThis.String(object.name) : "", - mimeType: isSet(object.mimeType) ? globalThis.String(object.mimeType) : undefined, - description: isSet(object.description) ? globalThis.String(object.description) : undefined, - } - }, - - toJSON(message: McpResource): unknown { - const obj: any = {} - if (message.uri !== "") { - obj.uri = message.uri - } - if (message.name !== "") { - obj.name = message.name - } - if (message.mimeType !== undefined) { - obj.mimeType = message.mimeType - } - if (message.description !== undefined) { - obj.description = message.description - } - return obj - }, - - create, I>>(base?: I): McpResource { - return McpResource.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): McpResource { - const message = createBaseMcpResource() - message.uri = object.uri ?? "" - message.name = object.name ?? "" - message.mimeType = object.mimeType ?? undefined - message.description = object.description ?? undefined - return message - }, -} - -function createBaseMcpResourceTemplate(): McpResourceTemplate { - return { uriTemplate: "", name: "", mimeType: undefined, description: undefined } -} - -export const McpResourceTemplate: MessageFns = { - encode(message: McpResourceTemplate, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.uriTemplate !== "") { - writer.uint32(10).string(message.uriTemplate) - } - if (message.name !== "") { - writer.uint32(18).string(message.name) - } - if (message.mimeType !== undefined) { - writer.uint32(26).string(message.mimeType) - } - if (message.description !== undefined) { - writer.uint32(34).string(message.description) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): McpResourceTemplate { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseMcpResourceTemplate() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.uriTemplate = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.name = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.mimeType = reader.string() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.description = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): McpResourceTemplate { - return { - uriTemplate: isSet(object.uriTemplate) ? globalThis.String(object.uriTemplate) : "", - name: isSet(object.name) ? globalThis.String(object.name) : "", - mimeType: isSet(object.mimeType) ? globalThis.String(object.mimeType) : undefined, - description: isSet(object.description) ? globalThis.String(object.description) : undefined, - } - }, - - toJSON(message: McpResourceTemplate): unknown { - const obj: any = {} - if (message.uriTemplate !== "") { - obj.uriTemplate = message.uriTemplate - } - if (message.name !== "") { - obj.name = message.name - } - if (message.mimeType !== undefined) { - obj.mimeType = message.mimeType - } - if (message.description !== undefined) { - obj.description = message.description - } - return obj - }, - - create, I>>(base?: I): McpResourceTemplate { - return McpResourceTemplate.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): McpResourceTemplate { - const message = createBaseMcpResourceTemplate() - message.uriTemplate = object.uriTemplate ?? "" - message.name = object.name ?? "" - message.mimeType = object.mimeType ?? undefined - message.description = object.description ?? undefined - return message - }, -} - -function createBaseMcpServer(): McpServer { - return { - name: "", - config: "", - status: 0, - error: undefined, - tools: [], - resources: [], - resourceTemplates: [], - disabled: undefined, - timeout: undefined, - } -} - -export const McpServer: MessageFns = { - encode(message: McpServer, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.name !== "") { - writer.uint32(10).string(message.name) - } - if (message.config !== "") { - writer.uint32(18).string(message.config) - } - if (message.status !== 0) { - writer.uint32(24).int32(message.status) - } - if (message.error !== undefined) { - writer.uint32(34).string(message.error) - } - for (const v of message.tools) { - McpTool.encode(v!, writer.uint32(42).fork()).join() - } - for (const v of message.resources) { - McpResource.encode(v!, writer.uint32(50).fork()).join() - } - for (const v of message.resourceTemplates) { - McpResourceTemplate.encode(v!, writer.uint32(58).fork()).join() - } - if (message.disabled !== undefined) { - writer.uint32(64).bool(message.disabled) - } - if (message.timeout !== undefined) { - writer.uint32(72).int32(message.timeout) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): McpServer { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseMcpServer() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.name = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.config = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.status = reader.int32() as any - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.error = reader.string() - continue - } - case 5: { - if (tag !== 42) { - break - } - - message.tools.push(McpTool.decode(reader, reader.uint32())) - continue - } - case 6: { - if (tag !== 50) { - break - } - - message.resources.push(McpResource.decode(reader, reader.uint32())) - continue - } - case 7: { - if (tag !== 58) { - break - } - - message.resourceTemplates.push(McpResourceTemplate.decode(reader, reader.uint32())) - continue - } - case 8: { - if (tag !== 64) { - break - } - - message.disabled = reader.bool() - continue - } - case 9: { - if (tag !== 72) { - break - } - - message.timeout = reader.int32() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): McpServer { - return { - name: isSet(object.name) ? globalThis.String(object.name) : "", - config: isSet(object.config) ? globalThis.String(object.config) : "", - status: isSet(object.status) ? mcpServerStatusFromJSON(object.status) : 0, - error: isSet(object.error) ? globalThis.String(object.error) : undefined, - tools: globalThis.Array.isArray(object?.tools) ? object.tools.map((e: any) => McpTool.fromJSON(e)) : [], - resources: globalThis.Array.isArray(object?.resources) - ? object.resources.map((e: any) => McpResource.fromJSON(e)) - : [], - resourceTemplates: globalThis.Array.isArray(object?.resourceTemplates) - ? object.resourceTemplates.map((e: any) => McpResourceTemplate.fromJSON(e)) - : [], - disabled: isSet(object.disabled) ? globalThis.Boolean(object.disabled) : undefined, - timeout: isSet(object.timeout) ? globalThis.Number(object.timeout) : undefined, - } - }, - - toJSON(message: McpServer): unknown { - const obj: any = {} - if (message.name !== "") { - obj.name = message.name - } - if (message.config !== "") { - obj.config = message.config - } - if (message.status !== 0) { - obj.status = mcpServerStatusToJSON(message.status) - } - if (message.error !== undefined) { - obj.error = message.error - } - if (message.tools?.length) { - obj.tools = message.tools.map((e) => McpTool.toJSON(e)) - } - if (message.resources?.length) { - obj.resources = message.resources.map((e) => McpResource.toJSON(e)) - } - if (message.resourceTemplates?.length) { - obj.resourceTemplates = message.resourceTemplates.map((e) => McpResourceTemplate.toJSON(e)) - } - if (message.disabled !== undefined) { - obj.disabled = message.disabled - } - if (message.timeout !== undefined) { - obj.timeout = Math.round(message.timeout) - } - return obj - }, - - create, I>>(base?: I): McpServer { - return McpServer.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): McpServer { - const message = createBaseMcpServer() - message.name = object.name ?? "" - message.config = object.config ?? "" - message.status = object.status ?? 0 - message.error = object.error ?? undefined - message.tools = object.tools?.map((e) => McpTool.fromPartial(e)) || [] - message.resources = object.resources?.map((e) => McpResource.fromPartial(e)) || [] - message.resourceTemplates = object.resourceTemplates?.map((e) => McpResourceTemplate.fromPartial(e)) || [] - message.disabled = object.disabled ?? undefined - message.timeout = object.timeout ?? undefined - return message - }, -} - -function createBaseMcpServers(): McpServers { - return { mcpServers: [] } -} - -export const McpServers: MessageFns = { - encode(message: McpServers, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - for (const v of message.mcpServers) { - McpServer.encode(v!, writer.uint32(10).fork()).join() - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): McpServers { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseMcpServers() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.mcpServers.push(McpServer.decode(reader, reader.uint32())) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): McpServers { - return { - mcpServers: globalThis.Array.isArray(object?.mcpServers) - ? object.mcpServers.map((e: any) => McpServer.fromJSON(e)) - : [], - } - }, - - toJSON(message: McpServers): unknown { - const obj: any = {} - if (message.mcpServers?.length) { - obj.mcpServers = message.mcpServers.map((e) => McpServer.toJSON(e)) - } - return obj - }, - - create, I>>(base?: I): McpServers { - return McpServers.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): McpServers { - const message = createBaseMcpServers() - message.mcpServers = object.mcpServers?.map((e) => McpServer.fromPartial(e)) || [] - return message - }, -} - -function createBaseMcpMarketplaceItem(): McpMarketplaceItem { - return { - mcpId: "", - githubUrl: "", - name: "", - author: "", - description: "", - codiconIcon: "", - logoUrl: "", - category: "", - tags: [], - requiresApiKey: false, - readmeContent: undefined, - llmsInstallationContent: undefined, - isRecommended: false, - githubStars: 0, - downloadCount: 0, - createdAt: "", - updatedAt: "", - lastGithubSync: "", - } -} - -export const McpMarketplaceItem: MessageFns = { - encode(message: McpMarketplaceItem, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.mcpId !== "") { - writer.uint32(10).string(message.mcpId) - } - if (message.githubUrl !== "") { - writer.uint32(18).string(message.githubUrl) - } - if (message.name !== "") { - writer.uint32(26).string(message.name) - } - if (message.author !== "") { - writer.uint32(34).string(message.author) - } - if (message.description !== "") { - writer.uint32(42).string(message.description) - } - if (message.codiconIcon !== "") { - writer.uint32(50).string(message.codiconIcon) - } - if (message.logoUrl !== "") { - writer.uint32(58).string(message.logoUrl) - } - if (message.category !== "") { - writer.uint32(66).string(message.category) - } - for (const v of message.tags) { - writer.uint32(74).string(v!) - } - if (message.requiresApiKey !== false) { - writer.uint32(80).bool(message.requiresApiKey) - } - if (message.readmeContent !== undefined) { - writer.uint32(90).string(message.readmeContent) - } - if (message.llmsInstallationContent !== undefined) { - writer.uint32(98).string(message.llmsInstallationContent) - } - if (message.isRecommended !== false) { - writer.uint32(104).bool(message.isRecommended) - } - if (message.githubStars !== 0) { - writer.uint32(112).int32(message.githubStars) - } - if (message.downloadCount !== 0) { - writer.uint32(120).int32(message.downloadCount) - } - if (message.createdAt !== "") { - writer.uint32(130).string(message.createdAt) - } - if (message.updatedAt !== "") { - writer.uint32(138).string(message.updatedAt) - } - if (message.lastGithubSync !== "") { - writer.uint32(146).string(message.lastGithubSync) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): McpMarketplaceItem { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseMcpMarketplaceItem() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.mcpId = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.githubUrl = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.name = reader.string() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.author = reader.string() - continue - } - case 5: { - if (tag !== 42) { - break - } - - message.description = reader.string() - continue - } - case 6: { - if (tag !== 50) { - break - } - - message.codiconIcon = reader.string() - continue - } - case 7: { - if (tag !== 58) { - break - } - - message.logoUrl = reader.string() - continue - } - case 8: { - if (tag !== 66) { - break - } - - message.category = reader.string() - continue - } - case 9: { - if (tag !== 74) { - break - } - - message.tags.push(reader.string()) - continue - } - case 10: { - if (tag !== 80) { - break - } - - message.requiresApiKey = reader.bool() - continue - } - case 11: { - if (tag !== 90) { - break - } - - message.readmeContent = reader.string() - continue - } - case 12: { - if (tag !== 98) { - break - } - - message.llmsInstallationContent = reader.string() - continue - } - case 13: { - if (tag !== 104) { - break - } - - message.isRecommended = reader.bool() - continue - } - case 14: { - if (tag !== 112) { - break - } - - message.githubStars = reader.int32() - continue - } - case 15: { - if (tag !== 120) { - break - } - - message.downloadCount = reader.int32() - continue - } - case 16: { - if (tag !== 130) { - break - } - - message.createdAt = reader.string() - continue - } - case 17: { - if (tag !== 138) { - break - } - - message.updatedAt = reader.string() - continue - } - case 18: { - if (tag !== 146) { - break - } - - message.lastGithubSync = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): McpMarketplaceItem { - return { - mcpId: isSet(object.mcpId) ? globalThis.String(object.mcpId) : "", - githubUrl: isSet(object.githubUrl) ? globalThis.String(object.githubUrl) : "", - name: isSet(object.name) ? globalThis.String(object.name) : "", - author: isSet(object.author) ? globalThis.String(object.author) : "", - description: isSet(object.description) ? globalThis.String(object.description) : "", - codiconIcon: isSet(object.codiconIcon) ? globalThis.String(object.codiconIcon) : "", - logoUrl: isSet(object.logoUrl) ? globalThis.String(object.logoUrl) : "", - category: isSet(object.category) ? globalThis.String(object.category) : "", - tags: globalThis.Array.isArray(object?.tags) ? object.tags.map((e: any) => globalThis.String(e)) : [], - requiresApiKey: isSet(object.requiresApiKey) ? globalThis.Boolean(object.requiresApiKey) : false, - readmeContent: isSet(object.readmeContent) ? globalThis.String(object.readmeContent) : undefined, - llmsInstallationContent: isSet(object.llmsInstallationContent) - ? globalThis.String(object.llmsInstallationContent) - : undefined, - isRecommended: isSet(object.isRecommended) ? globalThis.Boolean(object.isRecommended) : false, - githubStars: isSet(object.githubStars) ? globalThis.Number(object.githubStars) : 0, - downloadCount: isSet(object.downloadCount) ? globalThis.Number(object.downloadCount) : 0, - createdAt: isSet(object.createdAt) ? globalThis.String(object.createdAt) : "", - updatedAt: isSet(object.updatedAt) ? globalThis.String(object.updatedAt) : "", - lastGithubSync: isSet(object.lastGithubSync) ? globalThis.String(object.lastGithubSync) : "", - } - }, - - toJSON(message: McpMarketplaceItem): unknown { - const obj: any = {} - if (message.mcpId !== "") { - obj.mcpId = message.mcpId - } - if (message.githubUrl !== "") { - obj.githubUrl = message.githubUrl - } - if (message.name !== "") { - obj.name = message.name - } - if (message.author !== "") { - obj.author = message.author - } - if (message.description !== "") { - obj.description = message.description - } - if (message.codiconIcon !== "") { - obj.codiconIcon = message.codiconIcon - } - if (message.logoUrl !== "") { - obj.logoUrl = message.logoUrl - } - if (message.category !== "") { - obj.category = message.category - } - if (message.tags?.length) { - obj.tags = message.tags - } - if (message.requiresApiKey !== false) { - obj.requiresApiKey = message.requiresApiKey - } - if (message.readmeContent !== undefined) { - obj.readmeContent = message.readmeContent - } - if (message.llmsInstallationContent !== undefined) { - obj.llmsInstallationContent = message.llmsInstallationContent - } - if (message.isRecommended !== false) { - obj.isRecommended = message.isRecommended - } - if (message.githubStars !== 0) { - obj.githubStars = Math.round(message.githubStars) - } - if (message.downloadCount !== 0) { - obj.downloadCount = Math.round(message.downloadCount) - } - if (message.createdAt !== "") { - obj.createdAt = message.createdAt - } - if (message.updatedAt !== "") { - obj.updatedAt = message.updatedAt - } - if (message.lastGithubSync !== "") { - obj.lastGithubSync = message.lastGithubSync - } - return obj - }, - - create, I>>(base?: I): McpMarketplaceItem { - return McpMarketplaceItem.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): McpMarketplaceItem { - const message = createBaseMcpMarketplaceItem() - message.mcpId = object.mcpId ?? "" - message.githubUrl = object.githubUrl ?? "" - message.name = object.name ?? "" - message.author = object.author ?? "" - message.description = object.description ?? "" - message.codiconIcon = object.codiconIcon ?? "" - message.logoUrl = object.logoUrl ?? "" - message.category = object.category ?? "" - message.tags = object.tags?.map((e) => e) || [] - message.requiresApiKey = object.requiresApiKey ?? false - message.readmeContent = object.readmeContent ?? undefined - message.llmsInstallationContent = object.llmsInstallationContent ?? undefined - message.isRecommended = object.isRecommended ?? false - message.githubStars = object.githubStars ?? 0 - message.downloadCount = object.downloadCount ?? 0 - message.createdAt = object.createdAt ?? "" - message.updatedAt = object.updatedAt ?? "" - message.lastGithubSync = object.lastGithubSync ?? "" - return message - }, -} - -function createBaseMcpMarketplaceCatalog(): McpMarketplaceCatalog { - return { items: [] } -} - -export const McpMarketplaceCatalog: MessageFns = { - encode(message: McpMarketplaceCatalog, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - for (const v of message.items) { - McpMarketplaceItem.encode(v!, writer.uint32(10).fork()).join() - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): McpMarketplaceCatalog { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseMcpMarketplaceCatalog() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.items.push(McpMarketplaceItem.decode(reader, reader.uint32())) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): McpMarketplaceCatalog { - return { - items: globalThis.Array.isArray(object?.items) ? object.items.map((e: any) => McpMarketplaceItem.fromJSON(e)) : [], - } - }, - - toJSON(message: McpMarketplaceCatalog): unknown { - const obj: any = {} - if (message.items?.length) { - obj.items = message.items.map((e) => McpMarketplaceItem.toJSON(e)) - } - return obj - }, - - create, I>>(base?: I): McpMarketplaceCatalog { - return McpMarketplaceCatalog.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): McpMarketplaceCatalog { - const message = createBaseMcpMarketplaceCatalog() - message.items = object.items?.map((e) => McpMarketplaceItem.fromPartial(e)) || [] - return message - }, -} - -export type McpServiceDefinition = typeof McpServiceDefinition -export const McpServiceDefinition = { - name: "McpService", - fullName: "cline.McpService", - methods: { - toggleMcpServer: { - name: "toggleMcpServer", - requestType: ToggleMcpServerRequest, - requestStream: false, - responseType: McpServers, - responseStream: false, - options: {}, - }, - updateMcpTimeout: { - name: "updateMcpTimeout", - requestType: UpdateMcpTimeoutRequest, - requestStream: false, - responseType: McpServers, - responseStream: false, - options: {}, - }, - addRemoteMcpServer: { - name: "addRemoteMcpServer", - requestType: AddRemoteMcpServerRequest, - requestStream: false, - responseType: McpServers, - responseStream: false, - options: {}, - }, - downloadMcp: { - name: "downloadMcp", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - restartMcpServer: { - name: "restartMcpServer", - requestType: StringRequest, - requestStream: false, - responseType: McpServers, - responseStream: false, - options: {}, - }, - deleteMcpServer: { - name: "deleteMcpServer", - requestType: StringRequest, - requestStream: false, - responseType: McpServers, - responseStream: false, - options: {}, - }, - toggleToolAutoApprove: { - name: "toggleToolAutoApprove", - requestType: ToggleToolAutoApproveRequest, - requestStream: false, - responseType: McpServers, - responseStream: false, - options: {}, - }, - refreshMcpMarketplace: { - name: "refreshMcpMarketplace", - requestType: EmptyRequest, - requestStream: false, - responseType: McpMarketplaceCatalog, - responseStream: false, - options: {}, - }, - }, -} as const - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined - -export type DeepPartial = T extends Builtin - ? T - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial - -type KeysOfUnion = T extends T ? keyof T : never -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } - -function isSet(value: any): boolean { - return value !== null && value !== undefined -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter - decode(input: BinaryReader | Uint8Array, length?: number): T - fromJSON(object: any): T - toJSON(message: T): unknown - create, I>>(base?: I): T - fromPartial, I>>(object: I): T -} diff --git a/src/shared/proto/models.ts b/src/shared/proto/models.ts deleted file mode 100644 index 6ccb0956..00000000 --- a/src/shared/proto/models.ts +++ /dev/null @@ -1,773 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: models.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { EmptyRequest, Metadata, StringArray, StringRequest } from "./common" - -export const protobufPackage = "cline" - -/** List of VS Code LM models */ -export interface VsCodeLmModelsArray { - models: VsCodeLmModel[] -} - -/** Structure representing a VS Code LM model */ -export interface VsCodeLmModel { - vendor: string - family: string - version: string - id: string -} - -/** For OpenRouterCompatibleModelInfo structure in OpenRouterModels */ -export interface OpenRouterModelInfo { - maxTokens: number - contextWindow: number - supportsImages: boolean - supportsPromptCache: boolean - inputPrice: number - outputPrice: number - cacheWritesPrice: number - cacheReadsPrice: number - description: string -} - -/** Shared response message for model information */ -export interface OpenRouterCompatibleModelInfo { - models: { [key: string]: OpenRouterModelInfo } -} - -export interface OpenRouterCompatibleModelInfo_ModelsEntry { - key: string - value?: OpenRouterModelInfo | undefined -} - -/** Request for fetching OpenAI models */ -export interface OpenAiModelsRequest { - metadata?: Metadata | undefined - baseUrl: string - apiKey: string -} - -function createBaseVsCodeLmModelsArray(): VsCodeLmModelsArray { - return { models: [] } -} - -export const VsCodeLmModelsArray: MessageFns = { - encode(message: VsCodeLmModelsArray, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - for (const v of message.models) { - VsCodeLmModel.encode(v!, writer.uint32(10).fork()).join() - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): VsCodeLmModelsArray { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseVsCodeLmModelsArray() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.models.push(VsCodeLmModel.decode(reader, reader.uint32())) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): VsCodeLmModelsArray { - return { - models: globalThis.Array.isArray(object?.models) ? object.models.map((e: any) => VsCodeLmModel.fromJSON(e)) : [], - } - }, - - toJSON(message: VsCodeLmModelsArray): unknown { - const obj: any = {} - if (message.models?.length) { - obj.models = message.models.map((e) => VsCodeLmModel.toJSON(e)) - } - return obj - }, - - create, I>>(base?: I): VsCodeLmModelsArray { - return VsCodeLmModelsArray.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): VsCodeLmModelsArray { - const message = createBaseVsCodeLmModelsArray() - message.models = object.models?.map((e) => VsCodeLmModel.fromPartial(e)) || [] - return message - }, -} - -function createBaseVsCodeLmModel(): VsCodeLmModel { - return { vendor: "", family: "", version: "", id: "" } -} - -export const VsCodeLmModel: MessageFns = { - encode(message: VsCodeLmModel, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.vendor !== "") { - writer.uint32(10).string(message.vendor) - } - if (message.family !== "") { - writer.uint32(18).string(message.family) - } - if (message.version !== "") { - writer.uint32(26).string(message.version) - } - if (message.id !== "") { - writer.uint32(34).string(message.id) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): VsCodeLmModel { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseVsCodeLmModel() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.vendor = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.family = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.version = reader.string() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.id = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): VsCodeLmModel { - return { - vendor: isSet(object.vendor) ? globalThis.String(object.vendor) : "", - family: isSet(object.family) ? globalThis.String(object.family) : "", - version: isSet(object.version) ? globalThis.String(object.version) : "", - id: isSet(object.id) ? globalThis.String(object.id) : "", - } - }, - - toJSON(message: VsCodeLmModel): unknown { - const obj: any = {} - if (message.vendor !== "") { - obj.vendor = message.vendor - } - if (message.family !== "") { - obj.family = message.family - } - if (message.version !== "") { - obj.version = message.version - } - if (message.id !== "") { - obj.id = message.id - } - return obj - }, - - create, I>>(base?: I): VsCodeLmModel { - return VsCodeLmModel.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): VsCodeLmModel { - const message = createBaseVsCodeLmModel() - message.vendor = object.vendor ?? "" - message.family = object.family ?? "" - message.version = object.version ?? "" - message.id = object.id ?? "" - return message - }, -} - -function createBaseOpenRouterModelInfo(): OpenRouterModelInfo { - return { - maxTokens: 0, - contextWindow: 0, - supportsImages: false, - supportsPromptCache: false, - inputPrice: 0, - outputPrice: 0, - cacheWritesPrice: 0, - cacheReadsPrice: 0, - description: "", - } -} - -export const OpenRouterModelInfo: MessageFns = { - encode(message: OpenRouterModelInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.maxTokens !== 0) { - writer.uint32(8).int32(message.maxTokens) - } - if (message.contextWindow !== 0) { - writer.uint32(16).int32(message.contextWindow) - } - if (message.supportsImages !== false) { - writer.uint32(24).bool(message.supportsImages) - } - if (message.supportsPromptCache !== false) { - writer.uint32(32).bool(message.supportsPromptCache) - } - if (message.inputPrice !== 0) { - writer.uint32(41).double(message.inputPrice) - } - if (message.outputPrice !== 0) { - writer.uint32(49).double(message.outputPrice) - } - if (message.cacheWritesPrice !== 0) { - writer.uint32(57).double(message.cacheWritesPrice) - } - if (message.cacheReadsPrice !== 0) { - writer.uint32(65).double(message.cacheReadsPrice) - } - if (message.description !== "") { - writer.uint32(74).string(message.description) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): OpenRouterModelInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseOpenRouterModelInfo() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.maxTokens = reader.int32() - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.contextWindow = reader.int32() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.supportsImages = reader.bool() - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.supportsPromptCache = reader.bool() - continue - } - case 5: { - if (tag !== 41) { - break - } - - message.inputPrice = reader.double() - continue - } - case 6: { - if (tag !== 49) { - break - } - - message.outputPrice = reader.double() - continue - } - case 7: { - if (tag !== 57) { - break - } - - message.cacheWritesPrice = reader.double() - continue - } - case 8: { - if (tag !== 65) { - break - } - - message.cacheReadsPrice = reader.double() - continue - } - case 9: { - if (tag !== 74) { - break - } - - message.description = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): OpenRouterModelInfo { - return { - maxTokens: isSet(object.maxTokens) ? globalThis.Number(object.maxTokens) : 0, - contextWindow: isSet(object.contextWindow) ? globalThis.Number(object.contextWindow) : 0, - supportsImages: isSet(object.supportsImages) ? globalThis.Boolean(object.supportsImages) : false, - supportsPromptCache: isSet(object.supportsPromptCache) ? globalThis.Boolean(object.supportsPromptCache) : false, - inputPrice: isSet(object.inputPrice) ? globalThis.Number(object.inputPrice) : 0, - outputPrice: isSet(object.outputPrice) ? globalThis.Number(object.outputPrice) : 0, - cacheWritesPrice: isSet(object.cacheWritesPrice) ? globalThis.Number(object.cacheWritesPrice) : 0, - cacheReadsPrice: isSet(object.cacheReadsPrice) ? globalThis.Number(object.cacheReadsPrice) : 0, - description: isSet(object.description) ? globalThis.String(object.description) : "", - } - }, - - toJSON(message: OpenRouterModelInfo): unknown { - const obj: any = {} - if (message.maxTokens !== 0) { - obj.maxTokens = Math.round(message.maxTokens) - } - if (message.contextWindow !== 0) { - obj.contextWindow = Math.round(message.contextWindow) - } - if (message.supportsImages !== false) { - obj.supportsImages = message.supportsImages - } - if (message.supportsPromptCache !== false) { - obj.supportsPromptCache = message.supportsPromptCache - } - if (message.inputPrice !== 0) { - obj.inputPrice = message.inputPrice - } - if (message.outputPrice !== 0) { - obj.outputPrice = message.outputPrice - } - if (message.cacheWritesPrice !== 0) { - obj.cacheWritesPrice = message.cacheWritesPrice - } - if (message.cacheReadsPrice !== 0) { - obj.cacheReadsPrice = message.cacheReadsPrice - } - if (message.description !== "") { - obj.description = message.description - } - return obj - }, - - create, I>>(base?: I): OpenRouterModelInfo { - return OpenRouterModelInfo.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): OpenRouterModelInfo { - const message = createBaseOpenRouterModelInfo() - message.maxTokens = object.maxTokens ?? 0 - message.contextWindow = object.contextWindow ?? 0 - message.supportsImages = object.supportsImages ?? false - message.supportsPromptCache = object.supportsPromptCache ?? false - message.inputPrice = object.inputPrice ?? 0 - message.outputPrice = object.outputPrice ?? 0 - message.cacheWritesPrice = object.cacheWritesPrice ?? 0 - message.cacheReadsPrice = object.cacheReadsPrice ?? 0 - message.description = object.description ?? "" - return message - }, -} - -function createBaseOpenRouterCompatibleModelInfo(): OpenRouterCompatibleModelInfo { - return { models: {} } -} - -export const OpenRouterCompatibleModelInfo: MessageFns = { - encode(message: OpenRouterCompatibleModelInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - Object.entries(message.models).forEach(([key, value]) => { - OpenRouterCompatibleModelInfo_ModelsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join() - }) - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): OpenRouterCompatibleModelInfo { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseOpenRouterCompatibleModelInfo() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - const entry1 = OpenRouterCompatibleModelInfo_ModelsEntry.decode(reader, reader.uint32()) - if (entry1.value !== undefined) { - message.models[entry1.key] = entry1.value - } - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): OpenRouterCompatibleModelInfo { - return { - models: isObject(object.models) - ? Object.entries(object.models).reduce<{ [key: string]: OpenRouterModelInfo }>((acc, [key, value]) => { - acc[key] = OpenRouterModelInfo.fromJSON(value) - return acc - }, {}) - : {}, - } - }, - - toJSON(message: OpenRouterCompatibleModelInfo): unknown { - const obj: any = {} - if (message.models) { - const entries = Object.entries(message.models) - if (entries.length > 0) { - obj.models = {} - entries.forEach(([k, v]) => { - obj.models[k] = OpenRouterModelInfo.toJSON(v) - }) - } - } - return obj - }, - - create, I>>(base?: I): OpenRouterCompatibleModelInfo { - return OpenRouterCompatibleModelInfo.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): OpenRouterCompatibleModelInfo { - const message = createBaseOpenRouterCompatibleModelInfo() - message.models = Object.entries(object.models ?? {}).reduce<{ [key: string]: OpenRouterModelInfo }>( - (acc, [key, value]) => { - if (value !== undefined) { - acc[key] = OpenRouterModelInfo.fromPartial(value) - } - return acc - }, - {}, - ) - return message - }, -} - -function createBaseOpenRouterCompatibleModelInfo_ModelsEntry(): OpenRouterCompatibleModelInfo_ModelsEntry { - return { key: "", value: undefined } -} - -export const OpenRouterCompatibleModelInfo_ModelsEntry: MessageFns = { - encode(message: OpenRouterCompatibleModelInfo_ModelsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.key !== "") { - writer.uint32(10).string(message.key) - } - if (message.value !== undefined) { - OpenRouterModelInfo.encode(message.value, writer.uint32(18).fork()).join() - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): OpenRouterCompatibleModelInfo_ModelsEntry { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseOpenRouterCompatibleModelInfo_ModelsEntry() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.key = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.value = OpenRouterModelInfo.decode(reader, reader.uint32()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): OpenRouterCompatibleModelInfo_ModelsEntry { - return { - key: isSet(object.key) ? globalThis.String(object.key) : "", - value: isSet(object.value) ? OpenRouterModelInfo.fromJSON(object.value) : undefined, - } - }, - - toJSON(message: OpenRouterCompatibleModelInfo_ModelsEntry): unknown { - const obj: any = {} - if (message.key !== "") { - obj.key = message.key - } - if (message.value !== undefined) { - obj.value = OpenRouterModelInfo.toJSON(message.value) - } - return obj - }, - - create, I>>( - base?: I, - ): OpenRouterCompatibleModelInfo_ModelsEntry { - return OpenRouterCompatibleModelInfo_ModelsEntry.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>( - object: I, - ): OpenRouterCompatibleModelInfo_ModelsEntry { - const message = createBaseOpenRouterCompatibleModelInfo_ModelsEntry() - message.key = object.key ?? "" - message.value = - object.value !== undefined && object.value !== null ? OpenRouterModelInfo.fromPartial(object.value) : undefined - return message - }, -} - -function createBaseOpenAiModelsRequest(): OpenAiModelsRequest { - return { metadata: undefined, baseUrl: "", apiKey: "" } -} - -export const OpenAiModelsRequest: MessageFns = { - encode(message: OpenAiModelsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.baseUrl !== "") { - writer.uint32(18).string(message.baseUrl) - } - if (message.apiKey !== "") { - writer.uint32(26).string(message.apiKey) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): OpenAiModelsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseOpenAiModelsRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.baseUrl = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.apiKey = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): OpenAiModelsRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - baseUrl: isSet(object.baseUrl) ? globalThis.String(object.baseUrl) : "", - apiKey: isSet(object.apiKey) ? globalThis.String(object.apiKey) : "", - } - }, - - toJSON(message: OpenAiModelsRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.baseUrl !== "") { - obj.baseUrl = message.baseUrl - } - if (message.apiKey !== "") { - obj.apiKey = message.apiKey - } - return obj - }, - - create, I>>(base?: I): OpenAiModelsRequest { - return OpenAiModelsRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): OpenAiModelsRequest { - const message = createBaseOpenAiModelsRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.baseUrl = object.baseUrl ?? "" - message.apiKey = object.apiKey ?? "" - return message - }, -} - -/** Service for model-related operations */ -export type ModelsServiceDefinition = typeof ModelsServiceDefinition -export const ModelsServiceDefinition = { - name: "ModelsService", - fullName: "cline.ModelsService", - methods: { - /** Fetches available models from Ollama */ - getOllamaModels: { - name: "getOllamaModels", - requestType: StringRequest, - requestStream: false, - responseType: StringArray, - responseStream: false, - options: {}, - }, - /** Fetches available models from LM Studio */ - getLmStudioModels: { - name: "getLmStudioModels", - requestType: StringRequest, - requestStream: false, - responseType: StringArray, - responseStream: false, - options: {}, - }, - /** Fetches available models from VS Code LM API */ - getVsCodeLmModels: { - name: "getVsCodeLmModels", - requestType: EmptyRequest, - requestStream: false, - responseType: VsCodeLmModelsArray, - responseStream: false, - options: {}, - }, - /** Refreshes and returns OpenRouter models */ - refreshOpenRouterModels: { - name: "refreshOpenRouterModels", - requestType: EmptyRequest, - requestStream: false, - responseType: OpenRouterCompatibleModelInfo, - responseStream: false, - options: {}, - }, - /** Refreshes and returns OpenAI models */ - refreshOpenAiModels: { - name: "refreshOpenAiModels", - requestType: OpenAiModelsRequest, - requestStream: false, - responseType: StringArray, - responseStream: false, - options: {}, - }, - /** Refreshes and returns Requesty models */ - refreshRequestyModels: { - name: "refreshRequestyModels", - requestType: EmptyRequest, - requestStream: false, - responseType: OpenRouterCompatibleModelInfo, - responseStream: false, - options: {}, - }, - }, -} as const - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined - -export type DeepPartial = T extends Builtin - ? T - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial - -type KeysOfUnion = T extends T ? keyof T : never -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } - -function isObject(value: any): boolean { - return typeof value === "object" && value !== null -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter - decode(input: BinaryReader | Uint8Array, length?: number): T - fromJSON(object: any): T - toJSON(message: T): unknown - create, I>>(base?: I): T - fromPartial, I>>(object: I): T -} diff --git a/src/shared/proto/slash.ts b/src/shared/proto/slash.ts deleted file mode 100644 index 81176870..00000000 --- a/src/shared/proto/slash.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: slash.proto - -/* eslint-disable */ -import { Empty, StringRequest } from "./common" - -export const protobufPackage = "cline" - -/** SlashService provides methods for managing slash */ -export type SlashServiceDefinition = typeof SlashServiceDefinition -export const SlashServiceDefinition = { - name: "SlashService", - fullName: "cline.SlashService", - methods: { - /** Sends button click message */ - reportBug: { - name: "reportBug", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - condense: { - name: "condense", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - }, -} as const diff --git a/src/shared/proto/state.ts b/src/shared/proto/state.ts deleted file mode 100644 index 832b4676..00000000 --- a/src/shared/proto/state.ts +++ /dev/null @@ -1,859 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: state.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { Empty, EmptyRequest, Int64, Int64Request, Metadata, StringRequest } from "./common" - -export const protobufPackage = "cline" - -export enum PlanActMode { - PLAN = 0, - ACT = 1, - UNRECOGNIZED = -1, -} - -export function planActModeFromJSON(object: any): PlanActMode { - switch (object) { - case 0: - case "PLAN": - return PlanActMode.PLAN - case 1: - case "ACT": - return PlanActMode.ACT - case -1: - case "UNRECOGNIZED": - default: - return PlanActMode.UNRECOGNIZED - } -} - -export function planActModeToJSON(object: PlanActMode): string { - switch (object) { - case PlanActMode.PLAN: - return "PLAN" - case PlanActMode.ACT: - return "ACT" - case PlanActMode.UNRECOGNIZED: - default: - return "UNRECOGNIZED" - } -} - -export interface State { - stateJson: string -} - -export interface TogglePlanActModeRequest { - metadata?: Metadata | undefined - chatSettings?: ChatSettings | undefined - chatContent?: ChatContent | undefined -} - -export interface ChatSettings { - mode: PlanActMode - preferredLanguage?: string | undefined - openAiReasoningEffort?: string | undefined -} - -export interface ChatContent { - message?: string | undefined - images: string[] -} - -/** Message for auto approval settings */ -export interface AutoApprovalSettingsRequest { - metadata?: Metadata | undefined - version: number - enabled: boolean - actions?: AutoApprovalSettingsRequest_Actions | undefined - maxRequests: number - enableNotifications: boolean - favorites: string[] -} - -export interface AutoApprovalSettingsRequest_Actions { - readFiles: boolean - readFilesExternally: boolean - editFiles: boolean - editFilesExternally: boolean - executeSafeCommands: boolean - executeAllCommands: boolean - useBrowser: boolean - useMcp: boolean -} - -function createBaseState(): State { - return { stateJson: "" } -} - -export const State: MessageFns = { - encode(message: State, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.stateJson !== "") { - writer.uint32(10).string(message.stateJson) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): State { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseState() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.stateJson = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): State { - return { stateJson: isSet(object.stateJson) ? globalThis.String(object.stateJson) : "" } - }, - - toJSON(message: State): unknown { - const obj: any = {} - if (message.stateJson !== "") { - obj.stateJson = message.stateJson - } - return obj - }, - - create, I>>(base?: I): State { - return State.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): State { - const message = createBaseState() - message.stateJson = object.stateJson ?? "" - return message - }, -} - -function createBaseTogglePlanActModeRequest(): TogglePlanActModeRequest { - return { metadata: undefined, chatSettings: undefined, chatContent: undefined } -} - -export const TogglePlanActModeRequest: MessageFns = { - encode(message: TogglePlanActModeRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.chatSettings !== undefined) { - ChatSettings.encode(message.chatSettings, writer.uint32(18).fork()).join() - } - if (message.chatContent !== undefined) { - ChatContent.encode(message.chatContent, writer.uint32(26).fork()).join() - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): TogglePlanActModeRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseTogglePlanActModeRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.chatSettings = ChatSettings.decode(reader, reader.uint32()) - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.chatContent = ChatContent.decode(reader, reader.uint32()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): TogglePlanActModeRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - chatSettings: isSet(object.chatSettings) ? ChatSettings.fromJSON(object.chatSettings) : undefined, - chatContent: isSet(object.chatContent) ? ChatContent.fromJSON(object.chatContent) : undefined, - } - }, - - toJSON(message: TogglePlanActModeRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.chatSettings !== undefined) { - obj.chatSettings = ChatSettings.toJSON(message.chatSettings) - } - if (message.chatContent !== undefined) { - obj.chatContent = ChatContent.toJSON(message.chatContent) - } - return obj - }, - - create, I>>(base?: I): TogglePlanActModeRequest { - return TogglePlanActModeRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): TogglePlanActModeRequest { - const message = createBaseTogglePlanActModeRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.chatSettings = - object.chatSettings !== undefined && object.chatSettings !== null - ? ChatSettings.fromPartial(object.chatSettings) - : undefined - message.chatContent = - object.chatContent !== undefined && object.chatContent !== null - ? ChatContent.fromPartial(object.chatContent) - : undefined - return message - }, -} - -function createBaseChatSettings(): ChatSettings { - return { mode: 0, preferredLanguage: undefined, openAiReasoningEffort: undefined } -} - -export const ChatSettings: MessageFns = { - encode(message: ChatSettings, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.mode !== 0) { - writer.uint32(8).int32(message.mode) - } - if (message.preferredLanguage !== undefined) { - writer.uint32(18).string(message.preferredLanguage) - } - if (message.openAiReasoningEffort !== undefined) { - writer.uint32(26).string(message.openAiReasoningEffort) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ChatSettings { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseChatSettings() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.mode = reader.int32() as any - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.preferredLanguage = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.openAiReasoningEffort = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ChatSettings { - return { - mode: isSet(object.mode) ? planActModeFromJSON(object.mode) : 0, - preferredLanguage: isSet(object.preferredLanguage) ? globalThis.String(object.preferredLanguage) : undefined, - openAiReasoningEffort: isSet(object.openAiReasoningEffort) - ? globalThis.String(object.openAiReasoningEffort) - : undefined, - } - }, - - toJSON(message: ChatSettings): unknown { - const obj: any = {} - if (message.mode !== 0) { - obj.mode = planActModeToJSON(message.mode) - } - if (message.preferredLanguage !== undefined) { - obj.preferredLanguage = message.preferredLanguage - } - if (message.openAiReasoningEffort !== undefined) { - obj.openAiReasoningEffort = message.openAiReasoningEffort - } - return obj - }, - - create, I>>(base?: I): ChatSettings { - return ChatSettings.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ChatSettings { - const message = createBaseChatSettings() - message.mode = object.mode ?? 0 - message.preferredLanguage = object.preferredLanguage ?? undefined - message.openAiReasoningEffort = object.openAiReasoningEffort ?? undefined - return message - }, -} - -function createBaseChatContent(): ChatContent { - return { message: undefined, images: [] } -} - -export const ChatContent: MessageFns = { - encode(message: ChatContent, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.message !== undefined) { - writer.uint32(10).string(message.message) - } - for (const v of message.images) { - writer.uint32(18).string(v!) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ChatContent { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseChatContent() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.message = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.images.push(reader.string()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): ChatContent { - return { - message: isSet(object.message) ? globalThis.String(object.message) : undefined, - images: globalThis.Array.isArray(object?.images) ? object.images.map((e: any) => globalThis.String(e)) : [], - } - }, - - toJSON(message: ChatContent): unknown { - const obj: any = {} - if (message.message !== undefined) { - obj.message = message.message - } - if (message.images?.length) { - obj.images = message.images - } - return obj - }, - - create, I>>(base?: I): ChatContent { - return ChatContent.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): ChatContent { - const message = createBaseChatContent() - message.message = object.message ?? undefined - message.images = object.images?.map((e) => e) || [] - return message - }, -} - -function createBaseAutoApprovalSettingsRequest(): AutoApprovalSettingsRequest { - return { - metadata: undefined, - version: 0, - enabled: false, - actions: undefined, - maxRequests: 0, - enableNotifications: false, - favorites: [], - } -} - -export const AutoApprovalSettingsRequest: MessageFns = { - encode(message: AutoApprovalSettingsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.version !== 0) { - writer.uint32(16).int32(message.version) - } - if (message.enabled !== false) { - writer.uint32(24).bool(message.enabled) - } - if (message.actions !== undefined) { - AutoApprovalSettingsRequest_Actions.encode(message.actions, writer.uint32(34).fork()).join() - } - if (message.maxRequests !== 0) { - writer.uint32(40).int32(message.maxRequests) - } - if (message.enableNotifications !== false) { - writer.uint32(48).bool(message.enableNotifications) - } - for (const v of message.favorites) { - writer.uint32(58).string(v!) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): AutoApprovalSettingsRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseAutoApprovalSettingsRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.version = reader.int32() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.enabled = reader.bool() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.actions = AutoApprovalSettingsRequest_Actions.decode(reader, reader.uint32()) - continue - } - case 5: { - if (tag !== 40) { - break - } - - message.maxRequests = reader.int32() - continue - } - case 6: { - if (tag !== 48) { - break - } - - message.enableNotifications = reader.bool() - continue - } - case 7: { - if (tag !== 58) { - break - } - - message.favorites.push(reader.string()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): AutoApprovalSettingsRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - version: isSet(object.version) ? globalThis.Number(object.version) : 0, - enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false, - actions: isSet(object.actions) ? AutoApprovalSettingsRequest_Actions.fromJSON(object.actions) : undefined, - maxRequests: isSet(object.maxRequests) ? globalThis.Number(object.maxRequests) : 0, - enableNotifications: isSet(object.enableNotifications) ? globalThis.Boolean(object.enableNotifications) : false, - favorites: globalThis.Array.isArray(object?.favorites) ? object.favorites.map((e: any) => globalThis.String(e)) : [], - } - }, - - toJSON(message: AutoApprovalSettingsRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.version !== 0) { - obj.version = Math.round(message.version) - } - if (message.enabled !== false) { - obj.enabled = message.enabled - } - if (message.actions !== undefined) { - obj.actions = AutoApprovalSettingsRequest_Actions.toJSON(message.actions) - } - if (message.maxRequests !== 0) { - obj.maxRequests = Math.round(message.maxRequests) - } - if (message.enableNotifications !== false) { - obj.enableNotifications = message.enableNotifications - } - if (message.favorites?.length) { - obj.favorites = message.favorites - } - return obj - }, - - create, I>>(base?: I): AutoApprovalSettingsRequest { - return AutoApprovalSettingsRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): AutoApprovalSettingsRequest { - const message = createBaseAutoApprovalSettingsRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.version = object.version ?? 0 - message.enabled = object.enabled ?? false - message.actions = - object.actions !== undefined && object.actions !== null - ? AutoApprovalSettingsRequest_Actions.fromPartial(object.actions) - : undefined - message.maxRequests = object.maxRequests ?? 0 - message.enableNotifications = object.enableNotifications ?? false - message.favorites = object.favorites?.map((e) => e) || [] - return message - }, -} - -function createBaseAutoApprovalSettingsRequest_Actions(): AutoApprovalSettingsRequest_Actions { - return { - readFiles: false, - readFilesExternally: false, - editFiles: false, - editFilesExternally: false, - executeSafeCommands: false, - executeAllCommands: false, - useBrowser: false, - useMcp: false, - } -} - -export const AutoApprovalSettingsRequest_Actions: MessageFns = { - encode(message: AutoApprovalSettingsRequest_Actions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.readFiles !== false) { - writer.uint32(8).bool(message.readFiles) - } - if (message.readFilesExternally !== false) { - writer.uint32(16).bool(message.readFilesExternally) - } - if (message.editFiles !== false) { - writer.uint32(24).bool(message.editFiles) - } - if (message.editFilesExternally !== false) { - writer.uint32(32).bool(message.editFilesExternally) - } - if (message.executeSafeCommands !== false) { - writer.uint32(40).bool(message.executeSafeCommands) - } - if (message.executeAllCommands !== false) { - writer.uint32(48).bool(message.executeAllCommands) - } - if (message.useBrowser !== false) { - writer.uint32(56).bool(message.useBrowser) - } - if (message.useMcp !== false) { - writer.uint32(64).bool(message.useMcp) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): AutoApprovalSettingsRequest_Actions { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseAutoApprovalSettingsRequest_Actions() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.readFiles = reader.bool() - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.readFilesExternally = reader.bool() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.editFiles = reader.bool() - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.editFilesExternally = reader.bool() - continue - } - case 5: { - if (tag !== 40) { - break - } - - message.executeSafeCommands = reader.bool() - continue - } - case 6: { - if (tag !== 48) { - break - } - - message.executeAllCommands = reader.bool() - continue - } - case 7: { - if (tag !== 56) { - break - } - - message.useBrowser = reader.bool() - continue - } - case 8: { - if (tag !== 64) { - break - } - - message.useMcp = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): AutoApprovalSettingsRequest_Actions { - return { - readFiles: isSet(object.readFiles) ? globalThis.Boolean(object.readFiles) : false, - readFilesExternally: isSet(object.readFilesExternally) ? globalThis.Boolean(object.readFilesExternally) : false, - editFiles: isSet(object.editFiles) ? globalThis.Boolean(object.editFiles) : false, - editFilesExternally: isSet(object.editFilesExternally) ? globalThis.Boolean(object.editFilesExternally) : false, - executeSafeCommands: isSet(object.executeSafeCommands) ? globalThis.Boolean(object.executeSafeCommands) : false, - executeAllCommands: isSet(object.executeAllCommands) ? globalThis.Boolean(object.executeAllCommands) : false, - useBrowser: isSet(object.useBrowser) ? globalThis.Boolean(object.useBrowser) : false, - useMcp: isSet(object.useMcp) ? globalThis.Boolean(object.useMcp) : false, - } - }, - - toJSON(message: AutoApprovalSettingsRequest_Actions): unknown { - const obj: any = {} - if (message.readFiles !== false) { - obj.readFiles = message.readFiles - } - if (message.readFilesExternally !== false) { - obj.readFilesExternally = message.readFilesExternally - } - if (message.editFiles !== false) { - obj.editFiles = message.editFiles - } - if (message.editFilesExternally !== false) { - obj.editFilesExternally = message.editFilesExternally - } - if (message.executeSafeCommands !== false) { - obj.executeSafeCommands = message.executeSafeCommands - } - if (message.executeAllCommands !== false) { - obj.executeAllCommands = message.executeAllCommands - } - if (message.useBrowser !== false) { - obj.useBrowser = message.useBrowser - } - if (message.useMcp !== false) { - obj.useMcp = message.useMcp - } - return obj - }, - - create, I>>(base?: I): AutoApprovalSettingsRequest_Actions { - return AutoApprovalSettingsRequest_Actions.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>( - object: I, - ): AutoApprovalSettingsRequest_Actions { - const message = createBaseAutoApprovalSettingsRequest_Actions() - message.readFiles = object.readFiles ?? false - message.readFilesExternally = object.readFilesExternally ?? false - message.editFiles = object.editFiles ?? false - message.editFilesExternally = object.editFilesExternally ?? false - message.executeSafeCommands = object.executeSafeCommands ?? false - message.executeAllCommands = object.executeAllCommands ?? false - message.useBrowser = object.useBrowser ?? false - message.useMcp = object.useMcp ?? false - return message - }, -} - -export type StateServiceDefinition = typeof StateServiceDefinition -export const StateServiceDefinition = { - name: "StateService", - fullName: "cline.StateService", - methods: { - getLatestState: { - name: "getLatestState", - requestType: EmptyRequest, - requestStream: false, - responseType: State, - responseStream: false, - options: {}, - }, - subscribeToState: { - name: "subscribeToState", - requestType: EmptyRequest, - requestStream: false, - responseType: State, - responseStream: true, - options: {}, - }, - toggleFavoriteModel: { - name: "toggleFavoriteModel", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - resetState: { - name: "resetState", - requestType: EmptyRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - togglePlanActMode: { - name: "togglePlanActMode", - requestType: TogglePlanActModeRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - updateTerminalConnectionTimeout: { - name: "updateTerminalConnectionTimeout", - requestType: Int64Request, - requestStream: false, - responseType: Int64, - responseStream: false, - options: {}, - }, - updateAutoApprovalSettings: { - name: "updateAutoApprovalSettings", - requestType: AutoApprovalSettingsRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - }, -} as const - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined - -export type DeepPartial = T extends Builtin - ? T - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial - -type KeysOfUnion = T extends T ? keyof T : never -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } - -function isSet(value: any): boolean { - return value !== null && value !== undefined -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter - decode(input: BinaryReader | Uint8Array, length?: number): T - fromJSON(object: any): T - toJSON(message: T): unknown - create, I>>(base?: I): T - fromPartial, I>>(object: I): T -} diff --git a/src/shared/proto/task.ts b/src/shared/proto/task.ts deleted file mode 100644 index 94c71c63..00000000 --- a/src/shared/proto/task.ts +++ /dev/null @@ -1,1241 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: task.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { Empty, EmptyRequest, Int64Request, Metadata, StringArrayRequest, StringRequest } from "./common" - -export const protobufPackage = "cline" - -/** Request message for creating a new task */ -export interface NewTaskRequest { - metadata?: Metadata | undefined - text: string - images: string[] -} - -/** Request message for toggling task favorite status */ -export interface TaskFavoriteRequest { - metadata?: Metadata | undefined - taskId: string - isFavorited: boolean -} - -/** Response for task details */ -export interface TaskResponse { - id: string - task: string - ts: number - isFavorited: boolean - size: number - totalCost: number - tokensIn: number - tokensOut: number - cacheWrites: number - cacheReads: number -} - -/** Results returned when deleting non-favorited tasks */ -export interface DeleteNonFavoritedTasksResults { - tasksPreserved: number - tasksDeleted: number -} - -/** Request for getting task history with filtering */ -export interface GetTaskHistoryRequest { - metadata?: Metadata | undefined - favoritesOnly: boolean - searchQuery: string - sortBy: string - currentWorkspaceOnly: boolean -} - -/** Response for task history */ -export interface TaskHistoryArray { - tasks: TaskItem[] - totalCount: number -} - -/** Task item details for history list */ -export interface TaskItem { - id: string - task: string - ts: number - isFavorited: boolean - size: number - totalCost: number - tokensIn: number - tokensOut: number - cacheWrites: number - cacheReads: number -} - -/** Request for ask response operation */ -export interface AskResponseRequest { - metadata?: Metadata | undefined - responseType: string - text: string - images: string[] -} - -function createBaseNewTaskRequest(): NewTaskRequest { - return { metadata: undefined, text: "", images: [] } -} - -export const NewTaskRequest: MessageFns = { - encode(message: NewTaskRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.text !== "") { - writer.uint32(18).string(message.text) - } - for (const v of message.images) { - writer.uint32(26).string(v!) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): NewTaskRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseNewTaskRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.text = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.images.push(reader.string()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): NewTaskRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - text: isSet(object.text) ? globalThis.String(object.text) : "", - images: globalThis.Array.isArray(object?.images) ? object.images.map((e: any) => globalThis.String(e)) : [], - } - }, - - toJSON(message: NewTaskRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.text !== "") { - obj.text = message.text - } - if (message.images?.length) { - obj.images = message.images - } - return obj - }, - - create, I>>(base?: I): NewTaskRequest { - return NewTaskRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): NewTaskRequest { - const message = createBaseNewTaskRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.text = object.text ?? "" - message.images = object.images?.map((e) => e) || [] - return message - }, -} - -function createBaseTaskFavoriteRequest(): TaskFavoriteRequest { - return { metadata: undefined, taskId: "", isFavorited: false } -} - -export const TaskFavoriteRequest: MessageFns = { - encode(message: TaskFavoriteRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.taskId !== "") { - writer.uint32(18).string(message.taskId) - } - if (message.isFavorited !== false) { - writer.uint32(24).bool(message.isFavorited) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): TaskFavoriteRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseTaskFavoriteRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.taskId = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.isFavorited = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): TaskFavoriteRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - taskId: isSet(object.taskId) ? globalThis.String(object.taskId) : "", - isFavorited: isSet(object.isFavorited) ? globalThis.Boolean(object.isFavorited) : false, - } - }, - - toJSON(message: TaskFavoriteRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.taskId !== "") { - obj.taskId = message.taskId - } - if (message.isFavorited !== false) { - obj.isFavorited = message.isFavorited - } - return obj - }, - - create, I>>(base?: I): TaskFavoriteRequest { - return TaskFavoriteRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): TaskFavoriteRequest { - const message = createBaseTaskFavoriteRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.taskId = object.taskId ?? "" - message.isFavorited = object.isFavorited ?? false - return message - }, -} - -function createBaseTaskResponse(): TaskResponse { - return { - id: "", - task: "", - ts: 0, - isFavorited: false, - size: 0, - totalCost: 0, - tokensIn: 0, - tokensOut: 0, - cacheWrites: 0, - cacheReads: 0, - } -} - -export const TaskResponse: MessageFns = { - encode(message: TaskResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.id !== "") { - writer.uint32(10).string(message.id) - } - if (message.task !== "") { - writer.uint32(18).string(message.task) - } - if (message.ts !== 0) { - writer.uint32(24).int64(message.ts) - } - if (message.isFavorited !== false) { - writer.uint32(32).bool(message.isFavorited) - } - if (message.size !== 0) { - writer.uint32(40).int64(message.size) - } - if (message.totalCost !== 0) { - writer.uint32(49).double(message.totalCost) - } - if (message.tokensIn !== 0) { - writer.uint32(56).int32(message.tokensIn) - } - if (message.tokensOut !== 0) { - writer.uint32(64).int32(message.tokensOut) - } - if (message.cacheWrites !== 0) { - writer.uint32(72).int32(message.cacheWrites) - } - if (message.cacheReads !== 0) { - writer.uint32(80).int32(message.cacheReads) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): TaskResponse { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseTaskResponse() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.id = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.task = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.ts = longToNumber(reader.int64()) - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.isFavorited = reader.bool() - continue - } - case 5: { - if (tag !== 40) { - break - } - - message.size = longToNumber(reader.int64()) - continue - } - case 6: { - if (tag !== 49) { - break - } - - message.totalCost = reader.double() - continue - } - case 7: { - if (tag !== 56) { - break - } - - message.tokensIn = reader.int32() - continue - } - case 8: { - if (tag !== 64) { - break - } - - message.tokensOut = reader.int32() - continue - } - case 9: { - if (tag !== 72) { - break - } - - message.cacheWrites = reader.int32() - continue - } - case 10: { - if (tag !== 80) { - break - } - - message.cacheReads = reader.int32() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): TaskResponse { - return { - id: isSet(object.id) ? globalThis.String(object.id) : "", - task: isSet(object.task) ? globalThis.String(object.task) : "", - ts: isSet(object.ts) ? globalThis.Number(object.ts) : 0, - isFavorited: isSet(object.isFavorited) ? globalThis.Boolean(object.isFavorited) : false, - size: isSet(object.size) ? globalThis.Number(object.size) : 0, - totalCost: isSet(object.totalCost) ? globalThis.Number(object.totalCost) : 0, - tokensIn: isSet(object.tokensIn) ? globalThis.Number(object.tokensIn) : 0, - tokensOut: isSet(object.tokensOut) ? globalThis.Number(object.tokensOut) : 0, - cacheWrites: isSet(object.cacheWrites) ? globalThis.Number(object.cacheWrites) : 0, - cacheReads: isSet(object.cacheReads) ? globalThis.Number(object.cacheReads) : 0, - } - }, - - toJSON(message: TaskResponse): unknown { - const obj: any = {} - if (message.id !== "") { - obj.id = message.id - } - if (message.task !== "") { - obj.task = message.task - } - if (message.ts !== 0) { - obj.ts = Math.round(message.ts) - } - if (message.isFavorited !== false) { - obj.isFavorited = message.isFavorited - } - if (message.size !== 0) { - obj.size = Math.round(message.size) - } - if (message.totalCost !== 0) { - obj.totalCost = message.totalCost - } - if (message.tokensIn !== 0) { - obj.tokensIn = Math.round(message.tokensIn) - } - if (message.tokensOut !== 0) { - obj.tokensOut = Math.round(message.tokensOut) - } - if (message.cacheWrites !== 0) { - obj.cacheWrites = Math.round(message.cacheWrites) - } - if (message.cacheReads !== 0) { - obj.cacheReads = Math.round(message.cacheReads) - } - return obj - }, - - create, I>>(base?: I): TaskResponse { - return TaskResponse.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): TaskResponse { - const message = createBaseTaskResponse() - message.id = object.id ?? "" - message.task = object.task ?? "" - message.ts = object.ts ?? 0 - message.isFavorited = object.isFavorited ?? false - message.size = object.size ?? 0 - message.totalCost = object.totalCost ?? 0 - message.tokensIn = object.tokensIn ?? 0 - message.tokensOut = object.tokensOut ?? 0 - message.cacheWrites = object.cacheWrites ?? 0 - message.cacheReads = object.cacheReads ?? 0 - return message - }, -} - -function createBaseDeleteNonFavoritedTasksResults(): DeleteNonFavoritedTasksResults { - return { tasksPreserved: 0, tasksDeleted: 0 } -} - -export const DeleteNonFavoritedTasksResults: MessageFns = { - encode(message: DeleteNonFavoritedTasksResults, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.tasksPreserved !== 0) { - writer.uint32(8).int32(message.tasksPreserved) - } - if (message.tasksDeleted !== 0) { - writer.uint32(16).int32(message.tasksDeleted) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): DeleteNonFavoritedTasksResults { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseDeleteNonFavoritedTasksResults() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.tasksPreserved = reader.int32() - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.tasksDeleted = reader.int32() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): DeleteNonFavoritedTasksResults { - return { - tasksPreserved: isSet(object.tasksPreserved) ? globalThis.Number(object.tasksPreserved) : 0, - tasksDeleted: isSet(object.tasksDeleted) ? globalThis.Number(object.tasksDeleted) : 0, - } - }, - - toJSON(message: DeleteNonFavoritedTasksResults): unknown { - const obj: any = {} - if (message.tasksPreserved !== 0) { - obj.tasksPreserved = Math.round(message.tasksPreserved) - } - if (message.tasksDeleted !== 0) { - obj.tasksDeleted = Math.round(message.tasksDeleted) - } - return obj - }, - - create, I>>(base?: I): DeleteNonFavoritedTasksResults { - return DeleteNonFavoritedTasksResults.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): DeleteNonFavoritedTasksResults { - const message = createBaseDeleteNonFavoritedTasksResults() - message.tasksPreserved = object.tasksPreserved ?? 0 - message.tasksDeleted = object.tasksDeleted ?? 0 - return message - }, -} - -function createBaseGetTaskHistoryRequest(): GetTaskHistoryRequest { - return { metadata: undefined, favoritesOnly: false, searchQuery: "", sortBy: "", currentWorkspaceOnly: false } -} - -export const GetTaskHistoryRequest: MessageFns = { - encode(message: GetTaskHistoryRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.favoritesOnly !== false) { - writer.uint32(16).bool(message.favoritesOnly) - } - if (message.searchQuery !== "") { - writer.uint32(26).string(message.searchQuery) - } - if (message.sortBy !== "") { - writer.uint32(34).string(message.sortBy) - } - if (message.currentWorkspaceOnly !== false) { - writer.uint32(40).bool(message.currentWorkspaceOnly) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): GetTaskHistoryRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseGetTaskHistoryRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.favoritesOnly = reader.bool() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.searchQuery = reader.string() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.sortBy = reader.string() - continue - } - case 5: { - if (tag !== 40) { - break - } - - message.currentWorkspaceOnly = reader.bool() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): GetTaskHistoryRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - favoritesOnly: isSet(object.favoritesOnly) ? globalThis.Boolean(object.favoritesOnly) : false, - searchQuery: isSet(object.searchQuery) ? globalThis.String(object.searchQuery) : "", - sortBy: isSet(object.sortBy) ? globalThis.String(object.sortBy) : "", - currentWorkspaceOnly: isSet(object.currentWorkspaceOnly) ? globalThis.Boolean(object.currentWorkspaceOnly) : false, - } - }, - - toJSON(message: GetTaskHistoryRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.favoritesOnly !== false) { - obj.favoritesOnly = message.favoritesOnly - } - if (message.searchQuery !== "") { - obj.searchQuery = message.searchQuery - } - if (message.sortBy !== "") { - obj.sortBy = message.sortBy - } - if (message.currentWorkspaceOnly !== false) { - obj.currentWorkspaceOnly = message.currentWorkspaceOnly - } - return obj - }, - - create, I>>(base?: I): GetTaskHistoryRequest { - return GetTaskHistoryRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): GetTaskHistoryRequest { - const message = createBaseGetTaskHistoryRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.favoritesOnly = object.favoritesOnly ?? false - message.searchQuery = object.searchQuery ?? "" - message.sortBy = object.sortBy ?? "" - message.currentWorkspaceOnly = object.currentWorkspaceOnly ?? false - return message - }, -} - -function createBaseTaskHistoryArray(): TaskHistoryArray { - return { tasks: [], totalCount: 0 } -} - -export const TaskHistoryArray: MessageFns = { - encode(message: TaskHistoryArray, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - for (const v of message.tasks) { - TaskItem.encode(v!, writer.uint32(10).fork()).join() - } - if (message.totalCount !== 0) { - writer.uint32(16).int32(message.totalCount) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): TaskHistoryArray { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseTaskHistoryArray() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.tasks.push(TaskItem.decode(reader, reader.uint32())) - continue - } - case 2: { - if (tag !== 16) { - break - } - - message.totalCount = reader.int32() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): TaskHistoryArray { - return { - tasks: globalThis.Array.isArray(object?.tasks) ? object.tasks.map((e: any) => TaskItem.fromJSON(e)) : [], - totalCount: isSet(object.totalCount) ? globalThis.Number(object.totalCount) : 0, - } - }, - - toJSON(message: TaskHistoryArray): unknown { - const obj: any = {} - if (message.tasks?.length) { - obj.tasks = message.tasks.map((e) => TaskItem.toJSON(e)) - } - if (message.totalCount !== 0) { - obj.totalCount = Math.round(message.totalCount) - } - return obj - }, - - create, I>>(base?: I): TaskHistoryArray { - return TaskHistoryArray.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): TaskHistoryArray { - const message = createBaseTaskHistoryArray() - message.tasks = object.tasks?.map((e) => TaskItem.fromPartial(e)) || [] - message.totalCount = object.totalCount ?? 0 - return message - }, -} - -function createBaseTaskItem(): TaskItem { - return { - id: "", - task: "", - ts: 0, - isFavorited: false, - size: 0, - totalCost: 0, - tokensIn: 0, - tokensOut: 0, - cacheWrites: 0, - cacheReads: 0, - } -} - -export const TaskItem: MessageFns = { - encode(message: TaskItem, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.id !== "") { - writer.uint32(10).string(message.id) - } - if (message.task !== "") { - writer.uint32(18).string(message.task) - } - if (message.ts !== 0) { - writer.uint32(24).int64(message.ts) - } - if (message.isFavorited !== false) { - writer.uint32(32).bool(message.isFavorited) - } - if (message.size !== 0) { - writer.uint32(40).int64(message.size) - } - if (message.totalCost !== 0) { - writer.uint32(49).double(message.totalCost) - } - if (message.tokensIn !== 0) { - writer.uint32(56).int32(message.tokensIn) - } - if (message.tokensOut !== 0) { - writer.uint32(64).int32(message.tokensOut) - } - if (message.cacheWrites !== 0) { - writer.uint32(72).int32(message.cacheWrites) - } - if (message.cacheReads !== 0) { - writer.uint32(80).int32(message.cacheReads) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): TaskItem { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseTaskItem() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.id = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.task = reader.string() - continue - } - case 3: { - if (tag !== 24) { - break - } - - message.ts = longToNumber(reader.int64()) - continue - } - case 4: { - if (tag !== 32) { - break - } - - message.isFavorited = reader.bool() - continue - } - case 5: { - if (tag !== 40) { - break - } - - message.size = longToNumber(reader.int64()) - continue - } - case 6: { - if (tag !== 49) { - break - } - - message.totalCost = reader.double() - continue - } - case 7: { - if (tag !== 56) { - break - } - - message.tokensIn = reader.int32() - continue - } - case 8: { - if (tag !== 64) { - break - } - - message.tokensOut = reader.int32() - continue - } - case 9: { - if (tag !== 72) { - break - } - - message.cacheWrites = reader.int32() - continue - } - case 10: { - if (tag !== 80) { - break - } - - message.cacheReads = reader.int32() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): TaskItem { - return { - id: isSet(object.id) ? globalThis.String(object.id) : "", - task: isSet(object.task) ? globalThis.String(object.task) : "", - ts: isSet(object.ts) ? globalThis.Number(object.ts) : 0, - isFavorited: isSet(object.isFavorited) ? globalThis.Boolean(object.isFavorited) : false, - size: isSet(object.size) ? globalThis.Number(object.size) : 0, - totalCost: isSet(object.totalCost) ? globalThis.Number(object.totalCost) : 0, - tokensIn: isSet(object.tokensIn) ? globalThis.Number(object.tokensIn) : 0, - tokensOut: isSet(object.tokensOut) ? globalThis.Number(object.tokensOut) : 0, - cacheWrites: isSet(object.cacheWrites) ? globalThis.Number(object.cacheWrites) : 0, - cacheReads: isSet(object.cacheReads) ? globalThis.Number(object.cacheReads) : 0, - } - }, - - toJSON(message: TaskItem): unknown { - const obj: any = {} - if (message.id !== "") { - obj.id = message.id - } - if (message.task !== "") { - obj.task = message.task - } - if (message.ts !== 0) { - obj.ts = Math.round(message.ts) - } - if (message.isFavorited !== false) { - obj.isFavorited = message.isFavorited - } - if (message.size !== 0) { - obj.size = Math.round(message.size) - } - if (message.totalCost !== 0) { - obj.totalCost = message.totalCost - } - if (message.tokensIn !== 0) { - obj.tokensIn = Math.round(message.tokensIn) - } - if (message.tokensOut !== 0) { - obj.tokensOut = Math.round(message.tokensOut) - } - if (message.cacheWrites !== 0) { - obj.cacheWrites = Math.round(message.cacheWrites) - } - if (message.cacheReads !== 0) { - obj.cacheReads = Math.round(message.cacheReads) - } - return obj - }, - - create, I>>(base?: I): TaskItem { - return TaskItem.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): TaskItem { - const message = createBaseTaskItem() - message.id = object.id ?? "" - message.task = object.task ?? "" - message.ts = object.ts ?? 0 - message.isFavorited = object.isFavorited ?? false - message.size = object.size ?? 0 - message.totalCost = object.totalCost ?? 0 - message.tokensIn = object.tokensIn ?? 0 - message.tokensOut = object.tokensOut ?? 0 - message.cacheWrites = object.cacheWrites ?? 0 - message.cacheReads = object.cacheReads ?? 0 - return message - }, -} - -function createBaseAskResponseRequest(): AskResponseRequest { - return { metadata: undefined, responseType: "", text: "", images: [] } -} - -export const AskResponseRequest: MessageFns = { - encode(message: AskResponseRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.metadata !== undefined) { - Metadata.encode(message.metadata, writer.uint32(10).fork()).join() - } - if (message.responseType !== "") { - writer.uint32(18).string(message.responseType) - } - if (message.text !== "") { - writer.uint32(26).string(message.text) - } - for (const v of message.images) { - writer.uint32(34).string(v!) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): AskResponseRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseAskResponseRequest() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.metadata = Metadata.decode(reader, reader.uint32()) - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.responseType = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.text = reader.string() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.images.push(reader.string()) - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): AskResponseRequest { - return { - metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, - responseType: isSet(object.responseType) ? globalThis.String(object.responseType) : "", - text: isSet(object.text) ? globalThis.String(object.text) : "", - images: globalThis.Array.isArray(object?.images) ? object.images.map((e: any) => globalThis.String(e)) : [], - } - }, - - toJSON(message: AskResponseRequest): unknown { - const obj: any = {} - if (message.metadata !== undefined) { - obj.metadata = Metadata.toJSON(message.metadata) - } - if (message.responseType !== "") { - obj.responseType = message.responseType - } - if (message.text !== "") { - obj.text = message.text - } - if (message.images?.length) { - obj.images = message.images - } - return obj - }, - - create, I>>(base?: I): AskResponseRequest { - return AskResponseRequest.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): AskResponseRequest { - const message = createBaseAskResponseRequest() - message.metadata = - object.metadata !== undefined && object.metadata !== null ? Metadata.fromPartial(object.metadata) : undefined - message.responseType = object.responseType ?? "" - message.text = object.text ?? "" - message.images = object.images?.map((e) => e) || [] - return message - }, -} - -export type TaskServiceDefinition = typeof TaskServiceDefinition -export const TaskServiceDefinition = { - name: "TaskService", - fullName: "cline.TaskService", - methods: { - /** Cancels the currently running task */ - cancelTask: { - name: "cancelTask", - requestType: EmptyRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Clears the current task */ - clearTask: { - name: "clearTask", - requestType: EmptyRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Deletes multiple tasks with the given IDs */ - deleteTasksWithIds: { - name: "deleteTasksWithIds", - requestType: StringArrayRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Creates a new task with the given text and optional images */ - newTask: { - name: "newTask", - requestType: NewTaskRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Shows a task with the specified ID */ - showTaskWithId: { - name: "showTaskWithId", - requestType: StringRequest, - requestStream: false, - responseType: TaskResponse, - responseStream: false, - options: {}, - }, - /** Exports a task with the given ID to markdown */ - exportTaskWithId: { - name: "exportTaskWithId", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Toggles the favorite status of a task */ - toggleTaskFavorite: { - name: "toggleTaskFavorite", - requestType: TaskFavoriteRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Deletes all non-favorited tasks */ - deleteNonFavoritedTasks: { - name: "deleteNonFavoritedTasks", - requestType: EmptyRequest, - requestStream: false, - responseType: DeleteNonFavoritedTasksResults, - responseStream: false, - options: {}, - }, - /** Gets filtered task history */ - getTaskHistory: { - name: "getTaskHistory", - requestType: GetTaskHistoryRequest, - requestStream: false, - responseType: TaskHistoryArray, - responseStream: false, - options: {}, - }, - /** Sends a response to a previous ask operation */ - askResponse: { - name: "askResponse", - requestType: AskResponseRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Records task feedback (thumbs up/down) */ - taskFeedback: { - name: "taskFeedback", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Shows task completion changes diff in a view */ - taskCompletionViewChanges: { - name: "taskCompletionViewChanges", - requestType: Int64Request, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - }, -} as const - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined - -export type DeepPartial = T extends Builtin - ? T - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial - -type KeysOfUnion = T extends T ? keyof T : never -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } - -function longToNumber(int64: { toString(): string }): number { - const num = globalThis.Number(int64.toString()) - if (num > globalThis.Number.MAX_SAFE_INTEGER) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER") - } - if (num < globalThis.Number.MIN_SAFE_INTEGER) { - throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER") - } - return num -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter - decode(input: BinaryReader | Uint8Array, length?: number): T - fromJSON(object: any): T - toJSON(message: T): unknown - create, I>>(base?: I): T - fromPartial, I>>(object: I): T -} diff --git a/src/shared/proto/ui.ts b/src/shared/proto/ui.ts deleted file mode 100644 index 1f86595b..00000000 --- a/src/shared/proto/ui.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: ui.proto - -/* eslint-disable */ -import { Boolean, Empty, EmptyRequest, StringRequest } from "./common" - -export const protobufPackage = "cline" - -/** UiService provides methods for managing UI interactions */ -export type UiServiceDefinition = typeof UiServiceDefinition -export const UiServiceDefinition = { - name: "UiService", - fullName: "cline.UiService", - methods: { - /** Scrolls to a specific settings section in the settings view */ - scrollToSettings: { - name: "scrollToSettings", - requestType: StringRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: {}, - }, - /** Marks the current announcement as shown and returns whether an announcement should still be shown */ - onDidShowAnnouncement: { - name: "onDidShowAnnouncement", - requestType: EmptyRequest, - requestStream: false, - responseType: Boolean, - responseStream: false, - options: {}, - }, - }, -} as const diff --git a/src/shared/proto/web.ts b/src/shared/proto/web.ts deleted file mode 100644 index 44478ab7..00000000 --- a/src/shared/proto/web.ts +++ /dev/null @@ -1,295 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.7.0 -// protoc v3.19.1 -// source: web.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire" -import { StringRequest } from "./common" - -export const protobufPackage = "cline" - -export interface IsImageUrl { - isImage: boolean - url: string -} - -export interface OpenGraphData { - title: string - description: string - image: string - url: string - siteName: string - type: string -} - -function createBaseIsImageUrl(): IsImageUrl { - return { isImage: false, url: "" } -} - -export const IsImageUrl: MessageFns = { - encode(message: IsImageUrl, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.isImage !== false) { - writer.uint32(8).bool(message.isImage) - } - if (message.url !== "") { - writer.uint32(18).string(message.url) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): IsImageUrl { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseIsImageUrl() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break - } - - message.isImage = reader.bool() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.url = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): IsImageUrl { - return { - isImage: isSet(object.isImage) ? globalThis.Boolean(object.isImage) : false, - url: isSet(object.url) ? globalThis.String(object.url) : "", - } - }, - - toJSON(message: IsImageUrl): unknown { - const obj: any = {} - if (message.isImage !== false) { - obj.isImage = message.isImage - } - if (message.url !== "") { - obj.url = message.url - } - return obj - }, - - create, I>>(base?: I): IsImageUrl { - return IsImageUrl.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): IsImageUrl { - const message = createBaseIsImageUrl() - message.isImage = object.isImage ?? false - message.url = object.url ?? "" - return message - }, -} - -function createBaseOpenGraphData(): OpenGraphData { - return { title: "", description: "", image: "", url: "", siteName: "", type: "" } -} - -export const OpenGraphData: MessageFns = { - encode(message: OpenGraphData, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.title !== "") { - writer.uint32(10).string(message.title) - } - if (message.description !== "") { - writer.uint32(18).string(message.description) - } - if (message.image !== "") { - writer.uint32(26).string(message.image) - } - if (message.url !== "") { - writer.uint32(34).string(message.url) - } - if (message.siteName !== "") { - writer.uint32(42).string(message.siteName) - } - if (message.type !== "") { - writer.uint32(50).string(message.type) - } - return writer - }, - - decode(input: BinaryReader | Uint8Array, length?: number): OpenGraphData { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input) - let end = length === undefined ? reader.len : reader.pos + length - const message = createBaseOpenGraphData() - while (reader.pos < end) { - const tag = reader.uint32() - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break - } - - message.title = reader.string() - continue - } - case 2: { - if (tag !== 18) { - break - } - - message.description = reader.string() - continue - } - case 3: { - if (tag !== 26) { - break - } - - message.image = reader.string() - continue - } - case 4: { - if (tag !== 34) { - break - } - - message.url = reader.string() - continue - } - case 5: { - if (tag !== 42) { - break - } - - message.siteName = reader.string() - continue - } - case 6: { - if (tag !== 50) { - break - } - - message.type = reader.string() - continue - } - } - if ((tag & 7) === 4 || tag === 0) { - break - } - reader.skip(tag & 7) - } - return message - }, - - fromJSON(object: any): OpenGraphData { - return { - title: isSet(object.title) ? globalThis.String(object.title) : "", - description: isSet(object.description) ? globalThis.String(object.description) : "", - image: isSet(object.image) ? globalThis.String(object.image) : "", - url: isSet(object.url) ? globalThis.String(object.url) : "", - siteName: isSet(object.siteName) ? globalThis.String(object.siteName) : "", - type: isSet(object.type) ? globalThis.String(object.type) : "", - } - }, - - toJSON(message: OpenGraphData): unknown { - const obj: any = {} - if (message.title !== "") { - obj.title = message.title - } - if (message.description !== "") { - obj.description = message.description - } - if (message.image !== "") { - obj.image = message.image - } - if (message.url !== "") { - obj.url = message.url - } - if (message.siteName !== "") { - obj.siteName = message.siteName - } - if (message.type !== "") { - obj.type = message.type - } - return obj - }, - - create, I>>(base?: I): OpenGraphData { - return OpenGraphData.fromPartial(base ?? ({} as any)) - }, - fromPartial, I>>(object: I): OpenGraphData { - const message = createBaseOpenGraphData() - message.title = object.title ?? "" - message.description = object.description ?? "" - message.image = object.image ?? "" - message.url = object.url ?? "" - message.siteName = object.siteName ?? "" - message.type = object.type ?? "" - return message - }, -} - -export type WebServiceDefinition = typeof WebServiceDefinition -export const WebServiceDefinition = { - name: "WebService", - fullName: "cline.WebService", - methods: { - checkIsImageUrl: { - name: "checkIsImageUrl", - requestType: StringRequest, - requestStream: false, - responseType: IsImageUrl, - responseStream: false, - options: {}, - }, - fetchOpenGraphData: { - name: "fetchOpenGraphData", - requestType: StringRequest, - requestStream: false, - responseType: OpenGraphData, - responseStream: false, - options: {}, - }, - }, -} as const - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined - -export type DeepPartial = T extends Builtin - ? T - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial - -type KeysOfUnion = T extends T ? keyof T : never -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never } - -function isSet(value: any): boolean { - return value !== null && value !== undefined -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter - decode(input: BinaryReader | Uint8Array, length?: number): T - fromJSON(object: any): T - toJSON(message: T): unknown - create, I>>(base?: I): T - fromPartial, I>>(object: I): T -} diff --git a/src/standalone/server-setup.ts b/src/standalone/server-setup.ts deleted file mode 100644 index d0c8f08f..00000000 --- a/src/standalone/server-setup.ts +++ /dev/null @@ -1,205 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! -// Generated by generate-server-setup.mjs -import * as grpc from "@grpc/grpc-js" -import { Controller } from "../core/controller" -import { GrpcHandlerWrapper, GrpcStreamingResponseHandlerWrapper } from "./grpc-types" - -// Account Service -import { accountLoginClicked } from "../core/controller/account/accountLoginClicked" -import { accountLogoutClicked } from "../core/controller/account/accountLogoutClicked" - -// Browser Service -import { getBrowserConnectionInfo } from "../core/controller/browser/getBrowserConnectionInfo" -import { testBrowserConnection } from "../core/controller/browser/testBrowserConnection" -import { discoverBrowser } from "../core/controller/browser/discoverBrowser" -import { getDetectedChromePath } from "../core/controller/browser/getDetectedChromePath" -import { updateBrowserSettings } from "../core/controller/browser/updateBrowserSettings" -import { relaunchChromeDebugMode } from "../core/controller/browser/relaunchChromeDebugMode" - -// Checkpoints Service -import { checkpointDiff } from "../core/controller/checkpoints/checkpointDiff" -import { checkpointRestore } from "../core/controller/checkpoints/checkpointRestore" - -// File Service -import { copyToClipboard } from "../core/controller/file/copyToClipboard" -import { openFile } from "../core/controller/file/openFile" -import { openImage } from "../core/controller/file/openImage" -import { openMention } from "../core/controller/file/openMention" -import { deleteRuleFile } from "../core/controller/file/deleteRuleFile" -import { createRuleFile } from "../core/controller/file/createRuleFile" -import { searchCommits } from "../core/controller/file/searchCommits" -import { selectImages } from "../core/controller/file/selectImages" -import { getRelativePaths } from "../core/controller/file/getRelativePaths" -import { searchFiles } from "../core/controller/file/searchFiles" -import { toggleClineRule } from "../core/controller/file/toggleClineRule" -import { toggleCursorRule } from "../core/controller/file/toggleCursorRule" -import { toggleWindsurfRule } from "../core/controller/file/toggleWindsurfRule" -import { refreshRules } from "../core/controller/file/refreshRules" - -// Mcp Service -import { toggleMcpServer } from "../core/controller/mcp/toggleMcpServer" -import { updateMcpTimeout } from "../core/controller/mcp/updateMcpTimeout" -import { addRemoteMcpServer } from "../core/controller/mcp/addRemoteMcpServer" -import { downloadMcp } from "../core/controller/mcp/downloadMcp" -import { restartMcpServer } from "../core/controller/mcp/restartMcpServer" -import { deleteMcpServer } from "../core/controller/mcp/deleteMcpServer" -import { toggleToolAutoApprove } from "../core/controller/mcp/toggleToolAutoApprove" -import { refreshMcpMarketplace } from "../core/controller/mcp/refreshMcpMarketplace" - -// Models Service -import { getOllamaModels } from "../core/controller/models/getOllamaModels" -import { getLmStudioModels } from "../core/controller/models/getLmStudioModels" -import { getVsCodeLmModels } from "../core/controller/models/getVsCodeLmModels" -import { refreshOpenRouterModels } from "../core/controller/models/refreshOpenRouterModels" -import { refreshOpenAiModels } from "../core/controller/models/refreshOpenAiModels" -import { refreshRequestyModels } from "../core/controller/models/refreshRequestyModels" - -// Slash Service -import { reportBug } from "../core/controller/slash/reportBug" -import { condense } from "../core/controller/slash/condense" - -// State Service -import { getLatestState } from "../core/controller/state/getLatestState" -import { subscribeToState } from "../core/controller/state/subscribeToState" -import { toggleFavoriteModel } from "../core/controller/state/toggleFavoriteModel" -import { resetState } from "../core/controller/state/resetState" -import { togglePlanActMode } from "../core/controller/state/togglePlanActMode" -import { updateTerminalConnectionTimeout } from "../core/controller/state/updateTerminalConnectionTimeout" -import { updateAutoApprovalSettings } from "../core/controller/state/updateAutoApprovalSettings" - -// Task Service -import { cancelTask } from "../core/controller/task/cancelTask" -import { clearTask } from "../core/controller/task/clearTask" -import { deleteTasksWithIds } from "../core/controller/task/deleteTasksWithIds" -import { newTask } from "../core/controller/task/newTask" -import { showTaskWithId } from "../core/controller/task/showTaskWithId" -import { exportTaskWithId } from "../core/controller/task/exportTaskWithId" -import { toggleTaskFavorite } from "../core/controller/task/toggleTaskFavorite" -import { deleteNonFavoritedTasks } from "../core/controller/task/deleteNonFavoritedTasks" -import { getTaskHistory } from "../core/controller/task/getTaskHistory" -import { askResponse } from "../core/controller/task/askResponse" -import { taskFeedback } from "../core/controller/task/taskFeedback" -import { taskCompletionViewChanges } from "../core/controller/task/taskCompletionViewChanges" - -// Ui Service -import { scrollToSettings } from "../core/controller/ui/scrollToSettings" -import { onDidShowAnnouncement } from "../core/controller/ui/onDidShowAnnouncement" - -// Web Service -import { checkIsImageUrl } from "../core/controller/web/checkIsImageUrl" -import { fetchOpenGraphData } from "../core/controller/web/fetchOpenGraphData" - -export function addServices( - server: grpc.Server, - proto: any, - controller: Controller, - wrapper: GrpcHandlerWrapper, - wrapStreamingResponse: GrpcStreamingResponseHandlerWrapper, -): void { - // Account Service - server.addService(proto.cline.AccountService.service, { - accountLoginClicked: wrapper(accountLoginClicked, controller), - accountLogoutClicked: wrapper(accountLogoutClicked, controller), - }) - - // Browser Service - server.addService(proto.cline.BrowserService.service, { - getBrowserConnectionInfo: wrapper(getBrowserConnectionInfo, controller), - testBrowserConnection: wrapper(testBrowserConnection, controller), - discoverBrowser: wrapper(discoverBrowser, controller), - getDetectedChromePath: wrapper(getDetectedChromePath, controller), - updateBrowserSettings: wrapper(updateBrowserSettings, controller), - relaunchChromeDebugMode: wrapper(relaunchChromeDebugMode, controller), - }) - - // Checkpoints Service - server.addService(proto.cline.CheckpointsService.service, { - checkpointDiff: wrapper(checkpointDiff, controller), - checkpointRestore: wrapper(checkpointRestore, controller), - }) - - // File Service - server.addService(proto.cline.FileService.service, { - copyToClipboard: wrapper(copyToClipboard, controller), - openFile: wrapper(openFile, controller), - openImage: wrapper(openImage, controller), - openMention: wrapper(openMention, controller), - deleteRuleFile: wrapper(deleteRuleFile, controller), - createRuleFile: wrapper(createRuleFile, controller), - searchCommits: wrapper(searchCommits, controller), - selectImages: wrapper(selectImages, controller), - getRelativePaths: wrapper(getRelativePaths, controller), - searchFiles: wrapper(searchFiles, controller), - toggleClineRule: wrapper(toggleClineRule, controller), - toggleCursorRule: wrapper(toggleCursorRule, controller), - toggleWindsurfRule: wrapper(toggleWindsurfRule, controller), - refreshRules: wrapper(refreshRules, controller), - }) - - // Mcp Service - server.addService(proto.cline.McpService.service, { - toggleMcpServer: wrapper(toggleMcpServer, controller), - updateMcpTimeout: wrapper(updateMcpTimeout, controller), - addRemoteMcpServer: wrapper(addRemoteMcpServer, controller), - downloadMcp: wrapper(downloadMcp, controller), - restartMcpServer: wrapper(restartMcpServer, controller), - deleteMcpServer: wrapper(deleteMcpServer, controller), - toggleToolAutoApprove: wrapper(toggleToolAutoApprove, controller), - refreshMcpMarketplace: wrapper(refreshMcpMarketplace, controller), - }) - - // Models Service - server.addService(proto.cline.ModelsService.service, { - getOllamaModels: wrapper(getOllamaModels, controller), - getLmStudioModels: wrapper(getLmStudioModels, controller), - getVsCodeLmModels: wrapper(getVsCodeLmModels, controller), - refreshOpenRouterModels: wrapper(refreshOpenRouterModels, controller), - refreshOpenAiModels: wrapper(refreshOpenAiModels, controller), - refreshRequestyModels: wrapper(refreshRequestyModels, controller), - }) - - // Slash Service - server.addService(proto.cline.SlashService.service, { - reportBug: wrapper(reportBug, controller), - condense: wrapper(condense, controller), - }) - - // State Service - server.addService(proto.cline.StateService.service, { - getLatestState: wrapper(getLatestState, controller), - subscribeToState: wrapStreamingResponse(subscribeToState, controller), - toggleFavoriteModel: wrapper(toggleFavoriteModel, controller), - resetState: wrapper(resetState, controller), - togglePlanActMode: wrapper(togglePlanActMode, controller), - updateTerminalConnectionTimeout: wrapper(updateTerminalConnectionTimeout, controller), - updateAutoApprovalSettings: wrapper(updateAutoApprovalSettings, controller), - }) - - // Task Service - server.addService(proto.cline.TaskService.service, { - cancelTask: wrapper(cancelTask, controller), - clearTask: wrapper(clearTask, controller), - deleteTasksWithIds: wrapper(deleteTasksWithIds, controller), - newTask: wrapper(newTask, controller), - showTaskWithId: wrapper(showTaskWithId, controller), - exportTaskWithId: wrapper(exportTaskWithId, controller), - toggleTaskFavorite: wrapper(toggleTaskFavorite, controller), - deleteNonFavoritedTasks: wrapper(deleteNonFavoritedTasks, controller), - getTaskHistory: wrapper(getTaskHistory, controller), - askResponse: wrapper(askResponse, controller), - taskFeedback: wrapper(taskFeedback, controller), - taskCompletionViewChanges: wrapper(taskCompletionViewChanges, controller), - }) - - // Ui Service - server.addService(proto.cline.UiService.service, { - scrollToSettings: wrapper(scrollToSettings, controller), - onDidShowAnnouncement: wrapper(onDidShowAnnouncement, controller), - }) - - // Web Service - server.addService(proto.cline.WebService.service, { - checkIsImageUrl: wrapper(checkIsImageUrl, controller), - fetchOpenGraphData: wrapper(fetchOpenGraphData, controller), - }) -} diff --git a/webview-ui/src/components/chat/TaskHeader.tsx b/webview-ui/src/components/chat/TaskHeader.tsx index 5d8ba761..7a32c260 100644 --- a/webview-ui/src/components/chat/TaskHeader.tsx +++ b/webview-ui/src/components/chat/TaskHeader.tsx @@ -11,7 +11,7 @@ import Thumbnails from "@/components/common/Thumbnails" import { normalizeApiConfiguration } from "@/components/settings/ApiOptions" import { validateSlashCommand } from "@/utils/slash-commands" import TaskTimeline from "./TaskTimeline" -import { TaskServiceClient, FileServiceClient } from "@/services/grpc-client" +import { TaskServiceClient, FileServiceClient, UiServiceClient } from "@/services/grpc-client" import HeroTooltip from "@/components/common/HeroTooltip" interface TaskHeaderProps { @@ -37,7 +37,8 @@ const TaskHeader: React.FC = ({ lastApiReqTotalTokens, onClose, }) => { - const { apiConfiguration, currentTaskItem, checkpointTrackerErrorMessage, clineMessages } = useExtensionState() + const { apiConfiguration, currentTaskItem, checkpointTrackerErrorMessage, clineMessages, navigateToSettings } = + useExtensionState() const [isTaskExpanded, setIsTaskExpanded] = useState(true) const [isTextExpanded, setIsTextExpanded] = useState(false) const [showSeeMore, setShowSeeMore] = useState(false) @@ -483,20 +484,23 @@ const TaskHeader: React.FC = ({ {checkpointTrackerErrorMessage.replace(/disabling checkpoints\.$/, "")} {checkpointTrackerErrorMessage.endsWith("disabling checkpoints.") && ( <> - { - vscode.postMessage({ - type: "openExtensionSettings", - text: "enableCheckpoints", - }) + // First open the settings panel using direct navigation + navigateToSettings() + + // After a short delay, send a message to scroll to settings + setTimeout(async () => { + try { + await UiServiceClient.scrollToSettings({ value: "features" }) + } catch (error) { + console.error("Error scrolling to checkpoint settings:", error) + } + }, 300) }} - style={{ - color: "inherit", - textDecoration: "underline", - cursor: "pointer", - }}> + className="underline cursor-pointer bg-transparent border-0 p-0 text-inherit font-inherit"> disabling checkpoints. - + )} {checkpointTrackerErrorMessage.includes("Git must be installed to use checkpoints.") && ( diff --git a/webview-ui/src/services/grpc-client.ts b/webview-ui/src/services/grpc-client.ts deleted file mode 100644 index 6a73f76a..00000000 --- a/webview-ui/src/services/grpc-client.ts +++ /dev/null @@ -1,41 +0,0 @@ -// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY -// Generated by proto/build-proto.js - -import { createGrpcClient } from "./grpc-client-base" -import { AccountServiceDefinition } from "@shared/proto/account" -import { BrowserServiceDefinition } from "@shared/proto/browser" -import { CheckpointsServiceDefinition } from "@shared/proto/checkpoints" -import { FileServiceDefinition } from "@shared/proto/file" -import { McpServiceDefinition } from "@shared/proto/mcp" -import { StateServiceDefinition } from "@shared/proto/state" -import { TaskServiceDefinition } from "@shared/proto/task" -import { WebServiceDefinition } from "@shared/proto/web" -import { ModelsServiceDefinition } from "@shared/proto/models" -import { SlashServiceDefinition } from "@shared/proto/slash" -import { UiServiceDefinition } from "@shared/proto/ui" - -const AccountServiceClient = createGrpcClient(AccountServiceDefinition) -const BrowserServiceClient = createGrpcClient(BrowserServiceDefinition) -const CheckpointsServiceClient = createGrpcClient(CheckpointsServiceDefinition) -const FileServiceClient = createGrpcClient(FileServiceDefinition) -const McpServiceClient = createGrpcClient(McpServiceDefinition) -const StateServiceClient = createGrpcClient(StateServiceDefinition) -const TaskServiceClient = createGrpcClient(TaskServiceDefinition) -const WebServiceClient = createGrpcClient(WebServiceDefinition) -const ModelsServiceClient = createGrpcClient(ModelsServiceDefinition) -const SlashServiceClient = createGrpcClient(SlashServiceDefinition) -const UiServiceClient = createGrpcClient(UiServiceDefinition) - -export { - AccountServiceClient, - BrowserServiceClient, - CheckpointsServiceClient, - FileServiceClient, - McpServiceClient, - StateServiceClient, - TaskServiceClient, - WebServiceClient, - ModelsServiceClient, - SlashServiceClient, - UiServiceClient, -} From 10239f0616c6a3987572ab37ddf53f8d19bc0c05 Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Fri, 23 May 2025 18:21:19 -0700 Subject: [PATCH 78/85] Migrate showAccountViewClicked protobus (#3787) * Stop tracking auto-generated files, respect .gitignore * migrate showAccountViewClicked --------- Co-authored-by: Elephant Lumps --- .changeset/eight-feet-sip.md | 5 +++++ src/core/controller/index.ts | 4 ---- src/shared/WebviewMessage.ts | 1 - webview-ui/src/components/settings/ClineAccountInfoCard.tsx | 5 ++--- 4 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 .changeset/eight-feet-sip.md diff --git a/.changeset/eight-feet-sip.md b/.changeset/eight-feet-sip.md new file mode 100644 index 00000000..0e3dff99 --- /dev/null +++ b/.changeset/eight-feet-sip.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Migrate showAccountViewClicked to protobus diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 93f33b6a..2b318fbc 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -308,10 +308,6 @@ export class Controller { vscode.env.openExternal(vscode.Uri.parse(message.url)) } break - case "showAccountViewClicked": { - await this.postMessageToWebview({ type: "action", action: "accountButtonClicked" }) - break - } case "fetchUserCreditsData": { await this.fetchUserCreditsData() break diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 9ac2aa89..de0adb7c 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -16,7 +16,6 @@ export interface WebviewMessage { | "openInBrowser" | "showChatView" | "requestVsCodeLmModels" - | "showAccountViewClicked" | "authStateChanged" | "authCallback" | "fetchMcpMarketplace" diff --git a/webview-ui/src/components/settings/ClineAccountInfoCard.tsx b/webview-ui/src/components/settings/ClineAccountInfoCard.tsx index 6199c132..1fbe5acc 100644 --- a/webview-ui/src/components/settings/ClineAccountInfoCard.tsx +++ b/webview-ui/src/components/settings/ClineAccountInfoCard.tsx @@ -1,13 +1,12 @@ import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" import { useFirebaseAuth } from "@/context/FirebaseAuthContext" -import { vscode } from "@/utils/vscode" import { useExtensionState } from "@/context/ExtensionStateContext" import { AccountServiceClient } from "@/services/grpc-client" import { EmptyRequest } from "@shared/proto/common" export const ClineAccountInfoCard = () => { const { user: firebaseUser, handleSignOut } = useFirebaseAuth() - const { userInfo, apiConfiguration } = useExtensionState() + const { userInfo, apiConfiguration, navigateToAccount } = useExtensionState() let user = apiConfiguration?.clineApiKey ? firebaseUser || userInfo : undefined @@ -18,7 +17,7 @@ export const ClineAccountInfoCard = () => { } const handleShowAccount = () => { - vscode.postMessage({ type: "showAccountViewClicked" }) + navigateToAccount() } return ( From ffeee7e48d50f5c136bffef419b751effe9a553d Mon Sep 17 00:00:00 2001 From: canvrno <46584286+canvrno@users.noreply.github.com> Date: Mon, 26 May 2025 11:20:37 -0700 Subject: [PATCH 79/85] [PROTOBUS] Move openInBrowser to protobus (#3691) * openInBrowser_protobus_migration --- .changeset/five-sheep-count.md | 5 ++++ proto/web.proto | 1 + src/core/controller/index.ts | 5 ---- src/core/controller/web/openInBrowser.ts | 21 +++++++++++++++ src/shared/WebviewMessage.ts | 3 --- .../mcp/chat-display/ImagePreview.tsx | 27 ++++++++++++------- .../mcp/chat-display/LinkPreview.tsx | 26 +++++++++++------- 7 files changed, 60 insertions(+), 28 deletions(-) create mode 100644 .changeset/five-sheep-count.md create mode 100644 src/core/controller/web/openInBrowser.ts diff --git a/.changeset/five-sheep-count.md b/.changeset/five-sheep-count.md new file mode 100644 index 00000000..3ad45bf4 --- /dev/null +++ b/.changeset/five-sheep-count.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +openInBrowser protobus migration diff --git a/proto/web.proto b/proto/web.proto index 3debacbc..0df3b6e8 100644 --- a/proto/web.proto +++ b/proto/web.proto @@ -9,6 +9,7 @@ import "common.proto"; service WebService { rpc checkIsImageUrl(StringRequest) returns (IsImageUrl); rpc fetchOpenGraphData(StringRequest) returns (OpenGraphData); + rpc openInBrowser(StringRequest) returns (Empty); } message IsImageUrl { diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 2b318fbc..9cf8b45e 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -303,11 +303,6 @@ export class Controller { text: message.text, }) break - case "openInBrowser": - if (message.url) { - vscode.env.openExternal(vscode.Uri.parse(message.url)) - } - break case "fetchUserCreditsData": { await this.fetchUserCreditsData() break diff --git a/src/core/controller/web/openInBrowser.ts b/src/core/controller/web/openInBrowser.ts new file mode 100644 index 00000000..e31d86d6 --- /dev/null +++ b/src/core/controller/web/openInBrowser.ts @@ -0,0 +1,21 @@ +import * as vscode from "vscode" +import { Controller } from ".." +import { Empty, StringRequest } from "../../../shared/proto/common" + +/** + * Opens a URL in the user's default browser + * @param controller The controller instance + * @param request The URL to open + * @returns Empty response since the client doesn't need a return value + */ +export async function openInBrowser(controller: Controller, request: StringRequest): Promise { + try { + if (request.value) { + await vscode.env.openExternal(vscode.Uri.parse(request.value)) + } + return Empty.create() + } catch (error) { + console.error("Error opening URL in browser:", error) + return Empty.create() + } +} diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index de0adb7c..4ea2a4dc 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -13,7 +13,6 @@ export interface WebviewMessage { | "newTask" | "condense" | "reportBug" - | "openInBrowser" | "showChatView" | "requestVsCodeLmModels" | "authStateChanged" @@ -54,8 +53,6 @@ export interface WebviewMessage { // For auth user?: UserInfo | null customToken?: string - // For openInBrowser - url?: string planActSeparateModelsSetting?: boolean enableCheckpointsSetting?: boolean mcpMarketplaceEnabled?: boolean diff --git a/webview-ui/src/components/mcp/chat-display/ImagePreview.tsx b/webview-ui/src/components/mcp/chat-display/ImagePreview.tsx index bbe7ae60..5cf70cbf 100644 --- a/webview-ui/src/components/mcp/chat-display/ImagePreview.tsx +++ b/webview-ui/src/components/mcp/chat-display/ImagePreview.tsx @@ -1,5 +1,6 @@ import React from "react" import { vscode } from "@/utils/vscode" +import { WebServiceClient } from "@/services/grpc-client" import DOMPurify from "dompurify" import { getSafeHostname, formatUrlForOpening, checkIfImageUrl } from "./utils/mcpRichUtil" import ChatErrorBoundary from "@/components/chat/ChatErrorBoundary" @@ -232,11 +233,14 @@ class ImagePreview extends React.Component< borderRadius: "4px", color: "var(--vscode-errorForeground)", }} - onClick={() => { - vscode.postMessage({ - type: "openInBrowser", - url: DOMPurify.sanitize(url), - }) + onClick={async () => { + try { + await WebServiceClient.openInBrowser({ + value: DOMPurify.sanitize(url), + }) + } catch (err) { + console.error("Error opening URL in browser:", err) + } }}>
Failed to load image
{getSafeHostname(url)}
@@ -256,11 +260,14 @@ class ImagePreview extends React.Component< maxWidth: "100%", cursor: "pointer", }} - onClick={() => { - vscode.postMessage({ - type: "openInBrowser", - url: DOMPurify.sanitize(formatUrlForOpening(url)), - }) + onClick={async () => { + try { + await WebServiceClient.openInBrowser({ + value: DOMPurify.sanitize(formatUrlForOpening(url)), + }) + } catch (err) { + console.error("Error opening URL in browser:", err) + } }}> {/\.svg(\?.*)?$/i.test(url) ? ( // Special handling for SVG images diff --git a/webview-ui/src/components/mcp/chat-display/LinkPreview.tsx b/webview-ui/src/components/mcp/chat-display/LinkPreview.tsx index 0e408590..232a7898 100644 --- a/webview-ui/src/components/mcp/chat-display/LinkPreview.tsx +++ b/webview-ui/src/components/mcp/chat-display/LinkPreview.tsx @@ -238,11 +238,14 @@ class LinkPreview extends React.Component { maxWidth: "512px", overflow: "auto", }} - onClick={() => { - vscode.postMessage({ - type: "openInBrowser", - url: DOMPurify.sanitize(url), - }) + onClick={async () => { + try { + await WebServiceClient.openInBrowser({ + value: DOMPurify.sanitize(url), + }) + } catch (err) { + console.error("Error opening URL in browser:", err) + } }}>
{errorDisplay}
{getSafeHostname(url)}
@@ -275,11 +278,14 @@ class LinkPreview extends React.Component { height: "128px", maxWidth: "512px", }} - onClick={() => { - vscode.postMessage({ - type: "openInBrowser", - url: DOMPurify.sanitize(url), - }) + onClick={async () => { + try { + await WebServiceClient.openInBrowser({ + value: DOMPurify.sanitize(url), + }) + } catch (err) { + console.error("Error opening URL in browser:", err) + } }}> {data.image && (
From 35929b6869aeda8db0ace569894813b3414d72fc Mon Sep 17 00:00:00 2001 From: Trevor Hudson Date: Mon, 26 May 2025 12:12:24 -0700 Subject: [PATCH 80/85] Use identify to enhance distinct user segmentation (#3765) include backup id in front end variables clarity --- .changeset/good-hounds-mate.md | 5 + src/core/controller/index.ts | 10 +- src/extension.ts | 11 + src/services/posthog/PostHogClientProvider.ts | 1 - .../posthog/telemetry/TelemetryService.ts | 286 ++++++------------ src/shared/ExtensionMessage.ts | 2 +- webview-ui/src/CustomPostHogProvider.tsx | 34 ++- .../src/components/settings/SettingsView.tsx | 2 +- .../src/context/ExtensionStateContext.tsx | 2 +- 9 files changed, 139 insertions(+), 214 deletions(-) create mode 100644 .changeset/good-hounds-mate.md diff --git a/.changeset/good-hounds-mate.md b/.changeset/good-hounds-mate.md new file mode 100644 index 00000000..95a12746 --- /dev/null +++ b/.changeset/good-hounds-mate.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Use identify to enhance distinct user segmentation diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 9cf8b45e..9d67b73b 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -261,13 +261,6 @@ export class Controller { } } }) - - // If user already opted in to telemetry, enable telemetry service - this.getStateToPostToWebview().then((state) => { - const { telemetrySetting } = state - const isOptedIn = telemetrySetting !== "disabled" - telemetryService.updateTelemetryState(isOptedIn) - }) break case "showChatView": { this.postMessageToWebview({ @@ -786,6 +779,7 @@ export class Controller { const response = await axios.get("https://api.cline.bot/v1/mcp/marketplace", { headers: { "Content-Type": "application/json", + "User-Agent": "cline-vscode-extension", }, }) @@ -1263,7 +1257,7 @@ export class Controller { telemetrySetting, planActSeparateModelsSetting, enableCheckpointsSetting: enableCheckpointsSetting ?? true, - vscMachineId: vscode.env.machineId, + distinctId: telemetryService.distinctId, globalClineRulesToggles: globalClineRulesToggles || {}, localClineRulesToggles: localClineRulesToggles || {}, localWindsurfRulesToggles: localWindsurfRulesToggles || {}, diff --git a/src/extension.ts b/src/extension.ts index 57799d94..023f7759 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -14,6 +14,7 @@ import { Controller } from "./core/controller" import { ErrorService } from "./services/error/ErrorService" import { initializeTestMode, cleanupTestMode } from "./services/test/TestMode" import { telemetryService } from "./services/posthog/telemetry/TelemetryService" +import { v4 as uuidv4 } from "uuid" /* Built using https://github.com/microsoft/vscode-webview-ui-toolkit @@ -75,6 +76,16 @@ export async function activate(context: vscode.ExtensionContext) { console.error(`Error during post-update actions: ${errorMessage}, Stack trace: ${error.stack}`) } + // backup id in case vscMachineID doesn't work + let installId = context.globalState.get("installId") + + if (!installId) { + installId = uuidv4() + await context.globalState.update("installId", installId) + } + + telemetryService.captureExtensionActivated(installId) + context.subscriptions.push( vscode.commands.registerCommand("cline.plusButtonClicked", async (webview: any) => { const openChat = async (instance?: WebviewProvider) => { diff --git a/src/services/posthog/PostHogClientProvider.ts b/src/services/posthog/PostHogClientProvider.ts index 81977946..dab585aa 100644 --- a/src/services/posthog/PostHogClientProvider.ts +++ b/src/services/posthog/PostHogClientProvider.ts @@ -9,7 +9,6 @@ class PostHogClientProvider { this.client = new PostHog(posthogConfig.apiKey, { host: posthogConfig.host, enableExceptionAutocapture: false, - defaultOptIn: false, }) } diff --git a/src/services/posthog/telemetry/TelemetryService.ts b/src/services/posthog/telemetry/TelemetryService.ts index 6a064051..a2ed2e08 100644 --- a/src/services/posthog/telemetry/TelemetryService.ts +++ b/src/services/posthog/telemetry/TelemetryService.ts @@ -7,7 +7,7 @@ import type { BrowserSettings } from "@shared/BrowserSettings" import { posthogClientProvider } from "../PostHogClientProvider" /** - * PostHogClient handles telemetry event tracking for the Cline extension + * TelemetryService handles telemetry event tracking for the Cline extension * Uses PostHog analytics to track user interactions and system events * Respects user privacy settings and VSCode's global telemetry configuration */ @@ -29,7 +29,7 @@ interface Collection { */ type TelemetryCategory = "checkpoints" | "browser" -class PostHogClient { +class TelemetryService { // Map to control specific telemetry categories (event types) private telemetryCategoryEnabled: Map = new Map([ ["checkpoints", false], // Checkpoints telemetry disabled @@ -41,6 +41,11 @@ class PostHogClient { // Event constants for tracking user interactions and system events private static readonly EVENTS = { // Task-related events for tracking conversation and execution flow + + USER: { + OPT_OUT: "user.opt_out", + EXTENSION_ACTIVATED: "user.extension_activated", + }, TASK: { // Tracks when a new task/conversation is started CREATED: "task.created", @@ -83,37 +88,19 @@ class PostHogClient { }, // UI interaction events for tracking user engagement UI: { - // Tracks when user switches between API providers - PROVIDER_SWITCH: "ui.provider_switch", - // Tracks when images are attached to a conversation - IMAGE_ATTACHED: "ui.image_attached", - // Tracks general button click interactions - BUTTON_CLICK: "ui.button_click", - // Tracks when the marketplace view is opened - MARKETPLACE_OPENED: "ui.marketplace_opened", - // Tracks when settings panel is opened - SETTINGS_OPENED: "ui.settings_opened", - // Tracks when task history view is opened - HISTORY_OPENED: "ui.history_opened", - // Tracks when a task is removed from history - TASK_POPPED: "ui.task_popped", // Tracks when a different model is selected MODEL_SELECTED: "ui.model_selected", - // Tracks when planning mode is toggled on - PLAN_MODE_TOGGLED: "ui.plan_mode_toggled", - // Tracks when action mode is toggled on - ACT_MODE_TOGGLED: "ui.act_mode_toggled", // Tracks when users use the "favorite" button in the model picker MODEL_FAVORITE_TOGGLED: "ui.model_favorite_toggled", }, } - /** Singleton instance of the PostHogClient */ - private static instance: PostHogClient + /** Singleton instance of the TelemetryService */ + private static instance: TelemetryService /** PostHog client instance for sending analytics events */ private client: PostHog /** Unique identifier for the current VSCode instance */ - private distinctId: string = vscode.env.machineId + public distinctId: string = vscode.env.machineId /** Whether telemetry is currently enabled based on user and VSCode settings */ private telemetryEnabled: boolean = false /** Current version of the extension */ @@ -129,14 +116,18 @@ class PostHogClient { this.client = posthogClientProvider.getClient() } + private setDistinctId(installId: string) { + if (this.distinctId === "someValue.machineId") { + this.distinctId = installId + } + } + /** * Updates the telemetry state based on user preferences and VSCode settings * Only enables telemetry if both VSCode global telemetry is enabled and user has opted in * @param didUserOptIn Whether the user has explicitly opted into telemetry */ - public updateTelemetryState(didUserOptIn: boolean): void { - this.telemetryEnabled = false - + public async updateTelemetryState(didUserOptIn: boolean): Promise { // First check global telemetry level - telemetry should only be enabled when level is "all" const telemetryLevel = vscode.workspace.getConfiguration("telemetry").get("telemetryLevel", "all") const globalTelemetryEnabled = telemetryLevel === "all" @@ -144,25 +135,53 @@ class PostHogClient { // We only enable telemetry if global vscode telemetry is enabled if (globalTelemetryEnabled) { this.telemetryEnabled = didUserOptIn + } else { + // Show warning to user that global telemetry is disabled + void vscode.window + .showWarningMessage( + "VSCode telemetry is disabled. To enable telemetry for this extension, first enable VSCode telemetry in settings.", + "Open Settings", + ) + .then((selection) => { + if (selection === "Open Settings") { + void vscode.commands.executeCommand("workbench.action.openSettings", "telemetry.telemetryLevel") + } + }) } // Update PostHog client state based on telemetry preference if (this.telemetryEnabled) { this.client.optIn() + this.client.identify({ distinctId: this.distinctId }) } else { + this.client.capture({ + distinctId: this.distinctId, + event: TelemetryService.EVENTS.USER.OPT_OUT, + properties: this.addProperties({}), + }) + + await new Promise((resolve) => setTimeout(resolve, 1000)) // Delay 1 second before opting out this.client.optOut() } } /** - * Gets or creates the singleton instance of PostHogClient - * @returns The PostHogClient instance + * Gets or creates the singleton instance of TelemetryService + * @returns The TelemetryService instance */ - public static getInstance(): PostHogClient { - if (!PostHogClient.instance) { - PostHogClient.instance = new PostHogClient() + public static getInstance(): TelemetryService { + if (!TelemetryService.instance) { + TelemetryService.instance = new TelemetryService() + } + return TelemetryService.instance + } + + private addProperties(properties: any): any { + return { + ...properties, + extension_version: this.version, + is_dev: this.isDev, } - return PostHogClient.instance } /** @@ -171,13 +190,14 @@ class PostHogClient { * @param collect If true, store the event in collectedEvents instead of sending to PostHog */ public capture(event: { event: string; properties?: any }, collect: boolean = false): void { - const taskId = event.properties.taskId - const propertiesWithVersion = { - ...event.properties, - extension_version: this.version, - is_dev: this.isDev, + if (!this.telemetryEnabled) { + return } - if (collect) { + const taskId = event.properties.taskId + + const propertiesWithVersion = this.addProperties(event.properties) + + if (collect && taskId) { const existingTask = this.collectedTasks.find((task) => task.taskId === taskId) if (existingTask) { existingTask.collection.push({ @@ -195,11 +215,20 @@ class PostHogClient { ], }) } - } else if (this.telemetryEnabled) { + } else { this.client.capture({ distinctId: this.distinctId, event: event.event, properties: propertiesWithVersion }) } } + public captureExtensionActivated(installId: string) { + this.setDistinctId(installId) + + if (this.telemetryEnabled) { + this.client.identify({ distinctId: this.distinctId }) + this.client.capture({ distinctId: this.distinctId, event: TelemetryService.EVENTS.USER.EXTENSION_ACTIVATED }) + } + } + // Task events /** * Records when a new task/conversation is started @@ -210,7 +239,7 @@ class PostHogClient { public captureTaskCreated(taskId: string, apiProvider?: string, collect: boolean = false) { this.capture( { - event: PostHogClient.EVENTS.TASK.CREATED, + event: TelemetryService.EVENTS.TASK.CREATED, properties: { taskId, apiProvider }, }, collect, @@ -226,7 +255,7 @@ class PostHogClient { public captureTaskRestarted(taskId: string, apiProvider?: string, collect: boolean = false) { this.capture( { - event: PostHogClient.EVENTS.TASK.RESTARTED, + event: TelemetryService.EVENTS.TASK.RESTARTED, properties: { taskId, apiProvider }, }, collect, @@ -241,7 +270,7 @@ class PostHogClient { public captureTaskCompleted(taskId: string, collect: boolean = false) { this.capture( { - event: PostHogClient.EVENTS.TASK.COMPLETED, + event: TelemetryService.EVENTS.TASK.COMPLETED, properties: { taskId }, }, collect, @@ -278,7 +307,7 @@ class PostHogClient { this.capture( { - event: PostHogClient.EVENTS.TASK.CONVERSATION_TURN, + event: TelemetryService.EVENTS.TASK.CONVERSATION_TURN, properties, }, collect, @@ -295,7 +324,7 @@ class PostHogClient { public captureTokenUsage(taskId: string, tokensIn: number, tokensOut: number, model: string, collect: boolean = false) { this.capture( { - event: PostHogClient.EVENTS.TASK.TOKEN_USAGE, + event: TelemetryService.EVENTS.TASK.TOKEN_USAGE, properties: { taskId, tokensIn, @@ -315,7 +344,7 @@ class PostHogClient { public captureModeSwitch(taskId: string, mode: "plan" | "act", collect: boolean = false) { this.capture( { - event: PostHogClient.EVENTS.TASK.MODE_SWITCH, + event: TelemetryService.EVENTS.TASK.MODE_SWITCH, properties: { taskId, mode, @@ -334,7 +363,7 @@ class PostHogClient { console.info("TelemetryService: Capturing task feedback", { taskId, feedbackType }) this.capture( { - event: PostHogClient.EVENTS.TASK.FEEDBACK, + event: TelemetryService.EVENTS.TASK.FEEDBACK, properties: { taskId, feedbackType, @@ -355,7 +384,7 @@ class PostHogClient { public captureToolUsage(taskId: string, tool: string, autoApproved: boolean, success: boolean, collect: boolean = false) { this.capture( { - event: PostHogClient.EVENTS.TASK.TOOL_USED, + event: TelemetryService.EVENTS.TASK.TOOL_USED, properties: { taskId, tool, @@ -385,7 +414,7 @@ class PostHogClient { this.capture( { - event: PostHogClient.EVENTS.TASK.CHECKPOINT_USED, + event: TelemetryService.EVENTS.TASK.CHECKPOINT_USED, properties: { taskId, action, @@ -396,135 +425,6 @@ class PostHogClient { ) } - // UI events - /** - * Records when the user switches between different API providers - * @param from Previous provider name - * @param to New provider name - * @param location Where the switch occurred (settings panel or bottom bar) - * @param taskId Optional task identifier if switch occurred during a task - */ - public captureProviderSwitch( - from: string, - to: string, - location: "settings" | "bottom", - taskId?: string, - collect: boolean = false, - ) { - this.capture( - { - event: PostHogClient.EVENTS.UI.PROVIDER_SWITCH, - properties: { - from, - to, - location, - taskId, - }, - }, - collect, - ) - } - - /** - * Records when images are attached to a conversation - * @param taskId Unique identifier for the task - * @param imageCount Number of images attached - */ - public captureImageAttached(taskId: string, imageCount: number, collect: boolean = false) { - this.capture( - { - event: PostHogClient.EVENTS.UI.IMAGE_ATTACHED, - properties: { - taskId, - imageCount, - }, - }, - collect, - ) - } - - /** - * Records general button click interactions in the UI - * @param button Identifier for the button that was clicked - * @param taskId Optional task identifier if click occurred during a task - */ - public captureButtonClick(button: string, taskId?: string, collect: boolean = false) { - this.capture( - { - event: PostHogClient.EVENTS.UI.BUTTON_CLICK, - properties: { - button, - taskId, - }, - }, - collect, - ) - } - - /** - * Records when the marketplace view is opened - * @param taskId Optional task identifier if marketplace was opened during a task - */ - public captureMarketplaceOpened(taskId?: string, collect: boolean = false) { - this.capture( - { - event: PostHogClient.EVENTS.UI.MARKETPLACE_OPENED, - properties: { - taskId, - }, - }, - collect, - ) - } - - /** - * Records when the settings panel is opened - * @param taskId Optional task identifier if settings were opened during a task - */ - public captureSettingsOpened(taskId?: string, collect: boolean = false) { - this.capture( - { - event: PostHogClient.EVENTS.UI.SETTINGS_OPENED, - properties: { - taskId, - }, - }, - collect, - ) - } - - /** - * Records when the task history view is opened - * @param taskId Optional task identifier if history was opened during a task - */ - public captureHistoryOpened(taskId?: string, collect: boolean = false) { - this.capture( - { - event: PostHogClient.EVENTS.UI.HISTORY_OPENED, - properties: { - taskId, - }, - }, - collect, - ) - } - - /** - * Records when a task is removed from the task history - * @param taskId Unique identifier for the task being removed - */ - public captureTaskPopped(taskId: string, collect: boolean = false) { - this.capture( - { - event: PostHogClient.EVENTS.UI.TASK_POPPED, - properties: { - taskId, - }, - }, - collect, - ) - } - /** * Records when a diff edit (replace_in_file) operation fails * @param taskId Unique identifier for the task @@ -533,7 +433,7 @@ class PostHogClient { public captureDiffEditFailure(taskId: string, modelId: string, errorType?: string, collect: boolean = false) { this.capture( { - event: PostHogClient.EVENTS.TASK.DIFF_EDIT_FAILED, + event: TelemetryService.EVENTS.TASK.DIFF_EDIT_FAILED, properties: { taskId, errorType, @@ -553,7 +453,7 @@ class PostHogClient { public captureModelSelected(model: string, provider: string, taskId?: string, collect: boolean = false) { this.capture( { - event: PostHogClient.EVENTS.UI.MODEL_SELECTED, + event: TelemetryService.EVENTS.UI.MODEL_SELECTED, properties: { model, provider, @@ -571,7 +471,7 @@ class PostHogClient { public captureHistoricalTaskLoaded(taskId: string, collect: boolean = false) { this.capture( { - event: PostHogClient.EVENTS.TASK.HISTORICAL_LOADED, + event: TelemetryService.EVENTS.TASK.HISTORICAL_LOADED, properties: { taskId, }, @@ -587,7 +487,7 @@ class PostHogClient { public captureRetryClicked(taskId: string, collect: boolean = false) { this.capture( { - event: PostHogClient.EVENTS.TASK.RETRY_CLICKED, + event: TelemetryService.EVENTS.TASK.RETRY_CLICKED, properties: { taskId, }, @@ -608,7 +508,7 @@ class PostHogClient { this.capture( { - event: PostHogClient.EVENTS.TASK.BROWSER_TOOL_START, + event: TelemetryService.EVENTS.TASK.BROWSER_TOOL_START, properties: { taskId, viewport: browserSettings.viewport, @@ -641,7 +541,7 @@ class PostHogClient { this.capture( { - event: PostHogClient.EVENTS.TASK.BROWSER_TOOL_END, + event: TelemetryService.EVENTS.TASK.BROWSER_TOOL_END, properties: { taskId, actionCount: stats.actionCount, @@ -679,7 +579,7 @@ class PostHogClient { this.capture( { - event: PostHogClient.EVENTS.TASK.BROWSER_ERROR, + event: TelemetryService.EVENTS.TASK.BROWSER_ERROR, properties: { taskId, errorType, @@ -701,7 +601,7 @@ class PostHogClient { public captureOptionSelected(taskId: string, qty: number, mode: "plan" | "act", collect: boolean = false) { this.capture( { - event: PostHogClient.EVENTS.TASK.OPTION_SELECTED, + event: TelemetryService.EVENTS.TASK.OPTION_SELECTED, properties: { taskId, qty, @@ -721,7 +621,7 @@ class PostHogClient { public captureOptionsIgnored(taskId: string, qty: number, mode: "plan" | "act", collect: boolean = false) { this.capture( { - event: PostHogClient.EVENTS.TASK.OPTIONS_IGNORED, + event: TelemetryService.EVENTS.TASK.OPTIONS_IGNORED, properties: { taskId, qty, @@ -758,7 +658,7 @@ class PostHogClient { ) { this.capture( { - event: PostHogClient.EVENTS.TASK.GEMINI_API_PERFORMANCE, + event: TelemetryService.EVENTS.TASK.GEMINI_API_PERFORMANCE, properties: { taskId, modelId, @@ -777,7 +677,7 @@ class PostHogClient { public captureModelFavoritesUsage(model: string, isFavorited: boolean, collect: boolean = false) { this.capture( { - event: PostHogClient.EVENTS.UI.MODEL_FAVORITE_TOGGLED, + event: TelemetryService.EVENTS.UI.MODEL_FAVORITE_TOGGLED, properties: { model, isFavorited, @@ -806,13 +706,17 @@ class PostHogClient { } public async sendCollectedEvents(taskId?: string): Promise { + if (!this.telemetryEnabled) { + return + } + if (this.collectedTasks.length > 0) { if (taskId) { const task = this.collectedTasks.find((t) => t.taskId === taskId) if (task) { this.capture( { - event: PostHogClient.EVENTS.TASK.TASK_COLLECTION, + event: TelemetryService.EVENTS.TASK.TASK_COLLECTION, properties: { taskId, events: task.collection }, }, false, @@ -823,7 +727,7 @@ class PostHogClient { for (const task of this.collectedTasks) { this.capture( { - event: PostHogClient.EVENTS.TASK.TASK_COLLECTION, + event: TelemetryService.EVENTS.TASK.TASK_COLLECTION, properties: { taskId: task.taskId, events: task.collection }, }, false, @@ -839,4 +743,4 @@ class PostHogClient { } } -export const telemetryService = PostHogClient.getInstance() +export const telemetryService = TelemetryService.getInstance() diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index 48a4b631..70b8b776 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -137,7 +137,7 @@ export interface ExtensionState { photoURL: string | null } version: string - vscMachineId: string + distinctId: string globalClineRulesToggles: ClineRulesToggles localClineRulesToggles: ClineRulesToggles localWorkflowToggles: ClineRulesToggles diff --git a/webview-ui/src/CustomPostHogProvider.tsx b/webview-ui/src/CustomPostHogProvider.tsx index 1642eb6a..12c10132 100644 --- a/webview-ui/src/CustomPostHogProvider.tsx +++ b/webview-ui/src/CustomPostHogProvider.tsx @@ -5,32 +5,44 @@ import { posthogConfig } from "@shared/services/config/posthog-config" import { useExtensionState } from "./context/ExtensionStateContext" export function CustomPostHogProvider({ children }: { children: ReactNode }) { - const { telemetrySetting, vscMachineId } = useExtensionState() + const { telemetrySetting, distinctId, version } = useExtensionState() const isTelemetryEnabled = telemetrySetting !== "disabled" useEffect(() => { - if (vscMachineId.length === 0) { - return - } - posthog.init(posthogConfig.apiKey, { api_host: posthogConfig.host, ui_host: posthogConfig.uiHost, - opt_out_capturing_by_default: true, disable_session_recording: true, capture_pageview: false, capture_dead_clicks: true, - bootstrap: { - distinctID: vscMachineId, + }) + }, []) + + useEffect(() => { + if (distinctId.length === 0 || version.length === 0) { + return + } + + posthog.set_config({ + before_send: (payload: any) => { + if (payload?.properties) { + payload.properties.extension_version = version + payload.properties.distinct_id = distinctId + } + return payload }, }) - if (isTelemetryEnabled) { + const optedIn = posthog.has_opted_in_capturing() + const optedOut = posthog.has_opted_out_capturing() + + if (isTelemetryEnabled && !optedIn) { posthog.opt_in_capturing() - } else { + posthog.identify(distinctId) + } else if (!isTelemetryEnabled && !optedOut) { posthog.opt_out_capturing() } - }, [isTelemetryEnabled, vscMachineId]) + }, [isTelemetryEnabled, distinctId, version]) return {children} } diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index fe33eeb6..0f3848ff 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -607,7 +607,7 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => {
{ const checked = e.target.checked === true setTelemetrySetting(checked ? "enabled" : "disabled") diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index 6433c99b..060d79d9 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -156,7 +156,7 @@ export const ExtensionStateContextProvider: React.FC<{ chatSettings: DEFAULT_CHAT_SETTINGS, platform: DEFAULT_PLATFORM, telemetrySetting: "unset", - vscMachineId: "", + distinctId: "", planActSeparateModelsSetting: true, enableCheckpointsSetting: true, globalClineRulesToggles: {}, From a346f05e9ca6201e68286fb5f1f9553243729deb Mon Sep 17 00:00:00 2001 From: canvrno <46584286+canvrno@users.noreply.github.com> Date: Mon, 26 May 2025 14:18:53 -0700 Subject: [PATCH 81/85] [PROTOBUS] Move requestTotalTasksSize to protobus (#3608) * requestTotalTasksSize protobus migration * Fix EmpyRequest value error * removed hook * Removed task size refresh actions from backend --- .changeset/seven-toys-impress.md | 5 ++ proto/task.proto | 2 + src/core/controller/index.ts | 22 +-------- src/core/controller/task/getTotalTasksSize.ts | 14 ++++++ src/shared/ExtensionMessage.ts | 2 - src/shared/WebviewMessage.ts | 1 - .../src/components/history/HistoryView.tsx | 48 ++++++++++++++----- .../src/context/ExtensionStateContext.tsx | 6 +-- 8 files changed, 60 insertions(+), 40 deletions(-) create mode 100644 .changeset/seven-toys-impress.md create mode 100644 src/core/controller/task/getTotalTasksSize.ts diff --git a/.changeset/seven-toys-impress.md b/.changeset/seven-toys-impress.md new file mode 100644 index 00000000..98d340dd --- /dev/null +++ b/.changeset/seven-toys-impress.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +requestTotalTasksSize protobus migration diff --git a/proto/task.proto b/proto/task.proto index 343e3ace..1a11d5cd 100644 --- a/proto/task.proto +++ b/proto/task.proto @@ -11,6 +11,8 @@ service TaskService { rpc cancelTask(EmptyRequest) returns (Empty); // Clears the current task rpc clearTask(EmptyRequest) returns (Empty); + // Gets the total size of all tasks + rpc getTotalTasksSize(EmptyRequest) returns (Int64); // Deletes multiple tasks with the given IDs rpc deleteTasksWithIds(StringArrayRequest) returns (Empty); // Creates a new task with the given text and optional images diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 9d67b73b..d195cdcb 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -357,11 +357,6 @@ export class Controller { } break } - case "requestTotalTasksSize": { - this.refreshTotalTasksSize() - break - } - case "fetchLatestMcpServersFromHub": { this.mcpHub?.sendLatestMcpServers() break @@ -437,11 +432,9 @@ export class Controller { if (answer === "Delete All Except Favorites") { await this.deleteNonFavoriteTaskHistory() await this.postStateToWebview() - this.refreshTotalTasksSize() } else if (answer === "Delete Everything") { await this.deleteAllTaskHistory() await this.postStateToWebview() - this.refreshTotalTasksSize() } this.postMessageToWebview({ type: "relinquishControl" }) break @@ -1126,19 +1119,6 @@ export class Controller { await this.postStateToWebview() } - async refreshTotalTasksSize() { - getTotalTasksSize(this.context.globalStorageUri.fsPath) - .then((newTotalSize) => { - this.postMessageToWebview({ - type: "totalTasksSize", - totalTasksSize: newTotalSize, - }) - }) - .catch((error) => { - console.error("Error calculating total tasks size:", error) - }) - } - async deleteTaskWithId(id: string) { console.info("deleteTaskWithId: ", id) @@ -1181,7 +1161,7 @@ export class Controller { console.debug(`Error deleting task:`, error) } - this.refreshTotalTasksSize() + await this.postStateToWebview() } async deleteTaskFromState(id: string) { diff --git a/src/core/controller/task/getTotalTasksSize.ts b/src/core/controller/task/getTotalTasksSize.ts new file mode 100644 index 00000000..06de3be7 --- /dev/null +++ b/src/core/controller/task/getTotalTasksSize.ts @@ -0,0 +1,14 @@ +import { Controller } from ".." +import { EmptyRequest, Int64 } from "../../../shared/proto/common" +import { getTotalTasksSize as calculateTotalTasksSize } from "../../../utils/storage" + +/** + * Gets the total size of all tasks including task data and checkpoints + * @param controller The controller instance + * @param _request The empty request + * @returns The total size as an Int64 value + */ +export async function getTotalTasksSize(controller: Controller, _request: EmptyRequest): Promise { + const totalSize = await calculateTotalTasksSize(controller.context.globalStorageUri.fsPath) + return Int64.create({ value: totalSize || 0 }) +} diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index 70b8b776..16289c14 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -37,7 +37,6 @@ export interface ExtensionMessage { | "userCreditsBalance" | "userCreditsUsage" | "userCreditsPayments" - | "totalTasksSize" | "addToInput" | "browserConnectionResult" | "fileSearchResults" @@ -82,7 +81,6 @@ export interface ExtensionMessage { userCreditsBalance?: BalanceResponse userCreditsUsage?: UsageTransaction[] userCreditsPayments?: PaymentTransaction[] - totalTasksSize?: number | null success?: boolean endpoint?: string isBundled?: boolean diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 4ea2a4dc..39fac97c 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -26,7 +26,6 @@ export interface WebviewMessage { | "clearAllTaskHistory" | "fetchUserCreditsData" | "optionsResponse" - | "requestTotalTasksSize" | "searchFiles" | "grpc_request" | "grpc_request_cancel" diff --git a/webview-ui/src/components/history/HistoryView.tsx b/webview-ui/src/components/history/HistoryView.tsx index 89bac0c8..439ebb6c 100644 --- a/webview-ui/src/components/history/HistoryView.tsx +++ b/webview-ui/src/components/history/HistoryView.tsx @@ -47,7 +47,8 @@ const CustomFilterRadio = ({ checked, onChange, icon, label }: CustomFilterRadio } const HistoryView = ({ onDone }: HistoryViewProps) => { - const { taskHistory, totalTasksSize, filePaths } = useExtensionState() + const extensionStateContext = useExtensionState() + const { taskHistory, filePaths } = extensionStateContext const [searchQuery, setSearchQuery] = useState("") const [sortOption, setSortOption] = useState("newest") const [lastNonRelevantSort, setLastNonRelevantSort] = useState("newest") @@ -131,10 +132,23 @@ const HistoryView = ({ onDone }: HistoryViewProps) => { }, []) useEvent("message", handleMessage) + const { totalTasksSize, setTotalTasksSize } = extensionStateContext + + const fetchTotalTasksSize = useCallback(async () => { + try { + const response = await TaskServiceClient.getTotalTasksSize({}) + if (response && typeof response.value === "number") { + setTotalTasksSize?.(response.value || 0) + } + } catch (error) { + console.error("Error getting total tasks size:", error) + } + }, [setTotalTasksSize]) + // Request total tasks size when component mounts useEffect(() => { - vscode.postMessage({ type: "requestTotalTasksSize" }) - }, []) + fetchTotalTasksSize() + }, [fetchTotalTasksSize]) useEffect(() => { if (searchQuery && sortOption !== "mostRelevant" && !lastNonRelevantSort) { @@ -160,16 +174,26 @@ const HistoryView = ({ onDone }: HistoryViewProps) => { }) }, []) - const handleDeleteHistoryItem = useCallback((id: string) => { - TaskServiceClient.deleteTasksWithIds({ value: [id] }) - }, []) + const handleDeleteHistoryItem = useCallback( + (id: string) => { + TaskServiceClient.deleteTasksWithIds({ value: [id] }) + .then(() => fetchTotalTasksSize()) + .catch((error) => console.error("Error deleting task:", error)) + }, + [fetchTotalTasksSize], + ) - const handleDeleteSelectedHistoryItems = useCallback((ids: string[]) => { - if (ids.length > 0) { - TaskServiceClient.deleteTasksWithIds({ value: ids }) - setSelectedItems([]) - } - }, []) + const handleDeleteSelectedHistoryItems = useCallback( + (ids: string[]) => { + if (ids.length > 0) { + TaskServiceClient.deleteTasksWithIds({ value: ids }) + .then(() => fetchTotalTasksSize()) + .catch((error) => console.error("Error deleting tasks:", error)) + setSelectedItems([]) + } + }, + [fetchTotalTasksSize], + ) const formatDate = useCallback((timestamp: number) => { const date = new Date(timestamp) diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index 060d79d9..c10f6976 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -59,6 +59,7 @@ interface ExtensionStateContextType extends ExtensionState { setLocalWorkflowToggles: (toggles: Record) => void setGlobalWorkflowToggles: (toggles: Record) => void setMcpMarketplaceCatalog: (value: McpMarketplaceCatalog) => void + setTotalTasksSize: (value: number | null) => void // Navigation state setters setShowMcp: (value: boolean) => void @@ -316,10 +317,6 @@ export const ExtensionStateContextProvider: React.FC<{ } break } - case "totalTasksSize": { - setTotalTasksSize(message.totalTasksSize ?? null) - break - } } }, []) @@ -558,6 +555,7 @@ export const ExtensionStateContextProvider: React.FC<{ globalWorkflowToggles: toggles, })), setMcpTab, + setTotalTasksSize, } return {children} From 7bfc00b80e3b1d47f3c7a7052d08fa570bbb19d6 Mon Sep 17 00:00:00 2001 From: Trevor Hudson Date: Mon, 26 May 2025 15:36:02 -0700 Subject: [PATCH 82/85] add missing fuction (#3834) --- .changeset/dull-chefs-yawn.md | 5 +++++ .../posthog/telemetry/TelemetryService.ts | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 .changeset/dull-chefs-yawn.md diff --git a/.changeset/dull-chefs-yawn.md b/.changeset/dull-chefs-yawn.md new file mode 100644 index 00000000..3edfbb40 --- /dev/null +++ b/.changeset/dull-chefs-yawn.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +add back missing function diff --git a/src/services/posthog/telemetry/TelemetryService.ts b/src/services/posthog/telemetry/TelemetryService.ts index a2ed2e08..38cf739f 100644 --- a/src/services/posthog/telemetry/TelemetryService.ts +++ b/src/services/posthog/telemetry/TelemetryService.ts @@ -92,6 +92,8 @@ class TelemetryService { MODEL_SELECTED: "ui.model_selected", // Tracks when users use the "favorite" button in the model picker MODEL_FAVORITE_TOGGLED: "ui.model_favorite_toggled", + // Tracks when a button is clicked + BUTTON_CLICKED: "ui.button_clicked", }, } @@ -687,6 +689,19 @@ class TelemetryService { ) } + public captureButtonClick(button: string, taskId?: string, collect: boolean = false) { + this.capture( + { + event: TelemetryService.EVENTS.UI.BUTTON_CLICKED, + properties: { + button, + taskId, + }, + }, + collect, + ) + } + /** * Checks if telemetry is enabled * @returns Boolean indicating whether telemetry is enabled From 9d801a1a681bf643a6125d79e71a1a7b262db92a Mon Sep 17 00:00:00 2001 From: Luis Felipe Salazar Ucros <40307832+luisfucros@users.noreply.github.com> Date: Mon, 26 May 2025 17:50:59 -0500 Subject: [PATCH 83/85] Sambanova models update list and docs link (#3419) * update models list * update docs link with utm * remove tracking link --- .changeset/weak-eggs-give.md | 5 ++ src/shared/api.ts | 88 ++++++++++++++++++------------------ 2 files changed, 49 insertions(+), 44 deletions(-) create mode 100644 .changeset/weak-eggs-give.md diff --git a/.changeset/weak-eggs-give.md b/.changeset/weak-eggs-give.md new file mode 100644 index 00000000..bb562e99 --- /dev/null +++ b/.changeset/weak-eggs-give.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Update sambanova provider model list and add new docs link diff --git a/src/shared/api.ts b/src/shared/api.ts index 5ef15c10..1f58c2ac 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -1830,85 +1830,85 @@ export const xaiModels = { export type SambanovaModelId = keyof typeof sambanovaModels export const sambanovaDefaultModelId: SambanovaModelId = "Meta-Llama-3.3-70B-Instruct" export const sambanovaModels = { + "Llama-4-Maverick-17B-128E-Instruct": { + maxTokens: 4096, + contextWindow: 8_000, + supportsImages: true, + supportsPromptCache: false, + inputPrice: 0.63, + outputPrice: 1.8, + }, + "Llama-4-Scout-17B-16E-Instruct": { + maxTokens: 4096, + contextWindow: 8_000, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0.4, + outputPrice: 0.7, + }, "Meta-Llama-3.3-70B-Instruct": { maxTokens: 4096, contextWindow: 128_000, supportsImages: false, supportsPromptCache: false, - inputPrice: 0, - outputPrice: 0, + inputPrice: 0.6, + outputPrice: 1.2, }, "DeepSeek-R1-Distill-Llama-70B": { maxTokens: 4096, - contextWindow: 32_000, + contextWindow: 128_000, supportsImages: false, supportsPromptCache: false, - inputPrice: 0, - outputPrice: 0, + inputPrice: 0.7, + outputPrice: 1.4, }, - "Llama-3.1-Swallow-70B-Instruct-v0.3": { + "DeepSeek-R1": { maxTokens: 4096, contextWindow: 16_000, supportsImages: false, supportsPromptCache: false, - inputPrice: 0, - outputPrice: 0, - }, - "Llama-3.1-Swallow-8B-Instruct-v0.3": { - maxTokens: 4096, - contextWindow: 16_000, - supportsImages: false, - supportsPromptCache: false, - inputPrice: 0, - outputPrice: 0, + inputPrice: 5.0, + outputPrice: 7.0, }, "Meta-Llama-3.1-405B-Instruct": { maxTokens: 4096, contextWindow: 16_000, supportsImages: false, supportsPromptCache: false, - inputPrice: 0, - outputPrice: 0, + inputPrice: 5.0, + outputPrice: 10.0, }, "Meta-Llama-3.1-8B-Instruct": { maxTokens: 4096, contextWindow: 16_000, supportsImages: false, supportsPromptCache: false, - inputPrice: 0, - outputPrice: 0, + inputPrice: 0.1, + outputPrice: 0.2, }, "Meta-Llama-3.2-1B-Instruct": { maxTokens: 4096, contextWindow: 16_000, supportsImages: false, supportsPromptCache: false, - inputPrice: 0, - outputPrice: 0, + inputPrice: 0.04, + outputPrice: 0.08, }, - "Qwen2.5-72B-Instruct": { + "Meta-Llama-3.2-3B-Instruct": { + maxTokens: 4096, + contextWindow: 8_000, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0.08, + outputPrice: 0.16, + }, + "Qwen3-32B": { maxTokens: 4096, contextWindow: 16_000, supportsImages: false, supportsPromptCache: false, - inputPrice: 0, - outputPrice: 0, - }, - "Qwen2.5-Coder-32B-Instruct": { - maxTokens: 4096, - contextWindow: 16_000, - supportsImages: false, - supportsPromptCache: false, - inputPrice: 0, - outputPrice: 0, - }, - "QwQ-32B-Preview": { - maxTokens: 4096, - contextWindow: 16_000, - supportsImages: false, - supportsPromptCache: false, - inputPrice: 0, - outputPrice: 0, + inputPrice: 0.4, + outputPrice: 0.8, }, "QwQ-32B": { maxTokens: 4096, @@ -1920,11 +1920,11 @@ export const sambanovaModels = { }, "DeepSeek-V3-0324": { maxTokens: 4096, - contextWindow: 8192, + contextWindow: 8_000, supportsImages: false, supportsPromptCache: false, - inputPrice: 1.0, - outputPrice: 1.5, + inputPrice: 3.0, + outputPrice: 4.5, }, } as const satisfies Record From 2ca3e9ac8228ec9e7c92fed1a6c5928cdf17fb8f Mon Sep 17 00:00:00 2001 From: Andrei Eternal Date: Mon, 26 May 2025 18:17:09 -0700 Subject: [PATCH 84/85] [PROTOBUS] Re-enable streaming state, fix the memory leak probably (#3754) * Revert "fix: Address memory leak by bypassing subscribeToState gRPC stream for state updates (#3597)" This reverts commit 8ab35a5b061382c49d41fbaf40336fa710fd6359. * memory leak console boys * cleanup --------- Co-authored-by: Andrei Edell Co-authored-by: Andrei Eternal --- src/core/controller/index.ts | 5 +- .../src/context/ExtensionStateContext.tsx | 113 ++++-------------- webview-ui/src/services/grpc-client-base.ts | 2 - 3 files changed, 24 insertions(+), 96 deletions(-) diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index d195cdcb..d27c5556 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -1178,10 +1178,7 @@ export class Controller { async postStateToWebview() { const state = await this.getStateToPostToWebview() - // For testing: Bypass gRPC stream and send state directly - console.log("[Controller Test Revert] Posting full state via direct 'state' message.") - await this.postMessageToWebview({ type: "state", state: state }) - // await sendStateUpdate(state) // Original line for the GrPC stream + await sendStateUpdate(state) } async getStateToPostToWebview(): Promise { diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index c10f6976..0bd3b3b6 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -207,60 +207,6 @@ export const ExtensionStateContextProvider: React.FC<{ } break } - case "state": { - // Handler for direct state messages - if (message.state) { - const stateData = message.state as ExtensionState - console.log("[Webview Context Test Revert] Received direct 'state' message, updating state.") - setState((prevState) => { - // Versioning logic for autoApprovalSettings (copied from original onResponse) - const incomingVersion = stateData.autoApprovalSettings?.version ?? 1 - const currentVersion = prevState.autoApprovalSettings?.version ?? 1 - const shouldUpdateAutoApproval = incomingVersion > currentVersion - - const newState = { - ...stateData, - autoApprovalSettings: shouldUpdateAutoApproval - ? stateData.autoApprovalSettings - : prevState.autoApprovalSettings, - } - - // Update welcome screen state based on API configuration (copied from original onResponse) - const config = stateData.apiConfiguration - const hasKey = config - ? [ - config.apiKey, - config.openRouterApiKey, - config.awsRegion, - config.vertexProjectId, - config.openAiApiKey, - config.ollamaModelId, - config.lmStudioModelId, - config.liteLlmApiKey, - config.geminiApiKey, - config.openAiNativeApiKey, - config.deepSeekApiKey, - config.requestyApiKey, - config.togetherApiKey, - config.qwenApiKey, - config.doubaoApiKey, - config.mistralApiKey, - config.vsCodeLmModelSelector, - config.clineApiKey, - config.asksageApiKey, - config.xaiApiKey, - config.sambanovaApiKey, - config.nebiusApiKey, - ].some((key) => key !== undefined) - : false - - setShowWelcome(!hasKey) - setDidHydrateState(true) - return newState - }) - } - break - } case "theme": { if (message.text) { setTheme(convertTextMateToHljs(JSON.parse(message.text))) @@ -326,33 +272,31 @@ export const ExtensionStateContextProvider: React.FC<{ const stateSubscriptionRef = useRef<(() => void) | null>(null) // Subscribe to state updates using the new gRPC streaming API - /* // TEST REVERT: Commenting out gRPC state subscription useEffect(() => { // Set up state subscription stateSubscriptionRef.current = StateServiceClient.subscribeToState( {}, { onResponse: (response) => { - console.log("[DEBUG] got state update via subscription", response); if (response.stateJson) { try { - const stateData = JSON.parse(response.stateJson) as ExtensionState; - console.log("[DEBUG] parsed state JSON, updating state"); + const stateData = JSON.parse(response.stateJson) as ExtensionState + console.log("[DEBUG] parsed state JSON, updating state") setState((prevState) => { // Versioning logic for autoApprovalSettings - const incomingVersion = stateData.autoApprovalSettings?.version ?? 1; - const currentVersion = prevState.autoApprovalSettings?.version ?? 1; - const shouldUpdateAutoApproval = incomingVersion > currentVersion; + const incomingVersion = stateData.autoApprovalSettings?.version ?? 1 + const currentVersion = prevState.autoApprovalSettings?.version ?? 1 + const shouldUpdateAutoApproval = incomingVersion > currentVersion const newState = { ...stateData, autoApprovalSettings: shouldUpdateAutoApproval ? stateData.autoApprovalSettings : prevState.autoApprovalSettings, - }; + } // Update welcome screen state based on API configuration - const config = stateData.apiConfiguration; + const config = stateData.apiConfiguration const hasKey = config ? [ config.apiKey, @@ -377,52 +321,41 @@ export const ExtensionStateContextProvider: React.FC<{ config.xaiApiKey, config.sambanovaApiKey, ].some((key) => key !== undefined) - : false; + : false - setShowWelcome(!hasKey); - setDidHydrateState(true); + setShowWelcome(!hasKey) + setDidHydrateState(true) - console.log("[DEBUG] returning new state in ESC"); + console.log("[DEBUG] returning new state in ESC") - return newState; - }); + return newState + }) } catch (error) { - console.error("Error parsing state JSON:", error); - console.log("[DEBUG] ERR getting state", error); + console.error("Error parsing state JSON:", error) + console.log("[DEBUG] ERR getting state", error) } } - console.log('[DEBUG] ended "got subscribed state"'); + console.log('[DEBUG] ended "got subscribed state"') }, onError: (error) => { - console.error("Error in state subscription:", error); + console.error("Error in state subscription:", error) }, onComplete: () => { - console.log("State subscription completed"); + console.log("State subscription completed") }, }, - ); + ) // Still send the webviewDidLaunch message for other initialization - vscode.postMessage({ type: "webviewDidLaunch" }); + vscode.postMessage({ type: "webviewDidLaunch" }) // Clean up subscription when component unmounts return () => { if (stateSubscriptionRef.current) { - stateSubscriptionRef.current(); - stateSubscriptionRef.current = null; + stateSubscriptionRef.current() + stateSubscriptionRef.current = null } - }; - }, []); - */ // END TEST REVERT - - // For the test revert, ensure webviewDidLaunch is still sent if not done by the above useEffect - useEffect(() => { - // This effect now only sends webviewDidLaunch if the gRPC subscription is commented out. - // If the gRPC subscription is active, it sends webviewDidLaunch. - // To avoid sending it twice if you uncomment the above, you might add a flag. - // For this specific test (gRPC sub commented out), this is fine. - console.log("[Webview Context Test Revert] Sending webviewDidLaunch from separate useEffect.") - vscode.postMessage({ type: "webviewDidLaunch" }) + } }, []) const contextValue: ExtensionStateContextType = { diff --git a/webview-ui/src/services/grpc-client-base.ts b/webview-ui/src/services/grpc-client-base.ts index 7261c90a..0b4aa657 100644 --- a/webview-ui/src/services/grpc-client-base.ts +++ b/webview-ui/src/services/grpc-client-base.ts @@ -94,7 +94,6 @@ export function createGrpcClient(service: T): GrpcClient if (message.grpc_response.message) { const responseType = method.responseType const response = responseType.fromJSON(message.grpc_response.message) - console.log("[DEBUG] Received streaming response:", message.grpc_response.message) options.onResponse(response) } } @@ -149,7 +148,6 @@ export function createGrpcClient(service: T): GrpcClient // Convert JSON back to protobuf message const responseType = method.responseType const response = responseType.fromJSON(message.grpc_response.message) - console.log("[DEBUG] grpc-client sending response:", response) resolve(response) } } From 6fa819a1706998dc236bf6bc0e1af0e447a4a6b1 Mon Sep 17 00:00:00 2001 From: Kevin Taylor Date: Mon, 26 May 2025 20:06:15 -0700 Subject: [PATCH 85/85] Added Cerebras as a Provider (#3810) * Added Cerebras as a Provider * prettier fix * prettier --------- Co-authored-by: sam --- .changeset/cerebras-provider.md | 15 ++ .clinerules/cline-overview.md | 1 + README.md | 2 +- package-lock.json | 53 +++++- package.json | 1 + src/api/index.ts | 3 + src/api/providers/cerebras.ts | 169 ++++++++++++++++++ src/core/storage/state-keys.ts | 1 + src/core/storage/state.ts | 6 + src/shared/api.ts | 54 ++++++ .../src/components/settings/ApiOptions.tsx | 37 ++++ 11 files changed, 339 insertions(+), 3 deletions(-) create mode 100644 .changeset/cerebras-provider.md create mode 100644 src/api/providers/cerebras.ts diff --git a/.changeset/cerebras-provider.md b/.changeset/cerebras-provider.md new file mode 100644 index 00000000..748d4316 --- /dev/null +++ b/.changeset/cerebras-provider.md @@ -0,0 +1,15 @@ +--- +"claude-dev": minor +--- + +Add Cerebras as a new API provider with comprehensive model support. Features include: + +- **5 Cerebras models**: llama3.1-8b, llama-4-scout-17b-16e-instruct, llama-3.3-70b, qwen-3-32b, and deepseek-r1-distill-llama-70b +- **Native Cerebras SDK integration** using @cerebras/cerebras_cloud_sdk +- **Reasoning support** for Qwen and DeepSeek R1 Distill models with `` tag handling +- **Streaming responses** with proper error handling and usage tracking +- **Cost calculation** and token counting +- **UI integration** with API key configuration and model selection +- **Free pricing** for all models (set to $0 input/output costs) + +Users can now connect to Cerebras's high-performance inference API using their API key and access fast, efficient LLM services directly from within Cline. \ No newline at end of file diff --git a/.clinerules/cline-overview.md b/.clinerules/cline-overview.md index c6186c5d..7d338531 100644 --- a/.clinerules/cline-overview.md +++ b/.clinerules/cline-overview.md @@ -164,6 +164,7 @@ Key providers include: - **OpenRouter**: Meta-provider supporting multiple model providers - **AWS Bedrock**: Integration with Amazon's AI services - **Gemini**: Google's AI models +- **Cerebras**: High-performance inference with Llama, Qwen, and DeepSeek models - **Ollama**: Local model hosting - **LM Studio**: Local model hosting - **VSCode LM**: VSCode's built-in language models diff --git a/README.md b/README.md index 9f21f00e..993ebcaa 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ Thanks to [Claude 3.7 Sonnet's agentic coding capabilities](https://www.anthrop ### Use any API and Model -Cline supports API providers like OpenRouter, Anthropic, OpenAI, Google Gemini, AWS Bedrock, Azure, and GCP Vertex. You can also configure any OpenAI compatible API, or use a local model through LM Studio/Ollama. If you're using OpenRouter, the extension fetches their latest model list, allowing you to use the newest models as soon as they're available. +Cline supports API providers like OpenRouter, Anthropic, OpenAI, Google Gemini, AWS Bedrock, Azure, GCP Vertex, and Cerebras. You can also configure any OpenAI compatible API, or use a local model through LM Studio/Ollama. If you're using OpenRouter, the extension fetches their latest model list, allowing you to use the newest models as soon as they're available. The extension also keeps track of total tokens and API usage cost for the entire task loop and individual requests, keeping you informed of spend every step of the way. diff --git a/package-lock.json b/package-lock.json index 2486685d..8b082be1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "claude-dev", - "version": "3.17.2", + "version": "3.17.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "claude-dev", - "version": "3.17.2", + "version": "3.17.5", "license": "Apache-2.0", "dependencies": { "@anthropic-ai/bedrock-sdk": "^0.12.4", @@ -14,6 +14,7 @@ "@anthropic-ai/vertex-sdk": "^0.6.4", "@aws-sdk/client-bedrock-runtime": "^3.758.0", "@bufbuild/protobuf": "^2.2.5", + "@cerebras/cerebras_cloud_sdk": "^1.35.0", "@google-cloud/vertexai": "^1.9.3", "@google/genai": "^0.13.0", "@grpc/grpc-js": "^1.9.15", @@ -4089,6 +4090,30 @@ "integrity": "sha512-/g5EzJifw5GF8aren8wZ/G5oMuPoGeS6MQD3ca8ddcvdXR5UELUfdTZITCGNhNXynY/AYl3Z4plmxdj/tRl/hQ==", "license": "(Apache-2.0 AND BSD-3-Clause)" }, + "node_modules/@cerebras/cerebras_cloud_sdk": { + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/@cerebras/cerebras_cloud_sdk/-/cerebras_cloud_sdk-1.35.0.tgz", + "integrity": "sha512-bQ6KYHmcvudHJ1aLzqkeETn3Y071/8/zpcZho6g4pKZ+VluHvLmIG0buhrwF9qJY5WSLmXR/s4pruxVRmfV7yQ==", + "license": "Apache-2.0", + "dependencies": { + "@types/node": "^18.11.18", + "@types/node-fetch": "^2.6.4", + "abort-controller": "^3.0.0", + "agentkeepalive": "^4.2.1", + "form-data-encoder": "1.7.2", + "formdata-node": "^4.3.2", + "node-fetch": "^2.6.7" + } + }, + "node_modules/@cerebras/cerebras_cloud_sdk/node_modules/@types/node": { + "version": "18.19.103", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.103.tgz", + "integrity": "sha512-hHTHp+sEz6SxFsp+SA+Tqrua3AbmlAw+Y//aEwdHrdZkYVRWdvWD3y5uPZ0flYOkgskaFWqZ/YGFm3FaFQ0pRw==", + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } + }, "node_modules/@changesets/apply-release-plan": { "version": "7.0.8", "resolved": "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-7.0.8.tgz", @@ -28892,6 +28917,30 @@ "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.2.5.tgz", "integrity": "sha512-/g5EzJifw5GF8aren8wZ/G5oMuPoGeS6MQD3ca8ddcvdXR5UELUfdTZITCGNhNXynY/AYl3Z4plmxdj/tRl/hQ==" }, + "@cerebras/cerebras_cloud_sdk": { + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/@cerebras/cerebras_cloud_sdk/-/cerebras_cloud_sdk-1.35.0.tgz", + "integrity": "sha512-bQ6KYHmcvudHJ1aLzqkeETn3Y071/8/zpcZho6g4pKZ+VluHvLmIG0buhrwF9qJY5WSLmXR/s4pruxVRmfV7yQ==", + "requires": { + "@types/node": "^18.11.18", + "@types/node-fetch": "^2.6.4", + "abort-controller": "^3.0.0", + "agentkeepalive": "^4.2.1", + "form-data-encoder": "1.7.2", + "formdata-node": "^4.3.2", + "node-fetch": "^2.6.7" + }, + "dependencies": { + "@types/node": { + "version": "18.19.103", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.103.tgz", + "integrity": "sha512-hHTHp+sEz6SxFsp+SA+Tqrua3AbmlAw+Y//aEwdHrdZkYVRWdvWD3y5uPZ0flYOkgskaFWqZ/YGFm3FaFQ0pRw==", + "requires": { + "undici-types": "~5.26.4" + } + } + } + }, "@changesets/apply-release-plan": { "version": "7.0.8", "resolved": "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-7.0.8.tgz", diff --git a/package.json b/package.json index a8d4059c..e3e77246 100644 --- a/package.json +++ b/package.json @@ -349,6 +349,7 @@ "@anthropic-ai/vertex-sdk": "^0.6.4", "@aws-sdk/client-bedrock-runtime": "^3.758.0", "@bufbuild/protobuf": "^2.2.5", + "@cerebras/cerebras_cloud_sdk": "^1.35.0", "@google-cloud/vertexai": "^1.9.3", "@google/genai": "^0.13.0", "@grpc/grpc-js": "^1.9.15", diff --git a/src/api/index.ts b/src/api/index.ts index 5b4ae31c..7c2f6c68 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -24,6 +24,7 @@ import { FireworksHandler } from "./providers/fireworks" import { AskSageHandler } from "./providers/asksage" import { XAIHandler } from "./providers/xai" import { SambanovaHandler } from "./providers/sambanova" +import { CerebrasHandler } from "./providers/cerebras" export interface ApiHandler { createMessage(systemPrompt: string, messages: Anthropic.Messages.MessageParam[]): ApiStream @@ -84,6 +85,8 @@ export function buildApiHandler(configuration: ApiConfiguration): ApiHandler { return new XAIHandler(options) case "sambanova": return new SambanovaHandler(options) + case "cerebras": + return new CerebrasHandler(options) default: return new AnthropicHandler(options) } diff --git a/src/api/providers/cerebras.ts b/src/api/providers/cerebras.ts new file mode 100644 index 00000000..641d574d --- /dev/null +++ b/src/api/providers/cerebras.ts @@ -0,0 +1,169 @@ +import { Anthropic } from "@anthropic-ai/sdk" +import Cerebras from "@cerebras/cerebras_cloud_sdk" +import { withRetry } from "../retry" +import { ApiHandlerOptions, ModelInfo, CerebrasModelId, cerebrasDefaultModelId, cerebrasModels } from "@shared/api" +import { ApiHandler } from "../index" +import { ApiStream } from "@api/transform/stream" + +export class CerebrasHandler implements ApiHandler { + private options: ApiHandlerOptions + private client: Cerebras + + constructor(options: ApiHandlerOptions) { + this.options = options + + // Clean and validate the API key + const cleanApiKey = this.options.cerebrasApiKey?.trim() + + if (!cleanApiKey) { + throw new Error("Cerebras API key is required") + } + + this.client = new Cerebras({ + apiKey: cleanApiKey, + timeout: 30000, // 30 second timeout + }) + } + + @withRetry() + async *createMessage(systemPrompt: string, messages: Anthropic.Messages.MessageParam[]): ApiStream { + // Convert Anthropic messages to Cerebras format + const cerebrasMessages: Array<{ + role: "system" | "user" | "assistant" + content: string + }> = [{ role: "system", content: systemPrompt }] + + // Convert Anthropic messages to Cerebras format + for (const message of messages) { + if (message.role === "user") { + const content = Array.isArray(message.content) + ? message.content + .map((block) => { + if (block.type === "text") { + return block.text + } else if (block.type === "image") { + return "[Image content not supported in Cerebras]" + } + return "" + }) + .join("\n") + : message.content + cerebrasMessages.push({ role: "user", content }) + } else if (message.role === "assistant") { + const content = Array.isArray(message.content) + ? message.content + .map((block) => { + if (block.type === "text") { + return block.text + } + return "" + }) + .join("\n") + : message.content || "" + cerebrasMessages.push({ role: "assistant", content }) + } + } + + try { + const stream = await this.client.chat.completions.create({ + model: this.getModel().id, + messages: cerebrasMessages, + temperature: 0, + stream: true, + }) + + // Handle streaming response + let reasoning: string | null = null // Track reasoning content for models that support thinking + const modelId = this.getModel().id + const isReasoningModel = modelId.includes("qwen") || modelId.includes("deepseek-r1-distill") + + for await (const chunk of stream as any) { + // Type assertion for the streaming chunk + const streamChunk = chunk as any + + if (streamChunk.choices?.[0]?.delta?.content) { + const content = streamChunk.choices[0].delta.content + + // Handle reasoning models (Qwen and DeepSeek R1 Distill) that use tags + if (isReasoningModel) { + // Check if we're entering or continuing reasoning mode + if (reasoning || content.includes("")) { + reasoning = (reasoning || "") + content + + // Clean the content by removing think tags for display + let cleanContent = content.replace(//g, "").replace(/<\/think>/g, "") + + // Only yield reasoning content if there's actual content after cleaning + if (cleanContent.trim()) { + yield { + type: "reasoning", + reasoning: cleanContent, + } + } + + // Check if reasoning is complete + if (reasoning.includes("")) { + reasoning = null + } + } else { + // Regular content outside of thinking tags + yield { + type: "text", + text: content, + } + } + } else { + // Non-reasoning models - just yield text content + yield { + type: "text", + text: content, + } + } + } + + // Handle usage information from Cerebras API + // Usage is typically only available in the final chunk + if (streamChunk.usage) { + const totalCost = this.calculateCost({ + inputTokens: streamChunk.usage.prompt_tokens || 0, + outputTokens: streamChunk.usage.completion_tokens || 0, + }) + + yield { + type: "usage", + inputTokens: streamChunk.usage.prompt_tokens || 0, + outputTokens: streamChunk.usage.completion_tokens || 0, + cacheReadTokens: 0, + cacheWriteTokens: 0, + totalCost, + } + } + } + } catch (error) { + throw error + } + } + + getModel(): { id: string; info: ModelInfo } { + const modelId = this.options.apiModelId + if (modelId && modelId in cerebrasModels) { + const id = modelId as CerebrasModelId + return { id, info: cerebrasModels[id] } + } + return { + id: cerebrasDefaultModelId, + info: cerebrasModels[cerebrasDefaultModelId], + } + } + + private calculateCost({ inputTokens, outputTokens }: { inputTokens: number; outputTokens: number }): number { + const model = this.getModel() + const inputPrice = model.info.inputPrice || 0 + const outputPrice = model.info.outputPrice || 0 + + const inputCost = (inputPrice / 1_000_000) * inputTokens + const outputCost = (outputPrice / 1_000_000) * outputTokens + + return inputCost + outputCost + } +} diff --git a/src/core/storage/state-keys.ts b/src/core/storage/state-keys.ts index 2a45bca9..8723b11e 100644 --- a/src/core/storage/state-keys.ts +++ b/src/core/storage/state-keys.ts @@ -21,6 +21,7 @@ export type SecretKey = | "xaiApiKey" | "nebiusApiKey" | "sambanovaApiKey" + | "cerebrasApiKey" export type GlobalStateKey = | "apiProvider" diff --git a/src/core/storage/state.ts b/src/core/storage/state.ts index cb386266..4476a5df 100644 --- a/src/core/storage/state.ts +++ b/src/core/storage/state.ts @@ -155,6 +155,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { thinkingBudgetTokens, reasoningEffort, sambanovaApiKey, + cerebrasApiKey, nebiusApiKey, planActSeparateModelsSettingRaw, favoritedModelIds, @@ -244,6 +245,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { getGlobalState(context, "thinkingBudgetTokens") as Promise, getGlobalState(context, "reasoningEffort") as Promise, getSecret(context, "sambanovaApiKey") as Promise, + getSecret(context, "cerebrasApiKey") as Promise, getSecret(context, "nebiusApiKey") as Promise, getGlobalState(context, "planActSeparateModelsSetting") as Promise, getGlobalState(context, "favoritedModelIds") as Promise, @@ -357,6 +359,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { asksageApiUrl, xaiApiKey, sambanovaApiKey, + cerebrasApiKey, nebiusApiKey, favoritedModelIds, requestTimeoutMs, @@ -451,6 +454,7 @@ export async function updateApiConfiguration(context: vscode.ExtensionContext, a reasoningEffort, clineApiKey, sambanovaApiKey, + cerebrasApiKey, nebiusApiKey, favoritedModelIds, } = apiConfiguration @@ -512,6 +516,7 @@ export async function updateApiConfiguration(context: vscode.ExtensionContext, a await updateGlobalState(context, "reasoningEffort", reasoningEffort) await storeSecret(context, "clineApiKey", clineApiKey) await storeSecret(context, "sambanovaApiKey", sambanovaApiKey) + await storeSecret(context, "cerebrasApiKey", cerebrasApiKey) await storeSecret(context, "nebiusApiKey", nebiusApiKey) await updateGlobalState(context, "favoritedModelIds", favoritedModelIds) await updateGlobalState(context, "requestTimeoutMs", apiConfiguration.requestTimeoutMs) @@ -542,6 +547,7 @@ export async function resetExtensionState(context: vscode.ExtensionContext) { "asksageApiKey", "xaiApiKey", "sambanovaApiKey", + "cerebrasApiKey", "nebiusApiKey", ] for (const key of secretKeys) { diff --git a/src/shared/api.ts b/src/shared/api.ts index 1f58c2ac..3265cc14 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -24,6 +24,7 @@ export type ApiProvider = | "asksage" | "xai" | "sambanova" + | "cerebras" export interface ApiHandlerOptions { apiModelId?: string @@ -89,6 +90,7 @@ export interface ApiHandlerOptions { thinkingBudgetTokens?: number reasoningEffort?: string sambanovaApiKey?: string + cerebrasApiKey?: string requestTimeoutMs?: number onRetryAttempt?: (attempt: number, maxRetries: number, delay: number, error: any) => void } @@ -1928,6 +1930,58 @@ export const sambanovaModels = { }, } as const satisfies Record +// Cerebras +// https://inference-docs.cerebras.ai/api-reference/models +export type CerebrasModelId = keyof typeof cerebrasModels +export const cerebrasDefaultModelId: CerebrasModelId = "llama3.1-8b" +export const cerebrasModels = { + "llama-4-scout-17b-16e-instruct": { + maxTokens: 8192, + contextWindow: 8192, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0, + outputPrice: 0, + description: "Fast inference model with ~2700 tokens/s", + }, + "llama3.1-8b": { + maxTokens: 8192, + contextWindow: 8192, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0, + outputPrice: 0, + description: "Efficient model with ~2100 tokens/s", + }, + "llama-3.3-70b": { + maxTokens: 8192, + contextWindow: 8192, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0, + outputPrice: 0, + description: "Powerful model with ~2600 tokens/s", + }, + "qwen-3-32b": { + maxTokens: 16382, + contextWindow: 16382, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0, + outputPrice: 0, + description: "SOTA coding performance with ~2500 tokens/s", + }, + "deepseek-r1-distill-llama-70b": { + maxTokens: 8192, + contextWindow: 8192, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0, + outputPrice: 0, + description: "Advanced reasoning model with ~2300 tokens/s (private preview)", + }, +} as const satisfies Record + // Requesty // https://requesty.ai/models export const requestyDefaultModelId = "anthropic/claude-3-7-sonnet-latest" diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx index a41a90b2..4ac97103 100644 --- a/webview-ui/src/components/settings/ApiOptions.tsx +++ b/webview-ui/src/components/settings/ApiOptions.tsx @@ -51,6 +51,8 @@ import { nebiusDefaultModelId, sambanovaModels, sambanovaDefaultModelId, + cerebrasModels, + cerebrasDefaultModelId, doubaoModels, doubaoDefaultModelId, liteLlmModelInfoSaneDefaults, @@ -329,6 +331,7 @@ const ApiOptions = ({ AskSage xAI SambaNova + Cerebras @@ -2013,6 +2016,37 @@ const ApiOptions = ({
)} + {selectedProvider === "cerebras" && ( +
+ + Cerebras API Key + +

+ This key is stored locally and only used to make API requests from this extension. + {!apiConfiguration?.cerebrasApiKey && ( + + You can get a Cerebras API key by signing up here. + + )} +

+
+ )} + {apiErrorMessage && (

@@ -2565,6 +2600,8 @@ export function normalizeApiConfiguration(apiConfiguration?: ApiConfiguration): return getProviderData(nebiusModels, nebiusDefaultModelId) case "sambanova": return getProviderData(sambanovaModels, sambanovaDefaultModelId) + case "cerebras": + return getProviderData(cerebrasModels, cerebrasDefaultModelId) default: return getProviderData(anthropicModels, anthropicDefaultModelId) }