From f813321ac2568c08962b927ee38e13ce962f5f37 Mon Sep 17 00:00:00 2001 From: Ra Date: Tue, 24 Nov 2026 01:37:46 -0500 Subject: [PATCH] Add General Translation i18n for the landing and chat UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wires gt-next into the app and localizes every user-facing string in the landing page and the chat interface. Dev pages (/eval, /ablation, /metrics, /storage) are deliberately left untranslated. Setup: - withGTConfig wraps next.config.ts; existing turbopack/webpack/WASM options are unchanged - gt.config.json: source en, targets es/fr/de/ja/zh, output public/_gt/ (gitignored, generated) - src/loadTranslations.ts returns {} on a miss, so the app runs untranslated when no translation files exist - GTProvider + in the root layout, LocaleSelector in the landing nav, generateMetadata() for the page title/description Strings: - JSX prose uses , plain strings use useGT(), counts use /, interpolation uses ICU {name} placeholders - src/lib/llm.ts error text is declared with msg() and decoded at the render site, so the English-keyword matchers in chatUtils keep working regardless of locale - Technical identifiers (rag/agent, provider names, AST node kinds) and byok-vault's getUserMessage are left as-is 228 strings extracted. Verified end to end: built, served, and requested with Accept-Language: es against sentinel translations — html lang, gt() strings, blocks and all resolved; English requests unaffected. Known trade-off: GTProvider reads request headers/cookies, which turns the five previously static routes into server-rendered-on-demand. A client-side provider restores static output but breaks locale detection, since gt-next exposes no public way to initialize its I18nConfig in the browser. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering> --- .gitignore | 3 + gt.config.json | 9 + next.config.ts | 3 +- package-lock.json | 2460 ++++++++++++++++++++++- package.json | 4 + src/app/[owner]/[repo]/page.tsx | 48 +- src/app/layout.tsx | 24 +- src/app/page.tsx | 72 +- src/components/AstTreeView.tsx | 10 +- src/components/IndexBrowser.tsx | 8 +- src/components/IndexingProgress.tsx | 8 +- src/components/ModelSettings.tsx | 99 +- src/components/ThemeToggle.tsx | 4 +- src/components/chat/AgentTrace.tsx | 37 +- src/components/chat/ChatInput.tsx | 10 +- src/components/chat/ChatMessage.tsx | 40 +- src/components/chat/ChatSidebar.tsx | 38 +- src/components/chat/ContextDrawer.tsx | 18 +- src/components/chat/EmptyChat.tsx | 19 +- src/components/chat/FileBrowser.tsx | 8 +- src/components/chat/IndexingOverlay.tsx | 55 +- src/components/chat/RepoHeader.tsx | 65 +- src/components/chat/TokenInput.tsx | 12 +- src/lib/llm.ts | 21 +- src/loadTranslations.ts | 16 + 25 files changed, 2825 insertions(+), 266 deletions(-) create mode 100644 gt.config.json create mode 100644 src/loadTranslations.ts diff --git a/.gitignore b/.gitignore index eee98f2..5a943ab 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,6 @@ context/ # Python bytecode __pycache__/ *.pyc + +# General Translation generated translation files +public/_gt/ diff --git a/gt.config.json b/gt.config.json new file mode 100644 index 0000000..8e15a83 --- /dev/null +++ b/gt.config.json @@ -0,0 +1,9 @@ +{ + "defaultLocale": "en", + "locales": ["es", "fr", "de", "ja", "zh"], + "files": { + "gt": { + "output": "public/_gt/[locale].json" + } + } +} diff --git a/next.config.ts b/next.config.ts index a619824..98bcbd5 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,4 +1,5 @@ import type { NextConfig } from "next"; +import { withGTConfig } from "gt-next/config"; const nextConfig: NextConfig = { outputFileTracingExcludes: { @@ -54,4 +55,4 @@ const nextConfig: NextConfig = { }, }; -export default nextConfig; +export default withGTConfig(nextConfig); diff --git a/package-lock.json b/package-lock.json index 1864bd2..1432c23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "byok-vault": "^0.2.2", "dotenv": "^17.3.1", "framer-motion": "^12.34.3", + "gt-next": "^11.4.24", "html-to-image": "^1.11.13", "next": "16.1.6", "react": "19.2.3", @@ -30,6 +31,7 @@ "@types/node": "^20", "@types/react": "^19", "@types/react-dom": "^19", + "gt": "^2.28.4", "kill-port": "^2.0.1", "playwright": "^1.58.2", "rimraf": "^6.1.2", @@ -37,6 +39,298 @@ "vitest": "^4.0.18" } }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.13.tgz", + "integrity": "sha512-j1nvOQCZYSgp7HLmisnCXFTpVvFODiijQ9QHkORfGKWH6YDtskTEeCJS7eV545GZ9UBzrq0e2xsOd5QQ5PjIqw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.13", + "@babel/helper-compilation-targets": "^7.29.13", + "@babel/helper-module-transforms": "^7.29.13", + "@babel/helpers": "^7.29.13", + "@babel/parser": "^7.29.13", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.13", + "@babel/types": "^7.29.11", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.2.tgz", + "integrity": "sha512-GYrCADwpu6yV5OAvchkQ27Z5wwMxWAEMg5NNWjyHh/5DboFFqbdbvYNIvZouQpxXyeMPoTOh0vdPYKlf0ZswdQ==", + "dev": true, + "license": "ISC", + "peer": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.15", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.15.tgz", + "integrity": "sha512-gNWJUX0FlevflramOkaInywOMhU1lkln38gAC7TFZv2tsWbLYbN/2WZFGcq8zbX0Z55e4vGa27IB/NaeZoauWQ==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.15", + "@babel/types": "^7.29.15", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.29.7.tgz", + "integrity": "sha512-OoK6239jHPuSQOoS0kfTVKn0b/rVTk0seKq4Gd2UMLtmOVLjDC0ki3e+c90Trqv2gMfvJFqkiljrr568+qddiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.13.tgz", + "integrity": "sha512-8WxJ4/Vmes3ghacj8VOJy3NW8eyHiFY/4thU/LSBuBE470+igjR/j1ZTNn8fV5VdNrLx6iXUwig526UdOvfP0w==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.2.tgz", + "integrity": "sha512-GYrCADwpu6yV5OAvchkQ27Z5wwMxWAEMg5NNWjyHh/5DboFFqbdbvYNIvZouQpxXyeMPoTOh0vdPYKlf0ZswdQ==", + "dev": true, + "license": "ISC", + "peer": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/@babel/helper-globals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.14.tgz", + "integrity": "sha512-2XDvQVd9JESaOgGc4jT2/jquTAO7ppA5noTZQqH+MmZ89yjCzScLwtCPbWtkPZylL+TLWR49IwWmk+QkRR4GsA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.14" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.15", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.15.tgz", + "integrity": "sha512-C2FuapQ2Kh1OnVHAoLi5rD3GBJ8COb9Q609T6HEpLqaBAo560PDP5OxBE5dCI/h951MBO/+bCUYU5SZ+8ZlV+w==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.15", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.15.tgz", + "integrity": "sha512-l+ezV2czw3t2d2ELq+3CwPL4WLKK5O8IywBXb9/gpmbCOVZFmRYJPmHVqSCv2k+8iKbE30Zf54siOoIZ52XOxA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.15", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.15.tgz", + "integrity": "sha512-RpKWyisHoP81twtSCgmE02iU0RnPcq1DN5bBEbpUePrjA9Q3wXhufnCJrrayPpoZieqFh3zyZQqwtSK0gGccRA==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.15" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.29.7.tgz", + "integrity": "sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.29.7.tgz", + "integrity": "sha512-WsZulLVBUHXVj2cUcPVx6UE21TpalB6bHbSFErKT0Ib++ax24jjXe73FqlWvdylFOjiuPHYi6VCcgRad1ItN+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.29.7", + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-plugin-utils": "^7.29.7", + "@babel/plugin-syntax-jsx": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/runtime": { "version": "7.28.6", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz", @@ -45,6 +339,51 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/template": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.15", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.15.tgz", + "integrity": "sha512-ZfawBo2i8vvt+BTt37dWDKBPjUfm/H+bw+ltwsCRhW7gPtyNVwUXuNo54eO2Xo+P4VXpalPFfFISbBTRKC8SOQ==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.15", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.15", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.15", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.15", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.15.tgz", + "integrity": "sha512-/XKpKDakL//LZ66bq1XsZOswuqeI5MZqPLDu18o3XdkU1fNJ7bdPtzgnc4ZNS+bBGHV0FJG8jjb8SwcC3nNVQQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.15", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babycommando/entity-db": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@babycommando/entity-db/-/entity-db-1.0.11.tgz", @@ -54,6 +393,29 @@ "idb": "^8.0.1" } }, + "node_modules/@clack/core": { + "version": "1.0.0-alpha.6", + "resolved": "https://registry.npmjs.org/@clack/core/-/core-1.0.0-alpha.6.tgz", + "integrity": "sha512-eG5P45+oShFG17u9I1DJzLkXYB1hpUgTLi32EfsMjSHLEqJUR8BOBCVFkdbUX2g08eh/HCi6UxNGpPhaac1LAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "sisteransi": "^1.0.5" + } + }, + "node_modules/@clack/prompts": { + "version": "1.0.0-alpha.6", + "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-1.0.0-alpha.6.tgz", + "integrity": "sha512-75NCtYOgDHVBE2nLdKPTDYOaESxO0GLAKC7INREp5VbS988Xua1u+588VaGlcvXiLc/kSwc25Cd+4PeTSpY6QQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@clack/core": "1.0.0-alpha.6", + "picocolors": "^1.0.0", + "sisteransi": "^1.0.5" + } + }, "node_modules/@emnapi/runtime": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.8.1.tgz", @@ -479,6 +841,112 @@ "node": ">=18" } }, + "node_modules/@generaltranslation/api": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@generaltranslation/api/-/api-0.6.0.tgz", + "integrity": "sha512-6wO2caNXTWhf3EJrlQUFIiBMR9usQvP4uiQ/u5XwdeR6kcIcH3H/qrC9JglU0Ha3fkOzFGsCcxKBbKuRHZuLGw==", + "license": "MIT" + }, + "node_modules/@generaltranslation/compiler": { + "version": "1.3.70", + "resolved": "https://registry.npmjs.org/@generaltranslation/compiler/-/compiler-1.3.70.tgz", + "integrity": "sha512-rEtSEiM1o95EwOuxrVzHSQo7xp+LD7wYKLuUf/7zy5PFq+dGHaJPauHy5TDzSXHwQ0n1w2fEpJyaygycXhTBHQ==", + "license": "MIT", + "dependencies": { + "@babel/generator": "^7.23.0", + "@babel/parser": "^7.23.0", + "@babel/traverse": "^7.23.0", + "@babel/types": "^7.23.0", + "@generaltranslation/format": "0.1.11", + "generaltranslation": "9.5.13", + "unplugin": "^2.3.10" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@generaltranslation/format": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/@generaltranslation/format/-/format-0.1.11.tgz", + "integrity": "sha512-SEXwXZUcSyP6w+QbKnIkzECjZBzi3BFgGjEfPQK0NsvMdrFPuqylac2IfrbzZhqDkhcXv2JFG6djF4+Az1fSYw==", + "license": "MIT", + "dependencies": { + "@generaltranslation/icu": "0.1.2" + } + }, + "node_modules/@generaltranslation/icu": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@generaltranslation/icu/-/icu-0.1.2.tgz", + "integrity": "sha512-2A0txUrZdAWAc42N58/PtoWv7vNB0U1Iyl+nDzf7RSswLHPMsonp7OmPnSraQgkoRSVSlueARVQK4T+zanWsyA==", + "license": "MIT" + }, + "node_modules/@generaltranslation/python-extractor": { + "version": "0.2.68", + "resolved": "https://registry.npmjs.org/@generaltranslation/python-extractor/-/python-extractor-0.2.68.tgz", + "integrity": "sha512-ymY/r7IC87GdVkAj0ESesl9IiNgCYGwK8nlsadnWHIJIk/UJ6ub7aQAY923DHo4DLhclEmf7NA7ckaDYiWFsiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "generaltranslation": "9.5.13", + "web-tree-sitter": "^0.26.6" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@generaltranslation/react-core": { + "version": "11.4.24", + "resolved": "https://registry.npmjs.org/@generaltranslation/react-core/-/react-core-11.4.24.tgz", + "integrity": "sha512-q7YSVTxJ/dmH8q2cJjKAAXzCayZbORPNunL/5LsIpyi5ZwD8FWoLKEKAv7vZArm6seegIauQa58Ro+nBzkjrdA==", + "license": "MIT", + "dependencies": { + "@generaltranslation/format": "0.1.11", + "generaltranslation": "9.5.13", + "gt-i18n": "1.0.45" + }, + "peerDependencies": { + "react": ">=18.0.0" + } + }, + "node_modules/@generaltranslation/supported-locales": { + "version": "2.1.49", + "resolved": "https://registry.npmjs.org/@generaltranslation/supported-locales/-/supported-locales-2.1.49.tgz", + "integrity": "sha512-QnPFViR1KA4cCZe7aMH0LnF22vtyiZI9iQcUemaodMm4VXl8tuX8zrHqBY8cUbq7Hz2ANhp7zIThj+ONKlhaCg==", + "dev": true, + "license": "MIT", + "dependencies": { + "generaltranslation": "9.5.13" + } + }, + "node_modules/@generaltranslation/vue-extractor": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/@generaltranslation/vue-extractor/-/vue-extractor-0.1.27.tgz", + "integrity": "sha512-XasqoFc9ulfZcgP7hJxDphPB/KXCjbKspRYnH+hHX9Ghip5ETLh/K6XSlwu148ajWg1hc6NpLCHShShaZsTIEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.25.7", + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7", + "@generaltranslation/format": "0.1.11", + "@vue/shared": "^3.5.0", + "enhanced-resolve": "^5.18.3", + "entities": "^7.0.1", + "es-module-lexer": "^2.3.1", + "fast-glob": "^3.3.3", + "generaltranslation": "9.5.13", + "semver": "^7.8.5", + "tsconfig-paths": "^4.2.0", + "yaml": "^2.8.0" + } + }, + "node_modules/@generaltranslation/vue-extractor/node_modules/es-module-lexer": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", + "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", + "dev": true, + "license": "MIT" + }, "node_modules/@google/generative-ai": { "version": "0.24.1", "resolved": "https://registry.npmjs.org/@google/generative-ai/-/generative-ai-0.24.1.tgz", @@ -978,11 +1446,75 @@ "node": ">=18.0.0" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.3.tgz", + "integrity": "sha512-lhTtjtoEArWBjismtfS761S9Hlyn+nIZqOZVYoZ1Xn82PMNMVnk+jj/NhC4fAXGTs7ydONcJiR5vyQBTMDu27g==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", - "dev": true + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@jsep-plugin/assignment": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@jsep-plugin/assignment/-/assignment-1.4.0.tgz", + "integrity": "sha512-nw2Px23Eirx0PFTVoPrb3FEq9Wkmg6vxcDtt38MtBCf1G0tjLCB9cK+3seOXyiw+6+aalgYhvJabQbWwMVKlEQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.16.0" + }, + "peerDependencies": { + "jsep": "^0.4.0||^1.0.0" + } + }, + "node_modules/@jsep-plugin/regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.1.0.tgz", + "integrity": "sha512-2Vkbda+XRjK6VTI6Lrh0sNBuMT8mZ51EhqMvO+V2rSdmqjs7NAGssxPZfkL23EFzYfSrvxyd1ZjOdqPQMM50og==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.16.0" + }, + "peerDependencies": { + "jsep": "^0.4.0||^1.0.0" + } }, "node_modules/@mlc-ai/web-llm": { "version": "0.2.80", @@ -1117,6 +1649,63 @@ "node": ">= 10" } }, + "node_modules/@noble/hashes": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.4.0.tgz", + "integrity": "sha512-X5XaVWZIBCT7HHZGm5I7ZQXDwLG+bGXuSrMQAW+7Zvl87h1kmc1ZB1VSRJcpUfoUrGQp4Fkoxm5kZ+Ms+aW+eA==", + "license": "MIT", + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pinojs/redact": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@pinojs/redact/-/redact-0.4.0.tgz", + "integrity": "sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg==", + "dev": true, + "license": "MIT" + }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -1806,6 +2395,13 @@ "url": "https://opencollective.com/vitest" } }, + "node_modules/@vue/shared": { + "version": "3.5.46", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.46.tgz", + "integrity": "sha512-P1WePbdzHrcIciWtmY2Im9EFhdakd3rZxYqvalOa3SfoxtF35Q8Uhmj1tKn6bWP4utcOpN8ao6BoJUItq0Uf+g==", + "dev": true, + "license": "MIT" + }, "node_modules/@xenova/transformers": { "version": "2.17.2", "resolved": "https://registry.npmjs.org/@xenova/transformers/-/transformers-2.17.2.tgz", @@ -1921,6 +2517,28 @@ "d3-zoom": "^3.0.0" } }, + "node_modules/acorn": { + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.19.0.tgz", + "integrity": "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/assertion-error": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", @@ -1930,6 +2548,16 @@ "node": ">=12" } }, + "node_modules/atomic-sleep": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", + "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/b4a": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.7.3.tgz", @@ -2057,11 +2685,15 @@ ] }, "node_modules/baseline-browser-mapping": { - "version": "2.9.19", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.19.tgz", - "integrity": "sha512-ipDqC8FrAl/76p2SSWKSI+H9tFwm7vYqXQrItCuiVPt26Km0jS+NzSsBWAaBusvSbQcfJG+JitdMm+wZAgTYqg==", + "version": "2.11.39", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.39.tgz", + "integrity": "sha512-Q9buOYhr2ggrEZpImICecZTJHCCd8yXkRUokFlUEQ8uiD6oP82F4W4jWnhOHZYV+wlvrC51V7Wy0ULyWjil5Wg==", + "license": "Apache-2.0", "bin": { - "baseline-browser-mapping": "dist/cli.js" + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" } }, "node_modules/bl": { @@ -2080,6 +2712,54 @@ "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==", "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info." }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.29.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.6.tgz", + "integrity": "sha512-CmVVIQ3RVc5HxYEc9X84GvxK/C8C1wH8TlKAiO7uTxF8PDwt7r8t9Qk3J9NkMOVzX5O/HbLv3yzxZg9HPrnI9w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "baseline-browser-mapping": "^2.11.37", + "caniuse-lite": "^1.0.30001826", + "electron-to-chromium": "^1.5.486", + "node-releases": "^2.0.64", + "update-browserslist-db": "^1.4.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -2103,15 +2783,31 @@ "ieee754": "^1.1.13" } }, + "node_modules/bundle-name": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.1.tgz", + "integrity": "sha512-DdH81/zPLVS11EUgWq3tEu/xn+EzljlMYooDNdzWEnFha3R3NBMpMV1UqYIpjYHV/SgpFKMIX1Oh7o06SjM/oA==", + "dev": true, + "license": "MIT", + "dependencies": { + "run-applescript": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/byok-vault": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/byok-vault/-/byok-vault-0.2.2.tgz", "integrity": "sha512-WoRHQJLkwiE+uOLfSW/o4D9vCG0MWWrzV+wX7e8AoTMZdveBgvCJI8MBv80rSoaFNsUyGmC+aEIJLR0l9tG/xA==" }, "node_modules/caniuse-lite": { - "version": "1.0.30001769", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001769.tgz", - "integrity": "sha512-BCfFL1sHijQlBGWBMuJyhZUhzo7wer5sVj9hqekB/7xn0Ypy+pER/edCYQm4exbXj4WiySGp40P8UuTh6w1srg==", + "version": "1.0.30001827", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001827.tgz", + "integrity": "sha512-YWEDr46gSO81M8w6uPbaIy4++IXsirx2asUqvllNiD4BPf75ibxclUjWEqp8ObCenRv+UM2n5Y8xuRPT8V8FrQ==", "funding": [ { "type": "opencollective", @@ -2125,7 +2821,8 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/ccount": { "version": "2.0.1", @@ -2145,6 +2842,19 @@ "node": ">=18" } }, + "node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/character-entities": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", @@ -2236,6 +2946,13 @@ "simple-swizzle": "^0.2.2" } }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" + }, "node_modules/comma-separated-tokens": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", @@ -2245,6 +2962,24 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT", + "peer": true + }, "node_modules/csstype": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", @@ -2346,6 +3081,16 @@ "node": ">=12" } }, + "node_modules/dateformat": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", + "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -2396,6 +3141,36 @@ "node": ">=4.0.0" } }, + "node_modules/default-browser": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.1.tgz", + "integrity": "sha512-m1pAzaJgZ/gssEqlOhJkPJp8Xly7QyW6xcrkUa2KKcDeDSEMP7X8xipU3snUcfisTQx0w1AGae+9UtJSfVnXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-name": "^4.1.0", + "default-browser-id": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz", + "integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -2412,6 +3187,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/define-properties": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", @@ -2472,6 +3260,14 @@ "url": "https://dotenvx.com" } }, + "node_modules/electron-to-chromium": { + "version": "1.5.493", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.493.tgz", + "integrity": "sha512-/Wto2sKd0EpepzMqwSP2il2TNc+rnBDF6k1poCvhRKpaSSD4sLGRBE+FydqHs2QwcW9cXKLVDqnauzJy1oByYw==", + "dev": true, + "license": "ISC", + "peer": true + }, "node_modules/end-of-stream": { "version": "1.4.5", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", @@ -2480,6 +3276,33 @@ "once": "^1.4.0" } }, + "node_modules/enhanced-resolve": { + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.27.0.tgz", + "integrity": "sha512-Do6BB2xzlcc/odFg+XEYyneAx4T/WfywO71yw9ePS2tVfRsf7JVR4mUeELadIeHzixkzbG5DpluiEFPi2WGfYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/es-define-property": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", @@ -2548,6 +3371,30 @@ "@esbuild/win32-x64": "0.27.3" } }, + "node_modules/esbuild-wasm": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.27.7.tgz", + "integrity": "sha512-1k03e2/tGz+sLz3/xzoZmUsIqtaGIvJa8k4UqUeqCUry83nHmlxQYZUUES0WBFUYilSQUf7nDUGAciIIklljSg==", + "dev": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -2568,6 +3415,21 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/estree-util-visit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/estree-util-visit/-/estree-util-visit-2.0.0.tgz", + "integrity": "sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/estree-walker": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", @@ -2607,11 +3469,59 @@ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, + "node_modules/fast-copy": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/fast-copy/-/fast-copy-4.3.3.tgz", + "integrity": "sha512-U3A5d4cBrc7fpZ2Sbz46FbFl+VdnCBAwRQaIR7IFWsyvndISF5CGjTbhiawGoMv7Ob8slBY1nT8XT3bWRFErzA==", + "dev": true, + "license": "MIT" + }, "node_modules/fast-fifo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.3.tgz", + "integrity": "sha512-XKv5nnLs6nLF71NgiKJLIZFLkPyIEuOselLG7ujZnGrRfQK8HpvY+WqKhAJUAdLomwVHErVS4LfxFlPq0/FTAw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/fault": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", @@ -2641,11 +3551,38 @@ } } }, + "node_modules/fflate": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.3.tgz", + "integrity": "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==", + "dev": true, + "license": "MIT" + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/flatbuffers": { "version": "25.9.23", "resolved": "https://registry.npmjs.org/flatbuffers/-/flatbuffers-25.9.23.tgz", "integrity": "sha512-MI1qs7Lo4Syw0EOzUl0xjs2lsoeqFku44KpngfIduHBYvzm8h2+7K8YMQh1JtVVVrUvhLpNwqVi4DERegUJhPQ==" }, + "node_modules/foreach": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.6.tgz", + "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==", + "dev": true, + "license": "MIT" + }, "node_modules/format": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", @@ -2699,6 +3636,39 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/generaltranslation": { + "version": "9.5.13", + "resolved": "https://registry.npmjs.org/generaltranslation/-/generaltranslation-9.5.13.tgz", + "integrity": "sha512-0iGuBePx+aXcIESp5ipBhOvWZL//LHzYYY9R+PNYsJig9yqsX60cDopVAbPahNIORcVsPthqwnFiqf9pcy62QQ==", + "license": "MIT", + "dependencies": { + "@generaltranslation/api": "0.6.0", + "@generaltranslation/format": "0.1.11", + "@generaltranslation/icu": "0.1.2", + "@noble/hashes": "^2.2.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/get-them-args": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/get-them-args/-/get-them-args-1.3.2.tgz", @@ -2727,6 +3697,19 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/global-agent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz", @@ -2769,6 +3752,143 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/graceful-fs": { + "version": "4.2.12", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.12.tgz", + "integrity": "sha512-iuyGF2E4oafQfPsRrG2wtY2ILupMhvtdrhzrxB+0VcjsPpSPttpfYdjnGFGsTi5MaJFjI1jOKHPQ6UTbTj9TAw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/gt": { + "version": "2.28.4", + "resolved": "https://registry.npmjs.org/gt/-/gt-2.28.4.tgz", + "integrity": "sha512-Iq3xRReJUj69x5PILdj6b/W/eEeWCSOjeS/+WOnCmR4d8BmXMeEaPhzUz2JCrdkHcvtLgAnXn2jdin6jtV6fXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/generator": "^7.25.7", + "@babel/parser": "^7.25.7", + "@babel/plugin-transform-react-jsx": "^7.25.9", + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7", + "@clack/prompts": "1.0.0-alpha.6", + "@generaltranslation/format": "0.1.11", + "@generaltranslation/icu": "0.1.2", + "@generaltranslation/python-extractor": "0.2.68", + "@generaltranslation/supported-locales": "2.1.49", + "@generaltranslation/vue-extractor": "0.1.27", + "chalk": "^5.4.1", + "commander": "^12.1.0", + "dotenv": "^16.4.5", + "enhanced-resolve": "^5.18.3", + "esbuild-wasm": "^0.27.7", + "fast-glob": "^3.3.3", + "fast-json-stable-stringify": "^2.1.0", + "fflate": "^0.8.2", + "generaltranslation": "9.5.13", + "gt-remark": "1.0.12", + "html-entities": "^2.6.0", + "json-pointer": "^0.6.2", + "jsonpath-plus": "^10.3.0", + "jsonpointer": "^5.0.1", + "mdast-util-find-and-replace": "^3.0.2", + "micromatch": "^4.0.8", + "open": "^10.1.1", + "openid-client": "6.8.8", + "package-manager-detector": "^1.8.0", + "pino": "^10.1.0", + "pino-pretty": "^13.2.0", + "remark-frontmatter": "^5.0.0", + "remark-mdx": "^3.1.0", + "remark-parse": "^11.0.0", + "remark-stringify": "^11.0.0", + "resolve": "^1.22.10", + "semver": "^7.8.5", + "smol-toml": "^1.3.1", + "tsconfig-paths": "^4.2.0", + "unified": "^11.0.5", + "unist-util-visit": "^5.0.0", + "yaml": "^2.8.0" + }, + "bin": { + "gt": "bin/main.js" + } + }, + "node_modules/gt-i18n": { + "version": "1.0.45", + "resolved": "https://registry.npmjs.org/gt-i18n/-/gt-i18n-1.0.45.tgz", + "integrity": "sha512-H2qjvpG5ayVNqfh35aEDuXN8mTHzxlh/lTwCf3X28UtoNmP77LWjcISTgKjn23zVXBzZHEUmYQ98hbgC4LyISg==", + "license": "MIT", + "dependencies": { + "@generaltranslation/format": "0.1.11", + "generaltranslation": "9.5.13" + } + }, + "node_modules/gt-next": { + "version": "11.4.24", + "resolved": "https://registry.npmjs.org/gt-next/-/gt-next-11.4.24.tgz", + "integrity": "sha512-h07MCPUNcdvsAOjbj8d4sYukkcCfk0sR1U5Gjb6rKYdpfCQmZjVGwSJTgUer8UTbvMpgtVG73cui8Ilr+9wxoQ==", + "license": "MIT", + "dependencies": { + "@generaltranslation/compiler": "1.3.70", + "@generaltranslation/format": "0.1.11", + "@generaltranslation/react-core": "11.4.24", + "generaltranslation": "9.5.13", + "gt-i18n": "1.0.45", + "gt-react": "11.4.24" + }, + "peerDependencies": { + "next": ">=13.0.0 <15.2.1 || >15.2.2", + "react": ">=16.8.0 <20.0.0", + "react-dom": ">=16.8.0 <20.0.0" + } + }, + "node_modules/gt-react": { + "version": "11.4.24", + "resolved": "https://registry.npmjs.org/gt-react/-/gt-react-11.4.24.tgz", + "integrity": "sha512-NSn1e5y0hjn/Fkmo54KOiHXE1/0ZPOZNEXwIITbgPBU4XsMS4BK5kHoPTWLAtDHjV+yrpFurKqXs+fEnSRHgig==", + "license": "MIT", + "dependencies": { + "@generaltranslation/react-core": "11.4.24", + "generaltranslation": "9.5.13", + "gt-i18n": "1.0.45" + }, + "peerDependencies": { + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, + "node_modules/gt-remark": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/gt-remark/-/gt-remark-1.0.12.tgz", + "integrity": "sha512-mqW6BkvfLGHwtIIdsy3C0QW26HbZDJ7EdQz7c7pL8KZrLIBzbcu2rHVqWEoleeB5+TsqMQIFWRhsUt5UpbrDWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdast-util-find-and-replace": "^3.0.1", + "mdast-util-gfm-footnote": "^2.1.0", + "mdast-util-gfm-strikethrough": "^2.0.0", + "mdast-util-gfm-table": "^2.0.0", + "mdast-util-gfm-task-list-item": "^2.0.0", + "micromark-extension-gfm-footnote": "^2.1.0", + "micromark-extension-gfm-strikethrough": "^2.1.0", + "micromark-extension-gfm-table": "^2.1.1", + "micromark-extension-gfm-task-list-item": "^2.1.0" + } + }, + "node_modules/gt/node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/guid-typescript": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/guid-typescript/-/guid-typescript-1.0.9.tgz", @@ -2785,6 +3905,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/hast-util-parse-selector": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-4.0.0.tgz", @@ -2851,6 +3984,13 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/help-me": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/help-me/-/help-me-5.0.0.tgz", + "integrity": "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==", + "dev": true, + "license": "MIT" + }, "node_modules/highlight.js": { "version": "10.7.3", "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", @@ -2864,6 +4004,23 @@ "resolved": "https://registry.npmjs.org/highlightjs-vue/-/highlightjs-vue-1.0.0.tgz", "integrity": "sha512-PDEfEF102G23vHmPhLyPboFCD+BkMGu+GuJe2d9/eH4FsCwvgBpnc9n0pGE+ffKdph38s6foEZiEjdgHdzp+IA==" }, + "node_modules/html-entities": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.6.0.tgz", + "integrity": "sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/mdevils" + }, + { + "type": "patreon", + "url": "https://patreon.com/mdevils" + } + ], + "license": "MIT" + }, "node_modules/html-to-image": { "version": "1.11.13", "resolved": "https://registry.npmjs.org/html-to-image/-/html-to-image-1.11.13.tgz", @@ -2944,6 +4101,22 @@ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.4.tgz", "integrity": "sha512-m6UrgzFVUYawGBh1dUsWR5M2Clqic9RVXC/9f8ceNlv2IcO9j9J/z8UoCLPqtsPBFNzEpfR3xftohbfqDx8EQA==" }, + "node_modules/is-core-module": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.18.0.tgz", + "integrity": "sha512-qyax9fgaKOEC4qK8WZn7Q4IcoZC9RC1O1fFxRcRTq/oMMkWT/uXpqpXa12kzWR409zAt1drYN9N9BO26UmBCmw==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-decimal": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", @@ -2953,13 +4126,81 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/is-hexadecimal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", - "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==", + "node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-hexadecimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", + "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" } }, "node_modules/is-plain-obj": { @@ -2973,11 +4214,127 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-wsl": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.1.tgz", + "integrity": "sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-inside-container": "^1.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jose": { + "version": "6.2.18", + "resolved": "https://registry.npmjs.org/jose/-/jose-6.2.18.tgz", + "integrity": "sha512-doV4thUwgkrycJH4yLeqwTGIIZphHl+pk7CPReuMIhYhncmgzdko85MaCG4YQFTxqMFr1/oEH32tZuKKovcDEg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/jsep": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.6.0.tgz", + "integrity": "sha512-Y8Tr54CX7B5YGAwo7/n8eumidEX3Opx98RyyQVnlHqUaZcPA8uUzL2v1rshr9ypW9Q6hNjfJtg3sL+8kaNE7TA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20.16.0" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-pointer": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.2.tgz", + "integrity": "sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "foreach": "^2.0.4" + } + }, "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonpath-plus": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.4.0.tgz", + "integrity": "sha512-T92WWatJXmhBbKsgH/0hl+jxjdXrifi5IKeMY02DWggRxX0UElcbVzPlmgLTbvsPeW1PasQ6xE2Q75stkhGbsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" + }, + "bin": { + "jsonpath": "bin/jsonpath-cli.js", + "jsonpath-plus": "bin/jsonpath-cli.js" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/jsonpointer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", + "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/kill-port": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/kill-port/-/kill-port-2.0.1.tgz", @@ -3048,6 +4405,17 @@ "@jridgewell/sourcemap-codec": "^1.5.5" } }, + "node_modules/markdown-table": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.1.0.tgz", + "integrity": "sha512-xpeSCdM+B+6P3ncfgaB7FoDbtJ30xAe6Z18TGT7AgXJsHqCElCICZovQqdRMm7kHgpTyYv36EupqewoFFSB8vw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/matcher": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", @@ -3059,6 +4427,36 @@ "node": ">=10" } }, + "node_modules/mdast-util-find-and-replace": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.5.tgz", + "integrity": "sha512-of3wZLEBWpK8mSYy8wmKnwyxfUKjhCkXxGLz45DVBqfcahTP37LscCK+0oAZh+ReZ5OunPDkB2zdGMIxrojLhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "escape-string-regexp": "^5.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/mdast-util-from-markdown": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.3.tgz", @@ -3082,6 +4480,127 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/mdast-util-frontmatter": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-2.0.1.tgz", + "integrity": "sha512-LRqI9+wdgC25P0URIJY9vwocIzCcksduHQ9OF2joxQoyTNVduwLAFUzjoopuRJbJAReaKrNQKAZKL3uCMugWJA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "escape-string-regexp": "^5.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "micromark-extension-frontmatter": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-frontmatter/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mdast-util-gfm-footnote": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-2.1.0.tgz", + "integrity": "sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.1.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-strikethrough": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-2.0.1.tgz", + "integrity": "sha512-OuJHqvr455pwu2OaOrir7dbzqs4jlWKOtlu9L6GjcIjjQwNyw02VntQsr/Ek6/A13vgnXfUhBekWRUP1OkNivw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-table": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-2.0.1.tgz", + "integrity": "sha512-fiIjPrAy4kz68/eFbPHhsiWDGHhqUSVoU1XsfLM5DsEPXw7MxgiVVyulUggFRckVWeT1KXQXkg5vm3kv4oMSOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "markdown-table": "^3.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "mdast-util-to-string": "^4.0.0", + "unist-util-visit": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-task-list-item": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-2.0.1.tgz", + "integrity": "sha512-jXVO1hvB2hs82g1esi7I9nIJDqiijbQLIyH2jDUb5s7jIAZMr/79h0VHSq7XHKTqpLARRm+DDNjduB7S9+6XZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdx": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-mdx/-/mdast-util-mdx-3.0.0.tgz", + "integrity": "sha512-JfbYLAW7XnYTTbUsmpu0kdBUVe+yKVJZBItEjwyYJiDJuZ9w4eeaqks4HQO+R7objWgS2ymV60GYpI14Ug554w==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-mdx-expression": "^2.0.0", + "mdast-util-mdx-jsx": "^3.0.0", + "mdast-util-mdxjs-esm": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdast-util-mdx-expression": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.1.tgz", @@ -3204,6 +4723,16 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, "node_modules/micromark": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz", @@ -3271,6 +4800,220 @@ "micromark-util-types": "^2.0.0" } }, + "node_modules/micromark-extension-frontmatter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-2.0.0.tgz", + "integrity": "sha512-C4AkuM3dA58cgZha7zVnuVxBhDsbttIMiytjgsM2XbHAB2faRVaHRle40558FBN+DJcrLNCoqG5mlrpdU4cRtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "fault": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-frontmatter/node_modules/fault": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fault/-/fault-2.0.1.tgz", + "integrity": "sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "format": "^0.2.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/micromark-extension-gfm-footnote": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.1.0.tgz", + "integrity": "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-strikethrough": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.1.0.tgz", + "integrity": "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==", + "dev": true, + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-table": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.2.tgz", + "integrity": "sha512-pRzm4kDTu0MjlmBkxmS9yYhw60nncfcEwu9NNdPFSQEFXS95ZKyIIyTSHu/o3ReBUrLKYEq+7YaXCRn/bPB4MA==", + "dev": true, + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-task-list-item": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.1.0.tgz", + "integrity": "sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-mdx-expression": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/micromark-extension-mdx-expression/-/micromark-extension-mdx-expression-3.0.1.tgz", + "integrity": "sha512-dD/ADLJ1AeMvSAKBwO22zG22N4ybhe7kFIZ3LsDI0GlsNr2A3KYxb0LdC1u5rj4Nw+CHKY0RVdnHX8vj8ejm4Q==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "devlop": "^1.0.0", + "micromark-factory-mdx-expression": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-events-to-acorn": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-extension-mdx-jsx": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/micromark-extension-mdx-jsx/-/micromark-extension-mdx-jsx-3.0.2.tgz", + "integrity": "sha512-e5+q1DjMh62LZAJOnDraSSbDMvGJ8x3cbjygy2qFEi7HCeUT4BDKCvMozPozcD6WmOt6sVvYDNBKhFSz3kjOVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "devlop": "^1.0.0", + "estree-util-is-identifier-name": "^3.0.0", + "micromark-factory-mdx-expression": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-events-to-acorn": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-mdx-md": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-mdx-md/-/micromark-extension-mdx-md-2.0.0.tgz", + "integrity": "sha512-EpAiszsB3blw4Rpba7xTOUptcFeBFi+6PY8VnJ2hhimH+vCQDirWgsMpz7w1XcZE7LVrSAUGb9VJpG9ghlYvYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-mdxjs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-mdxjs/-/micromark-extension-mdxjs-3.0.0.tgz", + "integrity": "sha512-A873fJfhnJ2siZyUrJ31l34Uqwy4xIFmvPY1oj+Ean5PHcPBYzEsvqvWGaWcfEIr11O5Dlw3p2y0tZWpKHDejQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.0.0", + "acorn-jsx": "^5.0.0", + "micromark-extension-mdx-expression": "^3.0.0", + "micromark-extension-mdx-jsx": "^3.0.0", + "micromark-extension-mdx-md": "^2.0.0", + "micromark-extension-mdxjs-esm": "^3.0.0", + "micromark-util-combine-extensions": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-mdxjs-esm": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-mdxjs-esm/-/micromark-extension-mdxjs-esm-3.0.0.tgz", + "integrity": "sha512-DJFl4ZqkErRpq/dAPyeWp15tGrcrrJho1hKK5uBS70BCtfrIFg81sqcTVu3Ta+KD1Tk5vAtBNElWxtAa+m8K9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-events-to-acorn": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unist-util-position-from-estree": "^2.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/micromark-factory-destination": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz", @@ -3312,6 +5055,34 @@ "micromark-util-types": "^2.0.0" } }, + "node_modules/micromark-factory-mdx-expression": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/micromark-factory-mdx-expression/-/micromark-factory-mdx-expression-2.0.3.tgz", + "integrity": "sha512-kQnEtA3vzucU2BkrIa8/VaSAsP+EJ3CKOvhMuJgOEGg9KDC6OAY6nSnNDVRiVNRqj7Y4SlSzcStaH/5jge8JdQ==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-events-to-acorn": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unist-util-position-from-estree": "^2.0.0", + "vfile-message": "^4.0.0" + } + }, "node_modules/micromark-factory-space": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", @@ -3503,6 +5274,32 @@ } ] }, + "node_modules/micromark-util-events-to-acorn": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/micromark-util-events-to-acorn/-/micromark-util-events-to-acorn-2.0.3.tgz", + "integrity": "sha512-jmsiEIiZ1n7X1Rr5k8wVExBQCg5jy4UXVADItHmNk1zkwEVhBuIUKRu3fqv+hs4nxLISi2DQGlqIOGiFxgbfHg==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "@types/unist": "^3.0.0", + "devlop": "^1.0.0", + "estree-util-visit": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "vfile-message": "^4.0.0" + } + }, "node_modules/micromark-util-html-tag-name": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz", @@ -3625,6 +5422,33 @@ } ] }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/mimic-response": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", @@ -3791,6 +5615,27 @@ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==" }, + "node_modules/node-releases": { + "version": "2.0.65", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.65.tgz", + "integrity": "sha512-PfvofsGQ+MiOQIPkX9fU8ELUWmy5zL74CdQaph/ismKszfFkfwXaw0cGiwbwym2hT9k5+mdyl8O5WQ1MD8EHmA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/oauth4webapi": { + "version": "3.8.9", + "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.8.9.tgz", + "integrity": "sha512-gyn4jpaxyYFm1epl3mwqc1sFShLjT9eq/63JW+Nvk286Lz6FC72pVv/SyhJHxo+sQiHEcjIHs4TtFKX/+Md07A==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -3809,6 +5654,16 @@ "https://opencollective.com/debug" ] }, + "node_modules/on-exit-leak-free": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz", + "integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -3894,12 +5749,52 @@ "resolved": "https://registry.npmjs.org/onnxruntime-common/-/onnxruntime-common-1.22.0-dev.20250409-89f8206ba4.tgz", "integrity": "sha512-vDJMkfCfb0b1A836rgHj+ORuZf4B4+cc2bASQtpeoJLueuFc5DuYwjIZUBrSvx/fO5IrLjLz+oTrB3pcGlhovQ==" }, + "node_modules/open": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/open/-/open-10.2.0.tgz", + "integrity": "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "default-browser": "^5.2.1", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "wsl-utils": "^0.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/openid-client": { + "version": "6.8.8", + "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-6.8.8.tgz", + "integrity": "sha512-ZsucJA5Ad04Uv7YN4ql+s4GXNmb9uAYQwyJTsJx7CH/MX3JZioLE2pVKi1SC+YrbSLA4Px3Gi30dMjgOZtb6pA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jose": "^6.2.12", + "oauth4webapi": "^3.8.8" + }, + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, "node_modules/package-json-from-dist": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true }, + "node_modules/package-manager-detector": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.9.0.tgz", + "integrity": "sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA==", + "dev": true, + "license": "MIT" + }, "node_modules/parse-entities": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz", @@ -3923,6 +5818,13 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==" }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, "node_modules/path-scurry": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz", @@ -3954,14 +5856,101 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pino": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/pino/-/pino-10.4.0.tgz", + "integrity": "sha512-bk1ZMTwG/Vymx+zPoa28MhNzucFvXJWp3csrSuxuHPSMeUettaCoQ5Jvg07mtC4JGNpcfTwz41oVCnNgBK9+vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@pinojs/redact": "^0.4.0", + "atomic-sleep": "^1.0.0", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^3.0.0", + "pino-std-serializers": "^7.0.0", + "process-warning": "^5.0.0", + "quick-format-unescaped": "^4.0.3", + "real-require": "^1.0.0", + "safe-stable-stringify": "^2.3.1", + "sonic-boom": "^4.0.1", + "thread-stream": "^4.0.0" + }, + "bin": { + "pino": "bin.js" + } + }, + "node_modules/pino-abstract-transport": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-3.0.0.tgz", + "integrity": "sha512-wlfUczU+n7Hy/Ha5j9a/gZNy7We5+cXp8YL+X+PG8S0KXxw7n/JXA3c46Y0zQznIJ83URJiwy7Lh56WLokNuxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "split2": "^4.0.0" + } + }, + "node_modules/pino-pretty": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-13.2.0.tgz", + "integrity": "sha512-jjghD1ML+Di/WxjJDz6j6Y4FT7hIXOlb8h27AyJ+ohtAXJXH4PS/xkv7si+RCCIW59HMgZsMKTDgzdr0RhuRrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "colorette": "^2.0.7", + "dateformat": "^4.6.3", + "fast-copy": "^4.0.0", + "fast-safe-stringify": "^2.1.1", + "help-me": "^5.0.0", + "joycon": "^3.1.1", + "minimist": "^1.2.6", + "on-exit-leak-free": "^2.1.2", + "pino-abstract-transport": "^3.0.0", + "pump": "^3.0.3", + "secure-json-parse": "^4.1.0", + "sonic-boom": "^5.0.0", + "strip-json-comments": "^5.0.3" + }, + "bin": { + "pino-pretty": "bin.js" + } + }, + "node_modules/pino-pretty/node_modules/sonic-boom": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-5.0.2.tgz", + "integrity": "sha512-/JEruzo6yhNVhsLblTRchgTQHIt7SsdJP0YyrfWaNKjIOQDfrdZv9gwYraYCAsmKV39/LAdV31FLL5NCDpoL/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "atomic-sleep": "^1.0.0" + } + }, + "node_modules/pino-pretty/node_modules/strip-json-comments": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-5.1.0.tgz", + "integrity": "sha512-ErcwpJBYr8EfX/Br7JauOIGXoRE92w0hVtuS9j92UFgbATxA+WRSIZksSUDzEeItfWB/0QCEprTZT55RSINUHQ==", "dev": true, + "license": "MIT", "engines": { - "node": ">=12" + "node": ">=22" }, "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/pino-std-serializers": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-7.1.0.tgz", + "integrity": "sha512-BndPH67/JxGExRgiX1dX0w1FvZck5Wa4aal9198SrRhZjH3GxKQUKIBnYJTdj2HDN3UQAS06HlfcSbQj2OHmaw==", + "dev": true, + "license": "MIT" + }, "node_modules/platform": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz", @@ -4102,6 +6091,23 @@ "node": ">=6" } }, + "node_modules/process-warning": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-5.1.1.tgz", + "integrity": "sha512-oCkNVj4OKnKEcocVBcDfiIugN1/cE6rgfT3nCtzeqZPA8+rIxMaQ0xXzIkGP8Gj2qUaP1UR7uhJ1VD8lUCpzCg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "MIT" + }, "node_modules/property-information": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.1.0.tgz", @@ -4143,6 +6149,34 @@ "once": "^1.3.1" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/quick-format-unescaped": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", + "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==", + "dev": true, + "license": "MIT" + }, "node_modules/rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", @@ -4234,6 +6268,13 @@ "node": ">= 6" } }, + "node_modules/real-require": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-1.0.0.tgz", + "integrity": "sha512-P4nbQYQfePJxRSmY+v/KINxVucm4NF3p3s7pJveMTtom52FR4YGltUQLB8idDXwDDWW+eYrWDFbuzUnjoWHF7g==", + "dev": true, + "license": "MIT" + }, "node_modules/refractor": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/refractor/-/refractor-5.0.0.tgz", @@ -4249,6 +6290,38 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/remark-frontmatter": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-5.0.0.tgz", + "integrity": "sha512-XTFYvNASMe5iPN0719nPrdItC9aU0ssC4v14mH1BCi1u0n1gAocqcujWUrByftZTbLhRtiKRyjYTSIOcr69UVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-frontmatter": "^2.0.0", + "micromark-extension-frontmatter": "^2.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-mdx": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-3.1.1.tgz", + "integrity": "sha512-Pjj2IYlUY3+D8x00UJsIOg5BEvfMyeI+2uLPn9VO9Wg4MEtN/VTIq2NEJQfde9PnX15KgtHyl9S0BcTnWrIuWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdast-util-mdx": "^3.0.0", + "micromark-extension-mdxjs": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/remark-parse": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz", @@ -4280,6 +6353,55 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-stringify": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-11.0.0.tgz", + "integrity": "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-to-markdown": "^2.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/resolve": { + "version": "1.22.14", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.14.tgz", + "integrity": "sha512-1ZjYvR9sbkiwC5+9QHetqW5HmA2pHRMaoupD01t2HlYnV/vydC2zPwLixhsMieSWVZt0JJRg5LVIk0Ow1D/TrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.18.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rimraf": { "version": "6.1.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.2.tgz", @@ -4359,6 +6481,43 @@ "fsevents": "~2.3.2" } }, + "node_modules/run-applescript": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", + "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -4378,15 +6537,43 @@ } ] }, + "node_modules/safe-stable-stringify": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/scheduler": { "version": "0.27.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==" }, + "node_modules/secure-json-parse": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-4.1.1.tgz", + "integrity": "sha512-lnd81MQEZKjhW/Gd2TQqdd4XP6QYNdDW/EP+I7nTrFHP9y2LmaGPIHk9xsnzcOiEr1c39c/e84xFgGviQKBTRw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz", + "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==", + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -4519,6 +6706,36 @@ "is-arrayish": "^0.3.1" } }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/smol-toml": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.9.1.tgz", + "integrity": "sha512-j7WyPdf0CJoutMzMoPLF/bVXHtKZIT9Rb4eGeEbWw8X2t5oirjPgpL+OpaENZrILYaXqYwnVH+qgUwVbl+pUJQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 18" + }, + "funding": { + "url": "https://github.com/sponsors/cyyynthia" + } + }, + "node_modules/sonic-boom": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.2.1.tgz", + "integrity": "sha512-w6AxtubXa2wTXAUsZMMWERrsIRAdrK0Sc+FUytWvYAhBJLyuI4llrMIC1DtlNSdI99EI86KZum2MMq3EAZlF9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "atomic-sleep": "^1.0.0" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -4536,6 +6753,16 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, "node_modules/sprintf-js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", @@ -4584,6 +6811,16 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -4630,6 +6867,33 @@ } } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tapable": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.4.tgz", + "integrity": "sha512-NHFiWnAbMJxNNpBwiO7jJVGDuqMxT9/oV8v57RR+fgBQShkJil5inGD8/xWy0hjLyHQyX1tu27QANhlz3KBqCg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, "node_modules/tar": { "version": "7.5.7", "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.7.tgz", @@ -4676,6 +6940,19 @@ "b4a": "^1.6.4" } }, + "node_modules/thread-stream": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-4.2.1.tgz", + "integrity": "sha512-Stg6edJXC/6/xqGwSXwFokrUhChJ18amEjpKH89WrQQ0oVFDF+pUUcTpiwWhFUrE89Vf16FBOlwhaw+lescxMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "real-require": "^1.0.0" + }, + "engines": { + "node": ">=20" + } + }, "node_modules/tinybench": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", @@ -4716,6 +6993,19 @@ "node": ">=14.0.0" } }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, "node_modules/trim-lines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", @@ -4734,6 +7024,21 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/tsconfig-paths": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", + "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -4821,6 +7126,20 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/unist-util-position-from-estree": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unist-util-position-from-estree/-/unist-util-position-from-estree-2.0.0.tgz", + "integrity": "sha512-KaFVRjoqLyF6YXCbVLNad/eS4+OfPQQn2yOd7zF/h5T/CSL2v8NpN6a5TPvtbXthAGw5nG+PuTtq+DdIZr+cRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/unist-util-stringify-position": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", @@ -4848,9 +7167,10 @@ } }, "node_modules/unist-util-visit-parents": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.2.tgz", - "integrity": "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.1.0.tgz", + "integrity": "sha512-vKXxz6O38sKDj1mtx/k2cWvkkFBuYGx6uGrlzBkVeWCRF/F8sdI0j3Wbkz/5rVNRRuVc8UrgRdbCxNhmYXgP3w==", + "license": "MIT", "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0" @@ -4860,6 +7180,53 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/unplugin": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.3.11.tgz", + "integrity": "sha512-5uKD0nqiYVzlmCRs01Fhs2BdkEgBS3SAVP6ndrBsuK42iC2+JHyxM05Rm9G8+5mkmRtzMZGY8Ct5+mliZxU/Ww==", + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "acorn": "^8.15.0", + "picomatch": "^4.0.3", + "webpack-virtual-modules": "^0.6.2" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.4.0.tgz", + "integrity": "sha512-WPJuOnjI9FWDct4fB+ej4Mz8opLaw5CDcZ2t44tFZ0vIQVYWzBhWR3mkixuUj/A7+vY4V9+ApOZ2YYLwdgq46w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, "node_modules/use-sync-external-store": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz", @@ -5079,9 +7446,16 @@ } }, "node_modules/web-tree-sitter": { - "version": "0.26.5", - "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.26.5.tgz", - "integrity": "sha512-u9sl+q21VSKX2T8dhpQw8bMGGqNfwaIyuoYE3kdOQGVDrOqrmcS9GmaQoCS602iaFnuokn3WCHW374c7GAnuaQ==" + "version": "0.26.13", + "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.26.13.tgz", + "integrity": "sha512-5bUZ7vbQ1kcondet96wzP974+JfCZDeQ7bTpacICm2nnvHpa5cO0ByRsoMcAhUP+743vpkb4m0BFlVSm+Ye9VA==", + "license": "MIT" + }, + "node_modules/webpack-virtual-modules": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz", + "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==", + "license": "MIT" }, "node_modules/why-is-node-running": { "version": "2.3.0", @@ -5104,6 +7478,22 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, + "node_modules/wsl-utils": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.1.0.tgz", + "integrity": "sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-wsl": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/yallist": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", @@ -5112,6 +7502,22 @@ "node": ">=18" } }, + "node_modules/yaml": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.1.tgz", + "integrity": "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } + }, "node_modules/zustand": { "version": "4.5.7", "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.5.7.tgz", diff --git a/package.json b/package.json index 35c2c09..cb05c65 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,8 @@ "dev": "node scripts/dev-cleanup.js && next dev --webpack", "build": "rimraf .next/cache && next build --webpack", "start": "next start", + "gt:generate": "gt generate", + "gt:translate": "gt translate", "typecheck": "tsc -p tsconfig.ci.json --noEmit", "test:ci": "vitest run src/lib/search.test.ts src/lib/graph_integration.test.ts src/lib/contextAssembly.test.ts src/lib/promptSafety.test.ts src/lib/chatHistory.test.ts src/lib/vectorStore.test.ts src/lib/chunker.test.ts", "test:research": "vitest run src/lib/ablation.test.ts", @@ -22,6 +24,7 @@ "byok-vault": "^0.2.2", "dotenv": "^17.3.1", "framer-motion": "^12.34.3", + "gt-next": "^11.4.24", "html-to-image": "^1.11.13", "next": "16.1.6", "react": "19.2.3", @@ -34,6 +37,7 @@ "@types/node": "^20", "@types/react": "^19", "@types/react-dom": "^19", + "gt": "^2.28.4", "kill-port": "^2.0.1", "playwright": "^1.58.2", "rimraf": "^6.1.2", diff --git a/src/app/[owner]/[repo]/page.tsx b/src/app/[owner]/[repo]/page.tsx index f33f134..64e3805 100644 --- a/src/app/[owner]/[repo]/page.tsx +++ b/src/app/[owner]/[repo]/page.tsx @@ -2,6 +2,7 @@ import { useState, useEffect, useRef, useCallback, useMemo } from "react"; import { useRouter, useSearchParams } from "next/navigation"; +import { useGT, useMessages } from "gt-next"; import { indexRepository, IndexAbortError, type IndexProgress, type AstNode } from "@/lib/indexer"; import { VectorStore } from "@/lib/vectorStore"; import { exposeAgentTools } from "@/lib/agent/devtools"; @@ -50,6 +51,10 @@ export default function RepoPage({ }: { params: Promise<{ owner: string; repo: string }>; }) { + const gt = useGT(); + // Decodes msg()-declared strings from src/lib at render time. The raw value + // stays in state so the English-keyword matchers below stay locale-independent. + const m = useMessages(); const router = useRouter(); const searchParams = useSearchParams(); // Optional ?ref=<branch|tag|sha> pins the index to a specific commit (used by evals). @@ -289,7 +294,7 @@ export default function RepoPage({ localStorage.setItem(chatStorageKey, JSON.stringify({ activeChatId, sessions: chatSessions })); } catch (e) { console.warn("Failed to persist chat sessions to localStorage:", e); - setToastMessage("Couldn't save chat history. Your browser storage may be full."); + setToastMessage(gt("Couldn't save chat history. Your browser storage may be full.")); } }, [chatStorageKey, chatSessions, activeChatId]); @@ -320,7 +325,7 @@ export default function RepoPage({ const handleVisibilityChange = () => { if (document.visibilityState === "visible" && completedWhileHiddenRef.current) { completedWhileHiddenRef.current = false; - setToastMessage("Indexing complete. You can ask questions now."); + setToastMessage(gt("Indexing complete. You can ask questions now.")); } }; document.addEventListener("visibilitychange", handleVisibilityChange); @@ -377,7 +382,7 @@ export default function RepoPage({ if (typeof Notification !== "undefined" && Notification.permission === "granted") { try { new Notification("GitAsk", { - body: `Indexing complete for ${owner}/${repo}. You can ask questions now.`, + body: gt("Indexing complete for {repo}. You can ask questions now.", { repo: `${owner}/${repo}` }), }); } catch { /* ignore */ } } @@ -453,7 +458,7 @@ export default function RepoPage({ setRepoStale(isStale); if (isStale && !staleNoticeShownRef.current) { staleNoticeShownRef.current = true; - setToastMessage("Repository changed on GitHub. Re-index for fresh context."); + setToastMessage(gt("Repository changed on GitHub. Re-index for fresh context.")); } if (!isStale) staleNoticeShownRef.current = false; } catch (e) { @@ -461,7 +466,7 @@ export default function RepoPage({ console.warn("Stale context check failed:", e); if (consecutiveFailures >= MAX_CONSECUTIVE_FAILURES && !stalePollWarnShown && !cancelled) { stalePollWarnShown = true; - setToastMessage("Can't reach GitHub right now. Update checks are paused."); + setToastMessage(gt("Can't reach GitHub right now. Update checks are paused.")); } } }; @@ -483,7 +488,7 @@ export default function RepoPage({ const nextToken = tokenDraft.trim(); if (nextToken === token) return; setToken(nextToken); - setToastMessage(nextToken ? "GitHub token applied. Re-indexing..." : "GitHub token removed. Re-indexing..."); + setToastMessage(nextToken ? gt("GitHub token applied. Re-indexing...") : gt("GitHub token removed. Re-indexing...")); }, [tokenDraft, token]); const handleToggleSources = useCallback((messageId: string) => { @@ -510,7 +515,7 @@ export default function RepoPage({ ); setContextChunks([]); setContextMeta(null); - setToastMessage("Chat cleared."); + setToastMessage(gt("Chat cleared.")); }, [activeChatId]); const handleCreateChat = useCallback(() => { @@ -541,9 +546,10 @@ export default function RepoPage({ const current = chatSessions.find((session) => session.chat_id === chatId); if (!current) return; const isLastChat = chatSessions.length <= 1; + const chatTitle = current?.title ?? gt("this chat"); const confirmMessage = isLastChat - ? `Delete "${current?.title ?? "this chat"}"? A new empty chat will be created and indexed files will be kept.` - : `Delete "${current?.title ?? "this chat"}"?`; + ? gt('Delete "{title}"? A new empty chat will be created and indexed files will be kept.', { title: chatTitle }) + : gt('Delete "{title}"?', { title: chatTitle }); const confirmed = typeof window === "undefined" || window.confirm(confirmMessage); if (!confirmed) return; @@ -617,7 +623,7 @@ export default function RepoPage({ const handleDeleteEmbeddings = useCallback(async () => { if (!owner || !repo) return; const confirmed = typeof window !== "undefined" && window.confirm( - `Delete stored embeddings for ${owner}/${repo}? You will be returned to the home page.` + gt("Delete stored embeddings for {repo}? You will be returned to the home page.", { repo: `${owner}/${repo}` }) ); if (!confirmed) return; try { @@ -632,7 +638,7 @@ export default function RepoPage({ router.push("/"); } catch (err) { console.error("Failed to delete embeddings:", err); - setToastMessage("Failed to delete embeddings."); + setToastMessage(gt("Failed to delete embeddings.")); } }, [owner, repo, router, chatStorageKey]); @@ -786,8 +792,8 @@ export default function RepoPage({ ...m, retrieval: { variants: phase.kind === "expanding" ? [] : phase.variants, - loadingPhase: phase.kind === "expanding" ? "expanding queries" - : phase.kind === "refining" ? "Refining" : "searching", + loadingPhase: phase.kind === "expanding" ? gt("expanding queries") + : phase.kind === "refining" ? gt("Refining") : gt("searching"), completedCount: phase.kind === "searching" ? phase.completed : undefined, }, })); @@ -802,9 +808,9 @@ export default function RepoPage({ setMessages((prev) => prev.map((m) => m.id !== placeholderMessageId ? m : { ...m, content: [ - "Blocked. Some code in this repo looks like it's trying to hijack the AI.", - injectionScan.signals.length > 0 ? `Suspicious patterns: ${injectionScan.signals.join(", ")}.` : "", - "Try asking about a specific file or symbol instead.", + gt("Blocked. Some code in this repo looks like it's trying to hijack the AI."), + injectionScan.signals.length > 0 ? gt("Suspicious patterns: {patterns}.", { patterns: injectionScan.signals.join(", ") }) : "", + gt("Try asking about a specific file or symbol instead."), ].filter(Boolean).join("\n"), safety: { blocked: true, reason: "prompt_injection_risk", signals: injectionScan.signals }, })); @@ -820,9 +826,9 @@ export default function RepoPage({ if (assembled.ungrounded) { const missingLabel = assembled.missingTerms.slice(0, 5).map((term) => `"${term}"`).join(", "); const groundedFallback = [ - "I couldn't find enough relevant code to answer this confidently.", - missingLabel ? `Couldn't find: ${missingLabel}.` : "", - !queryExpansionEnabled && llmProvider !== "mlc" ? "Try turning on multi-query (in the ››› menu) or ask with a specific file or function name." : "Try asking with a specific file or function name.", + gt("I couldn't find enough relevant code to answer this confidently."), + missingLabel ? gt("Couldn't find: {terms}.", { terms: missingLabel }) : "", + !queryExpansionEnabled && llmProvider !== "mlc" ? gt("Try turning on multi-query (in the ››› menu) or ask with a specific file or function name.") : gt("Try asking with a specific file or function name."), ].filter(Boolean).join("\n"); setMessages((prev) => prev.map((m) => m.id !== placeholderMessageId ? m : { ...m, @@ -1108,7 +1114,7 @@ ${context}`, zIndex: 1000, fontFamily: "var(--font-display)", color: "var(--text-on-dark)", }} > - {toastMessage} + {m(toastMessage)} {shouldSuggestGitHubToken(toastMessage) && ( <> <br /> @@ -1118,7 +1124,7 @@ ${context}`, rel="noopener noreferrer" style={{ color: "var(--text-on-dark)", textDecoration: "underline", textUnderlineOffset: "2px" }} > - Get a token + {gt("Get a token")} </a> </> )} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 9e3b502..92563b3 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,5 +1,7 @@ import type { Metadata, Viewport } from "next"; import { Analytics } from "@vercel/analytics/next"; +import { GTProvider, useLocale } from "gt-next"; +import { getGT } from "gt-next/server"; import "./globals.css"; export const viewport: Viewport = { @@ -7,25 +9,33 @@ export const viewport: Viewport = { initialScale: 1, }; -export const metadata: Metadata = { - title: "GitAsk: Ask any GitHub repo", - description: - "RAG in your browser. Index any GitHub repo and chat with it. WebGPU inference, AST chunking, hybrid search. No server. API keys encrypted locally.", -}; +export async function generateMetadata(): Promise<Metadata> { + const gt = await getGT(); + return { + title: gt("GitAsk: Ask any GitHub repo"), + description: gt( + "RAG in your browser. Index any GitHub repo and chat with it. WebGPU inference, AST chunking, hybrid search. No server. API keys encrypted locally." + ), + }; +} export default function RootLayout({ children, }: { children: React.ReactNode; }) { + const locale = useLocale(); + return ( - <html lang="en" suppressHydrationWarning> + <html lang={locale} suppressHydrationWarning> {/* Prevent flash of wrong theme on load */} <head> <script dangerouslySetInnerHTML={{ __html: `(function(){try{var t=localStorage.getItem('theme');if(t!=='dark')document.documentElement.setAttribute('data-theme','light');}catch(e){}})()` }} /> </head> <body suppressHydrationWarning> - {children} + <GTProvider> + {children} + </GTProvider> <Analytics /> </body> </html> diff --git a/src/app/page.tsx b/src/app/page.tsx index 9d41506..3a3eccc 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -10,6 +10,7 @@ import { } from "@/lib/webgpu"; import { useEffect, useState, useRef, useCallback } from "react"; import { useRouter } from "next/navigation"; +import { T, Plural, Num, useGT, LocaleSelector } from "gt-next"; const CHAT_STORAGE_PREFIX = "gitask-chat-"; const EXAMPLE_REPOSITORIES = [ @@ -116,6 +117,7 @@ export default function LandingPage() { const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); const howSectionRef = useRef<HTMLElement>(null); const router = useRouter(); + const gt = useGT(); const loadSavedChats = useCallback(() => { if (typeof window === "undefined") return; @@ -220,7 +222,7 @@ export default function LandingPage() { ); if (!match) { - setError("Please enter a valid GitHub URL (e.g. https://github.com/owner/repo)"); + setError(gt("Please enter a valid GitHub URL (e.g. https://github.com/owner/repo)")); return; } @@ -254,7 +256,7 @@ export default function LandingPage() { function handleDeleteSavedChat(chat: SavedChatEntry) { if (typeof window !== "undefined") { - const confirmed = window.confirm("Delete local chats for this repository?"); + const confirmed = window.confirm(gt("Delete local chats for this repository?")); if (!confirmed) return; if (!chat.chatId) { localStorage.removeItem(chat.storageKey); @@ -329,6 +331,7 @@ export default function LandingPage() { <div style={{ display: "flex", gap: 12, alignItems: "center" }}> <ModelSettings /> <ThemeToggle /> + <LocaleSelector /> <a href="/storage" className="nav-hide-mobile" @@ -354,7 +357,7 @@ export default function LandingPage() { el.style.borderColor = "transparent"; }} > - Storage + {gt("Storage")} </a> <a href="https://github.com/FloareDor/gitask" @@ -376,7 +379,7 @@ export default function LandingPage() { <button className="mobile-menu-btn" onClick={() => setIsMobileMenuOpen((v) => !v)} - aria-label="Menu" + aria-label={gt("Menu")} aria-expanded={isMobileMenuOpen} > {isMobileMenuOpen ? "✕" : "☰"} @@ -386,7 +389,7 @@ export default function LandingPage() { {/* Mobile dropdown menu */} <div className={`mobile-menu-panel${isMobileMenuOpen ? " open" : ""}`}> <a href="/storage" className="mobile-menu-item" onClick={() => setIsMobileMenuOpen(false)}> - Storage + {gt("Storage")} </a> <a href="https://github.com/FloareDor/gitask" target="_blank" rel="noopener noreferrer" className="mobile-menu-item" onClick={() => setIsMobileMenuOpen(false)}> GitHub ↗ @@ -422,7 +425,7 @@ export default function LandingPage() { background: "var(--page-surface)", }}> <span style={{ width: 7, height: 7, borderRadius: "50%", background: "#16a34a", display: "inline-block" }} className="pulse" /> - Browser-native · No server · Keys stay local + {gt("Browser-native · No server · Keys stay local")} </div> <h1 style={{ @@ -435,7 +438,9 @@ export default function LandingPage() { marginBottom: 24, maxWidth: 900, }}> - Ask any GitHub<br />repo anything. + <T> + Ask any GitHub<br />repo anything. + </T> </h1> <p style={{ @@ -445,8 +450,10 @@ export default function LandingPage() { maxWidth: 540, marginBottom: 16, }}> - Index any repo in your browser. Chat with its code using your own API key. - Embeddings, retrieval, and storage — all on-device. + <T> + Index any repo in your browser. Chat with its code using your own API key. + Embeddings, retrieval, and storage — all on-device. + </T> </p> {/* AST chunking · hybrid search · multi-query expansion · adaptive retrieval refinement · CoVe <p style={{ @@ -475,11 +482,13 @@ export default function LandingPage() { gap: 8, }}> <strong style={{ fontSize: "13px", color: "#d97706", fontFamily: "var(--font-display)" }}> - Local WebGPU inference unavailable in this browser. + <T>Local WebGPU inference unavailable in this browser.</T> </strong> <p style={{ margin: 0, fontSize: "12px", color: "#a16207", lineHeight: 1.5 }}> - Use Gemini or Groq instead. Open settings and enter your API key. - Local indexing still works on CPU, just slower. + <T> + Use Gemini or Groq instead. Open settings and enter your API key. + Local indexing still works on CPU, just slower. + </T> {gpuSupportReason !== "ok" ? ` ${formatWebGPUReason(gpuSupportReason)}` : ""} @@ -499,7 +508,7 @@ export default function LandingPage() { fontFamily: "var(--font-sans)", }} > - Open Settings + {gt("Open Settings")} </button> </div> )} @@ -520,7 +529,7 @@ export default function LandingPage() { id="go-btn" className="hero-submit-btn" > - Explore Repo → + {gt("Explore Repo")} → </button> </form> {error && ( @@ -569,7 +578,7 @@ export default function LandingPage() { <svg width="16" height="16" viewBox="0 0 98 96" fill="currentColor" aria-hidden="true"> <path fillRule="evenodd" clipRule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z"/> </svg> - Star on GitHub + {gt("Star on GitHub")} </span> {/* Divider */} <span style={{ width: 1, background: "var(--page-border)", flexShrink: 0 }} aria-hidden="true" /> @@ -597,7 +606,7 @@ export default function LandingPage() { <div style={{ maxWidth: 900, margin: "0 auto" }}> <div className="recent-chats-header" style={{ display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 16 }}> <p style={{ fontFamily: "var(--font-mono)", fontSize: "11px", textTransform: "uppercase", letterSpacing: "0.1em", color: "var(--page-text-muted)" }}> - Recent chats + {gt("Recent chats")} </p> <a href="/storage" @@ -609,7 +618,7 @@ export default function LandingPage() { letterSpacing: "0.04em", }} > - Manage storage → + {gt("Manage storage")} → </a> </div> <div style={{ display: "flex", flexDirection: "column", gap: 8 }}> @@ -638,7 +647,14 @@ export default function LandingPage() { {chat.owner}/{chat.repo} </span> <span className="rcc-label" style={{ fontSize: "0.75rem", color: "var(--page-text-dim)" }}> - {chat.label} · {chat.messageCount} msg{chat.messageCount === 1 ? "" : "s"} + {chat.label} ·{" "} + <T> + <Plural + n={chat.messageCount} + one={<><Num>{chat.messageCount}</Num> msg</>} + other={<><Num>{chat.messageCount}</Num> msgs</>} + /> + </T> </span> <button onClick={(e) => { e.stopPropagation(); handleDeleteSavedChat(chat); }} @@ -658,7 +674,7 @@ export default function LandingPage() { <section className="landing-section" style={{ padding: "60px 24px", background: "var(--page-bg)", borderTop: "1px solid var(--page-border)" }}> <div style={{ maxWidth: 900, margin: "0 auto" }}> <p style={{ fontFamily: "var(--font-mono)", fontSize: "11px", textTransform: "uppercase", letterSpacing: "0.1em", color: "var(--page-text-muted)", marginBottom: 24 }}> - Try an example + {gt("Try an example")} </p> <div className="example-repos-grid"> {EXAMPLE_REPOSITORIES.map(({ owner, repo }) => ( @@ -685,7 +701,7 @@ export default function LandingPage() { <span style={{ fontFamily: "var(--font-mono)", fontSize: "0.85rem", fontWeight: 600, color: "var(--page-text)" }}> {owner}/<span style={{ color: "#16a34a" }}>{repo}</span> </span> - <span style={{ fontSize: "0.75rem", fontWeight: 700, color: "#16a34a" }}>Explore →</span> + <span style={{ fontSize: "0.75rem", fontWeight: 700, color: "#16a34a" }}>{gt("Explore")} →</span> </button> ))} </div> @@ -707,18 +723,18 @@ export default function LandingPage() { > <div style={{ maxWidth: 1100, margin: "0 auto" }}> <p style={{ fontFamily: "var(--font-mono)", fontSize: "11px", textTransform: "uppercase", letterSpacing: "0.1em", color: "var(--page-text-muted)", marginBottom: 16, textAlign: "center" }}> - How it works + {gt("How it works")} </p> <h2 style={{ fontFamily: "var(--font-display)", fontWeight: 800, fontSize: "clamp(1.5rem, 4vw, 2.5rem)", color: "var(--page-text)", textAlign: "center", marginBottom: 48, letterSpacing: "-0.03em" }}> - Under the Hood + {gt("Under the Hood")} </h2> {/* Step cards */} <div className="step-cards-grid"> {[ - { num: "01", title: "Paste a GitHub URL", desc: "Any public repo. Private repos with a token." }, - { num: "02", title: "Index in your browser", desc: "AST chunking + WebGPU embeddings. No server. Binary quantization shrinks vectors 32x. For ex: mlc-ai/web-llm goes from 2.1 MB to 67 KB." }, - { num: "03", title: "Ask questions", desc: "Chat with your LLM of choice. Results cite real code." }, + { num: "01", title: gt("Paste a GitHub URL"), desc: gt("Any public repo. Private repos with a token.") }, + { num: "02", title: gt("Index in your browser"), desc: gt("AST chunking + WebGPU embeddings. No server. Binary quantization shrinks vectors 32x. For ex: mlc-ai/web-llm goes from 2.1 MB to 67 KB.") }, + { num: "03", title: gt("Ask questions"), desc: gt("Chat with your LLM of choice. Results cite real code.") }, ].map((step, i) => ( <div key={step.num} className="step-card" style={{ borderRight: i < 2 ? "none" : "1px solid var(--page-border)", @@ -739,9 +755,9 @@ export default function LandingPage() { <footer className="landing-footer" style={{ background: "var(--page-bg)", borderTop: "1px solid var(--page-border)", display: "flex", justifyContent: "space-between", alignItems: "center", padding: "24px 40px" }}> <span style={{ fontFamily: "var(--font-display)", fontWeight: 800, fontSize: "0.9rem", color: "var(--page-text-muted)" }}>gitask</span> <div style={{ display: "flex", gap: 16 }}> - <a href="/storage" style={{ fontSize: "12px", color: "var(--page-text-muted)", textDecoration: "none", fontFamily: "var(--font-mono)" }}>Storage</a> - <a href="/ablation" style={{ fontSize: "12px", color: "var(--page-text-muted)", textDecoration: "none" }}>Ablation</a> - <a href="/metrics" style={{ fontSize: "12px", color: "var(--page-text-muted)", textDecoration: "none" }}>Metrics</a> + <a href="/storage" style={{ fontSize: "12px", color: "var(--page-text-muted)", textDecoration: "none", fontFamily: "var(--font-mono)" }}>{gt("Storage")}</a> + <a href="/ablation" style={{ fontSize: "12px", color: "var(--page-text-muted)", textDecoration: "none" }}>{gt("Ablation")}</a> + <a href="/metrics" style={{ fontSize: "12px", color: "var(--page-text-muted)", textDecoration: "none" }}>{gt("Metrics")}</a> <a href="https://github.com/FloareDor/gitask" target="_blank" rel="noopener noreferrer" style={{ fontSize: "12px", color: "var(--page-text-muted)", textDecoration: "none" }}>GitHub</a> </div> </footer> diff --git a/src/components/AstTreeView.tsx b/src/components/AstTreeView.tsx index 55daab2..4b12afa 100644 --- a/src/components/AstTreeView.tsx +++ b/src/components/AstTreeView.tsx @@ -1,6 +1,7 @@ "use client"; import { useMemo } from "react"; +import { useGT } from "gt-next"; import type { AstNode } from "@/lib/indexer"; interface AstTreeViewProps { @@ -203,6 +204,7 @@ function AstFileNode({ file, depth }: { file: FileNode; depth: number }) { /* ── Main component ── */ export default function AstTreeView({ astNodes, textChunkCounts }: AstTreeViewProps) { + const gt = useGT(); const tree = useMemo( () => buildTree(astNodes, textChunkCounts), [astNodes, textChunkCounts], @@ -216,11 +218,11 @@ export default function AstTreeView({ astNodes, textChunkCounts }: AstTreeViewPr <div className="ast-tree-container ast-tree-single fade-in"> <div className="ast-column"> <div className="ast-column-header"> - <h3>Code Structure (AST)</h3> + <h3>{gt("Code Structure (AST)")}</h3> <span className="ast-column-subtitle"> - {totalSymbols} symbols detected - {doneSymbols > 0 && ` · ${doneSymbols} embedded`} - {embeddingSymbols > 0 && ` · ${embeddingSymbols} embedding`} + {gt("{count} symbols detected", { count: totalSymbols })} + {doneSymbols > 0 && ` · ${gt("{count} embedded", { count: doneSymbols })}`} + {embeddingSymbols > 0 && ` · ${gt("{count} embedding", { count: embeddingSymbols })}`} </span> </div> <div className="ast-column-body"> diff --git a/src/components/IndexBrowser.tsx b/src/components/IndexBrowser.tsx index 9afb522..56f4eca 100644 --- a/src/components/IndexBrowser.tsx +++ b/src/components/IndexBrowser.tsx @@ -1,6 +1,7 @@ "use client"; import { useMemo, useState } from "react"; +import { useGT } from "gt-next"; import type { EmbeddedChunk } from "@/lib/embedder"; interface IndexBrowserProps { @@ -51,6 +52,7 @@ const NODE_TYPE_LABELS: Record<string, string> = { }; export default function IndexBrowser({ chunks }: IndexBrowserProps) { + const gt = useGT(); const fileGroups = useMemo(() => buildFileTree(chunks), [chunks]); const [expandedFiles, setExpandedFiles] = useState<Set<string>>(() => { // Expand first 5 files by default for quick browsing @@ -112,7 +114,7 @@ export default function IndexBrowser({ chunks }: IndexBrowserProps) { margin: "4px 0 0 0", }} > - {totalFiles} files · {totalChunks} chunks + {gt("{files} files · {chunks} chunks", { files: totalFiles, chunks: totalChunks })} </p> </div> <div style={{ display: "flex", gap: "8px", alignItems: "center" }}> @@ -122,7 +124,7 @@ export default function IndexBrowser({ chunks }: IndexBrowserProps) { style={{ fontSize: "11px", padding: "2px 6px" }} onClick={expandAll} > - Expand all + {gt("Expand all")} </button> <button type="button" @@ -130,7 +132,7 @@ export default function IndexBrowser({ chunks }: IndexBrowserProps) { style={{ fontSize: "11px", padding: "2px 6px" }} onClick={collapseAll} > - Collapse + {gt("Collapse")} </button> </div> </div> diff --git a/src/components/IndexingProgress.tsx b/src/components/IndexingProgress.tsx index 93618e6..d8bbf96 100644 --- a/src/components/IndexingProgress.tsx +++ b/src/components/IndexingProgress.tsx @@ -1,5 +1,7 @@ "use client"; +import { useGT } from "gt-next"; + interface IndexingProgressProps { step: string; progress: number; // 0–100 @@ -15,6 +17,8 @@ export function IndexingProgress({ totalFiles, currentFile, }: IndexingProgressProps) { + const gt = useGT(); + const pct = Math.min(100, Math.max(0, Math.round(progress))); return ( @@ -36,7 +40,7 @@ export function IndexingProgress({ textTransform: "uppercase", letterSpacing: "0.05em", }}> - Indexing + {gt("Indexing")} </span> <span style={{ fontFamily: "var(--font-mono)", @@ -98,7 +102,7 @@ export function IndexingProgress({ color: "var(--text-muted)", marginTop: 4, }}> - {filesProcessed} / {totalFiles} files + {gt("{done} / {total} files", { done: filesProcessed, total: totalFiles })} </p> )} </div> diff --git a/src/components/ModelSettings.tsx b/src/components/ModelSettings.tsx index 7739cbe..44a2057 100644 --- a/src/components/ModelSettings.tsx +++ b/src/components/ModelSettings.tsx @@ -1,6 +1,7 @@ "use client"; import { useEffect, useState } from "react"; +import { T, useGT, useMessages } from "gt-next"; import { getLLMConfig, setLLMConfig, @@ -27,6 +28,8 @@ import { } from "byok-vault"; export function ModelSettings() { + const gt = useGT(); + const m = useMessages(); const [isOpen, setIsOpen] = useState(false); const [config, setConfig] = useState<LLMConfig>({ provider: "mlc" }); const [reloading, setReloading] = useState(false); @@ -117,7 +120,7 @@ export function ModelSettings() { const handleMigrate = async () => { if (!config.apiKey || migratePassphrase.length < 8 || !vault) return; setReloading(true); - setStatusMsg("Migrating key to vault..."); + setStatusMsg(gt("Migrating key to vault...")); try { await vault.importKey(config.apiKey, migratePassphrase); const { apiKey: _omit, ...safe } = config; @@ -130,7 +133,7 @@ export function ModelSettings() { console.error(e); setStatusMsg( e instanceof BYOKVaultError && e.code === "WRONG_PASSPHRASE" - ? "Wrong passphrase, try again." + ? gt("Wrong passphrase, try again.") : getUserMessage(e) ); } finally { @@ -141,7 +144,7 @@ export function ModelSettings() { const handleUnlock = async () => { if (!vault || passphraseInput.length < 8) return; setReloading(true); - setStatusMsg("Unlocking..."); + setStatusMsg(gt("Unlocking...")); try { await vault.unlock(passphraseInput, { session: "tab" }); setPassphraseInput(""); @@ -150,7 +153,7 @@ export function ModelSettings() { console.error(e); setStatusMsg( e instanceof BYOKVaultError && e.code === "WRONG_PASSPHRASE" - ? "Wrong passphrase, try again." + ? gt("Wrong passphrase, try again.") : getUserMessage(e) ); } finally { @@ -161,7 +164,7 @@ export function ModelSettings() { const handleUnlockWithPasskey = async () => { if (!vault) return; setReloading(true); - setStatusMsg("Unlocking with fingerprint..."); + setStatusMsg(gt("Unlocking with fingerprint...")); try { await vault.unlockWithPasskey({ session: "tab" }); await reloadLLM((msg) => setStatusMsg(msg)); @@ -215,7 +218,7 @@ export function ModelSettings() { const handleSave = async () => { setReloading(true); - setStatusMsg("Initializing..."); + setStatusMsg(gt("Initializing...")); let clearLocalKeyAfterSuccess = false; try { if (isCloudProvider) { @@ -267,7 +270,7 @@ export function ModelSettings() { console.error(e); setStatusMsg( e instanceof BYOKVaultError && e.code === "WRONG_PASSPHRASE" - ? "Wrong passphrase, try again." + ? gt("Wrong passphrase, try again.") : getUserMessage(e) ); } finally { @@ -294,7 +297,7 @@ export function ModelSettings() { <button onClick={() => setIsOpen(true)} style={styles.settingsBtn} - aria-label="Model settings" + aria-label={gt("Model settings")} > <span style={{ ...styles.dot, background: dotColor }} /> {badge} @@ -313,7 +316,7 @@ export function ModelSettings() { <button onClick={() => setIsOpen(false)} style={styles.closeBtn} - aria-label="Close" + aria-label={gt("Close")} > × </button> @@ -323,7 +326,7 @@ export function ModelSettings() { <div style={styles.sheetBody}> {/* Provider section */} <div style={{ marginBottom: 24 }}> - <p style={styles.sectionLabel}>provider</p> + <p style={styles.sectionLabel}>{gt("provider")}</p> <div style={{ @@ -387,13 +390,13 @@ export function ModelSettings() { <p style={styles.hint}> {config.provider === "mlc" ? ( - <>runs in your browser via{" "} + <T>runs in your browser via{" "} <a href="https://github.com/mlc-ai/web-llm" target="_blank" rel="noopener noreferrer" style={{ color: "var(--accent)" }}>web-llm</a> - {" "}(private, offline, no API key needed)</> + {" "}(private, offline, no API key needed)</T> ) : config.provider === "groq" ? ( - "groq cloud, very fast, no download. needs your API key" + gt("groq cloud, very fast, no download. needs your API key") ) : ( - "google cloud, fast, no download. needs your API key" + gt("google cloud, fast, no download. needs your API key") )} </p> </div> @@ -402,7 +405,7 @@ export function ModelSettings() { {config.provider === "mlc" && ( <div style={{ marginBottom: 24 }}> <div style={styles.sectionDivider} /> - <p style={styles.sectionLabel}>local model</p> + <p style={styles.sectionLabel}>{gt("local model")}</p> {MLC_MODELS.map((model) => { const isSelected = (config.mlcModelId ?? MLC_MODELS[0].id) === model.id; const isDownloaded = downloadedModels.includes(model.id); @@ -437,7 +440,7 @@ export function ModelSettings() { color: isSelected ? "rgba(216,200,255,0.9)" : "#a78bfa", border: isSelected ? "1px solid rgba(168,139,250,0.3)" : "1px solid rgba(168,139,250,0.2)", }}> - thinks + {gt("thinks")} </span> )} </div> @@ -446,7 +449,7 @@ export function ModelSettings() { ...styles.mlcModelMetaText, color: isSelected ? "rgba(255,255,255,0.5)" : "var(--page-text-dim)", }}> - {model.vram} download + {gt("{size} download", { size: model.vram })} </span> {isDownloaded && ( <span style={{ @@ -456,7 +459,7 @@ export function ModelSettings() { alignItems: "center", gap: 4, }}> - <span style={{ fontSize: 7, lineHeight: 1 }}>●</span> cached + <span style={{ fontSize: 7, lineHeight: 1 }}>●</span> {gt("cached")} </span> )} </div> @@ -467,7 +470,7 @@ export function ModelSettings() { {/* Manage downloaded models */} {downloadedModels.length > 0 && ( <details style={{ marginTop: 16 }}> - <summary style={styles.manageLabel}>manage downloads</summary> + <summary style={styles.manageLabel}>{gt("manage downloads")}</summary> <div style={{ marginTop: 10, display: "flex", flexDirection: "column", gap: 6 }}> {downloadedModels.map((id) => { const info = MLC_MODELS.find((m) => m.id === id); @@ -480,7 +483,7 @@ export function ModelSettings() { disabled={deletingModel === id} onClick={() => handleDeleteModel(id)} > - {deletingModel === id ? "deleting..." : "delete"} + {deletingModel === id ? gt("deleting...") : gt("delete")} </button> </div> ); @@ -497,17 +500,17 @@ export function ModelSettings() { <div style={styles.sectionDivider} /> {hasDefaultKey && ( - <p style={styles.hint}>a shared {activeProviderLabel} key is set up. add your own key for better rate limits.</p> + <p style={styles.hint}>{gt("a shared {provider} key is set up. add your own key for better rate limits.", { provider: activeProviderLabel })}</p> )} <div style={styles.field}> <div style={styles.switchInlineRow}> - <span style={styles.label}>byok-vault bypass</span> + <span style={styles.label}>{gt("byok-vault bypass")}</span> <button type="button" role="switch" aria-checked={bypassEnabled} - aria-label="Toggle BYOK vault bypass" + aria-label={gt("Toggle BYOK vault bypass")} style={{ ...styles.switchBtn, ...(bypassEnabled ? styles.switchBtnOn : {}), @@ -535,11 +538,12 @@ export function ModelSettings() { ...(!vaultSupported ? styles.switchStateDisabled : {}), }} > - {bypassEnabled ? "ON" : "OFF"} + {bypassEnabled ? gt("ON") : gt("OFF")} </span> </div> {!bypassEnabled ? ( <p style={styles.hint}> + <T> stored encrypted with{" "} <a href="https://www.npmjs.com/package/byok-vault" @@ -550,25 +554,26 @@ export function ModelSettings() { byok-vault </a> . + </T> </p> ) : ( <p style={styles.warningHint}> - local fallback stores your {activeProviderLabel} key in browser localStorage (less secure). + {gt("local fallback stores your {provider} key in browser localStorage (less secure).", { provider: activeProviderLabel })} </p> )} {!vaultSupported && ( <p style={styles.warningHint}> - encrypted vault is not available in this browser. bypass is forced on. + <T>encrypted vault is not available in this browser. bypass is forced on.</T> </p> )} </div> {storageMode === "vault" && needsMigration && ( <div style={styles.field}> - <label style={styles.label}>secure your existing key</label> + <label style={styles.label}>{gt("secure your existing key")}</label> <input type="password" - placeholder="passphrase (min 8 chars)" + placeholder={gt("passphrase (min 8 chars)")} value={migratePassphrase} onChange={(e) => setMigratePassphrase(e.target.value)} style={styles.input} @@ -578,7 +583,7 @@ export function ModelSettings() { style={styles.saveBtn} disabled={reloading || migratePassphrase.length < 8} > - {reloading ? "saving..." : "migrate"} + {reloading ? gt("saving...") : gt("migrate")} </button> </div> )} @@ -591,11 +596,11 @@ export function ModelSettings() { rel="noopener noreferrer" style={styles.accentLink} > - {config.provider === "groq" ? "get a Groq API key →" : "get a free API key →"} + {config.provider === "groq" ? gt("get a Groq API key →") : gt("get a free API key →")} </a> <input type="password" - placeholder="paste API key" + placeholder={gt("paste API key")} value={apiKeyInput} onChange={(e) => setApiKeyInput(e.target.value)} style={styles.input} @@ -603,7 +608,7 @@ export function ModelSettings() { {!passkeySupported && ( <input type="password" - placeholder="passphrase to encrypt it (min 8 chars)" + placeholder={gt("passphrase to encrypt it (min 8 chars)")} value={passphraseInput} onChange={(e) => setPassphraseInput(e.target.value)} style={styles.input} @@ -620,20 +625,20 @@ export function ModelSettings() { rel="noopener noreferrer" style={styles.accentLink} > - {config.provider === "groq" ? "get a Groq API key →" : "get a free API key →"} + {config.provider === "groq" ? gt("get a Groq API key →") : gt("get a free API key →")} </a> <input type="password" - placeholder={hasLocalKey ? "replace local API key (optional)" : "paste API key"} + placeholder={hasLocalKey ? gt("replace local API key (optional)") : gt("paste API key")} value={apiKeyInput} onChange={(e) => setApiKeyInput(e.target.value)} style={styles.input} /> {hasLocalKey && ( <div style={{ display: "flex", gap: 8 }}> - <p style={{ ...styles.hint, color: "var(--success)", flex: 1 }}>local key saved</p> + <p style={{ ...styles.hint, color: "var(--success)", flex: 1 }}>{gt("local key saved")}</p> <button onClick={() => handleResetKeys("local")} style={styles.ghostBtn}> - remove key + {gt("remove key")} </button> </div> )} @@ -644,13 +649,13 @@ export function ModelSettings() { <div style={styles.field}> {isPasskeyEnrolled ? ( <button onClick={handleUnlockWithPasskey} style={styles.saveBtn} disabled={reloading}> - {reloading ? "unlocking..." : "unlock with fingerprint"} + {reloading ? gt("unlocking...") : gt("unlock with fingerprint")} </button> ) : ( <> <input type="password" - placeholder="passphrase" + placeholder={gt("passphrase")} value={passphraseInput} onChange={(e) => setPassphraseInput(e.target.value)} style={styles.input} @@ -660,7 +665,7 @@ export function ModelSettings() { style={styles.saveBtn} disabled={reloading || passphraseInput.length < 8} > - {reloading ? "unlocking..." : "unlock"} + {reloading ? gt("unlocking...") : gt("unlock")} </button> </> )} @@ -669,10 +674,10 @@ export function ModelSettings() { {storageMode === "vault" && vaultState === "unlocked" && ( <div style={styles.field}> - <p style={{ ...styles.hint, color: "var(--success)" }}>key saved</p> + <p style={{ ...styles.hint, color: "var(--success)" }}>{gt("key saved")}</p> <div style={{ display: "flex", gap: 8 }}> - <button onClick={handleLock} style={styles.ghostBtn}>lock</button> - <button onClick={() => handleResetKeys("vault")} style={styles.ghostBtn}>remove key</button> + <button onClick={handleLock} style={styles.ghostBtn}>{gt("lock")}</button> + <button onClick={() => handleResetKeys("vault")} style={styles.ghostBtn}>{gt("remove key")}</button> </div> </div> )} @@ -681,14 +686,14 @@ export function ModelSettings() { {reloading && ( <div style={styles.progressBlock}> - <p style={styles.status}>{statusMsg || "Initializing..."}</p> + <p style={styles.status}>{statusMsg ? m(statusMsg) : gt("Initializing...")}</p> {config.provider === "mlc" && ( <button style={styles.cancelBtn} onClick={handleCancelMLCInit} disabled={isCancelling} > - {isCancelling ? "cancelling..." : "cancel & clear download"} + {isCancelling ? gt("cancelling...") : gt("cancel & clear download")} </button> )} </div> @@ -704,7 +709,7 @@ export function ModelSettings() { }} disabled={reloading || !canSave} > - {reloading ? "saving..." : "save"} + {reloading ? gt("saving...") : gt("save")} </button> <details style={{ marginTop: 24 }}> @@ -716,7 +721,7 @@ export function ModelSettings() { userSelect: "none", marginBottom: 12, }}> - Advanced + {gt("Advanced")} </summary> <div style={{ marginTop: 12 }}> <button @@ -724,7 +729,7 @@ export function ModelSettings() { style={styles.ghostBtn} disabled={reloading} > - cancel + {gt("cancel")} </button> </div> </details> diff --git a/src/components/ThemeToggle.tsx b/src/components/ThemeToggle.tsx index c746517..84dcb32 100644 --- a/src/components/ThemeToggle.tsx +++ b/src/components/ThemeToggle.tsx @@ -1,8 +1,10 @@ "use client"; import { useEffect, useState } from "react"; +import { useGT } from "gt-next"; export function ThemeToggle() { + const gt = useGT(); const [theme, setTheme] = useState<"dark" | "light">("light"); useEffect(() => { @@ -34,7 +36,7 @@ export function ThemeToggle() { return ( <button onClick={toggle} - title={`Switch to ${theme === "dark" ? "light" : "dark"} mode`} + title={theme === "dark" ? gt("Switch to light mode") : gt("Switch to dark mode")} style={{ display: "flex", alignItems: "center", diff --git a/src/components/chat/AgentTrace.tsx b/src/components/chat/AgentTrace.tsx index eacea05..765e25e 100644 --- a/src/components/chat/AgentTrace.tsx +++ b/src/components/chat/AgentTrace.tsx @@ -1,6 +1,7 @@ "use client"; import { memo, useState } from "react"; +import { useGT } from "gt-next"; import type { MessageAgentState } from "@/app/[owner]/[repo]/types"; /** `{ pattern: "def ", glob: "*.py" }` → `pattern: "def ", glob: "*.py"` */ @@ -14,12 +15,6 @@ function formatBytes(bytes: number): string { return bytes < 1024 ? `${bytes}B` : `${(bytes / 1024).toFixed(1)}KB`; } -const STOP_REASON_LABEL: Record<string, string> = { - answered: "answered", - step_cap: "hit step cap", - context_budget: "hit context budget", -}; - interface AgentTraceProps { agent: MessageAgentState; /** The run is still going, so the last row may have no result yet. */ @@ -27,6 +22,12 @@ interface AgentTraceProps { } export const AgentTrace = memo(function AgentTrace({ agent, isLive }: AgentTraceProps) { + const gt = useGT(); + const stopReasonLabel: Record<string, string> = { + answered: gt("answered"), + step_cap: gt("hit step cap"), + context_budget: gt("hit context budget"), + }; const [expanded, setExpanded] = useState(true); const [openRows, setOpenRows] = useState<Set<string>>(new Set()); @@ -41,10 +42,15 @@ export const AgentTrace = memo(function AgentTrace({ agent, isLive }: AgentTrace }); }; + const stepCount = agent.totalSteps ?? agent.steps.length; const summary = [ - `${agent.totalSteps ?? agent.steps.length} step${(agent.totalSteps ?? agent.steps.length) === 1 ? "" : "s"}`, + stepCount === 1 + ? gt("{count} step", { count: stepCount }) + : gt("{count} steps", { count: stepCount }), agent.toolBytes != null ? formatBytes(agent.toolBytes) : null, - agent.tokensIn != null ? `${agent.tokensIn + (agent.tokensOut ?? 0)} tok` : null, + agent.tokensIn != null + ? gt("{count} tok", { count: agent.tokensIn + (agent.tokensOut ?? 0) }) + : null, agent.elapsedMs != null ? `${(agent.elapsedMs / 1000).toFixed(1)}s` : null, ].filter(Boolean).join(" · "); @@ -61,7 +67,7 @@ export const AgentTrace = memo(function AgentTrace({ agent, isLive }: AgentTrace style={{ transform: expanded ? "rotate(90deg)" : "rotate(0deg)" }} aria-hidden="true" >▸</span> - {isLive ? "investigating…" : `trace — ${summary}`} + {isLive ? gt("investigating…") : gt("trace — {summary}", { summary })} </button> {expanded && ( @@ -88,10 +94,10 @@ export const AgentTrace = memo(function AgentTrace({ agent, isLive }: AgentTrace <span className="agent-trace-tool">{step.tool}</span> <span className="agent-trace-args">{formatArgs(step.args)}</span> <span className="agent-trace-meta"> - {pending && <span className="agent-trace-pending">running…</span>} - {step.duplicate && <span className="agent-trace-flag">repeat</span>} - {step.isError && <span className="agent-trace-flag agent-trace-flag--error">error</span>} - {step.truncated && <span className="agent-trace-flag">truncated</span>} + {pending && <span className="agent-trace-pending">{gt("running…")}</span>} + {step.duplicate && <span className="agent-trace-flag">{gt("repeat")}</span>} + {step.isError && <span className="agent-trace-flag agent-trace-flag--error">{gt("error")}</span>} + {step.truncated && <span className="agent-trace-flag">{gt("truncated")}</span>} {step.bytes != null && step.bytes > 0 && <span>{formatBytes(step.bytes)}</span>} {step.elapsedMs != null && <span>{step.elapsedMs}ms</span>} </span> @@ -105,7 +111,10 @@ export const AgentTrace = memo(function AgentTrace({ agent, isLive }: AgentTrace {!isLive && agent.stopReason && agent.stopReason !== "answered" && ( <div className="agent-trace-stop"> - ⚠ {STOP_REASON_LABEL[agent.stopReason]} — the answer may be incomplete + ⚠{" "} + {gt("{reason} — the answer may be incomplete", { + reason: stopReasonLabel[agent.stopReason], + })} </div> )} </div> diff --git a/src/components/chat/ChatInput.tsx b/src/components/chat/ChatInput.tsx index a6f3bdb..831ff3a 100644 --- a/src/components/chat/ChatInput.tsx +++ b/src/components/chat/ChatInput.tsx @@ -1,5 +1,7 @@ "use client"; +import { useGT } from "gt-next"; + interface ChatInputProps { input: string; isIndexed: boolean; @@ -21,6 +23,8 @@ export function ChatInput({ onSend, onKeyDown, }: ChatInputProps) { + const gt = useGT(); + return ( <form onSubmit={(e) => { e.preventDefault(); onSend(); }} @@ -31,7 +35,11 @@ export function ChatInput({ value={input} onChange={e => onChange(e.target.value)} onKeyDown={onKeyDown} - placeholder={isIndexed ? `Ask about ${owner}/${repo}...` : "hold up until I index the repo..."} + placeholder={ + isIndexed + ? gt("Ask about {repo}...", { repo: `${owner}/${repo}` }) + : gt("hold up until I index the repo...") + } disabled={!isIndexed || isGenerating} rows={1} id="chat-input" diff --git a/src/components/chat/ChatMessage.tsx b/src/components/chat/ChatMessage.tsx index e1924ea..2234092 100644 --- a/src/components/chat/ChatMessage.tsx +++ b/src/components/chat/ChatMessage.tsx @@ -1,6 +1,7 @@ "use client"; import { memo, useMemo, useState, useRef, useEffect, useCallback } from "react"; +import { useGT } from "gt-next"; import ReactMarkdown from "react-markdown"; import type { Components } from "react-markdown"; import type { Message } from "@/app/[owner]/[repo]/types"; @@ -57,6 +58,7 @@ export const ChatMessage = memo(function ChatMessage({ const [editText, setEditText] = useState(msg.content); const [vizStatus, setVizStatus] = useState<"idle" | "loading" | "error">("idle"); + const gt = useGT(); const [copied, setCopied] = useState(false); const editRef = useRef<HTMLTextAreaElement>(null); const diagramRef = useRef<HTMLDivElement>(null); @@ -148,7 +150,7 @@ export const ChatMessage = memo(function ChatMessage({ // Stable random word for the "no phase yet" gap (LLM queued but not streaming). const idleWordRef = useRef( - ["cooking", "brewing", "generating", "working on it", "writing", "penning down my thoughts", "hol' up", "let me cook", "let me cook", "hol' up"][ + [gt("cooking"), gt("brewing"), gt("generating"), gt("working on it"), gt("writing"), gt("penning down my thoughts"), gt("hol' up"), gt("let me cook"), gt("let me cook"), gt("hol' up")][ Math.floor(Math.random() * 5) ] ); @@ -171,7 +173,7 @@ export const ChatMessage = memo(function ChatMessage({ {/* Role label */} <div className={`chat-role-label ${isUser ? "chat-role-label--user" : "chat-role-label--assistant"}`}> {isUser ? ( - <span>you</span> + <span>{gt("you")}</span> ) : ( <> {isStreaming && !showThinking && <span className="chat-live-dot" aria-hidden="true" />} @@ -179,7 +181,7 @@ export const ChatMessage = memo(function ChatMessage({ <span className="chat-role-gitviz" onClick={() => { void handleViz(); }} - title="Visualize as diagram" + title={gt("Visualize as diagram")} > <span className="chat-role-gitviz-default">✦ gitask</span> <span className="chat-role-gitviz-hover">✦ gitviz</span> @@ -193,7 +195,7 @@ export const ChatMessage = memo(function ChatMessage({ {msg.safety?.blocked && ( <div className="chat-safety-block"> - ⚠ {msg.safety.reason ?? "Message blocked for safety"} + ⚠ {msg.safety.reason ?? gt("Message blocked for safety")} </div> )} @@ -204,7 +206,7 @@ export const ChatMessage = memo(function ChatMessage({ <button type="button" onClick={handleEditStart} - title="Edit & resend" + title={gt("Edit & resend")} className="chat-edit-btn" > <svg width="12" height="12" viewBox="0 0 16 16" fill="none" aria-hidden="true"> @@ -222,13 +224,13 @@ export const ChatMessage = memo(function ChatMessage({ onKeyDown={handleEditKeyDown} /> <div className="chat-edit-actions"> - <span className="chat-edit-hint">↵ send  ·  esc cancel</span> + <span className="chat-edit-hint">↵ {gt("send")}  ·  esc {gt("cancel")}</span> <div className="chat-edit-actions-btns"> <button type="button" className="chat-edit-cancel" onClick={handleEditCancel}> - Cancel + {gt("Cancel")} </button> <button type="button" className="chat-edit-save" onClick={handleEditSave}> - Send + {gt("Send")} </button> </div> </div> @@ -267,7 +269,7 @@ export const ChatMessage = memo(function ChatMessage({ {!msg.safety?.blocked && !isUser && msg.thinking && ( <details className="chat-model-thinking"> <summary className="chat-model-thinking-summary"> - {isStreaming && !msg.content ? "thinking…" : "thought process"} + {isStreaming && !msg.content ? gt("thinking…") : gt("thought process")} </summary> <div className="chat-model-thinking-content">{msg.thinking}</div> </details> @@ -319,18 +321,18 @@ export const ChatMessage = memo(function ChatMessage({ <button className="chat-msg-action-btn chat-msg-action-btn--viz-corner" onClick={() => { void handleViz(); }} - title="Visualize as diagram" + title={gt("Visualize as diagram")} disabled={vizStatus === "loading"} > - {vizStatus === "loading" ? "viz..." : "viz"} + {vizStatus === "loading" ? gt("viz...") : gt("viz")} </button> </div> )} {!msg.safety?.blocked && !isUser && !isStreaming && ( <div className="chat-msg-actions"> - <button className="chat-msg-action-btn" onClick={handleCopy} title="Copy message"> - {copied ? "copied" : "copy"} + <button className="chat-msg-action-btn" onClick={handleCopy} title={gt("Copy message")}> + {copied ? gt("copied") : gt("copy")} </button> </div> )} @@ -339,11 +341,11 @@ export const ChatMessage = memo(function ChatMessage({ {!isUser && msg.diagramStatus === "loading" && ( <div className="diagram-status"> <div className="diagram-status-spinner" /> - <span className="diagram-status-text">generating diagram...</span> + <span className="diagram-status-text">{gt("generating diagram...")}</span> </div> )} {!isUser && msg.diagramStatus === "error" && ( - <div className="diagram-error-status">diagram generation failed</div> + <div className="diagram-error-status">{gt("diagram generation failed")}</div> )} {msg.citations && msg.citations.length > 0 && ( @@ -360,7 +362,11 @@ export const ChatMessage = memo(function ChatMessage({ style={{ transform: sourcesExpanded ? "rotate(90deg)" : "rotate(0deg)" }} aria-hidden="true" >▸</span> - {sourcesExpanded ? "hide sources" : `${msg.citations.length} source${msg.citations.length !== 1 ? "s" : ""}`} + {sourcesExpanded + ? gt("hide sources") + : msg.citations.length === 1 + ? gt("{count} source", { count: msg.citations.length }) + : gt("{count} sources", { count: msg.citations.length })} </button> {sourcesExpanded && ( <div id={sourcesPanelId} className="chat-sources-list"> @@ -396,7 +402,7 @@ export const ChatMessage = memo(function ChatMessage({ </div> )} {!isUser && vizStatus === "error" && ( - <div className="diagram-error-status">could not extract a diagram from this message</div> + <div className="diagram-error-status">{gt("could not extract a diagram from this message")}</div> )} </> ); diff --git a/src/components/chat/ChatSidebar.tsx b/src/components/chat/ChatSidebar.tsx index 95781c9..446f554 100644 --- a/src/components/chat/ChatSidebar.tsx +++ b/src/components/chat/ChatSidebar.tsx @@ -1,6 +1,7 @@ "use client"; import { useState } from "react"; +import { useGT } from "gt-next"; import AstTreeView from "@/components/AstTreeView"; import type { ChatSession } from "@/app/[owner]/[repo]/types"; import type { IndexProgress, AstNode } from "@/lib/indexer"; @@ -50,6 +51,7 @@ export function ChatSidebar({ onCancelIndexing, isCancellingIndex, }: ChatSidebarProps) { + const gt = useGT(); const [interactiveChatId, setInteractiveChatId] = useState<string | null>(null); return ( @@ -67,11 +69,11 @@ export function ChatSidebar({ <div style={{ padding: "16px", overflowY: "auto", flex: 1 }}> {/* Index status */} <div style={{ marginBottom: 16 }}> - <p style={{ fontFamily: "var(--font-mono)", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", color: "var(--text-on-dark-muted)", marginBottom: 8, margin: "0 0 8px 0" }}>Status</p> - {!isIndexed && !indexProgress && <span style={{ fontSize: "12px", color: "var(--text-on-dark-muted)" }}>Not indexed</span>} + <p style={{ fontFamily: "var(--font-mono)", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", color: "var(--text-on-dark-muted)", marginBottom: 8, margin: "0 0 8px 0" }}>{gt("Status")}</p> + {!isIndexed && !indexProgress && <span style={{ fontSize: "12px", color: "var(--text-on-dark-muted)" }}>{gt("Not indexed")}</span>} {isIndexing && ( <div> - <span style={{ fontSize: "12px", color: "#d97706", display: "block", marginBottom: 6 }}>● Indexing...</span> + <span style={{ fontSize: "12px", color: "#d97706", display: "block", marginBottom: 6 }}>● {gt("Indexing...")}</span> <div style={{ height: 4, background: "var(--bg-glass)", marginBottom: 6 }}> <div style={{ height: "100%", background: "#16a34a", width: `${progressPercent}%`, transition: "width 0.3s" }} /> </div> @@ -80,7 +82,7 @@ export function ChatSidebar({ </span> {timeRemaining && ( <span style={{ fontFamily: "var(--font-mono)", fontSize: "10px", color: "var(--text-on-dark-muted)", display: "block", marginTop: 4 }}> - {timeRemaining} remaining + {gt("{time} remaining", { time: timeRemaining })} </span> )} {typeof Notification !== "undefined" && notificationPermission === "default" && ( @@ -88,9 +90,9 @@ export function ChatSidebar({ type="button" style={{ marginTop: 8, fontSize: "10px", padding: "2px 6px", background: "transparent", border: "1px solid var(--border-dark)", color: "var(--text-on-dark-muted)", cursor: "pointer", fontFamily: "var(--font-mono)" }} onClick={onRequestNotification} - title="Get a system notification when indexing completes" + title={gt("Get a system notification when indexing completes")} > - Notify when ready + {gt("Notify when ready")} </button> )} {onCancelIndexing && ( @@ -99,24 +101,24 @@ export function ChatSidebar({ style={{ marginTop: 8, fontSize: "10px", padding: "2px 6px", background: "transparent", border: "1px solid var(--border-dark)", color: "var(--text-on-dark-muted)", cursor: isCancellingIndex ? "default" : "pointer", fontFamily: "var(--font-mono)", display: "block" }} onClick={onCancelIndexing} disabled={isCancellingIndex} - title="Stop indexing and return home" + title={gt("Stop indexing and return home")} > - {isCancellingIndex ? "Cancelling…" : "Cancel indexing"} + {isCancellingIndex ? gt("Cancelling…") : gt("Cancel indexing")} </button> )} </div> )} - {isIndexed && <span style={{ fontSize: "12px", color: "#16a34a" }}>● Indexed</span>} - {indexingFailed && <span style={{ fontSize: "12px", color: "#dc2626" }}>● Error</span>} + {isIndexed && <span style={{ fontSize: "12px", color: "#16a34a" }}>● {gt("Indexed")}</span>} + {indexingFailed && <span style={{ fontSize: "12px", color: "#dc2626" }}>● {gt("Error")}</span>} </div> {/* Stats */} {isIndexed && ( <div style={{ marginBottom: 16 }}> - <p style={{ fontFamily: "var(--font-mono)", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", color: "var(--text-on-dark-muted)", marginBottom: 8, margin: "0 0 8px 0" }}>Index</p> + <p style={{ fontFamily: "var(--font-mono)", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", color: "var(--text-on-dark-muted)", marginBottom: 8, margin: "0 0 8px 0" }}>{gt("Index")}</p> <div style={{ display: "flex", flexDirection: "column", gap: 6 }}> <div style={{ display: "flex", justifyContent: "space-between" }}> - <span style={{ fontSize: "11px", color: "var(--text-on-dark-muted)" }}>Chunks</span> + <span style={{ fontSize: "11px", color: "var(--text-on-dark-muted)" }}>{gt("Chunks")}</span> <span style={{ fontFamily: "var(--font-mono)", fontSize: "11px", color: "var(--text-on-dark-secondary)" }}>{chunkCount}</span> </div> </div> @@ -126,7 +128,7 @@ export function ChatSidebar({ {/* Chat sessions list */} {orderedChatSessions.length > 0 && ( <div> - <p style={{ fontFamily: "var(--font-mono)", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", color: "var(--text-on-dark-muted)", marginBottom: 8, margin: "0 0 8px 0" }}>Chats</p> + <p style={{ fontFamily: "var(--font-mono)", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", color: "var(--text-on-dark-muted)", marginBottom: 8, margin: "0 0 8px 0" }}>{gt("Chats")}</p> <div style={{ display: "flex", flexDirection: "column", gap: 4 }}> {orderedChatSessions.map((session) => { const isActive = activeChatId === session.chat_id; @@ -173,8 +175,8 @@ export function ChatSidebar({ event.stopPropagation(); onDeleteChat(session.chat_id); }} - aria-label={`Delete ${session.title}`} - title={`Delete ${session.title}`} + aria-label={gt("Delete {title}", { title: session.title })} + title={gt("Delete {title}", { title: session.title })} style={{ flexShrink: 0, padding: "4px 8px", @@ -191,7 +193,7 @@ export function ChatSidebar({ transition: "opacity 0.16s ease, background 0.16s ease, color 0.16s ease", }} > - Del + {gt("Del")} </button> </div> ); @@ -200,7 +202,7 @@ export function ChatSidebar({ onClick={onCreateChat} style={{ textAlign: "left", background: "transparent", border: "1px solid var(--border-dark)", padding: "6px 8px", cursor: "pointer", color: "var(--text-on-dark-muted)", fontSize: "11px", fontFamily: "var(--font-mono)" }} > - + New chat + + {gt("New chat")} </button> </div> </div> @@ -209,7 +211,7 @@ export function ChatSidebar({ {/* AST tree during indexing */} {isIndexing && astNodes.length > 0 && ( <div style={{ marginTop: 16 }}> - <p style={{ fontFamily: "var(--font-mono)", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", color: "var(--text-on-dark-muted)", marginBottom: 8, margin: "0 0 8px 0" }}>Files</p> + <p style={{ fontFamily: "var(--font-mono)", fontSize: "10px", textTransform: "uppercase", letterSpacing: "0.08em", color: "var(--text-on-dark-muted)", marginBottom: 8, margin: "0 0 8px 0" }}>{gt("Files")}</p> <AstTreeView astNodes={astNodes} textChunkCounts={textChunkCounts} /> </div> )} diff --git a/src/components/chat/ContextDrawer.tsx b/src/components/chat/ContextDrawer.tsx index f687ef5..20b88e3 100644 --- a/src/components/chat/ContextDrawer.tsx +++ b/src/components/chat/ContextDrawer.tsx @@ -1,5 +1,7 @@ "use client"; +import { useGT } from "gt-next"; + import type { ContextChunk } from "@/app/[owner]/[repo]/types"; interface ContextMeta { @@ -19,6 +21,8 @@ interface ContextDrawerProps { } export function ContextDrawer({ contextChunks, contextMeta, isMobile, onClose }: ContextDrawerProps) { + const gt = useGT(); + return ( <div style={{ maxHeight: 320, overflow: "auto", borderTop: "2px solid var(--border-dark)", background: "var(--bg-app)", padding: "16px 24px", flexShrink: 0, @@ -26,13 +30,23 @@ export function ContextDrawer({ contextChunks, contextMeta, isMobile, onClose }: }}> <div style={{ display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 12 }}> <h3 style={{ fontSize: "12px", fontWeight: 700, color: "var(--text-on-dark-muted)", textTransform: "uppercase", letterSpacing: "0.08em", fontFamily: "var(--font-display)", margin: 0 }}> - Retrieved Context ({contextChunks.length} chunks) + {gt("Retrieved Context ({count} chunks)", { count: contextChunks.length })} </h3> <button onClick={onClose} style={{ background: "transparent", border: "none", color: "var(--text-on-dark-muted)", cursor: "pointer", fontSize: "16px" }}>✕</button> </div> {contextMeta && contextMeta.compactionStage !== "none" && ( <div style={{ fontSize: "11px", color: "#d97706", background: "rgba(217,119,6,0.08)", padding: "8px 10px", border: "2px solid rgba(217,119,6,0.3)", marginBottom: "8px" }}> - ⚠ LLM context compacted ({contextMeta.compactionStage}): {contextMeta.totalChars} chars / ~{contextMeta.estimatedTokens.toLocaleString()} tokens → {contextMeta.maxChars.toLocaleString()} chars / {contextMeta.maxTokens.toLocaleString()} token budget + ⚠{" "} + {gt( + "LLM context compacted ({stage}): {chars} chars / ~{tokens} tokens → {maxChars} chars / {maxTokens} token budget", + { + stage: contextMeta.compactionStage, + chars: contextMeta.totalChars, + tokens: contextMeta.estimatedTokens.toLocaleString(), + maxChars: contextMeta.maxChars.toLocaleString(), + maxTokens: contextMeta.maxTokens.toLocaleString(), + } + )} </div> )} {contextChunks.map((chunk, i) => ( diff --git a/src/components/chat/EmptyChat.tsx b/src/components/chat/EmptyChat.tsx index d779fa4..52d5f58 100644 --- a/src/components/chat/EmptyChat.tsx +++ b/src/components/chat/EmptyChat.tsx @@ -1,11 +1,6 @@ "use client"; -const STARTER_SUGGESTIONS = [ - "What does this project do?", - "Walk me through the main data flow", - "What are the key entry points?", - "How is error handling structured?", -]; +import { T, useGT } from "gt-next"; interface EmptyChatProps { owner: string; @@ -14,6 +9,14 @@ interface EmptyChatProps { } export function EmptyChat({ owner, repo, onSelectSuggestion }: EmptyChatProps) { + const gt = useGT(); + const starterSuggestions = [ + gt("What does this project do?"), + gt("Walk me through the main data flow"), + gt("What are the key entry points?"), + gt("How is error handling structured?"), + ]; + return ( <div style={{ display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", flex: 1, gap: 24, textAlign: "center" }}> <div> @@ -21,11 +24,11 @@ export function EmptyChat({ owner, repo, onSelectSuggestion }: EmptyChatProps) { {owner}/{repo} </span> <h2 style={{ fontFamily: "var(--font-display)", fontWeight: 800, fontSize: "clamp(1.3rem, 3vw, 2rem)", color: "var(--text-on-dark)", letterSpacing: "-0.02em", margin: 0 }}> - What do you want to know? + <T>What do you want to know?</T> </h2> </div> <div style={{ display: "flex", flexWrap: "wrap", gap: 10, justifyContent: "center", maxWidth: 560 }}> - {STARTER_SUGGESTIONS.map(suggestion => ( + {starterSuggestions.map(suggestion => ( <button key={suggestion} onClick={() => onSelectSuggestion(suggestion)} diff --git a/src/components/chat/FileBrowser.tsx b/src/components/chat/FileBrowser.tsx index 689674f..a06a168 100644 --- a/src/components/chat/FileBrowser.tsx +++ b/src/components/chat/FileBrowser.tsx @@ -1,6 +1,7 @@ "use client"; import { useState, useRef, useCallback } from "react"; +import { useGT } from "gt-next"; import AstTreeView from "@/components/AstTreeView"; import IndexBrowser from "@/components/IndexBrowser"; import type { AstNode } from "@/lib/indexer"; @@ -25,6 +26,7 @@ export function FileBrowser({ onTabChange, onClose, }: FileBrowserProps) { + const gt = useGT(); const [width, setWidth] = useState(400); const isDragging = useRef(false); const startX = useRef(0); @@ -70,7 +72,7 @@ export function FileBrowser({ cursor: "col-resize", zIndex: 10, background: "transparent", }} - title="Drag to resize" + title={gt("Drag to resize")} /> )} @@ -80,13 +82,13 @@ export function FileBrowser({ onClick={() => onTabChange("tree")} style={{ fontSize: "11px", fontFamily: "var(--font-mono)", background: "transparent", border: "none", cursor: "pointer", color: fileBrowserTab === "tree" ? "#16a34a" : "var(--text-on-dark-muted)", borderBottom: fileBrowserTab === "tree" ? "2px solid #16a34a" : "2px solid transparent", padding: "4px 0" }} > - File Tree + {gt("File Tree")} </button> <button onClick={() => onTabChange("chunks")} style={{ fontSize: "11px", fontFamily: "var(--font-mono)", background: "transparent", border: "none", cursor: "pointer", color: fileBrowserTab === "chunks" ? "#16a34a" : "var(--text-on-dark-muted)", borderBottom: fileBrowserTab === "chunks" ? "2px solid #16a34a" : "2px solid transparent", padding: "4px 0" }} > - Index + {gt("Index")} </button> </div> <button diff --git a/src/components/chat/IndexingOverlay.tsx b/src/components/chat/IndexingOverlay.tsx index 5c94be9..1c450d9 100644 --- a/src/components/chat/IndexingOverlay.tsx +++ b/src/components/chat/IndexingOverlay.tsx @@ -1,5 +1,10 @@ "use client"; +import { T, useGT } from "gt-next"; + +/** The string-translation function returned by `useGT()`. */ +type GTFunction = ReturnType<typeof useGT>; + import { useState } from "react"; import type { IndexProgress } from "@/lib/indexer"; @@ -19,7 +24,7 @@ function formatBytes(bytes: number): string { return `${(bytes / (1024 * 1024)).toFixed(1)} MB`; } -function friendlyErrorMessage(raw: string): string { +function friendlyErrorMessage(raw: string, gt: GTFunction): string { const lower = raw.toLowerCase(); const isRateLimit = lower.includes("retrydelay") || @@ -37,9 +42,12 @@ function friendlyErrorMessage(raw: string): string { const delay = delayMatch?.[1]; if (delay) { - return `API rate limit hit. too many requests at once. retry in ${delay} and it should work fine.`; + return gt( + "API rate limit hit. too many requests at once. retry in {delay} and it should work fine.", + { delay } + ); } - return "API rate limit hit. too many requests at once. wait a moment and retry."; + return gt("API rate limit hit. too many requests at once. wait a moment and retry."); } // ── Doodle SVGs ────────────────────────────────────────────────────────────── @@ -189,16 +197,17 @@ export function IndexingOverlay({ isError, isCancelling, }: IndexingOverlayProps) { + const gt = useGT(); const [showDetails, setShowDetails] = useState(false); if (isError && indexProgress?.message) { return ( <div style={{ flex: 1, display: "flex", alignItems: "center", justifyContent: "center", padding: 24 }}> <div style={{ border: "2px solid #dc2626", padding: "24px 28px", background: "var(--bg-card-dark)", maxWidth: 420, width: "100%", boxShadow: "4px 4px 0 #dc2626" }}> - <p style={{ fontWeight: 700, color: "#dc2626", fontFamily: "var(--font-display)", margin: "0 0 8px 0" }}>Something went wrong</p> - <p style={{ fontSize: "13px", color: "var(--text-on-dark-secondary)", marginBottom: 16, lineHeight: 1.5 }}>{friendlyErrorMessage(indexProgress.message)}</p> + <p style={{ fontWeight: 700, color: "#dc2626", fontFamily: "var(--font-display)", margin: "0 0 8px 0" }}><T>Something went wrong</T></p> + <p style={{ fontSize: "13px", color: "var(--text-on-dark-secondary)", marginBottom: 16, lineHeight: 1.5 }}>{friendlyErrorMessage(indexProgress.message, gt)}</p> <button onClick={onRetry} style={{ background: "#0a0a0a", color: "#f5f5f0", border: "2px solid #f5f5f0", padding: "10px 20px", cursor: "pointer", fontWeight: 700, fontSize: "13px" }}> - Retry + {gt("Retry")} </button> </div> </div> @@ -224,9 +233,9 @@ export function IndexingOverlay({ fontFamily: "var(--font-mono)", letterSpacing: "0.02em", }} - title="Stop indexing and return home" + title={gt("Stop indexing and return home")} > - {isCancelling ? "Cancelling…" : "Cancel indexing"} + {isCancelling ? gt("Cancelling…") : gt("Cancel indexing")} </button> ) : null; @@ -236,7 +245,7 @@ export function IndexingOverlay({ <div style={{ border: "2px solid var(--border-dark)", padding: "28px 32px", background: "var(--bg-card-dark)", maxWidth: 420, width: "100%", boxShadow: "var(--shadow-card-dark)" }}> <div style={{ display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 16 }}> <span style={{ fontFamily: "var(--font-display)", fontWeight: 700, fontSize: "0.9rem", textTransform: "uppercase", letterSpacing: "0.05em", color: "var(--text-on-dark)" }}> - Indexing + {gt("Indexing")} </span> <span style={{ fontFamily: "var(--font-mono)", fontWeight: 700, fontSize: "1.1rem", color: "#16a34a" }}> {progressPercent}% @@ -246,7 +255,7 @@ export function IndexingOverlay({ <div style={{ height: "100%", background: "#16a34a", width: `${progressPercent}%`, transition: "width 0.3s" }} /> </div> <p style={{ fontSize: "0.85rem", color: "var(--text-on-dark-secondary)", marginBottom: 0 }}> - {isCancelling ? "Stopping…" : (indexProgress?.message ?? "Starting...")} + {isCancelling ? gt("Stopping…") : (indexProgress?.message ?? gt("Starting..."))} </p> {indexProgress?.estimatedSizeBytes != null && indexProgress.estimatedSizeBytes > 0 && ( <p style={{ fontFamily: "var(--font-mono)", fontSize: "0.72rem", color: "var(--text-on-dark-muted)", margin: "4px 0 0 0" }}> @@ -255,7 +264,7 @@ export function IndexingOverlay({ )} {timeRemaining && !isCancelling && ( <p style={{ fontFamily: "var(--font-mono)", fontSize: "0.72rem", color: "var(--text-on-dark-muted)", margin: "4px 0 0 0" }}> - {timeRemaining} remaining + {gt("{time} remaining", { time: timeRemaining })} </p> )} {cancelButton} @@ -368,7 +377,7 @@ export function IndexingOverlay({ letterSpacing: "-0.01em", }} > - Sit back & relax + <T>Sit back & relax</T> </span> <BouncingDots /> </div> @@ -382,12 +391,14 @@ export function IndexingOverlay({ marginBottom: 20, }} > - indexing your repo. big codebases can take a few minutes. - <br /> - <span style={{ color: "#16a34a", fontWeight: 600 }}> - you can leave this tab in the background - </span>{" "} - and come back when it's done! + <T> + indexing your repo. big codebases can take a few minutes. + <br /> + <span style={{ color: "#16a34a", fontWeight: 600 }}> + you can leave this tab in the background + </span>{" "} + and come back when it's done! + </T> </p> {/* Progress bar (always visible, no label) */} @@ -437,14 +448,16 @@ export function IndexingOverlay({ > <path d="M3 2 L7 5 L3 8" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" /> </svg> - {showDetails ? "hide details" : `${progressPercent}% · show details`} + {showDetails + ? gt("hide details") + : gt("{percent}% · show details", { percent: progressPercent })} </button> {/* Expandable details */} {showDetails && ( <div style={{ marginTop: 10, display: "flex", flexDirection: "column", gap: 4 }}> <p style={{ fontSize: "0.78rem", color: "var(--text-on-dark-secondary)", margin: 0, lineHeight: 1.5, fontFamily: "var(--font-mono)" }}> - {isCancelling ? "Stopping…" : (indexProgress?.message ?? "Starting…")} + {isCancelling ? gt("Stopping…") : (indexProgress?.message ?? gt("Starting…"))} </p> <div style={{ display: "flex", gap: 14, flexWrap: "wrap" }}> {indexProgress?.estimatedSizeBytes != null && indexProgress.estimatedSizeBytes > 0 && ( @@ -454,7 +467,7 @@ export function IndexingOverlay({ )} {timeRemaining && !isCancelling && ( <span style={{ fontFamily: "var(--font-mono)", fontSize: "0.68rem", color: "var(--text-on-dark-muted)" }}> - {timeRemaining} remaining + {gt("{time} remaining", { time: timeRemaining })} </span> )} </div> diff --git a/src/components/chat/RepoHeader.tsx b/src/components/chat/RepoHeader.tsx index be34e90..5438e12 100644 --- a/src/components/chat/RepoHeader.tsx +++ b/src/components/chat/RepoHeader.tsx @@ -1,6 +1,7 @@ "use client"; import { useRef, useState, useEffect } from "react"; +import { useGT, useMessages } from "gt-next"; import { ModelSettings } from "@/components/ModelSettings"; import { ThemeToggle } from "@/components/ThemeToggle"; import { agentModeBlockedReason, LLM_CONFIG_CHANGED_EVENT, type LLMStatus } from "@/lib/llm"; @@ -8,11 +9,12 @@ import type { AnswerMode, Message } from "@/app/[owner]/[repo]/types"; const PROJECT_REPO_URL = "https://github.com/FloareDor/gitask"; -const ANSWER_MODES: Array<{ value: AnswerMode; label: string; title: string }> = [ - { value: "rag", label: "rag", title: "One hybrid search, then answer" }, - { value: "agent", label: "agent", title: "Investigate with tools, then answer (Gemini, your key)" }, - // "auto" is deliberately not offered yet — it still answers as rag, and a - // button that does nothing is worse than no button. Add it back with the router. +// "auto" is deliberately not offered yet — it still answers as rag, and a +// button that does nothing is worse than no button. Add it back with the router. +// `label` is the technical mode id and stays untranslated; `title` is prose. +const ANSWER_MODE_VALUES: Array<{ value: AnswerMode; label: string }> = [ + { value: "rag", label: "rag" }, + { value: "agent", label: "agent" }, ]; const overflowItemStyle: React.CSSProperties = { @@ -83,6 +85,15 @@ export function RepoHeader({ onShowDiagram, onAnswerModeChange, }: RepoHeaderProps) { + const gt = useGT(); + const m = useMessages(); + const answerModes = ANSWER_MODE_VALUES.map((mode) => ({ + ...mode, + title: + mode.value === "agent" + ? gt("Investigate with tools, then answer (Gemini, your key)") + : gt("One hybrid search, then answer"), + })); const overflowRef = useRef<HTMLDivElement>(null); const [showOverflow, setShowOverflow] = useState(false); @@ -126,7 +137,7 @@ export function RepoHeader({ <button onClick={onExpandSidebar} style={{ background: "transparent", border: "none", color: "var(--text-on-dark-muted)", cursor: "pointer", fontSize: "14px", padding: "4px 6px", flexShrink: 0 }} - title="Expand sidebar" + title={gt("Expand sidebar")} > → </button> @@ -143,22 +154,22 @@ export function RepoHeader({ className="chat-nav-stale" style={{ fontFamily: "var(--font-mono)", fontSize: "11px", color: "#d97706", padding: "2px 8px", border: "1px solid #d97706", background: "rgba(217,119,6,0.08)", cursor: "pointer", flexShrink: 0 }} onClick={onReindex} - title="Repository changed on GitHub. Click to re-index." + title={gt("Repository changed on GitHub. Click to re-index.")} > - stale — re-index + {gt("stale — re-index")} </span> )} </div> <div style={{ display: "flex", alignItems: "center", gap: 10, flexShrink: 0 }}> {isIndexed && ( - <div className="mode-switch" role="group" aria-label="Answer mode"> - {ANSWER_MODES.map(({ value, label, title }) => { + <div className="mode-switch" role="group" aria-label={gt("Answer mode")}> + {answerModes.map(({ value, label, title }) => { const blocked = value === "agent" ? agentBlocked : null; return ( <button key={value} type="button" - title={blocked ?? title} + title={blocked ? m(blocked) : title} disabled={isGenerating || blocked !== null} aria-pressed={answerMode === value} className={`mode-switch-btn${answerMode === value ? " mode-switch-btn--active" : ""}`} @@ -173,15 +184,15 @@ export function RepoHeader({ <div style={{ width: 8, height: 8, borderRadius: "50%", flexShrink: 0, background: llmStatus === "ready" ? "#16a34a" : llmStatus === "generating" ? "#d97706" : llmStatus === "loading" ? "#3b82f6" : "var(--text-on-dark-muted)", - }} className={llmStatus === "loading" ? "pulse" : undefined} title={`LLM: ${llmStatus}`} /> + }} className={llmStatus === "loading" ? "pulse" : undefined} title={gt("LLM: {status}", { status: llmStatus })} /> <ModelSettings /> <ThemeToggle /> <div ref={overflowRef} style={{ position: "relative" }}> <button style={{ fontSize: "16px", padding: "4px 10px", lineHeight: 1, background: "transparent", border: "1px solid var(--border-dark)", color: "var(--text-on-dark-secondary)", cursor: "pointer" }} onClick={() => setShowOverflow(v => !v)} - title="More options" - aria-label="More options" + title={gt("More options")} + aria-label={gt("More options")} > ⋯ </button> @@ -194,24 +205,24 @@ export function RepoHeader({ zIndex: 30, minWidth: "200px", }}> <button style={overflowItemStyle} onClick={() => { onToggleTokenInput(); setShowOverflow(false); }}> - GH Token + {gt("GH Token")} </button> {isIndexed && ( <button style={overflowItemStyle} onClick={() => { onToggleFileBrowser(); setShowOverflow(false); }}> - {fileBrowserOpen ? "Hide files" : "Browse files"} + {fileBrowserOpen ? gt("Hide files") : gt("Browse files")} </button> )} {isIndexed && ( <button style={overflowItemStyle} onClick={() => { onToggleContext(); setShowOverflow(false); }}> - {showContext ? "Hide context" : "View context"} + {showContext ? gt("Hide context") : gt("View context")} </button> )} <button style={{ ...overflowItemStyle, color: coveEnabled ? "#16a34a" : "var(--text-on-dark)" }} onClick={onToggleCove} - title="Chain-of-Verification (adds ~2-4s latency)" + title={gt("Chain-of-Verification (adds ~2-4s latency)")} > - CoVE {coveEnabled ? "on" : "off"} + CoVE {coveEnabled ? gt("on") : gt("off")} </button> <button style={{ @@ -221,32 +232,32 @@ export function RepoHeader({ cursor: isLocalProvider ? "default" : "pointer", }} onClick={isLocalProvider ? undefined : onToggleQueryExpansion} - title={isLocalProvider ? "not available with local model" : "expand each query into multiple variants for broader retrieval"} + title={isLocalProvider ? gt("not available with local model") : gt("expand each query into multiple variants for broader retrieval")} > - multi-query {isLocalProvider ? "—" : queryExpansionEnabled ? "on" : "off"} + multi-query {isLocalProvider ? "—" : queryExpansionEnabled ? gt("on") : gt("off")} </button> {isIndexed && ( <button style={overflowItemStyle} onClick={() => { onReindex(); setShowOverflow(false); }}> - Re-index + {gt("Re-index")} </button> )} {messages.length > 0 && ( <button style={overflowItemStyle} onClick={() => { onClearChat(); setShowOverflow(false); }} disabled={isGenerating}> - Clear chat + {gt("Clear chat")} </button> )} <div style={{ height: "1px", background: "var(--border-dark)", margin: "4px 0" }} /> {owner && repo && ( <button style={{ ...overflowItemStyle, color: "#dc2626" }} onClick={() => { onDeleteEmbeddings(); setShowOverflow(false); }}> - Delete embeddings + {gt("Delete embeddings")} </button> )} <div style={{ height: "1px", background: "var(--border-dark)", margin: "4px 0" }} /> <a href="/metrics" style={{ ...overflowItemStyle, textDecoration: "none", color: "var(--text-on-dark-secondary)", display: "flex" }}> - Metrics + {gt("Metrics")} </a> <a href={PROJECT_REPO_URL} target="_blank" rel="noopener noreferrer" style={{ ...overflowItemStyle, textDecoration: "none", color: "var(--text-on-dark-secondary)", display: "flex" }}> - Star on GitHub + {gt("Star on GitHub")} </a> </div> )} @@ -257,7 +268,7 @@ export function RepoHeader({ onClick={onToggleFileBrowser} style={{ padding: "6px 12px", border: "2px solid var(--border-dark)", background: "transparent", color: "var(--text-on-dark-secondary)", cursor: "pointer", fontSize: "12px", fontFamily: "var(--font-mono)" }} > - {fileBrowserOpen ? "Hide files" : "Browse files"} + {fileBrowserOpen ? gt("Hide files") : gt("Browse files")} </button> )} </div> diff --git a/src/components/chat/TokenInput.tsx b/src/components/chat/TokenInput.tsx index 63ac7a1..4ed7bd1 100644 --- a/src/components/chat/TokenInput.tsx +++ b/src/components/chat/TokenInput.tsx @@ -1,5 +1,7 @@ "use client"; +import { T, useGT } from "gt-next"; + interface TokenInputProps { tokenDraft: string; tokenChanged: boolean; @@ -8,13 +10,15 @@ interface TokenInputProps { } export function TokenInput({ tokenDraft, tokenChanged, onChange, onApply }: TokenInputProps) { + const gt = useGT(); + return ( <div style={{ padding: "8px 20px 10px", borderBottom: "2px solid var(--border-dark)", background: "var(--bg-app)", flexShrink: 0 }}> <div style={{ display: "flex", gap: "8px" }}> <input className="input" type="password" - placeholder="GitHub Personal Access Token (required for private repos)" + placeholder={gt("GitHub Personal Access Token (required for private repos)")} value={tokenDraft} onChange={(e) => onChange(e.target.value)} onKeyDown={(e) => { @@ -31,18 +35,18 @@ export function TokenInput({ tokenDraft, tokenChanged, onChange, onApply }: Toke onClick={onApply} disabled={!tokenChanged} > - Apply + {gt("Apply")} </button> </div> <div style={{ marginTop: "5px", fontSize: "11px", color: "var(--text-on-dark-secondary)" }}> - Don't have one?{" "} + <T>Don't have one?</T>{" "} <a href="https://github.com/settings/tokens/new?scopes=repo&description=GitAsk" target="_blank" rel="noopener noreferrer" style={{ color: "var(--text-on-dark-secondary)", textDecoration: "underline", textUnderlineOffset: "2px" }} > - Get a GitHub token + {gt("Get a GitHub token")} </a> </div> </div> diff --git a/src/lib/llm.ts b/src/lib/llm.ts index cd37951..e8e1ab1 100644 --- a/src/lib/llm.ts +++ b/src/lib/llm.ts @@ -5,6 +5,7 @@ * Cloud BYOK keys can be stored encrypted (vault) or plain local (fallback). */ +import { msg as gtMsg } from "gt-next"; import { GoogleGenerativeAI } from "@google/generative-ai"; import { getGeminiVault } from "./gemini-vault"; import { getGroqVault } from "./groq-vault"; @@ -54,7 +55,7 @@ export interface ChatMessage { content: string; } -const VAULT_LOCKED_MSG = "Your API key is locked. Open LLM Settings and unlock it to continue."; +const VAULT_LOCKED_MSG = gtMsg("Your API key is locked. Open LLM Settings and unlock it to continue."); /** * Fired when LLM settings change. Anything whose enabled state depends on the @@ -87,13 +88,13 @@ function normalizeGeminiError(err: unknown): Error { lower.includes("unauthorized") ) { return new Error( - "Gemini API key is invalid. Open LLM Settings and update your key." + gtMsg("Gemini API key is invalid. Open LLM Settings and update your key.") ); } if (lower.includes("permission") || lower.includes("forbidden")) { return new Error( - "Gemini access denied. Check your API key in LLM Settings." + gtMsg("Gemini access denied. Check your API key in LLM Settings.") ); } @@ -115,7 +116,7 @@ function normalizeGroqError(err: unknown): Error { lower.includes("invalid_api_key") ) { return new Error( - "Groq API key is invalid. Open LLM Settings and update your key." + gtMsg("Groq API key is invalid. Open LLM Settings and update your key.") ); } @@ -125,13 +126,13 @@ function normalizeGroqError(err: unknown): Error { lower.includes("too many requests") ) { return new Error( - "Groq rate limit hit. Wait a moment and try again." + gtMsg("Groq rate limit hit. Wait a moment and try again.") ); } if (lower.includes("permission") || lower.includes("forbidden")) { return new Error( - "Groq access denied. Check your API key in LLM Settings." + gtMsg("Groq access denied. Check your API key in LLM Settings.") ); } @@ -148,11 +149,11 @@ function normalizeMLCInitError(err: unknown): Error { lower.includes("adapter") ) { return new Error( - "Local model isn't supported in this browser. Switch to Gemini or Groq in LLM Settings." + gtMsg("Local model isn't supported in this browser. Switch to Gemini or Groq in LLM Settings.") ); } return new Error( - `Local model failed to load: ${message}. Try switching to Gemini or Groq in LLM Settings.` + gtMsg("Local model failed to load: {error}. Try switching to Gemini or Groq in LLM Settings.", { error: message }) ); } @@ -862,7 +863,7 @@ function geminiKeyAccess(): { ok: true; scope: GeminiKeyScope } | { ok: false; r if (storageMode === "local") { const localKey = getGeminiLocalApiKey(); if (!localKey) { - return { ok: false, reason: "Add your Gemini API key in LLM Settings to use agent mode." }; + return { ok: false, reason: gtMsg("Add your Gemini API key in LLM Settings to use agent mode.") }; } return { ok: true, scope: (fn) => fn(localKey) }; } @@ -873,7 +874,7 @@ function geminiKeyAccess(): { ok: true; scope: GeminiKeyScope } | { ok: false; r ok: false, reason: vault?.getState() === "locked" ? VAULT_LOCKED_MSG - : "Agent mode needs your own Gemini key. Add one in LLM Settings.", + : gtMsg("Agent mode needs your own Gemini key. Add one in LLM Settings."), }; } // withKey keeps the decrypted key inside the callback — never store it. diff --git a/src/loadTranslations.ts b/src/loadTranslations.ts new file mode 100644 index 0000000..ab32617 --- /dev/null +++ b/src/loadTranslations.ts @@ -0,0 +1,16 @@ +/** + * Loads the build-time translation file for a locale. + * + * The files under `public/_gt/` are generated by the `gt` CLI + * (`npx gt generate` for empty templates, `npx gt translate` for real + * translations) and are gitignored. Until they exist, this resolves to `{}` + * and the app renders in the source locale. + */ +export default async function loadTranslations(locale: string) { + try { + const translations = await import(`../public/_gt/${locale}.json`); + return translations.default; + } catch { + return {}; + } +}