diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..ef0a857 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +# Keeps the GitHub Actions of the workflows current (AI.duino itself has no npm dependencies) +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly diff --git a/.github/scripts/check-cli-providers.js b/.github/scripts/check-cli-providers.js index 6bf2a79..e12cee7 100644 --- a/.github/scripts/check-cli-providers.js +++ b/.github/scripts/check-cli-providers.js @@ -6,12 +6,12 @@ * Licensed under the Apache License, Version 2.0 * * The CLIs change their options without AI.duino changing anything. This script - * takes the options AI.duino really uses (buildArgs() of each agent module in - * localProviders/processProviders) and checks that each one still appears in the - * help text of the installed CLI. No login needed. - * - * The options live in the extension code, not in providerConfigs.js: a failed - * check needs a code change and a release, the remote config cannot fix it. + * takes the options AI.duino really uses and checks that each one still appears + * in the help text of the installed CLI. No login needed. Both sources count: + * - the "cli.args" templates in providerConfigs.js (AI.duino ≥ 2.9.0 uses them, + * so a failure here can be fixed with a config update) + * - buildArgs() of each agent module (older versions and the fallback use them; + * a failure here only means older installations are affected) * * Usage: node .github/scripts/check-cli-providers.js [--all] [--install] * --all: a missing CLI is an error (CI, where all CLIs are installed) @@ -41,6 +41,7 @@ const CLIS = { mistralVibe: { install: 'curl -LsSf https://mistral.ai/vibe/install.sh | bash', help: [['--help']] }, openCode: { install: 'curl -fsSL https://opencode.ai/install | bash', help: [['run', '--help']] }, geminiCli: { install: 'npm install -g @google/gemini-cli', help: [['--help']] }, + antigravity: { install: 'curl -fsSL https://antigravity.google/cli/install.sh | bash', help: [['--help']] }, groqCode: { install: 'git clone --depth 1 https://github.com/NikolaiRadke/groq-code-cli.git "$RUNNER_TEMP/groq-code-cli" && cd "$RUNNER_TEMP/groq-code-cli" && npm install && npm run build && npm link', help: [['--help']] @@ -84,6 +85,20 @@ function collectOptions(buildArgs) { return [...new Set(parts.filter(part => typeof part === 'string' && OPTION_PATTERN.test(part)))]; } +/** + * Options in the "cli.args" templates of the config + * @param {Object} cfg - Provider config + * @returns {string[]} Options + */ +function configOptions(cfg) { + const args = cfg.cli?.args; + if (!args || typeof args !== 'object') return []; + const parts = Object.entries(args) + .filter(([key, list]) => key !== 'order' && Array.isArray(list)) + .flatMap(([, list]) => list); + return [...new Set(parts.filter(part => typeof part === 'string' && OPTION_PATTERN.test(part)))]; +} + /** * Find an executable in PATH * @param {string} command - Command name @@ -144,7 +159,7 @@ function main() { } let options; try { - options = collectOptions(loadBuildArgs(cfg.agentModule)); + options = [...new Set([...configOptions(cfg), ...collectOptions(loadBuildArgs(cfg.agentModule))])]; } catch (e) { console.log(`✗ ${cfg.name}: ${e.message}`); failed = true; diff --git a/.github/scripts/check-config-safety.js b/.github/scripts/check-config-safety.js new file mode 100644 index 0000000..e330154 --- /dev/null +++ b/.github/scripts/check-config-safety.js @@ -0,0 +1,279 @@ +#!/usr/bin/env node +/* + * AI.duino - Safety check for providerConfigs.js + * Copyright 2026 Monster Maker + * + * Licensed under the Apache License, Version 2.0 + * + * providerConfigs.js is JavaScript that every installation downloads and loads + * with require(). Changes are merged automatically by the weekly task, which + * reads web pages. This check makes sure the file stays configuration: + * + * 1. Code rules (always): only the four top-level constants and module.exports, + * no require/import, no access to process, globals or prototypes, no "this", + * "new" only for Error, no computed member access with variables. + * 2. Review rules (with --base ): changes that could send API keys elsewhere + * or make AI.duino start other programs fail here and need a human: + * hostnames, REMOTE_CONFIG_URL, agentModule, processConfig.command, risky CLI + * options, install paths, API key login and the paths in RUNTIME_CONFIG. + * Changed functions are listed (not an error), so a reviewer sees them. + * + * Usage: node .github/scripts/check-config-safety.js [--base ] + * Needs acorn (CI: npm install --no-save acorn@8); ACORN_PATH may point to it. + */ + +"use strict"; + +const fs = require('fs'); +const path = require('path'); +const vm = require('vm'); + +const CONFIG_FILE = path.join(__dirname, '..', '..', 'aiduino', 'extension', 'out', 'config', 'providerConfigs.js'); +const acorn = require(process.env.ACORN_PATH || 'acorn'); + +const ALLOWED_CONSTANTS = ['CONFIG_VERSION', 'REMOTE_CONFIG_URL', 'PROVIDER_CONFIGS', 'RUNTIME_CONFIG']; +const FORBIDDEN_NAMES = new Set([ + 'require', 'import', 'process', 'global', 'globalThis', 'window', 'self', 'eval', 'Function', + 'constructor', 'prototype', '__proto__', '__defineGetter__', '__defineSetter__', '__lookupGetter__', + 'Buffer', 'fetch', 'XMLHttpRequest', 'WebSocket', 'Reflect', 'Proxy', 'Symbol', 'WebAssembly', + 'setTimeout', 'setInterval', 'setImmediate', 'queueMicrotask', 'atob', 'btoa', 'fromCharCode', + 'fromCodePoint', 'arguments', 'module', 'exports', 'defineProperty', 'defineProperties', + 'getPrototypeOf', 'setPrototypeOf', 'assign', 'bind', 'call', 'apply', 'caller', 'callee', + 'vscode', 'child_process', 'fs', 'os', 'http', 'https', 'net' +]); +const FORBIDDEN_NODES = new Set([ + 'ThisExpression', 'ImportExpression', 'ImportDeclaration', 'ExportNamedDeclaration', + 'ExportDefaultDeclaration', 'WithStatement', 'ClassDeclaration', 'ClassExpression', + 'AwaitExpression', 'YieldExpression', 'TaggedTemplateExpression', 'DebuggerStatement', + 'MetaProperty', 'Super', 'ForInStatement', 'WhileStatement', 'DoWhileStatement', 'LabeledStatement' +]); +// CLI options that can change what the agent may do on the user's machine +const RISKY_OPTION = /danger|bypass|yolo|unsafe|sandbox|approv|permission|trust|allow|exec|eval|shell|command|hook|plugin|mcp|config|env|^-c$/i; + +// ===== CODE RULES ===== + +/** + * Walk all nodes of an AST + * @param {Object} node - Node + * @param {Function} visit - Called with (node, parent) + * @param {Object|null} parent - Parent node + */ +function walk(node, visit, parent = null) { + if (!node || typeof node.type !== 'string') return; + visit(node, parent); + for (const key of Object.keys(node)) { + if (key === 'loc' || key === 'start' || key === 'end') continue; + const value = node[key]; + if (Array.isArray(value)) value.forEach(child => walk(child, visit, node)); + else if (value && typeof value.type === 'string') walk(value, visit, node); + } +} + +/** + * Is this the final "module.exports = { ... }" statement? + * @param {Object} node - Top-level statement + * @returns {boolean} + */ +function isExportStatement(node) { + const expr = node.type === 'ExpressionStatement' ? node.expression : null; + return Boolean(expr && expr.type === 'AssignmentExpression' && expr.operator === '=' + && expr.left.type === 'MemberExpression' && !expr.left.computed + && expr.left.object.type === 'Identifier' && expr.left.object.name === 'module' + && expr.left.property.type === 'Identifier' && expr.left.property.name === 'exports' + && expr.right.type === 'ObjectExpression' + && expr.right.properties.every(prop => prop.type === 'Property' && prop.shorthand + && ALLOWED_CONSTANTS.includes(prop.key.name))); +} + +/** + * Check the code rules + * @param {string} source - File content + * @returns {string[]} Problems + */ +function checkCode(source) { + const problems = []; + let ast; + try { + ast = acorn.parse(source, { ecmaVersion: 2022, sourceType: 'script', locations: true }); + } catch (e) { + return [`syntax error: ${e.message}`]; + } + + for (const statement of ast.body) { + if (statement.type === 'ExpressionStatement' && statement.directive) continue; + if (isExportStatement(statement)) continue; + const ok = statement.type === 'VariableDeclaration' && statement.kind === 'const' + && statement.declarations.every(decl => decl.id.type === 'Identifier' && ALLOWED_CONSTANTS.includes(decl.id.name)); + if (!ok) problems.push(`line ${statement.loc.start.line}: only the constants ${ALLOWED_CONSTANTS.join(', ')} and module.exports are allowed at top level`); + } + + // The export statement itself uses 'module' and 'exports'; check everything else + const body = ast.body.filter(statement => !isExportStatement(statement)); + for (const statement of body) { + walk(statement, (node, parent) => { + const line = node.loc.start.line; + if (FORBIDDEN_NODES.has(node.type)) { + problems.push(`line ${line}: ${node.type} is not allowed`); + } + if (node.type === 'Identifier' && FORBIDDEN_NAMES.has(node.name)) { + problems.push(`line ${line}: '${node.name}' is not allowed`); + } + if (node.type === 'Literal' && typeof node.value === 'string' && FORBIDDEN_NAMES.has(node.value) + && parent && (parent.type === 'MemberExpression' && parent.computed)) { + problems.push(`line ${line}: access to '${node.value}' is not allowed`); + } + if (node.type === 'NewExpression' && !(node.callee.type === 'Identifier' && node.callee.name === 'Error')) { + problems.push(`line ${line}: 'new' is only allowed for Error`); + } + if (node.type === 'MemberExpression' && node.computed && node.property.type !== 'Literal') { + problems.push(`line ${line}: computed member access is only allowed with a literal`); + } + if ((node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression') && (node.generator || node.async)) { + problems.push(`line ${line}: async and generator functions are not allowed`); + } + if (node.type === 'AssignmentExpression' && node.left.type === 'MemberExpression') { + problems.push(`line ${line}: assigning to properties is not allowed`); + } + }); + } + return problems; +} + +// ===== REVIEW RULES ===== + +/** + * Load a config file in an empty sandbox (no require, no process) + * @param {string} source - File content + * @returns {Object} Exports + */ +function loadSandboxed(source) { + const sandbox = { module: { exports: {} } }; + vm.runInNewContext(source, sandbox, { timeout: 2000 }); + return sandbox.module.exports; +} + +/** + * Stable text of a value (functions by their source) + * @param {*} value - Value + * @returns {string} + */ +function describe(value) { + return JSON.stringify(value, (key, item) => (typeof item === 'function' ? `fn:${item.toString()}` : item)); +} + +/** + * All functions of an object with their path + * @param {*} value - Value + * @param {string} prefix - Path + * @param {Map} out - Path -> source + * @returns {Map} out + */ +function collectFunctions(value, prefix = '', out = new Map()) { + if (typeof value === 'function') { + out.set(prefix, value.toString()); + } else if (value && typeof value === 'object') { + for (const [key, item] of Object.entries(value)) collectFunctions(item, prefix ? `${prefix}.${key}` : key, out); + } + return out; +} + +/** + * Options (words starting with '-') in a CLI args block + * @param {Object} args - cli.args + * @returns {Set} Options + */ +function cliOptions(args) { + const parts = args && typeof args === 'object' + ? Object.entries(args).filter(([key]) => key !== 'order').flatMap(([, list]) => (Array.isArray(list) ? list : [])) + : []; + return new Set(parts.filter(part => typeof part === 'string' && /^--?[A-Za-z]/.test(part))); +} + +/** + * Compare old and new config for changes that need a human + * @param {Object} oldExports - Exports of the base version + * @param {Object} newExports - Exports of the new version + * @returns {{review: string[], functions: string[]}} Changes to review, changed functions + */ +function compare(oldExports, newExports) { + const review = []; + const oldProviders = oldExports.PROVIDER_CONFIGS || {}; + const newProviders = newExports.PROVIDER_CONFIGS || {}; + + if (oldExports.REMOTE_CONFIG_URL !== newExports.REMOTE_CONFIG_URL) { + review.push('REMOTE_CONFIG_URL changed'); + } + + for (const [id, cfg] of Object.entries(newProviders)) { + const old = oldProviders[id]; + if (!old) { + review.push(`${id}: new provider`); + continue; + } + const fields = [ + ['hostname', cfg.hostname, old.hostname], + ['agentModule', cfg.agentModule, old.agentModule], + ['processConfig.command', cfg.processConfig?.command, old.processConfig?.command], + ['autoDetectUrls', cfg.autoDetectUrls, old.autoDetectUrls], + ['cli.candidates', cfg.cli?.candidates, old.cli?.candidates], + ['cli.apiKeyLogin', cfg.cli?.apiKeyLogin, old.cli?.apiKeyLogin], + ['cli.modelsCommand', cfg.cli?.modelsCommand, old.cli?.modelsCommand], + ['cli.loginArgs', cfg.cli?.loginArgs, old.cli?.loginArgs] + ]; + for (const [name, now, before] of fields) { + if (describe(now) !== describe(before)) review.push(`${id}: ${name} changed`); + } + const before = cliOptions(old.cli?.args); + for (const option of cliOptions(cfg.cli?.args)) { + if (!before.has(option) && RISKY_OPTION.test(option)) review.push(`${id}: new CLI option ${option}`); + } + } + + const oldRuntime = oldExports.RUNTIME_CONFIG || {}; + const newRuntime = newExports.RUNTIME_CONFIG || {}; + for (const key of ['ideLogDirs', 'arduinoCliPaths', 'arduinoCliConfigs']) { + if (describe(oldRuntime[key]) !== describe(newRuntime[key])) review.push(`RUNTIME_CONFIG.${key} changed`); + } + + const oldFunctions = collectFunctions(oldProviders); + const functions = [...collectFunctions(newProviders)] + .filter(([key, source]) => oldFunctions.get(key) !== source) + .map(([key]) => key); + return { review, functions }; +} + +// ===== MAIN ===== + +function main() { + const args = process.argv.slice(2); + const baseIndex = args.indexOf('--base'); + const source = fs.readFileSync(CONFIG_FILE, 'utf8'); + + const problems = checkCode(source); + if (problems.length) { + console.log('✗ Code rules'); + problems.forEach(problem => console.log(` ${problem}`)); + process.exit(1); + } + console.log('✓ Code rules: providerConfigs.js contains only configuration'); + + if (baseIndex < 0) return; + const baseFile = args[baseIndex + 1]; + if (!baseFile || !fs.existsSync(baseFile)) { + console.log('- No base file, review rules skipped'); + return; + } + const { review, functions } = compare(loadSandboxed(fs.readFileSync(baseFile, 'utf8')), loadSandboxed(source)); + if (functions.length) { + console.log('ℹ Changed functions (check them in the diff):'); + functions.forEach(name => console.log(` ${name}`)); + } + if (review.length) { + console.log('✗ Needs a human review (not merged automatically):'); + review.forEach(item => console.log(` ${item}`)); + process.exit(1); + } + console.log('✓ Review rules: no security-relevant changes'); +} + +main(); diff --git a/.github/workflows/cli-provider-check.yml b/.github/workflows/cli-provider-check.yml index a11663d..aa0c10e 100644 --- a/.github/workflows/cli-provider-check.yml +++ b/.github/workflows/cli-provider-check.yml @@ -1,8 +1,8 @@ -# Installs every CLI provider and checks the options AI.duino passes against the +# Installs every CLI provider and checks the options AI.duino passes (cli.args in +# providerConfigs.js and the built-in defaults of the agent modules) against the # real CLIs. The CLIs change without AI.duino changing anything, so this runs # weekly before the scheduled task "AI.duino Provider-Config Wochencheck", which -# reads the result. Deliberately not a gate on providerConfigs.js PRs: the options -# live in the extension code, so a failure here needs a release, not a config fix. +# reads the result, and on config PRs so changed CLI options are verified. name: CLI provider check on: @@ -12,11 +12,13 @@ on: push: branches: [main] paths: + - 'aiduino/extension/out/config/providerConfigs.js' - 'aiduino/extension/out/localProviders/processProviders/**' - '.github/scripts/check-cli-providers.js' - '.github/workflows/cli-provider-check.yml' pull_request: paths: + - 'aiduino/extension/out/config/providerConfigs.js' - 'aiduino/extension/out/localProviders/processProviders/**' - '.github/scripts/check-cli-providers.js' - '.github/workflows/cli-provider-check.yml' @@ -29,9 +31,9 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 20 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: node-version: 22 diff --git a/.github/workflows/provider-check.yml b/.github/workflows/provider-check.yml index 83ae30e..12e377e 100644 --- a/.github/workflows/provider-check.yml +++ b/.github/workflows/provider-check.yml @@ -1,4 +1,6 @@ # Check of aiduino/extension/out/config/providerConfigs.js +# - safety: the file stays configuration (no code that could harm users); on pull requests, +# security-relevant changes (hostnames, paths, risky CLI options, ...) fail and need a human # - structure, ping and OpenRouter catalog checks (no API keys needed) # - runs on pull requests and pushes that touch the config, and on demand # - the weekly check and fixes are done by the scheduled task "AI.duino Provider-Config Wochencheck", @@ -12,11 +14,13 @@ on: paths: - 'aiduino/extension/out/config/providerConfigs.js' - 'aiduino/extension/out/config/testProviders.js' + - '.github/scripts/check-config-safety.js' - '.github/workflows/provider-check.yml' pull_request: paths: - 'aiduino/extension/out/config/providerConfigs.js' - 'aiduino/extension/out/config/testProviders.js' + - '.github/scripts/check-config-safety.js' - '.github/workflows/provider-check.yml' permissions: @@ -26,16 +30,33 @@ jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: - node-version: 20 + node-version: 22 + + - name: Safety check + shell: bash + run: | + npm install --no-save --silent --prefix "$RUNNER_TEMP/acorn" acorn@8 + export ACORN_PATH="$RUNNER_TEMP/acorn/node_modules/acorn" + BASE_ARGS=() + if [ -n "${{ github.base_ref }}" ]; then + git fetch --depth=1 origin "${{ github.base_ref }}" + if git show FETCH_HEAD:aiduino/extension/out/config/providerConfigs.js > "$RUNNER_TEMP/base-config.js"; then + BASE_ARGS=(--base "$RUNNER_TEMP/base-config.js") + fi + fi + node .github/scripts/check-config-safety.js "${BASE_ARGS[@]}" | tee "$RUNNER_TEMP/safety-report.txt" - name: Run provider tests + if: success() || failure() working-directory: aiduino/extension/out/config run: node testProviders.js --ci --report "$RUNNER_TEMP/provider-report.md" - name: Job summary if: always() - run: cat "$RUNNER_TEMP/provider-report.md" >> "$GITHUB_STEP_SUMMARY" || true + run: | + { echo '### Safety check'; echo '```'; cat "$RUNNER_TEMP/safety-report.txt" 2>/dev/null; echo '```'; } >> "$GITHUB_STEP_SUMMARY" + cat "$RUNNER_TEMP/provider-report.md" >> "$GITHUB_STEP_SUMMARY" || true diff --git a/CHANGELOG.md b/CHANGELOG.md index 05eb4cb..073b435 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 2.9.0 +Maintenance release for long-term operation: almost everything that used to need a new release can now be fixed by a provider config update. +* Added provider "Antigravity CLI (≥ v2.9.0)", Google's successor of Gemini CLI, with Google account or Gemini API key login (AI.duino asks before switching Antigravity to the API key) +* Changed Gemini CLI to "Gemini CLI (API key only)": Google ended it for free, Pro and Ultra accounts on June 18, 2026 +* Added CLI start options, login commands and error patterns to the provider config, so a changed CLI is fixed by a config update instead of a release (built-in defaults stay as fallback) +* Added model lists reported by the CLIs themselves (Codex CLI, Antigravity CLI), in addition to the fixed lists +* Added Arduino IDE data to the provider config (board detection log lines, arduino-cli and log paths), so an IDE update can be followed by a config update +* Added a hint when a CLI is too old for an option, and a marker for retired providers +* Added a safety check for the provider config: it must stay configuration; changes to hostnames, paths or risky CLI options need a human review +* Added weekly checks of all CLI providers against the real CLIs (GitHub workflow) +* Changed: the provider config stays compatible with older AI.duino versions; they ignore the new fields +* Fixed "Get API key" opening an outdated Gemini page; links now come from the provider config +* Removed a leftover test script + ## 2.8.0 Last feature release. From now on AI.duino only gets provider updates; agentic work continues in [Agentuino](https://github.com/NikolaiRadke/Agentuino). * Added custom semantic anchors: create, edit and delete them in the prompt editor diff --git a/HELP.md b/HELP.md index 1feeec7..e8c937e 100644 --- a/HELP.md +++ b/HELP.md @@ -18,7 +18,13 @@ There are several options that need further explanation. The default values are # FAQ ### The Provider isn't working! -➡️ That can happen. Providers tend to change the parameters of their models or APIs, and then it no longer works. However, all providers are checked weekly, which is a terrible job. +➡️ That can happen. Providers tend to change the parameters of their models or APIs, and then it no longer works. However, all providers are checked weekly, and fixes arrive as a provider config update: accept it when AI.duino offers one. + +### Gemini CLI stopped working. What now? +➡️ Google ended Gemini CLI for free, Pro and Ultra accounts on June 18, 2026; it only works with a paid Gemini API key. Its successor is **Antigravity CLI** (`agy`, AI.duino V2.9.0 or newer). Install it from https://antigravity.google/docs/cli/ and run `agy` once in a terminal to sign in with your Google account. + +### Can I use Antigravity CLI with a Gemini API key? +➡️ Yes. Store your Gemini API key in AI.duino (provider **Gemini**). When Antigravity reports a missing login, choose **Use Gemini API key**. AI.duino then sets `"modelProvider": "gemini"` in `~/.gemini/antigravity-cli/settings.json` after asking you, and passes the key to Antigravity. This also applies when you use `agy` outside AI.duino; remove the line from that file to go back to your Google account. ### Why can I not select a model for Mistral Vibe, Groq Code CLI, and OpenCode? ➡️ These providers do not support model selection via command-line parameters. AI.duino cannot pass a --model flag to them, so no model list is offered. AI.duino uses the CLI default model instead. The model must be configured directly within the CLI tool itself, for example, using the /model command inside an active Mistral Vibe session. diff --git a/NEWS.md b/NEWS.md index f5ab353..6a4e58a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,7 @@ ## 2026 +* **28.11.2026** Release **V2.9.0**, a maintenance release for long-term operation: changed CLIs, retired models and IDE changes can now be fixed by provider config updates without a new release. New provider **Antigravity CLI**, the successor of Gemini CLI. * **15.11.2026** Release **V2.8.0**, the last feature release: custom semantic anchors, a provider for OpenAI-compatible local servers, a faster and safer agentic mode and current models. From now on AI.duino only gets provider updates. Agentic coding continues in **[Agentuino](https://github.com/NikolaiRadke/Agentuino)**, with serial monitor and [ArduDebug](https://github.com/NikolaiRadke/ArduDebug) debugging. * **22.09.2026** Collecting article feedback für 2.7.1 bugfix release. * **17.09.2026** German **Make Magazin 5/2026** is out with another big article about agentic coding in AI.duino! diff --git a/README.md b/README.md index f02e28f..e23701a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ AI.duino integrates the API providers **Claude, ChatGPT, Gemini, Mistral, Perplexity and Cohere, Croq**, aggregator services **OpenRouter and Hugging Face**, and local providers **LM Studio and Ollama**. It also works with **VS Code**. Please use the newest Version to avoid annoying bugs. -Since **V2.6.0**, AI.duino supports full Agentic Coding: Unlike traditional AI chat, Agentic Coding allows the AI to directly read, modify and write your project files — no copy-pasting required. The AI can verify its changes by compiling the code and fixing errors autonomously. It supports **Claude Code, Codex CLI, Mistral Vibe, OpenCode, Gemini CLI, Groq Code Ollama Agentic**. All these providers need additional software installed. +Since **V2.6.0**, AI.duino supports full Agentic Coding: Unlike traditional AI chat, Agentic Coding allows the AI to directly read, modify and write your project files — no copy-pasting required. The AI can verify its changes by compiling the code and fixing errors autonomously. It supports **Claude Code, Codex CLI, Mistral Vibe, OpenCode, Antigravity CLI, Gemini CLI (API key only), Groq Code, Ollama Agentic**. All these providers need additional software installed. > [!NOTE] > Groq ist not Grok! AI.duino is Elon-free! @@ -175,7 +175,8 @@ For **Agentic Coding** required: a process provider from either: - Codex CLI (ChatGPT): https://github.com/openai/codex - Mistral Vibe: https://docs.mistral.ai/mistral-vibe/introduction - OpenCode: https://opencode.ai/docs/ -- Gemini CLI: https://geminicli.com/docs/get-started/authentication/ +- Antigravity CLI: https://antigravity.google/docs/cli/ +- Gemini CLI (API key only): https://geminicli.com/docs/get-started/authentication/ - Groq Code: https://github.com/NikolaiRadke/groq-code-cli - Ollama: https://ollama.com/ diff --git a/aiduino/extension.vsixmanifest b/aiduino/extension.vsixmanifest index cdc7241..abf5b1e 100644 --- a/aiduino/extension.vsixmanifest +++ b/aiduino/extension.vsixmanifest @@ -1,7 +1,7 @@ - + AI.duino AI-powered assistance for Arduino for API-, local- and process providers. arduino,arduinoIDE,ai,claude,chatgpt,gemini,mistral,perplexity,groq,cohere,debug,error,help,assistant,ollama,embedded,platformio,iot,microcontroller,local llm,keybindings diff --git a/aiduino/extension/README.md b/aiduino/extension/README.md index dc0ac84..5cfed7d 100644 --- a/aiduino/extension/README.md +++ b/aiduino/extension/README.md @@ -17,7 +17,7 @@ AI.duino brings powerful AI assistance directly into your IDE — no browser swi **Ollama, LM Studio** ### Agentic Providers (require separate installation) -**Claude Code, Codex CLI, Mistral Vibe, OpenCode, Gemini CLI, Groq Code, Ollama Agentic** +**Claude Code, Codex CLI, Mistral Vibe, OpenCode, Antigravity CLI, Gemini CLI (API key only), Groq Code, Ollama Agentic** > Groq is not Grok — AI.duino is Elon-free! 🤙 diff --git a/aiduino/extension/locales/bg.json b/aiduino/extension/locales/bg.json index aba905e..619f3df 100644 --- a/aiduino/extension/locales/bg.json +++ b/aiduino/extension/locales/bg.json @@ -74,7 +74,11 @@ "highCostWarning": "Прогнозна цена (без отговор): ${0} с {1}. Продължи?", "codeApplied": "Кодът е приложен", "nodePathSaved": "Пътят до Node.js е запазен", - "loginCommandCopied": "Не е намерен терминал. Командата за вход е копирана: {0}" + "loginCommandCopied": "Не е намерен терминал. Командата за вход е копирана: {0}", + "providerRetired": "{0} вече не е наличен.", + "providerRetiredUse": "{0} вече не е наличен. Използвайте {1}.", + "apiKeyLoginConfirm": "{0} ще влиза с вашия API ключ за {1} вместо с акаунт. За целта AI.duino променя {2}, така че това важи и извън AI.duino.", + "apiKeyLoginEnabled": "{0} вече използва вашия API ключ за {1}." }, "buttons": { "chooseModel": "Избор на AI модел", @@ -118,7 +122,8 @@ "configureNodePath": "Конфигуриране на Node.js път", "enterNodePath": "Въведете Node.js v20+ път", "testProviders": "Тестване на доставчици", - "loginTerminal": "Вход в терминал" + "loginTerminal": "Вход в терминал", + "useApiKey": "Използвай API ключ за {0}" }, "descriptions": { "improveCodeSelected": "Оптимизиране на маркирания код", @@ -152,7 +157,8 @@ }, "labels": { "active": "Активен", - "aiHints": "AI съвети" + "aiHints": "AI съвети", + "retired": "Спрян" }, "prompts": { "enterApiKey": "Въвеждане на {0} API ключ", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} не е намерен в '{1}'. Моля, конфигурирайте правилния път чрез 'Въведете API ключ'.", "localProviderNotRunning": "Не работи. Моля, стартирайте.", "localProviderTimeout": "Сесията изтече", - "agentLogin": "{0} изисква ново влизане." + "agentLogin": "{0} изисква ново влизане.", + "apiKeyLoginNoKey": "{0} се нуждае от вашия API ключ за {1}, но в AI.duino няма запазен. Първо го настройте за {1}.", + "apiKeyLoginFailed": "{0} не можа да бъде променен. Моля, проверете файла." }, "statusBar": { "tooltip": "AI.duino : {0}\nДнес: {1} Tokens{2}\nВход: {3} | Изход: {4}\nКлик за меню • Ctrl+Shift+C • Десен клик за смяна", diff --git a/aiduino/extension/locales/bs.json b/aiduino/extension/locales/bs.json index bb5e009..f4ab360 100644 --- a/aiduino/extension/locales/bs.json +++ b/aiduino/extension/locales/bs.json @@ -74,7 +74,11 @@ "highCostWarning": "Procijenjena cijena (bez odgovora): ${0} sa {1}. Nastaviti?", "codeApplied": "Kod je primijenjen", "nodePathSaved": "Node.js putanja je sačuvana", - "loginCommandCopied": "Terminal nije pronađen. Naredba za prijavu je kopirana: {0}" + "loginCommandCopied": "Terminal nije pronađen. Naredba za prijavu je kopirana: {0}", + "providerRetired": "{0} više nije dostupan.", + "providerRetiredUse": "{0} više nije dostupan. Umjesto toga koristi {1}.", + "apiKeyLoginConfirm": "{0} će se prijavljivati tvojim {1} API ključem umjesto računom. AI.duino za to mijenja {2}, pa to vrijedi i izvan AI.duino.", + "apiKeyLoginEnabled": "{0} sada koristi tvoj {1} API ključ." }, "buttons": { "chooseModel": "Odaberi AI model", @@ -118,7 +122,8 @@ "configureNodePath": "Konfiguriraj Node.js putanju", "enterNodePath": "Unesi Node.js v20+ putanju", "testProviders": "Testiraj provajdere", - "loginTerminal": "Prijava u terminalu" + "loginTerminal": "Prijava u terminalu", + "useApiKey": "Koristi {0} API ključ" }, "descriptions": { "improveCodeSelected": "Optimiziraj označeni kod", @@ -152,7 +157,8 @@ }, "labels": { "active": "Aktivan", - "aiHints": "AI savjeti" + "aiHints": "AI savjeti", + "retired": "Ukinuto" }, "prompts": { "enterApiKey": "Unesite {0} API ključ", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} nije pronađen na '{1}'. Molimo konfigurišite ispravnu putanju preko 'Unesite API ključ'.", "localProviderNotRunning": "Ne radi. Molimo pokrenite.", "localProviderTimeout": "Sesija je istekla", - "agentLogin": "{0} zahtijeva novu prijavu." + "agentLogin": "{0} zahtijeva novu prijavu.", + "apiKeyLoginNoKey": "{0} treba tvoj {1} API ključ, ali u AI.duino nije sačuvan nijedan. Prvo ga postavi za {1}.", + "apiKeyLoginFailed": "{0} nije moguće promijeniti. Provjeri datoteku." }, "statusBar": { "tooltip": "AI.duino : {0}\nDanas: {1} Tokeni{2}\nUlaz: {3} | Izlaz: {4}\nKlik za meni • Ctrl+Shift+C • Desni klik za prebacivanje", diff --git a/aiduino/extension/locales/cs.json b/aiduino/extension/locales/cs.json index e63400a..0a77c00 100644 --- a/aiduino/extension/locales/cs.json +++ b/aiduino/extension/locales/cs.json @@ -74,7 +74,11 @@ "highCostWarning": "Odhadované náklady (bez odpovědi): ${0} s {1}. Pokračovat?", "codeApplied": "Kód byl použit", "nodePathSaved": "Cesta k Node.js byla uložena", - "loginCommandCopied": "Terminál nenalezen. Přihlašovací příkaz byl zkopírován: {0}" + "loginCommandCopied": "Terminál nenalezen. Přihlašovací příkaz byl zkopírován: {0}", + "providerRetired": "{0} již není k dispozici.", + "providerRetiredUse": "{0} již není k dispozici. Použij místo toho {1}.", + "apiKeyLoginConfirm": "{0} se bude přihlašovat tvým API klíčem {1} místo účtem. AI.duino k tomu změní {2}, takže to platí i mimo AI.duino.", + "apiKeyLoginEnabled": "{0} nyní používá tvůj API klíč {1}." }, "buttons": { "chooseModel": "Vybrat model AI", @@ -118,7 +122,8 @@ "configureNodePath": "Konfigurovat cestu k Node.js", "enterNodePath": "Zadat cestu k Node.js v20+", "testProviders": "Testovat poskytovatele", - "loginTerminal": "Přihlásit v terminálu" + "loginTerminal": "Přihlásit v terminálu", + "useApiKey": "Použít API klíč {0}" }, "descriptions": { "improveCodeSelected": "Optimalizovat vybraný kód", @@ -152,7 +157,8 @@ }, "labels": { "active": "Aktivní", - "aiHints": "AI TIPY" + "aiHints": "AI TIPY", + "retired": "Ukončeno" }, "prompts": { "enterApiKey": "Zadejte API klíč {0}", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} nenalezen v '{1}'. Prosím nakonfigurujte správnou cestu přes 'Zadat API klíč'.", "localProviderNotRunning": "Neběží. Prosím spusťte.", "localProviderTimeout": "Relace vypršela", - "agentLogin": "{0} vyžaduje nové přihlášení." + "agentLogin": "{0} vyžaduje nové přihlášení.", + "apiKeyLoginNoKey": "{0} potřebuje tvůj API klíč {1}, ale v AI.duino žádný uložený není. Nejprve ho nastav pro {1}.", + "apiKeyLoginFailed": "{0} se nepodařilo změnit. Zkontroluj prosím soubor." }, "statusBar": { "tooltip": "AI.duino : {0}\nDnes: {1} Tokenů{2}\nVstup: {3} | Výstup: {4}\nKlikněte pro menu • Ctrl+Shift+C • Pravé tlačítko pro přepnutí", diff --git a/aiduino/extension/locales/da.json b/aiduino/extension/locales/da.json index a038293..19dd350 100644 --- a/aiduino/extension/locales/da.json +++ b/aiduino/extension/locales/da.json @@ -74,7 +74,11 @@ "highCostWarning": "Anslåede omkostninger (uden svar): ${0} med {1}. Fortsæt?", "codeApplied": "Kode er blevet anvendt", "nodePathSaved": "Node.js-sti er blevet gemt", - "loginCommandCopied": "Ingen terminal fundet. Login-kommandoen blev kopieret: {0}" + "loginCommandCopied": "Ingen terminal fundet. Login-kommandoen blev kopieret: {0}", + "providerRetired": "{0} er ikke længere tilgængelig.", + "providerRetiredUse": "{0} er ikke længere tilgængelig. Brug {1} i stedet.", + "apiKeyLoginConfirm": "{0} logger så ind med din {1}-API-nøgle i stedet for en konto. AI.duino ændrer {2} til dette, så det gælder også uden for AI.duino.", + "apiKeyLoginEnabled": "{0} bruger nu din {1}-API-nøgle." }, "buttons": { "chooseModel": "Vælg AI Model", @@ -118,7 +122,8 @@ "configureNodePath": "Konfigurer Node.js-sti", "enterNodePath": "Indtast Node.js v20+ sti", "testProviders": "Test udbydere", - "loginTerminal": "Log ind i en terminal" + "loginTerminal": "Log ind i en terminal", + "useApiKey": "Brug {0}-API-nøgle" }, "descriptions": { "improveCodeSelected": "Optimere valgte kode", @@ -152,7 +157,8 @@ }, "labels": { "active": "Aktiv", - "aiHints": "AI HINTS" + "aiHints": "AI HINTS", + "retired": "Udgået" }, "prompts": { "enterApiKey": "Indtast {0} API Nøgle", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} ikke fundet på '{1}'. Venligst konfigurer korrekte sti via 'Indtast API-nøgle'.", "localProviderNotRunning": "Kører ikke. Venligst start.", "localProviderTimeout": "Session udløbet", - "agentLogin": "{0} kræver et nyt login." + "agentLogin": "{0} kræver et nyt login.", + "apiKeyLoginNoKey": "{0} skal bruge din {1}-API-nøgle, men der er ingen gemt i AI.duino. Opsæt den først til {1}.", + "apiKeyLoginFailed": "{0} kunne ikke ændres. Tjek venligst filen." }, "statusBar": { "tooltip": "AI.duino : {0}\nI dag: {1} Tokens{2}\nInput: {3} | Output: {4}\nKlik for menu • Ctrl+Shift+C • Højreklik for at skifte", diff --git a/aiduino/extension/locales/de.json b/aiduino/extension/locales/de.json index 6bb7054..456b2ca 100644 --- a/aiduino/extension/locales/de.json +++ b/aiduino/extension/locales/de.json @@ -74,7 +74,11 @@ "highCostWarning": "Geschätzte Kosten (ohne Antwort): ${0} mit {1}. Fortfahren?", "codeApplied": "Code wurde übernommen", "nodePathSaved": "Node.js-Pfad wurde gespeichert", - "loginCommandCopied": "Kein Terminal gefunden. Der Anmeldebefehl wurde kopiert: {0}" + "loginCommandCopied": "Kein Terminal gefunden. Der Anmeldebefehl wurde kopiert: {0}", + "providerRetired": "{0} ist nicht mehr verfügbar.", + "providerRetiredUse": "{0} ist nicht mehr verfügbar. Nutze stattdessen {1}.", + "apiKeyLoginConfirm": "{0} meldet sich dann mit deinem {1}-API-Schlüssel statt mit einem Konto an. AI.duino ändert dafür {2}, das gilt also auch außerhalb von AI.duino.", + "apiKeyLoginEnabled": "{0} verwendet jetzt deinen {1}-API-Schlüssel." }, "buttons": { "chooseModel": "KI-Modell wählen", @@ -118,7 +122,8 @@ "configureNodePath": "Node.js-Pfad konfigurieren", "enterNodePath": "Node.js v20+ Pfad eingeben", "testProviders": "Provider testen", - "loginTerminal": "Im Terminal anmelden" + "loginTerminal": "Im Terminal anmelden", + "useApiKey": "{0}-API-Schlüssel verwenden" }, "descriptions": { "improveCodeSelected": "Ausgewählten Code optimieren", @@ -152,7 +157,8 @@ }, "labels": { "active": "Aktiv", - "aiHints": "KI-Hinweise" + "aiHints": "KI-Hinweise", + "retired": "Eingestellt" }, "prompts": { "enterApiKey": "{0} API-Schlüssel eingeben", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} nicht gefunden unter '{1}'. Bitte korrekten Pfad über 'API Key eingeben' konfigurieren.", "localProviderNotRunning": "läuft nicht. Bitte starten.", "localProviderTimeout": "Sitzung abgelaufen", - "agentLogin": "{0} braucht eine neue Anmeldung." + "agentLogin": "{0} braucht eine neue Anmeldung.", + "apiKeyLoginNoKey": "{0} braucht deinen {1}-API-Schlüssel, in AI.duino ist aber keiner gespeichert. Richte ihn zuerst für {1} ein.", + "apiKeyLoginFailed": "{0} konnte nicht geändert werden. Bitte prüfe die Datei." }, "statusBar": { "tooltip": "AI.duino : {0}\nHeute: {1} Tokens{2}\nInput: {3} | Output: {4}\nKlick für Menü • Strg+Shift+C • Rechtsklick zum Wechseln", diff --git a/aiduino/extension/locales/el.json b/aiduino/extension/locales/el.json index 31fefcf..bcbdad2 100644 --- a/aiduino/extension/locales/el.json +++ b/aiduino/extension/locales/el.json @@ -74,7 +74,11 @@ "highCostWarning": "Εκτιμώμενο κόστος (χωρίς απάντηση): ${0} με {1}. Συνέχεια;", "codeApplied": "Ο κώδικας εφαρμόστηκε", "nodePathSaved": "Η διαδρομή Node.js αποθηκεύτηκε", - "loginCommandCopied": "Δεν βρέθηκε τερματικό. Η εντολή σύνδεσης αντιγράφηκε: {0}" + "loginCommandCopied": "Δεν βρέθηκε τερματικό. Η εντολή σύνδεσης αντιγράφηκε: {0}", + "providerRetired": "Το {0} δεν είναι πλέον διαθέσιμο.", + "providerRetiredUse": "Το {0} δεν είναι πλέον διαθέσιμο. Χρησιμοποίησε το {1}.", + "apiKeyLoginConfirm": "Το {0} θα συνδέεται με το κλειδί API {1} αντί για λογαριασμό. Το AI.duino αλλάζει γι' αυτό το {2}, οπότε ισχύει και εκτός AI.duino.", + "apiKeyLoginEnabled": "Το {0} χρησιμοποιεί τώρα το κλειδί API {1}." }, "buttons": { "chooseModel": "Επιλογή Μοντέλου AI", @@ -118,7 +122,8 @@ "configureNodePath": "Διαμόρφωση διαδρομής Node.js", "enterNodePath": "Εισαγάγετε διαδρομή Node.js v20+", "testProviders": "Δοκιμή παρόχων", - "loginTerminal": "Σύνδεση σε τερματικό" + "loginTerminal": "Σύνδεση σε τερματικό", + "useApiKey": "Χρήση κλειδιού API {0}" }, "descriptions": { "improveCodeSelected": "Βελτιστοποίηση επιλεγμένου κώδικα", @@ -152,7 +157,8 @@ }, "labels": { "active": "Ενεργό", - "aiHints": "ΥΠΟΔΕΙΞΕΙΣ AI" + "aiHints": "ΥΠΟΔΕΙΞΕΙΣ AI", + "retired": "Καταργήθηκε" }, "prompts": { "enterApiKey": "Εισάγετε το κλειδί API {0}", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} δεν βρέθηκε στο '{1}'. Παρακαλώ διαμορφώστε τη σωστή διαδρομή μέσω 'Εισάγετε κλειδί API'.", "localProviderNotRunning": "Δεν εκτελείται. Παρακαλώ εκκινήστε.", "localProviderTimeout": "Η συνεδρία έληξε", - "agentLogin": "Το {0} χρειάζεται νέα σύνδεση." + "agentLogin": "Το {0} χρειάζεται νέα σύνδεση.", + "apiKeyLoginNoKey": "Το {0} χρειάζεται το κλειδί API {1}, αλλά δεν υπάρχει αποθηκευμένο στο AI.duino. Ρύθμισέ το πρώτα για το {1}.", + "apiKeyLoginFailed": "Δεν ήταν δυνατή η αλλαγή του {0}. Έλεγξε το αρχείο." }, "statusBar": { "tooltip": "AI.duino : {0}\nΣήμερα: {1} Token{2}\nΕίσοδος: {3} | Έξοδος: {4}\nΚλικ για μενού • Ctrl+Shift+C • Δεξί κλικ για αλλαγή", diff --git a/aiduino/extension/locales/en.json b/aiduino/extension/locales/en.json index ce920ee..efb047d 100644 --- a/aiduino/extension/locales/en.json +++ b/aiduino/extension/locales/en.json @@ -74,7 +74,11 @@ "highCostWarning": "Estimated cost (without response): ${0} with {1}. Continue?", "codeApplied": "Code has been applied", "nodePathSaved": "Node.js path has been saved", - "loginCommandCopied": "No terminal found. The login command was copied: {0}" + "loginCommandCopied": "No terminal found. The login command was copied: {0}", + "providerRetired": "{0} is no longer available.", + "providerRetiredUse": "{0} is no longer available. Use {1} instead.", + "apiKeyLoginConfirm": "{0} will log in with your {1} API key instead of an account. AI.duino changes {2} for this, so it also applies outside AI.duino.", + "apiKeyLoginEnabled": "{0} now uses your {1} API key." }, "buttons": { "chooseModel": "Choose AI Model", @@ -118,7 +122,8 @@ "configureNodePath": "Configure Node.js Path", "enterNodePath": "Enter Node.js v20+ Path", "testProviders": "Test Providers", - "loginTerminal": "Log in in a terminal" + "loginTerminal": "Log in in a terminal", + "useApiKey": "Use {0} API key" }, "descriptions": { "improveCodeSelected": "Optimize selected code", @@ -152,7 +157,8 @@ }, "labels": { "active": "Active", - "aiHints": "AI HINTS" + "aiHints": "AI HINTS", + "retired": "Retired" }, "prompts": { "enterApiKey": "Enter {0} API Key", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} not found at '{1}'. Please configure correct path via 'Enter API Key'.", "localProviderNotRunning": "Not running. Please start.", "localProviderTimeout": "Session expired", - "agentLogin": "{0} needs a new login." + "agentLogin": "{0} needs a new login.", + "apiKeyLoginNoKey": "{0} needs your {1} API key, but none is stored in AI.duino. Set it up for {1} first.", + "apiKeyLoginFailed": "Could not change {0}. Please check the file." }, "statusBar": { "tooltip": "AI.duino : {0}\nToday: {1} Tokens{2}\nInput: {3} | Output: {4}\nClick for menu • Ctrl+Shift+C • Right-click to switch", diff --git a/aiduino/extension/locales/es.json b/aiduino/extension/locales/es.json index 33546ce..72c0cd1 100644 --- a/aiduino/extension/locales/es.json +++ b/aiduino/extension/locales/es.json @@ -74,7 +74,11 @@ "highCostWarning": "Costo estimado (sin respuesta): ${0} con {1}. ¿Continuar?", "codeApplied": "Código aplicado", "nodePathSaved": "Ruta de Node.js guardada", - "loginCommandCopied": "No se encontró ningún terminal. Se copió el comando de inicio de sesión: {0}" + "loginCommandCopied": "No se encontró ningún terminal. Se copió el comando de inicio de sesión: {0}", + "providerRetired": "{0} ya no está disponible.", + "providerRetiredUse": "{0} ya no está disponible. Usa {1} en su lugar.", + "apiKeyLoginConfirm": "{0} iniciará sesión con tu clave API de {1} en lugar de una cuenta. Para ello AI.duino modifica {2}, así que también se aplica fuera de AI.duino.", + "apiKeyLoginEnabled": "{0} ahora usa tu clave API de {1}." }, "buttons": { "chooseModel": "Elegir modelo de IA", @@ -118,7 +122,8 @@ "configureNodePath": "Configurar ruta de Node.js", "enterNodePath": "Introducir ruta de Node.js v20+", "testProviders": "Probar proveedores", - "loginTerminal": "Iniciar sesión en un terminal" + "loginTerminal": "Iniciar sesión en un terminal", + "useApiKey": "Usar clave API de {0}" }, "descriptions": { "improveCodeSelected": "Optimizar código seleccionado", @@ -152,7 +157,8 @@ }, "labels": { "active": "Activo", - "aiHints": "SUGERENCIAS IA" + "aiHints": "SUGERENCIAS IA", + "retired": "Retirado" }, "prompts": { "enterApiKey": "Introducir clave API de {0}", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} no encontrado en '{1}'. Por favor configure la ruta correcta a través de 'Introducir clave API'.", "localProviderNotRunning": "No está ejecutándose. Por favor inicie.", "localProviderTimeout": "Sesión expirada", - "agentLogin": "{0} necesita iniciar sesión de nuevo." + "agentLogin": "{0} necesita iniciar sesión de nuevo.", + "apiKeyLoginNoKey": "{0} necesita tu clave API de {1}, pero no hay ninguna guardada en AI.duino. Configúrala primero para {1}.", + "apiKeyLoginFailed": "No se pudo modificar {0}. Revisa el archivo." }, "statusBar": { "tooltip": "AI.duino : {0}\nHoy: {1} Tokens{2}\nEntrada: {3} | Salida: {4}\nClic para menú • Ctrl+Shift+C • Clic derecho para cambiar", diff --git a/aiduino/extension/locales/et.json b/aiduino/extension/locales/et.json index fa7f980..db9f215 100644 --- a/aiduino/extension/locales/et.json +++ b/aiduino/extension/locales/et.json @@ -74,7 +74,11 @@ "highCostWarning": "Hinnanguline kulu (ilma vastuseta): ${0} kasutades {1}. Jätkata?", "codeApplied": "Kood on rakendatud", "nodePathSaved": "Node.js tee on salvestatud", - "loginCommandCopied": "Terminali ei leitud. Sisselogimise käsk kopeeriti: {0}" + "loginCommandCopied": "Terminali ei leitud. Sisselogimise käsk kopeeriti: {0}", + "providerRetired": "{0} pole enam saadaval.", + "providerRetiredUse": "{0} pole enam saadaval. Kasuta selle asemel {1}.", + "apiKeyLoginConfirm": "{0} logib sisse sinu {1} API-võtmega konto asemel. AI.duino muudab selleks faili {2}, seega kehtib see ka väljaspool AI.duinot.", + "apiKeyLoginEnabled": "{0} kasutab nüüd sinu {1} API-võtit." }, "buttons": { "chooseModel": "Vali AI mudel", @@ -118,7 +122,8 @@ "configureNodePath": "Konfigureeri Node.js tee", "enterNodePath": "Sisesta Node.js v20+ tee", "testProviders": "Testi pakkujaid", - "loginTerminal": "Logi sisse terminalis" + "loginTerminal": "Logi sisse terminalis", + "useApiKey": "Kasuta {0} API-võtit" }, "descriptions": { "improveCodeSelected": "Optimiseeri märgitud kood", @@ -152,7 +157,8 @@ }, "labels": { "active": "Aktiivne", - "aiHints": "AI nõuanded" + "aiHints": "AI nõuanded", + "retired": "Lõpetatud" }, "prompts": { "enterApiKey": "Sisestage {0} API võti", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} ei leitud aadressilt '{1}'. Palun seadistage õige tee 'API võtme sisestamine' kaudu.", "localProviderNotRunning": "Ei tööta. Palun käivitage.", "localProviderTimeout": "Seanss aegus", - "agentLogin": "{0} vajab uut sisselogimist." + "agentLogin": "{0} vajab uut sisselogimist.", + "apiKeyLoginNoKey": "{0} vajab sinu {1} API-võtit, kuid AI.duinos pole ühtegi salvestatud. Seadista see kõigepealt {1} jaoks.", + "apiKeyLoginFailed": "Faili {0} ei saanud muuta. Palun kontrolli faili." }, "statusBar": { "tooltip": "AI.duino : {0}\nTäna: {1} Tokenid{2}\nSisend: {3} | Väljund: {4}\nKlõps menüü jaoks • Ctrl+Shift+C • Parem klõps vahetamiseks", diff --git a/aiduino/extension/locales/fi.json b/aiduino/extension/locales/fi.json index e4abc40..b7dd756 100644 --- a/aiduino/extension/locales/fi.json +++ b/aiduino/extension/locales/fi.json @@ -74,7 +74,11 @@ "highCostWarning": "Arvioitu kustannus (ilman vastausta): ${0} käyttäen {1}. Jatketaanko?", "codeApplied": "Koodi on otettu käyttöön", "nodePathSaved": "Node.js-polku on tallennettu", - "loginCommandCopied": "Päätettä ei löytynyt. Kirjautumiskomento kopioitiin: {0}" + "loginCommandCopied": "Päätettä ei löytynyt. Kirjautumiskomento kopioitiin: {0}", + "providerRetired": "{0} ei ole enää saatavilla.", + "providerRetiredUse": "{0} ei ole enää saatavilla. Käytä sen sijaan {1}.", + "apiKeyLoginConfirm": "{0} kirjautuu {1}-API-avaimellasi tilin sijaan. AI.duino muuttaa tätä varten tiedostoa {2}, joten tämä koskee myös AI.duinon ulkopuolella.", + "apiKeyLoginEnabled": "{0} käyttää nyt {1}-API-avaintasi." }, "buttons": { "chooseModel": "Valitse AI-malli", @@ -118,7 +122,8 @@ "configureNodePath": "Määritä Node.js-polku", "enterNodePath": "Syötä Node.js v20+ polku", "testProviders": "Testaa palveluntarjoajat", - "loginTerminal": "Kirjaudu päätteessä" + "loginTerminal": "Kirjaudu päätteessä", + "useApiKey": "Käytä {0}-API-avainta" }, "descriptions": { "improveCodeSelected": "Optimoi valittu koodi", @@ -152,7 +157,8 @@ }, "labels": { "active": "Aktiivinen", - "aiHints": "AI VINKIT" + "aiHints": "AI VINKIT", + "retired": "Lopetettu" }, "prompts": { "enterApiKey": "Syötä {0} API-avain", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} ei löytynyt osoitteesta '{1}'. Määritä oikea polku 'Syötä API-avain' kautta.", "localProviderNotRunning": "Ei käynnissä. Käynnistä.", "localProviderTimeout": "Istunto vanhentunut", - "agentLogin": "{0} vaatii uuden kirjautumisen." + "agentLogin": "{0} vaatii uuden kirjautumisen.", + "apiKeyLoginNoKey": "{0} tarvitsee {1}-API-avaimesi, mutta AI.duinoon ei ole tallennettu sellaista. Määritä se ensin {1}:lle.", + "apiKeyLoginFailed": "Tiedostoa {0} ei voitu muuttaa. Tarkista tiedosto." }, "statusBar": { "tooltip": "AI.duino : {0}\nTänään: {1} Tokenia{2}\nSyöte: {3} | Tuloste: {4}\nKlikkaa valikko • Ctrl+Shift+C • Oikeaklikkaa vaihtaaksesi", diff --git a/aiduino/extension/locales/fr.json b/aiduino/extension/locales/fr.json index fc6d639..c3335a1 100644 --- a/aiduino/extension/locales/fr.json +++ b/aiduino/extension/locales/fr.json @@ -74,7 +74,11 @@ "highCostWarning": "Coût estimé (sans réponse) : ${0} avec {1}. Continuer ?", "codeApplied": "Code appliqué", "nodePathSaved": "Chemin Node.js enregistré", - "loginCommandCopied": "Aucun terminal trouvé. La commande de connexion a été copiée : {0}" + "loginCommandCopied": "Aucun terminal trouvé. La commande de connexion a été copiée : {0}", + "providerRetired": "{0} n'est plus disponible.", + "providerRetiredUse": "{0} n'est plus disponible. Utilise {1} à la place.", + "apiKeyLoginConfirm": "{0} se connectera avec ta clé API {1} au lieu d'un compte. Pour cela, AI.duino modifie {2} ; cela s'applique donc aussi en dehors d'AI.duino.", + "apiKeyLoginEnabled": "{0} utilise maintenant ta clé API {1}." }, "buttons": { "chooseModel": "Choisir le modèle IA", @@ -118,7 +122,8 @@ "configureNodePath": "Configurer le chemin Node.js", "enterNodePath": "Entrer le chemin Node.js v20+", "testProviders": "Tester les fournisseurs", - "loginTerminal": "Se connecter dans un terminal" + "loginTerminal": "Se connecter dans un terminal", + "useApiKey": "Utiliser la clé API {0}" }, "descriptions": { "improveCodeSelected": "Optimiser le code sélectionné", @@ -152,7 +157,8 @@ }, "labels": { "active": "Actif", - "aiHints": "CONSEILS IA" + "aiHints": "CONSEILS IA", + "retired": "Abandonné" }, "prompts": { "enterApiKey": "Entrer la clé API {0}", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} introuvable à '{1}'. Veuillez configurer le chemin correct via 'Saisir la clé API'.", "localProviderNotRunning": "N'est pas en cours d'exécution. Veuillez démarrer.", "localProviderTimeout": "Session expirée", - "agentLogin": "{0} demande une nouvelle connexion." + "agentLogin": "{0} demande une nouvelle connexion.", + "apiKeyLoginNoKey": "{0} a besoin de ta clé API {1}, mais aucune n'est enregistrée dans AI.duino. Configure-la d'abord pour {1}.", + "apiKeyLoginFailed": "Impossible de modifier {0}. Vérifie le fichier." }, "statusBar": { "tooltip": "AI.duino : {0}\nAujourd'hui : {1} Tokens{2}\nEntrée : {3} | Sortie : {4}\nClic pour menu • Ctrl+Maj+C • Clic droit pour changer", diff --git a/aiduino/extension/locales/hr.json b/aiduino/extension/locales/hr.json index d8ef453..84d23e3 100644 --- a/aiduino/extension/locales/hr.json +++ b/aiduino/extension/locales/hr.json @@ -74,7 +74,11 @@ "highCostWarning": "Procijenjena cijena (bez odgovora): ${0} sa {1}. Nastaviti?", "codeApplied": "Kod je primijenjen", "nodePathSaved": "Node.js putanja je spremljena", - "loginCommandCopied": "Terminal nije pronađen. Naredba za prijavu je kopirana: {0}" + "loginCommandCopied": "Terminal nije pronađen. Naredba za prijavu je kopirana: {0}", + "providerRetired": "{0} više nije dostupan.", + "providerRetiredUse": "{0} više nije dostupan. Umjesto toga koristi {1}.", + "apiKeyLoginConfirm": "{0} će se prijavljivati tvojim {1} API ključem umjesto računom. AI.duino za to mijenja {2}, pa to vrijedi i izvan AI.duina.", + "apiKeyLoginEnabled": "{0} sada koristi tvoj {1} API ključ." }, "buttons": { "chooseModel": "Odaberite AI model", @@ -118,7 +122,8 @@ "configureNodePath": "Konfiguriraj Node.js putanju", "enterNodePath": "Unesi Node.js v20+ putanju", "testProviders": "Testiraj pružatelje", - "loginTerminal": "Prijava u terminalu" + "loginTerminal": "Prijava u terminalu", + "useApiKey": "Koristi {0} API ključ" }, "descriptions": { "improveCodeSelected": "Optimiziraj označeni kod", @@ -152,7 +157,8 @@ }, "labels": { "active": "Aktivno", - "aiHints": "AI savjeti" + "aiHints": "AI savjeti", + "retired": "Ukinuto" }, "prompts": { "enterApiKey": "Unesite {0} API ključ", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} nije pronađen na '{1}'. Molimo konfiguriranje ispravnu putanju preko 'Unesite API ključ'.", "localProviderNotRunning": "Ne radi. Molimo pokrenite.", "localProviderTimeout": "Sesija je istekla", - "agentLogin": "{0} zahtijeva ponovnu prijavu." + "agentLogin": "{0} zahtijeva ponovnu prijavu.", + "apiKeyLoginNoKey": "{0} treba tvoj {1} API ključ, ali u AI.duinu nije spremljen nijedan. Najprije ga postavi za {1}.", + "apiKeyLoginFailed": "{0} nije moguće promijeniti. Provjeri datoteku." }, "statusBar": { "tooltip": "AI.duino : {0}\nDanas: {1} Tokens{2}\nInput: {3} | Output: {4}\nKlik za izbornik • Ctrl+Shift+C • Desni klik za promjenu", diff --git a/aiduino/extension/locales/hu.json b/aiduino/extension/locales/hu.json index 8460850..e4b8d62 100644 --- a/aiduino/extension/locales/hu.json +++ b/aiduino/extension/locales/hu.json @@ -74,7 +74,11 @@ "highCostWarning": "Becsült költség (válasz nélkül): ${0} használatával: {1}. Folytatod?", "codeApplied": "Kód alkalmazva", "nodePathSaved": "Node.js útvonal mentve", - "loginCommandCopied": "Nem található terminál. A bejelentkezési parancs a vágólapra került: {0}" + "loginCommandCopied": "Nem található terminál. A bejelentkezési parancs a vágólapra került: {0}", + "providerRetired": "A(z) {0} már nem érhető el.", + "providerRetiredUse": "A(z) {0} már nem érhető el. Használd helyette ezt: {1}.", + "apiKeyLoginConfirm": "A(z) {0} fiók helyett a(z) {1} API-kulcsoddal fog bejelentkezni. Ehhez az AI.duino módosítja ezt: {2}, így ez az AI.duinón kívül is érvényes.", + "apiKeyLoginEnabled": "A(z) {0} mostantól a(z) {1} API-kulcsodat használja." }, "buttons": { "chooseModel": "AI modell választása", @@ -118,7 +122,8 @@ "configureNodePath": "Node.js útvonal konfigurálása", "enterNodePath": "Node.js v20+ útvonal megadása", "testProviders": "Szolgáltatók tesztelése", - "loginTerminal": "Bejelentkezés terminálban" + "loginTerminal": "Bejelentkezés terminálban", + "useApiKey": "{0} API-kulcs használata" }, "descriptions": { "improveCodeSelected": "Kijelölt kód optimalizálása", @@ -152,7 +157,8 @@ }, "labels": { "active": "Aktív", - "aiHints": "AI tippek" + "aiHints": "AI tippek", + "retired": "Megszűnt" }, "prompts": { "enterApiKey": "{0} API kulcs megadása", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} nem található itt: '{1}'. Kérjük konfigurálja a helyes útvonalat az 'API kulcs megadása' segítségével.", "localProviderNotRunning": "Nem fut. Kérjük indítsa el.", "localProviderTimeout": "Munkamenet lejárt", - "agentLogin": "A(z) {0} új bejelentkezést igényel." + "agentLogin": "A(z) {0} új bejelentkezést igényel.", + "apiKeyLoginNoKey": "A(z) {0} igényli a(z) {1} API-kulcsodat, de az AI.duinóban nincs ilyen mentve. Először állítsd be a(z) {1} számára.", + "apiKeyLoginFailed": "Nem sikerült módosítani: {0}. Ellenőrizd a fájlt." }, "statusBar": { "tooltip": "AI.duino : {0}\nMa: {1} Token{2}\nBemenet: {3} | Kimenet: {4}\nKattints a menühöz • Ctrl+Shift+C • Jobb katt a váltáshoz", diff --git a/aiduino/extension/locales/is.json b/aiduino/extension/locales/is.json index 0ec99b7..e123a6d 100644 --- a/aiduino/extension/locales/is.json +++ b/aiduino/extension/locales/is.json @@ -74,7 +74,11 @@ "highCostWarning": "Áætlaður kostnaður (án svars): ${0} með {1}. Halda áfram?", "codeApplied": "Kóði hefur verið notaður", "nodePathSaved": "Node.js slóð hefur verið vistuð", - "loginCommandCopied": "Engin útstöð fannst. Innskráningarskipunin var afrituð: {0}" + "loginCommandCopied": "Engin útstöð fannst. Innskráningarskipunin var afrituð: {0}", + "providerRetired": "{0} er ekki lengur í boði.", + "providerRetiredUse": "{0} er ekki lengur í boði. Notaðu {1} í staðinn.", + "apiKeyLoginConfirm": "{0} skráir sig þá inn með {1} API-lyklinum þínum í stað aðgangs. AI.duino breytir {2} til þess, svo þetta gildir einnig utan AI.duino.", + "apiKeyLoginEnabled": "{0} notar nú {1} API-lykilinn þinn." }, "buttons": { "chooseModel": "Veldu gervigreindarlíkan", @@ -118,7 +122,8 @@ "configureNodePath": "Stilla Node.js slóð", "enterNodePath": "Slá inn Node.js v20+ slóð", "testProviders": "Prófa veitendur", - "loginTerminal": "Skrá inn í útstöð" + "loginTerminal": "Skrá inn í útstöð", + "useApiKey": "Nota {0} API-lykil" }, "descriptions": { "improveCodeSelected": "Bæta valinn kóða", @@ -152,7 +157,8 @@ }, "labels": { "active": "Virkur", - "aiHints": "Gervigreindarábendingar" + "aiHints": "Gervigreindarábendingar", + "retired": "Hætt" }, "prompts": { "enterApiKey": "Slá inn {0} API-lykil", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} fannst ekki á '{1}'. Vinsamlegast stilltu rétta slóð í gegnum 'Slá inn API lykil'.", "localProviderNotRunning": "Ekki í gangi. Vinsamlegast ræstu.", "localProviderTimeout": "Seta útrunnin", - "agentLogin": "{0} þarf nýja innskráningu." + "agentLogin": "{0} þarf nýja innskráningu.", + "apiKeyLoginNoKey": "{0} þarf {1} API-lykilinn þinn, en enginn er vistaður í AI.duino. Settu hann fyrst upp fyrir {1}.", + "apiKeyLoginFailed": "Ekki tókst að breyta {0}. Athugaðu skrána." }, "statusBar": { "tooltip": "AI.duino : {0}\nÍ dag: {1} Tokens{2}\nInntak: {3} | Úttak: {4}\nSmelltu fyrir valmynd • Ctrl+Shift+C • Hægri smell til að skipta", diff --git a/aiduino/extension/locales/it.json b/aiduino/extension/locales/it.json index 101e5c1..2018a96 100644 --- a/aiduino/extension/locales/it.json +++ b/aiduino/extension/locales/it.json @@ -74,7 +74,11 @@ "highCostWarning": "Costo stimato (senza risposta): ${0} con {1}. Continuare?", "codeApplied": "Codice applicato", "nodePathSaved": "Percorso Node.js salvato", - "loginCommandCopied": "Nessun terminale trovato. Il comando di accesso è stato copiato: {0}" + "loginCommandCopied": "Nessun terminale trovato. Il comando di accesso è stato copiato: {0}", + "providerRetired": "{0} non è più disponibile.", + "providerRetiredUse": "{0} non è più disponibile. Usa invece {1}.", + "apiKeyLoginConfirm": "{0} accederà con la tua chiave API {1} invece che con un account. Per questo AI.duino modifica {2}, quindi vale anche al di fuori di AI.duino.", + "apiKeyLoginEnabled": "{0} ora usa la tua chiave API {1}." }, "buttons": { "chooseModel": "Scegli modello IA", @@ -118,7 +122,8 @@ "configureNodePath": "Configura percorso Node.js", "enterNodePath": "Inserisci percorso Node.js v20+", "testProviders": "Testa i provider", - "loginTerminal": "Accedi in un terminale" + "loginTerminal": "Accedi in un terminale", + "useApiKey": "Usa chiave API {0}" }, "descriptions": { "improveCodeSelected": "Ottimizza codice selezionato", @@ -152,7 +157,8 @@ }, "labels": { "active": "Attivo", - "aiHints": "SUGGERIMENTI IA" + "aiHints": "SUGGERIMENTI IA", + "retired": "Dismesso" }, "prompts": { "enterApiKey": "Inserisci chiave API {0}", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} non trovato a '{1}'. Si prega di configurare il percorso corretto tramite 'Inserisci chiave API'.", "localProviderNotRunning": "Non in esecuzione. Si prega di avviare.", "localProviderTimeout": "Sessione scaduta", - "agentLogin": "{0} richiede un nuovo accesso." + "agentLogin": "{0} richiede un nuovo accesso.", + "apiKeyLoginNoKey": "{0} ha bisogno della tua chiave API {1}, ma in AI.duino non ne è salvata nessuna. Configurala prima per {1}.", + "apiKeyLoginFailed": "Impossibile modificare {0}. Controlla il file." }, "statusBar": { "tooltip": "AI.duino : {0}\nOggi: {1} Token{2}\nInput: {3} | Output: {4}\nClick per menu • Ctrl+Shift+C • Click destro per cambiare", diff --git a/aiduino/extension/locales/ja.json b/aiduino/extension/locales/ja.json index aa5a88f..cd4447e 100644 --- a/aiduino/extension/locales/ja.json +++ b/aiduino/extension/locales/ja.json @@ -71,7 +71,11 @@ "highCostWarning": "推定コスト(応答なし):${0}({1}使用)。続行しますか?", "codeApplied": "コードが適用されました", "nodePathSaved": "Node.jsパスが保存されました", - "loginCommandCopied": "ターミナルが見つかりません。ログインコマンドをコピーしました: {0}" + "loginCommandCopied": "ターミナルが見つかりません。ログインコマンドをコピーしました: {0}", + "providerRetired": "{0} は利用できなくなりました。", + "providerRetiredUse": "{0} は利用できなくなりました。代わりに {1} を使用してください。", + "apiKeyLoginConfirm": "{0} はアカウントの代わりに {1} の API キーでログインします。そのため AI.duino は {2} を変更します。これは AI.duino 以外にも適用されます。", + "apiKeyLoginEnabled": "{0} は {1} の API キーを使用するようになりました。" }, "buttons": { "chooseModel": "AIモデルを選択", @@ -115,7 +119,8 @@ "configureNodePath": "Node.jsパスを設定", "enterNodePath": "Node.js v20+パスを入力", "testProviders": "プロバイダーをテスト", - "loginTerminal": "ターミナルでログイン" + "loginTerminal": "ターミナルでログイン", + "useApiKey": "{0} の API キーを使用" }, "descriptions": { "improveCodeSelected": "選択したコードを最適化", @@ -149,7 +154,8 @@ }, "labels": { "active": "アクティブ", - "aiHints": "AIヒント" + "aiHints": "AIヒント", + "retired": "提供終了" }, "prompts": { "enterApiKey": "{0} APIキーを入力", @@ -257,7 +263,9 @@ "localProviderNotFound": "'{1}'で{0}が見つかりません。'APIキーを入力'から正しいパスを設定してください。", "localProviderNotRunning": "実行されていません。開始してください。", "localProviderTimeout": "セッションが期限切れです", - "agentLogin": "{0} は再ログインが必要です。" + "agentLogin": "{0} は再ログインが必要です。", + "apiKeyLoginNoKey": "{0} には {1} の API キーが必要ですが、AI.duino に保存されていません。先に {1} 用に設定してください。", + "apiKeyLoginFailed": "{0} を変更できませんでした。ファイルを確認してください。" }, "statusBar": { "tooltip": "AI.duino : {0}\n今日: {1}トークン{2}\n入力: {3} | 出力: {4}\nメニューはクリック • Ctrl+Shift+C • 切り替えは右クリック", diff --git a/aiduino/extension/locales/ko.json b/aiduino/extension/locales/ko.json index 92e7ed0..f2f9628 100644 --- a/aiduino/extension/locales/ko.json +++ b/aiduino/extension/locales/ko.json @@ -74,7 +74,11 @@ "highCostWarning": "예상 비용(응답 제외): ${0} ({1} 사용). 계속하시겠습니까?", "codeApplied": "코드가 적용되었습니다", "nodePathSaved": "Node.js 경로가 저장되었습니다", - "loginCommandCopied": "터미널을 찾을 수 없습니다. 로그인 명령을 복사했습니다: {0}" + "loginCommandCopied": "터미널을 찾을 수 없습니다. 로그인 명령을 복사했습니다: {0}", + "providerRetired": "{0}은(는) 더 이상 사용할 수 없습니다.", + "providerRetiredUse": "{0}은(는) 더 이상 사용할 수 없습니다. 대신 {1}을(를) 사용하세요.", + "apiKeyLoginConfirm": "{0}은(는) 계정 대신 {1} API 키로 로그인합니다. 이를 위해 AI.duino가 {2}을(를) 변경하므로 AI.duino 밖에서도 적용됩니다.", + "apiKeyLoginEnabled": "{0}이(가) 이제 {1} API 키를 사용합니다." }, "buttons": { "chooseModel": "AI 모델 선택", @@ -118,7 +122,8 @@ "configureNodePath": "Node.js 경로 구성", "enterNodePath": "Node.js v20+ 경로 입력", "testProviders": "공급자 테스트", - "loginTerminal": "터미널에서 로그인" + "loginTerminal": "터미널에서 로그인", + "useApiKey": "{0} API 키 사용" }, "descriptions": { "improveCodeSelected": "선택한 코드 최적화", @@ -152,7 +157,8 @@ }, "labels": { "active": "활성", - "aiHints": "AI 힌트" + "aiHints": "AI 힌트", + "retired": "서비스 종료" }, "prompts": { "enterApiKey": "{0} API 키 입력", @@ -261,7 +267,9 @@ "localProviderNotFound": "'{1}'에서 {0}을(를) 찾을 수 없습니다. 'API 키 입력'을 통해 올바른 경로를 구성하십시오.", "localProviderNotRunning": "실행 중이 아닙니다. 시작하십시오.", "localProviderTimeout": "세션이 만료되었습니다", - "agentLogin": "{0}에 다시 로그인해야 합니다." + "agentLogin": "{0}에 다시 로그인해야 합니다.", + "apiKeyLoginNoKey": "{0}에는 {1} API 키가 필요하지만 AI.duino에 저장된 키가 없습니다. 먼저 {1}에 설정하세요.", + "apiKeyLoginFailed": "{0}을(를) 변경할 수 없습니다. 파일을 확인하세요." }, "statusBar": { "tooltip": "AI.duino: {0}\n오늘: {1} 토큰{2}\n입력: {3} | 출력: {4}\n메뉴는 클릭 • Ctrl+Shift+C • 전환은 우클릭", diff --git a/aiduino/extension/locales/lt.json b/aiduino/extension/locales/lt.json index 81bb7fc..a7891d9 100644 --- a/aiduino/extension/locales/lt.json +++ b/aiduino/extension/locales/lt.json @@ -74,7 +74,11 @@ "highCostWarning": "Numatoma kaina (be atsakymo): ${0} naudojant {1}. Tęsti?", "codeApplied": "Kodas pritaikytas", "nodePathSaved": "Node.js kelias išsaugotas", - "loginCommandCopied": "Terminalas nerastas. Prisijungimo komanda nukopijuota: {0}" + "loginCommandCopied": "Terminalas nerastas. Prisijungimo komanda nukopijuota: {0}", + "providerRetired": "{0} nebepasiekiamas.", + "providerRetiredUse": "{0} nebepasiekiamas. Vietoj jo naudok {1}.", + "apiKeyLoginConfirm": "{0} prisijungs tavo {1} API raktu vietoj paskyros. Tam AI.duino pakeičia {2}, todėl tai galioja ir už AI.duino ribų.", + "apiKeyLoginEnabled": "{0} dabar naudoja tavo {1} API raktą." }, "buttons": { "chooseModel": "Pasirinkti AI modelį", @@ -118,7 +122,8 @@ "configureNodePath": "Konfigūruoti Node.js kelią", "enterNodePath": "Įvesti Node.js v20+ kelią", "testProviders": "Testuoti tiekėjus", - "loginTerminal": "Prisijungti terminale" + "loginTerminal": "Prisijungti terminale", + "useApiKey": "Naudoti {0} API raktą" }, "descriptions": { "improveCodeSelected": "Optimizuoti pažymėtą kodą", @@ -152,7 +157,8 @@ }, "labels": { "active": "Aktyvus", - "aiHints": "AI patarimai" + "aiHints": "AI patarimai", + "retired": "Nutrauktas" }, "prompts": { "enterApiKey": "Įveskite {0} API raktą", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} nerastas '{1}'. Prašome sukonfigūruoti teisingą kelią per 'Įvesti API raktą'.", "localProviderNotRunning": "Neveikia. Prašome paleisti.", "localProviderTimeout": "Sesija baigėsi", - "agentLogin": "{0} reikia prisijungti iš naujo." + "agentLogin": "{0} reikia prisijungti iš naujo.", + "apiKeyLoginNoKey": "{0} reikia tavo {1} API rakto, bet AI.duino jo neišsaugota. Pirmiausia nustatyk jį {1}.", + "apiKeyLoginFailed": "Nepavyko pakeisti {0}. Patikrink failą." }, "statusBar": { "tooltip": "AI.duino : {0}\nŠiandien: {1} Žetonai{2}\nĮvestis: {3} | Išvestis: {4}\nPaspaudimas meniu • Ctrl+Shift+C • Dešinys paspaudimas perjungimui", diff --git a/aiduino/extension/locales/lv.json b/aiduino/extension/locales/lv.json index e41dcb5..b29ba29 100644 --- a/aiduino/extension/locales/lv.json +++ b/aiduino/extension/locales/lv.json @@ -74,7 +74,11 @@ "highCostWarning": "Paredzamās izmaksas (bez atbildes): ${0} ar {1}. Turpināt?", "codeApplied": "Kods ir piemērots", "nodePathSaved": "Node.js ceļš ir saglabāts", - "loginCommandCopied": "Termināls netika atrasts. Pieteikšanās komanda nokopēta: {0}" + "loginCommandCopied": "Termināls netika atrasts. Pieteikšanās komanda nokopēta: {0}", + "providerRetired": "{0} vairs nav pieejams.", + "providerRetiredUse": "{0} vairs nav pieejams. Tā vietā izmanto {1}.", + "apiKeyLoginConfirm": "{0} pieteiksies ar tavu {1} API atslēgu konta vietā. Šim nolūkam AI.duino maina {2}, tāpēc tas attiecas arī ārpus AI.duino.", + "apiKeyLoginEnabled": "{0} tagad izmanto tavu {1} API atslēgu." }, "buttons": { "chooseModel": "Izvēlēties AI modeli", @@ -118,7 +122,8 @@ "configureNodePath": "Konfigurēt Node.js ceļu", "enterNodePath": "Ievadīt Node.js v20+ ceļu", "testProviders": "Testēt nodrošinātājus", - "loginTerminal": "Pieteikties terminālī" + "loginTerminal": "Pieteikties terminālī", + "useApiKey": "Izmantot {0} API atslēgu" }, "descriptions": { "improveCodeSelected": "Optimizēt iezīmēto kodu", @@ -152,7 +157,8 @@ }, "labels": { "active": "Aktīvs", - "aiHints": "AI padomi" + "aiHints": "AI padomi", + "retired": "Pārtraukts" }, "prompts": { "enterApiKey": "Ievadiet {0} API atslēgu", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} nav atrasts '{1}'. Lūdzu konfigurējiet pareizo ceļu caur 'Ievadīt API atslēgu'.", "localProviderNotRunning": "Nedarbojas. Lūdzu palaidiet.", "localProviderTimeout": "Sesija beigusies", - "agentLogin": "{0} nepieciešama jauna pieteikšanās." + "agentLogin": "{0} nepieciešama jauna pieteikšanās.", + "apiKeyLoginNoKey": "{0} vajag tavu {1} API atslēgu, bet AI.duino tāda nav saglabāta. Vispirms iestati to priekš {1}.", + "apiKeyLoginFailed": "Neizdevās mainīt {0}. Lūdzu, pārbaudi failu." }, "statusBar": { "tooltip": "AI.duino : {0}\nŠodien: {1} Žetoni{2}\nIevade: {3} | Izvade: {4}\nKlikšķis izvēlnei • Ctrl+Shift+C • Labais klikšķis pārslēgšanai", diff --git a/aiduino/extension/locales/mk.json b/aiduino/extension/locales/mk.json index 33b6797..36dee8e 100644 --- a/aiduino/extension/locales/mk.json +++ b/aiduino/extension/locales/mk.json @@ -74,7 +74,11 @@ "highCostWarning": "Проценета цена (без одговор): ${0} со {1}. Продолжи?", "codeApplied": "Кодот е применет", "nodePathSaved": "Node.js патеката е зачувана", - "loginCommandCopied": "Не е пронајден терминал. Командата за најава е копирана: {0}" + "loginCommandCopied": "Не е пронајден терминал. Командата за најава е копирана: {0}", + "providerRetired": "{0} повеќе не е достапен.", + "providerRetiredUse": "{0} повеќе не е достапен. Наместо тоа користи {1}.", + "apiKeyLoginConfirm": "{0} ќе се најавува со твојот {1} API клуч наместо со сметка. За тоа AI.duino го менува {2}, па ова важи и надвор од AI.duino.", + "apiKeyLoginEnabled": "{0} сега го користи твојот {1} API клуч." }, "buttons": { "chooseModel": "Избери KI модел", @@ -118,7 +122,8 @@ "configureNodePath": "Конфигурирај Node.js патека", "enterNodePath": "Внеси Node.js v20+ патека", "testProviders": "Тестирај провајдери", - "loginTerminal": "Најави се во терминал" + "loginTerminal": "Најави се во терминал", + "useApiKey": "Користи {0} API клуч" }, "descriptions": { "improveCodeSelected": "Оптимизирај избран код", @@ -152,7 +157,8 @@ }, "labels": { "active": "Активно", - "aiHints": "KI совети" + "aiHints": "KI совети", + "retired": "Укинато" }, "prompts": { "enterApiKey": "Внеси {0} API-ключ", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} не е пронајден на '{1}'. Ве молиме конфигурирајте го точниот пат преку 'Внесете API клуч'.", "localProviderNotRunning": "Не работи. Ве молиме стартувајте.", "localProviderTimeout": "Сесијата истече", - "agentLogin": "{0} бара ново најавување." + "agentLogin": "{0} бара ново најавување.", + "apiKeyLoginNoKey": "На {0} му треба твојот {1} API клуч, но во AI.duino нема зачуван. Прво постави го за {1}.", + "apiKeyLoginFailed": "{0} не може да се промени. Провери ја датотеката." }, "statusBar": { "tooltip": "AI.duino : {0}\nДенес: {1} токени{2}\nInput: {3} | Output: {4}\nКликни за мени • Ctrl+Shift+C • Десен клик за промена", diff --git a/aiduino/extension/locales/mt.json b/aiduino/extension/locales/mt.json index 336adae..864beae 100644 --- a/aiduino/extension/locales/mt.json +++ b/aiduino/extension/locales/mt.json @@ -74,7 +74,11 @@ "highCostWarning": "Spiża stmata (mingħajr risposta): ${0} b'{1}. Kompli?", "codeApplied": "Il-kodiċi ġie applikat", "nodePathSaved": "Il-mogħdija Node.js ġiet salvata", - "loginCommandCopied": "Ma nstab l-ebda terminal. Il-kmand tal-login ġie kkupjat: {0}" + "loginCommandCopied": "Ma nstab l-ebda terminal. Il-kmand tal-login ġie kkupjat: {0}", + "providerRetired": "{0} m'għadux disponibbli.", + "providerRetiredUse": "{0} m'għadux disponibbli. Uża {1} minflok.", + "apiKeyLoginConfirm": "{0} se jidħol biċ-ċavetta API tiegħek ta' {1} minflok b'kont. Għal dan AI.duino jibdel {2}, għalhekk dan japplika wkoll barra AI.duino.", + "apiKeyLoginEnabled": "{0} issa juża ċ-ċavetta API tiegħek ta' {1}." }, "buttons": { "chooseModel": "Agħżel mudell AI", @@ -118,7 +122,8 @@ "configureNodePath": "Ikkonfigura mogħdija Node.js", "enterNodePath": "Daħħal mogħdija Node.js v20+", "testProviders": "Ttestja l-fornituri", - "loginTerminal": "Idħol f'terminal" + "loginTerminal": "Idħol f'terminal", + "useApiKey": "Uża ċ-ċavetta API ta' {0}" }, "descriptions": { "improveCodeSelected": "Ħassan il-kodiċi magħżul", @@ -152,7 +157,8 @@ }, "labels": { "active": "Attiv", - "aiHints": "Ħintat tal-AI" + "aiHints": "Ħintat tal-AI", + "retired": "Irtirat" }, "prompts": { "enterApiKey": "Daħħal {0} API key", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} ma nstabx f'{1}'. Jekk jogħġbok ikkonfigura l-mogħdija t-tajba permezz ta' 'Daħħal iċ-ċavetta tal-API'.", "localProviderNotRunning": "Mhux qed jaħdem. Jekk jogħġbok ibda.", "localProviderTimeout": "Sessjoni skadiet", - "agentLogin": "{0} jeħtieġ login ġdid." + "agentLogin": "{0} jeħtieġ login ġdid.", + "apiKeyLoginNoKey": "{0} jeħtieġ iċ-ċavetta API tiegħek ta' {1}, iżda ma hemm l-ebda waħda maħżuna f'AI.duino. L-ewwel issettjaha għal {1}.", + "apiKeyLoginFailed": "Ma setax jinbidel {0}. Jekk jogħġbok iċċekkja l-fajl." }, "statusBar": { "tooltip": "AI.duino : {0}\nIllum: {1} Tokens{2}\nInput: {3} | Output: {4}\nKlikkja għal menu • Ctrl+Shift+C • Right click biex tibdel", diff --git a/aiduino/extension/locales/nl.json b/aiduino/extension/locales/nl.json index 6931981..3eb1b57 100644 --- a/aiduino/extension/locales/nl.json +++ b/aiduino/extension/locales/nl.json @@ -74,7 +74,11 @@ "highCostWarning": "Geschatte kosten (zonder antwoord): ${0} met {1}. Doorgaan?", "codeApplied": "Code toegepast", "nodePathSaved": "Node.js-pad opgeslagen", - "loginCommandCopied": "Geen terminal gevonden. Het inlogcommando is gekopieerd: {0}" + "loginCommandCopied": "Geen terminal gevonden. Het inlogcommando is gekopieerd: {0}", + "providerRetired": "{0} is niet meer beschikbaar.", + "providerRetiredUse": "{0} is niet meer beschikbaar. Gebruik in plaats daarvan {1}.", + "apiKeyLoginConfirm": "{0} meldt zich dan aan met je {1}-API-sleutel in plaats van een account. AI.duino wijzigt hiervoor {2}, dus dit geldt ook buiten AI.duino.", + "apiKeyLoginEnabled": "{0} gebruikt nu je {1}-API-sleutel." }, "buttons": { "chooseModel": "AI-model kiezen", @@ -118,7 +122,8 @@ "configureNodePath": "Node.js-pad configureren", "enterNodePath": "Node.js v20+ pad invoeren", "testProviders": "Providers testen", - "loginTerminal": "Inloggen in een terminal" + "loginTerminal": "Inloggen in een terminal", + "useApiKey": "{0}-API-sleutel gebruiken" }, "descriptions": { "improveCodeSelected": "Geselecteerde code optimaliseren", @@ -152,7 +157,8 @@ }, "labels": { "active": "Actief", - "aiHints": "AI-TIPS" + "aiHints": "AI-TIPS", + "retired": "Stopgezet" }, "prompts": { "enterApiKey": "Voer {0} API-sleutel in", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} niet gevonden op '{1}'. Configureer het juiste pad via 'API-sleutel invoeren'.", "localProviderNotRunning": "Loopt niet. Start a.u.b.", "localProviderTimeout": "Sessie verlopen", - "agentLogin": "{0} moet opnieuw inloggen." + "agentLogin": "{0} moet opnieuw inloggen.", + "apiKeyLoginNoKey": "{0} heeft je {1}-API-sleutel nodig, maar er is er geen opgeslagen in AI.duino. Stel hem eerst in voor {1}.", + "apiKeyLoginFailed": "{0} kon niet worden gewijzigd. Controleer het bestand." }, "statusBar": { "tooltip": "AI.duino : {0}\nVandaag: {1} Tokens{2}\nInvoer: {3} | Uitvoer: {4}\nKlik voor menu • Ctrl+Shift+C • Rechtsklik om te wisselen", diff --git a/aiduino/extension/locales/no.json b/aiduino/extension/locales/no.json index 4369267..4d1d79b 100644 --- a/aiduino/extension/locales/no.json +++ b/aiduino/extension/locales/no.json @@ -74,7 +74,11 @@ "highCostWarning": "Anslåtte kostnader (uten svar): ${0} med {1}. Fortsett?", "codeApplied": "Kode er anvendt", "nodePathSaved": "Node.js-bane er lagret", - "loginCommandCopied": "Fant ingen terminal. Innloggingskommandoen ble kopiert: {0}" + "loginCommandCopied": "Fant ingen terminal. Innloggingskommandoen ble kopiert: {0}", + "providerRetired": "{0} er ikke lenger tilgjengelig.", + "providerRetiredUse": "{0} er ikke lenger tilgjengelig. Bruk {1} i stedet.", + "apiKeyLoginConfirm": "{0} logger da inn med {1}-API-nøkkelen din i stedet for en konto. AI.duino endrer {2} for dette, så det gjelder også utenfor AI.duino.", + "apiKeyLoginEnabled": "{0} bruker nå {1}-API-nøkkelen din." }, "buttons": { "chooseModel": "Velg AI-modell", @@ -118,7 +122,8 @@ "configureNodePath": "Konfigurer Node.js-bane", "enterNodePath": "Angi Node.js v20+ bane", "testProviders": "Test leverandører", - "loginTerminal": "Logg inn i en terminal" + "loginTerminal": "Logg inn i en terminal", + "useApiKey": "Bruk {0}-API-nøkkel" }, "descriptions": { "improveCodeSelected": "Optimaliser valgt kode", @@ -152,7 +157,8 @@ }, "labels": { "active": "Aktiv", - "aiHints": "AI TIPS" + "aiHints": "AI TIPS", + "retired": "Avviklet" }, "prompts": { "enterApiKey": "Skriv inn {0} API-nøkkel", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} ikke funnet på '{1}'. Vennligst konfigurer riktig bane via 'Angi API-nøkkel'.", "localProviderNotRunning": "Kjører ikke. Vennligst start.", "localProviderTimeout": "Økt utløpt", - "agentLogin": "{0} trenger ny innlogging." + "agentLogin": "{0} trenger ny innlogging.", + "apiKeyLoginNoKey": "{0} trenger {1}-API-nøkkelen din, men ingen er lagret i AI.duino. Sett den opp for {1} først.", + "apiKeyLoginFailed": "Kunne ikke endre {0}. Sjekk filen." }, "statusBar": { "tooltip": "AI.duino : {0}\nI dag: {1} Tokens{2}\nInput: {3} | Output: {4}\nKlikk for meny • Ctrl+Shift+C • Høyreklikk for å bytte", diff --git a/aiduino/extension/locales/pl.json b/aiduino/extension/locales/pl.json index d5376a2..f75f636 100644 --- a/aiduino/extension/locales/pl.json +++ b/aiduino/extension/locales/pl.json @@ -74,7 +74,11 @@ "highCostWarning": "Szacowany koszt (bez odpowiedzi): ${0} przy użyciu {1}. Kontynuować?", "codeApplied": "Kod został zastosowany", "nodePathSaved": "Ścieżka Node.js została zapisana", - "loginCommandCopied": "Nie znaleziono terminala. Polecenie logowania zostało skopiowane: {0}" + "loginCommandCopied": "Nie znaleziono terminala. Polecenie logowania zostało skopiowane: {0}", + "providerRetired": "{0} nie jest już dostępny.", + "providerRetiredUse": "{0} nie jest już dostępny. Użyj zamiast tego {1}.", + "apiKeyLoginConfirm": "{0} będzie logować się Twoim kluczem API {1} zamiast kontem. W tym celu AI.duino zmienia {2}, więc obowiązuje to także poza AI.duino.", + "apiKeyLoginEnabled": "{0} używa teraz Twojego klucza API {1}." }, "buttons": { "chooseModel": "Wybierz model AI", @@ -118,7 +122,8 @@ "configureNodePath": "Konfiguruj ścieżkę Node.js", "enterNodePath": "Wprowadź ścieżkę Node.js v20+", "testProviders": "Testuj dostawców", - "loginTerminal": "Zaloguj się w terminalu" + "loginTerminal": "Zaloguj się w terminalu", + "useApiKey": "Użyj klucza API {0}" }, "descriptions": { "improveCodeSelected": "Optymalizuj zaznaczony kod", @@ -152,7 +157,8 @@ }, "labels": { "active": "Aktywny", - "aiHints": "WSKAZÓWKI AI" + "aiHints": "WSKAZÓWKI AI", + "retired": "Wycofany" }, "prompts": { "enterApiKey": "Wprowadź klucz API {0}", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} nie znaleziono w '{1}'. Proszę skonfigurować poprawną ścieżkę przez 'Wprowadź klucz API'.", "localProviderNotRunning": "Nie działa. Proszę uruchomić.", "localProviderTimeout": "Sesja wygasła", - "agentLogin": "{0} wymaga ponownego zalogowania." + "agentLogin": "{0} wymaga ponownego zalogowania.", + "apiKeyLoginNoKey": "{0} potrzebuje Twojego klucza API {1}, ale w AI.duino nie zapisano żadnego. Najpierw skonfiguruj go dla {1}.", + "apiKeyLoginFailed": "Nie udało się zmienić {0}. Sprawdź plik." }, "statusBar": { "tooltip": "AI.duino : {0}\nDzisiaj: {1} tokenów{2}\nWejście: {3} | Wyjście: {4}\nKliknij dla menu • Ctrl+Shift+C • Prawy klik aby zmienić", diff --git a/aiduino/extension/locales/pt.json b/aiduino/extension/locales/pt.json index 107bcd8..a0a45ce 100644 --- a/aiduino/extension/locales/pt.json +++ b/aiduino/extension/locales/pt.json @@ -74,7 +74,11 @@ "highCostWarning": "Custo estimado (sem resposta): ${0} com {1}. Continuar?", "codeApplied": "Código aplicado", "nodePathSaved": "Caminho do Node.js salvo", - "loginCommandCopied": "Nenhum terminal encontrado. O comando de início de sessão foi copiado: {0}" + "loginCommandCopied": "Nenhum terminal encontrado. O comando de início de sessão foi copiado: {0}", + "providerRetired": "{0} já não está disponível.", + "providerRetiredUse": "{0} já não está disponível. Usa {1} em alternativa.", + "apiKeyLoginConfirm": "{0} vai iniciar sessão com a tua chave API do {1} em vez de uma conta. Para isso o AI.duino altera {2}, por isso também se aplica fora do AI.duino.", + "apiKeyLoginEnabled": "{0} usa agora a tua chave API do {1}." }, "buttons": { "chooseModel": "Escolher Modelo de IA", @@ -118,7 +122,8 @@ "configureNodePath": "Configurar caminho do Node.js", "enterNodePath": "Inserir caminho do Node.js v20+", "testProviders": "Testar fornecedores", - "loginTerminal": "Iniciar sessão num terminal" + "loginTerminal": "Iniciar sessão num terminal", + "useApiKey": "Usar chave API do {0}" }, "descriptions": { "improveCodeSelected": "Otimizar código selecionado", @@ -152,7 +157,8 @@ }, "labels": { "active": "Ativo", - "aiHints": "DICAS DA IA" + "aiHints": "DICAS DA IA", + "retired": "Descontinuado" }, "prompts": { "enterApiKey": "Insira a Chave API {0}", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} não encontrado em '{1}'. Por favor configure o caminho correto através de 'Inserir chave API'.", "localProviderNotRunning": "Não está executando. Por favor inicie.", "localProviderTimeout": "Sessão expirada", - "agentLogin": "{0} precisa de um novo início de sessão." + "agentLogin": "{0} precisa de um novo início de sessão.", + "apiKeyLoginNoKey": "{0} precisa da tua chave API do {1}, mas não há nenhuma guardada no AI.duino. Configura-a primeiro para o {1}.", + "apiKeyLoginFailed": "Não foi possível alterar {0}. Verifica o ficheiro." }, "statusBar": { "tooltip": "AI.duino : {0}\nHoje: {1} Tokens{2}\nEntrada: {3} | Saída: {4}\nClique para menu • Ctrl+Shift+C • Clique direito para trocar", diff --git a/aiduino/extension/locales/ro.json b/aiduino/extension/locales/ro.json index 7dc4a42..6ef1052 100644 --- a/aiduino/extension/locales/ro.json +++ b/aiduino/extension/locales/ro.json @@ -74,7 +74,11 @@ "highCostWarning": "Cost estimat (fără răspuns): ${0} cu {1}. Continuați?", "codeApplied": "Cod aplicat", "nodePathSaved": "Calea Node.js a fost salvată", - "loginCommandCopied": "Nu s-a găsit niciun terminal. Comanda de autentificare a fost copiată: {0}" + "loginCommandCopied": "Nu s-a găsit niciun terminal. Comanda de autentificare a fost copiată: {0}", + "providerRetired": "{0} nu mai este disponibil.", + "providerRetiredUse": "{0} nu mai este disponibil. Folosește {1} în schimb.", + "apiKeyLoginConfirm": "{0} se va conecta cu cheia ta API {1} în loc de un cont. Pentru asta AI.duino modifică {2}, deci se aplică și în afara AI.duino.", + "apiKeyLoginEnabled": "{0} folosește acum cheia ta API {1}." }, "buttons": { "chooseModel": "Alegeți modelul AI", @@ -118,7 +122,8 @@ "configureNodePath": "Configurează calea Node.js", "enterNodePath": "Introduceți calea Node.js v20+", "testProviders": "Testează furnizorii", - "loginTerminal": "Autentificare în terminal" + "loginTerminal": "Autentificare în terminal", + "useApiKey": "Folosește cheia API {0}" }, "descriptions": { "improveCodeSelected": "Optimizează codul selectat", @@ -146,7 +151,8 @@ }, "labels": { "active": "Activ", - "aiHints": "SFATURI AI" + "aiHints": "SFATURI AI", + "retired": "Retras" }, "prompts": { "enterApiKey": "Introduceți cheia API {0}", @@ -255,7 +261,9 @@ "localProviderNotFound": "{0} nu a fost găsit la '{1}'. Vă rugăm să configurați calea corectă prin 'Introduceți cheia API'.", "localProviderNotRunning": "Nu rulează. Vă rugăm să porniți.", "localProviderTimeout": "Sesiunea a expirat", - "agentLogin": "{0} necesită o nouă autentificare." + "agentLogin": "{0} necesită o nouă autentificare.", + "apiKeyLoginNoKey": "{0} are nevoie de cheia ta API {1}, dar în AI.duino nu este salvată niciuna. Configureaz-o mai întâi pentru {1}.", + "apiKeyLoginFailed": "{0} nu a putut fi modificat. Verifică fișierul." }, "statusBar": { "tooltip": "AI.duino : {0}\nAstăzi: {1} Tokeni{2}\nInput: {3} | Output: {4}\nClick pentru meniu • Ctrl+Shift+C • Click dreapta pentru a comuta", diff --git a/aiduino/extension/locales/sk.json b/aiduino/extension/locales/sk.json index 035d1ce..766111d 100644 --- a/aiduino/extension/locales/sk.json +++ b/aiduino/extension/locales/sk.json @@ -74,7 +74,11 @@ "highCostWarning": "Odhadované náklady (bez odpovede): ${0} s {1}. Pokračovať?", "codeApplied": "Kód bol použitý", "nodePathSaved": "Cesta k Node.js bola uložená", - "loginCommandCopied": "Terminál sa nenašiel. Prihlasovací príkaz bol skopírovaný: {0}" + "loginCommandCopied": "Terminál sa nenašiel. Prihlasovací príkaz bol skopírovaný: {0}", + "providerRetired": "{0} už nie je k dispozícii.", + "providerRetiredUse": "{0} už nie je k dispozícii. Použi namiesto toho {1}.", + "apiKeyLoginConfirm": "{0} sa bude prihlasovať tvojím API kľúčom {1} namiesto účtu. AI.duino na to zmení {2}, takže to platí aj mimo AI.duino.", + "apiKeyLoginEnabled": "{0} teraz používa tvoj API kľúč {1}." }, "buttons": { "chooseModel": "Výber AI modelu", @@ -118,7 +122,8 @@ "configureNodePath": "Konfigurovať cestu k Node.js", "enterNodePath": "Zadať cestu k Node.js v20+", "testProviders": "Testovať poskytovateľov", - "loginTerminal": "Prihlásiť sa v termináli" + "loginTerminal": "Prihlásiť sa v termináli", + "useApiKey": "Použiť API kľúč {0}" }, "descriptions": { "improveCodeSelected": "Optimalizácia označeného kódu", @@ -152,7 +157,8 @@ }, "labels": { "active": "Aktívny", - "aiHints": "AI tipy" + "aiHints": "AI tipy", + "retired": "Ukončené" }, "prompts": { "enterApiKey": "Zadanie {0} API kľúča", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} nenájdený na '{1}'. Prosím nakonfigurujte správnu cestu cez 'Zadať API kľúč'.", "localProviderNotRunning": "Nebeží. Prosím spustite.", "localProviderTimeout": "Relácia vypršala", - "agentLogin": "{0} vyžaduje nové prihlásenie." + "agentLogin": "{0} vyžaduje nové prihlásenie.", + "apiKeyLoginNoKey": "{0} potrebuje tvoj API kľúč {1}, ale v AI.duino nie je uložený žiadny. Najprv ho nastav pre {1}.", + "apiKeyLoginFailed": "{0} sa nepodarilo zmeniť. Skontroluj súbor." }, "statusBar": { "tooltip": "AI.duino : {0}\nDnes: {1} Tokens{2}\nVstup: {3} | Výstup: {4}\nKlik pre menu • Ctrl+Shift+C • Pravý klik na prepnutie", diff --git a/aiduino/extension/locales/sl.json b/aiduino/extension/locales/sl.json index 107ca8b..e6f9f7b 100644 --- a/aiduino/extension/locales/sl.json +++ b/aiduino/extension/locales/sl.json @@ -74,7 +74,11 @@ "highCostWarning": "Ocenjeni stroški (brez odgovora): ${0} z {1}. Nadaljuj?", "codeApplied": "Koda je bila uporabljena", "nodePathSaved": "Pot Node.js je bila shranjena", - "loginCommandCopied": "Terminala ni bilo mogoče najti. Ukaz za prijavo je kopiran: {0}" + "loginCommandCopied": "Terminala ni bilo mogoče najti. Ukaz za prijavo je kopiran: {0}", + "providerRetired": "{0} ni več na voljo.", + "providerRetiredUse": "{0} ni več na voljo. Namesto tega uporabi {1}.", + "apiKeyLoginConfirm": "{0} se bo prijavljal s tvojim API ključem {1} namesto z računom. AI.duino zato spremeni {2}, zato to velja tudi zunaj AI.duino.", + "apiKeyLoginEnabled": "{0} zdaj uporablja tvoj API ključ {1}." }, "buttons": { "chooseModel": "Izbira AI modela", @@ -118,7 +122,8 @@ "configureNodePath": "Konfiguriraj pot Node.js", "enterNodePath": "Vnesi pot Node.js v20+", "testProviders": "Testiraj ponudnike", - "loginTerminal": "Prijava v terminalu" + "loginTerminal": "Prijava v terminalu", + "useApiKey": "Uporabi API ključ {0}" }, "descriptions": { "improveCodeSelected": "Optimizacija označene kode", @@ -152,7 +157,8 @@ }, "labels": { "active": "Aktiven", - "aiHints": "AI namigi" + "aiHints": "AI namigi", + "retired": "Ukinjeno" }, "prompts": { "enterApiKey": "Vnos {0} API ključa", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} ni najden na '{1}'. Prosim konfigurirajte pravilno pot preko 'Vnesite API ključ'.", "localProviderNotRunning": "Se ne izvaja. Prosim zaženite.", "localProviderTimeout": "Seja je potekla", - "agentLogin": "{0} zahteva ponovno prijavo." + "agentLogin": "{0} zahteva ponovno prijavo.", + "apiKeyLoginNoKey": "{0} potrebuje tvoj API ključ {1}, vendar v AI.duino ni shranjen noben. Najprej ga nastavi za {1}.", + "apiKeyLoginFailed": "{0} ni bilo mogoče spremeniti. Preveri datoteko." }, "statusBar": { "tooltip": "AI.duino : {0}\nDanes: {1} Žetonov{2}\nVhod: {3} | Izhod: {4}\nKlik za meni • Ctrl+Shift+C • Desni klik za preklop", diff --git a/aiduino/extension/locales/sq.json b/aiduino/extension/locales/sq.json index 0f0dc37..2a0a0b0 100644 --- a/aiduino/extension/locales/sq.json +++ b/aiduino/extension/locales/sq.json @@ -74,7 +74,11 @@ "highCostWarning": "Kosto e vlerësuar (pa përgjigje): ${0} me {1}. Vazhdo?", "codeApplied": "Kodi është zbatuar", "nodePathSaved": "Rruga e Node.js është ruajtur", - "loginCommandCopied": "Nuk u gjet asnjë terminal. Komanda e hyrjes u kopjua: {0}" + "loginCommandCopied": "Nuk u gjet asnjë terminal. Komanda e hyrjes u kopjua: {0}", + "providerRetired": "{0} nuk është më i disponueshëm.", + "providerRetiredUse": "{0} nuk është më i disponueshëm. Përdor {1} në vend të tij.", + "apiKeyLoginConfirm": "{0} do të identifikohet me çelësin tënd API të {1} në vend të një llogarie. Për këtë AI.duino ndryshon {2}, ndaj kjo vlen edhe jashtë AI.duino.", + "apiKeyLoginEnabled": "{0} tani përdor çelësin tënd API të {1}." }, "buttons": { "chooseModel": "Zgjidh modelin AI", @@ -118,7 +122,8 @@ "configureNodePath": "Konfiguro rrugën e Node.js", "enterNodePath": "Fut rrugën e Node.js v20+", "testProviders": "Testo ofruesit", - "loginTerminal": "Hyr në terminal" + "loginTerminal": "Hyr në terminal", + "useApiKey": "Përdor çelësin API të {0}" }, "descriptions": { "improveCodeSelected": "Optimizo kodin e zgjedhur", @@ -152,7 +157,8 @@ }, "labels": { "active": "Aktiv", - "aiHints": "Këshilla AI" + "aiHints": "Këshilla AI", + "retired": "I ndërprerë" }, "prompts": { "enterApiKey": "Vendosni çelësin API të {0}", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} nuk u gjet në '{1}'. Ju lutemi konfiguroni rrugën e duhur përmes 'Fut çelësin API'.", "localProviderNotRunning": "Nuk po ekzekutohet. Ju lutemi niseni.", "localProviderTimeout": "Sesioni skadoi", - "agentLogin": "{0} kërkon hyrje të re." + "agentLogin": "{0} kërkon hyrje të re.", + "apiKeyLoginNoKey": "{0} ka nevojë për çelësin tënd API të {1}, por në AI.duino nuk është ruajtur asnjë. Konfiguroje fillimisht për {1}.", + "apiKeyLoginFailed": "{0} nuk mund të ndryshohej. Kontrollo skedarin." }, "statusBar": { "tooltip": "AI.duino : {0}\nSot: {1} Tokenë{2}\nHyrje: {3} | Dalje: {4}\nKliko për menu • Ctrl+Shift+C • Klik i djathtë për ndryshim", diff --git a/aiduino/extension/locales/sr.json b/aiduino/extension/locales/sr.json index 47fa17c..e673b7a 100644 --- a/aiduino/extension/locales/sr.json +++ b/aiduino/extension/locales/sr.json @@ -74,7 +74,11 @@ "highCostWarning": "Процењена цена (без одговора): ${0} са {1}. Наставити?", "codeApplied": "Код је примењен", "nodePathSaved": "Node.js путања је сачувана", - "loginCommandCopied": "Терминал није пронађен. Команда за пријаву је копирана: {0}" + "loginCommandCopied": "Терминал није пронађен. Команда за пријаву је копирана: {0}", + "providerRetired": "{0} више није доступан.", + "providerRetiredUse": "{0} више није доступан. Уместо тога користи {1}.", + "apiKeyLoginConfirm": "{0} ће се пријављивати твојим {1} API кључем уместо налогом. AI.duino за то мења {2}, па то важи и ван AI.duino.", + "apiKeyLoginEnabled": "{0} сада користи твој {1} API кључ." }, "buttons": { "chooseModel": "Одабери АИ модел", @@ -118,7 +122,8 @@ "configureNodePath": "Конфигуриши Node.js путању", "enterNodePath": "Унеси Node.js v20+ путању", "testProviders": "Тестирај провајдере", - "loginTerminal": "Пријава у терминалу" + "loginTerminal": "Пријава у терминалу", + "useApiKey": "Користи {0} API кључ" }, "descriptions": { "improveCodeSelected": "Оптимизуј означени код", @@ -152,7 +157,8 @@ }, "labels": { "active": "Активан", - "aiHints": "АИ савети" + "aiHints": "АИ савети", + "retired": "Укинуто" }, "prompts": { "enterApiKey": "Унесите {0} АПИ кључ", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} није пронађен на '{1}'. Молимо конфигуришите исправну путању преко 'Унесите API кључ'.", "localProviderNotRunning": "Не ради. Молимо покрените.", "localProviderTimeout": "Сесија је истекла", - "agentLogin": "{0} захтева нову пријаву." + "agentLogin": "{0} захтева нову пријаву.", + "apiKeyLoginNoKey": "{0} треба твој {1} API кључ, али у AI.duino није сачуван ниједан. Прво га подеси за {1}.", + "apiKeyLoginFailed": "{0} није могуће променити. Провери датотеку." }, "statusBar": { "tooltip": "АИ.дуино : {0}\nДанас: {1} Токени{2}\nУлаз: {3} | Излаз: {4}\nКлик за мени • Ctrl+Shift+C • Десни клик за пребацивање", diff --git a/aiduino/extension/locales/sv.json b/aiduino/extension/locales/sv.json index 05113e8..cefbb07 100644 --- a/aiduino/extension/locales/sv.json +++ b/aiduino/extension/locales/sv.json @@ -74,7 +74,11 @@ "highCostWarning": "Uppskattad kostnad (utan svar): ${0} med {1}. Fortsätt?", "codeApplied": "Kod har tillämpats", "nodePathSaved": "Node.js-sökväg har sparats", - "loginCommandCopied": "Ingen terminal hittades. Inloggningskommandot kopierades: {0}" + "loginCommandCopied": "Ingen terminal hittades. Inloggningskommandot kopierades: {0}", + "providerRetired": "{0} är inte längre tillgänglig.", + "providerRetiredUse": "{0} är inte längre tillgänglig. Använd {1} i stället.", + "apiKeyLoginConfirm": "{0} loggar då in med din {1}-API-nyckel i stället för ett konto. AI.duino ändrar {2} för detta, så det gäller även utanför AI.duino.", + "apiKeyLoginEnabled": "{0} använder nu din {1}-API-nyckel." }, "buttons": { "chooseModel": "Välj AI-modell", @@ -118,7 +122,8 @@ "configureNodePath": "Konfigurera Node.js-sökväg", "enterNodePath": "Ange Node.js v20+ sökväg", "testProviders": "Testa leverantörer", - "loginTerminal": "Logga in i en terminal" + "loginTerminal": "Logga in i en terminal", + "useApiKey": "Använd {0}-API-nyckel" }, "descriptions": { "improveCodeSelected": "Optimera vald kod", @@ -152,7 +157,8 @@ }, "labels": { "active": "Aktiv", - "aiHints": "AI-TIPS" + "aiHints": "AI-TIPS", + "retired": "Avvecklad" }, "prompts": { "enterApiKey": "Ange {0} API-nyckel", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} hittades inte på '{1}'. Vänligen konfigurera rätt sökväg via 'Ange API-nyckel'.", "localProviderNotRunning": "Körs inte. Vänligen starta.", "localProviderTimeout": "Sessionen har upphört", - "agentLogin": "{0} behöver en ny inloggning." + "agentLogin": "{0} behöver en ny inloggning.", + "apiKeyLoginNoKey": "{0} behöver din {1}-API-nyckel, men ingen är sparad i AI.duino. Ställ in den för {1} först.", + "apiKeyLoginFailed": "{0} kunde inte ändras. Kontrollera filen." }, "statusBar": { "tooltip": "AI.duino : {0}\nIdag: {1} Tokens{2}\nIndata: {3} | Utdata: {4}\nKlicka för meny • Ctrl+Shift+C • Högerklicka för att byta", diff --git a/aiduino/extension/locales/tr.json b/aiduino/extension/locales/tr.json index 9fa3f55..95908b8 100644 --- a/aiduino/extension/locales/tr.json +++ b/aiduino/extension/locales/tr.json @@ -74,7 +74,11 @@ "highCostWarning": "Tahmini maliyet (yanıt hariç): ${0} ({1} ile). Devam edilsin mi?", "codeApplied": "Kod uygulandı", "nodePathSaved": "Node.js yolu kaydedildi", - "loginCommandCopied": "Terminal bulunamadı. Oturum açma komutu kopyalandı: {0}" + "loginCommandCopied": "Terminal bulunamadı. Oturum açma komutu kopyalandı: {0}", + "providerRetired": "{0} artık kullanılamıyor.", + "providerRetiredUse": "{0} artık kullanılamıyor. Bunun yerine {1} kullan.", + "apiKeyLoginConfirm": "{0}, hesap yerine {1} API anahtarınla oturum açacak. Bunun için AI.duino {2} dosyasını değiştirir; bu nedenle AI.duino dışında da geçerlidir.", + "apiKeyLoginEnabled": "{0} artık {1} API anahtarını kullanıyor." }, "buttons": { "chooseModel": "YZ Modeli Seç", @@ -118,7 +122,8 @@ "configureNodePath": "Node.js yolunu yapılandır", "enterNodePath": "Node.js v20+ yolunu girin", "testProviders": "Sağlayıcıları test et", - "loginTerminal": "Terminalde oturum aç" + "loginTerminal": "Terminalde oturum aç", + "useApiKey": "{0} API anahtarını kullan" }, "descriptions": { "improveCodeSelected": "Seçili kodu optimize et", @@ -152,7 +157,8 @@ }, "labels": { "active": "Aktif", - "aiHints": "YAPAY ZEKA İPUÇLARI" + "aiHints": "YAPAY ZEKA İPUÇLARI", + "retired": "Kullanımdan kaldırıldı" }, "prompts": { "enterApiKey": "{0} API Anahtarını girin", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} '{1}' konumunda bulunamadı. Lütfen 'API Anahtarını Gir' yoluyla doğru yolu yapılandırın.", "localProviderNotRunning": "Çalışmıyor. Lütfen başlatın.", "localProviderTimeout": "Oturum süresi doldu", - "agentLogin": "{0} yeniden oturum açmayı gerektiriyor." + "agentLogin": "{0} yeniden oturum açmayı gerektiriyor.", + "apiKeyLoginNoKey": "{0} için {1} API anahtarın gerekiyor, ancak AI.duino'da kayıtlı bir anahtar yok. Önce {1} için ayarla.", + "apiKeyLoginFailed": "{0} değiştirilemedi. Lütfen dosyayı kontrol et." }, "statusBar": { "tooltip": "AI.duino : {0}\nBugün: {1} Token{2}\nGiriş: {3} | Çıkış: {4}\nMenü için tıkla • Ctrl+Shift+C • Değiştirmek için sağ tıkla", diff --git a/aiduino/extension/locales/uk.json b/aiduino/extension/locales/uk.json index 05bd239..50a21f4 100644 --- a/aiduino/extension/locales/uk.json +++ b/aiduino/extension/locales/uk.json @@ -74,7 +74,11 @@ "highCostWarning": "Орієнтовна вартість (без відповіді): ${0} з {1}. Продовжити?", "codeApplied": "Код застосовано", "nodePathSaved": "Шлях Node.js збережено", - "loginCommandCopied": "Термінал не знайдено. Команду входу скопійовано: {0}" + "loginCommandCopied": "Термінал не знайдено. Команду входу скопійовано: {0}", + "providerRetired": "{0} більше недоступний.", + "providerRetiredUse": "{0} більше недоступний. Натомість використовуй {1}.", + "apiKeyLoginConfirm": "{0} входитиме з твоїм API-ключем {1} замість облікового запису. Для цього AI.duino змінює {2}, тож це діє і поза AI.duino.", + "apiKeyLoginEnabled": "{0} тепер використовує твій API-ключ {1}." }, "buttons": { "chooseModel": "Вибрати модель ШІ", @@ -118,7 +122,8 @@ "configureNodePath": "Налаштувати шлях Node.js", "enterNodePath": "Введіть шлях Node.js v20+", "testProviders": "Тестувати постачальників", - "loginTerminal": "Увійти в терміналі" + "loginTerminal": "Увійти в терміналі", + "useApiKey": "Використати API-ключ {0}" }, "descriptions": { "improveCodeSelected": "Оптимізувати виділений код", @@ -152,7 +157,8 @@ }, "labels": { "active": "Активна", - "aiHints": "Підказки ШІ" + "aiHints": "Підказки ШІ", + "retired": "Припинено" }, "prompts": { "enterApiKey": "Введіть API ключ {0}", @@ -261,7 +267,9 @@ "localProviderNotFound": "{0} не знайдено за адресою '{1}'. Будь ласка, налаштуйте правильний шлях через 'Ввести ключ API'.", "localProviderNotRunning": "Не запущено. Будь ласка, запустіть.", "localProviderTimeout": "Сесія закінчилася", - "agentLogin": "{0} потребує повторного входу." + "agentLogin": "{0} потребує повторного входу.", + "apiKeyLoginNoKey": "{0} потребує твого API-ключа {1}, але в AI.duino його не збережено. Спочатку налаштуй його для {1}.", + "apiKeyLoginFailed": "Не вдалося змінити {0}. Перевір файл." }, "statusBar": { "tooltip": "AI.duino : {0}\nСьогодні: {1} Токени{2}\nВхід: {3} | Вихід: {4}\nКлік для меню • Ctrl+Shift+C • Правий клік для переключення", diff --git a/aiduino/extension/locales/zh.json b/aiduino/extension/locales/zh.json index 052590f..475ea3c 100644 --- a/aiduino/extension/locales/zh.json +++ b/aiduino/extension/locales/zh.json @@ -74,7 +74,11 @@ "highCostWarning": "预估成本(不含响应):${0}(使用{1})。继续?", "codeApplied": "代码已应用", "nodePathSaved": "Node.js路径已保存", - "loginCommandCopied": "未找到终端。登录命令已复制:{0}" + "loginCommandCopied": "未找到终端。登录命令已复制:{0}", + "providerRetired": "{0} 已不再可用。", + "providerRetiredUse": "{0} 已不再可用。请改用 {1}。", + "apiKeyLoginConfirm": "{0} 将使用你的 {1} API 密钥而不是账户登录。为此 AI.duino 会修改 {2},因此在 AI.duino 之外同样生效。", + "apiKeyLoginEnabled": "{0} 现在使用你的 {1} API 密钥。" }, "buttons": { "chooseModel": "选择AI模型", @@ -118,7 +122,8 @@ "configureNodePath": "配置Node.js路径", "enterNodePath": "输入Node.js v20+路径", "testProviders": "测试提供商", - "loginTerminal": "在终端中登录" + "loginTerminal": "在终端中登录", + "useApiKey": "使用 {0} API 密钥" }, "descriptions": { "improveCodeSelected": "优化选定的代码", @@ -152,7 +157,8 @@ }, "labels": { "active": "活动", - "aiHints": "AI提示" + "aiHints": "AI提示", + "retired": "已停用" }, "prompts": { "enterApiKey": "输入{0} API密钥", @@ -261,7 +267,9 @@ "localProviderNotFound": "在'{1}'未找到{0}。请通过'输入API密钥'配置正确路径。", "localProviderNotRunning": "未运行。请启动。", "localProviderTimeout": "会话已过期", - "agentLogin": "{0} 需要重新登录。" + "agentLogin": "{0} 需要重新登录。", + "apiKeyLoginNoKey": "{0} 需要你的 {1} API 密钥,但 AI.duino 中没有保存。请先为 {1} 设置。", + "apiKeyLoginFailed": "无法修改 {0}。请检查该文件。" }, "statusBar": { "tooltip": "AI.duino:{0}\n今日:{1} Tokens{2}\n输入:{3} | 输出:{4}\n点击打开菜单 • Ctrl+Shift+C • 右键切换", diff --git a/aiduino/extension/out/config/providerConfigs.js b/aiduino/extension/out/config/providerConfigs.js index 3c221f6..89a0d57 100644 --- a/aiduino/extension/out/config/providerConfigs.js +++ b/aiduino/extension/out/config/providerConfigs.js @@ -65,7 +65,7 @@ your_provider: { */ // Version -const CONFIG_VERSION = '231126'; +const CONFIG_VERSION = '281126'; const REMOTE_CONFIG_URL = 'https://raw.githubusercontent.com/NikolaiRadke/AI.duino/refs/heads/main/aiduino/extension/out/config/providerConfigs.js'; // All AI provider configurations @@ -965,6 +965,19 @@ const PROVIDER_CONFIGS = { return args; } }, + // Start options as data: a changed CLI is fixed by a config update (AI.duino ≥ 2.9.0, see cliSupport.js) + cli: { + args: { + chat: ['--print', '--dangerously-skip-permissions', '--output-format', 'json'], + agentic: ['--dangerously-skip-permissions', '--output-format', 'json'], + model: ['--model', '{model}'], + resume: ['--resume', '{session}'], + prompt: ['{prompt}'] + }, + sessionNotFound: 'no conversation found|session ID', + authError: '/login|not logged in|login expired|oauth|authentication_(error|failed)|invalid api key', + loginArgs: [] + }, prices: { input: 0.0, output: 0.0 @@ -1015,6 +1028,21 @@ const PROVIDER_CONFIGS = { return args; } }, + // Start options as data: a changed CLI is fixed by a config update (AI.duino ≥ 2.9.0, see cliSupport.js) + cli: { + args: { + chat: ['exec', '--json', '--skip-git-repo-check', '--color', 'never'], + agentic: ['exec', '--json', '--skip-git-repo-check', '--color', 'never', '--sandbox', 'workspace-write'], + model: ['--model', '{model}'], + resume: ['resume', '{session}'], + prompt: ['-'] + }, + stdin: '{prompt}', + sessionNotFound: 'no (conversation|session|thread|rollout) found|not found', + authError: '401|unauthori[sz]ed|not logged in|login required|api key|oauth|refresh|expired', + loginArgs: ['login'], + modelsCommand: { args: ['debug', 'models'], format: 'codex-json' } + }, prices: { input: 0.0, output: 0.0 @@ -1061,6 +1089,20 @@ const PROVIDER_CONFIGS = { return args; } }, + // Start options as data: a changed CLI is fixed by a config update (AI.duino ≥ 2.9.0, see cliSupport.js) + cli: { + args: { + chat: ['-p', '--output', 'streaming', '--trust', '--output-dir', '{runDir}'], + agentic: ['-p', '--output', 'streaming', '--trust', '--output-dir', '{runDir}', '--auto-approve'], + resume: ['--resume', '{session}'] + }, + stdin: '{prompt}', + sessionNotFound: 'session.*not found|no session', + authError: '401|unauthori[sz]ed|api key|setup|credential|login', + loginArgs: ['--setup'], + minVersion: '3.0.0', + updateHint: 'uv tool upgrade mistral-vibe' + }, prices: { input: 0.0, output: 0.0 @@ -1105,6 +1147,21 @@ const PROVIDER_CONFIGS = { return args; } }, + // Start options as data: a changed CLI is fixed by a config update (AI.duino ≥ 2.9.0, see cliSupport.js) + cli: { + args: { + chat: ['run', '--format', 'json'], + agentic: ['run', '--format', 'json'], + model: ['--model', '{model}'], + resume: ['--session', '{session}'] + }, + stdin: '{prompt}', + sessionNotFound: 'session not found', + authError: '401|unauthori[sz]ed|api key|authenticat|oauth|credential|log ?in|ProviderAuthError', + loginArgs: ['auth', 'login'], + // Used once modelDiscovery.enabled is true + modelsCommand: { args: ['models', '--verbose'], format: 'opencode-verbose' } + }, prices: { input: 0.0, output: 0.0 @@ -1112,7 +1169,7 @@ const PROVIDER_CONFIGS = { }, geminicli: { - name: 'Gemini CLI (≥ v2.6.0)', + name: 'Gemini CLI (API key only)', // Google ended Gemini CLI for free, Pro and Ultra accounts on June 18, 2026; successor: Antigravity CLI icon: '💎', color: '#4285F4', type: 'local', @@ -1152,6 +1209,78 @@ const PROVIDER_CONFIGS = { return args; } }, + // Start options as data: a changed CLI is fixed by a config update (AI.duino ≥ 2.9.0, see cliSupport.js) + cli: { + args: { + chat: ['-p', '{prompt}', '--output-format', 'json'], + agentic: ['-p', '{prompt}', '--output-format', 'json', '--approval-mode', 'yolo'], + model: ['--model', '{model}'], + order: ['model', 'base'] + }, + authError: '401|unauthori[sz]ed|api key|authenticat|oauth|credential|log ?in', + loginArgs: [] + }, + prices: { + input: 0.0, + output: 0.0 + } + }, + + antigravity: { + name: 'Antigravity CLI (≥ v2.9.0)', + icon: '🪐', + color: '#4285F4', + type: 'local', + agentModule: 'antigravity', + persistent: true, + keyFile: '.aiduino-antigravity-path', + keyPrefix: '', + keyMinLength: 3, // Min length for 'agy' + apiKeyUrl: 'https://antigravity.google/docs/cli/', + fallback: 'antigravity-local', + modelDiscovery: { + // Models come from 'agy models' (cli.modelsCommand); without a selection agy uses its own default + cliDefault: true, + enabled: true, + staticModels: [] + }, + processConfig: { + command: 'agy', + buildPrompt: (prompt, context) => { + return prompt; + }, + buildArgs: (prompt, context, modelId) => { + return ['--output-format', 'stream-json', '--input-format', 'stream-json']; + } + }, + // Start options as data: a changed CLI is fixed by a config update (see cliSupport.js) + cli: { + args: { + chat: ['--output-format', 'stream-json', '--input-format', 'stream-json'], + agentic: ['--output-format', 'stream-json', '--input-format', 'stream-json', '--dangerously-skip-permissions'], + model: ['--model', '{model}'], + resume: ['--conversation', '{session}'] + }, + stdin: '{"event":"user","message":{"content":{promptJson}}}\n', + sessionNotFound: 'conversation .*not found', + authError: 'authenticat|log ?in|oauth|credential|401|unauthori[sz]ed|GEMINI_API_KEY', + loginArgs: [], + minVersion: '1.5.8', + updateHint: 'agy update', + candidates: { + unix: ['{home}/.local/bin/{exe}', '/usr/local/bin/{exe}', '/opt/homebrew/bin/{exe}'], + windows: ['{localAppData}/agy/bin/{exe}', '{home}/.local/bin/{exe}'] + }, + modelsCommand: { args: ['models'], format: 'lines' }, + // Login with a Gemini API key instead of a Google account (agy reads the key only from + // GEMINI_API_KEY and only with modelProvider 'gemini' in its settings) + apiKeyLogin: { + keyFrom: 'gemini', + env: 'GEMINI_API_KEY', + settingsFile: '{home}/.gemini/antigravity-cli/settings.json', + settings: { modelProvider: 'gemini' } + } + }, prices: { input: 0.0, output: 0.0 @@ -1188,6 +1317,17 @@ const PROVIDER_CONFIGS = { return args; } }, + // Start options as data: a changed CLI is fixed by a config update (AI.duino ≥ 2.9.0, see cliSupport.js) + cli: { + args: { + chat: [ + '--system', + 'You are a helpful coding assistant for Arduino projects. Answer questions directly and concisely in German. If you need additional context, you CAN use tools to READ files from the workspace. However, you MUST NOT edit, modify, create, or write any files. Focus on providing clear explanations based on the information available to you.', + '--non-interactive', '{prompt}' + ], + agentic: ['--non-interactive', '{prompt}'] + } + }, prices: { input: 0.15 / 1000000, // GPT OSS 120B on Groq output: 0.60 / 1000000 @@ -1335,8 +1475,26 @@ const PROVIDER_CONFIGS = { } }; +// Data that is not about one provider but may change without a release (AI.duino ≥ 2.9.0, +// see utils/runtimeConfig.js). Older versions ignore this export. Empty lists keep the built-in defaults. +const RUNTIME_CONFIG = { + // Extra phrases of retired models or endpoints; an error containing one offers a config update + deprecationKeywords: [], + // Arduino IDE log lines that carry the selected board (first group = FQBN), in order of priority + boardLogPatterns: [ + 'Starting language server:\\s*([^\\s\\n]+)', + 'Failed to get debug config:\\s*([^,\\s\\n]+)' + ], + // Paths checked before the built-in ones. Placeholders: {home}, {appData}, {localAppData}, + // {programFiles}, {appRoot}, {execDir}, {exe} + ideLogDirs: { linux: [], darwin: [], win32: [] }, + arduinoCliPaths: { linux: [], darwin: [], win32: [] }, + arduinoCliConfigs: { linux: [], darwin: [], win32: [] } +}; + module.exports = { PROVIDER_CONFIGS, CONFIG_VERSION, - REMOTE_CONFIG_URL + REMOTE_CONFIG_URL, + RUNTIME_CONFIG }; diff --git a/aiduino/extension/out/config/testProviders.js b/aiduino/extension/out/config/testProviders.js index b09c37b..47f916e 100644 --- a/aiduino/extension/out/config/testProviders.js +++ b/aiduino/extension/out/config/testProviders.js @@ -429,6 +429,113 @@ function checkCliProvider(key, cfg) { } checkModelDiscovery(cfg); + checkAgentModule(cfg); + if (cfg.cli !== undefined) checkCliBlock(cfg.cli); +} + +// ===== CLI BLOCK CHECKS (AI.duino ≥ 2.9.0) ===== + +const MODULE_DIR = path.join(__dirname, '..', 'localProviders', 'processProviders'); +const CLI_GROUPS = ['chat', 'agentic', 'model', 'resume', 'prompt']; +const ORDER_NAMES = ['base', 'model', 'resume', 'prompt']; +const MODEL_FORMATS = ['lines', 'codex-json', 'opencode-verbose']; +const VERSION_PATTERN = /^\d+\.\d+\.\d+$/; + +function isStringList(value) { + return Array.isArray(value) && value.every(item => typeof item === 'string'); +} + +function compiles(source) { + try { + new RegExp(source, 'i'); + return true; + } catch { + return false; + } +} + +/** + * The agent module named in the config must exist (it is loaded with require) + * @param {Object} cfg - Provider config + */ +function checkAgentModule(cfg) { + if (cfg.agentModule === undefined) return; + const valid = typeof cfg.agentModule === 'string' && /^[A-Za-z][A-Za-z0-9]*$/.test(cfg.agentModule); + check(`agentModule '${cfg.agentModule}' is a plain module name`, valid); + if (valid) { + check(`agent module ${cfg.agentModule}.js exists`, fs.existsSync(path.join(MODULE_DIR, `${cfg.agentModule}.js`))); + } +} + +/** + * Shape of the optional "cli" block (see localProviders/processProviders/cliSupport.js) + * @param {Object} block - cli block + */ +function checkCliBlock(block) { + check('cli is an object', block && typeof block === 'object' && !Array.isArray(block)); + if (!block || typeof block !== 'object') return; + const args = block.args; + if (args !== undefined) { + check('cli.args.chat is a list of strings', isStringList(args.chat)); + check('cli.args.agentic is a list of strings', isStringList(args.agentic)); + for (const group of CLI_GROUPS.slice(2)) { + if (args[group] !== undefined) check(`cli.args.${group} is a list of strings`, isStringList(args[group])); + } + const unknown = Object.keys(args).filter(key => !CLI_GROUPS.includes(key) && key !== 'order'); + check('cli.args has only known groups', unknown.length === 0, unknown.join(', ')); + if (args.order !== undefined) { + check('cli.args.order names known groups', + isStringList(args.order) && args.order.every(name => ORDER_NAMES.includes(name))); + } + } + if ('stdin' in block) check('cli.stdin is a string or null', block.stdin === null || typeof block.stdin === 'string'); + for (const key of ['sessionNotFound', 'authError']) { + if (block[key] !== undefined) check(`cli.${key} is a valid pattern`, typeof block[key] === 'string' && compiles(block[key])); + } + if (block.loginArgs !== undefined) check('cli.loginArgs is a list of strings', isStringList(block.loginArgs)); + if (block.minVersion !== undefined) check('cli.minVersion is x.y.z', VERSION_PATTERN.test(String(block.minVersion))); + if (block.updateHint !== undefined) check('cli.updateHint is a string', typeof block.updateHint === 'string'); + if (block.candidates !== undefined) { + check('cli.candidates.unix/windows are lists of strings', + ['unix', 'windows'].every(os => block.candidates[os] === undefined || isStringList(block.candidates[os]))); + } + if (block.modelsCommand !== undefined) { + check('cli.modelsCommand.args is a list of strings', isStringList(block.modelsCommand.args)); + check('cli.modelsCommand.format is known', MODEL_FORMATS.includes(block.modelsCommand.format), block.modelsCommand.format); + } + if (block.apiKeyLogin !== undefined) { + const login = block.apiKeyLogin; + check('cli.apiKeyLogin has keyFrom, env, settingsFile, settings', + typeof login?.keyFrom === 'string' && /^[A-Z][A-Z0-9_]*$/.test(login?.env || '') + && typeof login?.settingsFile === 'string' && login?.settings && typeof login.settings === 'object'); + } + check('cli contains no functions', !JSON.stringify(block, (k, v) => (typeof v === 'function' ? '__fn__' : v)).includes('__fn__')); +} + +/** + * Shape of RUNTIME_CONFIG (see utils/runtimeConfig.js) + * @param {Object|undefined} runtime - RUNTIME_CONFIG export + */ +function checkRuntimeConfig(runtime) { + if (runtime === undefined) { + info('No RUNTIME_CONFIG (AI.duino < 2.9.0 config)'); + return; + } + check('RUNTIME_CONFIG is an object', runtime && typeof runtime === 'object' && !Array.isArray(runtime)); + if (!runtime || typeof runtime !== 'object') return; + if (runtime.deprecationKeywords !== undefined) { + check('deprecationKeywords is a list of strings', isStringList(runtime.deprecationKeywords)); + } + if (runtime.boardLogPatterns !== undefined) { + check('boardLogPatterns are valid patterns with a group', + isStringList(runtime.boardLogPatterns) && runtime.boardLogPatterns.length > 0 + && runtime.boardLogPatterns.every(p => compiles(p) && new RegExp(p).source.includes('('))); + } + for (const key of ['ideLogDirs', 'arduinoCliPaths', 'arduinoCliConfigs']) { + if (runtime[key] === undefined) continue; + check(`${key} has lists of strings per platform`, + ['linux', 'darwin', 'win32'].every(os => runtime[key][os] === undefined || isStringList(runtime[key][os]))); + } } // ===== HTTP PROVIDER CHECKS ===== @@ -579,8 +686,9 @@ async function runTests() { // --- Syntax check --- let PROVIDER_CONFIGS; let CONFIG_VERSION; + let RUNTIME_CONFIG; try { - ({ PROVIDER_CONFIGS, CONFIG_VERSION } = require('./providerConfigs.js')); + ({ PROVIDER_CONFIGS, CONFIG_VERSION, RUNTIME_CONFIG } = require('./providerConfigs.js')); console.log(`${PASS} providerConfigs.js loaded successfully`); totalPass++; } catch (e) { @@ -620,6 +728,10 @@ async function runTests() { await checkHttpProvider(k, cfg); } + banner('Runtime Config'); + section('RUNTIME_CONFIG'); + checkRuntimeConfig(RUNTIME_CONFIG); + banner('Model Catalog'); await checkCatalog(PROVIDER_CONFIGS); diff --git a/aiduino/extension/out/core/agenticClient.js b/aiduino/extension/out/core/agenticClient.js index d665910..fee3074 100644 --- a/aiduino/extension/out/core/agenticClient.js +++ b/aiduino/extension/out/core/agenticClient.js @@ -17,6 +17,7 @@ const os = require('os'); const TokenManager = require('./tokenManager'); const shared = require('../shared'); const agentLogin = require('../utils/agentLogin'); +const cliSupport = require('../localProviders/processProviders/cliSupport'); const AIDUINO_DIR = path.join(os.homedir(), '.aiduino'); const SESSIONS_FILE = path.join(AIDUINO_DIR, '.aiduino-sessions.json'); @@ -135,6 +136,9 @@ class AgenticClient { } this.lastSessionId = null; + // Config block and environment for the module (older modules ignore the extra argument) + const run = { provider, env: agentLogin.apiKeyEnv(provider, context.apiKeys) }; + let result; try { result = await agent.executeCommand( @@ -144,13 +148,17 @@ class AgenticClient { sessionId, workspacePath, options.agenticMode || false, - selectedModel + selectedModel, + run ); } catch (error) { // Stale session: clear it and retry without session ID - const staleSession = typeof agent.isStaleSession === 'function' - ? agent.isStaleSession(error.message) - : (error.message || '').includes('session ID'); + const fromConfig = cliSupport.matches(provider.cli, 'sessionNotFound', error.message); + const staleSession = fromConfig !== null + ? fromConfig + : typeof agent.isStaleSession === 'function' + ? agent.isStaleSession(error.message) + : (error.message || '').includes('session ID'); if (sessionId && staleSession) { this.sessions.delete(sessionKey); this.saveSessions(); @@ -161,7 +169,8 @@ class AgenticClient { null, // no session ID on retry workspacePath, options.agenticMode || false, - selectedModel + selectedModel, + run ); } else { throw this.markAuthError(error, provider, toolPath, workspacePath, context); @@ -201,7 +210,10 @@ class AgenticClient { * @returns {Error} The error */ markAuthError(error, provider, toolPath, workspacePath, context) { - if (agentLogin.isAuthError(provider.agentModule, error?.message)) { + // An option the CLI does not know: most likely an outdated CLI + const tooOld = cliSupport.tooOldError(provider, error, context.t); + if (tooOld) return tooOld; + if (agentLogin.isAuthError(provider.agentModule, error?.message, provider)) { error.type = 'AGENT_AUTH'; agentLogin.offerLogin(context, provider, toolPath, workspacePath); } @@ -249,6 +261,10 @@ class AgenticClient { getAgent(modelId, provider) { if (!this.agents[modelId]) { const agentModule = provider.agentModule || modelId; + // The name comes from the (remote) config and ends up in require() + if (!cliSupport.isValidModuleName(agentModule)) { + throw new Error(`Agent module not found: ${agentModule}`); + } try { this.agents[modelId] = require(`../localProviders/processProviders/${agentModule}`); } catch (error) { diff --git a/aiduino/extension/out/localProviders/processProviders/antigravity.js b/aiduino/extension/out/localProviders/processProviders/antigravity.js new file mode 100644 index 0000000..d4cfda6 --- /dev/null +++ b/aiduino/extension/out/localProviders/processProviders/antigravity.js @@ -0,0 +1,137 @@ +/** + * Antigravity CLI Process Provider + * Provider-specific logic for Google's Antigravity CLI (agy), successor of Gemini CLI + * + * agy --output-format stream-json --input-format stream-json [--model ] [--conversation ] + * The prompt goes as one JSON line via stdin; closing stdin ends the run after the turn. + * Every output line is {"event": "", "": {...}} with the types init, + * step_update and result (checked by Agentuino against agy 1.5.8 and the headless docs). + * Text arrives in fragments (text_delta) per step. Login: Google account (run agy once) + * or a Gemini API key (see cli.apiKeyLogin in providerConfigs.js). + */ + +const { executeProcessProvider, cleanProcessOutput } = require('./processProvider'); +const cliSupport = require('./cliSupport'); + +const STEP_TEXT = 'agent_response'; +const STATUS_SUCCESS = 'SUCCESS'; + +/** + * Build command arguments with session support (built-in default, the config may override it) + * @param {string} prompt - User prompt (sent via stdin, not as argument) + * @param {string|null} sessionId - Conversation ID for persistent conversations + * @param {boolean} agenticMode - If true, allow file editing without asking + * @param {string|null} modelId - Selected model ID + * @returns {Array} Command arguments + */ +function buildArgs(prompt, sessionId = null, agenticMode = false, modelId = null) { + const args = ['--output-format', 'stream-json', '--input-format', 'stream-json']; + + if (agenticMode) { + args.push('--dangerously-skip-permissions'); + } + + if (modelId && modelId !== 'default') { + args.push('--model', modelId); + } + + if (sessionId) { + args.push('--conversation', sessionId); + } + + return args; +} + +/** + * Prompt as one streaming input message (built-in default) + * @param {string} prompt - Prompt + * @returns {string} JSON line + */ +function formatInput(prompt) { + return JSON.stringify({ event: 'user', message: { content: prompt } }) + '\n'; +} + +/** + * Extract response and conversation ID from the JSON lines + * @param {string} stdout - Raw output from agy + * @returns {Object} { response, sessionId } + */ +function extractResponse(stdout) { + const texts = new Map(); + let sessionId = null; + let result = null; + + for (const line of cleanProcessOutput(String(stdout || '')).split('\n')) { + let event; + try { + event = JSON.parse(line); + } catch { + continue; + } + if (!event || typeof event !== 'object') continue; + const type = event.event; + const payload = (type && event[type]) || event; + if (payload.conversation_id) sessionId = payload.conversation_id; + + if (type === 'step_update' && payload.step_type === STEP_TEXT) { + const key = payload.step_index; + texts.set(key, (texts.get(key) || '') + (payload.text_delta || '')); + } else if (type === 'result') { + result = payload; + } + } + + const joined = [...texts.values()].map(text => text.trim()).filter(Boolean).join('\n\n'); + if (result) { + if (result.status && result.status !== STATUS_SUCCESS) { + throw new Error(result.error || result.status || 'Antigravity error'); + } + return { response: result.response || joined, sessionId: result.conversation_id || sessionId }; + } + if (joined) { + return { response: joined, sessionId }; + } + // No JSON at all: show what agy printed (often a login or setup message) + throw new Error(cleanProcessOutput(String(stdout || '')) || 'Antigravity error'); +} + +/** + * Does an error mean the conversation no longer exists? + * @param {string} message - Error message + * @returns {boolean} + */ +function isStaleSession(message) { + return /conversation .*not found/i.test(message || ''); +} + +/** + * Execute Antigravity CLI command with project awareness + * @param {string} toolPath - Path to agy + * @param {string} prompt - User prompt + * @param {Object} context - Extension context + * @param {string|null} sessionId - Conversation ID for persistent conversations + * @param {string|null} workspacePath - Project directory (used as cwd) + * @param {boolean} agenticMode - If true, allow file editing + * @param {string|null} modelId - Selected model ID + * @param {Object} run - {provider, env} from the agentic client + * @returns {Promise} Raw output from agy + */ +async function executeCommand(toolPath, prompt, context, sessionId = null, workspacePath = null, agenticMode = false, modelId = null, run = {}) { + const { t } = context; + const cli = run.provider?.cli; + const args = cliSupport.buildArgs(cli, { prompt, sessionId, agenticMode, modelId }) + || buildArgs(prompt, sessionId, agenticMode, modelId); + + const options = workspacePath ? { cwd: workspacePath } : {}; + const input = cliSupport.stdinInput(cli, prompt, formatInput(prompt)); + if (input !== null) options.input = input; + if (run.env) options.env = run.env; + + return executeProcessProvider(toolPath, args, 'Antigravity CLI', t, 300000, options); +} + +module.exports = { + executeCommand, + extractResponse, + isStaleSession +}; diff --git a/aiduino/extension/out/localProviders/processProviders/claudeCode.js b/aiduino/extension/out/localProviders/processProviders/claudeCode.js index c3b1f7b..60fad32 100644 --- a/aiduino/extension/out/localProviders/processProviders/claudeCode.js +++ b/aiduino/extension/out/localProviders/processProviders/claudeCode.js @@ -4,6 +4,7 @@ */ const { executeProcessProvider } = require('./processProvider'); +const cliSupport = require('./cliSupport'); /** * Build command arguments with session support @@ -71,14 +72,20 @@ function extractResponse(stdout) { * @param {string|null} workspacePath - Project directory (used as cwd) * @param {boolean} agenticMode - If true, allow file editing * @param {string|null} modelId - Selected model ID + * @param {Object} run - {provider, env} from the agentic client (optional) * @returns {Promise} Raw output from Claude Code */ -async function executeCommand(toolPath, prompt, context, sessionId = null, workspacePath = null, agenticMode = false, modelId = null) { +async function executeCommand(toolPath, prompt, context, sessionId = null, workspacePath = null, agenticMode = false, modelId = null, run = {}) { const { t } = context; - const args = buildArgs(prompt, sessionId, agenticMode, modelId); + const cli = run.provider?.cli; + const args = cliSupport.buildArgs(cli, { prompt, sessionId, agenticMode, modelId }) + || buildArgs(prompt, sessionId, agenticMode, modelId); // Pass workspacePath as cwd so Claude Code can access sketch files const options = workspacePath ? { cwd: workspacePath } : {}; + const input = cliSupport.stdinInput(cli, prompt, null); + if (input !== null) options.input = input; + if (run.env) options.env = run.env; return executeProcessProvider(toolPath, args, 'Claude Code', t, 300000, options); } diff --git a/aiduino/extension/out/localProviders/processProviders/cliModels.js b/aiduino/extension/out/localProviders/processProviders/cliModels.js new file mode 100644 index 0000000..5a0baac --- /dev/null +++ b/aiduino/extension/out/localProviders/processProviders/cliModels.js @@ -0,0 +1,160 @@ +/* + * AI.duino - CLI Model Lists + * Copyright 2026 Monster Maker + * + * Licensed under the Apache License, Version 2.0 + * + * CLI providers with cli.modelsCommand in providerConfigs.js are asked for + * their models once per session, so new models show up without a config + * update. Nothing here is required: on any failure the static list remains. + * Parsers taken from Agentuino (modelCatalog.js). + */ + +"use strict"; + +const { execFile } = require('child_process'); +const cliSupport = require('./cliSupport'); + +const LIST_TIMEOUT_MS = 30000; +// opencode models --verbose prints a JSON block per model, several hundred KB +const MAX_LIST_BUFFER = 16 * 1024 * 1024; +const MAX_MODELS = 200; +const HIDDEN_VISIBILITY = 'hide'; +const MODEL_ID = /^[\w.:/@-]{2,120}$/; +// opencode-verbose: a model ID on its own line, then its JSON block up to a "}" line +const OPENCODE_BLOCK = /^(\S+)\r?\n(\{[\s\S]*?\r?\n\})\s*$/gm; + +// Key: provider name and executable, value: Promise of the list +const cache = new Map(); + +/** + * Parse JSON without throwing + * @param {string} text - Text + * @returns {*} Data or null + */ +function parseJson(text) { + try { + return JSON.parse(text); + } catch { + return null; + } +} + +/** + * One model per line, the first word counts. Headings ("Models:") are skipped. + * @param {string} text - Output + * @returns {string[]} Model IDs + */ +function parseLines(text) { + return String(text).split(/\r?\n/) + .map(line => line.trim()) + .filter(line => line && !line.endsWith(':')) + .map(line => line.split(/\s+/)[0]); +} + +/** + * codex debug models: {models: [{slug, visibility}]} + * @param {string} text - Output + * @returns {string[]} Model IDs + */ +function parseCodexJson(text) { + const data = parseJson(text); + if (!Array.isArray(data?.models)) return []; + return data.models + .filter(model => typeof model?.slug === 'string' && model.visibility !== HIDDEN_VISIBILITY) + .map(model => model.slug); +} + +/** + * opencode models --verbose: "provider/model" lines, each followed by a JSON block + * @param {string} text - Output + * @returns {string[]} Model IDs + */ +function parseOpencodeVerbose(text) { + return [...String(text).matchAll(OPENCODE_BLOCK)].map(match => match[1]); +} + +const PARSERS = { + 'lines': parseLines, + 'codex-json': parseCodexJson, + 'opencode-verbose': parseOpencodeVerbose +}; + +/** + * Parse the output of a model list command + * @param {string} format - Format from cli.modelsCommand + * @param {string} text - Output + * @returns {string[]} Unique model IDs + */ +function parse(format, text) { + const parser = PARSERS[format]; + if (!parser) return []; + return [...new Set(parser(text).filter(id => MODEL_ID.test(id)))].slice(0, MAX_MODELS); +} + +/** + * Run the model list command + * @param {Object} command - {args, format} + * @param {string} toolPath - Executable + * @returns {Promise} Model IDs, empty on any failure + */ +function runList(command, toolPath) { + return new Promise(resolve => { + try { + const isCmd = process.platform === 'win32' && /\.cmd$/i.test(toolPath); + const child = execFile(toolPath, command.args, { + timeout: LIST_TIMEOUT_MS, + maxBuffer: MAX_LIST_BUFFER, + windowsHide: true, + shell: isCmd + }, (err, stdout) => resolve(err ? [] : parse(command.format, stdout))); + // Nothing to read: an agent waiting for a prompt on stdin ends at once + child.stdin?.on('error', () => {}); + child.stdin?.end(); + } catch { + resolve([]); + } + }); +} + +/** + * Models a CLI provider reports, asked once per session. A failed attempt is + * not kept, so the next model selection tries again (e.g. after logging in). + * @param {Object} provider - Provider config + * @param {string} storedValue - Stored path (format: path|model) + * @returns {Promise>} Models + */ +async function listModels(provider, storedValue) { + const command = provider?.cli?.modelsCommand; + const toolPath = typeof storedValue === 'string' ? storedValue.split('|')[0].trim() : ''; + if (!command || !cliSupport.isStringList(command.args) || !PARSERS[command.format] || !toolPath) { + return []; + } + const key = `${provider.name}\n${toolPath}`; + if (!cache.has(key)) { + const promise = runList(command, toolPath).then(ids => { + if (ids.length === 0) cache.delete(key); + return ids; + }); + cache.set(key, promise); + } + const ids = await cache.get(key); + return ids.map(id => ({ id, name: id, displayName: id })); +} + +/** + * Static models first (curated names), then the ones the CLI reports in addition + * @param {Array} staticModels - Models from the config + * @param {Array} listed - Models from listModels + * @returns {Array} Merged list + */ +function merge(staticModels, listed) { + const known = new Set(staticModels.map(model => model.id)); + return [...staticModels, ...listed.filter(model => !known.has(model.id))]; +} + +module.exports = { + parse, + listModels, + merge +}; diff --git a/aiduino/extension/out/localProviders/processProviders/cliSupport.js b/aiduino/extension/out/localProviders/processProviders/cliSupport.js new file mode 100644 index 0000000..f9d85cb --- /dev/null +++ b/aiduino/extension/out/localProviders/processProviders/cliSupport.js @@ -0,0 +1,206 @@ +/* + * AI.duino - CLI Support + * Copyright 2026 Monster Maker + * + * Licensed under the Apache License, Version 2.0 + * + * Reads the optional "cli" block of a CLI provider in providerConfigs.js, so + * changed CLI options, login hints and error texts can be fixed by a config + * update instead of a release. Everything here is data: argument templates, + * regular expressions as strings, paths with placeholders. Without a "cli" + * block (or with broken values) the agent modules use their built-in defaults. + * + * Argument templates (cli.args): + * chat, agentic base arguments for chat and agentic mode + * model used when a model is selected (not 'default') + * resume used when a session is continued + * prompt prompt as argument; leave out when the prompt goes via stdin + * order order of the groups, default ['base', 'model', 'resume', 'prompt'] + * Placeholders: {prompt}, {model}, {session}, {runDir} + * cli.stdin: text written to stdin, null for none. {prompt} and {promptJson} + * (the prompt as JSON string) are replaced. + */ + +"use strict"; + +const os = require('os'); +const path = require('path'); + +const DEFAULT_ORDER = ['base', 'model', 'resume', 'prompt']; +const GROUPS = ['base', 'model', 'resume', 'prompt']; +const PLACEHOLDER = /\{(prompt|promptJson|model|session|runDir|home|localAppData|appData|exe)\}/g; +const VERSION_NUMBER = /\d+\.\d+\.\d+/; +// Typical answers of a CLI to an option it does not know (too old or option renamed) +const UNKNOWN_OPTION = /unrecognized arguments?|unknown (option|argument|flag)|no such option|unexpected argument|invalid option/i; +// Module names are file names in this folder; nothing else may be required +const MODULE_NAME = /^[A-Za-z][A-Za-z0-9]*$/; + +/** + * Is this a list of strings? + * @param {*} value - Value + * @returns {boolean} + */ +function isStringList(value) { + return Array.isArray(value) && value.every(item => typeof item === 'string'); +} + +/** + * Replace placeholders in a string + * @param {string} text - Template + * @param {Object} values - Placeholder values + * @returns {string|null} Result, null if a placeholder has no value + */ +function fill(text, values) { + let missing = false; + const result = text.replace(PLACEHOLDER, (match, name) => { + const value = values[name]; + if (value === undefined || value === null) { + missing = true; + return match; + } + return String(value); + }); + return missing ? null : result; +} + +/** + * Build the arguments of a run from the config templates + * @param {Object|undefined} cli - "cli" block of the provider + * @param {Object} run - {prompt, sessionId, agenticMode, modelId, runDir} + * @returns {string[]|null} Arguments, null if the config has no usable templates + */ +function buildArgs(cli, run) { + const templates = cli?.args; + if (!templates || typeof templates !== 'object') return null; + const base = run.agenticMode ? templates.agentic : templates.chat; + if (!isStringList(base)) return null; + + const values = { + prompt: run.prompt, + model: run.modelId && run.modelId !== 'default' ? run.modelId : null, + session: run.sessionId || null, + runDir: run.runDir || null + }; + const groups = { + base, + model: values.model ? templates.model : null, + resume: values.session ? templates.resume : null, + prompt: templates.prompt + }; + const order = isStringList(templates.order) && templates.order.every(name => GROUPS.includes(name)) + ? templates.order + : DEFAULT_ORDER; + + const args = []; + for (const name of order) { + const group = groups[name]; + if (group === null || group === undefined) continue; + if (!isStringList(group)) return null; + for (const part of group) { + const value = fill(part, values); + // A base argument without its value (e.g. no run folder) makes the template unusable + if (value === null) { + if (name === 'base') return null; + continue; + } + args.push(value); + } + } + return args; +} + +/** + * What to write to stdin + * @param {Object|undefined} cli - "cli" block of the provider + * @param {string} prompt - Prompt + * @param {string|null} fallback - Built-in behaviour of the module (prompt or null) + * @returns {string|null} Text for stdin, null for none + */ +function stdinInput(cli, prompt, fallback) { + if (!cli || !('stdin' in cli)) return fallback; + if (cli.stdin === null) return null; + if (typeof cli.stdin !== 'string') return fallback; + return cli.stdin.split('{promptJson}').map(part => part.split('{prompt}').join(prompt)).join(JSON.stringify(prompt)); +} + +/** + * Regular expression from a config string + * @param {*} source - Pattern as string + * @returns {RegExp|null} Case-insensitive expression, null if missing or invalid + */ +function toRegExp(source) { + if (typeof source !== 'string' || !source) return null; + try { + return new RegExp(source, 'i'); + } catch { + return null; + } +} + +/** + * Does the message match a pattern of the cli block? + * @param {Object|undefined} cli - "cli" block + * @param {string} key - 'sessionNotFound' or 'authError' + * @param {string} message - Error message + * @returns {boolean|null} Result, null if the config has no usable pattern + */ +function matches(cli, key, message) { + const pattern = toRegExp(cli?.[key]); + return pattern ? pattern.test(message || '') : null; +} + +/** + * Error for a CLI that does not know an option: probably too old + * @param {Object} provider - Provider config + * @param {Error} error - Error of the run + * @param {Function} t - Translation function + * @returns {Error|null} Friendlier error, null if not applicable + */ +function tooOldError(provider, error, t) { + const cli = provider?.cli; + if (!cli?.minVersion || !VERSION_NUMBER.test(cli.minVersion)) return null; + if (!UNKNOWN_OPTION.test(error?.message || '')) return null; + const name = String(provider.name || '').replace(/\s*\(.*\)\s*$/, ''); + return new Error(t('errors.cliTooOld', name, cli.minVersion, cli.updateHint || '')); +} + +/** + * Candidate paths of the executable from the config, placeholders resolved + * @param {Object|undefined} cli - "cli" block + * @param {string} name - Executable name + * @returns {string[]} Paths for this platform + */ +function candidatePaths(cli, name) { + const isWindows = process.platform === 'win32'; + const list = cli?.candidates?.[isWindows ? 'windows' : 'unix']; + if (!isStringList(list)) return []; + const home = os.homedir(); + const values = { + home, + localAppData: process.env.LOCALAPPDATA || path.join(home, 'AppData', 'Local'), + appData: process.env.APPDATA || path.join(home, 'AppData', 'Roaming'), + exe: isWindows ? `${name}.exe` : name + }; + return list.map(entry => fill(entry, values)).filter(Boolean).map(entry => path.normalize(entry)); +} + +/** + * Check a module name from the config before it is used in require() + * @param {*} name - agentModule + * @returns {boolean} + */ +function isValidModuleName(name) { + return typeof name === 'string' && MODULE_NAME.test(name); +} + +module.exports = { + buildArgs, + stdinInput, + toRegExp, + matches, + tooOldError, + candidatePaths, + isValidModuleName, + isStringList, + fill +}; diff --git a/aiduino/extension/out/localProviders/processProviders/codexCli.js b/aiduino/extension/out/localProviders/processProviders/codexCli.js index 98ec91f..2a02297 100644 --- a/aiduino/extension/out/localProviders/processProviders/codexCli.js +++ b/aiduino/extension/out/localProviders/processProviders/codexCli.js @@ -6,6 +6,7 @@ 'use strict'; const { executeProcessProvider, cleanProcessOutput } = require('./processProvider'); +const cliSupport = require('./cliSupport'); /** * Build CLI arguments @@ -141,14 +142,18 @@ async function executeCommand( sessionId = null, workspacePath = null, agenticMode = false, - modelId = null + modelId = null, + run = {} ) { const { t } = context; - const args = buildArgs(prompt, sessionId, agenticMode, modelId); - - const options = workspacePath - ? { cwd: workspacePath, input: prompt } - : { input: prompt }; + const cli = run.provider?.cli; + const args = cliSupport.buildArgs(cli, { prompt, sessionId, agenticMode, modelId }) + || buildArgs(prompt, sessionId, agenticMode, modelId); + + const options = workspacePath ? { cwd: workspacePath } : {}; + const input = cliSupport.stdinInput(cli, prompt, prompt); + if (input !== null) options.input = input; + if (run.env) options.env = run.env; return executeProcessProvider( toolPath, diff --git a/aiduino/extension/out/localProviders/processProviders/geminiCli.js b/aiduino/extension/out/localProviders/processProviders/geminiCli.js index 0906a32..31d537d 100644 --- a/aiduino/extension/out/localProviders/processProviders/geminiCli.js +++ b/aiduino/extension/out/localProviders/processProviders/geminiCli.js @@ -6,6 +6,7 @@ */ const { executeProcessProvider } = require('./processProvider'); +const cliSupport = require('./cliSupport'); const { fileExists, loadNodePath } = require('../../utils/fileManager'); /** @@ -67,13 +68,13 @@ function extractResponse(stdout) { * @param {string|null} modelId - Selected model ID * @returns {Promise} Raw output from Gemini CLI */ -async function executeCommand(toolPath, prompt, context, sessionId = null, workspacePath = null, agenticMode = false, modelId = null) { +async function executeCommand(toolPath, prompt, context, sessionId = null, workspacePath = null, agenticMode = false, modelId = null, run = {}) { const { t } = context; - const args = buildArgs(prompt, sessionId, agenticMode, modelId); + const cli = run.provider?.cli; + const args = cliSupport.buildArgs(cli, { prompt, sessionId, agenticMode, modelId }) + || buildArgs(prompt, sessionId, agenticMode, modelId); // Get Node.js v20+ path from fileManager - // WICHTIG: providers muss von wo anders kommen! - const { PROVIDER_CONFIGS } = require('../../config/providerConfigs'); const nodePath = loadNodePath(); if (!nodePath || !fileExists(nodePath)) { @@ -96,6 +97,9 @@ async function executeCommand(toolPath, prompt, context, sessionId = null, works const finalArgs = [geminiPath, ...args]; const options = workspacePath ? { cwd: workspacePath } : {}; + const input = cliSupport.stdinInput(cli, prompt, null); + if (input !== null) options.input = input; + if (run.env) options.env = run.env; return executeProcessProvider(nodePath, finalArgs, 'Gemini CLI', t, 300000, options); } diff --git a/aiduino/extension/out/localProviders/processProviders/groqCode.js b/aiduino/extension/out/localProviders/processProviders/groqCode.js index ed7015b..5cedc12 100644 --- a/aiduino/extension/out/localProviders/processProviders/groqCode.js +++ b/aiduino/extension/out/localProviders/processProviders/groqCode.js @@ -6,6 +6,7 @@ */ const { executeProcessProvider } = require('./processProvider'); +const cliSupport = require('./cliSupport'); const { fileExists, loadNodePath } = require('../../utils/fileManager'); /** @@ -54,9 +55,11 @@ function extractResponse(stdout) { * @param {boolean} agenticMode - If true, allow file editing * @returns {Promise} Raw output from Groq Code CLI */ -async function executeCommand(toolPath, prompt, context, sessionId = null, workspacePath = null, agenticMode = false) { +async function executeCommand(toolPath, prompt, context, sessionId = null, workspacePath = null, agenticMode = false, modelId = null, run = {}) { const { t } = context; - const args = buildArgs(prompt, sessionId, agenticMode); + const cli = run.provider?.cli; + const args = cliSupport.buildArgs(cli, { prompt, sessionId, agenticMode, modelId: null }) + || buildArgs(prompt, sessionId, agenticMode); // Get Node.js v20+ path from fileManager const nodePath = loadNodePath(); @@ -82,6 +85,9 @@ async function executeCommand(toolPath, prompt, context, sessionId = null, works const finalArgs = [groqPath, ...args]; const options = workspacePath ? { cwd: workspacePath } : {}; + const input = cliSupport.stdinInput(cli, prompt, null); + if (input !== null) options.input = input; + if (run.env) options.env = run.env; return executeProcessProvider(nodePath, finalArgs, 'Groq Code CLI', t, 300000, options); } diff --git a/aiduino/extension/out/localProviders/processProviders/mistralVibe.js b/aiduino/extension/out/localProviders/processProviders/mistralVibe.js index b532539..91def64 100644 --- a/aiduino/extension/out/localProviders/processProviders/mistralVibe.js +++ b/aiduino/extension/out/localProviders/processProviders/mistralVibe.js @@ -12,6 +12,7 @@ const fs = require('fs'); const os = require('os'); const path = require('path'); const { executeProcessProvider } = require('./processProvider'); +const cliSupport = require('./cliSupport'); const EXPORT_FILE = 'export.json'; const MIN_VERSION = '3.0'; @@ -134,13 +135,19 @@ function isStaleSession(message) { * @param {string|null} modelId - Selected model ID (unused, see buildArgs) * @returns {Promise} Streamed output plus export report */ -async function executeCommand(toolPath, prompt, context, sessionId = null, workspacePath = null, agenticMode = false, modelId = null) { +async function executeCommand(toolPath, prompt, context, sessionId = null, workspacePath = null, agenticMode = false, modelId = null, run = {}) { const { t } = context; + const cli = run.provider?.cli; const runDir = fs.mkdtempSync(path.join(os.tmpdir(), 'aiduino-vibe-')); - const args = buildArgs(runDir, sessionId, agenticMode); + // Model selection stays in Vibe's own config unless the config templates say otherwise + const args = cliSupport.buildArgs(cli, { prompt, sessionId, agenticMode, modelId: null, runDir }) + || buildArgs(runDir, sessionId, agenticMode); // Pass workspacePath as cwd so Vibe can access sketch files, prompt via stdin - const options = workspacePath ? { cwd: workspacePath, input: prompt } : { input: prompt }; + const options = workspacePath ? { cwd: workspacePath } : {}; + const input = cliSupport.stdinInput(cli, prompt, prompt); + if (input !== null) options.input = input; + if (run.env) options.env = run.env; try { const output = await executeProcessProvider(toolPath, args, 'Mistral Vibe', t, 300000, options); @@ -154,7 +161,7 @@ async function executeCommand(toolPath, prompt, context, sessionId = null, works } catch (error) { // Vibe 2.x does not know --output-dir and --trust if (/unrecognized arguments|no such option|unknown option/i.test(error.message || '')) { - throw new Error(t('errors.cliTooOld', 'Mistral Vibe', MIN_VERSION, UPDATE_HINT)); + throw new Error(t('errors.cliTooOld', 'Mistral Vibe', cli?.minVersion || MIN_VERSION, cli?.updateHint || UPDATE_HINT)); } throw error; } finally { diff --git a/aiduino/extension/out/localProviders/processProviders/openCode.js b/aiduino/extension/out/localProviders/processProviders/openCode.js index 76f9de2..83cefad 100644 --- a/aiduino/extension/out/localProviders/processProviders/openCode.js +++ b/aiduino/extension/out/localProviders/processProviders/openCode.js @@ -4,6 +4,7 @@ */ const { executeProcessProvider, cleanProcessOutput } = require('./processProvider'); +const cliSupport = require('./cliSupport'); /** * Build command arguments with session support @@ -115,11 +116,16 @@ function isStaleSession(message) { * @param {string|null} modelId - Selected model ID * @returns {Promise} Raw output from OpenCode */ -async function executeCommand(toolPath, prompt, context, sessionId = null, workspacePath = null, agenticMode = false, modelId = null) { +async function executeCommand(toolPath, prompt, context, sessionId = null, workspacePath = null, agenticMode = false, modelId = null, run = {}) { const { t } = context; - const args = buildArgs(prompt, sessionId, agenticMode, modelId); + const cli = run.provider?.cli; + const args = cliSupport.buildArgs(cli, { prompt, sessionId, agenticMode, modelId }) + || buildArgs(prompt, sessionId, agenticMode, modelId); // Prompt via stdin (avoids argument length and quoting problems on Windows) - const options = workspacePath ? { cwd: workspacePath, input: prompt } : { input: prompt }; + const options = workspacePath ? { cwd: workspacePath } : {}; + const input = cliSupport.stdinInput(cli, prompt, prompt); + if (input !== null) options.input = input; + if (run.env) options.env = run.env; return executeProcessProvider(toolPath, args, 'OpenCode', t, 300000, options); } diff --git a/aiduino/extension/out/localProviders/processProviders/processProvider.js b/aiduino/extension/out/localProviders/processProviders/processProvider.js index fc867d0..ec045fd 100644 --- a/aiduino/extension/out/localProviders/processProviders/processProvider.js +++ b/aiduino/extension/out/localProviders/processProviders/processProvider.js @@ -60,7 +60,7 @@ async function executeCommand(toolPath, prompt, context, provider, sessionId = n * @param {string} providerName - Provider name for error messages * @param {Function} t - Translation function * @param {number} timeout - Timeout in milliseconds (default: 300000 = 5 min) - * @param {Object} options - Additional options (e.g., { cwd: '/path' }) + * @param {Object} options - Additional options ({ cwd, input, env }) * @returns {Promise} stdout output */ async function executeProcessProvider(toolPath, args, providerName, t, timeout = 300000, options = {}) { @@ -72,6 +72,7 @@ async function executeProcessProvider(toolPath, args, providerName, t, timeout = const spawnOptions = { cwd: options.cwd || process.cwd(), stdio: options.input ? ['pipe', 'pipe', 'pipe'] : ['ignore', 'pipe', 'pipe'], + ...(options.env ? { env: { ...process.env, ...options.env } } : {}), ...(isWindows ? { windowsHide: true } : { detached: true }), ...(isWindows && normalizedToolPath.toLowerCase().endsWith('.cmd') ? { shell: true } : {}) }; diff --git a/aiduino/extension/out/shared.js b/aiduino/extension/out/shared.js index 3a18f5e..c42a7aa 100644 --- a/aiduino/extension/out/shared.js +++ b/aiduino/extension/out/shared.js @@ -135,7 +135,8 @@ class ArduinoBoardContext { * @returns {Object|null} {fqbn, time} with the log timestamp of the line */ extractBoardFromLog(content) { - const patterns = [ + // RUNTIME_CONFIG.boardLogPatterns replaces these when an IDE update changes its log lines + const patterns = require('./utils/runtimeConfig').patterns('boardLogPatterns') || [ /Starting language server:\s*([^\s\n]+)/i, /Failed to get debug config:\s*([^,\s\n]+)/i ]; @@ -210,6 +211,10 @@ class ArduinoBoardContext { * @returns {string} Path to log directory */ getLogDirectory() { + // Folders from RUNTIME_CONFIG.ideLogDirs first (IDE updates may move them) + const configured = require('./utils/runtimeConfig').platformPaths('ideLogDirs') + .find(dir => fs.existsSync(dir)); + if (configured) return configured; const dirs = { win32: path.join(os.homedir(), 'AppData', 'Roaming', 'Arduino IDE'), darwin: path.join(os.homedir(), 'Library', 'Logs', 'Arduino IDE'), @@ -562,6 +567,12 @@ function findArduinoCli() { const exe = platform === 'win32' ? 'arduino-cli.exe' : 'arduino-cli'; const bundledRel = path.join('lib', 'backend', 'resources', exe); const execDir = path.dirname(process.execPath); + // Paths from RUNTIME_CONFIG.arduinoCliPaths first (IDE updates may move the bundled copy) + possiblePaths.push(...require('./utils/runtimeConfig').platformPaths('arduinoCliPaths', { + appRoot: vscode.env.appRoot || null, + execDir, + exe + })); if (vscode.env.appRoot) possiblePaths.push(path.join(vscode.env.appRoot, bundledRel)); possiblePaths.push( path.join(execDir, 'resources', 'app', bundledRel), @@ -619,6 +630,10 @@ function findArduinoCliConfig() { const fs = require('fs'); const path = require('path'); const os = require('os'); + // Paths from RUNTIME_CONFIG.arduinoCliConfigs first + const configured = require('./utils/runtimeConfig').platformPaths('arduinoCliConfigs') + .find(file => fs.existsSync(file)); + if (configured) return configured; const configFile = path.join(os.homedir(), '.arduinoIDE', 'arduino-cli.yaml'); return fs.existsSync(configFile) ? configFile : null; } diff --git a/aiduino/extension/out/utils/agentLogin.js b/aiduino/extension/out/utils/agentLogin.js index 827bc88..7cb25be 100644 --- a/aiduino/extension/out/utils/agentLogin.js +++ b/aiduino/extension/out/utils/agentLogin.js @@ -15,6 +15,7 @@ const vscode = require('vscode'); const fs = require('fs'); const path = require('path'); const { spawn } = require('child_process'); +const cliSupport = require('../localProviders/processProviders/cliSupport'); const IS_WINDOWS = process.platform === 'win32'; @@ -141,13 +142,122 @@ async function openInTerminal(toolPath, args, cwd) { * Check whether an error message of a failed run means a missing or expired login * @param {string} agentModule - Agent module name from providerConfigs.js * @param {string} message - Error message + * @param {Object} provider - Provider config (optional): cli.authError wins over the built-in pattern * @returns {boolean} */ -function isAuthError(agentModule, message) { +function isAuthError(agentModule, message, provider = null) { + const fromConfig = cliSupport.matches(provider?.cli, 'authError', message); + if (fromConfig !== null) return Boolean(message) && fromConfig; const pattern = AUTH_PATTERNS[agentModule]; return Boolean(pattern && message && pattern.test(message)); } +/** + * Login arguments: cli.loginArgs from the config, else the built-in ones + * @param {Object} provider - Provider config + * @returns {string[]} Arguments + */ +function loginArgs(provider) { + const fromConfig = provider?.cli?.loginArgs; + return cliSupport.isStringList(fromConfig) ? fromConfig : (LOGIN_ARGS[provider?.agentModule] || []); +} + +/** + * API key login of an agent (e.g. Antigravity with a Gemini API key), from cli.apiKeyLogin: + * {keyFrom, env, settingsFile, settings}. The key of the provider keyFrom is passed in the + * environment variable env, but only while the agent's settings file contains the settings. + * @param {Object} provider - Provider config + * @returns {Object|null} Checked block with the resolved settings file, null if none + */ +function apiKeyLogin(provider) { + const block = provider?.cli?.apiKeyLogin; + if (!block || typeof block !== 'object') return null; + const { keyFrom, env, settingsFile, settings } = block; + if (typeof keyFrom !== 'string' || typeof env !== 'string' || !/^[A-Z][A-Z0-9_]*$/.test(env)) return null; + if (typeof settingsFile !== 'string' || !settings || typeof settings !== 'object') return null; + const file = cliSupport.fill(settingsFile, { home: require('os').homedir() }); + return file ? { keyFrom, env, settings, file: path.normalize(file) } : null; +} + +/** + * Read a JSON settings file + * @param {string} file - Path + * @returns {Object|null} Content ({} if the file does not exist), null if unreadable + */ +function readSettings(file) { + if (!fs.existsSync(file)) return {}; + try { + const data = JSON.parse(fs.readFileSync(file, 'utf8')); + return data && typeof data === 'object' && !Array.isArray(data) ? data : null; + } catch { + return null; + } +} + +/** + * Stored API key of a provider (keyfile format: key|model) + * @param {Object} apiKeys - All stored keys + * @param {string} providerId - Provider ID + * @returns {string|null} Key + */ +function storedKey(apiKeys, providerId) { + const value = apiKeys?.[providerId]; + return typeof value === 'string' && value.trim() ? value.split('|')[0].trim() : null; +} + +/** + * Environment for a run: the API key, if the agent is switched to API key login + * @param {Object} provider - Provider config + * @param {Object} apiKeys - All stored keys + * @returns {Object|null} Environment additions, null for none + */ +function apiKeyEnv(provider, apiKeys) { + const login = apiKeyLogin(provider); + if (!login) return null; + const settings = readSettings(login.file); + const active = settings && Object.entries(login.settings).every(([key, value]) => settings[key] === value); + const key = storedKey(apiKeys, login.keyFrom); + return active && key ? { [login.env]: key } : null; +} + +/** + * Switch the agent to API key login after asking: writes the settings into its settings file + * @param {Object} context - Extension context (t, apiKeys, minimalModelManager) + * @param {Object} provider - Provider config + * @returns {Promise} Switched + */ +async function enableApiKeyLogin(context, provider) { + const { t } = context; + const login = apiKeyLogin(provider); + if (!login) return false; + const keyProvider = context.minimalModelManager?.providers?.[login.keyFrom]; + const keyName = keyProvider?.name || login.keyFrom; + if (!storedKey(context.apiKeys, login.keyFrom)) { + vscode.window.showErrorMessage(t('errors.apiKeyLoginNoKey', provider.name, keyName)); + return false; + } + const confirm = t('buttons.continue'); + const choice = await vscode.window.showWarningMessage( + t('messages.apiKeyLoginConfirm', provider.name, keyName, login.file), { modal: true }, confirm + ); + if (choice !== confirm) return false; + + const settings = readSettings(login.file); + if (!settings) { + vscode.window.showErrorMessage(t('errors.apiKeyLoginFailed', login.file)); + return false; + } + try { + fs.mkdirSync(path.dirname(login.file), { recursive: true }); + fs.writeFileSync(login.file, JSON.stringify({ ...settings, ...login.settings }, null, 2) + '\n'); + } catch { + vscode.window.showErrorMessage(t('errors.apiKeyLoginFailed', login.file)); + return false; + } + vscode.window.showInformationMessage(t('messages.apiKeyLoginEnabled', provider.name, keyName)); + return true; +} + /** * Tell the user the agent needs a login and offer to open it in a terminal. * Does not wait for the user. @@ -158,11 +268,19 @@ function isAuthError(agentModule, message) { */ function offerLogin(context, provider, toolPath, cwd) { const { t } = context; - const args = LOGIN_ARGS[provider.agentModule] || []; + const args = loginArgs(provider); const command = [toolPath, ...args].join(' '); const button = t('buttons.loginTerminal'); + const login = apiKeyLogin(provider); + const keyName = login && (context.minimalModelManager?.providers?.[login.keyFrom]?.name || login.keyFrom); + const keyButton = login ? t('buttons.useApiKey', keyName) : null; + const buttons = keyButton ? [button, keyButton] : [button]; - vscode.window.showErrorMessage(t('errors.agentLogin', provider.name), button).then(async choice => { + vscode.window.showErrorMessage(t('errors.agentLogin', provider.name), ...buttons).then(async choice => { + if (keyButton && choice === keyButton) { + await enableApiKeyLogin(context, provider); + return; + } if (choice !== button) return; const folder = cwd && fs.existsSync(cwd) ? cwd : require('os').homedir(); const opened = await openInTerminal(toolPath, args, folder); @@ -177,5 +295,6 @@ function offerLogin(context, provider, toolPath, cwd) { module.exports = { isAuthError, offerLogin, - openInTerminal + openInTerminal, + apiKeyEnv }; diff --git a/aiduino/extension/out/utils/apiManager.js b/aiduino/extension/out/utils/apiManager.js index 21db147..fd48e2f 100644 --- a/aiduino/extension/out/utils/apiManager.js +++ b/aiduino/extension/out/utils/apiManager.js @@ -67,6 +67,10 @@ async function switchModel(context) { description: modelId === currentModel ? '✔ ' + t('labels.active') : currentModelInfo.name, value: modelId }; + // Retired providers (config field 'retired') stay selectable but are marked + if (provider.retired) { + item.description = `${t('labels.retired')} · ${item.description}`; + } if (provider.type === 'local') { // Separate agentic local providers (processConfig) from HTTP providers (httpConfig) @@ -117,6 +121,7 @@ async function switchModel(context) { fileManager.saveSelectedModel(selected.value); const provider = minimalModelManager.providers[selected.value]; + showRetiredNotice(provider, minimalModelManager.providers, t); // Check if model selection is enabled // Only for: API providers with modelDiscovery OR marketplace providers with requiresModelSelection @@ -320,6 +325,21 @@ async function autoDetectLocalProvider(modelId, providers, manualUrl = null) { return null; } +/** + * Tell the user that a provider was retired (config field 'retired': {replacement}) + * @param {Object} provider - Provider config + * @param {Object} providers - All provider configs + * @param {Function} t - Translation function + */ +function showRetiredNotice(provider, providers, t) { + if (!provider?.retired) return; + const replacement = providers[provider.retired.replacement]; + const message = replacement + ? t('messages.providerRetiredUse', provider.name, replacement.name) + : t('messages.providerRetired', provider.name); + vscode.window.showWarningMessage(message); +} + /** * Test HTTP provider connection * @param {string} url - URL to test @@ -344,6 +364,9 @@ async function showModelSelectionPicker(provider, t, apiKey = null, modelId = nu // For local providers with staticModels, use them directly (no API discovery possible) if (provider.type === 'local' && provider.modelDiscovery?.staticModels && !provider.httpConfig) { models = provider.modelDiscovery.staticModels; + // CLIs with cli.modelsCommand report their models themselves + const cliModels = require('../localProviders/processProviders/cliModels'); + models = cliModels.merge(models, await cliModels.listModels(provider, apiKey)); } // For API providers, try dynamic model discovery else if (apiKey && provider.modelDiscovery?.enabled) { diff --git a/aiduino/extension/out/utils/configUpdater.js b/aiduino/extension/out/utils/configUpdater.js index df7489c..e50d421 100644 --- a/aiduino/extension/out/utils/configUpdater.js +++ b/aiduino/extension/out/utils/configUpdater.js @@ -10,6 +10,7 @@ const https = require('https'); const fs = require('fs'); const path = require('path'); const os = require('os'); +const runtimeConfig = require('./runtimeConfig'); // Configuration const AIDUINO_DIR = path.join(os.homedir(), '.aiduino'); @@ -21,6 +22,16 @@ const BACKUP_SUFFIX = '.backup'; * @returns {Object} Provider configurations with version info */ function loadProviderConfigs() { + const result = loadProviderConfigFiles(); + runtimeConfig.setRuntimeConfig(result.runtime); + return result; +} + +/** + * Load the newer of user and plugin config + * @returns {Object} {providers, runtime, version, source, path} + */ +function loadProviderConfigFiles() { const userConfigPath = USER_CONFIG_FILE; const pluginConfigPath = path.join(__dirname, '..', 'config', 'providerConfigs.js'); @@ -46,6 +57,7 @@ function loadProviderConfigs() { console.log(`✓ Using plugin config (${pluginVersion}) - newer than user config (${userVersion})`); return { providers: pluginConfig.PROVIDER_CONFIGS || {}, + runtime: pluginConfig.RUNTIME_CONFIG || {}, version: pluginVersion, source: 'plugin', path: pluginConfigPath @@ -54,6 +66,7 @@ function loadProviderConfigs() { console.log(`✓ Using user config (${userVersion})`); return { providers: userConfig.PROVIDER_CONFIGS || {}, + runtime: userConfig.RUNTIME_CONFIG || {}, version: userVersion, source: 'user', path: userConfigPath @@ -62,6 +75,7 @@ function loadProviderConfigs() { console.log(`✓ Using plugin config (${pluginVersion}) - no user config found`); return { providers: pluginConfig.PROVIDER_CONFIGS || {}, + runtime: pluginConfig.RUNTIME_CONFIG || {}, version: pluginVersion, source: 'plugin', path: pluginConfigPath @@ -71,6 +85,7 @@ function loadProviderConfigs() { // Fallback if no config found return { providers: {}, + runtime: {}, version: '000000', source: 'none', path: null @@ -315,7 +330,9 @@ const DEPRECATION_KEYWORDS = [ */ function isDeprecationError(message) { const text = String(message || '').toLowerCase(); - return DEPRECATION_KEYWORDS.some(keyword => text.includes(keyword)); + // RUNTIME_CONFIG.deprecationKeywords extends the built-in list without a release + const extra = runtimeConfig.stringList('deprecationKeywords') || []; + return [...DEPRECATION_KEYWORDS, ...extra].some(keyword => keyword && text.includes(keyword.toLowerCase())); } /** diff --git a/aiduino/extension/out/utils/errorHandling.js b/aiduino/extension/out/utils/errorHandling.js index b7e0631..94d439d 100644 --- a/aiduino/extension/out/utils/errorHandling.js +++ b/aiduino/extension/out/utils/errorHandling.js @@ -83,7 +83,7 @@ function handleApiError(error, context) { if (selection === t('buttons.enterApiKey')) { vscode.commands.executeCommand('aiduino.setApiKey'); } else if (selection === t('buttons.getApiKey')) { - networkUtils.openApiKeyUrl(currentModel); + networkUtils.openApiKeyUrl(currentModel, context); } else if (selection === t('buttons.switchModel')) { vscode.commands.executeCommand('aiduino.switchModel'); } @@ -152,7 +152,7 @@ function handleApiError(error, context) { if (selection === t('buttons.enterApiKey')) { vscode.commands.executeCommand('aiduino.setApiKey'); } else if (selection === t('buttons.getApiKey')) { - networkUtils.openApiKeyUrl(currentModel); + networkUtils.openApiKeyUrl(currentModel, context); } else if (selection === t('buttons.switchModel')) { vscode.commands.executeCommand('aiduino.switchModel'); } diff --git a/aiduino/extension/out/utils/network.js b/aiduino/extension/out/utils/network.js index 24d3f8e..58f34b7 100644 --- a/aiduino/extension/out/utils/network.js +++ b/aiduino/extension/out/utils/network.js @@ -96,23 +96,26 @@ async function testNetworkConnectivity(context) { /** * Open API key URL for the specified model * @param {string} modelId - Model identifier + * @param {Object} context - Extension context (t, minimalModelManager); the URL comes from + * apiKeyUrl in providerConfigs.js, so it stays current with config updates */ -function openApiKeyUrl(modelId) { +function openApiKeyUrl(modelId, context = {}) { const urls = { claude: 'https://console.anthropic.com/api-keys', chatgpt: 'https://platform.openai.com/api-keys', - gemini: 'https://makersuite.google.com/app/apikey', + gemini: 'https://aistudio.google.com/apikey', mistral: 'https://console.mistral.ai/', groq: 'https://console.groq.com/keys', perplexity: 'https://www.perplexity.ai/settings/api', cohere: 'https://dashboard.cohere.ai/api-keys' }; - const url = urls[modelId]; + const fromConfig = context.minimalModelManager?.providers?.[modelId]?.apiKeyUrl; + const url = typeof fromConfig === 'string' && fromConfig.startsWith('https://') ? fromConfig : urls[modelId]; if (url) { vscode.env.openExternal(vscode.Uri.parse(url)); - } else { - vscode.window.showWarningMessage(t('errors.noApiKeyUrl', modelId)); + } else if (context.t) { + vscode.window.showWarningMessage(context.t('errors.noApiKeyUrl', modelId)); } } diff --git a/aiduino/extension/out/utils/providerDiscovery.js b/aiduino/extension/out/utils/providerDiscovery.js index df5cf40..b8cd096 100644 --- a/aiduino/extension/out/utils/providerDiscovery.js +++ b/aiduino/extension/out/utils/providerDiscovery.js @@ -13,13 +13,14 @@ const { execSync } = require('child_process'); const path = require('path'); const fs = require('fs'); const os = require('os'); +const cliSupport = require('../localProviders/processProviders/cliSupport'); /** * Find an executable in system PATH or common locations * @param {string} name - Executable name (e.g., 'claude', 'vibe', 'gemini') * @returns {string|null} Path to executable or null if not found */ -function findExecutable(name) { +function findExecutable(name, extraPaths = []) { const isWindows = process.platform === 'win32'; // 1. Try system PATH first @@ -33,8 +34,8 @@ function findExecutable(name) { // Not in PATH, continue searching } - // 2. Check common installation locations - const commonPaths = getCommonInstallPaths(name); + // 2. Check install locations from the config first, then the common ones + const commonPaths = [...extraPaths, ...getCommonInstallPaths(name)]; for (const testPath of commonPaths) { if (fs.existsSync(testPath)) { return testPath; @@ -222,13 +223,16 @@ function discoverProvider(providerId, providerConfig) { 'groqcode': 'groq' }; - const execName = executableNames[providerId]; + // New CLI providers only need processConfig.command in the config + const command = providerConfig?.processConfig?.command; + const execName = executableNames[providerId] + || (typeof command === 'string' && /^[\w.-]+$/.test(command) ? command : null); if (!execName) { return null; } // Find the executable - const execPath = findExecutable(execName); + const execPath = findExecutable(execName, cliSupport.candidatePaths(providerConfig?.cli, execName)); if (!execPath) { return null; } diff --git a/aiduino/extension/out/utils/runtimeConfig.js b/aiduino/extension/out/utils/runtimeConfig.js new file mode 100644 index 0000000..52edb09 --- /dev/null +++ b/aiduino/extension/out/utils/runtimeConfig.js @@ -0,0 +1,115 @@ +/* + * AI.duino - Runtime Config + * Copyright 2026 Monster Maker + * + * Licensed under the Apache License, Version 2.0 + * + * RUNTIME_CONFIG in providerConfigs.js holds data that is not about a single + * provider but may change without an AI.duino release: phrases of retired + * models, Arduino IDE log lines and install paths. Older AI.duino versions do + * not read this export. Everything is optional; missing or broken values fall + * back to the built-in defaults of the caller. + */ + +"use strict"; + +const os = require('os'); +const path = require('path'); + +let cached = null; + +/** + * Remember RUNTIME_CONFIG of the config file in use + * @param {*} runtime - Export of providerConfigs.js + */ +function setRuntimeConfig(runtime) { + cached = runtime && typeof runtime === 'object' && !Array.isArray(runtime) ? runtime : {}; +} + +/** + * RUNTIME_CONFIG of the config file in use + * @returns {Object} Runtime config ({} if none) + */ +function getRuntimeConfig() { + if (!cached) { + try { + // Loading the provider configs also sets the runtime config + require('./configUpdater').loadProviderConfigs(); + } catch { + cached = {}; + } + } + return cached || {}; +} + +/** + * List of strings from the runtime config + * @param {string} key - Key + * @returns {string[]|null} List, null if missing or not a list of strings + */ +function stringList(key) { + const value = getRuntimeConfig()[key]; + return Array.isArray(value) && value.length > 0 && value.every(item => typeof item === 'string') ? value : null; +} + +/** + * Regular expressions from the runtime config (strings, case-insensitive) + * @param {string} key - Key + * @returns {RegExp[]|null} Expressions, null if none is usable + */ +function patterns(key) { + const list = stringList(key) || []; + const result = []; + for (const source of list) { + try { + result.push(new RegExp(source, 'i')); + } catch { + // A broken pattern is skipped, the others still count + } + } + return result.length > 0 ? result : null; +} + +/** + * Paths for this platform from the runtime config, placeholders resolved. + * Format: {linux: [...], darwin: [...], win32: [...]} + * Placeholders: {home}, {appData}, {localAppData}, {programFiles}, {appRoot}, {exe} + * @param {string} key - Key + * @param {Object} values - Extra placeholder values (e.g. {appRoot, exe}) + * @returns {string[]} Paths (may be empty) + */ +function platformPaths(key, values = {}) { + const entry = getRuntimeConfig()[key]; + const list = entry && typeof entry === 'object' ? entry[process.platform] : null; + if (!Array.isArray(list)) return []; + const home = os.homedir(); + const all = { + home, + appData: process.env.APPDATA || path.join(home, 'AppData', 'Roaming'), + localAppData: process.env.LOCALAPPDATA || path.join(home, 'AppData', 'Local'), + programFiles: process.env.ProgramFiles || 'C:\\Program Files', + ...values + }; + const result = []; + for (const item of list) { + if (typeof item !== 'string') continue; + let missing = false; + const filled = item.replace(/\{(\w+)\}/g, (match, name) => { + if (all[name] === undefined || all[name] === null) { + missing = true; + return match; + } + return String(all[name]); + }); + if (!missing) result.push(path.normalize(filled)); + } + return result; +} + +module.exports = { + setRuntimeConfig, + getRuntimeConfig, + stringList, + patterns, + platformPaths +}; diff --git a/aiduino/extension/out/utils/test-anchor.js b/aiduino/extension/out/utils/test-anchor.js deleted file mode 100644 index e9c2637..0000000 --- a/aiduino/extension/out/utils/test-anchor.js +++ /dev/null @@ -1,12 +0,0 @@ -const { PromptManager } = require('./promptManager'); -const pm = new PromptManager(); - -pm.toggleAnchor('non-blocking', true); -const key = pm.addAnchor('My style', 'Use camelCase for all variables.'); -pm.toggleAnchor(key, true); - -console.log('Active text:\n' + pm.getActiveAnchorText()); - -// Reload from disk to verify persistence -const pm2 = new PromptManager(); -console.log('\nPersisted anchors:', pm2.getAnchors().filter(a => a.enabled).map(a => a.key)); diff --git a/aiduino/extension/package.json b/aiduino/extension/package.json index 52b7309..1b1a494 100644 --- a/aiduino/extension/package.json +++ b/aiduino/extension/package.json @@ -2,7 +2,7 @@ "name": "aiduino", "displayName": "AI.duino", "description": "AI-powered assistance for Arduino for API-, local- and process providers.", - "version": "2.8.0", + "version": "2.9.0", "license": "Apache-2.0", "publisher": "NikolaiRadke", "icon": "icons/aiduino.png", diff --git a/installer/aiduino-2.8.0.vsix b/installer/aiduino-2.8.0.vsix deleted file mode 100644 index c1cf2ff..0000000 Binary files a/installer/aiduino-2.8.0.vsix and /dev/null differ diff --git a/installer/aiduino-2.9.0.vsix b/installer/aiduino-2.9.0.vsix new file mode 100644 index 0000000..0bdde40 Binary files /dev/null and b/installer/aiduino-2.9.0.vsix differ