From 227d2abb6987c9214fa05f5b35b527e95ad4a5c4 Mon Sep 17 00:00:00 2001 From: JinmingYang <2214962083@qq.com> Date: Tue, 23 Jul 2024 19:44:13 +0800 Subject: [PATCH] feat: support add desc when code convert to custom language, add cache for some ai request --- .husky/commit-msg | 2 - .husky/pre-push | 2 - .vscode/launch.json | 4 +- package.json | 98 ++-- package.nls.en.json | 23 +- package.nls.json | 23 +- package.nls.zh-cn.json | 23 +- pnpm-lock.yaml | 539 +++++++++--------- src/commands/code-convert.ts | 46 +- src/commands/smart-paste.ts | 8 +- src/config.ts | 18 +- src/index.ts | 10 + src/storage.ts | 306 ++++++++++ .../configuration/convert-language-pairs.md | 7 +- website/en/guide/features/code-convert.md | 15 + .../configuration/convert-language-pairs.md | 7 +- website/zh/guide/features/code-convert.md | 15 + 17 files changed, 776 insertions(+), 370 deletions(-) create mode 100644 src/storage.ts diff --git a/.husky/commit-msg b/.husky/commit-msg index 97681ce..6f81073 100644 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1,2 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" pnpm exec commitlint --edit ${1} diff --git a/.husky/pre-push b/.husky/pre-push index a2f6051..8d831a8 100644 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,4 +1,2 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" pnpm run test diff --git a/.vscode/launch.json b/.vscode/launch.json index 14db135..7b36a75 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -11,8 +11,8 @@ "request": "launch", "runtimeExecutable": "${execPath}", "args": [ - "--extensionDevelopmentPath=${workspaceFolder}" - // "--disable-extensions" + "--extensionDevelopmentPath=${workspaceFolder}", + "--disable-extensions" ], "outFiles": ["${workspaceFolder}/dist/**/*.js"], "preLaunchTask": "npm: watch", diff --git a/package.json b/package.json index abe225c..8192c2d 100644 --- a/package.json +++ b/package.json @@ -136,29 +136,43 @@ "configuration": { "title": "%config.title%", "properties": { - "aide.aiPrompt": { + "aide.openaiKey": { "type": "string", - "default": "#{content}", - "scope": "resource", - "description": "%config.aiPrompt.description%" + "default": "", + "markdownDescription": "%config.openaiKey.description%" }, - "aide.aiCommand": { + "aide.openaiModel": { "type": "string", - "default": "", + "default": "gpt-4o", + "markdownDescription": "%config.openaiModel.description%" + }, + "aide.openaiBaseUrl": { + "type": "string", + "default": "https://api.openai.com/v1", + "markdownDescription": "%config.openaiBaseUrl.description%" + }, + "aide.codeViewerHelperPrompt": { + "type": "string", + "default": "You are a programming language commentator.\nYou need to help me add comments to #{sourceLanguage} code as much as possible to make it readable for beginners.\nDo not change the original code, just add as detailed comments as possible,\nbecause my purpose is only to understand and read. Please use my native language #{locale} as the commenting language.\nPlease do not reply with any text other than the code, and do not use markdown syntax.\nHere is the code you need to comment on:\n\n#{content}", "scope": "resource", - "description": "%config.aiCommand.description%" + "markdownDescription": "%config.codeViewerHelperPrompt.description%" }, - "aide.aiCommandCopyBeforeRun": { - "type": "boolean", - "default": true, + "aide.convertLanguagePairs": { + "type": "object", + "default": {}, "scope": "resource", - "description": "%config.aiCommandCopyBeforeRun.description%" + "markdownDescription": "%config.convertLanguagePairs.description%" }, - "aide.respectGitIgnore": { + "aide.autoRememberConvertLanguagePairs": { "type": "boolean", "default": true, + "markdownDescription": "%config.autoRememberConvertLanguagePairs.description%" + }, + "aide.aiPrompt": { + "type": "string", + "default": "#{content}", "scope": "resource", - "description": "%config.respectGitIgnore.description%" + "markdownDescription": "%config.aiPrompt.description%" }, "aide.ignorePatterns": { "type": "array", @@ -177,39 +191,25 @@ "**/.parcel-cache/**" ], "scope": "resource", - "description": "%config.ignorePatterns.description%" + "markdownDescription": "%config.ignorePatterns.description%" }, - "aide.autoRememberConvertLanguagePairs": { + "aide.respectGitIgnore": { "type": "boolean", "default": true, - "description": "%config.autoRememberConvertLanguagePairs.description%" - }, - "aide.convertLanguagePairs": { - "type": "object", - "default": {}, "scope": "resource", - "description": "%config.convertLanguagePairs.description%" + "markdownDescription": "%config.respectGitIgnore.description%" }, - "aide.codeViewerHelperPrompt": { - "type": "string", - "default": "You are a programming language commentator.\nYou need to help me add comments to #{sourceLanguage} code as much as possible to make it readable for beginners.\nDo not change the original code, just add as detailed comments as possible,\nbecause my purpose is only to understand and read. Please use my native language #{locale} as the commenting language.\nPlease do not reply with any text other than the code, and do not use markdown syntax.\nHere is the code you need to comment on:\n\n#{content}", - "scope": "resource", - "description": "%config.codeViewerHelperPrompt.description%" - }, - "aide.openaiKey": { + "aide.aiCommand": { "type": "string", "default": "", - "description": "%config.openaiKey.description%" - }, - "aide.openaiBaseUrl": { - "type": "string", - "default": "https://api.openai.com/v1", - "description": "%config.openaiBaseUrl.description%" + "scope": "resource", + "markdownDescription": "%config.aiCommand.description%" }, - "aide.openaiModel": { - "type": "string", - "default": "gpt-4o", - "description": "%config.openaiModel.description%" + "aide.aiCommandCopyBeforeRun": { + "type": "boolean", + "default": true, + "scope": "resource", + "markdownDescription": "%config.aiCommandCopyBeforeRun.description%" } } } @@ -236,16 +236,16 @@ "@commitlint/cz-commitlint": "^19.2.0", "@ianvs/prettier-plugin-sort-imports": "^4.3.1", "@langchain/anthropic": "^0.2.6", - "@langchain/core": "0.2.17", + "@langchain/core": "0.2.18", "@langchain/openai": "^0.2.4", "@types/fs-extra": "^11.0.4", "@types/global-agent": "^2.1.3", "@types/node": "^20.14.11", "@types/shell-quote": "^1.7.5", "@types/vscode": "1.82.0", - "@typescript-eslint/eslint-plugin": "^7.16.1", - "@typescript-eslint/parser": "^7.16.1", - "@vscode/vsce": "^2.31.0", + "@typescript-eslint/eslint-plugin": "^7.17.0", + "@typescript-eslint/parser": "^7.17.0", + "@vscode/vsce": "^2.31.1", "commitizen": "^4.3.0", "dotenv": "^16.4.5", "eslint": "^8.57.0", @@ -264,27 +264,27 @@ "fs-extra": "^11.2.0", "glob": "^10.4.3", "global-agent": "^3.0.0", - "husky": "^9.1.0", + "husky": "^9.1.1", "ignore": "^5.3.1", "inquirer": "^9.3.4", - "knip": "^5.26.0", + "knip": "^5.27.0", "langchain": "^0.2.10", "lint-staged": "^15.2.7", "minimatch": "^9.0.5", - "pnpm": "^9.5.0", + "pnpm": "^9.6.0", "prettier": "^3.3.3", "rimraf": "^6.0.1", "shell-quote": "^1.8.1", - "tsup": "^8.1.2", + "tsup": "^8.2.2", "typescript": "5.4.5", - "undici": "^6.19.2", + "undici": "^6.19.4", "vite": "^5.3.4", - "vitest": "^2.0.3", + "vitest": "^2.0.4", "zod": "^3.23.8" }, "pnpm": { "overrides": { - "@langchain/core": "0.2.17" + "@langchain/core": "0.2.18" } }, "commitlint": { diff --git a/package.nls.en.json b/package.nls.en.json index 3c12ded..f0e1fd6 100644 --- a/package.nls.en.json +++ b/package.nls.en.json @@ -6,17 +6,17 @@ "command.renameVariable": "✨ Aide: Rename Variable", "command.smartPaste": "✨ Aide: Smart Paste", "config.title": "Aide Configuration", - "config.aiPrompt.description": "Template for copied content, use #{content} as a placeholder for file content", - "config.aiCommand.description": "Custom AI command template. Available variables: #{filesRelativePath}, #{filesFullPath}, #{content}", - "config.aiCommandCopyBeforeRun.description": "Copy AI command to clipboard before running", - "config.ignorePatterns.description": "Ignored file name patterns, supports glob syntax", - "config.respectGitIgnore.description": "Respect .gitignore file", - "config.autoRememberConvertLanguagePairs.description": "Automatically remember convert language pairs", - "config.convertLanguagePairs.description": "Default convert language pairs", - "config.codeViewerHelperPrompt.description": "Code viewer helper prompt template", - "config.openaiKey.description": "OpenAI Key", - "config.openaiBaseUrl.description": "OpenAI Base URL", - "config.openaiModel.description": "OpenAI Model", + "config.openaiKey.description": "OpenAI Key, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/openai-key)", + "config.openaiModel.description": "OpenAI Model, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/openai-model)", + "config.openaiBaseUrl.description": "OpenAI Base URL, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/openai-base-url)", + "config.codeViewerHelperPrompt.description": "Code viewer helper prompt template, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/code-viewer-helper-prompt)", + "config.convertLanguagePairs.description": "Default convert language pairs, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/convert-language-pairs)", + "config.autoRememberConvertLanguagePairs.description": "Automatically remember convert language pairs, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/auto-remember-convert-language-pairs)", + "config.aiPrompt.description": "Template for copied content, use #{content} as a placeholder for file content, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/ai-prompt)", + "config.ignorePatterns.description": "Ignored file name patterns, supports glob syntax, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/ignore-patterns)", + "config.respectGitIgnore.description": "Respect .gitignore file, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/respect-git-ignore)", + "config.aiCommand.description": "Custom AI command template. Available variables: #{filesRelativePath}, #{filesFullPath}, #{content}, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/ai-command)", + "config.aiCommandCopyBeforeRun.description": "Copy AI command to clipboard before running, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/ai-command-copy-before-run)", "error.noWorkspace": "Unable to determine workspace folder", "error.invalidConfigKey": "Invalid configuration key", "error.invalidConfigValueType": "Invalid configuration value type", @@ -32,6 +32,7 @@ "error.noActiveEditor": "No file is currently open", "error.noTargetLanguage": "No target language selected", "error.noContext": "Context not initialized", + "error.emptyClipboard": "Clipboard is empty", "info.copied": "File contents have been copied to clipboard", "info.customLanguage": "Custom language", "info.noAiSuggestionsVariableName": "AI thinks your variable name is already good", diff --git a/package.nls.json b/package.nls.json index 3c12ded..f0e1fd6 100644 --- a/package.nls.json +++ b/package.nls.json @@ -6,17 +6,17 @@ "command.renameVariable": "✨ Aide: Rename Variable", "command.smartPaste": "✨ Aide: Smart Paste", "config.title": "Aide Configuration", - "config.aiPrompt.description": "Template for copied content, use #{content} as a placeholder for file content", - "config.aiCommand.description": "Custom AI command template. Available variables: #{filesRelativePath}, #{filesFullPath}, #{content}", - "config.aiCommandCopyBeforeRun.description": "Copy AI command to clipboard before running", - "config.ignorePatterns.description": "Ignored file name patterns, supports glob syntax", - "config.respectGitIgnore.description": "Respect .gitignore file", - "config.autoRememberConvertLanguagePairs.description": "Automatically remember convert language pairs", - "config.convertLanguagePairs.description": "Default convert language pairs", - "config.codeViewerHelperPrompt.description": "Code viewer helper prompt template", - "config.openaiKey.description": "OpenAI Key", - "config.openaiBaseUrl.description": "OpenAI Base URL", - "config.openaiModel.description": "OpenAI Model", + "config.openaiKey.description": "OpenAI Key, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/openai-key)", + "config.openaiModel.description": "OpenAI Model, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/openai-model)", + "config.openaiBaseUrl.description": "OpenAI Base URL, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/openai-base-url)", + "config.codeViewerHelperPrompt.description": "Code viewer helper prompt template, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/code-viewer-helper-prompt)", + "config.convertLanguagePairs.description": "Default convert language pairs, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/convert-language-pairs)", + "config.autoRememberConvertLanguagePairs.description": "Automatically remember convert language pairs, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/auto-remember-convert-language-pairs)", + "config.aiPrompt.description": "Template for copied content, use #{content} as a placeholder for file content, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/ai-prompt)", + "config.ignorePatterns.description": "Ignored file name patterns, supports glob syntax, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/ignore-patterns)", + "config.respectGitIgnore.description": "Respect .gitignore file, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/respect-git-ignore)", + "config.aiCommand.description": "Custom AI command template. Available variables: #{filesRelativePath}, #{filesFullPath}, #{content}, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/ai-command)", + "config.aiCommandCopyBeforeRun.description": "Copy AI command to clipboard before running, [click to view online documentation](https://aide.nicepkg.cn/guide/configuration/ai-command-copy-before-run)", "error.noWorkspace": "Unable to determine workspace folder", "error.invalidConfigKey": "Invalid configuration key", "error.invalidConfigValueType": "Invalid configuration value type", @@ -32,6 +32,7 @@ "error.noActiveEditor": "No file is currently open", "error.noTargetLanguage": "No target language selected", "error.noContext": "Context not initialized", + "error.emptyClipboard": "Clipboard is empty", "info.copied": "File contents have been copied to clipboard", "info.customLanguage": "Custom language", "info.noAiSuggestionsVariableName": "AI thinks your variable name is already good", diff --git a/package.nls.zh-cn.json b/package.nls.zh-cn.json index e2e99fc..b463a4a 100644 --- a/package.nls.zh-cn.json +++ b/package.nls.zh-cn.json @@ -6,17 +6,17 @@ "command.renameVariable": "✨ Aide: 重命名变量", "command.smartPaste": "✨ Aide: 智能粘贴", "config.title": "Aide 配置", - "config.aiPrompt.description": "复制内容的模板,使用#{content}作为文件内容的占位符", - "config.aiCommand.description": "自定义 AI 命令模板。可用变量:#{filesRelativePath}, #{filesFullPath}, #{content}", - "config.aiCommandCopyBeforeRun.description": "运行前将 AI 命令复制到剪贴板", - "config.ignorePatterns.description": "忽略的文件名模式, 支持 glob 语法", - "config.respectGitIgnore.description": "是否尊重 .gitignore 文件", - "config.autoRememberConvertLanguagePairs.description": "是否自动记住转换语言对照表", - "config.convertLanguagePairs.description": "默认转换语言对照表", - "config.codeViewerHelperPrompt.description": "代码查看器助手 prompt 模板", - "config.openaiKey.description": "OpenAI Key", - "config.openaiBaseUrl.description": "OpenAI Base URL", - "config.openaiModel.description": "OpenAI Model", + "config.openaiKey.description": "OpenAI Key, [点击查看在线文档](https://aide.nicepkg.cn/zh/guide/configuration/openai-key)", + "config.openaiModel.description": "OpenAI Model, [点击查看在线文档](https://aide.nicepkg.cn/zh/guide/configuration/openai-model)", + "config.openaiBaseUrl.description": "OpenAI Base URL, [点击查看在线文档](https://aide.nicepkg.cn/zh/guide/configuration/openai-base-url)", + "config.codeViewerHelperPrompt.description": "代码查看器助手 prompt 模板, [点击查看在线文档](https://aide.nicepkg.cn/zh/guide/configuration/code-viewer-helper-prompt)", + "config.convertLanguagePairs.description": "默认转换语言对照表, [点击查看在线文档](https://aide.nicepkg.cn/zh/guide/configuration/convert-language-pairs)", + "config.autoRememberConvertLanguagePairs.description": "是否自动记住转换语言对照表, [点击查看在线文档](https://aide.nicepkg.cn/zh/guide/configuration/auto-remember-convert-language-pairs)", + "config.aiPrompt.description": "复制内容的模板,使用#{content}作为文件内容的占位符, [点击查看在线文档](https://aide.nicepkg.cn/zh/guide/configuration/ai-prompt)", + "config.ignorePatterns.description": "忽略的文件名模式, 支持 glob 语法, [点击查看在线文档](https://aide.nicepkg.cn/zh/guide/configuration/ignore-patterns)", + "config.respectGitIgnore.description": "是否尊重 .gitignore 文件, [点击查看在线文档](https://aide.nicepkg.cn/zh/guide/configuration/respect-git-ignore)", + "config.aiCommand.description": "自定义 AI 命令模板。可用变量:#{filesRelativePath}, #{filesFullPath}, #{content}, [点击查看在线文档](https://aide.nicepkg.cn/zh/guide/configuration/ai-command)", + "config.aiCommandCopyBeforeRun.description": "运行前将 AI 命令复制到剪贴板, [点击查看在线文档](https://aide.nicepkg.cn/zh/guide/configuration/ai-command-copy-before-run)", "error.noWorkspace": "无法确定工作区文件夹", "error.invalidConfigKey": "无效的配置键", "error.invalidConfigValueType": "无效的配置值类型", @@ -32,6 +32,7 @@ "error.noActiveEditor": "未打开任何文件", "error.noTargetLanguage": "未选择目标语言", "error.noContext": "上下文未初始化", + "error.emptyClipboard": "剪贴板为空", "info.copied": "文件内容已复制到剪贴板", "info.customLanguage": "自定义语言", "info.noAiSuggestionsVariableName": " AI 觉得你这个变量名字已经很好了", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 905ee32..391057c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,7 +5,7 @@ settings: excludeLinksFromLockfile: false overrides: - '@langchain/core': 0.2.17 + '@langchain/core': 0.2.18 importers: @@ -30,8 +30,8 @@ importers: specifier: ^0.2.6 version: 0.2.6(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) '@langchain/core': - specifier: 0.2.17 - version: 0.2.17(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) + specifier: 0.2.18 + version: 0.2.18(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) '@langchain/openai': specifier: ^0.2.4 version: 0.2.4(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1)) @@ -51,14 +51,14 @@ importers: specifier: 1.82.0 version: 1.82.0 '@typescript-eslint/eslint-plugin': - specifier: ^7.16.1 - version: 7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) + specifier: ^7.17.0 + version: 7.17.0(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/parser': - specifier: ^7.16.1 - version: 7.16.1(eslint@8.57.0)(typescript@5.4.5) + specifier: ^7.17.0 + version: 7.17.0(eslint@8.57.0)(typescript@5.4.5) '@vscode/vsce': - specifier: ^2.31.0 - version: 2.31.0 + specifier: ^2.31.1 + version: 2.31.1 commitizen: specifier: ^4.3.0 version: 4.3.0(@types/node@20.14.11)(typescript@5.4.5) @@ -70,22 +70,22 @@ importers: version: 8.57.0 eslint-config-airbnb-base: specifier: ^15.0.0 - version: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0))(eslint@8.57.0) + version: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0))(eslint@8.57.0) eslint-config-airbnb-typescript: specifier: ^18.0.0 - version: 18.0.0(@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0))(eslint@8.57.0) + version: 18.0.0(@typescript-eslint/eslint-plugin@7.17.0(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0))(eslint@8.57.0) eslint-config-prettier: specifier: ^9.1.0 version: 9.1.0(eslint@8.57.0) eslint-import-resolver-alias: specifier: ^1.1.2 - version: 1.1.2(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)) + version: 1.1.2(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)) eslint-import-resolver-typescript: specifier: ^3.6.1 - version: 3.6.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@8.57.0) + version: 3.6.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@8.57.0) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + version: 2.29.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-json: specifier: ^4.0.0 version: 4.0.0 @@ -97,7 +97,7 @@ importers: version: 12.1.1(eslint@8.57.0) eslint-plugin-unused-imports: specifier: ^3.2.0 - version: 3.2.0(@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0) + version: 3.2.0(@typescript-eslint/eslint-plugin@7.17.0(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0) esno: specifier: ^4.7.0 version: 4.7.0 @@ -114,8 +114,8 @@ importers: specifier: ^3.0.0 version: 3.0.0 husky: - specifier: ^9.1.0 - version: 9.1.0 + specifier: ^9.1.1 + version: 9.1.1 ignore: specifier: ^5.3.1 version: 5.3.1 @@ -123,8 +123,8 @@ importers: specifier: ^9.3.4 version: 9.3.4 knip: - specifier: ^5.26.0 - version: 5.26.0(@types/node@20.14.11)(typescript@5.4.5) + specifier: ^5.27.0 + version: 5.27.0(@types/node@20.14.11)(typescript@5.4.5) langchain: specifier: ^0.2.10 version: 0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1) @@ -135,8 +135,8 @@ importers: specifier: ^9.0.5 version: 9.0.5 pnpm: - specifier: ^9.5.0 - version: 9.5.0 + specifier: ^9.6.0 + version: 9.6.0 prettier: specifier: ^3.3.3 version: 3.3.3 @@ -147,20 +147,20 @@ importers: specifier: ^1.8.1 version: 1.8.1 tsup: - specifier: ^8.1.2 - version: 8.1.2(jiti@1.21.6)(postcss@8.4.39)(tsx@4.10.5)(typescript@5.4.5)(yaml@2.4.5) + specifier: ^8.2.2 + version: 8.2.2(jiti@1.21.6)(postcss@8.4.39)(tsx@4.10.5)(typescript@5.4.5)(yaml@2.4.5) typescript: specifier: 5.4.5 version: 5.4.5 undici: - specifier: ^6.19.2 - version: 6.19.2 + specifier: ^6.19.4 + version: 6.19.4 vite: specifier: ^5.3.4 version: 5.3.4(@types/node@20.14.11) vitest: - specifier: ^2.0.3 - version: 2.0.3(@types/node@20.14.11) + specifier: ^2.0.4 + version: 2.0.4(@types/node@20.14.11) zod: specifier: ^3.23.8 version: 3.23.8 @@ -197,7 +197,7 @@ importers: version: 4.0.0 unocss: specifier: ^0.61.5 - version: 0.61.5(postcss@8.4.39)(rollup@4.18.1)(vite@5.3.4(@types/node@20.14.11)) + version: 0.61.5(postcss@8.4.39)(rollup@4.19.0)(vite@5.3.4(@types/node@20.14.11)) vitepress: specifier: 1.3.1 version: 1.3.1(@algolia/client-search@4.24.0)(@types/node@20.14.11)(postcss@8.4.39)(search-insights@2.15.0)(typescript@5.4.5) @@ -1150,8 +1150,8 @@ packages: resolution: {integrity: sha512-mFBC944rKGy+oRKWOmCmABPj+pQ2S8FcvyFGavFgIqjWlnBk9PwMjWm8IEdWwaSEahJXuEL9xAV2StWazWdXvg==} engines: {node: '>=18'} - '@langchain/core@0.2.17': - resolution: {integrity: sha512-WnFiZ7R/ZUVeHO2IgcSL7Tu+CjApa26Iy99THJP5fax/NF8UQCc/ZRcw2Sb/RUuRPVm6ALDass0fSQE1L9YNJg==} + '@langchain/core@0.2.18': + resolution: {integrity: sha512-ru542BwNcsnDfjTeDbIkFIchwa54ctHZR+kVrC8U9NPS9/36iM8p8ruprOV7Zccj/oxtLE5UpEhV+9MZhVcFlA==} engines: {node: '>=18'} '@langchain/openai@0.2.4': @@ -1199,8 +1199,8 @@ packages: cpu: [arm] os: [android] - '@rollup/rollup-android-arm-eabi@4.18.1': - resolution: {integrity: sha512-lncuC4aHicncmbORnx+dUaAgzee9cm/PbIqgWz1PpXuwc+sa1Ct83tnqUDy/GFKleLiN7ZIeytM6KJ4cAn1SxA==} + '@rollup/rollup-android-arm-eabi@4.19.0': + resolution: {integrity: sha512-JlPfZ/C7yn5S5p0yKk7uhHTTnFlvTgLetl2VxqE518QgyM7C9bSfFTYvB/Q/ftkq0RIPY4ySxTz+/wKJ/dXC0w==} cpu: [arm] os: [android] @@ -1209,8 +1209,8 @@ packages: cpu: [arm64] os: [android] - '@rollup/rollup-android-arm64@4.18.1': - resolution: {integrity: sha512-F/tkdw0WSs4ojqz5Ovrw5r9odqzFjb5LIgHdHZG65dFI1lWTWRVy32KDJLKRISHgJvqUeUhdIvy43fX41znyDg==} + '@rollup/rollup-android-arm64@4.19.0': + resolution: {integrity: sha512-RDxUSY8D1tWYfn00DDi5myxKgOk6RvWPxhmWexcICt/MEC6yEMr4HNCu1sXXYLw8iAsg0D44NuU+qNq7zVWCrw==} cpu: [arm64] os: [android] @@ -1219,8 +1219,8 @@ packages: cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-arm64@4.18.1': - resolution: {integrity: sha512-vk+ma8iC1ebje/ahpxpnrfVQJibTMyHdWpOGZ3JpQ7Mgn/3QNHmPq7YwjZbIE7km73dH5M1e6MRRsnEBW7v5CQ==} + '@rollup/rollup-darwin-arm64@4.19.0': + resolution: {integrity: sha512-emvKHL4B15x6nlNTBMtIaC9tLPRpeA5jMvRLXVbl/W9Ie7HhkrE7KQjvgS9uxgatL1HmHWDXk5TTS4IaNJxbAA==} cpu: [arm64] os: [darwin] @@ -1229,8 +1229,8 @@ packages: cpu: [x64] os: [darwin] - '@rollup/rollup-darwin-x64@4.18.1': - resolution: {integrity: sha512-IgpzXKauRe1Tafcej9STjSSuG0Ghu/xGYH+qG6JwsAUxXrnkvNHcq/NL6nz1+jzvWAnQkuAJ4uIwGB48K9OCGA==} + '@rollup/rollup-darwin-x64@4.19.0': + resolution: {integrity: sha512-fO28cWA1dC57qCd+D0rfLC4VPbh6EOJXrreBmFLWPGI9dpMlER2YwSPZzSGfq11XgcEpPukPTfEVFtw2q2nYJg==} cpu: [x64] os: [darwin] @@ -1239,8 +1239,8 @@ packages: cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-gnueabihf@4.18.1': - resolution: {integrity: sha512-P9bSiAUnSSM7EmyRK+e5wgpqai86QOSv8BwvkGjLwYuOpaeomiZWifEos517CwbG+aZl1T4clSE1YqqH2JRs+g==} + '@rollup/rollup-linux-arm-gnueabihf@4.19.0': + resolution: {integrity: sha512-2Rn36Ubxdv32NUcfm0wB1tgKqkQuft00PtM23VqLuCUR4N5jcNWDoV5iBC9jeGdgS38WK66ElncprqgMUOyomw==} cpu: [arm] os: [linux] @@ -1249,8 +1249,8 @@ packages: cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.18.1': - resolution: {integrity: sha512-5RnjpACoxtS+aWOI1dURKno11d7krfpGDEn19jI8BuWmSBbUC4ytIADfROM1FZrFhQPSoP+KEa3NlEScznBTyQ==} + '@rollup/rollup-linux-arm-musleabihf@4.19.0': + resolution: {integrity: sha512-gJuzIVdq/X1ZA2bHeCGCISe0VWqCoNT8BvkQ+BfsixXwTOndhtLUpOg0A1Fcx/+eA6ei6rMBzlOz4JzmiDw7JQ==} cpu: [arm] os: [linux] @@ -1259,8 +1259,8 @@ packages: cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.18.1': - resolution: {integrity: sha512-8mwmGD668m8WaGbthrEYZ9CBmPug2QPGWxhJxh/vCgBjro5o96gL04WLlg5BA233OCWLqERy4YUzX3bJGXaJgQ==} + '@rollup/rollup-linux-arm64-gnu@4.19.0': + resolution: {integrity: sha512-0EkX2HYPkSADo9cfeGFoQ7R0/wTKb7q6DdwI4Yn/ULFE1wuRRCHybxpl2goQrx4c/yzK3I8OlgtBu4xvted0ug==} cpu: [arm64] os: [linux] @@ -1269,8 +1269,8 @@ packages: cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.18.1': - resolution: {integrity: sha512-dJX9u4r4bqInMGOAQoGYdwDP8lQiisWb9et+T84l2WXk41yEej8v2iGKodmdKimT8cTAYt0jFb+UEBxnPkbXEQ==} + '@rollup/rollup-linux-arm64-musl@4.19.0': + resolution: {integrity: sha512-GlIQRj9px52ISomIOEUq/IojLZqzkvRpdP3cLgIE1wUWaiU5Takwlzpz002q0Nxxr1y2ZgxC2obWxjr13lvxNQ==} cpu: [arm64] os: [linux] @@ -1279,8 +1279,8 @@ packages: cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.18.1': - resolution: {integrity: sha512-V72cXdTl4EI0x6FNmho4D502sy7ed+LuVW6Ym8aI6DRQ9hQZdp5sj0a2usYOlqvFBNKQnLQGwmYnujo2HvjCxQ==} + '@rollup/rollup-linux-powerpc64le-gnu@4.19.0': + resolution: {integrity: sha512-N6cFJzssruDLUOKfEKeovCKiHcdwVYOT1Hs6dovDQ61+Y9n3Ek4zXvtghPPelt6U0AH4aDGnDLb83uiJMkWYzQ==} cpu: [ppc64] os: [linux] @@ -1289,8 +1289,8 @@ packages: cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.18.1': - resolution: {integrity: sha512-f+pJih7sxoKmbjghrM2RkWo2WHUW8UbfxIQiWo5yeCaCM0TveMEuAzKJte4QskBp1TIinpnRcxkquY+4WuY/tg==} + '@rollup/rollup-linux-riscv64-gnu@4.19.0': + resolution: {integrity: sha512-2DnD3mkS2uuam/alF+I7M84koGwvn3ZVD7uG+LEWpyzo/bq8+kKnus2EVCkcvh6PlNB8QPNFOz6fWd5N8o1CYg==} cpu: [riscv64] os: [linux] @@ -1299,8 +1299,8 @@ packages: cpu: [s390x] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.18.1': - resolution: {integrity: sha512-qb1hMMT3Fr/Qz1OKovCuUM11MUNLUuHeBC2DPPAWUYYUAOFWaxInaTwTQmc7Fl5La7DShTEpmYwgdt2hG+4TEg==} + '@rollup/rollup-linux-s390x-gnu@4.19.0': + resolution: {integrity: sha512-D6pkaF7OpE7lzlTOFCB2m3Ngzu2ykw40Nka9WmKGUOTS3xcIieHe82slQlNq69sVB04ch73thKYIWz/Ian8DUA==} cpu: [s390x] os: [linux] @@ -1309,8 +1309,8 @@ packages: cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.18.1': - resolution: {integrity: sha512-7O5u/p6oKUFYjRbZkL2FLbwsyoJAjyeXHCU3O4ndvzg2OFO2GinFPSJFGbiwFDaCFc+k7gs9CF243PwdPQFh5g==} + '@rollup/rollup-linux-x64-gnu@4.19.0': + resolution: {integrity: sha512-HBndjQLP8OsdJNSxpNIN0einbDmRFg9+UQeZV1eiYupIRuZsDEoeGU43NQsS34Pp166DtwQOnpcbV/zQxM+rWA==} cpu: [x64] os: [linux] @@ -1319,8 +1319,8 @@ packages: cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.18.1': - resolution: {integrity: sha512-pDLkYITdYrH/9Cv/Vlj8HppDuLMDUBmgsM0+N+xLtFd18aXgM9Nyqupb/Uw+HeidhfYg2lD6CXvz6CjoVOaKjQ==} + '@rollup/rollup-linux-x64-musl@4.19.0': + resolution: {integrity: sha512-HxfbvfCKJe/RMYJJn0a12eiOI9OOtAUF4G6ozrFUK95BNyoJaSiBjIOHjZskTUffUrB84IPKkFG9H9nEvJGW6A==} cpu: [x64] os: [linux] @@ -1329,8 +1329,8 @@ packages: cpu: [arm64] os: [win32] - '@rollup/rollup-win32-arm64-msvc@4.18.1': - resolution: {integrity: sha512-W2ZNI323O/8pJdBGil1oCauuCzmVd9lDmWBBqxYZcOqWD6aWqJtVBQ1dFrF4dYpZPks6F+xCZHfzG5hYlSHZ6g==} + '@rollup/rollup-win32-arm64-msvc@4.19.0': + resolution: {integrity: sha512-HxDMKIhmcguGTiP5TsLNolwBUK3nGGUEoV/BO9ldUBoMLBssvh4J0X8pf11i1fTV7WShWItB1bKAKjX4RQeYmg==} cpu: [arm64] os: [win32] @@ -1339,8 +1339,8 @@ packages: cpu: [ia32] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.18.1': - resolution: {integrity: sha512-ELfEX1/+eGZYMaCIbK4jqLxO1gyTSOIlZr6pbC4SRYFaSIDVKOnZNMdoZ+ON0mrFDp4+H5MhwNC1H/AhE3zQLg==} + '@rollup/rollup-win32-ia32-msvc@4.19.0': + resolution: {integrity: sha512-xItlIAZZaiG/u0wooGzRsx11rokP4qyc/79LkAOdznGRAbOFc+SfEdfUOszG1odsHNgwippUJavag/+W/Etc6Q==} cpu: [ia32] os: [win32] @@ -1349,8 +1349,8 @@ packages: cpu: [x64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.18.1': - resolution: {integrity: sha512-yjk2MAkQmoaPYCSu35RLJ62+dz358nE83VfTePJRp8CG7aMg25mEJYpXFiD+NcevhX8LxD5OP5tktPXnXN7GDw==} + '@rollup/rollup-win32-x64-msvc@4.19.0': + resolution: {integrity: sha512-xNo5fV5ycvCCKqiZcpB65VMR11NJB+StnxHz20jdqRAktfdfzhgjTiJ2doTDQE/7dqGaV5I7ZGqKpgph6lCIag==} cpu: [x64] os: [win32] @@ -1435,8 +1435,8 @@ packages: '@types/web-bluetooth@0.0.20': resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} - '@typescript-eslint/eslint-plugin@7.16.1': - resolution: {integrity: sha512-SxdPak/5bO0EnGktV05+Hq8oatjAYVY3Zh2bye9pGZy6+jwyR3LG3YKkV4YatlsgqXP28BTeVm9pqwJM96vf2A==} + '@typescript-eslint/eslint-plugin@7.17.0': + resolution: {integrity: sha512-pyiDhEuLM3PuANxH7uNYan1AaFs5XE0zw1hq69JBvGvE7gSuEoQl1ydtEe/XQeoC3GQxLXyOVa5kNOATgM638A==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -1446,8 +1446,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@7.16.1': - resolution: {integrity: sha512-u+1Qx86jfGQ5i4JjK33/FnawZRpsLxRnKzGE6EABZ40KxVT/vWsiZFEBBHjFOljmmV3MBYOHEKi0Jm9hbAOClA==} + '@typescript-eslint/parser@7.17.0': + resolution: {integrity: sha512-puiYfGeg5Ydop8eusb/Hy1k7QmOU6X3nvsqCgzrB2K4qMavK//21+PzNE8qeECgNOIoertJPUC1SpegHDI515A==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1456,12 +1456,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@7.16.1': - resolution: {integrity: sha512-nYpyv6ALte18gbMz323RM+vpFpTjfNdyakbf3nsLvF43uF9KeNC289SUEW3QLZ1xPtyINJ1dIsZOuWuSRIWygw==} + '@typescript-eslint/scope-manager@7.17.0': + resolution: {integrity: sha512-0P2jTTqyxWp9HiKLu/Vemr2Rg1Xb5B7uHItdVZ6iAenXmPo4SZ86yOPCJwMqpCyaMiEHTNqizHfsbmCFT1x9SA==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/type-utils@7.16.1': - resolution: {integrity: sha512-rbu/H2MWXN4SkjIIyWcmYBjlp55VT+1G3duFOIukTNFxr9PI35pLc2ydwAfejCEitCv4uztA07q0QWanOHC7dA==} + '@typescript-eslint/type-utils@7.17.0': + resolution: {integrity: sha512-XD3aaBt+orgkM/7Cei0XNEm1vwUxQ958AOLALzPlbPqb8C1G8PZK85tND7Jpe69Wualri81PLU+Zc48GVKIMMA==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1470,12 +1470,12 @@ packages: typescript: optional: true - '@typescript-eslint/types@7.16.1': - resolution: {integrity: sha512-AQn9XqCzUXd4bAVEsAXM/Izk11Wx2u4H3BAfQVhSfzfDOm/wAON9nP7J5rpkCxts7E5TELmN845xTUCQrD1xIQ==} + '@typescript-eslint/types@7.17.0': + resolution: {integrity: sha512-a29Ir0EbyKTKHnZWbNsrc/gqfIBqYPwj3F2M+jWE/9bqfEHg0AMtXzkbUkOG6QgEScxh2+Pz9OXe11jHDnHR7A==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/typescript-estree@7.16.1': - resolution: {integrity: sha512-0vFPk8tMjj6apaAZ1HlwM8w7jbghC8jc1aRNJG5vN8Ym5miyhTQGMqU++kuBFDNKe9NcPeZ6x0zfSzV8xC1UlQ==} + '@typescript-eslint/typescript-estree@7.17.0': + resolution: {integrity: sha512-72I3TGq93t2GoSBWI093wmKo0n6/b7O4j9o8U+f65TVD0FS6bI2180X5eGEr8MA8PhKMvYe9myZJquUT2JkCZw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' @@ -1483,14 +1483,14 @@ packages: typescript: optional: true - '@typescript-eslint/utils@7.16.1': - resolution: {integrity: sha512-WrFM8nzCowV0he0RlkotGDujx78xudsxnGMBHI88l5J8wEhED6yBwaSLP99ygfrzAjsQvcYQ94quDwI0d7E1fA==} + '@typescript-eslint/utils@7.17.0': + resolution: {integrity: sha512-r+JFlm5NdB+JXc7aWWZ3fKSm1gn0pkswEwIYsrGPdsT2GjsRATAKXiNtp3vgAAO1xZhX8alIOEQnNMl3kbTgJw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 - '@typescript-eslint/visitor-keys@7.16.1': - resolution: {integrity: sha512-Qlzzx4sE4u3FsHTPQAAQFJFNOuqtuY0LFrZHwQ8IHK705XxBiWOFkfKRWu6niB7hwfgnwIpO4jTC75ozW1PHWg==} + '@typescript-eslint/visitor-keys@7.17.0': + resolution: {integrity: sha512-RVGC9UhPOCsfCdI9pU++K4nD7to+jTcMIbXTSOcrLqUEW6gF2pU1UUbYJKc9cvcRSK1UDeMJ7pdMxf4bhMpV/A==} engines: {node: ^18.18.0 || >=20.0.0} '@ungap/structured-clone@1.2.0': @@ -1589,23 +1589,23 @@ packages: vite: ^5.0.0 vue: ^3.2.25 - '@vitest/expect@2.0.3': - resolution: {integrity: sha512-X6AepoOYePM0lDNUPsGXTxgXZAl3EXd0GYe/MZyVE4HzkUqyUVC6S3PrY5mClDJ6/7/7vALLMV3+xD/Ko60Hqg==} + '@vitest/expect@2.0.4': + resolution: {integrity: sha512-39jr5EguIoanChvBqe34I8m1hJFI4+jxvdOpD7gslZrVQBKhh8H9eD7J/LJX4zakrw23W+dITQTDqdt43xVcJw==} - '@vitest/pretty-format@2.0.3': - resolution: {integrity: sha512-URM4GLsB2xD37nnTyvf6kfObFafxmycCL8un3OC9gaCs5cti2u+5rJdIflZ2fUJUen4NbvF6jCufwViAFLvz1g==} + '@vitest/pretty-format@2.0.4': + resolution: {integrity: sha512-RYZl31STbNGqf4l2eQM1nvKPXE0NhC6Eq0suTTePc4mtMQ1Fn8qZmjV4emZdEdG2NOWGKSCrHZjmTqDCDoeFBw==} - '@vitest/runner@2.0.3': - resolution: {integrity: sha512-EmSP4mcjYhAcuBWwqgpjR3FYVeiA4ROzRunqKltWjBfLNs1tnMLtF+qtgd5ClTwkDP6/DGlKJTNa6WxNK0bNYQ==} + '@vitest/runner@2.0.4': + resolution: {integrity: sha512-Gk+9Su/2H2zNfNdeJR124gZckd5st4YoSuhF1Rebi37qTXKnqYyFCd9KP4vl2cQHbtuVKjfEKrNJxHHCW8thbQ==} - '@vitest/snapshot@2.0.3': - resolution: {integrity: sha512-6OyA6v65Oe3tTzoSuRPcU6kh9m+mPL1vQ2jDlPdn9IQoUxl8rXhBnfICNOC+vwxWY684Vt5UPgtcA2aPFBb6wg==} + '@vitest/snapshot@2.0.4': + resolution: {integrity: sha512-or6Mzoz/pD7xTvuJMFYEtso1vJo1S5u6zBTinfl+7smGUhqybn6VjzCDMhmTyVOFWwkCMuNjmNNxnyXPgKDoPw==} - '@vitest/spy@2.0.3': - resolution: {integrity: sha512-sfqyAw/ypOXlaj4S+w8689qKM1OyPOqnonqOc9T91DsoHbfN5mU7FdifWWv3MtQFf0lEUstEwR9L/q/M390C+A==} + '@vitest/spy@2.0.4': + resolution: {integrity: sha512-uTXU56TNoYrTohb+6CseP8IqNwlNdtPwEO0AWl+5j7NelS6x0xZZtP0bDWaLvOfUbaYwhhWp1guzXUxkC7mW7Q==} - '@vitest/utils@2.0.3': - resolution: {integrity: sha512-c/UdELMuHitQbbc/EVctlBaxoYAwQPQdSNwv7z/vHyBKy2edYZaFgptE27BRueZB7eW8po+cllotMNTDpL3HWg==} + '@vitest/utils@2.0.4': + resolution: {integrity: sha512-Zc75QuuoJhOBnlo99ZVUkJIuq4Oj0zAkrQ2VzCqNCx6wAwViHEh5Fnp4fiJTE9rA+sAoXRf00Z9xGgfEzV6fzQ==} '@vscode/vsce-sign-alpine-arm64@2.0.2': resolution: {integrity: sha512-E80YvqhtZCLUv3YAf9+tIbbqoinWLCO/B3j03yQPbjT3ZIHCliKZlsy1peNc4XNZ5uIb87Jn0HWx/ZbPXviuAQ==} @@ -1655,8 +1655,8 @@ packages: '@vscode/vsce-sign@2.0.4': resolution: {integrity: sha512-0uL32egStKYfy60IqnynAChMTbL0oqpqk0Ew0YHiIb+fayuGZWADuIPHWUcY1GCnAA+VgchOPDMxnc2R3XGWEA==} - '@vscode/vsce@2.31.0': - resolution: {integrity: sha512-iZvx9Vn3E81BCwZUAFctQyVxJE09LJ/nLHLGVZmKB5Pjtn62EgjWfJupehmWGmRYMS6ViK+7q7ysNrjxNFhh1g==} + '@vscode/vsce@2.31.1': + resolution: {integrity: sha512-LwEQFKXV21C4/brvGPH/9+7ZOUM5cbK7oJ4fVmy0YG75NIy1HV8eMSoBZrl+u23NxpAhor62Cu1aI+JFtCtjSg==} engines: {node: '>= 16'} hasBin: true @@ -2934,8 +2934,8 @@ packages: humanize-ms@1.2.1: resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} - husky@9.1.0: - resolution: {integrity: sha512-8XCjbomYTGdNF2h50dio3T3zghmZ9f/ZNzr99YwSkvDdhEjJGs5qzy8tbFx+SG8yCx2wn9nMVfZxVrr/yT8gNQ==} + husky@9.1.1: + resolution: {integrity: sha512-fCqlqLXcBnXa/TJXmT93/A36tJsjdJkibQ1MuIiFyCCYUlpYpIaj2mv1w+3KR6Rzu1IC3slFTje5f6DUp2A2rg==} engines: {node: '>=18'} hasBin: true @@ -3156,10 +3156,6 @@ packages: resolution: {integrity: sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==} engines: {node: 20 || >=22} - jiti@1.21.0: - resolution: {integrity: sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==} - hasBin: true - jiti@1.21.6: resolution: {integrity: sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==} hasBin: true @@ -3246,8 +3242,8 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - knip@5.26.0: - resolution: {integrity: sha512-vOp+Wk86aqlPwElrUpxXyg6Q8w+j0j6wuzyu5p6k/mBWUI8iP91PCAz1Jzz9PGq5JYdptV7rFBYB9vHr7AFgqg==} + knip@5.27.0: + resolution: {integrity: sha512-W8+jhO7i5pXRUqOzhJGm2DT5/d9aQjyrYTCSojqJxFOvi7ku/nHKzpBO3WNf4eflJo0t3zitmUkM69g53qoZQw==} engines: {node: '>=18.6.0'} hasBin: true peerDependencies: @@ -3419,7 +3415,21 @@ packages: langsmith@0.1.36: resolution: {integrity: sha512-D5hhkFl31uxFdffx0lA6pin0lt8Pv2dpHFZYpSgEzvQ26PQ/Y/tnniQ+aCNokIXuLhMa7uqLtb6tfwjfiZXgdg==} peerDependencies: - '@langchain/core': 0.2.17 + '@langchain/core': 0.2.18 + langchain: '*' + openai: '*' + peerDependenciesMeta: + '@langchain/core': + optional: true + langchain: + optional: true + openai: + optional: true + + langsmith@0.1.39: + resolution: {integrity: sha512-K2/qbc96JhrZbSL74RbZ0DBOpTB9Mxicu8RQrZ88Xsp1bH2O3+y5EdcvC0g/1YzQWQhcQ4peknCA24c3VTNiNA==} + peerDependencies: + '@langchain/core': 0.2.18 langchain: '*' openai: '*' peerDependenciesMeta: @@ -3982,8 +3992,8 @@ packages: engines: {node: '>=18'} hasBin: true - pnpm@9.5.0: - resolution: {integrity: sha512-FAA2gwEkYY1iSiGHtQ0EKJ1aCH8ybJ7fwMzXM9dsT1LDoxPU/BSHlKKp2BVTAWAE5nQujPhQZwJopzh/wiDJAw==} + pnpm@9.6.0: + resolution: {integrity: sha512-ONxvuo26NbOTQLlwARLC/h4S8QsXE0cVpKqYzPe7A152/Zgc8Ls4TfqY+NavVIHCvvL0Jmokv6IMNOtxR84LXg==} engines: {node: '>=18.12'} hasBin: true @@ -4147,8 +4157,8 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true - rollup@4.18.1: - resolution: {integrity: sha512-Elx2UT8lzxxOXMpy5HWQGZqkrQOtrVDDa/bm9l10+U4rQnVzbL/LgZ4NOM1MPIDyHk69W4InuYDF5dzRh4Kw1A==} + rollup@4.19.0: + resolution: {integrity: sha512-5r7EYSQIowHsK4eTZ0Y81qpZuJz+MUuYeqmmYmRMl1nwhdmbiYqt5jwzf6u7wyOzJgYqtCRMtVRKOtHANBz7rA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -4466,9 +4476,9 @@ packages: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} - tmp@0.2.1: - resolution: {integrity: sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==} - engines: {node: '>=8.17.0'} + tmp@0.2.3: + resolution: {integrity: sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==} + engines: {node: '>=14.14'} to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} @@ -4507,8 +4517,8 @@ packages: tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - tsup@8.1.2: - resolution: {integrity: sha512-Gzw/PXSX/z0aYMNmkcI54bKKFVFJQbLne+EqTJZeQ3lNT3QpumjtMU4rl+ZwTTp8oRF3ahMbEAxT2sZPJLFSrg==} + tsup@8.2.2: + resolution: {integrity: sha512-MufIuzdSt6HYPOeOtjUXLR4rqRJySi6XsRNZdwvjC2XR+xghsu2L3vSmYmX+k4S1mO6j0OlUEyVQ3Fc0H66XcA==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -4603,8 +4613,8 @@ packages: undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - undici@6.19.2: - resolution: {integrity: sha512-JfjKqIauur3Q6biAtHJ564e3bWa8VvT+7cSiOJHFbX4Erv6CLGDpg8z+Fmg/1OI/47RA+GI2QZaF48SSaLvyBA==} + undici@6.19.4: + resolution: {integrity: sha512-i3uaEUwNdkRq2qtTRRJb13moW5HWqviu7Vl7oYRYz++uPtGHJj+x7TGjcEuwS5Mt2P4nA0U9dhIX3DdB6JGY0g==} engines: {node: '>=18.17'} unicorn-magic@0.1.0: @@ -4660,8 +4670,8 @@ packages: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} hasBin: true - vite-node@2.0.3: - resolution: {integrity: sha512-14jzwMx7XTcMB+9BhGQyoEAmSl0eOr3nrnn+Z12WNERtOvLN+d2scbRUvyni05rT3997Bg+rZb47NyP4IQPKXg==} + vite-node@2.0.4: + resolution: {integrity: sha512-ZpJVkxcakYtig5iakNeL7N3trufe3M6vGuzYAr4GsbCTwobDeyPJpE4cjDhhPluv8OvQCFzu2LWp6GkoKRITXA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -4705,15 +4715,15 @@ packages: postcss: optional: true - vitest@2.0.3: - resolution: {integrity: sha512-o3HRvU93q6qZK4rI2JrhKyZMMuxg/JRt30E6qeQs6ueaiz5hr1cPj+Sk2kATgQzMMqsa2DiNI0TIK++1ULx8Jw==} + vitest@2.0.4: + resolution: {integrity: sha512-luNLDpfsnxw5QSW4bISPe6tkxVvv5wn2BBs/PuDRkhXZ319doZyLOBr1sjfB5yCEpTiU7xCAdViM8TNVGPwoog==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 2.0.3 - '@vitest/ui': 2.0.3 + '@vitest/browser': 2.0.4 + '@vitest/ui': 2.0.4 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -4803,8 +4813,8 @@ packages: engines: {node: '>= 8'} hasBin: true - why-is-node-running@2.2.2: - resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} engines: {node: '>=8'} hasBin: true @@ -5806,7 +5816,7 @@ snapshots: '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.3.5 espree: 9.6.1 globals: 13.24.0 ignore: 5.3.1 @@ -5822,7 +5832,7 @@ snapshots: '@humanwhocodes/config-array@0.11.14': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.4 + debug: 4.3.5 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -5902,7 +5912,7 @@ snapshots: '@langchain/anthropic@0.2.6(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3)': dependencies: '@anthropic-ai/sdk': 0.22.0 - '@langchain/core': 0.2.17(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) + '@langchain/core': 0.2.18(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) fast-xml-parser: 4.4.0 zod: 3.23.8 zod-to-json-schema: 3.22.5(zod@3.23.8) @@ -5911,13 +5921,13 @@ snapshots: - langchain - openai - '@langchain/core@0.2.17(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3)': + '@langchain/core@0.2.18(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3)': dependencies: ansi-styles: 5.2.0 camelcase: 6.3.0 decamelize: 1.2.0 js-tiktoken: 1.0.12 - langsmith: 0.1.36(@langchain/core@0.2.17(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3))(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) + langsmith: 0.1.39(@langchain/core@0.2.18(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3))(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) ml-distance: 4.0.1 mustache: 4.2.0 p-queue: 6.6.2 @@ -5931,7 +5941,7 @@ snapshots: '@langchain/openai@0.2.4(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))': dependencies: - '@langchain/core': 0.2.17(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) + '@langchain/core': 0.2.18(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) js-tiktoken: 1.0.12 openai: 4.52.3 zod: 3.23.8 @@ -5942,7 +5952,7 @@ snapshots: '@langchain/textsplitters@0.0.3(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3)': dependencies: - '@langchain/core': 0.2.17(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) + '@langchain/core': 0.2.18(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) js-tiktoken: 1.0.12 transitivePeerDependencies: - langchain @@ -5967,108 +5977,108 @@ snapshots: '@polka/url@1.0.0-next.25': {} - '@rollup/pluginutils@5.1.0(rollup@4.18.1)': + '@rollup/pluginutils@5.1.0(rollup@4.19.0)': dependencies: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 4.18.1 + rollup: 4.19.0 '@rollup/rollup-android-arm-eabi@4.17.2': optional: true - '@rollup/rollup-android-arm-eabi@4.18.1': + '@rollup/rollup-android-arm-eabi@4.19.0': optional: true '@rollup/rollup-android-arm64@4.17.2': optional: true - '@rollup/rollup-android-arm64@4.18.1': + '@rollup/rollup-android-arm64@4.19.0': optional: true '@rollup/rollup-darwin-arm64@4.17.2': optional: true - '@rollup/rollup-darwin-arm64@4.18.1': + '@rollup/rollup-darwin-arm64@4.19.0': optional: true '@rollup/rollup-darwin-x64@4.17.2': optional: true - '@rollup/rollup-darwin-x64@4.18.1': + '@rollup/rollup-darwin-x64@4.19.0': optional: true '@rollup/rollup-linux-arm-gnueabihf@4.17.2': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.18.1': + '@rollup/rollup-linux-arm-gnueabihf@4.19.0': optional: true '@rollup/rollup-linux-arm-musleabihf@4.17.2': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.18.1': + '@rollup/rollup-linux-arm-musleabihf@4.19.0': optional: true '@rollup/rollup-linux-arm64-gnu@4.17.2': optional: true - '@rollup/rollup-linux-arm64-gnu@4.18.1': + '@rollup/rollup-linux-arm64-gnu@4.19.0': optional: true '@rollup/rollup-linux-arm64-musl@4.17.2': optional: true - '@rollup/rollup-linux-arm64-musl@4.18.1': + '@rollup/rollup-linux-arm64-musl@4.19.0': optional: true '@rollup/rollup-linux-powerpc64le-gnu@4.17.2': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.18.1': + '@rollup/rollup-linux-powerpc64le-gnu@4.19.0': optional: true '@rollup/rollup-linux-riscv64-gnu@4.17.2': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.18.1': + '@rollup/rollup-linux-riscv64-gnu@4.19.0': optional: true '@rollup/rollup-linux-s390x-gnu@4.17.2': optional: true - '@rollup/rollup-linux-s390x-gnu@4.18.1': + '@rollup/rollup-linux-s390x-gnu@4.19.0': optional: true '@rollup/rollup-linux-x64-gnu@4.17.2': optional: true - '@rollup/rollup-linux-x64-gnu@4.18.1': + '@rollup/rollup-linux-x64-gnu@4.19.0': optional: true '@rollup/rollup-linux-x64-musl@4.17.2': optional: true - '@rollup/rollup-linux-x64-musl@4.18.1': + '@rollup/rollup-linux-x64-musl@4.19.0': optional: true '@rollup/rollup-win32-arm64-msvc@4.17.2': optional: true - '@rollup/rollup-win32-arm64-msvc@4.18.1': + '@rollup/rollup-win32-arm64-msvc@4.19.0': optional: true '@rollup/rollup-win32-ia32-msvc@4.17.2': optional: true - '@rollup/rollup-win32-ia32-msvc@4.18.1': + '@rollup/rollup-win32-ia32-msvc@4.19.0': optional: true '@rollup/rollup-win32-x64-msvc@4.17.2': optional: true - '@rollup/rollup-win32-x64-msvc@4.18.1': + '@rollup/rollup-win32-x64-msvc@4.19.0': optional: true '@sec-ant/readable-stream@0.4.1': {} @@ -6155,14 +6165,14 @@ snapshots: '@types/web-bluetooth@0.0.20': {} - '@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/eslint-plugin@7.17.0(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.16.1(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 7.16.1 - '@typescript-eslint/type-utils': 7.16.1(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.16.1 + '@typescript-eslint/parser': 7.17.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.17.0 + '@typescript-eslint/type-utils': 7.17.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.17.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.17.0 eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 @@ -6173,12 +6183,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5)': dependencies: - '@typescript-eslint/scope-manager': 7.16.1 - '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/typescript-estree': 7.16.1(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.16.1 + '@typescript-eslint/scope-manager': 7.17.0 + '@typescript-eslint/types': 7.17.0 + '@typescript-eslint/typescript-estree': 7.17.0(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.17.0 debug: 4.3.5 eslint: 8.57.0 optionalDependencies: @@ -6186,15 +6196,15 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@7.16.1': + '@typescript-eslint/scope-manager@7.17.0': dependencies: - '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/visitor-keys': 7.16.1 + '@typescript-eslint/types': 7.17.0 + '@typescript-eslint/visitor-keys': 7.17.0 - '@typescript-eslint/type-utils@7.16.1(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/type-utils@7.17.0(eslint@8.57.0)(typescript@5.4.5)': dependencies: - '@typescript-eslint/typescript-estree': 7.16.1(typescript@5.4.5) - '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 7.17.0(typescript@5.4.5) + '@typescript-eslint/utils': 7.17.0(eslint@8.57.0)(typescript@5.4.5) debug: 4.3.5 eslint: 8.57.0 ts-api-utils: 1.3.0(typescript@5.4.5) @@ -6203,12 +6213,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/types@7.16.1': {} + '@typescript-eslint/types@7.17.0': {} - '@typescript-eslint/typescript-estree@7.16.1(typescript@5.4.5)': + '@typescript-eslint/typescript-estree@7.17.0(typescript@5.4.5)': dependencies: - '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/visitor-keys': 7.16.1 + '@typescript-eslint/types': 7.17.0 + '@typescript-eslint/visitor-keys': 7.17.0 debug: 4.3.5 globby: 11.1.0 is-glob: 4.0.3 @@ -6220,38 +6230,38 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.16.1(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/utils@7.17.0(eslint@8.57.0)(typescript@5.4.5)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@typescript-eslint/scope-manager': 7.16.1 - '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/typescript-estree': 7.16.1(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.17.0 + '@typescript-eslint/types': 7.17.0 + '@typescript-eslint/typescript-estree': 7.17.0(typescript@5.4.5) eslint: 8.57.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/visitor-keys@7.16.1': + '@typescript-eslint/visitor-keys@7.17.0': dependencies: - '@typescript-eslint/types': 7.16.1 + '@typescript-eslint/types': 7.17.0 eslint-visitor-keys: 3.4.3 '@ungap/structured-clone@1.2.0': {} - '@unocss/astro@0.61.5(rollup@4.18.1)(vite@5.3.4(@types/node@20.14.11))': + '@unocss/astro@0.61.5(rollup@4.19.0)(vite@5.3.4(@types/node@20.14.11))': dependencies: '@unocss/core': 0.61.5 '@unocss/reset': 0.61.5 - '@unocss/vite': 0.61.5(rollup@4.18.1)(vite@5.3.4(@types/node@20.14.11)) + '@unocss/vite': 0.61.5(rollup@4.19.0)(vite@5.3.4(@types/node@20.14.11)) optionalDependencies: vite: 5.3.4(@types/node@20.14.11) transitivePeerDependencies: - rollup - '@unocss/cli@0.61.5(rollup@4.18.1)': + '@unocss/cli@0.61.5(rollup@4.19.0)': dependencies: '@ampproject/remapping': 2.3.0 - '@rollup/pluginutils': 5.1.0(rollup@4.18.1) + '@rollup/pluginutils': 5.1.0(rollup@4.19.0) '@unocss/config': 0.61.5 '@unocss/core': 0.61.5 '@unocss/preset-uno': 0.61.5 @@ -6375,10 +6385,10 @@ snapshots: dependencies: '@unocss/core': 0.61.5 - '@unocss/vite@0.61.5(rollup@4.18.1)(vite@5.3.4(@types/node@20.14.11))': + '@unocss/vite@0.61.5(rollup@4.19.0)(vite@5.3.4(@types/node@20.14.11))': dependencies: '@ampproject/remapping': 2.3.0 - '@rollup/pluginutils': 5.1.0(rollup@4.18.1) + '@rollup/pluginutils': 5.1.0(rollup@4.19.0) '@unocss/config': 0.61.5 '@unocss/core': 0.61.5 '@unocss/inspector': 0.61.5 @@ -6396,35 +6406,35 @@ snapshots: vite: 5.3.4(@types/node@20.14.11) vue: 3.4.33(typescript@5.4.5) - '@vitest/expect@2.0.3': + '@vitest/expect@2.0.4': dependencies: - '@vitest/spy': 2.0.3 - '@vitest/utils': 2.0.3 + '@vitest/spy': 2.0.4 + '@vitest/utils': 2.0.4 chai: 5.1.1 tinyrainbow: 1.2.0 - '@vitest/pretty-format@2.0.3': + '@vitest/pretty-format@2.0.4': dependencies: tinyrainbow: 1.2.0 - '@vitest/runner@2.0.3': + '@vitest/runner@2.0.4': dependencies: - '@vitest/utils': 2.0.3 + '@vitest/utils': 2.0.4 pathe: 1.1.2 - '@vitest/snapshot@2.0.3': + '@vitest/snapshot@2.0.4': dependencies: - '@vitest/pretty-format': 2.0.3 + '@vitest/pretty-format': 2.0.4 magic-string: 0.30.10 pathe: 1.1.2 - '@vitest/spy@2.0.3': + '@vitest/spy@2.0.4': dependencies: tinyspy: 3.0.0 - '@vitest/utils@2.0.3': + '@vitest/utils@2.0.4': dependencies: - '@vitest/pretty-format': 2.0.3 + '@vitest/pretty-format': 2.0.4 estree-walker: 3.0.3 loupe: 3.1.1 tinyrainbow: 1.2.0 @@ -6468,7 +6478,7 @@ snapshots: '@vscode/vsce-sign-win32-arm64': 2.0.2 '@vscode/vsce-sign-win32-x64': 2.0.2 - '@vscode/vsce@2.31.0': + '@vscode/vsce@2.31.1': dependencies: '@azure/identity': 4.3.0 '@vscode/vsce-sign': 2.0.4 @@ -6478,7 +6488,7 @@ snapshots: cockatiel: 3.1.3 commander: 6.2.1 form-data: 4.0.0 - glob: 7.2.3 + glob: 11.0.0 hosted-git-info: 4.1.0 jsonc-parser: 3.2.0 leven: 3.1.0 @@ -6488,7 +6498,7 @@ snapshots: parse-semver: 1.1.1 read: 1.0.7 semver: 7.6.2 - tmp: 0.2.1 + tmp: 0.2.3 typed-rest-client: 1.8.11 url-join: 4.0.1 xml2js: 0.5.0 @@ -7040,7 +7050,7 @@ snapshots: dependencies: '@types/node': 20.14.11 cosmiconfig: 9.0.0(typescript@5.4.5) - jiti: 1.21.0 + jiti: 1.21.6 typescript: 5.4.5 cosmiconfig@9.0.0(typescript@5.4.5): @@ -7418,21 +7428,21 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0))(eslint@8.57.0): + eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0))(eslint@8.57.0): dependencies: confusing-browser-globals: 1.0.11 eslint: 8.57.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) object.assign: 4.1.5 object.entries: 1.1.8 semver: 6.3.1 - eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0))(eslint@8.57.0): + eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@7.17.0(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0))(eslint@8.57.0): dependencies: - '@typescript-eslint/eslint-plugin': 7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': 7.16.1(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/eslint-plugin': 7.17.0(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.17.0(eslint@8.57.0)(typescript@5.4.5) eslint: 8.57.0 - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0))(eslint@8.57.0) + eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0))(eslint@8.57.0) transitivePeerDependencies: - eslint-plugin-import @@ -7440,9 +7450,9 @@ snapshots: dependencies: eslint: 8.57.0 - eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)): + eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)): dependencies: - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-import-resolver-node@0.3.9: dependencies: @@ -7452,13 +7462,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@8.57.0): + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@8.57.0): dependencies: debug: 4.3.4 enhanced-resolve: 5.17.0 eslint: 8.57.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.5 is-core-module: 2.13.1 @@ -7469,18 +7479,18 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.16.1(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.17.0(eslint@8.57.0)(typescript@5.4.5) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@8.57.0) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -7490,7 +7500,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) hasown: 2.0.0 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -7501,7 +7511,7 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 7.16.1(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.17.0(eslint@8.57.0)(typescript@5.4.5) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack @@ -7526,12 +7536,12 @@ snapshots: dependencies: eslint: 8.57.0 - eslint-plugin-unused-imports@3.2.0(@typescript-eslint/eslint-plugin@7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0): + eslint-plugin-unused-imports@3.2.0(@typescript-eslint/eslint-plugin@7.17.0(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0): dependencies: eslint: 8.57.0 eslint-rule-composer: 0.3.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 7.16.1(@typescript-eslint/parser@7.16.1(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/eslint-plugin': 7.17.0(@typescript-eslint/parser@7.17.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) eslint-rule-composer@0.3.0: {} @@ -8033,7 +8043,7 @@ snapshots: dependencies: ms: 2.1.3 - husky@9.1.0: {} + husky@9.1.1: {} iconv-lite@0.4.24: dependencies: @@ -8237,8 +8247,6 @@ snapshots: optionalDependencies: '@pkgjs/parseargs': 0.11.0 - jiti@1.21.0: {} - jiti@1.21.6: {} joycon@3.1.1: {} @@ -8330,7 +8338,7 @@ snapshots: dependencies: json-buffer: 3.0.1 - knip@5.26.0(@types/node@20.14.11)(typescript@5.4.5): + knip@5.27.0(@types/node@20.14.11)(typescript@5.4.5): dependencies: '@nodelib/fs.walk': 1.2.8 '@snyk/github-codeowners': 1.1.0 @@ -8355,7 +8363,7 @@ snapshots: langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1): dependencies: - '@langchain/core': 0.2.17(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) + '@langchain/core': 0.2.18(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) '@langchain/openai': 0.2.4(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1)) '@langchain/textsplitters': 0.0.3(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) binary-extensions: 2.2.0 @@ -8363,7 +8371,7 @@ snapshots: js-yaml: 4.1.0 jsonpointer: 5.0.1 langchainhub: 0.0.11 - langsmith: 0.1.36(@langchain/core@0.2.17(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3))(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) + langsmith: 0.1.36(@langchain/core@0.2.18(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3))(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) ml-distance: 4.0.1 openapi-types: 12.1.3 p-retry: 4.6.2 @@ -8382,7 +8390,7 @@ snapshots: langchainhub@0.0.11: {} - langsmith@0.1.36(@langchain/core@0.2.17(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3))(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3): + langsmith@0.1.36(@langchain/core@0.2.18(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3))(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3): dependencies: '@types/uuid': 9.0.8 commander: 10.0.1 @@ -8390,7 +8398,19 @@ snapshots: p-retry: 4.6.2 uuid: 9.0.1 optionalDependencies: - '@langchain/core': 0.2.17(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) + '@langchain/core': 0.2.18(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) + langchain: 0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1) + openai: 4.52.3 + + langsmith@0.1.39(@langchain/core@0.2.18(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3))(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3): + dependencies: + '@types/uuid': 9.0.8 + commander: 10.0.1 + p-queue: 6.6.2 + p-retry: 4.6.2 + uuid: 9.0.1 + optionalDependencies: + '@langchain/core': 0.2.18(langchain@0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1))(openai@4.52.3) langchain: 0.2.10(cheerio@1.0.0-rc.12)(fast-xml-parser@4.4.0)(ignore@5.3.1)(openai@4.52.3)(playwright@1.45.1) openai: 4.52.3 @@ -8927,7 +8947,7 @@ snapshots: fsevents: 2.3.2 optional: true - pnpm@9.5.0: {} + pnpm@9.6.0: {} possible-typed-array-names@1.0.0: {} @@ -9102,26 +9122,26 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.17.2 fsevents: 2.3.3 - rollup@4.18.1: + rollup@4.19.0: dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.18.1 - '@rollup/rollup-android-arm64': 4.18.1 - '@rollup/rollup-darwin-arm64': 4.18.1 - '@rollup/rollup-darwin-x64': 4.18.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.18.1 - '@rollup/rollup-linux-arm-musleabihf': 4.18.1 - '@rollup/rollup-linux-arm64-gnu': 4.18.1 - '@rollup/rollup-linux-arm64-musl': 4.18.1 - '@rollup/rollup-linux-powerpc64le-gnu': 4.18.1 - '@rollup/rollup-linux-riscv64-gnu': 4.18.1 - '@rollup/rollup-linux-s390x-gnu': 4.18.1 - '@rollup/rollup-linux-x64-gnu': 4.18.1 - '@rollup/rollup-linux-x64-musl': 4.18.1 - '@rollup/rollup-win32-arm64-msvc': 4.18.1 - '@rollup/rollup-win32-ia32-msvc': 4.18.1 - '@rollup/rollup-win32-x64-msvc': 4.18.1 + '@rollup/rollup-android-arm-eabi': 4.19.0 + '@rollup/rollup-android-arm64': 4.19.0 + '@rollup/rollup-darwin-arm64': 4.19.0 + '@rollup/rollup-darwin-x64': 4.19.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.19.0 + '@rollup/rollup-linux-arm-musleabihf': 4.19.0 + '@rollup/rollup-linux-arm64-gnu': 4.19.0 + '@rollup/rollup-linux-arm64-musl': 4.19.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.19.0 + '@rollup/rollup-linux-riscv64-gnu': 4.19.0 + '@rollup/rollup-linux-s390x-gnu': 4.19.0 + '@rollup/rollup-linux-x64-gnu': 4.19.0 + '@rollup/rollup-linux-x64-musl': 4.19.0 + '@rollup/rollup-win32-arm64-msvc': 4.19.0 + '@rollup/rollup-win32-ia32-msvc': 4.19.0 + '@rollup/rollup-win32-x64-msvc': 4.19.0 fsevents: 2.3.3 run-async@2.4.1: {} @@ -9208,7 +9228,7 @@ snapshots: side-channel@1.0.4: dependencies: call-bind: 1.0.7 - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 object-inspect: 1.13.1 siginfo@2.0.0: {} @@ -9430,9 +9450,7 @@ snapshots: dependencies: os-tmpdir: 1.0.2 - tmp@0.2.1: - dependencies: - rimraf: 3.0.2 + tmp@0.2.3: {} to-fast-properties@2.0.0: {} @@ -9465,7 +9483,7 @@ snapshots: tslib@2.6.2: {} - tsup@8.1.2(jiti@1.21.6)(postcss@8.4.39)(tsx@4.10.5)(typescript@5.4.5)(yaml@2.4.5): + tsup@8.2.2(jiti@1.21.6)(postcss@8.4.39)(tsx@4.10.5)(typescript@5.4.5)(yaml@2.4.5): dependencies: bundle-require: 5.0.0(esbuild@0.23.0) cac: 6.7.14 @@ -9476,9 +9494,10 @@ snapshots: execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 + picocolors: 1.0.1 postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.39)(tsx@4.10.5)(yaml@2.4.5) resolve-from: 5.0.0 - rollup: 4.18.1 + rollup: 4.19.0 source-map: 0.8.0-beta.0 sucrase: 3.35.0 tree-kill: 1.2.2 @@ -9580,16 +9599,16 @@ snapshots: undici-types@5.26.5: {} - undici@6.19.2: {} + undici@6.19.4: {} unicorn-magic@0.1.0: {} universalify@2.0.1: {} - unocss@0.61.5(postcss@8.4.39)(rollup@4.18.1)(vite@5.3.4(@types/node@20.14.11)): + unocss@0.61.5(postcss@8.4.39)(rollup@4.19.0)(vite@5.3.4(@types/node@20.14.11)): dependencies: - '@unocss/astro': 0.61.5(rollup@4.18.1)(vite@5.3.4(@types/node@20.14.11)) - '@unocss/cli': 0.61.5(rollup@4.18.1) + '@unocss/astro': 0.61.5(rollup@4.19.0)(vite@5.3.4(@types/node@20.14.11)) + '@unocss/cli': 0.61.5(rollup@4.19.0) '@unocss/core': 0.61.5 '@unocss/extractor-arbitrary-variants': 0.61.5 '@unocss/postcss': 0.61.5(postcss@8.4.39) @@ -9607,7 +9626,7 @@ snapshots: '@unocss/transformer-compile-class': 0.61.5 '@unocss/transformer-directives': 0.61.5 '@unocss/transformer-variant-group': 0.61.5 - '@unocss/vite': 0.61.5(rollup@4.18.1)(vite@5.3.4(@types/node@20.14.11)) + '@unocss/vite': 0.61.5(rollup@4.19.0)(vite@5.3.4(@types/node@20.14.11)) optionalDependencies: vite: 5.3.4(@types/node@20.14.11) transitivePeerDependencies: @@ -9641,7 +9660,7 @@ snapshots: uuid@9.0.1: {} - vite-node@2.0.3(@types/node@20.14.11): + vite-node@2.0.4(@types/node@20.14.11): dependencies: cac: 6.7.14 debug: 4.3.5 @@ -9714,15 +9733,15 @@ snapshots: - typescript - universal-cookie - vitest@2.0.3(@types/node@20.14.11): + vitest@2.0.4(@types/node@20.14.11): dependencies: '@ampproject/remapping': 2.3.0 - '@vitest/expect': 2.0.3 - '@vitest/pretty-format': 2.0.3 - '@vitest/runner': 2.0.3 - '@vitest/snapshot': 2.0.3 - '@vitest/spy': 2.0.3 - '@vitest/utils': 2.0.3 + '@vitest/expect': 2.0.4 + '@vitest/pretty-format': 2.0.4 + '@vitest/runner': 2.0.4 + '@vitest/snapshot': 2.0.4 + '@vitest/spy': 2.0.4 + '@vitest/utils': 2.0.4 chai: 5.1.1 debug: 4.3.5 execa: 8.0.1 @@ -9733,8 +9752,8 @@ snapshots: tinypool: 1.0.0 tinyrainbow: 1.2.0 vite: 5.3.4(@types/node@20.14.11) - vite-node: 2.0.3(@types/node@20.14.11) - why-is-node-running: 2.2.2 + vite-node: 2.0.4(@types/node@20.14.11) + why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 20.14.11 transitivePeerDependencies: @@ -9823,7 +9842,7 @@ snapshots: dependencies: isexe: 2.0.0 - why-is-node-running@2.2.2: + why-is-node-running@2.3.0: dependencies: siginfo: 2.0.0 stackback: 0.0.2 diff --git a/src/commands/code-convert.ts b/src/commands/code-convert.ts index 71f490b..bc7d9ef 100644 --- a/src/commands/code-convert.ts +++ b/src/commands/code-convert.ts @@ -15,16 +15,26 @@ import * as vscode from 'vscode' const buildGeneratePrompt = async ({ sourceLanguageId, targetLanguageId, + targetLanguageDescription, sourceCode }: { sourceLanguageId: string targetLanguageId: string + targetLanguageDescription: string sourceCode: string }): Promise => { const locale = vscode.env.language + + const targetLanguageDescriptionPrompt = targetLanguageDescription + ? ` + For the converted language, my additional notes are as follows: **${targetLanguageDescription}.** + ` + : '' + const prompt = ` You are a programming language converter. You need to help me convert ${sourceLanguageId} code into ${targetLanguageId} code. + ${targetLanguageDescriptionPrompt} All third-party API and third-party dependency names do not need to be changed, as my purpose is only to understand and read, not to run. Please use ${locale} language to add some additional comments as appropriate. Please do not reply with any text other than the code, and do not use markdown syntax. @@ -35,16 +45,21 @@ const buildGeneratePrompt = async ({ return prompt } -const getTargetLanguageId = async (originalFileLanguageId: string) => { +/** + * Get target language info + * if user input custom language like: vue please convert to vue3 + * return { targetLanguageId: 'vue', targetLanguageDescription: 'please convert to vue3' } + */ +const getTargetLanguageInfo = async (originalFileLanguageId: string) => { const convertLanguagePairs = await getConfigKey('convertLanguagePairs', { targetForSet: vscode.ConfigurationTarget.WorkspaceFolder, allowCustomOptionValue: true }) - let targetLanguageId = convertLanguagePairs?.[originalFileLanguageId] || '' + let targetLanguageInfo = convertLanguagePairs?.[originalFileLanguageId] || '' const customLanguageOption = t('info.customLanguage') - if (!targetLanguageId) { - targetLanguageId = + if (!targetLanguageInfo) { + targetLanguageInfo = (await vscode.window.showQuickPick( [customLanguageOption, ...languageIds], { @@ -53,16 +68,16 @@ const getTargetLanguageId = async (originalFileLanguageId: string) => { } )) || '' - if (!targetLanguageId) throw new Error(t('error.noTargetLanguage')) + if (!targetLanguageInfo) throw new Error(t('error.noTargetLanguage')) - if (targetLanguageId === customLanguageOption) { - targetLanguageId = + if (targetLanguageInfo === customLanguageOption) { + targetLanguageInfo = (await vscode.window.showInputBox({ prompt: t('info.customLanguage') })) || '' } - if (!targetLanguageId) throw new Error(t('error.noTargetLanguage')) + if (!targetLanguageInfo) throw new Error(t('error.noTargetLanguage')) const autoRememberConvertLanguagePairs = await getConfigKey( 'autoRememberConvertLanguagePairs' @@ -73,7 +88,7 @@ const getTargetLanguageId = async (originalFileLanguageId: string) => { 'convertLanguagePairs', { ...convertLanguagePairs, - [originalFileLanguageId]: targetLanguageId + [originalFileLanguageId]: targetLanguageInfo }, { targetForSet: vscode.ConfigurationTarget.WorkspaceFolder, @@ -83,7 +98,14 @@ const getTargetLanguageId = async (originalFileLanguageId: string) => { } } - return targetLanguageId + const [targetLanguageId, ...targetLanguageRest] = + targetLanguageInfo.split(/\s+/) + const targetLanguageDescription = targetLanguageRest.join(' ') + + return { + targetLanguageId: targetLanguageId || targetLanguageInfo, + targetLanguageDescription: targetLanguageDescription?.trim() || '' + } } export const cleanupCodeConvertRunnables = async () => { @@ -110,7 +132,8 @@ export const handleCodeConvert = async () => { isTmpFileHasContent } = await createTmpFileInfo() - const targetLanguageId = await getTargetLanguageId(originalFileLanguageId) + const { targetLanguageId, targetLanguageDescription } = + await getTargetLanguageInfo(originalFileLanguageId) // ai const modelProvider = await createModelProvider() @@ -132,6 +155,7 @@ export const handleCodeConvert = async () => { const prompt = await buildGeneratePrompt({ sourceLanguageId: originalFileLanguageId, targetLanguageId, + targetLanguageDescription, sourceCode: originalFileContent }) diff --git a/src/commands/smart-paste.ts b/src/commands/smart-paste.ts index 16f63f9..bc152cc 100644 --- a/src/commands/smart-paste.ts +++ b/src/commands/smart-paste.ts @@ -6,11 +6,15 @@ import { import { getFileOrFoldersPromptInfo } from '@/file-utils/get-fs-prompt-info' import { insertTextAtSelection } from '@/file-utils/insert-text-at-selection' import { streamingCompletionWriter } from '@/file-utils/stream-completion-writer' +import { t } from '@/i18n' +import { cacheFn } from '@/storage' import { getCurrentWorkspaceFolderEditor } from '@/utils' import type { BaseLanguageModelInput } from '@langchain/core/language_models/base' import type { RunnableConfig } from '@langchain/core/runnables' import * as vscode from 'vscode' +const cacheGetReferenceFilePaths = cacheFn(getReferenceFilePaths, 60 * 5) + const buildConvertPrompt = async ({ workspaceFolder, currentFilePath, @@ -23,6 +27,8 @@ const buildConvertPrompt = async ({ // content from clipboard const clipboardContent = await vscode.env.clipboard.readText() + if (!clipboardContent?.trim()) throw new Error(t('error.emptyClipboard')) + // current file content const locationMark = `### Here is the code you need to insert after convert ###` const currentFileContent = await insertTextAtSelection({ @@ -35,7 +41,7 @@ const buildConvertPrompt = async ({ // reference file content const { referenceFileRelativePaths, dependenceFileRelativePath } = - await getReferenceFilePaths({ currentFilePath }) + await cacheGetReferenceFilePaths({ currentFilePath }) const referencePaths = [ ...new Set([dependenceFileRelativePath, ...referenceFileRelativePaths]) ] diff --git a/src/config.ts b/src/config.ts index 44688df..e625e18 100644 --- a/src/config.ts +++ b/src/config.ts @@ -23,7 +23,7 @@ type ConfigValueTypeMap = { type ConfigValueType = keyof ConfigValueTypeMap type ConfigKeyInfo = { type: T - description?: string + markdownDescription?: string default?: ConfigValueTypeMap[T] optional?: boolean options?: string[] @@ -111,7 +111,9 @@ export const getConfigKey = async ( const config = vscode.workspace.getConfiguration('aide', workspaceFolder) const configKeyInfo = { ...configKey[key], - description: translateVscodeJsonText(configKey[key].description) + markdownDescription: translateVscodeJsonText( + configKey[key].markdownDescription + ) } as ConfigKeyInfo const isRequired = required ?? !configKeyInfo.optional type ReturnValue = (typeof configKey)[T]['default'] @@ -152,7 +154,7 @@ export const getConfigKey = async ( inputValue = (await vscode.window.showQuickPick( configKeyInfo.options, { - title: configKeyInfo.description, + title: configKeyInfo.markdownDescription, placeHolder: configKeyInfo.default as string, ignoreFocusOut: true, canPickMany: false @@ -161,7 +163,7 @@ export const getConfigKey = async ( break } else { inputValue = (await vscode.window.showInputBox({ - prompt: configKeyInfo.description, + prompt: configKeyInfo.markdownDescription, placeHolder: String(configKeyInfo.default || ''), ignoreFocusOut: true })) as string | undefined @@ -171,7 +173,7 @@ export const getConfigKey = async ( case 'boolean': inputValue = await vscode.window .showQuickPick(['true', 'false'], { - title: configKeyInfo.description, + title: configKeyInfo.markdownDescription, placeHolder: configKeyInfo.default ? 'true' : 'false', ignoreFocusOut: true }) @@ -181,7 +183,7 @@ export const getConfigKey = async ( case 'array': inputValue = await vscode.window .showInputBox({ - prompt: `${configKeyInfo.description} (${t('input.array.promptEnding')})`, + prompt: `${configKeyInfo.markdownDescription} (${t('input.array.promptEnding')})`, placeHolder: (configKeyInfo.default as string[]).join(', '), ignoreFocusOut: true }) @@ -193,7 +195,7 @@ export const getConfigKey = async ( case 'object': inputValue = await vscode.window .showInputBox({ - prompt: `${configKeyInfo.description} (${t('input.json.promptEnding')})`, + prompt: `${configKeyInfo.markdownDescription} (${t('input.json.promptEnding')})`, placeHolder: JSON.stringify(configKeyInfo.default, null, 2), ignoreFocusOut: true }) @@ -213,7 +215,7 @@ export const getConfigKey = async ( // @ts-ignore inputValue = await vscode.window .showInputBox({ - prompt: configKeyInfo.description, + prompt: configKeyInfo.markdownDescription, placeHolder: String(configKeyInfo.default || ''), ignoreFocusOut: true, validateInput: value => diff --git a/src/index.ts b/src/index.ts index b9dff75..a2f9523 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,6 @@ import * as vscode from 'vscode' +import { BaseModelProvider } from './ai/model-providers/base' import { cleanup } from './cleanup' import { registerCommands } from './commands' import { setContext } from './context' @@ -7,6 +8,7 @@ import { enableGlobalProxy, enableLogFetch } from './enable-global-proxy' import { initializeLocalization } from './i18n' import { logger } from './logger' import { enablePolyfill } from './polyfill' +import { stateStorage } from './storage' export const activate = async (context: vscode.ExtensionContext) => { try { @@ -26,3 +28,11 @@ export const activate = async (context: vscode.ExtensionContext) => { logger.warn('Failed to activate extension', err) } } + +export const deactivate = () => { + // Clear the session history map + BaseModelProvider.sessionIdHistoriesMap = {} + + // Clear the state storage + stateStorage.clear() +} diff --git a/src/storage.ts b/src/storage.ts new file mode 100644 index 0000000..f02e2a6 --- /dev/null +++ b/src/storage.ts @@ -0,0 +1,306 @@ +import { logger } from './logger' + +export interface Storage { + setItem(key: string, value: string): void + getItem(key: string): string | null + removeItem(key: string): void + clear(): void + key(index: number): string | null + readonly length: number +} + +export class StateStorage = Record> + implements Storage +{ + state: T + + createInitState: () => T + + constructor(createInitState: () => T) { + this.createInitState = createInitState + this.state = createInitState() + } + + setItem(key: K, value: T[K]): void { + this.state[key] = value + } + + getItem(key: K): T[K] | null { + return this.state[key] ?? null + } + + removeItem(key: K): void { + delete this.state[key] + } + + clear(): void { + this.state = this.createInitState() + } + + key(index: number): keyof T extends string ? keyof T | null : string | null { + return Object.keys(this.state)[index] as any + } + + get length(): number { + return Object.keys(this.state).length + } +} + +export const stateStorage = new StateStorage>(() => ({})) + +/** + * A class that simulates Redis-like storage functionality using a Storage-like object (e.g., localStorage). + * It provides methods for setting, getting, and managing key-value pairs with optional expiration times. + * + * @class + * @example + * ```typescript + * // Initialize RedisStorage with localStorage + * const redisStorage = new RedisStorage(localStorage); + * + * // Set a value with a 60-second expiration time + * redisStorage.setItem('user:1', JSON.stringify({ name: 'Alice' }), 60); + * + * // Get the value + * const user = JSON.parse(redisStorage.getItem('user:1') || '{}'); + * console.log(user); // { name: 'Alice' } + * + * // Check if the key exists + * console.log(redisStorage.exists('user:1')); // true + * + * // Get the remaining TTL + * console.log(redisStorage.ttl('user:1')); // 59 (or less, depending on when you check) + * + * // Set a new expiration time + * redisStorage.expire('user:1', 120); + * + * // Get all keys + * console.log(redisStorage.keys()); // ['user:1'] + * + * // Remove the item + * redisStorage.removeItem('user:1'); + * + * // Clear all items + * redisStorage.clear(); + * ``` + */ +export class RedisStorage { + private storage: Storage + + /** + * Creates an instance of RedisStorage. + * @param {Storage} storage - A Storage-like object (e.g., localStorage, sessionStorage) + */ + constructor(storage: Storage) { + this.storage = storage + } + + /** + * Sets a key-value pair in the storage, with an optional expiration time. + * @param {string} key - The key to set + * @param {string} value - The value to set + * @param {number} [ttl=0] - Time to live in seconds. 0 means no expiration. + */ + setItem(key: string, value: string, ttl: number = 0): void { + const expiryTime = ttl > 0 ? Date.now() + ttl * 1000 : 0 + const item = { value, expiryTime } + this.storage.setItem(key, JSON.stringify(item)) + } + + /** + * Retrieves the value associated with the given key, or null if the key doesn't exist or has expired. + * @param {string} key - The key to retrieve + * @returns {string | null} The value associated with the key, or null if not found or expired + */ + getItem(key: string): string | null { + const itemStr = this.storage.getItem(key) + if (!itemStr) return null + + try { + const item = JSON.parse(itemStr) + if (item.expiryTime && Date.now() > item.expiryTime) { + this.removeItem(key) + return null + } + + return item.value + } catch (err) { + logger.warn('RedisStorage.getItem', err) + return null + } + } + + /** + * Removes the item associated with the given key. + * @param {string} key - The key to remove + */ + removeItem(key: string): void { + this.storage.removeItem(key) + } + + /** + * Removes all items from the storage. + */ + clear(): void { + this.storage.clear() + } + + /** + * Returns the name of the nth key in the storage. + * @param {number} index - The index of the key to return + * @returns {string | null} The key at the given index, or null if the index is out of range + */ + key(index: number): string | null { + return this.storage.key(index) + } + + /** + * Returns the number of items in the storage. + * @returns {number} The number of items in the storage + */ + get length(): number { + return this.storage.length + } + + /** + * Checks if a key exists and has not expired. + * @param {string} key - The key to check + * @returns {boolean} True if the key exists and has not expired, false otherwise + */ + exists(key: string): boolean { + return this.getItem(key) !== null + } + + /** + * Returns an array of all non-expired keys in the storage. + * @returns {string[]} An array of non-expired keys + */ + keys(): string[] { + const keys: string[] = [] + for (let i = 0; i < this.length; i++) { + const key = this.key(i) + if (key && this.getItem(key) !== null) { + keys.push(key) + } + } + return keys + } + + /** + * Sets a new expiration time for an existing key. + * @param {string} key - The key to update + * @param {number} ttl - The new time to live in seconds + * @returns {boolean} True if the expiration was set, false if the key doesn't exist + */ + expire(key: string, ttl: number): boolean { + const itemStr = this.storage.getItem(key) + if (!itemStr) return false + + try { + const item = JSON.parse(itemStr) + item.expiryTime = Date.now() + ttl * 1000 + this.storage.setItem(key, JSON.stringify(item)) + return true + } catch (e) { + logger.warn('RedisStorage.expire', e) + return false + } + } + + /** + * Returns the remaining time to live of a key that has a timeout. + * @param {string} key - The key to check + * @returns {number | null} The remaining time to live in seconds, -1 if the key exists but has no associated expire, or null if the key does not exist + */ + ttl(key: string): number | null { + const itemStr = this.storage.getItem(key) + if (!itemStr) return null + + const item = JSON.parse(itemStr) + if (!item.expiryTime) return -1 // Never expires + const remainingTime = Math.ceil((item.expiryTime - Date.now()) / 1000) + return remainingTime > 0 ? remainingTime : null + } + + /** + * Removes all expired keys from the storage. + */ + cleanup(): void { + for (let i = 0; i < this.length; i++) { + const key = this.key(i) + if (key) this.getItem(key) // This will automatically remove expired items + } + } +} + +export const redisStorage = new RedisStorage(stateStorage) +/** + * Creates a cached version of a function using RedisStorage. + * + * @template T The type of the function parameters + * @template R The return type of the function + * @param {(...args: T) => R | Promise} fn The function to cache + * @param {number} ttl Time to live for the cache in seconds + * @param {string | ((...args: T) => string)} [keyGenerator] Custom key generator + * @param {RedisStorage} [storage] An instance of RedisStorage + * @returns {(...args: T) => Promise} A new function that caches the result + * + * @example + * ```typescript + * const redisStorage = new RedisStorage(localStorage); + * + * const expensiveCalculation = (a: number, b: number): number => { + * console.log('Performing expensive calculation...'); + * return a + b; + * }; + * + * // Using default key generation + * const cachedCalculation1 = cacheFn(expensiveCalculation, 60); + * + * // Using custom string key + * const cachedCalculation2 = cacheFn(expensiveCalculation, 60, 'myCustomKey'); + * + * // Using custom key generation function + * const cachedCalculation3 = cacheFn( + * expensiveCalculation, + * 60, + * (a, b) => `sum:${a}:${b}` + * ); + * + * // First call - will perform the calculation + * cachedCalculation1(5, 3).then(result => console.log(result)); // 8 + * + * // Second call within 60 seconds - will return cached result + * cachedCalculation1(5, 3).then(result => console.log(result)); // 8 (from cache) + * + * // After 60 seconds, it will perform the calculation again + * ``` + */ +export const cacheFn = + ( + fn: (...args: T) => R | Promise, + ttl: number, + keyGenerator?: string | ((...args: T) => string), + storage: RedisStorage = redisStorage + ): ((...args: T) => Promise) => + async (...args: T): Promise => { + let key: string + + if (typeof keyGenerator === 'string') { + key = keyGenerator + } else if (typeof keyGenerator === 'function') { + key = keyGenerator(...args) + } else { + key = `cache:${fn.name}:${JSON.stringify(args)}` + } + + const cachedResult = storage.getItem(key) + if (cachedResult !== null) { + return JSON.parse(cachedResult) + } + + const result = await fn(...args) + storage.setItem(key, JSON.stringify(result), ttl) + + return result + } diff --git a/website/en/guide/configuration/convert-language-pairs.md b/website/en/guide/configuration/convert-language-pairs.md index ab1ebf8..37fe06a 100644 --- a/website/en/guide/configuration/convert-language-pairs.md +++ b/website/en/guide/configuration/convert-language-pairs.md @@ -9,7 +9,12 @@ By default, the editor will remember your language mapping in the current projec //other settings... "aide.convertLanguagePairs": { "javascript": "python", // Convert javascript to python - "json": "yaml" // Convert json to yaml + "json": "yaml", // Convert json to yaml + "vue": "vue migrate from vue2 to vue3