├── .acode └── pack-zip.js ├── .github └── FUNDING.yml ├── .gitignore ├── License.md ├── build.mjs ├── dist ├── assets │ ├── ai_assistant.svg │ ├── github-dark.css │ ├── highlight.min.js │ ├── markdown-it.min.js │ └── user_avatar.png └── main.js ├── icon.png ├── package.json ├── plugin.json ├── pnpm-lock.yaml ├── readme.md ├── src ├── api_key.js ├── constants.js ├── main.js ├── style.scss └── utils.js └── typings ├── acode.d.ts ├── editorFile.d.ts ├── index.d.ts └── settings.d.ts /.acode/pack-zip.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const fs = require('fs'); 3 | const jszip = require('jszip'); 4 | 5 | const iconFile = path.join(__dirname, '../icon.png'); 6 | const pluginJSON = path.join(__dirname, '../plugin.json'); 7 | const distFolder = path.join(__dirname, '../dist'); 8 | let readmeDotMd = path.join(__dirname, '../readme.md'); 9 | 10 | if (!fs.existsSync(readmeDotMd)) { 11 | readmeDotMd = path.join(__dirname, '../README.md'); 12 | } 13 | 14 | // create zip file of dist folder 15 | 16 | const zip = new jszip(); 17 | 18 | zip.file('icon.png', fs.readFileSync(iconFile)); 19 | zip.file('plugin.json', fs.readFileSync(pluginJSON)); 20 | zip.file('readme.md', fs.readFileSync(readmeDotMd)); 21 | 22 | loadFile('', distFolder); 23 | 24 | zip 25 | .generateNodeStream({ type: 'nodebuffer', streamFiles: true }) 26 | .pipe(fs.createWriteStream(path.join(__dirname, '../AI.zip'))) 27 | .on('finish', () => { 28 | console.log('dist.zip written.'); 29 | }); 30 | 31 | function loadFile(root, folder) { 32 | const distFiles = fs.readdirSync(folder); 33 | distFiles.forEach((file) => { 34 | 35 | const stat = fs.statSync(path.join(folder, file)); 36 | 37 | if (stat.isDirectory()) { 38 | zip.folder(file); 39 | loadFile(path.join(root, file), path.join(folder, file)); 40 | return; 41 | } 42 | 43 | if (!/LICENSE.txt/.test(file)) { 44 | zip.file(path.join(root, file), fs.readFileSync(path.join(folder, file))); 45 | } 46 | }); 47 | } -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: bajrangCoder 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | secrets 3 | AI.zip 4 | -------------------------------------------------------------------------------- /License.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Raunak Raj 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /build.mjs: -------------------------------------------------------------------------------- 1 | import * as esbuild from "esbuild"; 2 | import { sassPlugin } from "esbuild-sass-plugin"; 3 | import { exec } from "child_process"; 4 | 5 | let result = await esbuild.build({ 6 | entryPoints: ["src/main.js"], 7 | bundle: true, 8 | minify: true, 9 | logLevel: "info", 10 | color: true, 11 | outdir: "dist", 12 | plugins: [ 13 | sassPlugin({ 14 | type: "css-text", 15 | }), 16 | ], 17 | }); 18 | 19 | exec("node .acode/pack-zip.js", (err, stdout, stderr) => { 20 | if (err) { 21 | console.error(err); 22 | return; 23 | } 24 | console.log(stdout); 25 | }); 26 | -------------------------------------------------------------------------------- /dist/assets/ai_assistant.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /dist/assets/github-dark.css: -------------------------------------------------------------------------------- 1 | pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*! 2 | Theme: GitHub Dark 3 | Description: Dark theme as seen on github.com 4 | Author: github.com 5 | Maintainer: @Hirse 6 | Updated: 2021-05-15 7 | 8 | Outdated base version: https://github.com/primer/github-syntax-dark 9 | Current colors taken from GitHub's CSS 10 | */.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#79c0ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-code,.hljs-comment,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c} -------------------------------------------------------------------------------- /dist/assets/user_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-chatgpt/e24ebd254c857ee9ab1059c2a74b3463d610e21e/dist/assets/user_avatar.png -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-chatgpt/e24ebd254c857ee9ab1059c2a74b3463d610e21e/icon.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "acode-plugin-ai-assistant", 3 | "version": "2.0.0", 4 | "description": "AI Plugin", 5 | "main": "dist/main.js", 6 | "scripts": { 7 | "build": "node build.mjs" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/bajrangCoders/acode-plugin-chatgpt.git" 12 | }, 13 | "author": "Raunak Raj", 14 | "license": "MIT", 15 | "dependencies": { 16 | "@google/generative-ai": "^0.13.0", 17 | "@langchain/anthropic": "^0.2.6", 18 | "@langchain/community": "^0.2.20", 19 | "@langchain/core": "^0.2.17", 20 | "@langchain/google-genai": "^0.0.16", 21 | "@langchain/groq": "^0.0.12", 22 | "@langchain/mistralai": "^0.0.23", 23 | "@langchain/openai": "^0.1.3", 24 | "blob-util": "^2.0.2", 25 | "copy-to-clipboard": "^3.3.3", 26 | "highlight.js": "^11.10.0", 27 | "html-tag-js": "^1.5.1", 28 | "langchain": "^0.2.10", 29 | "markdown-it": "^13.0.2", 30 | "ollama": "^0.5.6", 31 | "openai": "^3.3.0", 32 | "uuid": "^9.0.1" 33 | }, 34 | "devDependencies": { 35 | "esbuild": "^0.21.5", 36 | "esbuild-sass-plugin": "^3.3.1", 37 | "jszip": "^3.10.1" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "acode.plugin.chatgpt", 3 | "name": "AI Assistant Beta", 4 | "main": "dist/main.js", 5 | "version": "2.0.0", 6 | "readme": "readme.md", 7 | "icon": "icon.png", 8 | "minVersionCode": 290, 9 | "files": [ 10 | "assets/ai_assistant.svg", 11 | "assets/user_avatar.png", 12 | "assets/insert-context.svg", 13 | "assets/github-dark.css", 14 | "assets/highlight.min.js", 15 | "assets/markdown-it.min.js" 16 | ], 17 | "price": 0, 18 | "author": { 19 | "name": "Raunak", 20 | "email": "bajrangcoders@gmail.com", 21 | "github": "bajrangCoder" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- 1 | lockfileVersion: '9.0' 2 | 3 | settings: 4 | autoInstallPeers: true 5 | excludeLinksFromLockfile: false 6 | 7 | importers: 8 | 9 | .: 10 | dependencies: 11 | '@google/generative-ai': 12 | specifier: ^0.13.0 13 | version: 0.13.0 14 | '@langchain/anthropic': 15 | specifier: ^0.2.6 16 | version: 0.2.6(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0) 17 | '@langchain/community': 18 | specifier: ^0.2.20 19 | version: 0.2.20(@cloudflare/ai@1.2.2)(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0) 20 | '@langchain/core': 21 | specifier: ^0.2.17 22 | version: 0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0) 23 | '@langchain/google-genai': 24 | specifier: ^0.0.16 25 | version: 0.0.16(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0)(zod@3.23.8) 26 | '@langchain/groq': 27 | specifier: ^0.0.12 28 | version: 0.0.12(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0) 29 | '@langchain/mistralai': 30 | specifier: ^0.0.23 31 | version: 0.0.23(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0) 32 | '@langchain/openai': 33 | specifier: ^0.1.3 34 | version: 0.1.3(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0)) 35 | blob-util: 36 | specifier: ^2.0.2 37 | version: 2.0.2 38 | copy-to-clipboard: 39 | specifier: ^3.3.3 40 | version: 3.3.3 41 | highlight.js: 42 | specifier: ^11.10.0 43 | version: 11.10.0 44 | html-tag-js: 45 | specifier: ^1.5.1 46 | version: 1.5.1 47 | langchain: 48 | specifier: ^0.2.10 49 | version: 0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0) 50 | markdown-it: 51 | specifier: ^13.0.2 52 | version: 13.0.2 53 | ollama: 54 | specifier: ^0.5.6 55 | version: 0.5.6 56 | openai: 57 | specifier: ^3.3.0 58 | version: 3.3.0 59 | uuid: 60 | specifier: ^9.0.1 61 | version: 9.0.1 62 | devDependencies: 63 | esbuild: 64 | specifier: ^0.21.5 65 | version: 0.21.5 66 | esbuild-sass-plugin: 67 | specifier: ^3.3.1 68 | version: 3.3.1(esbuild@0.21.5)(sass-embedded@1.77.2) 69 | jszip: 70 | specifier: ^3.10.1 71 | version: 3.10.1 72 | 73 | packages: 74 | 75 | '@anthropic-ai/sdk@0.22.0': 76 | resolution: {integrity: sha512-dv4BCC6FZJw3w66WNLsHlUFjhu19fS1L/5jMPApwhZLa/Oy1j0A2i3RypmDtHEPp4Wwg3aZkSHksp7VzYWjzmw==} 77 | 78 | '@bufbuild/protobuf@1.10.0': 79 | resolution: {integrity: sha512-QDdVFLoN93Zjg36NoQPZfsVH9tZew7wKDKyV5qRdj8ntT4wQCOradQjRaTdwMhWUYsgKsvCINKKm87FdEk96Ag==} 80 | 81 | '@cloudflare/ai@1.2.2': 82 | resolution: {integrity: sha512-dT4gUPKWUERoTHHrbUrhJBIP8P9k6qybw5fK4bnqSAyTL9AvU98D7z6SOT/BwvmOhYA8hzBGNRbQsXyvxniGyA==} 83 | deprecated: 'Thanks for using @cloudflare/ai: This package has been deprecated in favor of the native binding, learn more here https://developers.cloudflare.com/workers-ai/configuration/bindings/ ' 84 | 85 | '@esbuild/aix-ppc64@0.21.5': 86 | resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} 87 | engines: {node: '>=12'} 88 | cpu: [ppc64] 89 | os: [aix] 90 | 91 | '@esbuild/android-arm64@0.21.5': 92 | resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} 93 | engines: {node: '>=12'} 94 | cpu: [arm64] 95 | os: [android] 96 | 97 | '@esbuild/android-arm@0.21.5': 98 | resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} 99 | engines: {node: '>=12'} 100 | cpu: [arm] 101 | os: [android] 102 | 103 | '@esbuild/android-x64@0.21.5': 104 | resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} 105 | engines: {node: '>=12'} 106 | cpu: [x64] 107 | os: [android] 108 | 109 | '@esbuild/darwin-arm64@0.21.5': 110 | resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} 111 | engines: {node: '>=12'} 112 | cpu: [arm64] 113 | os: [darwin] 114 | 115 | '@esbuild/darwin-x64@0.21.5': 116 | resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} 117 | engines: {node: '>=12'} 118 | cpu: [x64] 119 | os: [darwin] 120 | 121 | '@esbuild/freebsd-arm64@0.21.5': 122 | resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} 123 | engines: {node: '>=12'} 124 | cpu: [arm64] 125 | os: [freebsd] 126 | 127 | '@esbuild/freebsd-x64@0.21.5': 128 | resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} 129 | engines: {node: '>=12'} 130 | cpu: [x64] 131 | os: [freebsd] 132 | 133 | '@esbuild/linux-arm64@0.21.5': 134 | resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} 135 | engines: {node: '>=12'} 136 | cpu: [arm64] 137 | os: [linux] 138 | 139 | '@esbuild/linux-arm@0.21.5': 140 | resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} 141 | engines: {node: '>=12'} 142 | cpu: [arm] 143 | os: [linux] 144 | 145 | '@esbuild/linux-ia32@0.21.5': 146 | resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} 147 | engines: {node: '>=12'} 148 | cpu: [ia32] 149 | os: [linux] 150 | 151 | '@esbuild/linux-loong64@0.21.5': 152 | resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} 153 | engines: {node: '>=12'} 154 | cpu: [loong64] 155 | os: [linux] 156 | 157 | '@esbuild/linux-mips64el@0.21.5': 158 | resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} 159 | engines: {node: '>=12'} 160 | cpu: [mips64el] 161 | os: [linux] 162 | 163 | '@esbuild/linux-ppc64@0.21.5': 164 | resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} 165 | engines: {node: '>=12'} 166 | cpu: [ppc64] 167 | os: [linux] 168 | 169 | '@esbuild/linux-riscv64@0.21.5': 170 | resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} 171 | engines: {node: '>=12'} 172 | cpu: [riscv64] 173 | os: [linux] 174 | 175 | '@esbuild/linux-s390x@0.21.5': 176 | resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} 177 | engines: {node: '>=12'} 178 | cpu: [s390x] 179 | os: [linux] 180 | 181 | '@esbuild/linux-x64@0.21.5': 182 | resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} 183 | engines: {node: '>=12'} 184 | cpu: [x64] 185 | os: [linux] 186 | 187 | '@esbuild/netbsd-x64@0.21.5': 188 | resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} 189 | engines: {node: '>=12'} 190 | cpu: [x64] 191 | os: [netbsd] 192 | 193 | '@esbuild/openbsd-x64@0.21.5': 194 | resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} 195 | engines: {node: '>=12'} 196 | cpu: [x64] 197 | os: [openbsd] 198 | 199 | '@esbuild/sunos-x64@0.21.5': 200 | resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} 201 | engines: {node: '>=12'} 202 | cpu: [x64] 203 | os: [sunos] 204 | 205 | '@esbuild/win32-arm64@0.21.5': 206 | resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} 207 | engines: {node: '>=12'} 208 | cpu: [arm64] 209 | os: [win32] 210 | 211 | '@esbuild/win32-ia32@0.21.5': 212 | resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} 213 | engines: {node: '>=12'} 214 | cpu: [ia32] 215 | os: [win32] 216 | 217 | '@esbuild/win32-x64@0.21.5': 218 | resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} 219 | engines: {node: '>=12'} 220 | cpu: [x64] 221 | os: [win32] 222 | 223 | '@google/generative-ai@0.13.0': 224 | resolution: {integrity: sha512-F3rI52SbGS8bsFu4bWFfOPdtq91RsBzeVLsbJy/kt7zCuaBr28toR/8zS12zXjj6USIJd0rGeF2HsuPONUz+6w==} 225 | engines: {node: '>=18.0.0'} 226 | 227 | '@google/generative-ai@0.7.1': 228 | resolution: {integrity: sha512-WTjMLLYL/xfA5BW6xAycRPiAX7FNHKAxrid/ayqC1QMam0KAK0NbMeS9Lubw80gVg5xFMLE+H7pw4wdNzTOlxw==} 229 | engines: {node: '>=18.0.0'} 230 | 231 | '@langchain/anthropic@0.2.6': 232 | resolution: {integrity: sha512-mFBC944rKGy+oRKWOmCmABPj+pQ2S8FcvyFGavFgIqjWlnBk9PwMjWm8IEdWwaSEahJXuEL9xAV2StWazWdXvg==} 233 | engines: {node: '>=18'} 234 | 235 | '@langchain/community@0.2.20': 236 | resolution: {integrity: sha512-3RyaH2CoFzn+2d9aDjHVFqK9499aL5BUixjFVJ8dGcarMN1vpgdLqkUMrJnpgZ06o7+SHhD8mvMmsMLSNSc4yA==} 237 | engines: {node: '>=18'} 238 | peerDependencies: 239 | '@aws-crypto/sha256-js': ^5.0.0 240 | '@aws-sdk/client-bedrock-agent-runtime': ^3.583.0 241 | '@aws-sdk/client-bedrock-runtime': ^3.422.0 242 | '@aws-sdk/client-dynamodb': ^3.310.0 243 | '@aws-sdk/client-kendra': ^3.352.0 244 | '@aws-sdk/client-lambda': ^3.310.0 245 | '@aws-sdk/client-s3': ^3.310.0 246 | '@aws-sdk/client-sagemaker-runtime': ^3.310.0 247 | '@aws-sdk/client-sfn': ^3.310.0 248 | '@aws-sdk/credential-provider-node': ^3.388.0 249 | '@azure/search-documents': ^12.0.0 250 | '@azure/storage-blob': ^12.15.0 251 | '@browserbasehq/sdk': '*' 252 | '@clickhouse/client': ^0.2.5 253 | '@cloudflare/ai': '*' 254 | '@datastax/astra-db-ts': ^1.0.0 255 | '@elastic/elasticsearch': ^8.4.0 256 | '@getmetal/metal-sdk': '*' 257 | '@getzep/zep-cloud': ^1.0.6 258 | '@getzep/zep-js': ^0.9.0 259 | '@gomomento/sdk': ^1.51.1 260 | '@gomomento/sdk-core': ^1.51.1 261 | '@google-ai/generativelanguage': '*' 262 | '@google-cloud/storage': ^6.10.1 || ^7.7.0 263 | '@gradientai/nodejs-sdk': ^1.2.0 264 | '@huggingface/inference': ^2.6.4 265 | '@langchain/langgraph': ~0.0.26 266 | '@layerup/layerup-security': ^1.5.12 267 | '@mendable/firecrawl-js': ^0.0.13 268 | '@mlc-ai/web-llm': 0.2.46 269 | '@mozilla/readability': '*' 270 | '@neondatabase/serverless': '*' 271 | '@notionhq/client': ^2.2.10 272 | '@opensearch-project/opensearch': '*' 273 | '@pinecone-database/pinecone': '*' 274 | '@planetscale/database': ^1.8.0 275 | '@premai/prem-sdk': ^0.3.25 276 | '@qdrant/js-client-rest': ^1.8.2 277 | '@raycast/api': ^1.55.2 278 | '@rockset/client': ^0.9.1 279 | '@smithy/eventstream-codec': ^2.0.5 280 | '@smithy/protocol-http': ^3.0.6 281 | '@smithy/signature-v4': ^2.0.10 282 | '@smithy/util-utf8': ^2.0.0 283 | '@spider-cloud/spider-client': ^0.0.21 284 | '@supabase/postgrest-js': ^1.1.1 285 | '@supabase/supabase-js': ^2.10.0 286 | '@tensorflow-models/universal-sentence-encoder': '*' 287 | '@tensorflow/tfjs-converter': '*' 288 | '@tensorflow/tfjs-core': '*' 289 | '@upstash/ratelimit': ^1.1.3 290 | '@upstash/redis': ^1.20.6 291 | '@upstash/vector': ^1.1.1 292 | '@vercel/kv': ^0.2.3 293 | '@vercel/postgres': ^0.5.0 294 | '@writerai/writer-sdk': ^0.40.2 295 | '@xata.io/client': ^0.28.0 296 | '@xenova/transformers': ^2.17.2 297 | '@zilliz/milvus2-sdk-node': '>=2.3.5' 298 | apify-client: ^2.7.1 299 | assemblyai: ^4.6.0 300 | better-sqlite3: '>=9.4.0 <12.0.0' 301 | cassandra-driver: ^4.7.2 302 | cborg: ^4.1.1 303 | cheerio: ^1.0.0-rc.12 304 | chromadb: '*' 305 | closevector-common: 0.1.3 306 | closevector-node: 0.1.6 307 | closevector-web: 0.1.6 308 | cohere-ai: '*' 309 | convex: ^1.3.1 310 | couchbase: ^4.3.0 311 | crypto-js: ^4.2.0 312 | d3-dsv: ^2.0.0 313 | discord.js: ^14.14.1 314 | dria: ^0.0.3 315 | duck-duck-scrape: ^2.2.5 316 | epub2: ^3.0.1 317 | faiss-node: ^0.5.1 318 | firebase-admin: ^11.9.0 || ^12.0.0 319 | google-auth-library: '*' 320 | googleapis: ^126.0.1 321 | hnswlib-node: ^3.0.0 322 | html-to-text: ^9.0.5 323 | ignore: ^5.2.0 324 | interface-datastore: ^8.2.11 325 | ioredis: ^5.3.2 326 | it-all: ^3.0.4 327 | jsdom: '*' 328 | jsonwebtoken: ^9.0.2 329 | llmonitor: ^0.5.9 330 | lodash: ^4.17.21 331 | lunary: ^0.6.11 332 | mammoth: ^1.6.0 333 | mongodb: '>=5.2.0' 334 | mysql2: ^3.3.3 335 | neo4j-driver: '*' 336 | node-llama-cpp: '*' 337 | notion-to-md: ^3.1.0 338 | officeparser: ^4.0.4 339 | pdf-parse: 1.1.1 340 | pg: ^8.11.0 341 | pg-copy-streams: ^6.0.5 342 | pickleparser: ^0.2.1 343 | playwright: ^1.32.1 344 | portkey-ai: ^0.1.11 345 | puppeteer: ^19.7.2 346 | redis: '*' 347 | replicate: ^0.29.4 348 | sonix-speech-recognition: ^2.1.1 349 | srt-parser-2: ^1.2.3 350 | typeorm: ^0.3.20 351 | typesense: ^1.5.3 352 | usearch: ^1.1.1 353 | vectordb: ^0.1.4 354 | voy-search: 0.6.2 355 | weaviate-ts-client: '*' 356 | web-auth-library: ^1.0.3 357 | ws: ^8.14.2 358 | youtube-transcript: ^1.0.6 359 | youtubei.js: ^9.1.0 360 | peerDependenciesMeta: 361 | '@aws-crypto/sha256-js': 362 | optional: true 363 | '@aws-sdk/client-bedrock-agent-runtime': 364 | optional: true 365 | '@aws-sdk/client-bedrock-runtime': 366 | optional: true 367 | '@aws-sdk/client-dynamodb': 368 | optional: true 369 | '@aws-sdk/client-kendra': 370 | optional: true 371 | '@aws-sdk/client-lambda': 372 | optional: true 373 | '@aws-sdk/client-s3': 374 | optional: true 375 | '@aws-sdk/client-sagemaker-runtime': 376 | optional: true 377 | '@aws-sdk/client-sfn': 378 | optional: true 379 | '@aws-sdk/credential-provider-node': 380 | optional: true 381 | '@azure/search-documents': 382 | optional: true 383 | '@azure/storage-blob': 384 | optional: true 385 | '@browserbasehq/sdk': 386 | optional: true 387 | '@clickhouse/client': 388 | optional: true 389 | '@cloudflare/ai': 390 | optional: true 391 | '@datastax/astra-db-ts': 392 | optional: true 393 | '@elastic/elasticsearch': 394 | optional: true 395 | '@getmetal/metal-sdk': 396 | optional: true 397 | '@getzep/zep-cloud': 398 | optional: true 399 | '@getzep/zep-js': 400 | optional: true 401 | '@gomomento/sdk': 402 | optional: true 403 | '@gomomento/sdk-core': 404 | optional: true 405 | '@google-ai/generativelanguage': 406 | optional: true 407 | '@google-cloud/storage': 408 | optional: true 409 | '@gradientai/nodejs-sdk': 410 | optional: true 411 | '@huggingface/inference': 412 | optional: true 413 | '@langchain/langgraph': 414 | optional: true 415 | '@layerup/layerup-security': 416 | optional: true 417 | '@mendable/firecrawl-js': 418 | optional: true 419 | '@mlc-ai/web-llm': 420 | optional: true 421 | '@mozilla/readability': 422 | optional: true 423 | '@neondatabase/serverless': 424 | optional: true 425 | '@notionhq/client': 426 | optional: true 427 | '@opensearch-project/opensearch': 428 | optional: true 429 | '@pinecone-database/pinecone': 430 | optional: true 431 | '@planetscale/database': 432 | optional: true 433 | '@premai/prem-sdk': 434 | optional: true 435 | '@qdrant/js-client-rest': 436 | optional: true 437 | '@raycast/api': 438 | optional: true 439 | '@rockset/client': 440 | optional: true 441 | '@smithy/eventstream-codec': 442 | optional: true 443 | '@smithy/protocol-http': 444 | optional: true 445 | '@smithy/signature-v4': 446 | optional: true 447 | '@smithy/util-utf8': 448 | optional: true 449 | '@spider-cloud/spider-client': 450 | optional: true 451 | '@supabase/postgrest-js': 452 | optional: true 453 | '@supabase/supabase-js': 454 | optional: true 455 | '@tensorflow-models/universal-sentence-encoder': 456 | optional: true 457 | '@tensorflow/tfjs-converter': 458 | optional: true 459 | '@tensorflow/tfjs-core': 460 | optional: true 461 | '@upstash/ratelimit': 462 | optional: true 463 | '@upstash/redis': 464 | optional: true 465 | '@upstash/vector': 466 | optional: true 467 | '@vercel/kv': 468 | optional: true 469 | '@vercel/postgres': 470 | optional: true 471 | '@writerai/writer-sdk': 472 | optional: true 473 | '@xata.io/client': 474 | optional: true 475 | '@xenova/transformers': 476 | optional: true 477 | '@zilliz/milvus2-sdk-node': 478 | optional: true 479 | apify-client: 480 | optional: true 481 | assemblyai: 482 | optional: true 483 | better-sqlite3: 484 | optional: true 485 | cassandra-driver: 486 | optional: true 487 | cborg: 488 | optional: true 489 | cheerio: 490 | optional: true 491 | chromadb: 492 | optional: true 493 | closevector-common: 494 | optional: true 495 | closevector-node: 496 | optional: true 497 | closevector-web: 498 | optional: true 499 | cohere-ai: 500 | optional: true 501 | convex: 502 | optional: true 503 | couchbase: 504 | optional: true 505 | crypto-js: 506 | optional: true 507 | d3-dsv: 508 | optional: true 509 | discord.js: 510 | optional: true 511 | dria: 512 | optional: true 513 | duck-duck-scrape: 514 | optional: true 515 | epub2: 516 | optional: true 517 | faiss-node: 518 | optional: true 519 | firebase-admin: 520 | optional: true 521 | google-auth-library: 522 | optional: true 523 | googleapis: 524 | optional: true 525 | hnswlib-node: 526 | optional: true 527 | html-to-text: 528 | optional: true 529 | ignore: 530 | optional: true 531 | interface-datastore: 532 | optional: true 533 | ioredis: 534 | optional: true 535 | it-all: 536 | optional: true 537 | jsdom: 538 | optional: true 539 | jsonwebtoken: 540 | optional: true 541 | llmonitor: 542 | optional: true 543 | lodash: 544 | optional: true 545 | lunary: 546 | optional: true 547 | mammoth: 548 | optional: true 549 | mongodb: 550 | optional: true 551 | mysql2: 552 | optional: true 553 | neo4j-driver: 554 | optional: true 555 | node-llama-cpp: 556 | optional: true 557 | notion-to-md: 558 | optional: true 559 | officeparser: 560 | optional: true 561 | pdf-parse: 562 | optional: true 563 | pg: 564 | optional: true 565 | pg-copy-streams: 566 | optional: true 567 | pickleparser: 568 | optional: true 569 | playwright: 570 | optional: true 571 | portkey-ai: 572 | optional: true 573 | puppeteer: 574 | optional: true 575 | redis: 576 | optional: true 577 | replicate: 578 | optional: true 579 | sonix-speech-recognition: 580 | optional: true 581 | srt-parser-2: 582 | optional: true 583 | typeorm: 584 | optional: true 585 | typesense: 586 | optional: true 587 | usearch: 588 | optional: true 589 | vectordb: 590 | optional: true 591 | voy-search: 592 | optional: true 593 | weaviate-ts-client: 594 | optional: true 595 | web-auth-library: 596 | optional: true 597 | ws: 598 | optional: true 599 | youtube-transcript: 600 | optional: true 601 | youtubei.js: 602 | optional: true 603 | 604 | '@langchain/core@0.2.17': 605 | resolution: {integrity: sha512-WnFiZ7R/ZUVeHO2IgcSL7Tu+CjApa26Iy99THJP5fax/NF8UQCc/ZRcw2Sb/RUuRPVm6ALDass0fSQE1L9YNJg==} 606 | engines: {node: '>=18'} 607 | 608 | '@langchain/google-genai@0.0.16': 609 | resolution: {integrity: sha512-aUHEeY7sTwxNqj7L5scvnOhNLOKPVSvf7HR6p1Y3M7BPyU63fXP7faB+qyuHmibtKU8pj+ApoXPpjRflYKSv4w==} 610 | engines: {node: '>=18'} 611 | 612 | '@langchain/groq@0.0.12': 613 | resolution: {integrity: sha512-qgrVBdUnK9Qe8fzMc9gmMPGzc/8swDYbQuHoqsZmeK7M3wxEPR60rKdZvbbkFzqn+1NdquyRTeVKSgihPCib5Q==} 614 | engines: {node: '>=18'} 615 | 616 | '@langchain/mistralai@0.0.23': 617 | resolution: {integrity: sha512-0huhT3KXqrD1u20e2NWpBlprBoNidw4Q4hjBI9DySCb1Gx4wSIV6y8kswsWRfM1VDBZvJcCVLeVuOSAyShoFug==} 618 | engines: {node: '>=18'} 619 | 620 | '@langchain/openai@0.0.34': 621 | resolution: {integrity: sha512-M+CW4oXle5fdoz2T2SwdOef8pl3/1XmUx1vjn2mXUVM/128aO0l23FMF0SNBsAbRV6P+p/TuzjodchJbi0Ht/A==} 622 | engines: {node: '>=18'} 623 | 624 | '@langchain/openai@0.1.3': 625 | resolution: {integrity: sha512-riv/JC9x2A8b7GcHu8sx+mlZJ8KAwSSi231IPTlcciYnKozmrQ5H0vrtiD31fxiDbaRsk7tyCpkSBIOQEo7CyQ==} 626 | engines: {node: '>=18'} 627 | 628 | '@langchain/textsplitters@0.0.3': 629 | resolution: {integrity: sha512-cXWgKE3sdWLSqAa8ykbCcUsUF1Kyr5J3HOWYGuobhPEycXW4WI++d5DhzdpL238mzoEXTi90VqfSCra37l5YqA==} 630 | engines: {node: '>=18'} 631 | 632 | '@mistralai/mistralai@0.4.0': 633 | resolution: {integrity: sha512-KmFzNro1RKxIFh19J3osmUQhucefBBauMXN5fa9doG6dT9OHR/moBvvn+riVlR7c0AVfuxO8Dfa03AyLYYzbyg==} 634 | 635 | '@types/node-fetch@2.6.11': 636 | resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} 637 | 638 | '@types/node@18.19.41': 639 | resolution: {integrity: sha512-LX84pRJ+evD2e2nrgYCHObGWkiQJ1mL+meAgbvnwk/US6vmMY7S2ygBTGV2Jw91s9vUsLSXeDEkUHZIJGLrhsg==} 640 | 641 | '@types/retry@0.12.0': 642 | resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==} 643 | 644 | '@types/uuid@9.0.8': 645 | resolution: {integrity: sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==} 646 | 647 | abort-controller@3.0.0: 648 | resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} 649 | engines: {node: '>=6.5'} 650 | 651 | agentkeepalive@4.5.0: 652 | resolution: {integrity: sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==} 653 | engines: {node: '>= 8.0.0'} 654 | 655 | ansi-styles@5.2.0: 656 | resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} 657 | engines: {node: '>=10'} 658 | 659 | anymatch@3.1.3: 660 | resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} 661 | engines: {node: '>= 8'} 662 | 663 | argparse@2.0.1: 664 | resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} 665 | 666 | asynckit@0.4.0: 667 | resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} 668 | 669 | axios@0.26.1: 670 | resolution: {integrity: sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==} 671 | 672 | base-64@0.1.0: 673 | resolution: {integrity: sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA==} 674 | 675 | base64-js@1.5.1: 676 | resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} 677 | 678 | binary-extensions@2.3.0: 679 | resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} 680 | engines: {node: '>=8'} 681 | 682 | binary-search@1.3.6: 683 | resolution: {integrity: sha512-nbE1WxOTTrUWIfsfZ4aHGYu5DOuNkbxGokjV6Z2kxfJK3uaAb8zNK1muzOeipoLHZjInT4Br88BHpzevc681xA==} 684 | 685 | blob-util@2.0.2: 686 | resolution: {integrity: sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==} 687 | 688 | braces@3.0.3: 689 | resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} 690 | engines: {node: '>=8'} 691 | 692 | buffer-builder@0.2.0: 693 | resolution: {integrity: sha512-7VPMEPuYznPSoR21NE1zvd2Xna6c/CloiZCfcMXR1Jny6PjX0N4Nsa38zcBFo/FMK+BlA+FLKbJCQ0i2yxp+Xg==} 694 | 695 | camelcase@6.3.0: 696 | resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} 697 | engines: {node: '>=10'} 698 | 699 | charenc@0.0.2: 700 | resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} 701 | 702 | chokidar@3.6.0: 703 | resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} 704 | engines: {node: '>= 8.10.0'} 705 | 706 | combined-stream@1.0.8: 707 | resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} 708 | engines: {node: '>= 0.8'} 709 | 710 | commander@10.0.1: 711 | resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} 712 | engines: {node: '>=14'} 713 | 714 | copy-to-clipboard@3.3.3: 715 | resolution: {integrity: sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==} 716 | 717 | core-util-is@1.0.3: 718 | resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} 719 | 720 | crypt@0.0.2: 721 | resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} 722 | 723 | decamelize@1.2.0: 724 | resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} 725 | engines: {node: '>=0.10.0'} 726 | 727 | delayed-stream@1.0.0: 728 | resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} 729 | engines: {node: '>=0.4.0'} 730 | 731 | digest-fetch@1.3.0: 732 | resolution: {integrity: sha512-CGJuv6iKNM7QyZlM2T3sPAdZWd/p9zQiRNS9G+9COUCwzWFTs0Xp8NF5iePx7wtvhDykReiRRrSeNb4oMmB8lA==} 733 | 734 | entities@3.0.1: 735 | resolution: {integrity: sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==} 736 | engines: {node: '>=0.12'} 737 | 738 | esbuild-sass-plugin@3.3.1: 739 | resolution: {integrity: sha512-SnO1ls+d52n6j8gRRpjexXI8MsHEaumS0IdDHaYM29Y6gakzZYMls6i9ql9+AWMSQk/eryndmUpXEgT34QrX1A==} 740 | peerDependencies: 741 | esbuild: '>=0.20.1' 742 | sass-embedded: ^1.71.1 743 | 744 | esbuild@0.21.5: 745 | resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} 746 | engines: {node: '>=12'} 747 | hasBin: true 748 | 749 | event-target-shim@5.0.1: 750 | resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} 751 | engines: {node: '>=6'} 752 | 753 | eventemitter3@4.0.7: 754 | resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} 755 | 756 | expr-eval@2.0.2: 757 | resolution: {integrity: sha512-4EMSHGOPSwAfBiibw3ndnP0AvjDWLsMvGOvWEZ2F96IGk0bIVdjQisOHxReSkE13mHcfbuCiXw+G4y0zv6N8Eg==} 758 | 759 | fast-xml-parser@4.4.0: 760 | resolution: {integrity: sha512-kLY3jFlwIYwBNDojclKsNAC12sfD6NwW74QB2CoNGPvtVxjliYehVunB3HYyNi+n4Tt1dAcgwYvmKF/Z18flqg==} 761 | hasBin: true 762 | 763 | fill-range@7.1.1: 764 | resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} 765 | engines: {node: '>=8'} 766 | 767 | flat@5.0.2: 768 | resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} 769 | hasBin: true 770 | 771 | follow-redirects@1.15.6: 772 | resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==} 773 | engines: {node: '>=4.0'} 774 | peerDependencies: 775 | debug: '*' 776 | peerDependenciesMeta: 777 | debug: 778 | optional: true 779 | 780 | form-data-encoder@1.7.2: 781 | resolution: {integrity: sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==} 782 | 783 | form-data@4.0.0: 784 | resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} 785 | engines: {node: '>= 6'} 786 | 787 | formdata-node@4.4.1: 788 | resolution: {integrity: sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==} 789 | engines: {node: '>= 12.20'} 790 | 791 | fsevents@2.3.3: 792 | resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} 793 | engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} 794 | os: [darwin] 795 | 796 | function-bind@1.1.2: 797 | resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} 798 | 799 | glob-parent@5.1.2: 800 | resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} 801 | engines: {node: '>= 6'} 802 | 803 | groq-sdk@0.3.3: 804 | resolution: {integrity: sha512-wdOeZ2QymPjjP3tmFpUAnfMisoLbt7xF2MfpROeFAngcqWbfTyB9j9pMWSEAMF/E4gZx8f2Y+5zswO0q92CSxA==} 805 | 806 | has-flag@4.0.0: 807 | resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} 808 | engines: {node: '>=8'} 809 | 810 | hasown@2.0.2: 811 | resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} 812 | engines: {node: '>= 0.4'} 813 | 814 | highlight.js@11.10.0: 815 | resolution: {integrity: sha512-SYVnVFswQER+zu1laSya563s+F8VDGt7o35d4utbamowvUNLLMovFqwCLSocpZTz3MgaSRA1IbqRWZv97dtErQ==} 816 | engines: {node: '>=12.0.0'} 817 | 818 | html-tag-js@1.5.1: 819 | resolution: {integrity: sha512-zfdneRcuNlnttWxkF0K8UdijOv2/ja3+RUTNBz7MvsdyYjrABe0HWtmN3oHtNPeypwWpDBTsVCBZSeWHequufw==} 820 | 821 | humanize-ms@1.2.1: 822 | resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} 823 | 824 | immediate@3.0.6: 825 | resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==} 826 | 827 | immutable@4.3.6: 828 | resolution: {integrity: sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==} 829 | 830 | inherits@2.0.4: 831 | resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} 832 | 833 | is-any-array@2.0.1: 834 | resolution: {integrity: sha512-UtilS7hLRu++wb/WBAw9bNuP1Eg04Ivn1vERJck8zJthEvXCBEBpGR/33u/xLKWEQf95803oalHrVDptcAvFdQ==} 835 | 836 | is-binary-path@2.1.0: 837 | resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} 838 | engines: {node: '>=8'} 839 | 840 | is-buffer@1.1.6: 841 | resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} 842 | 843 | is-core-module@2.15.0: 844 | resolution: {integrity: sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==} 845 | engines: {node: '>= 0.4'} 846 | 847 | is-extglob@2.1.1: 848 | resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} 849 | engines: {node: '>=0.10.0'} 850 | 851 | is-glob@4.0.3: 852 | resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} 853 | engines: {node: '>=0.10.0'} 854 | 855 | is-number@7.0.0: 856 | resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} 857 | engines: {node: '>=0.12.0'} 858 | 859 | isarray@1.0.0: 860 | resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} 861 | 862 | js-tiktoken@1.0.12: 863 | resolution: {integrity: sha512-L7wURW1fH9Qaext0VzaUDpFGVQgjkdE3Dgsy9/+yXyGEpBKnylTd0mU0bfbNkKDlXRb6TEsZkwuflu1B8uQbJQ==} 864 | 865 | js-yaml@4.1.0: 866 | resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} 867 | hasBin: true 868 | 869 | jsonpointer@5.0.1: 870 | resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} 871 | engines: {node: '>=0.10.0'} 872 | 873 | jszip@3.10.1: 874 | resolution: {integrity: sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==} 875 | 876 | langchain@0.2.10: 877 | resolution: {integrity: sha512-i0fC+RlX/6w6HKPWL3N5zrhrkijvpe2Xu4t/qbWzq4uFf8WBfPwmNFom3RtO2RatuPnHLm8mViU6nw8YBDiVwA==} 878 | engines: {node: '>=18'} 879 | peerDependencies: 880 | '@aws-sdk/client-s3': ^3.310.0 881 | '@aws-sdk/client-sagemaker-runtime': ^3.310.0 882 | '@aws-sdk/client-sfn': ^3.310.0 883 | '@aws-sdk/credential-provider-node': ^3.388.0 884 | '@azure/storage-blob': ^12.15.0 885 | '@browserbasehq/sdk': '*' 886 | '@gomomento/sdk': ^1.51.1 887 | '@gomomento/sdk-core': ^1.51.1 888 | '@gomomento/sdk-web': ^1.51.1 889 | '@mendable/firecrawl-js': ^0.0.13 890 | '@notionhq/client': ^2.2.10 891 | '@pinecone-database/pinecone': '*' 892 | '@supabase/supabase-js': ^2.10.0 893 | '@vercel/kv': ^0.2.3 894 | '@xata.io/client': ^0.28.0 895 | apify-client: ^2.7.1 896 | assemblyai: ^4.0.0 897 | axios: '*' 898 | cheerio: ^1.0.0-rc.12 899 | chromadb: '*' 900 | convex: ^1.3.1 901 | couchbase: ^4.3.0 902 | d3-dsv: ^2.0.0 903 | epub2: ^3.0.1 904 | faiss-node: '*' 905 | fast-xml-parser: '*' 906 | handlebars: ^4.7.8 907 | html-to-text: ^9.0.5 908 | ignore: ^5.2.0 909 | ioredis: ^5.3.2 910 | jsdom: '*' 911 | mammoth: ^1.6.0 912 | mongodb: '>=5.2.0' 913 | node-llama-cpp: '*' 914 | notion-to-md: ^3.1.0 915 | officeparser: ^4.0.4 916 | pdf-parse: 1.1.1 917 | peggy: ^3.0.2 918 | playwright: ^1.32.1 919 | puppeteer: ^19.7.2 920 | pyodide: ^0.24.1 921 | redis: ^4.6.4 922 | sonix-speech-recognition: ^2.1.1 923 | srt-parser-2: ^1.2.3 924 | typeorm: ^0.3.20 925 | weaviate-ts-client: '*' 926 | web-auth-library: ^1.0.3 927 | ws: ^8.14.2 928 | youtube-transcript: ^1.0.6 929 | youtubei.js: ^9.1.0 930 | peerDependenciesMeta: 931 | '@aws-sdk/client-s3': 932 | optional: true 933 | '@aws-sdk/client-sagemaker-runtime': 934 | optional: true 935 | '@aws-sdk/client-sfn': 936 | optional: true 937 | '@aws-sdk/credential-provider-node': 938 | optional: true 939 | '@azure/storage-blob': 940 | optional: true 941 | '@browserbasehq/sdk': 942 | optional: true 943 | '@gomomento/sdk': 944 | optional: true 945 | '@gomomento/sdk-core': 946 | optional: true 947 | '@gomomento/sdk-web': 948 | optional: true 949 | '@mendable/firecrawl-js': 950 | optional: true 951 | '@notionhq/client': 952 | optional: true 953 | '@pinecone-database/pinecone': 954 | optional: true 955 | '@supabase/supabase-js': 956 | optional: true 957 | '@vercel/kv': 958 | optional: true 959 | '@xata.io/client': 960 | optional: true 961 | apify-client: 962 | optional: true 963 | assemblyai: 964 | optional: true 965 | axios: 966 | optional: true 967 | cheerio: 968 | optional: true 969 | chromadb: 970 | optional: true 971 | convex: 972 | optional: true 973 | couchbase: 974 | optional: true 975 | d3-dsv: 976 | optional: true 977 | epub2: 978 | optional: true 979 | faiss-node: 980 | optional: true 981 | fast-xml-parser: 982 | optional: true 983 | handlebars: 984 | optional: true 985 | html-to-text: 986 | optional: true 987 | ignore: 988 | optional: true 989 | ioredis: 990 | optional: true 991 | jsdom: 992 | optional: true 993 | mammoth: 994 | optional: true 995 | mongodb: 996 | optional: true 997 | node-llama-cpp: 998 | optional: true 999 | notion-to-md: 1000 | optional: true 1001 | officeparser: 1002 | optional: true 1003 | pdf-parse: 1004 | optional: true 1005 | peggy: 1006 | optional: true 1007 | playwright: 1008 | optional: true 1009 | puppeteer: 1010 | optional: true 1011 | pyodide: 1012 | optional: true 1013 | redis: 1014 | optional: true 1015 | sonix-speech-recognition: 1016 | optional: true 1017 | srt-parser-2: 1018 | optional: true 1019 | typeorm: 1020 | optional: true 1021 | weaviate-ts-client: 1022 | optional: true 1023 | web-auth-library: 1024 | optional: true 1025 | ws: 1026 | optional: true 1027 | youtube-transcript: 1028 | optional: true 1029 | youtubei.js: 1030 | optional: true 1031 | 1032 | langchainhub@0.0.11: 1033 | resolution: {integrity: sha512-WnKI4g9kU2bHQP136orXr2bcRdgz9iiTBpTN0jWt9IlScUKnJBoD0aa2HOzHURQKeQDnt2JwqVmQ6Depf5uDLQ==} 1034 | 1035 | langsmith@0.1.39: 1036 | resolution: {integrity: sha512-K2/qbc96JhrZbSL74RbZ0DBOpTB9Mxicu8RQrZ88Xsp1bH2O3+y5EdcvC0g/1YzQWQhcQ4peknCA24c3VTNiNA==} 1037 | peerDependencies: 1038 | '@langchain/core': '*' 1039 | langchain: '*' 1040 | openai: '*' 1041 | peerDependenciesMeta: 1042 | '@langchain/core': 1043 | optional: true 1044 | langchain: 1045 | optional: true 1046 | openai: 1047 | optional: true 1048 | 1049 | lie@3.3.0: 1050 | resolution: {integrity: sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==} 1051 | 1052 | linkify-it@4.0.1: 1053 | resolution: {integrity: sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==} 1054 | 1055 | markdown-it@13.0.2: 1056 | resolution: {integrity: sha512-FtwnEuuK+2yVU7goGn/MJ0WBZMM9ZPgU9spqlFs7/A/pDIUNSOQZhUgOqYCficIuR2QaFnrt8LHqBWsbTAoI5w==} 1057 | hasBin: true 1058 | 1059 | md5@2.3.0: 1060 | resolution: {integrity: sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==} 1061 | 1062 | mdurl@1.0.1: 1063 | resolution: {integrity: sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==} 1064 | 1065 | mime-db@1.52.0: 1066 | resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} 1067 | engines: {node: '>= 0.6'} 1068 | 1069 | mime-types@2.1.35: 1070 | resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} 1071 | engines: {node: '>= 0.6'} 1072 | 1073 | ml-array-mean@1.1.6: 1074 | resolution: {integrity: sha512-MIdf7Zc8HznwIisyiJGRH9tRigg3Yf4FldW8DxKxpCCv/g5CafTw0RRu51nojVEOXuCQC7DRVVu5c7XXO/5joQ==} 1075 | 1076 | ml-array-sum@1.1.6: 1077 | resolution: {integrity: sha512-29mAh2GwH7ZmiRnup4UyibQZB9+ZLyMShvt4cH4eTK+cL2oEMIZFnSyB3SS8MlsTh6q/w/yh48KmqLxmovN4Dw==} 1078 | 1079 | ml-distance-euclidean@2.0.0: 1080 | resolution: {integrity: sha512-yC9/2o8QF0A3m/0IXqCTXCzz2pNEzvmcE/9HFKOZGnTjatvBbsn4lWYJkxENkA4Ug2fnYl7PXQxnPi21sgMy/Q==} 1081 | 1082 | ml-distance@4.0.1: 1083 | resolution: {integrity: sha512-feZ5ziXs01zhyFUUUeZV5hwc0f5JW0Sh0ckU1koZe/wdVkJdGxcP06KNQuF0WBTj8FttQUzcvQcpcrOp/XrlEw==} 1084 | 1085 | ml-tree-similarity@1.0.0: 1086 | resolution: {integrity: sha512-XJUyYqjSuUQkNQHMscr6tcjldsOoAekxADTplt40QKfwW6nd++1wHWV9AArl0Zvw/TIHgNaZZNvr8QGvE8wLRg==} 1087 | 1088 | ms@2.1.3: 1089 | resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} 1090 | 1091 | mustache@4.2.0: 1092 | resolution: {integrity: sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==} 1093 | hasBin: true 1094 | 1095 | node-domexception@1.0.0: 1096 | resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} 1097 | engines: {node: '>=10.5.0'} 1098 | 1099 | node-fetch@2.7.0: 1100 | resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} 1101 | engines: {node: 4.x || >=6.0.0} 1102 | peerDependencies: 1103 | encoding: ^0.1.0 1104 | peerDependenciesMeta: 1105 | encoding: 1106 | optional: true 1107 | 1108 | normalize-path@3.0.0: 1109 | resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} 1110 | engines: {node: '>=0.10.0'} 1111 | 1112 | num-sort@2.1.0: 1113 | resolution: {integrity: sha512-1MQz1Ed8z2yckoBeSfkQHHO9K1yDRxxtotKSJ9yvcTUUxSvfvzEq5GwBrjjHEpMlq/k5gvXdmJ1SbYxWtpNoVg==} 1114 | engines: {node: '>=8'} 1115 | 1116 | ollama@0.5.6: 1117 | resolution: {integrity: sha512-4BySAMt96+OCt4emL6DE78UBCGqC7GvteM9LRCd6WwJyefn0x9w2BrcUcLm9nJ9bYpRsmkhf0Au18Q5MhsA14w==} 1118 | 1119 | openai@3.3.0: 1120 | resolution: {integrity: sha512-uqxI/Au+aPRnsaQRe8CojU0eCR7I0mBiKjD3sNMzY6DaC1ZVrc85u98mtJW6voDug8fgGN+DIZmTDxTthxb7dQ==} 1121 | 1122 | openai@4.52.7: 1123 | resolution: {integrity: sha512-dgxA6UZHary6NXUHEDj5TWt8ogv0+ibH+b4pT5RrWMjiRZVylNwLcw/2ubDrX5n0oUmHX/ZgudMJeemxzOvz7A==} 1124 | hasBin: true 1125 | 1126 | openapi-types@12.1.3: 1127 | resolution: {integrity: sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==} 1128 | 1129 | p-finally@1.0.0: 1130 | resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} 1131 | engines: {node: '>=4'} 1132 | 1133 | p-queue@6.6.2: 1134 | resolution: {integrity: sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==} 1135 | engines: {node: '>=8'} 1136 | 1137 | p-retry@4.6.2: 1138 | resolution: {integrity: sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==} 1139 | engines: {node: '>=8'} 1140 | 1141 | p-timeout@3.2.0: 1142 | resolution: {integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==} 1143 | engines: {node: '>=8'} 1144 | 1145 | pako@1.0.11: 1146 | resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} 1147 | 1148 | path-parse@1.0.7: 1149 | resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} 1150 | 1151 | picomatch@2.3.1: 1152 | resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} 1153 | engines: {node: '>=8.6'} 1154 | 1155 | process-nextick-args@2.0.1: 1156 | resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} 1157 | 1158 | readable-stream@2.3.8: 1159 | resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} 1160 | 1161 | readdirp@3.6.0: 1162 | resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} 1163 | engines: {node: '>=8.10.0'} 1164 | 1165 | resolve@1.22.8: 1166 | resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} 1167 | hasBin: true 1168 | 1169 | retry@0.13.1: 1170 | resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} 1171 | engines: {node: '>= 4'} 1172 | 1173 | rxjs@7.8.1: 1174 | resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} 1175 | 1176 | safe-buffer@5.1.2: 1177 | resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} 1178 | 1179 | safe-identifier@0.4.2: 1180 | resolution: {integrity: sha512-6pNbSMW6OhAi9j+N8V+U715yBQsaWJ7eyEUaOrawX+isg5ZxhUlV1NipNtgaKHmFGiABwt+ZF04Ii+3Xjkg+8w==} 1181 | 1182 | sass-embedded-android-arm64@1.77.2: 1183 | resolution: {integrity: sha512-7DiFMros5iRYrkPlNqUBfzZ/DCgsI199pRF8xuBsPf9yuB8SLDOqvNk3QOnUCMAbpjW5VW1JgdfGFFlHTCnJQA==} 1184 | engines: {node: '>=14.0.0'} 1185 | cpu: [arm64] 1186 | os: [android] 1187 | hasBin: true 1188 | 1189 | sass-embedded-android-arm@1.77.2: 1190 | resolution: {integrity: sha512-rMuIMZ/FstMrT9Y23LDgQGpCyfe3i10dJnmW+DVJ9Gqz4dR7qpysEBIQXU35mHVq8ppNZ0yGiFlFZTSiiVMdzQ==} 1191 | engines: {node: '>=14.0.0'} 1192 | cpu: [arm] 1193 | os: [android] 1194 | hasBin: true 1195 | 1196 | sass-embedded-android-ia32@1.77.2: 1197 | resolution: {integrity: sha512-qN0laKrAjuvBLFdUogGz8jQlbHs6tgH91tKQeE7ZE4AO9zzDRlXtaEJP1x6B6AGVc8UOEkvQyR3Nej4qwWprhA==} 1198 | engines: {node: '>=14.0.0'} 1199 | cpu: [ia32] 1200 | os: [android] 1201 | hasBin: true 1202 | 1203 | sass-embedded-android-x64@1.77.2: 1204 | resolution: {integrity: sha512-HByqtC5g5hOaJenWs4Klx6gFEIZYx+IEFh5K56U+wB+jd6EU32Lrnbdxy1+i/p/kZrd+23HrVHQPv8zpmxucaw==} 1205 | engines: {node: '>=14.0.0'} 1206 | cpu: [x64] 1207 | os: [android] 1208 | hasBin: true 1209 | 1210 | sass-embedded-darwin-arm64@1.77.2: 1211 | resolution: {integrity: sha512-0jkL/FwbAStqqxFSjHfhElEAWrKRRvFz2JeXOxskUdzMehDMv5LaewqSRCijyeKBO3KgurvndmSfrOizdU6WAw==} 1212 | engines: {node: '>=14.0.0'} 1213 | cpu: [arm64] 1214 | os: [darwin] 1215 | hasBin: true 1216 | 1217 | sass-embedded-darwin-x64@1.77.2: 1218 | resolution: {integrity: sha512-8Sy36IxOOFPWA5TdhC87SvOkrXUSis51CGKlIsM8yZISQiY9y8b+wrNJM1f3oHvs641xZBaeIuwibJXaY6hNBg==} 1219 | engines: {node: '>=14.0.0'} 1220 | cpu: [x64] 1221 | os: [darwin] 1222 | hasBin: true 1223 | 1224 | sass-embedded-linux-arm64@1.77.2: 1225 | resolution: {integrity: sha512-hlfNFu1IWHI0cOsbpFWPrJlx7IFZfXuI3iEhwa4oljM21y72E6tETUFmTr4f9Ka9qDLXkUxUoYaTH2SqGU9dDA==} 1226 | engines: {node: '>=14.0.0'} 1227 | cpu: [arm64] 1228 | os: [linux] 1229 | hasBin: true 1230 | 1231 | sass-embedded-linux-arm@1.77.2: 1232 | resolution: {integrity: sha512-/gtCseBkGCBw61p6MG2BqeYy8rblffw2KXUzMKjo9Hlqj/KajWDk7j1B+mVnqrHOPB/KBbm8Ym/2ooCYpnMIkQ==} 1233 | engines: {node: '>=14.0.0'} 1234 | cpu: [arm] 1235 | os: [linux] 1236 | hasBin: true 1237 | 1238 | sass-embedded-linux-ia32@1.77.2: 1239 | resolution: {integrity: sha512-JSIqGIeAKlrMw/oMFFFxZ10F3QUJVdjeGVI83h6mwNHTYgrX6PuOngcAYleIpYR5XicQgfueC5pPVPbP5CArBQ==} 1240 | engines: {node: '>=14.0.0'} 1241 | cpu: [ia32] 1242 | os: [linux] 1243 | hasBin: true 1244 | 1245 | sass-embedded-linux-musl-arm64@1.77.2: 1246 | resolution: {integrity: sha512-JQZuONuhIurKjc/qE9cTiJXSLixL8hGkalWN3LJHasYHVAU92QA/t8rv0T51vIzf/I2F59He3bapkPme60dwSw==} 1247 | engines: {node: '>=14.0.0'} 1248 | cpu: [arm64] 1249 | os: [linux] 1250 | 1251 | sass-embedded-linux-musl-arm@1.77.2: 1252 | resolution: {integrity: sha512-LZTSnfHPlfvkdQ8orpnEUCEx40qhKpMjxN3Ggi8kgQqv5jvtqn0ECdWl0n4WI5CrlkmtdS3VeFcsf078bt/f8Q==} 1253 | engines: {node: '>=14.0.0'} 1254 | cpu: [arm] 1255 | os: [linux] 1256 | 1257 | sass-embedded-linux-musl-ia32@1.77.2: 1258 | resolution: {integrity: sha512-6F1GHBgPkcTXtfM0MK3PofozagNF8IawdfIG4RNzGeSZRhGBRgZLOS+vdre4xubTLSaa6xjbI47YfaD43z8URQ==} 1259 | engines: {node: '>=14.0.0'} 1260 | cpu: [ia32] 1261 | os: [linux] 1262 | 1263 | sass-embedded-linux-musl-x64@1.77.2: 1264 | resolution: {integrity: sha512-8BiqLA1NJeN3rCaX6t747GWMMdH5YUFYuytXU8waDC/u+FSGoOHRxfrsB8BEWHVgSPDxhwZklanPCXXzbzB2lw==} 1265 | engines: {node: '>=14.0.0'} 1266 | cpu: [x64] 1267 | os: [linux] 1268 | 1269 | sass-embedded-linux-x64@1.77.2: 1270 | resolution: {integrity: sha512-czQOxGOX4U47jW9k+cbFBgSt/6FVx2WGLPqPvrgDiEToLJdZyvzUqrkpqQYfJ6hN1koqatCPEpDrUZBcTPGUGg==} 1271 | engines: {node: '>=14.0.0'} 1272 | cpu: [x64] 1273 | os: [linux] 1274 | hasBin: true 1275 | 1276 | sass-embedded-win32-arm64@1.77.2: 1277 | resolution: {integrity: sha512-NA+4Y5PO04YQGtKNCyLrUjQU2nijskVA3Er/UYGtx66BBlWZ/ttbnlk+dU05SF5Jhjb3HtThGGH1meb7pKA+OQ==} 1278 | engines: {node: '>=14.0.0'} 1279 | cpu: [arm64] 1280 | os: [win32] 1281 | hasBin: true 1282 | 1283 | sass-embedded-win32-ia32@1.77.2: 1284 | resolution: {integrity: sha512-/3hGz4GefhVuuUu2gSOdsxBYym5Di0co0tZbtiokCU/8VhYhcAQ3v2Lni49VV6OnsyJLb1nUx+rbpd8cKO1U4w==} 1285 | engines: {node: '>=14.0.0'} 1286 | cpu: [ia32] 1287 | os: [win32] 1288 | hasBin: true 1289 | 1290 | sass-embedded-win32-x64@1.77.2: 1291 | resolution: {integrity: sha512-joHLDICWmnR9Ca+LT9B+Fp85sCvV9F3gdtHtXLSuQAEulG5Ip1Z9euB3FUw+Z0s0Vz4MjNea+JD+TwO9eMrpyw==} 1292 | engines: {node: '>=14.0.0'} 1293 | cpu: [x64] 1294 | os: [win32] 1295 | hasBin: true 1296 | 1297 | sass-embedded@1.77.2: 1298 | resolution: {integrity: sha512-luiDeWNZ0tKs1jCiSFbuz8wFVQxYqN+vh+yfm9v7kW42yPtwEF8+z2ROaDJluSUZ7vhFmsXuqoKg9qBxc7SCnw==} 1299 | engines: {node: '>=16.0.0'} 1300 | 1301 | sass@1.77.8: 1302 | resolution: {integrity: sha512-4UHg6prsrycW20fqLGPShtEvo/WyHRVRHwOP4DzkUrObWoWI05QBSfzU71TVB7PFaL104TwNaHpjlWXAZbQiNQ==} 1303 | engines: {node: '>=14.0.0'} 1304 | hasBin: true 1305 | 1306 | setimmediate@1.0.5: 1307 | resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} 1308 | 1309 | source-map-js@1.2.0: 1310 | resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} 1311 | engines: {node: '>=0.10.0'} 1312 | 1313 | string_decoder@1.1.1: 1314 | resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} 1315 | 1316 | strnum@1.0.5: 1317 | resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==} 1318 | 1319 | supports-color@8.1.1: 1320 | resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} 1321 | engines: {node: '>=10'} 1322 | 1323 | supports-preserve-symlinks-flag@1.0.0: 1324 | resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} 1325 | engines: {node: '>= 0.4'} 1326 | 1327 | to-regex-range@5.0.1: 1328 | resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} 1329 | engines: {node: '>=8.0'} 1330 | 1331 | toggle-selection@1.0.6: 1332 | resolution: {integrity: sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==} 1333 | 1334 | tr46@0.0.3: 1335 | resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} 1336 | 1337 | tslib@2.6.3: 1338 | resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} 1339 | 1340 | uc.micro@1.0.6: 1341 | resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} 1342 | 1343 | undici-types@5.26.5: 1344 | resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} 1345 | 1346 | util-deprecate@1.0.2: 1347 | resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} 1348 | 1349 | uuid@10.0.0: 1350 | resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==} 1351 | hasBin: true 1352 | 1353 | uuid@9.0.1: 1354 | resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} 1355 | hasBin: true 1356 | 1357 | varint@6.0.0: 1358 | resolution: {integrity: sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==} 1359 | 1360 | web-streams-polyfill@3.3.3: 1361 | resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} 1362 | engines: {node: '>= 8'} 1363 | 1364 | web-streams-polyfill@4.0.0-beta.3: 1365 | resolution: {integrity: sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==} 1366 | engines: {node: '>= 14'} 1367 | 1368 | webidl-conversions@3.0.1: 1369 | resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} 1370 | 1371 | whatwg-fetch@3.6.20: 1372 | resolution: {integrity: sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==} 1373 | 1374 | whatwg-url@5.0.0: 1375 | resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} 1376 | 1377 | yaml@2.4.5: 1378 | resolution: {integrity: sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==} 1379 | engines: {node: '>= 14'} 1380 | hasBin: true 1381 | 1382 | zod-to-json-schema@3.23.1: 1383 | resolution: {integrity: sha512-oT9INvydob1XV0v1d2IadrR74rLtDInLvDFfAa1CG0Pmg/vxATk7I2gSelfj271mbzeM4Da0uuDQE/Nkj3DWNw==} 1384 | peerDependencies: 1385 | zod: ^3.23.3 1386 | 1387 | zod@3.23.8: 1388 | resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} 1389 | 1390 | snapshots: 1391 | 1392 | '@anthropic-ai/sdk@0.22.0': 1393 | dependencies: 1394 | '@types/node': 18.19.41 1395 | '@types/node-fetch': 2.6.11 1396 | abort-controller: 3.0.0 1397 | agentkeepalive: 4.5.0 1398 | form-data-encoder: 1.7.2 1399 | formdata-node: 4.4.1 1400 | node-fetch: 2.7.0 1401 | web-streams-polyfill: 3.3.3 1402 | transitivePeerDependencies: 1403 | - encoding 1404 | 1405 | '@bufbuild/protobuf@1.10.0': {} 1406 | 1407 | '@cloudflare/ai@1.2.2': 1408 | optional: true 1409 | 1410 | '@esbuild/aix-ppc64@0.21.5': 1411 | optional: true 1412 | 1413 | '@esbuild/android-arm64@0.21.5': 1414 | optional: true 1415 | 1416 | '@esbuild/android-arm@0.21.5': 1417 | optional: true 1418 | 1419 | '@esbuild/android-x64@0.21.5': 1420 | optional: true 1421 | 1422 | '@esbuild/darwin-arm64@0.21.5': 1423 | optional: true 1424 | 1425 | '@esbuild/darwin-x64@0.21.5': 1426 | optional: true 1427 | 1428 | '@esbuild/freebsd-arm64@0.21.5': 1429 | optional: true 1430 | 1431 | '@esbuild/freebsd-x64@0.21.5': 1432 | optional: true 1433 | 1434 | '@esbuild/linux-arm64@0.21.5': 1435 | optional: true 1436 | 1437 | '@esbuild/linux-arm@0.21.5': 1438 | optional: true 1439 | 1440 | '@esbuild/linux-ia32@0.21.5': 1441 | optional: true 1442 | 1443 | '@esbuild/linux-loong64@0.21.5': 1444 | optional: true 1445 | 1446 | '@esbuild/linux-mips64el@0.21.5': 1447 | optional: true 1448 | 1449 | '@esbuild/linux-ppc64@0.21.5': 1450 | optional: true 1451 | 1452 | '@esbuild/linux-riscv64@0.21.5': 1453 | optional: true 1454 | 1455 | '@esbuild/linux-s390x@0.21.5': 1456 | optional: true 1457 | 1458 | '@esbuild/linux-x64@0.21.5': 1459 | optional: true 1460 | 1461 | '@esbuild/netbsd-x64@0.21.5': 1462 | optional: true 1463 | 1464 | '@esbuild/openbsd-x64@0.21.5': 1465 | optional: true 1466 | 1467 | '@esbuild/sunos-x64@0.21.5': 1468 | optional: true 1469 | 1470 | '@esbuild/win32-arm64@0.21.5': 1471 | optional: true 1472 | 1473 | '@esbuild/win32-ia32@0.21.5': 1474 | optional: true 1475 | 1476 | '@esbuild/win32-x64@0.21.5': 1477 | optional: true 1478 | 1479 | '@google/generative-ai@0.13.0': {} 1480 | 1481 | '@google/generative-ai@0.7.1': {} 1482 | 1483 | '@langchain/anthropic@0.2.6(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0)': 1484 | dependencies: 1485 | '@anthropic-ai/sdk': 0.22.0 1486 | '@langchain/core': 0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0) 1487 | fast-xml-parser: 4.4.0 1488 | zod: 3.23.8 1489 | zod-to-json-schema: 3.23.1(zod@3.23.8) 1490 | transitivePeerDependencies: 1491 | - encoding 1492 | - langchain 1493 | - openai 1494 | 1495 | '@langchain/community@0.2.20(@cloudflare/ai@1.2.2)(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0)': 1496 | dependencies: 1497 | '@langchain/core': 0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0) 1498 | '@langchain/openai': 0.1.3(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0)) 1499 | binary-extensions: 2.3.0 1500 | expr-eval: 2.0.2 1501 | flat: 5.0.2 1502 | js-yaml: 4.1.0 1503 | langchain: 0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0) 1504 | langsmith: 0.1.39(@langchain/core@0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0))(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0) 1505 | uuid: 10.0.0 1506 | zod: 3.23.8 1507 | zod-to-json-schema: 3.23.1(zod@3.23.8) 1508 | optionalDependencies: 1509 | '@cloudflare/ai': 1.2.2 1510 | transitivePeerDependencies: 1511 | - '@gomomento/sdk-web' 1512 | - axios 1513 | - encoding 1514 | - fast-xml-parser 1515 | - handlebars 1516 | - openai 1517 | - peggy 1518 | - pyodide 1519 | 1520 | '@langchain/core@0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0)': 1521 | dependencies: 1522 | ansi-styles: 5.2.0 1523 | camelcase: 6.3.0 1524 | decamelize: 1.2.0 1525 | js-tiktoken: 1.0.12 1526 | langsmith: 0.1.39(@langchain/core@0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0))(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0) 1527 | ml-distance: 4.0.1 1528 | mustache: 4.2.0 1529 | p-queue: 6.6.2 1530 | p-retry: 4.6.2 1531 | uuid: 10.0.0 1532 | zod: 3.23.8 1533 | zod-to-json-schema: 3.23.1(zod@3.23.8) 1534 | transitivePeerDependencies: 1535 | - langchain 1536 | - openai 1537 | 1538 | '@langchain/core@0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@4.52.7)': 1539 | dependencies: 1540 | ansi-styles: 5.2.0 1541 | camelcase: 6.3.0 1542 | decamelize: 1.2.0 1543 | js-tiktoken: 1.0.12 1544 | langsmith: 0.1.39(@langchain/core@0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@4.52.7))(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@4.52.7) 1545 | ml-distance: 4.0.1 1546 | mustache: 4.2.0 1547 | p-queue: 6.6.2 1548 | p-retry: 4.6.2 1549 | uuid: 10.0.0 1550 | zod: 3.23.8 1551 | zod-to-json-schema: 3.23.1(zod@3.23.8) 1552 | transitivePeerDependencies: 1553 | - langchain 1554 | - openai 1555 | 1556 | '@langchain/google-genai@0.0.16(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0)(zod@3.23.8)': 1557 | dependencies: 1558 | '@google/generative-ai': 0.7.1 1559 | '@langchain/core': 0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0) 1560 | zod-to-json-schema: 3.23.1(zod@3.23.8) 1561 | transitivePeerDependencies: 1562 | - langchain 1563 | - openai 1564 | - zod 1565 | 1566 | '@langchain/groq@0.0.12(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0)': 1567 | dependencies: 1568 | '@langchain/core': 0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0) 1569 | '@langchain/openai': 0.0.34(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0)) 1570 | groq-sdk: 0.3.3 1571 | zod: 3.23.8 1572 | zod-to-json-schema: 3.23.1(zod@3.23.8) 1573 | transitivePeerDependencies: 1574 | - encoding 1575 | - langchain 1576 | - openai 1577 | 1578 | '@langchain/mistralai@0.0.23(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0)': 1579 | dependencies: 1580 | '@langchain/core': 0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0) 1581 | '@mistralai/mistralai': 0.4.0 1582 | uuid: 9.0.1 1583 | zod: 3.23.8 1584 | zod-to-json-schema: 3.23.1(zod@3.23.8) 1585 | transitivePeerDependencies: 1586 | - encoding 1587 | - langchain 1588 | - openai 1589 | 1590 | '@langchain/openai@0.0.34(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))': 1591 | dependencies: 1592 | '@langchain/core': 0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@4.52.7) 1593 | js-tiktoken: 1.0.12 1594 | openai: 4.52.7 1595 | zod: 3.23.8 1596 | zod-to-json-schema: 3.23.1(zod@3.23.8) 1597 | transitivePeerDependencies: 1598 | - encoding 1599 | - langchain 1600 | 1601 | '@langchain/openai@0.1.3(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))': 1602 | dependencies: 1603 | '@langchain/core': 0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@4.52.7) 1604 | js-tiktoken: 1.0.12 1605 | openai: 4.52.7 1606 | zod: 3.23.8 1607 | zod-to-json-schema: 3.23.1(zod@3.23.8) 1608 | transitivePeerDependencies: 1609 | - encoding 1610 | - langchain 1611 | 1612 | '@langchain/textsplitters@0.0.3(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0)': 1613 | dependencies: 1614 | '@langchain/core': 0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0) 1615 | js-tiktoken: 1.0.12 1616 | transitivePeerDependencies: 1617 | - langchain 1618 | - openai 1619 | 1620 | '@mistralai/mistralai@0.4.0': 1621 | dependencies: 1622 | node-fetch: 2.7.0 1623 | transitivePeerDependencies: 1624 | - encoding 1625 | 1626 | '@types/node-fetch@2.6.11': 1627 | dependencies: 1628 | '@types/node': 18.19.41 1629 | form-data: 4.0.0 1630 | 1631 | '@types/node@18.19.41': 1632 | dependencies: 1633 | undici-types: 5.26.5 1634 | 1635 | '@types/retry@0.12.0': {} 1636 | 1637 | '@types/uuid@9.0.8': {} 1638 | 1639 | abort-controller@3.0.0: 1640 | dependencies: 1641 | event-target-shim: 5.0.1 1642 | 1643 | agentkeepalive@4.5.0: 1644 | dependencies: 1645 | humanize-ms: 1.2.1 1646 | 1647 | ansi-styles@5.2.0: {} 1648 | 1649 | anymatch@3.1.3: 1650 | dependencies: 1651 | normalize-path: 3.0.0 1652 | picomatch: 2.3.1 1653 | 1654 | argparse@2.0.1: {} 1655 | 1656 | asynckit@0.4.0: {} 1657 | 1658 | axios@0.26.1: 1659 | dependencies: 1660 | follow-redirects: 1.15.6 1661 | transitivePeerDependencies: 1662 | - debug 1663 | 1664 | base-64@0.1.0: {} 1665 | 1666 | base64-js@1.5.1: {} 1667 | 1668 | binary-extensions@2.3.0: {} 1669 | 1670 | binary-search@1.3.6: {} 1671 | 1672 | blob-util@2.0.2: {} 1673 | 1674 | braces@3.0.3: 1675 | dependencies: 1676 | fill-range: 7.1.1 1677 | 1678 | buffer-builder@0.2.0: {} 1679 | 1680 | camelcase@6.3.0: {} 1681 | 1682 | charenc@0.0.2: {} 1683 | 1684 | chokidar@3.6.0: 1685 | dependencies: 1686 | anymatch: 3.1.3 1687 | braces: 3.0.3 1688 | glob-parent: 5.1.2 1689 | is-binary-path: 2.1.0 1690 | is-glob: 4.0.3 1691 | normalize-path: 3.0.0 1692 | readdirp: 3.6.0 1693 | optionalDependencies: 1694 | fsevents: 2.3.3 1695 | 1696 | combined-stream@1.0.8: 1697 | dependencies: 1698 | delayed-stream: 1.0.0 1699 | 1700 | commander@10.0.1: {} 1701 | 1702 | copy-to-clipboard@3.3.3: 1703 | dependencies: 1704 | toggle-selection: 1.0.6 1705 | 1706 | core-util-is@1.0.3: {} 1707 | 1708 | crypt@0.0.2: {} 1709 | 1710 | decamelize@1.2.0: {} 1711 | 1712 | delayed-stream@1.0.0: {} 1713 | 1714 | digest-fetch@1.3.0: 1715 | dependencies: 1716 | base-64: 0.1.0 1717 | md5: 2.3.0 1718 | 1719 | entities@3.0.1: {} 1720 | 1721 | esbuild-sass-plugin@3.3.1(esbuild@0.21.5)(sass-embedded@1.77.2): 1722 | dependencies: 1723 | esbuild: 0.21.5 1724 | resolve: 1.22.8 1725 | safe-identifier: 0.4.2 1726 | sass: 1.77.8 1727 | sass-embedded: 1.77.2 1728 | 1729 | esbuild@0.21.5: 1730 | optionalDependencies: 1731 | '@esbuild/aix-ppc64': 0.21.5 1732 | '@esbuild/android-arm': 0.21.5 1733 | '@esbuild/android-arm64': 0.21.5 1734 | '@esbuild/android-x64': 0.21.5 1735 | '@esbuild/darwin-arm64': 0.21.5 1736 | '@esbuild/darwin-x64': 0.21.5 1737 | '@esbuild/freebsd-arm64': 0.21.5 1738 | '@esbuild/freebsd-x64': 0.21.5 1739 | '@esbuild/linux-arm': 0.21.5 1740 | '@esbuild/linux-arm64': 0.21.5 1741 | '@esbuild/linux-ia32': 0.21.5 1742 | '@esbuild/linux-loong64': 0.21.5 1743 | '@esbuild/linux-mips64el': 0.21.5 1744 | '@esbuild/linux-ppc64': 0.21.5 1745 | '@esbuild/linux-riscv64': 0.21.5 1746 | '@esbuild/linux-s390x': 0.21.5 1747 | '@esbuild/linux-x64': 0.21.5 1748 | '@esbuild/netbsd-x64': 0.21.5 1749 | '@esbuild/openbsd-x64': 0.21.5 1750 | '@esbuild/sunos-x64': 0.21.5 1751 | '@esbuild/win32-arm64': 0.21.5 1752 | '@esbuild/win32-ia32': 0.21.5 1753 | '@esbuild/win32-x64': 0.21.5 1754 | 1755 | event-target-shim@5.0.1: {} 1756 | 1757 | eventemitter3@4.0.7: {} 1758 | 1759 | expr-eval@2.0.2: {} 1760 | 1761 | fast-xml-parser@4.4.0: 1762 | dependencies: 1763 | strnum: 1.0.5 1764 | 1765 | fill-range@7.1.1: 1766 | dependencies: 1767 | to-regex-range: 5.0.1 1768 | 1769 | flat@5.0.2: {} 1770 | 1771 | follow-redirects@1.15.6: {} 1772 | 1773 | form-data-encoder@1.7.2: {} 1774 | 1775 | form-data@4.0.0: 1776 | dependencies: 1777 | asynckit: 0.4.0 1778 | combined-stream: 1.0.8 1779 | mime-types: 2.1.35 1780 | 1781 | formdata-node@4.4.1: 1782 | dependencies: 1783 | node-domexception: 1.0.0 1784 | web-streams-polyfill: 4.0.0-beta.3 1785 | 1786 | fsevents@2.3.3: 1787 | optional: true 1788 | 1789 | function-bind@1.1.2: {} 1790 | 1791 | glob-parent@5.1.2: 1792 | dependencies: 1793 | is-glob: 4.0.3 1794 | 1795 | groq-sdk@0.3.3: 1796 | dependencies: 1797 | '@types/node': 18.19.41 1798 | '@types/node-fetch': 2.6.11 1799 | abort-controller: 3.0.0 1800 | agentkeepalive: 4.5.0 1801 | digest-fetch: 1.3.0 1802 | form-data-encoder: 1.7.2 1803 | formdata-node: 4.4.1 1804 | node-fetch: 2.7.0 1805 | web-streams-polyfill: 3.3.3 1806 | transitivePeerDependencies: 1807 | - encoding 1808 | 1809 | has-flag@4.0.0: {} 1810 | 1811 | hasown@2.0.2: 1812 | dependencies: 1813 | function-bind: 1.1.2 1814 | 1815 | highlight.js@11.10.0: {} 1816 | 1817 | html-tag-js@1.5.1: {} 1818 | 1819 | humanize-ms@1.2.1: 1820 | dependencies: 1821 | ms: 2.1.3 1822 | 1823 | immediate@3.0.6: {} 1824 | 1825 | immutable@4.3.6: {} 1826 | 1827 | inherits@2.0.4: {} 1828 | 1829 | is-any-array@2.0.1: {} 1830 | 1831 | is-binary-path@2.1.0: 1832 | dependencies: 1833 | binary-extensions: 2.3.0 1834 | 1835 | is-buffer@1.1.6: {} 1836 | 1837 | is-core-module@2.15.0: 1838 | dependencies: 1839 | hasown: 2.0.2 1840 | 1841 | is-extglob@2.1.1: {} 1842 | 1843 | is-glob@4.0.3: 1844 | dependencies: 1845 | is-extglob: 2.1.1 1846 | 1847 | is-number@7.0.0: {} 1848 | 1849 | isarray@1.0.0: {} 1850 | 1851 | js-tiktoken@1.0.12: 1852 | dependencies: 1853 | base64-js: 1.5.1 1854 | 1855 | js-yaml@4.1.0: 1856 | dependencies: 1857 | argparse: 2.0.1 1858 | 1859 | jsonpointer@5.0.1: {} 1860 | 1861 | jszip@3.10.1: 1862 | dependencies: 1863 | lie: 3.3.0 1864 | pako: 1.0.11 1865 | readable-stream: 2.3.8 1866 | setimmediate: 1.0.5 1867 | 1868 | langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0): 1869 | dependencies: 1870 | '@langchain/core': 0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0) 1871 | '@langchain/openai': 0.1.3(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0)) 1872 | '@langchain/textsplitters': 0.0.3(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0) 1873 | binary-extensions: 2.3.0 1874 | js-tiktoken: 1.0.12 1875 | js-yaml: 4.1.0 1876 | jsonpointer: 5.0.1 1877 | langchainhub: 0.0.11 1878 | langsmith: 0.1.39(@langchain/core@0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0))(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0) 1879 | ml-distance: 4.0.1 1880 | openapi-types: 12.1.3 1881 | p-retry: 4.6.2 1882 | uuid: 10.0.0 1883 | yaml: 2.4.5 1884 | zod: 3.23.8 1885 | zod-to-json-schema: 3.23.1(zod@3.23.8) 1886 | optionalDependencies: 1887 | axios: 0.26.1 1888 | fast-xml-parser: 4.4.0 1889 | transitivePeerDependencies: 1890 | - encoding 1891 | - openai 1892 | 1893 | langchainhub@0.0.11: {} 1894 | 1895 | langsmith@0.1.39(@langchain/core@0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0))(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0): 1896 | dependencies: 1897 | '@types/uuid': 9.0.8 1898 | commander: 10.0.1 1899 | p-queue: 6.6.2 1900 | p-retry: 4.6.2 1901 | uuid: 9.0.1 1902 | optionalDependencies: 1903 | '@langchain/core': 0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@3.3.0) 1904 | langchain: 0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0) 1905 | openai: 3.3.0 1906 | 1907 | langsmith@0.1.39(@langchain/core@0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@4.52.7))(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@4.52.7): 1908 | dependencies: 1909 | '@types/uuid': 9.0.8 1910 | commander: 10.0.1 1911 | p-queue: 6.6.2 1912 | p-retry: 4.6.2 1913 | uuid: 9.0.1 1914 | optionalDependencies: 1915 | '@langchain/core': 0.2.17(langchain@0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0))(openai@4.52.7) 1916 | langchain: 0.2.10(axios@0.26.1)(fast-xml-parser@4.4.0)(openai@3.3.0) 1917 | openai: 4.52.7 1918 | 1919 | lie@3.3.0: 1920 | dependencies: 1921 | immediate: 3.0.6 1922 | 1923 | linkify-it@4.0.1: 1924 | dependencies: 1925 | uc.micro: 1.0.6 1926 | 1927 | markdown-it@13.0.2: 1928 | dependencies: 1929 | argparse: 2.0.1 1930 | entities: 3.0.1 1931 | linkify-it: 4.0.1 1932 | mdurl: 1.0.1 1933 | uc.micro: 1.0.6 1934 | 1935 | md5@2.3.0: 1936 | dependencies: 1937 | charenc: 0.0.2 1938 | crypt: 0.0.2 1939 | is-buffer: 1.1.6 1940 | 1941 | mdurl@1.0.1: {} 1942 | 1943 | mime-db@1.52.0: {} 1944 | 1945 | mime-types@2.1.35: 1946 | dependencies: 1947 | mime-db: 1.52.0 1948 | 1949 | ml-array-mean@1.1.6: 1950 | dependencies: 1951 | ml-array-sum: 1.1.6 1952 | 1953 | ml-array-sum@1.1.6: 1954 | dependencies: 1955 | is-any-array: 2.0.1 1956 | 1957 | ml-distance-euclidean@2.0.0: {} 1958 | 1959 | ml-distance@4.0.1: 1960 | dependencies: 1961 | ml-array-mean: 1.1.6 1962 | ml-distance-euclidean: 2.0.0 1963 | ml-tree-similarity: 1.0.0 1964 | 1965 | ml-tree-similarity@1.0.0: 1966 | dependencies: 1967 | binary-search: 1.3.6 1968 | num-sort: 2.1.0 1969 | 1970 | ms@2.1.3: {} 1971 | 1972 | mustache@4.2.0: {} 1973 | 1974 | node-domexception@1.0.0: {} 1975 | 1976 | node-fetch@2.7.0: 1977 | dependencies: 1978 | whatwg-url: 5.0.0 1979 | 1980 | normalize-path@3.0.0: {} 1981 | 1982 | num-sort@2.1.0: {} 1983 | 1984 | ollama@0.5.6: 1985 | dependencies: 1986 | whatwg-fetch: 3.6.20 1987 | 1988 | openai@3.3.0: 1989 | dependencies: 1990 | axios: 0.26.1 1991 | form-data: 4.0.0 1992 | transitivePeerDependencies: 1993 | - debug 1994 | 1995 | openai@4.52.7: 1996 | dependencies: 1997 | '@types/node': 18.19.41 1998 | '@types/node-fetch': 2.6.11 1999 | abort-controller: 3.0.0 2000 | agentkeepalive: 4.5.0 2001 | form-data-encoder: 1.7.2 2002 | formdata-node: 4.4.1 2003 | node-fetch: 2.7.0 2004 | web-streams-polyfill: 3.3.3 2005 | transitivePeerDependencies: 2006 | - encoding 2007 | 2008 | openapi-types@12.1.3: {} 2009 | 2010 | p-finally@1.0.0: {} 2011 | 2012 | p-queue@6.6.2: 2013 | dependencies: 2014 | eventemitter3: 4.0.7 2015 | p-timeout: 3.2.0 2016 | 2017 | p-retry@4.6.2: 2018 | dependencies: 2019 | '@types/retry': 0.12.0 2020 | retry: 0.13.1 2021 | 2022 | p-timeout@3.2.0: 2023 | dependencies: 2024 | p-finally: 1.0.0 2025 | 2026 | pako@1.0.11: {} 2027 | 2028 | path-parse@1.0.7: {} 2029 | 2030 | picomatch@2.3.1: {} 2031 | 2032 | process-nextick-args@2.0.1: {} 2033 | 2034 | readable-stream@2.3.8: 2035 | dependencies: 2036 | core-util-is: 1.0.3 2037 | inherits: 2.0.4 2038 | isarray: 1.0.0 2039 | process-nextick-args: 2.0.1 2040 | safe-buffer: 5.1.2 2041 | string_decoder: 1.1.1 2042 | util-deprecate: 1.0.2 2043 | 2044 | readdirp@3.6.0: 2045 | dependencies: 2046 | picomatch: 2.3.1 2047 | 2048 | resolve@1.22.8: 2049 | dependencies: 2050 | is-core-module: 2.15.0 2051 | path-parse: 1.0.7 2052 | supports-preserve-symlinks-flag: 1.0.0 2053 | 2054 | retry@0.13.1: {} 2055 | 2056 | rxjs@7.8.1: 2057 | dependencies: 2058 | tslib: 2.6.3 2059 | 2060 | safe-buffer@5.1.2: {} 2061 | 2062 | safe-identifier@0.4.2: {} 2063 | 2064 | sass-embedded-android-arm64@1.77.2: 2065 | optional: true 2066 | 2067 | sass-embedded-android-arm@1.77.2: 2068 | optional: true 2069 | 2070 | sass-embedded-android-ia32@1.77.2: 2071 | optional: true 2072 | 2073 | sass-embedded-android-x64@1.77.2: 2074 | optional: true 2075 | 2076 | sass-embedded-darwin-arm64@1.77.2: 2077 | optional: true 2078 | 2079 | sass-embedded-darwin-x64@1.77.2: 2080 | optional: true 2081 | 2082 | sass-embedded-linux-arm64@1.77.2: 2083 | optional: true 2084 | 2085 | sass-embedded-linux-arm@1.77.2: 2086 | optional: true 2087 | 2088 | sass-embedded-linux-ia32@1.77.2: 2089 | optional: true 2090 | 2091 | sass-embedded-linux-musl-arm64@1.77.2: 2092 | optional: true 2093 | 2094 | sass-embedded-linux-musl-arm@1.77.2: 2095 | optional: true 2096 | 2097 | sass-embedded-linux-musl-ia32@1.77.2: 2098 | optional: true 2099 | 2100 | sass-embedded-linux-musl-x64@1.77.2: 2101 | optional: true 2102 | 2103 | sass-embedded-linux-x64@1.77.2: 2104 | optional: true 2105 | 2106 | sass-embedded-win32-arm64@1.77.2: 2107 | optional: true 2108 | 2109 | sass-embedded-win32-ia32@1.77.2: 2110 | optional: true 2111 | 2112 | sass-embedded-win32-x64@1.77.2: 2113 | optional: true 2114 | 2115 | sass-embedded@1.77.2: 2116 | dependencies: 2117 | '@bufbuild/protobuf': 1.10.0 2118 | buffer-builder: 0.2.0 2119 | immutable: 4.3.6 2120 | rxjs: 7.8.1 2121 | supports-color: 8.1.1 2122 | varint: 6.0.0 2123 | optionalDependencies: 2124 | sass-embedded-android-arm: 1.77.2 2125 | sass-embedded-android-arm64: 1.77.2 2126 | sass-embedded-android-ia32: 1.77.2 2127 | sass-embedded-android-x64: 1.77.2 2128 | sass-embedded-darwin-arm64: 1.77.2 2129 | sass-embedded-darwin-x64: 1.77.2 2130 | sass-embedded-linux-arm: 1.77.2 2131 | sass-embedded-linux-arm64: 1.77.2 2132 | sass-embedded-linux-ia32: 1.77.2 2133 | sass-embedded-linux-musl-arm: 1.77.2 2134 | sass-embedded-linux-musl-arm64: 1.77.2 2135 | sass-embedded-linux-musl-ia32: 1.77.2 2136 | sass-embedded-linux-musl-x64: 1.77.2 2137 | sass-embedded-linux-x64: 1.77.2 2138 | sass-embedded-win32-arm64: 1.77.2 2139 | sass-embedded-win32-ia32: 1.77.2 2140 | sass-embedded-win32-x64: 1.77.2 2141 | 2142 | sass@1.77.8: 2143 | dependencies: 2144 | chokidar: 3.6.0 2145 | immutable: 4.3.6 2146 | source-map-js: 1.2.0 2147 | 2148 | setimmediate@1.0.5: {} 2149 | 2150 | source-map-js@1.2.0: {} 2151 | 2152 | string_decoder@1.1.1: 2153 | dependencies: 2154 | safe-buffer: 5.1.2 2155 | 2156 | strnum@1.0.5: {} 2157 | 2158 | supports-color@8.1.1: 2159 | dependencies: 2160 | has-flag: 4.0.0 2161 | 2162 | supports-preserve-symlinks-flag@1.0.0: {} 2163 | 2164 | to-regex-range@5.0.1: 2165 | dependencies: 2166 | is-number: 7.0.0 2167 | 2168 | toggle-selection@1.0.6: {} 2169 | 2170 | tr46@0.0.3: {} 2171 | 2172 | tslib@2.6.3: {} 2173 | 2174 | uc.micro@1.0.6: {} 2175 | 2176 | undici-types@5.26.5: {} 2177 | 2178 | util-deprecate@1.0.2: {} 2179 | 2180 | uuid@10.0.0: {} 2181 | 2182 | uuid@9.0.1: {} 2183 | 2184 | varint@6.0.0: {} 2185 | 2186 | web-streams-polyfill@3.3.3: {} 2187 | 2188 | web-streams-polyfill@4.0.0-beta.3: {} 2189 | 2190 | webidl-conversions@3.0.1: {} 2191 | 2192 | whatwg-fetch@3.6.20: {} 2193 | 2194 | whatwg-url@5.0.0: 2195 | dependencies: 2196 | tr46: 0.0.3 2197 | webidl-conversions: 3.0.1 2198 | 2199 | yaml@2.4.5: {} 2200 | 2201 | zod-to-json-schema@3.23.1(zod@3.23.8): 2202 | dependencies: 2203 | zod: 3.23.8 2204 | 2205 | zod@3.23.8: {} 2206 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | AI Assistant Beta 2 | ========= 3 | > Rewritten ChatGPT plugin 4 | 5 | AI Assistant plugin for Acode for all the ai related stuffs with support of wide range of models. 6 | 7 | > Work in progress... 8 | 9 | **Note:** This is beta version but features are kind off stable and usable.(But many stuffs are still missing check todo section) 10 | 11 | ## Supported Providers 12 | 13 | - [OpenAi](https://platform.openai.com/account/api-keys) 🙂 14 | - [Google](https://makersuite.google.com/app/apikey) 😍 15 | - [Ollama](https://ollama.com/) 😍 16 | - [Groq](https://console.groq.com/keys) 😍 17 | - [Mistral](https://mistral.ai/) 😕 18 | - [Anthropic](https://www.anthropic.com/api) 😕 19 | 20 | ### Emoji Code Docs 21 | 22 | - 😍 : Best and Recommended for beginners 23 | - 🙂 : Costly 24 | - 😕 : It will work but currently not added because I don't have key to test it. 25 | 26 | ## Usage (for contributors) 27 | 28 | - Clone the repo 29 | - `pnpm install` 30 | - `pnpm build` 31 | - then it will produce a `AI.zip`, just install it inside acode using local method 32 | 33 | Features 34 | ----------- 35 | 36 | - User-friendly interface for easy communication with AI 37 | - AI remembers previous responses to provide more personalized suggestions 38 | - View Chat History 39 | - Syntax highlighting and markdown styling, etc 40 | 41 | ## Todo 42 | 43 | - [x] encrypt the api key and then save it securely 44 | - [x] Implement multiple model providers for increased versatility 45 | - [x] Enhance history mechanism and introduce history context for AI interactions 46 | - [x] Optimize history trimming to selectively share context without revealing entire history 47 | - [x] Add user interface option for direct selection of model providers or specific models 48 | - [ ] Integrate support for current file context to enhance AI responses 49 | - [ ] Rewrite image generation feature to improve functionality and performance 50 | - [ ] Implement quick access options directly within the editor interface 51 | - [ ] Display available tokens and usage details in the chat interface 52 | - [ ] Improve logging mechanism for better transparency and troubleshooting 53 | - [x] Beautify and refactor codebase for improved readability and maintainability* 54 | 55 | How to use: 56 | ----------- 57 | 58 | To use AI Assistant, simply search for `"AI Assistant"` in the **command palette (Ctrl-Shift-P)** to open the chat interface. From there, you can communicate with the AI and receive helpful suggestions and solutions. 59 | 60 | First, it will prompt you for a passphrase (remember it), which will be used to securely save the API key. Then, it will ask you to select a provider and enter the API key for that provider. It will load the available models on your account. Select the model and start the communication. 61 | 62 | **Note**: You can change providers or models from the chat interface by using the triple vertical dots icon. 63 | 64 | Contributing 65 | ----------- 66 | 67 | If you're interested in contributing to the development of AI Assistant plugin, you can do so by submitting issues or pull requests. 68 | 69 | Checkout Todos and help in implementing those. 70 | 71 | Contributers 72 | ----------- 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/api_key.js: -------------------------------------------------------------------------------- 1 | export class APIKeyManager { 2 | constructor(secret) { 3 | this.secret = secret; // Secret passphrase for encryption/decryption 4 | } 5 | 6 | // Utility to encode a string as an ArrayBuffer 7 | _encode(text) { 8 | const encoder = new TextEncoder(); 9 | return encoder.encode(text); 10 | } 11 | 12 | // Utility to decode an ArrayBuffer to a string 13 | _decode(buffer) { 14 | const decoder = new TextDecoder(); 15 | return decoder.decode(buffer); 16 | } 17 | 18 | // Utility to import a key for AES-GCM 19 | async _importKey(secret) { 20 | const keyMaterial = await crypto.subtle.importKey( 21 | "raw", 22 | this._encode(secret), 23 | { name: "PBKDF2" }, 24 | false, 25 | ["deriveKey"] 26 | ); 27 | const key = await crypto.subtle.deriveKey( 28 | { 29 | name: "PBKDF2", 30 | salt: this._encode("salt"), 31 | iterations: 100000, 32 | hash: "SHA-256" 33 | }, 34 | keyMaterial, 35 | { name: "AES-GCM", length: 256 }, 36 | true, 37 | ["encrypt", "decrypt"] 38 | ); 39 | return key; 40 | } 41 | 42 | // Encrypt a value using AES-GCM 43 | async _encrypt(value) { 44 | const key = await this._importKey(this.secret); 45 | const iv = crypto.getRandomValues(new Uint8Array(12)); // Initialization vector 46 | const encrypted = await crypto.subtle.encrypt( 47 | { 48 | name: "AES-GCM", 49 | iv: iv 50 | }, 51 | key, 52 | this._encode(value) 53 | ); 54 | return { iv, encrypted }; 55 | } 56 | 57 | // Decrypt a value using AES-GCM 58 | async _decrypt(encrypted, iv) { 59 | const key = await this._importKey(this.secret); 60 | const decrypted = await crypto.subtle.decrypt( 61 | { 62 | name: "AES-GCM", 63 | iv: iv 64 | }, 65 | key, 66 | encrypted 67 | ); 68 | return this._decode(decrypted); 69 | } 70 | 71 | // Save API key 72 | async saveAPIKey(provider, apiKey) { 73 | const { iv, encrypted } = await this._encrypt(apiKey); 74 | const storageValue = { 75 | iv: Array.from(iv), 76 | encrypted: Array.from(new Uint8Array(encrypted)) 77 | }; 78 | localStorage.setItem(provider, JSON.stringify(storageValue)); 79 | } 80 | 81 | // Retrieve API key 82 | async getAPIKey(provider) { 83 | const storageValue = localStorage.getItem(provider); 84 | if (!storageValue) { 85 | return null; 86 | } 87 | const { iv, encrypted } = JSON.parse(storageValue); 88 | const decryptedKey = await this._decrypt( 89 | new Uint8Array(encrypted), 90 | new Uint8Array(iv) 91 | ); 92 | return decryptedKey; 93 | } 94 | 95 | // Delete API key 96 | deleteAPIKey(provider) { 97 | localStorage.removeItem(provider); 98 | } 99 | 100 | // Check if an API key exists 101 | apiKeyExists(provider) { 102 | return localStorage.getItem(provider) !== null; 103 | } 104 | } -------------------------------------------------------------------------------- /src/constants.js: -------------------------------------------------------------------------------- 1 | export const AI_PROVIDERS = [ 2 | "OpenAI", // just for formality and I have tested it with my friends api key so If you have api key then test it thoroughly and let me know about it 3 | // best when comes to pricing 4 | "Google", 5 | // great if your hardware is capable 6 | "Ollama", 7 | // Insane speed 8 | "Groq", 9 | // kind off paid and I think users also can't afford 10 | //"Deepseek", 11 | // I don't have key to test 12 | //"MistralAI", 13 | //"Anthropic", 14 | // due to security issue Cloudflare doesn't works on localhost but acode is on localhost 15 | //"Cloudflare Workers", 16 | ]; 17 | 18 | export const sendIconSvg = ``; 19 | 20 | export const copyIconSvg = ``; 21 | 22 | export const stopIconSvg = ``; 23 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import plugin from "../plugin.json"; 2 | import style from "./style.scss"; 3 | 4 | import { HarmBlockThreshold, HarmCategory } from "@google/generative-ai"; 5 | import { ChatOllama } from "@langchain/community/chat_models/ollama"; 6 | import { InMemoryChatMessageHistory } from "@langchain/core/chat_history"; 7 | import { AIMessage, HumanMessage, trimMessages } from "@langchain/core/messages"; 8 | import { StringOutputParser } from "@langchain/core/output_parsers"; 9 | import { ChatPromptTemplate } from "@langchain/core/prompts"; 10 | import { RunnableWithMessageHistory } from "@langchain/core/runnables"; 11 | import { ChatGoogleGenerativeAI } from "@langchain/google-genai"; 12 | import { ChatGroq } from "@langchain/groq"; 13 | import { ChatOpenAI } from "@langchain/openai"; 14 | 15 | import copy from "copy-to-clipboard"; 16 | import { v4 as uuidv4 } from "uuid"; 17 | import { APIKeyManager } from "./api_key"; 18 | import { AI_PROVIDERS, copyIconSvg, sendIconSvg, stopIconSvg } from "./constants"; 19 | import { getModelsFromProvider } from "./utils"; 20 | 21 | const multiPrompt = acode.require("multiPrompt"); 22 | const fs = acode.require("fs"); 23 | const select = acode.require("select"); 24 | const prompt = acode.require("prompt"); 25 | const DialogBox = acode.require("dialogBox"); 26 | const helpers = acode.require("helpers"); 27 | const loader = acode.require("loader"); 28 | const sidebarApps = acode.require("sidebarApps"); 29 | const toInternalUrl = acode.require("toInternalUrl"); 30 | const contextMenu = acode.require("contextMenu"); 31 | const selectionMenu = acode.require("selectionMenu"); 32 | const { editor } = editorManager; 33 | 34 | const AI_HISTORY_PATH = window.DATA_STORAGE + "chatgpt"; 35 | 36 | let CURRENT_SESSION_FILEPATH = null; 37 | 38 | class AIAssistant { 39 | async init($page) { 40 | /** 41 | * Scripts and styles for Highlighting 42 | * and formating ai response 43 | */ 44 | 45 | this.$githubDarkFile = tag("link", { 46 | rel: "stylesheet", 47 | href: this.baseUrl + "assets/github-dark.css", 48 | }); 49 | this.$higlightJsFile = tag("script", { 50 | src: this.baseUrl + "assets/highlight.min.js", 51 | }); 52 | this.$markdownItFile = tag("script", { 53 | src: this.baseUrl + "assets/markdown-it.min.js", 54 | }); 55 | // Global styles 56 | this.$style = tag("style", { 57 | textContent: style, 58 | }); 59 | document.head.append( 60 | this.$githubDarkFile, 61 | this.$higlightJsFile, 62 | this.$markdownItFile, 63 | this.$style, 64 | ); 65 | 66 | 67 | /** 68 | * Adding command for starting chatgpt 69 | * And updating its token 70 | */ 71 | 72 | editor.commands.addCommand({ 73 | name: "ai_assistant", 74 | description: "AI Assistant", 75 | exec: this.run.bind(this), 76 | }); 77 | 78 | selectionMenu.add(async () => { 79 | let opt = await select("AI Actions", ["Explain Code", "Rewrite", "Generate Code"], { 80 | onHide: () => { window.toast("Work is in progress...", 3000) } 81 | }) 82 | }, "✨", 'all'); 83 | 84 | $page.id = "acode-ai-assistant"; 85 | $page.settitle("AI Assistant"); 86 | this.$page = $page; 87 | const menuBtn = tag("span", { 88 | className: "icon more_vert", 89 | dataset: { 90 | action: "toggle-menu", 91 | }, 92 | }); 93 | 94 | const historyBtn = tag("span", { 95 | className: "icon historyrestore", 96 | dataset: { 97 | action: "history" 98 | } 99 | }); 100 | 101 | // button for new chat 102 | const newChatBtn = tag("span", { 103 | className: "icon add", 104 | dataset: { 105 | action: "new-chat", 106 | }, 107 | }); 108 | 109 | const insertContextBtn = tag("span", { 110 | //className: "icon linkinsert_link", 111 | className: "icon insert_invitationevent", 112 | dataset: { 113 | action: "insert-context", 114 | }, 115 | }); 116 | this.$page.header.append(newChatBtn, insertContextBtn, historyBtn, menuBtn); 117 | 118 | historyBtn.onclick = this.myHistory.bind(this); 119 | newChatBtn.onclick = this.newChat.bind(this); 120 | 121 | const contextMenuOption = { 122 | top: '35px', 123 | right: '10px', 124 | toggler: menuBtn, 125 | transformOrigin: 'top right', 126 | }; 127 | const $menu = contextMenu({ 128 | innerHTML: () => { 129 | return ` 130 |
  • Provider: ${window.localStorage.getItem("ai-assistant-provider")}
  • 131 |
  • Model: ${window.localStorage.getItem("ai-assistant-model-name")}
  • 132 | `; 133 | }, 134 | ...contextMenuOption 135 | }) 136 | $menu.onclick = async (e) => { 137 | $menu.hide(); 138 | const action = e.target.getAttribute('action'); 139 | switch (action) { 140 | case 'model-provider': 141 | let previousProvider = window.localStorage.getItem("ai-assistant-provider"); 142 | let providerSelectBox = await select("Select AI Provider", AI_PROVIDERS, { 143 | default: previousProvider || "" 144 | }); 145 | if (previousProvider != providerSelectBox) { 146 | // check for api key 147 | if (window.localStorage.getItem(providerSelectBox) === null) { 148 | let apiKey = 149 | providerSelectBox == AI_PROVIDERS[2] 150 | ? "No Need Of API Key" 151 | : await prompt("API key of selected provider", "", "text", { 152 | required: true, 153 | }); 154 | if (!apiKey) return; 155 | loader.showTitleLoader(); 156 | window.toast("Fetching available models from your account", 2000); 157 | let modelList = await getModelsFromProvider(providerSelectBox, apiKey); 158 | loader.removeTitleLoader(); 159 | let modelNme = await select("Select AI Model", modelList); 160 | window.localStorage.setItem("ai-assistant-provider", providerSelectBox); 161 | window.localStorage.setItem("ai-assistant-model-name", modelNme); 162 | await this.apiKeyManager.saveAPIKey(providerSelectBox, apiKey); 163 | this.initiateModel(providerSelectBox, apiKey, modelNme); 164 | this.newChat(); 165 | } else { 166 | let apiKey = await this.apiKeyManager.getAPIKey(providerSelectBox); 167 | this.initiateModel(providerSelectBox, apiKey, window.localStorage.getItem("ai-assistant-model-name")); 168 | this.newChat(); 169 | } 170 | } 171 | break; 172 | case 'model': 173 | loader.showTitleLoader(); 174 | window.toast("Fetching available models from your account", 2000); 175 | let apiKey = await this.apiKeyManager.getAPIKey(window.localStorage.getItem("ai-assistant-provider")); 176 | let modelList = await getModelsFromProvider(window.localStorage.getItem("ai-assistant-provider"), apiKey); 177 | loader.removeTitleLoader(); 178 | let modelNme = await select("Select AI Model", modelList, { 179 | default: window.localStorage.getItem("ai-assistant-model-name") || "" 180 | }); 181 | if (window.localStorage.getItem("ai-assistant-model-name") != modelNme) { 182 | window.localStorage.setItem("ai-assistant-model-name", modelNme); 183 | this.initiateModel(window.localStorage.getItem("ai-assistant-provider"), apiKey, modelNme); 184 | } 185 | break; 186 | } 187 | } 188 | 189 | const mainApp = tag("div", { 190 | className: "mainApp", 191 | }); 192 | // main chat box 193 | this.$chatBox = tag("div", { 194 | className: "chatBox", 195 | }); 196 | // bottom query taker box 197 | this.$inputBox = tag("div", { 198 | className: "inputBox", 199 | }); 200 | 201 | this.$chatTextarea = tag("textarea", { 202 | className: "chatTextarea", 203 | placeholder: "Type your query...", 204 | }); 205 | this.$sendBtn = tag("button", { 206 | className: "sendBtn", 207 | }); 208 | this.$sendBtn.innerHTML = sendIconSvg; 209 | this.$stopGenerationBtn = tag("button", { 210 | className: "stopGenerationBtn hide", 211 | }); 212 | this.$stopGenerationBtn.innerHTML = stopIconSvg; 213 | this.$stopGenerationBtn.onclick = this.stopGenerating.bind(this); 214 | this.$inputBox.append(this.$chatTextarea, this.$sendBtn, this.$stopGenerationBtn); 215 | mainApp.append(this.$inputBox, this.$chatBox); 216 | this.$page.append(mainApp); 217 | this.messageHistories = {}; 218 | this.messageSessionConfig = { 219 | configurable: { 220 | sessionId: uuidv4(), 221 | }, 222 | }; 223 | } 224 | 225 | async run() { 226 | try { 227 | let passPhrase; 228 | if (await fs(window.DATA_STORAGE + "secret.key").exists()) { 229 | passPhrase = await fs(window.DATA_STORAGE + "secret.key").readFile( 230 | "utf-8", 231 | ); 232 | } else { 233 | let secretPassphrase = await prompt( 234 | "Enter a secret pass pharse to save the api key", 235 | "", 236 | "text", 237 | { 238 | required: true, 239 | }, 240 | ); 241 | if (!secretPassphrase) return; 242 | passPhrase = secretPassphrase; 243 | } 244 | this.apiKeyManager = new APIKeyManager(passPhrase); 245 | let token; 246 | let providerNme = window.localStorage.getItem("ai-assistant-provider"); 247 | if (providerNme) { 248 | token = await this.apiKeyManager.getAPIKey(providerNme); 249 | } else { 250 | let modelProvider = await select("Select AI Provider", AI_PROVIDERS); 251 | // no prompt for api key in case of ollama 252 | let apiKey = 253 | modelProvider == AI_PROVIDERS[2] 254 | ? "No Need Of API Key" 255 | : await prompt("API key of selected provider", "", "text", { 256 | required: true, 257 | }); 258 | if (!apiKey) return; 259 | loader.showTitleLoader(); 260 | window.toast("Fetching available models from your account", 2000); 261 | let modelList = await getModelsFromProvider(modelProvider, apiKey); 262 | loader.removeTitleLoader(); 263 | const modelNme = await select("Select AI Model", modelList); 264 | 265 | window.localStorage.setItem("ai-assistant-provider", modelProvider); 266 | window.localStorage.setItem("ai-assistant-model-name", modelNme); 267 | providerNme = modelProvider; 268 | token = apiKey; 269 | await fs(window.DATA_STORAGE).createFile("secret.key", passPhrase); 270 | await this.apiKeyManager.saveAPIKey(providerNme, token); 271 | window.toast("Configuration saved 🎉", 3000); 272 | } 273 | 274 | let model = window.localStorage.getItem("ai-assistant-model-name"); 275 | 276 | this.initiateModel(providerNme, token, model) 277 | this.$mdIt = window.markdownit({ 278 | html: false, 279 | xhtmlOut: false, 280 | breaks: false, 281 | linkify: false, 282 | typographer: false, 283 | quotes: "“”‘’", 284 | highlight: function (str, lang) { 285 | const copyBtn = document.createElement("button"); 286 | copyBtn.classList.add("copy-button"); 287 | copyBtn.innerHTML = copyIconSvg; 288 | copyBtn.setAttribute("data-str", str); 289 | const codesArea = `
    ${hljs.highlightAuto(str).value
    290 |             }
    `; 291 | const codeBlock = `
    ${copyBtn.outerHTML}${codesArea}
    `; 292 | return codeBlock; 293 | }, 294 | }); 295 | 296 | this.$sendBtn.addEventListener("click", this.sendQuery.bind(this)); 297 | 298 | this.$page.show(); 299 | } catch (e) { 300 | console.log(e); 301 | } 302 | } 303 | 304 | initiateModel(providerNme, token, model) { 305 | switch (providerNme) { 306 | case AI_PROVIDERS[0]: 307 | this.modelInstance = new ChatOpenAI({ apiKey: token, model }); 308 | break; 309 | case AI_PROVIDERS[1]: 310 | this.modelInstance = new ChatGoogleGenerativeAI({ 311 | model, 312 | apiKey: token, 313 | safetySettings: [ 314 | { 315 | category: HarmCategory.HARM_CATEGORY_HARASSMENT, 316 | threshold: HarmBlockThreshold.BLOCK_LOW_AND_ABOVE, 317 | }, 318 | ], 319 | }); 320 | break; 321 | case AI_PROVIDERS[2]: 322 | // check local storage, if user want to provide custom host for ollama 323 | let baseUrl = window.localStorage.getItem("Ollama-Host") 324 | ? window.localStorage.getItem("Ollama-Host") 325 | : "http://localhost:11434"; 326 | this.modelInstance = new ChatOllama({ 327 | baseUrl, 328 | model 329 | }); 330 | break; 331 | case AI_PROVIDERS[3]: 332 | this.modelInstance = new ChatGroq({ 333 | apiKey: token, 334 | model, 335 | }); 336 | break; 337 | default: 338 | throw new Error("Unknown provider"); 339 | } 340 | } 341 | 342 | _sanitizeFileName(fileName) { 343 | /* 344 | utility function for removing special characters and 345 | white spaces from file names 346 | */ 347 | // Remove special characters and symbols 348 | const sanitizedFileName = fileName.replace(/[^\w\s.-]/gi, ""); 349 | // Trim leading and trailing spaces 350 | const trimmedFileName = sanitizedFileName.trim(); 351 | // Replace spaces with underscores 352 | const finalFileName = trimmedFileName.replace(/\s+/g, "_"); 353 | return finalFileName; 354 | } 355 | 356 | transformMessages(messages) { 357 | const result = messages 358 | .map((message, index) => { 359 | // Assuming every even-indexed element (0, 2, 4,...) is a human message 360 | // and the subsequent odd-indexed element (1, 3, 5,...) is its corresponding AI message 361 | if (index % 2 === 0 && index + 1 < messages.length) { 362 | return { 363 | prompt: messages[index].content, 364 | result: messages[index + 1].content, 365 | }; 366 | } else { 367 | return null; // Handle uneven or incomplete pairs if necessary 368 | } 369 | }) 370 | .filter((pair) => pair !== null); 371 | 372 | return result; 373 | } 374 | 375 | async saveHistory() { 376 | /* 377 | save chat history 378 | */ 379 | try { 380 | let sessionId = this.messageSessionConfig.configurable.sessionId; 381 | if (!this.messageHistories[sessionId].messages.length) { 382 | return; 383 | } 384 | 385 | if (CURRENT_SESSION_FILEPATH == null) { 386 | try { 387 | const sanitisedFileNme = this._sanitizeFileName( 388 | this.messageHistories[sessionId].messages[0].content.substring( 389 | 0, 390 | 30, 391 | ), 392 | ); 393 | const uniqueName = `${sanitisedFileNme}__${sessionId}.json`; 394 | 395 | if (!(await fs(AI_HISTORY_PATH).exists())) { 396 | await fs(window.DATA_STORAGE).createDirectory("chatgpt"); 397 | } 398 | let messages = await this.messageHistories[sessionId].getMessages(); 399 | const history = this.transformMessages(messages); 400 | CURRENT_SESSION_FILEPATH = await fs(AI_HISTORY_PATH).createFile( 401 | uniqueName, 402 | history, 403 | ); 404 | } catch (err) { 405 | alert(err.message); 406 | } 407 | } else { 408 | try { 409 | if (!(await fs(CURRENT_SESSION_FILEPATH).exists())) { 410 | this.newChat(); 411 | window.toast( 412 | "Some error occurred or file you trying to open has been deleted", 413 | ); 414 | return; 415 | } 416 | 417 | let messages = await this.messageHistories[sessionId].getMessages(); 418 | 419 | CURRENT_SESSION_FILEPATH = await fs( 420 | CURRENT_SESSION_FILEPATH, 421 | ).writeFile(this.transformMessages(messages)); 422 | } catch (err) { 423 | alert(err.message); 424 | } 425 | } 426 | } catch (err) { 427 | window.alert(err.message); 428 | } 429 | } 430 | 431 | newChat() { 432 | /* 433 | Start new chat session 434 | */ 435 | this.$chatBox.innerHTML = ""; 436 | window.toast("New session", 3000); 437 | this.messageHistories = {}; 438 | this.messageSessionConfig = { 439 | configurable: { 440 | sessionId: uuidv4(), 441 | }, 442 | }; 443 | CURRENT_SESSION_FILEPATH = null; 444 | } 445 | 446 | async getHistoryItems() { 447 | /* 448 | get list of history items 449 | */ 450 | if (await fs(AI_HISTORY_PATH).exists()) { 451 | const allFiles = await fs(AI_HISTORY_PATH).lsDir(); 452 | let elems = ""; 453 | for (let i = 0; i < allFiles.length; i++) { 454 | elems += `
  • 456 |

    ${allFiles[i].name 457 | .split("__")[0] 458 | .substring( 459 | 0, 460 | 25, 461 | )}...

    462 |
  • `; 463 | } 464 | return elems; 465 | } else { 466 | let elems = ""; 467 | elems = `
  • Not Available
  • `; 468 | return elems; 469 | } 470 | } 471 | 472 | extractUUID(str) { 473 | // the regex pattern for the UUID 474 | const uuidPattern = 475 | /([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})/; 476 | // Use the pattern to match the string 477 | const match = str.match(uuidPattern); 478 | // If a match is found, return it; otherwise, return null 479 | return match ? match[0] : null; 480 | } 481 | 482 | async displayHistory(url, historyDialogBox) { 483 | /* 484 | display selected chat history 485 | */ 486 | this.$chatBox.innerHTML = ""; 487 | const fileUrl = url.slice(1, url.length - 1); 488 | const sessionId = this.extractUUID(fileUrl); 489 | 490 | if (!sessionId) { 491 | this.newChat(); 492 | window.toast("Some error occurred"); 493 | return; 494 | } 495 | if (!(await fs(fileUrl).exists())) { 496 | this.newChat(); 497 | window.toast( 498 | "Some error occurred or file you trying to open has been deleted", 499 | ); 500 | return; 501 | } 502 | 503 | CURRENT_SESSION_FILEPATH = fileUrl; 504 | try { 505 | historyDialogBox.hide(); 506 | loader.create("Wait", "Fetching chat history...."); 507 | const fileData = await fs(fileUrl).readFile(); 508 | const responses = JSON.parse(await helpers.decodeText(fileData)); 509 | this.messageHistories = {}; 510 | this.messageHistories[sessionId] = new InMemoryChatMessageHistory(); 511 | let messages = responses.flatMap((pair) => [ 512 | new HumanMessage({ content: pair.prompt }), 513 | new AIMessage({ content: pair.result }), 514 | ]); 515 | await this.messageHistories[sessionId].addMessages(messages); 516 | this.messageSessionConfig = { 517 | configurable: { 518 | sessionId, 519 | }, 520 | }; 521 | 522 | responses.forEach((e) => { 523 | this.appendUserQuery(e.prompt); 524 | this.appendGptResponse(e.result); 525 | }); 526 | loader.destroy(); 527 | } catch (err) { 528 | loader.destroy(); 529 | console.error(err.message); 530 | } 531 | } 532 | 533 | async myHistory() { 534 | /* 535 | show conversation history 536 | */ 537 | try { 538 | const historyList = await this.getHistoryItems(); 539 | const content = ``; 540 | const historyDialogBox = DialogBox( 541 | "Conversation History", 542 | content, 543 | "Cancel", 544 | ); 545 | 546 | historyDialogBox.onclick(async (e) => { 547 | const dialogItem = e.target.closest(".dialog-item"); 548 | const deleteButton = dialogItem.querySelector(".delete-history-btn"); 549 | const historyItem = dialogItem.querySelector(".history-item"); 550 | if (dialogItem.getAttribute("data-path") == "#not-available") { 551 | return; 552 | } 553 | if (!dialogItem.getAttribute("data-path")) { 554 | return; 555 | } 556 | if (e.target === dialogItem || e.target === historyItem) { 557 | const fileUrl = JSON.stringify(dialogItem.getAttribute("data-path")); 558 | this.displayHistory(fileUrl, historyDialogBox); 559 | } else if (e.target === deleteButton) { 560 | const fileUrl = JSON.stringify(dialogItem.getAttribute("data-path")); 561 | const url = fileUrl.slice(1, fileUrl.length - 1); 562 | 563 | await fs(dialogItem.getAttribute("data-path")).delete(); 564 | //alert(CURRENT_SESSION_FILEPATH); 565 | 566 | if (CURRENT_SESSION_FILEPATH == url) { 567 | const chatBox = document.querySelector(".chatBox"); 568 | chatBox.innerHTML = ""; 569 | this.messageHistories = {}; 570 | this.messageSessionConfig = { 571 | configurable: { 572 | sessionId: uuidv4(), 573 | }, 574 | }; 575 | } 576 | 577 | dialogItem.remove(); 578 | window.toast("Deleted", 3000); 579 | CURRENT_SESSION_FILEPATH = null; 580 | } 581 | }); 582 | } catch (err) { 583 | window.alert(err.message); 584 | } 585 | } 586 | 587 | async sendQuery() { 588 | /* 589 | event on clicking send prompt button of chatgpt 590 | */ 591 | const chatText = this.$chatTextarea; 592 | if (chatText.value != "") { 593 | this.appendUserQuery(chatText.value); 594 | this.scrollToBottom(); 595 | this.appendGptResponse(""); 596 | this.loader(); 597 | this.getChatgptResponse(chatText.value); 598 | chatText.value = ""; 599 | } 600 | } 601 | 602 | async appendUserQuery(message) { 603 | /* 604 | add user query to ui 605 | */ 606 | try { 607 | const userAvatar = this.baseUrl + "assets/user_avatar.png"; 608 | const userChatBox = tag("div", { className: "wrapper" }); 609 | const chat = tag("div", { className: "chat" }); 610 | const profileImg = tag("div", { 611 | className: "profile", 612 | child: tag("img", { 613 | src: userAvatar, 614 | alt: "user", 615 | }), 616 | }); 617 | const msg = tag("div", { 618 | className: "message", 619 | textContent: message, 620 | }); 621 | chat.append(...[profileImg, msg]); 622 | userChatBox.append(chat); 623 | this.$chatBox.appendChild(userChatBox); 624 | } catch (err) { 625 | window.alert(err); 626 | } 627 | } 628 | 629 | async appendGptResponse(message) { 630 | /* 631 | add ai response to ui 632 | */ 633 | const ai_avatar = this.baseUrl + "assets/ai_assistant.svg"; 634 | const gptChatBox = tag("div", { className: "ai_wrapper" }); 635 | const chat = tag("div", { className: "ai_chat" }); 636 | const profileImg = tag("div", { 637 | className: "ai_profile", 638 | child: tag("img", { 639 | src: ai_avatar, 640 | alt: "ai", 641 | }), 642 | }); 643 | const msg = tag("div", { 644 | className: "ai_message", 645 | }); 646 | msg.innerHTML = this.$mdIt.render(message); 647 | const copyBtns = msg.querySelectorAll(".copy-button"); 648 | if (copyBtns) { 649 | for (const copyBtn of copyBtns) { 650 | copyBtn.addEventListener("click", function () { 651 | copy(this.dataset.str); 652 | window.toast("Copied to clipboard", 3000); 653 | }); 654 | } 655 | } 656 | 657 | chat.append(...[profileImg, msg]); 658 | gptChatBox.append(chat); 659 | this.$chatBox.appendChild(gptChatBox); 660 | } 661 | 662 | async stopGenerating() { 663 | // Currently this doesn't works and I have no idea about , If you can , feel free to open pr 664 | // it doesn't work 665 | this.abortController.abort(); 666 | this.$stopGenerationBtn.classList.add("hide"); 667 | this.$sendBtn.classList.remove("hide"); 668 | } 669 | 670 | async getChatgptResponse(question) { 671 | /* 672 | fetch ai response 673 | @parm: question {string} - user prompt 674 | */ 675 | try { 676 | // get all gptchat element 677 | const responseBox = Array.from(document.querySelectorAll(".ai_message")); 678 | 679 | this.abortController = new AbortController(); 680 | const { signal } = this.abortController; 681 | 682 | const prompt = ChatPromptTemplate.fromMessages([ 683 | [ 684 | "system", 685 | `You are an AI assistant for the open source plugin AI Assistant for Acode code editor(open source vscode like code editor for Android).`, 686 | ], 687 | ["placeholder", "{chat_history}"], 688 | ["human", "{input}"], 689 | ]); 690 | 691 | const parser = new StringOutputParser(); 692 | const chain = prompt.pipe(this.modelInstance).pipe(parser); 693 | 694 | const withMessageHistory = new RunnableWithMessageHistory({ 695 | runnable: chain, 696 | getMessageHistory: async (sessionId) => { 697 | if (this.messageHistories[sessionId] === undefined) { 698 | this.messageHistories[sessionId] = new InMemoryChatMessageHistory(); 699 | } else { 700 | let history = await this.messageHistories[sessionId].getMessages(); 701 | this.messageHistories[sessionId].addMessages(history.slice(-6)) 702 | } 703 | return this.messageHistories[sessionId]; 704 | }, 705 | inputMessagesKey: "input", 706 | historyMessagesKey: "chat_history", 707 | }); 708 | 709 | const stream = await withMessageHistory.stream( 710 | { 711 | input: question, 712 | }, 713 | this.messageSessionConfig, 714 | signal 715 | ); 716 | 717 | // remove dot loader 718 | clearInterval(this.$loadInterval); 719 | this.$sendBtn.classList.add("hide"); 720 | this.$stopGenerationBtn.classList.remove('hide'); 721 | const targetElem = responseBox[responseBox.length - 1]; 722 | targetElem.innerHTML = ""; 723 | let result = ""; 724 | // stream the ai responses as plain text 725 | for await (const chunk of stream) { 726 | result += chunk; 727 | targetElem.textContent += chunk; 728 | this.scrollToBottom(); 729 | } 730 | // re render the streamed plain text with markdown formatting 731 | const renderedHtml = this.$mdIt.render(result); 732 | targetElem.innerHTML = renderedHtml; 733 | // Attach event listeners to the copy buttons 734 | const copyBtns = targetElem.querySelectorAll(".copy-button"); 735 | if (copyBtns) { 736 | for (const copyBtn of copyBtns) { 737 | copyBtn.addEventListener("click", function () { 738 | copy(this.dataset.str); 739 | window.toast("Copied to clipboard", 3000); 740 | }); 741 | } 742 | } 743 | this.$stopGenerationBtn.classList.add("hide"); 744 | this.$sendBtn.classList.remove("hide"); 745 | 746 | await this.saveHistory(); 747 | } catch (error) { 748 | // error handling 749 | const responseBox = Array.from(document.querySelectorAll(".ai_message")); 750 | clearInterval(this.$loadInterval); 751 | const targetElem = responseBox[responseBox.length - 1]; 752 | targetElem.innerHTML = ""; 753 | const $errorBox = tag("div", { className: "error-box" }); 754 | console.log(error) 755 | if (error.response) { 756 | $errorBox.innerText = `Status code: ${error.response.status 757 | }\n${JSON.stringify(error.response.data)}`; 758 | } else { 759 | $errorBox.innerText = `${error.message}`; 760 | } 761 | targetElem.appendChild($errorBox); 762 | this.$stopGenerationBtn.classList.add("hide"); 763 | this.$sendBtn.classList.remove("hide"); 764 | } 765 | } 766 | 767 | async scrollToBottom() { 768 | this.$chatBox.scrollTop = this.$chatBox.scrollHeight; 769 | } 770 | 771 | async loader() { 772 | /* 773 | creates dot loader 774 | */ 775 | // get all gptchat element for loader 776 | const loadingDots = Array.from(document.querySelectorAll(".ai_message")); 777 | // made change in last element 778 | if (loadingDots.length != 0) { 779 | this.$loadInterval = setInterval(() => { 780 | loadingDots[loadingDots.length - 1].innerText += "•"; 781 | if (loadingDots[loadingDots.length - 1].innerText == "••••••") { 782 | loadingDots[loadingDots.length - 1].innerText = "•"; 783 | } 784 | }, 300); 785 | } 786 | } 787 | 788 | async destroy() { 789 | //sidebarApps.remove("dall-e-ai"); 790 | editorManager.editor.commands.removeCommand("ai_assistant"); 791 | window.localStorage.removeItem(window.localStorage.getItem("ai-assistant-provider")); 792 | window.localStorage.removeItem("ai-assistant-provider"); 793 | window.localStorage.removeItem("ai-assistant-model-name"); 794 | if (await fs(window.DATA_STORAGE+"secret.key").exists()) { 795 | await fs(window.DATA_STORAGE+"secret.key").delete(); 796 | } 797 | this.$githubDarkFile.remove(); 798 | this.$higlightJsFile.remove(); 799 | this.$markdownItFile.remove(); 800 | this.$style.remove(); 801 | } 802 | } 803 | 804 | if (window.acode) { 805 | const acodePlugin = new AIAssistant(); 806 | acode.setPluginInit( 807 | plugin.id, 808 | (baseUrl, $page, { cacheFileUrl, cacheFile }) => { 809 | if (!baseUrl.endsWith("/")) { 810 | baseUrl += "/"; 811 | } 812 | acodePlugin.baseUrl = baseUrl; 813 | acodePlugin.init($page, cacheFile, cacheFileUrl); 814 | }, 815 | ); 816 | acode.setPluginUnmount(plugin.id, () => { 817 | acodePlugin.destroy(); 818 | }); 819 | } 820 | -------------------------------------------------------------------------------- /src/style.scss: -------------------------------------------------------------------------------- 1 | /*---------------------------------------*\ 2 | * Styles For Image generator 3 | * DALL-E 4 | \*---------------------------------------*/ 5 | 6 | .main-sidebar-cont { 7 | * { 8 | box-sizing: border-box; 9 | } 10 | 11 | .sidebar-ai-heading { 12 | text-align: center; 13 | padding-bottom: 15px; 14 | } 15 | .prompt-area { 16 | width: 100%; 17 | font: initial; 18 | font-size: 0.9rem; 19 | padding: 10px; 20 | border-radius: 5px; 21 | border: 1px solid gray; 22 | outline: none; 23 | color: var(--primary-text-color); 24 | resize: none; 25 | margin-bottom: 8px; 26 | background: transparent; 27 | 28 | &:focus-visible { 29 | border-color: var(--button-background-color); 30 | } 31 | } 32 | .size-selector { 33 | width: 100%; 34 | margin-bottom: 16px; 35 | background: transparent; 36 | padding: 10px; 37 | border-radius: 5px; 38 | border: 1px solid gray; 39 | outline: none; 40 | color: var(--primary-text-color); 41 | 42 | &:focus-visible { 43 | border-color: var(--button-background-color); 44 | } 45 | } 46 | .generatorBtn { 47 | border: none; 48 | background: var(--button-background-color); 49 | color: var(--button-text-color); 50 | padding: 10px 16px; 51 | border-top-left-radius: 15px; 52 | border-bottom-right-radius: 15px; 53 | font-weight: 600; 54 | font-size: 16px; 55 | } 56 | .img-fluid { 57 | max-width: 100%; 58 | margin-top: 10px; 59 | } 60 | } 61 | 62 | /*---------------------------------------*\ 63 | * Styles For Text Generator 64 | * AI Assistant 65 | \*---------------------------------------*/ 66 | 67 | #acode-ai-assistant { 68 | * { 69 | box-sizing: border-box; 70 | } 71 | 72 | .mainApp { 73 | position: absolute; 74 | left: 0; 75 | width: 100%; 76 | height: calc(100% - 80px); 77 | background: var(--primary-color); 78 | } 79 | 80 | .chatBox { 81 | height: 100%; 82 | width: 100%; 83 | white-space: pre-wrap; 84 | overflow-y: auto; 85 | } 86 | 87 | /** 88 | * Display User input in chatBox 89 | */ 90 | 91 | .wrapper { 92 | padding-block: 12px; 93 | padding-inline: 10px; 94 | 95 | .chat { 96 | display: flex; 97 | align-items: flex-start; 98 | gap: 10px; 99 | 100 | .profile { 101 | height: 35px; 102 | width: 35px; 103 | border-radius: 8px; 104 | background: #5436da; 105 | display: flex; 106 | align-items: center; 107 | justify-content: center; 108 | 109 | img { 110 | width: 60%; 111 | } 112 | } 113 | 114 | .message { 115 | flex: 1; 116 | color: var(--primary-text-color); 117 | font-size: 16px; 118 | line-height: 1.5; 119 | user-select: text; 120 | } 121 | } 122 | } 123 | 124 | /** 125 | * Displat Ai response in chatBox 126 | */ 127 | 128 | .ai_wrapper { 129 | padding-block: 12px 30px; 130 | padding-inline: 10px; 131 | background-color: var(--secondary-color); 132 | 133 | .ai_chat { 134 | display: flex; 135 | align-items: flex-start; 136 | gap: 10px; 137 | 138 | .ai_profile { 139 | height: 35px; 140 | width: 35px; 141 | border-radius: 8px; 142 | background: #10a37f; 143 | display: flex; 144 | align-items: center; 145 | justify-content: center; 146 | 147 | img { 148 | width: 60%; 149 | } 150 | } 151 | } 152 | } 153 | 154 | /** 155 | * Highlights Code AREA 156 | * In Ai response 157 | */ 158 | 159 | .ai_wrapper .ai_message { 160 | flex: 1; 161 | color: var(--secondary-text-color); 162 | font-size: 16px; 163 | line-height: 1.5; 164 | overflow: hidden; 165 | user-select: text; 166 | /* 167 | code block in ai response 168 | */ 169 | .codeBlock { 170 | border: 2px solid var(--border-color); 171 | width: 100%; 172 | border-radius: 5px; 173 | overflow-x: auto; 174 | position: relative; 175 | 176 | .copy-button { 177 | position: absolute; 178 | top: 4px; 179 | right: 8px; 180 | border: none; 181 | outline: none; 182 | border-radius: 8px; 183 | height: 24px; 184 | width: 28px; 185 | color: lightgray; 186 | display: flex; 187 | justify-content: center; 188 | align-items: center; 189 | font-weight: bold; 190 | background: rgb(26, 34, 46); 191 | box-shadow: 0 4px 0 #1b232f; 192 | transition: all 0.3s ease-in-out; 193 | &:active { 194 | box-shadow: 0; 195 | color: gray; 196 | } 197 | } 198 | .codesArea { 199 | box-sizing: border-box; 200 | padding: 12px; 201 | margin-bottom: 0; 202 | &::-webkit-scrollbar { 203 | height: 10px; 204 | } 205 | &::-webkit-scrollbar-thumb { 206 | background: lightgray; 207 | border-radius: 4px; 208 | } 209 | } 210 | } 211 | 212 | // Markdown 213 | 214 | hr { 215 | margin: 1rem 0; 216 | color: inherit; 217 | border: 0; 218 | border-top: 1px solid; 219 | opacity: 0.25; 220 | } 221 | 222 | h6, 223 | h5, 224 | h4, 225 | h3, 226 | h2, 227 | h1 { 228 | margin-top: 0; 229 | margin-bottom: 0.5rem; 230 | font-weight: 500; 231 | line-height: 1.2; 232 | color: inherit; 233 | } 234 | 235 | h1 { 236 | font-size: calc(1.375rem + 1.5vw); 237 | } 238 | 239 | h2 { 240 | font-size: calc(1.325rem + 0.9vw); 241 | } 242 | 243 | h3 { 244 | font-size: calc(1.3rem + 0.6vw); 245 | } 246 | 247 | h4 { 248 | font-size: calc(1.275rem + 0.3vw); 249 | } 250 | 251 | h5 { 252 | font-size: 1.25rem; 253 | } 254 | 255 | h6 { 256 | font-size: 1rem; 257 | } 258 | 259 | p { 260 | margin-top: 0; 261 | margin-bottom: 1rem; 262 | } 263 | 264 | ul, 265 | ol { 266 | margin: 1em 0; 267 | padding: 0 0 0 2em; 268 | } 269 | 270 | ul { 271 | list-style-type: disc; 272 | } 273 | 274 | li p:last-child { 275 | margin: 0; 276 | } 277 | 278 | dt { 279 | font-weight: 700; 280 | } 281 | 282 | dd { 283 | margin-bottom: 0.5rem; 284 | margin-left: 0; 285 | } 286 | 287 | blockquote { 288 | margin: 0 0 1rem; 289 | } 290 | 291 | b, 292 | strong { 293 | font-weight: bolder; 294 | } 295 | 296 | small, 297 | .small { 298 | font-size: 0.875em; 299 | } 300 | 301 | pre, 302 | code, 303 | kbd, 304 | samp { 305 | font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", 306 | "Courier New", monospace; 307 | font-size: 1em; 308 | } 309 | 310 | pre { 311 | display: block; 312 | margin-top: 0; 313 | margin-bottom: 1rem; 314 | overflow: auto; 315 | font-size: 0.875em; 316 | } 317 | 318 | pre code { 319 | font-size: inherit; 320 | color: inherit; 321 | } 322 | 323 | code { 324 | font-size: 0.875em; 325 | color: var(--link-text-color); 326 | word-wrap: break-word; 327 | } 328 | 329 | a > code { 330 | color: inherit; 331 | } 332 | 333 | kbd { 334 | padding: 0.1875rem 0.375rem; 335 | font-size: 0.875em; 336 | color: var(--primary-text-color); 337 | background-color: var(--popup-background-color); 338 | border-radius: 0.25rem; 339 | } 340 | 341 | kbd kbd { 342 | padding: 0; 343 | font-size: 1em; 344 | } 345 | } 346 | 347 | /** 348 | * Error In ai response 349 | */ 350 | 351 | .error-box { 352 | border: 1px solid var(--error-text-color); 353 | color: var(--error-text-color); 354 | font-weight: 700; 355 | padding: 8px; 356 | white-space: pre-wrap; 357 | word-break: break-word; 358 | border-radius: 10px; 359 | } 360 | 361 | /** 362 | * PROMPT AREA For CHATGPT 363 | */ 364 | 365 | .inputBox { 366 | position: fixed; 367 | bottom: 0; 368 | width: 100%; 369 | height: 80px; 370 | padding: 8px; 371 | display: flex; 372 | background-color: var(--popup-background-color); 373 | box-shadow: 0px -2px 4px var(--box-shadow-color); 374 | z-index: 1; 375 | } 376 | 377 | .chatTextarea { 378 | flex: 1; 379 | height: 100%; 380 | resize: none; 381 | border: none; 382 | outline: none; 383 | background: none; 384 | font: initial; 385 | font-size: 1.1rem; 386 | color: var(--primary-text-color); 387 | padding-inline-end: 8px; 388 | } 389 | 390 | .sendBtn { 391 | height: 40px; 392 | width: 40px; 393 | border-radius: 8px; 394 | border: none; 395 | outline: none; 396 | background-color: rgba(0, 0, 0, 0.2); 397 | color: gray; 398 | display: grid; 399 | place-items: center; 400 | 401 | &:active { 402 | background-color: var(--button-background-color); 403 | color: var(--primary-text-color); 404 | } 405 | } 406 | .stopGenerationBtn { 407 | height: 40px; 408 | width: 40px; 409 | border-radius: 8px; 410 | border: none; 411 | outline: none; 412 | background-color: var(--button-background-color); 413 | color: var(--primary-text-color); 414 | display: grid; 415 | place-items: center; 416 | 417 | &:active { 418 | background-color: rgba(0, 0, 0, 0.2); 419 | } 420 | } 421 | .hide { 422 | display: none; 423 | } 424 | } 425 | -------------------------------------------------------------------------------- /src/utils.js: -------------------------------------------------------------------------------- 1 | import { Ollama } from "ollama/browser"; 2 | import { AI_PROVIDERS } from "./constants"; 3 | 4 | export async function getModelsFromProvider(provider, apiKey) { 5 | let modelList; 6 | try { 7 | switch (provider) { 8 | case AI_PROVIDERS[0]: // OpenAI 9 | const openAIResponse = await fetch("https://api.openai.com/v1/models", { 10 | headers: { 11 | Authorization: `Bearer ${apiKey}`, 12 | "Content-Type": "application/json", 13 | }, 14 | }); 15 | 16 | if (!openAIResponse.ok) { 17 | acode.alert( 18 | "AI Assistant", 19 | `Error fetching OpenAI models: ${openAIResponse.statusText}`, 20 | ); 21 | throw new Error( 22 | `Error fetching OpenAI models: ${openAIResponse.statusText}`, 23 | ); 24 | } 25 | 26 | const openAIData = await openAIResponse.json(); 27 | // filter only gpt realted models 28 | modelList = openAIData.data 29 | .filter((item) => /gpt/i.test(item.id)) 30 | .map((item) => item.id); 31 | break; 32 | 33 | case AI_PROVIDERS[1]: // Google AI 34 | const googleAIResponse = await fetch( 35 | `https://generativelanguage.googleapis.com/v1/models?key=${apiKey}`, 36 | { 37 | headers: { 38 | "Content-Type": "application/json", 39 | }, 40 | }, 41 | ); 42 | 43 | if (!googleAIResponse.ok) { 44 | acode.alert( 45 | "AI Assistant", 46 | `Error fetching Google AI models: ${googleAIResponse.statusText}`, 47 | ); 48 | throw new Error( 49 | `Error fetching Google AI models: ${googleAIResponse.statusText}`, 50 | ); 51 | } 52 | 53 | const googleAIData = await googleAIResponse.json(); 54 | modelList = googleAIData.models 55 | .filter((model) => /gemini/i.test(model.name)) // Filter models containing "gemini" 56 | .map((model) => model.name.replace(/^models\//, "")); // Remove "models/" prefix 57 | 58 | break; 59 | case AI_PROVIDERS[2]: // ollama 60 | // check local storage, if user want to provide custom host for ollama 61 | let host = window.localStorage.getItem("Ollama-Host") 62 | ? window.localStorage.getItem("Ollama-Host") 63 | : "http://localhost:11434"; 64 | const ollama = new Ollama({ host }); 65 | const list = await ollama.list(); 66 | modelList = list.models.map((item) => item.model); 67 | break; 68 | 69 | case AI_PROVIDERS[3]: // Groq 70 | const groqAIResponse = await fetch( 71 | `https://api.groq.com/openai/v1/models`, 72 | { 73 | headers: { 74 | Authorization: `Bearer ${apiKey}`, 75 | "Content-Type": "application/json", 76 | }, 77 | }, 78 | ); 79 | 80 | if (!groqAIResponse.ok) { 81 | acode.alert( 82 | "AI Assistant", 83 | `Error fetching Groq AI models: ${groqAIResponse.statusText}`, 84 | ); 85 | throw new Error( 86 | `Error fetching Groq AI models: ${groqAIResponse.statusText}`, 87 | ); 88 | } 89 | 90 | const groqAIData = await groqAIResponse.json(); 91 | modelList = groqAIData.data.map((item) => item.id); 92 | break; 93 | 94 | default: 95 | throw new Error(`Unsupported provider: ${provider}`); 96 | } 97 | } catch (error) { 98 | console.error(error.message); 99 | } 100 | 101 | return modelList; 102 | } 103 | -------------------------------------------------------------------------------- /typings/acode.d.ts: -------------------------------------------------------------------------------- 1 | type Input = string; 2 | type Strings = string[]; 3 | 4 | declare var acode: Acode; 5 | 6 | interface Acode { 7 | /** 8 | * Define a module 9 | * @param {string} name 10 | * @param {Object|function} module 11 | */ 12 | define(name: string, module: any): void; 13 | 14 | require(module: string): any; 15 | 16 | exec(key: string, val: any): boolean | undefined; 17 | 18 | get exitAppMessage(): string | undefined; 19 | 20 | setLoadingMessage(message: string): void; 21 | 22 | setPluginInit( 23 | id: string, 24 | initFunction: (baseUrl: string, $page: HTMLElement, options?: any) => Promise, 25 | settings?: any 26 | ): void; 27 | 28 | getPluginSettings(id: string): any; 29 | 30 | setPluginUnmount(id: string, unmountFunction: () => void): void; 31 | 32 | /** 33 | * @param {string} id plugin id 34 | * @param {string} baseUrl local plugin url 35 | * @param {HTMLElement} $page 36 | */ 37 | initPlugin(id: string, baseUrl: string, $page: HTMLElement, options?: any): Promise; 38 | 39 | unmountPlugin(id: string): void; 40 | 41 | registerFormatter(id: string, extensions: string[], format: () => Promise): void; 42 | 43 | unregisterFormatter(id: string): void; 44 | 45 | format(selectIfNull?: boolean): Promise; 46 | 47 | fsOperation(file: string): any; 48 | 49 | newEditorFile(filename: string, options?: any): void; 50 | 51 | // readonly formatters(): { id: string; name: string; exts: string[] }[]; 52 | 53 | /** 54 | * @param {string[]} extensions 55 | * @returns {Array<[id: string, name: string]>} options 56 | */ 57 | getFormatterFor(extensions: string[]): [id: string, name: string][]; 58 | 59 | alert(title: string, message: string, onhide: ()=>void): void; 60 | 61 | loader(title: string, message: string, cancel: { timeout: number,callback: ()=>void }): void; 62 | 63 | joinUrl(...args: string[]): string; 64 | 65 | addIcon(className: string, src: string): void; 66 | 67 | prompt( 68 | message: string, 69 | defaultValue: string, 70 | type: 'textarea' | 'text' | 'number' | 'tel' | 'search' | 'email' | 'url', 71 | options?: { 72 | match: RegExp, 73 | required: boolean, 74 | placeholder: string, 75 | test: (any)=>boolean 76 | } 77 | ): Promise; 78 | 79 | confirm(title: string, message: string): Promise; 80 | 81 | select( 82 | title: string, 83 | options: [string, string, string, boolean][] | string, 84 | opts?: { 85 | onCancel?: () => void; 86 | onHide?: () => void; 87 | hideOnSelect?: boolean; 88 | textTransform?: boolean; 89 | default?: string; 90 | } | boolean 91 | ): Promise; 92 | 93 | multiPrompt(title: string, inputs: Array, help: string): Promise; 94 | 95 | fileBrowser(mode: 'file' | 'folder' | 'both', info: string, doesOpenLast: boolean): Promise< 96 | | { 97 | name: string; 98 | type: 'file'; 99 | url: string; 100 | } 101 | | { 102 | list: { 103 | icon: string; 104 | isDirectory: boolean; 105 | isFile: boolean; 106 | mime: string; 107 | name: string; 108 | type: 'file' | 'folder'; 109 | uri: string; 110 | url: string; 111 | }[]; 112 | scroll: number; 113 | name: string; 114 | type: 'folder'; 115 | url: string; 116 | } 117 | >; 118 | 119 | toInternalUrl(url: string): Promise; 120 | } -------------------------------------------------------------------------------- /typings/editorFile.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-chatgpt/e24ebd254c857ee9ab1059c2a74b3463d610e21e/typings/editorFile.d.ts -------------------------------------------------------------------------------- /typings/index.d.ts: -------------------------------------------------------------------------------- 1 | /// -------------------------------------------------------------------------------- /typings/settings.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajrangCoder/acode-plugin-chatgpt/e24ebd254c857ee9ab1059c2a74b3463d610e21e/typings/settings.d.ts --------------------------------------------------------------------------------