-
-
Notifications
You must be signed in to change notification settings - Fork 146
package.json をなるべく新しいもので動かしたい #476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
claude-opus-4.1 モデルを追加
Create claude-dispatch.yml
|
@Tand0 is attempting to deploy a commit to the tegnike's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Caution Review failedThe pull request is closed. Walkthrough大規模な依存関係のバージョンアップ、ESLint 設定の移行、複数のテスト追加、Vercel AI 周りの型/ストリーム処理変更(プレーンテキストストリーム対応)、一部 API の公開およびインポート経路整理が行われています。 Changes
Sequence Diagram(s)sequenceDiagram
participant Client as クライアント
participant App as アプリ(StreamReader)
participant VercelAI as Vercel AI (外部)
rect rgba(60,130,200,0.08)
Note over Client,App: リクエスト送信 → ストリーミング応答受信
end
Client->>App: /api/ai/vercel POST (stream)
App->>VercelAI: リクエスト(モデル・メッセージ)
VercelAI-->>App: Streaming Response (chunks, Content-Type)
alt Content-Type: text/plain
App->>App: TextDecoder でチャンクをデコード
App->>Client: 各チャンクを即時エンキュー(逐次配信)
Note right of App: バッファは最小化、最終フラッシュで残りを送出
else Content-Type: text/event-stream / structured
App->>App: バッファしてイベント境界で解析
App->>Client: 構造化イベントごとに整形・エンキュー
end
App->>Client: ストリーム完了通知 / 最終チャンク送出
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/claude-dispatch.ymlpackage.json
🔇 Additional comments (1)
package.json (1)
48-48: canvas v3.2.0 は最新の安定版で、セキュリティ上の既知の脆弱性はありません。Web 検索により v3.2.0 が最新の安定版であること、および Snyk と npm アドバイザリーに既知の脆弱性が報告されていないことが確認されました。また、学習情報から Node.js 環境用に canvas がモック化されていることが示されており、CI/CD 環境での互換性の対応がなされています。
| "@ai-sdk/anthropic": "^3.0.2", | ||
| "@ai-sdk/azure": "^3.0.2", | ||
| "@ai-sdk/cohere": "^3.0.2", | ||
| "@ai-sdk/deepseek": "^2.0.2", | ||
| "@ai-sdk/google": "^3.0.2", | ||
| "@ai-sdk/mistral": "^3.0.2", | ||
| "@ai-sdk/openai": "^3.0.2", | ||
| "@ai-sdk/openai-compatible": "^2.0.2", | ||
| "@ai-sdk/xai": "^3.0.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
# First, verify the package.json content at the specified lines
head -35 package.json | tail -15Repository: tegnike/aituber-kit
Length of output: 597
🏁 Script executed:
# Search for @ai-sdk imports and usage
rg -n --type=ts --type=tsx --type=js --type=jsx -C3 "from ['\"]@ai-sdk/"Repository: tegnike/aituber-kit
Length of output: 90
🏁 Script executed:
# Also search for require statements for @ai-sdk
rg -n --type=ts --type=tsx --type=js --type=jsx -C3 "require\(['\"]@ai-sdk/"Repository: tegnike/aituber-kit
Length of output: 90
🏁 Script executed:
# Search for @ai-sdk imports without type specification
rg "@ai-sdk/" -C3 --max-count=50Repository: tegnike/aituber-kit
Length of output: 12160
🏁 Script executed:
# Find all TypeScript/JavaScript files in the project
find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.tsx" -o -name "*.jsx" \) | head -20Repository: tegnike/aituber-kit
Length of output: 834
🏁 Script executed:
# Check the repository structure
ls -laRepository: tegnike/aituber-kit
Length of output: 2172
🏁 Script executed:
# Check the vercelAi.ts file to see how the packages are being used
cat -n src/pages/api/services/vercelAi.ts | head -100Repository: tegnike/aituber-kit
Length of output: 3752
🏁 Script executed:
# Check convertSlide.ts as well
cat -n src/pages/api/convertSlide.ts | head -100Repository: tegnike/aituber-kit
Length of output: 5379
🏁 Script executed:
# Check if there are any tests related to vercelAi or the AI services
grep -r "vercelAi\|@ai-sdk" src/__tests__ --include="*.ts" --include="*.js" | head -20Repository: tegnike/aituber-kit
Length of output: 45
🏁 Script executed:
# Look for any migration or setup documentation
find . -type f -name "MIGRATION*" -o -name "CHANGELOG*" -o -name "*.md" | xargs grep -l "ai-sdk" 2>/dev/nullRepository: tegnike/aituber-kit
Length of output: 47
package-lock.jsonとpackage.jsonの@AI-SDK依存関係のバージョン不整合を解決してください。
package.jsonで@ai-sdk/*パッケージがv3.xにアップグレードされていますが、package-lock.jsonはv0.0.x~v1.xの古いバージョンのままです。このバージョン不整合により、npmインストール時に正確な依存関係が解決されず、実行時エラーが発生する可能性があります。
@ai-sdk/anthropic: package.json 3.0.2 / lock 0.0.48@ai-sdk/openai: package.json 3.0.2 / lock 1.2.2@ai-sdk/xai: package.json 3.0.3 / lock 1.2.16
npm installでpackage-lock.jsonを再生成し、vercelAi.ts内のstreamText、generateTextなどのAPI呼び出しとconvertSlide.ts内のgenerateObjectの呼び出しが新しいバージョンで正常に動作することを確認してください。
🤖 Prompt for AI Agents
package.json lines 21-29: the @ai-sdk/* entries were bumped to v3.x but
package-lock.json still references older 0.x/1.x versions causing
install/runtime mismatch; run npm install (or npm ci after deleting node_modules
and package-lock.json) to regenerate package-lock.json consistent with
package.json, then audit vercelAi.ts (streamText, generateText calls) and
convertSlide.ts (generateObject) for any breaking API/name/signature changes in
@ai-sdk v3 and update those calls/imports/types accordingly, run the app and
relevant tests to confirm no runtime errors and that streaming/generation
features behave as expected, and commit the updated package-lock.json alongside
any code changes.
| "@ai-sdk/anthropic": "^3.0.2", | ||
| "@ai-sdk/azure": "^3.0.2", | ||
| "@ai-sdk/cohere": "^3.0.2", | ||
| "@ai-sdk/deepseek": "^2.0.2", | ||
| "@ai-sdk/google": "^3.0.2", | ||
| "@ai-sdk/mistral": "^3.0.2", | ||
| "@ai-sdk/openai": "^3.0.2", | ||
| "@ai-sdk/openai-compatible": "^2.0.2", | ||
| "@ai-sdk/xai": "^3.0.3", | ||
| "@anthropic-ai/sdk": "^0.20.8", | ||
| "@azure/identity": "^4.5.0", | ||
| "@charcoal-ui/icons": "^2.6.0", | ||
| "@azure/identity": "^4.13.0", | ||
| "@charcoal-ui/icons": "^5.1.0", | ||
| "@ffmpeg-installer/ffmpeg": "^1.1.0", | ||
| "@google-cloud/text-to-speech": "^5.0.1", | ||
| "@google/generative-ai": "^0.11.3", | ||
| "@headlessui/react": "^2.1.2", | ||
| "@headlessui/react": "^2.2.9", | ||
| "@hello-pangea/dnd": "^18.0.1", | ||
| "@heroicons/react": "^2.1.5", | ||
| "@marp-team/marp-core": "^3.9.0", | ||
| "@marp-team/marpit": "^3.0.0", | ||
| "@openrouter/ai-sdk-provider": "^0.4.5", | ||
| "@pixiv/three-vrm": "^3.0.0", | ||
| "@supabase/supabase-js": "^2.46.2", | ||
| "@marp-team/marpit": "^3.2.0", | ||
| "@openrouter/ai-sdk-provider": "^0.4.6", | ||
| "@pixiv/three-vrm": "^3.4.4", | ||
| "@supabase/supabase-js": "^2.89.0", | ||
| "@types/react-beautiful-dnd": "^13.1.8", | ||
| "@vercel/analytics": "^1.3.1", | ||
| "ai": "4.1", | ||
| "@vercel/analytics": "^1.6.1", | ||
| "ai": "^6.0.6", | ||
| "axios": "^1.6.8", | ||
| "canvas": "^2.11.2", | ||
| "canvas": "^3.2.0", | ||
| "fluent-ffmpeg": "^2.1.3", | ||
| "formidable": "^3.5.1", | ||
| "glob": "^13.0.0", | ||
| "groq-sdk": "^0.3.3", | ||
| "i18next": "^23.6.0", | ||
| "lodash": "^4.17.21", | ||
| "next": "^14.2.5", | ||
| "ollama-ai-provider": "^0.13.0", | ||
| "openai": "^4.89.0", | ||
| "ollama-ai-provider": "^1.2.0", | ||
| "openai": "^4.104.0", | ||
| "pdfjs-dist": "^4.5.136", | ||
| "pixi-live2d-display-lipsyncpatch": "^0.5.0-ls-7", | ||
| "pixi-live2d-display-lipsyncpatch": "^0.5.0-ls-8", | ||
| "pixi.js": "^7.4.2", | ||
| "prettier-plugin-tailwindcss": "^0.6.11", | ||
| "prettier-plugin-tailwindcss": "^0.6.14", | ||
| "react": "^18.3.1", | ||
| "react-beautiful-dnd": "^13.1.1", | ||
| "react-dom": "^18.3.1", | ||
| "react-i18next": "^13.3.1", | ||
| "three": "^0.167.1", | ||
| "uuid": "^10.0.0", | ||
| "zod": "^3.23.8", | ||
| "zod": "^3.25.76", | ||
| "zustand": "^4.5.4" | ||
| }, | ||
| "devDependencies": { | ||
| "@charcoal-ui/tailwind-config": "^2.6.0", | ||
| "@gltf-transform/core": "^2.4.6", | ||
| "@testing-library/jest-dom": "^6.6.3", | ||
| "@testing-library/react": "^16.3.0", | ||
| "@testing-library/jest-dom": "^6.9.1", | ||
| "@testing-library/react": "^16.3.1", | ||
| "@types/dom-speech-recognition": "^0.0.1", | ||
| "@types/fluent-ffmpeg": "^2.1.27", | ||
| "@types/formidable": "^3.4.5", | ||
| "@types/fluent-ffmpeg": "^2.1.28", | ||
| "@types/formidable": "^3.4.6", | ||
| "@types/jest": "^29.5.14", | ||
| "@types/lodash": "^4.17.13", | ||
| "@types/node": "^22.1.0", | ||
| "@types/react": "^18.3.3", | ||
| "@types/lodash": "^4.17.21", | ||
| "@types/node": "^22.19.3", | ||
| "@types/react": "^18.3.27", | ||
| "@types/react-dom": "^18.3.0", | ||
| "@types/three": "^0.167.1", | ||
| "@types/uuid": "^10.0.0", | ||
| "autoprefixer": "^10.4.20", | ||
| "electron": "^30.0.8", | ||
| "autoprefixer": "^10.4.23", | ||
| "electron": "^39.2.7", | ||
| "electron-is-dev": "^3.0.1", | ||
| "eslint": "^8.57.0", | ||
| "eslint-config-next": "^14.2.5", | ||
| "eslint-config-prettier": "^9.1.0", | ||
| "eslint-plugin-prettier": "^5.2.1", | ||
| "eslint": "^9.39.2", | ||
| "eslint-config-next": "^16.1.1", | ||
| "eslint-config-prettier": "^10.1.8", | ||
| "eslint-plugin-prettier": "^5.5.4", | ||
| "jest": "^29.7.0", | ||
| "jest-environment-jsdom": "^29.7.0", | ||
| "jest-mock": "^29.7.0", | ||
| "jest-mock-extended": "^4.0.0-beta1", | ||
| "jest-environment-jsdom": "^30.2.0", | ||
| "jest-mock": "^30.2.0", | ||
| "jest-mock-extended": "^4.0.0", | ||
| "node-mocks-http": "^1.17.2", | ||
| "npm-run-all": "^4.1.5", | ||
| "postcss": "^8.4.47", | ||
| "prettier": "^3.3.3", | ||
| "sass": "^1.77.8", | ||
| "prettier": "^3.7.4", | ||
| "sass": "^1.97.1", | ||
| "style-loader": "^4.0.0", | ||
| "tailwindcss": "^3.4.14", | ||
| "ts-jest": "^29.3.2", | ||
| "tailwindcss": "^3.4.19", | ||
| "ts-jest": "^29.4.6", | ||
| "typescript": "5.0.2", | ||
| "wait-on": "^7.2.0", | ||
| "web-streams-polyfill": "^4.1.0" | ||
| "web-streams-polyfill": "^4.2.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check if package versions exist and look for vulnerabilities
# First, let's examine what npm audit can tell us about these packages
cd /tmp && cat > package.json << 'EOF'
{
"name": "audit-test",
"version": "1.0.0",
"dependencies": {
"@ai-sdk/anthropic": "^3.0.2",
"@ai-sdk/azure": "^3.0.2",
"@ai-sdk/openai": "^3.0.2",
"@anthropic-ai/sdk": "^0.20.8",
"openai": "^4.104.0",
"@supabase/supabase-js": "^2.89.0",
"canvas": "^3.2.0",
"zod": "^3.25.76",
"ai": "^6.0.6",
"electron": "^39.2.7",
"next": "^14.2.5",
"react": "^18.3.1",
"axios": "^1.6.8"
}
}
EOF
# Check npm registry for package existence and vulnerabilities
# Try using npm view to check individual packages
echo "=== Checking package versions ==="
packages=(
"openai@4.104.0"
"@supabase/supabase-js@2.89.0"
"canvas@3.2.0"
"zod@3.25.76"
"ai@6.0.6"
"electron@39.2.7"
"@anthropic-ai/sdk@0.20.8"
)
for pkg in "${packages[@]}"; do
npm view "$pkg" version 2>/dev/null && echo "✓ $pkg exists" || echo "✗ $pkg NOT FOUND"
doneRepository: tegnike/aituber-kit
Length of output: 327
🏁 Script executed:
#!/bin/bash
# Check for known vulnerabilities using npm audit
cd /tmp
npm audit --json 2>/dev/null | head -100Repository: tegnike/aituber-kit
Length of output: 302
🏁 Script executed:
#!/bin/bash
# Check specific packages for vulnerabilities using npm info
echo "=== Checking for known vulnerabilities ==="
for pkg in "openai" "@supabase/supabase-js" "canvas" "electron" "zod" "ai"; do
echo -e "\n--- $pkg ---"
npm info "$pkg" 2>/dev/null | grep -A 5 "security" || echo "No security info in npm"
doneRepository: tegnike/aituber-kit
Length of output: 355
🏁 Script executed:
#!/bin/bash
# Check if lockfile exists and run npm audit on the actual project
cd /repo
if [ -f "package-lock.json" ]; then
echo "Found package-lock.json, running npm audit..."
npm audit --omit=dev 2>&1 | head -200
else
echo "No package-lock.json found"
ls -la | grep -E "package|lock"
fiRepository: tegnike/aituber-kit
Length of output: 5075
🏁 Script executed:
#!/bin/bash
# Check for specific known vulnerabilities in these packages
# Using a more direct approach with curl to npm registry
echo "=== Checking vulnerability database for packages ==="
# Check a few critical packages for recent security issues
for pkg in "openai" "canvas" "electron" "ai" "@supabase/supabase-js"; do
echo -e "\n--- Checking $pkg ---"
# Try to fetch vulnerability data from npm
curl -s "https://api.osv.dev/v1/query" \
-X POST \
-H "Content-Type: application/json" \
-d "{\"package\": {\"purl\": \"pkg:npm/$pkg\"}, \"pageSize\": 5}" 2>/dev/null | head -50
doneRepository: tegnike/aituber-kit
Length of output: 50378
🏁 Script executed:
#!/bin/bash
# Alternative: Check the actual package.json in the repository
echo "=== Checking actual package.json in repository ==="
cat /repo/package.json | grep -A 100 '"dependencies"' | head -80Repository: tegnike/aituber-kit
Length of output: 181
依存関係に複数のセキュリティ脆弱性が存在します。直ちに修正してください。
npm auditの実行により、以下の重大なセキュリティ脆弱性が確認されました:
CRITICAL:
form-data:バウンダリ選択の不安全な乱数生成関数 (GHSA-fjxv-7rqg-78g4)
HIGH:
axios@1.6.8:データサイズチェック不足によるDoS (GHSA-4hjh-wcwx-xvwj)glob@13.0.0:コマンド実行インジェクション (GHSA-5j98-mcp5-4vw2)next@14.2.5:複数の脆弱性(情報漏洩、キャッシュ混乱、SSRF、コンテンツインジェクション、DoS)qs:メモリ枯渇によるDoS (GHSA-6rw7-vpxm-498p)jws:HMAC署名検証の不備 (GHSA-869p-cjfg-cm3x)
MODERATE:
ai@6.0.6:ファイルタイプホワイトリストバイパス (GHSA-rwvc-j5jr-mgvh)dompurify:クロスサイトスクリプティング (GHSA-vhxf-7vqr-mrjg)jsondiffpatch、js-yaml、nanoid、brace-expansionの各脆弱性
AI SDKの複数パッケージも脆弱性のあるバージョンに依存しています。npm audit fixで自動修正してください。
| "canvas": "^3.2.0", | ||
| "fluent-ffmpeg": "^2.1.3", | ||
| "formidable": "^3.5.1", | ||
| "glob": "^13.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for glob package usage in the codebase
# glob のインポートまたは require を検索
rg -n -C3 "(?:import|require)\s*\(?\s*['\"]glob['\"]"Repository: tegnike/aituber-kit
Length of output: 45
🏁 Script executed:
#!/bin/bash
# More comprehensive search for glob usage
# Search for any reference to "glob" in source files
echo "=== Searching for glob in source files ==="
rg -i "glob" --type js --type ts --type json -n | head -50
echo ""
echo "=== Checking if any files import from glob ==="
rg "from.*glob|import.*glob" -i --type js --type ts -n
echo ""
echo "=== Checking package.json for glob dependencies ==="
rg "glob" package.json -n -C2Repository: tegnike/aituber-kit
Length of output: 4320
🏁 Script executed:
#!/bin/bash
# Check for glob in scripts and configuration
echo "=== Checking package.json scripts ==="
rg '"scripts"' -A 30 package.json
echo ""
echo "=== Checking config files ==="
find . -maxdepth 1 -type f \( -name "*.config.*" -o -name "jest.setup.*" -o -name ".babelrc*" \) -exec grep -l "glob" {} \;
echo ""
echo "=== Checking if glob is referenced in any script commands ==="
rg "glob" package.json -B2 -A2Repository: tegnike/aituber-kit
Length of output: 1413
glob パッケージは使用されていません。削除してください。
コードベースの検索により、glob パッケージ (v13.0.0) はどのソースファイルやスクリプトでも使用されていないことが確認されました。不要な直接依存関係のため、削除を推奨します。
🤖 Prompt for AI Agents
In package.json around line 51, the "glob": "^13.0.0" dependency is unused;
remove this entry from dependencies, then reinstall/update lockfile (npm install
or yarn install) to update package-lock.json or yarn.lock, run the test/build
scripts to ensure nothing breaks, and commit the updated package.json and
lockfile changes.
| }, | ||
| "engines": { | ||
| "node": "^20.0.0" | ||
| "node": "^25.2.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
cat -n package.json | sed -n '105,120p'Repository: tegnike/aituber-kit
Length of output: 343
🌐 Web query:
Node.js 25.2.1 LTS stable release breaking changes
💡 Result:
Short answer: Node.js v25.2.1 itself does not introduce new breaking changes — it reverts a recently-introduced, spec‑compliant behavior that would have caused breakage (the change that sometimes threw on localStorage access) and clarifies Web Storage is experimental. The larger breaking changes to watch for are in Node.js v25 (the major line), not this patch: Web Storage enabled by default, exposure of global ErrorEvent, finalized removal of long‑deprecated APIs (e.g., SlowBuffer), and new permission-model flags — those are the breaking-surface you should audit when moving to v25. [1][2]
Sources:
- Node.js v25.2.1 release notes (revert of localStorage throwing + commits). [1]
- Node.js v25 release / changelog (major breaking changes in v25). [2]
🌐 Web query:
Node.js version 25 release status 2025
💡 Result:
Short answer: Node.js v25 was released as the Current (non‑LTS) line on October 15, 2025. It is a Current semver‑major release (odd-numbered releases are not promoted to LTS). The release and its changelog are on the Node.js site and repository. [1][2][3]
Sources:
- Official Node.js release announcement (v25.0.0) — Oct 15, 2025. [1]
- Node.js Releases page showing v25 as Current. [2]
- Node.js Release Working Group / GitHub release schedule (v25 dates). [3]
🌐 Web query:
Node.js LTS versions 2025 2026 active maintenance schedule
💡 Result:
Here are the Node.js LTS lines and their Active/Maintenance dates relevant for 2025–2026 (official Node.js sources):
- Node.js 24 (Krypton) — Active LTS: started Oct 28, 2025; transitions to Maintenance on Oct 20, 2026; EoL Apr 30, 2028. [1][2]
- Node.js 22 (Jod) — Active LTS: started Oct 29, 2024; transitions to Maintenance on Oct 21, 2025; EoL Apr 30, 2027. [1][2]
- Node.js 20 (Iron) — in Maintenance; Maintenance started Oct 22, 2024; EoL Apr 30, 2026. [1][2]
Sources: Node.js official Releases page and the Node.js Release Working Group schedule. [1] https://nodejs.org/en/about/releases/ [2] https://github.com/nodejs/Release
Node.js 25 は LTS ではなく Current リリースです。使用前に互換性を十分に確認してください。
Node.js v25.2.1 へのアップグレードは重大な決定です。注意すべき点:
- LTS ではない: Node.js 25 は Current リリース(偶数バージョンのみが LTS)で、v26 リリース時に EOL となります。本番環境には安定性が低いリスクがあります
- 破壊的変更: Web Storage のデフォルト有効化、global ErrorEvent の公開、SlowBuffer など非推奨 API の削除、新しいパーミッション フラグが含まれます
- LTS 代替案: Node.js 24(Active LTS、2025年10月開始)が利用可能です。本番環境ではこちらの使用を検討してください
- 依存関係の互換性: すべてのパッケージが Node.js 25 で動作することを確認してください
- チーム全体の統一: CI/CD、開発環境、本番環境で同じバージョンを使用していることを確認してください
v25 を使用する正当な理由がある場合は、その理由をコード コメントまたはドキュメントに記載してください。
🤖 Prompt for AI Agents
In package.json around line 110, the engines.node entry is set to "node":
"^25.2.1" which is a non-LTS Current release; change it to a stable LTS target
(e.g., "^24.0.0") to avoid stability/compatibility risks in production, and
ensure CI/dev/docker configs are updated to match; if you must keep v25, add a
short code comment or docs note explaining the explicit rationale and list any
verified incompatible dependencies and CI changes so the team knows this is
intentional.
|
@Tand0 ありがとうございます!確認させていただきます🙇♀️ |
Major version upgrades: - Node.js: ^20.0.0 → ^25.2.1 - AI SDK (ai): 4.1 → 6.0.6 - ESLint: 8.x → 9.x with flat config - Next.js: 14.x → 15.x - @charcoal-ui/icons: 2.6.0 → 5.1.0 Breaking changes addressed: - ESLint: Migrate from .eslintrc.json to eslint.config.mjs (flat config) - AI SDK v6: CoreMessage → ModelMessage, maxTokens → maxOutputTokens - AI SDK v6: toDataStreamResponse → createTextStreamResponse - AI SDK v6: Remove deprecated mode parameter from generateObject - Next.js 15: Move API utility files from /api/services/ to /lib/api-services/ - @charcoal-ui/icons v5: Update type assertions for pixiv-icon Other changes: - Remove unintended claude-dispatch.yml workflow file - Add React Compiler rules as warnings for existing code compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @docs/README_pl.md:
- Line 121: Update the Node.js version string in docs/README_pl.md where it
currently reads "Node.js: ^25.0.0" to match package.json by changing it to
"Node.js: ^25.2.1"; locate the exact text "Node.js: ^25.0.0" in the file and
replace it with "Node.js: ^25.2.1" to keep the documentation consistent.
🧹 Nitpick comments (2)
src/components/iconButton.tsx (1)
32-32: 不要なas any型キャストを削除してください。型定義により
pixiv-iconのnameプロパティはstring型を期待しており、isProcessingIcon || '24/Dot'とiconNameはすでに適切な型で推論されています。as anyキャストは型チェックを不必要に抑制するため、削除できます。♻️ 改善案
- <pixiv-icon name={(isProcessingIcon || '24/Dot') as any} scale="1" /> + <pixiv-icon name={isProcessingIcon || '24/Dot'} scale="1" />- <pixiv-icon name={iconName as any} scale="1" /> + <pixiv-icon name={iconName} scale="1" />src/__tests__/pages/api/vercel.test.ts (1)
9-39: TestResponseクラスの重複を検討
TestResponseクラスはsrc/__tests__/lib/api-services/vercelAi.test.ts(5-30行目)でも同じ実装が存在します。共通のテストユーティリティファイル(例:src/__tests__/utils/testHelpers.ts)に抽出することで、保守性を向上できます。
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (20)
.eslintrc.jsonREADME.mddocs/README_en.mddocs/README_ko.mddocs/README_pl.mddocs/README_zh.mdeslint.config.mjspackage.jsonsrc/__tests__/features/chat/vercelAIChat.test.tssrc/__tests__/lib/api-services/vercelAi.test.tssrc/__tests__/pages/api/convertSlide.test.tssrc/__tests__/pages/api/vercel.test.tssrc/components/iconButton.tsxsrc/features/chat/vercelAIChat.tssrc/lib/api-services/customApi.tssrc/lib/api-services/utils.tssrc/lib/api-services/vercelAi.tssrc/pages/api/ai/custom.tssrc/pages/api/ai/vercel.tssrc/pages/api/convertSlide.ts
💤 Files with no reviewable changes (1)
- .eslintrc.json
✅ Files skipped from review due to trivial changes (2)
- docs/README_ko.md
- src/pages/api/ai/custom.ts
🧰 Additional context used
📓 Path-based instructions (1)
**/__tests__/**/*
📄 CodeRabbit inference engine (CLAUDE.md)
テストは
__tests__ディレクトリに配置
Files:
src/__tests__/lib/api-services/vercelAi.test.tssrc/__tests__/pages/api/vercel.test.tssrc/__tests__/pages/api/convertSlide.test.tssrc/__tests__/features/chat/vercelAIChat.test.ts
🧠 Learnings (1)
📚 Learning: 2025-08-05T17:30:02.776Z
Learnt from: CR
Repo: tegnike/aituber-kit PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T17:30:02.776Z
Learning: Node.js環境用にcanvasをモック化済み
Applied to files:
docs/README_zh.mdREADME.md
🧬 Code graph analysis (5)
src/__tests__/lib/api-services/vercelAi.test.ts (1)
src/lib/api-services/vercelAi.ts (2)
streamAiText(61-100)generateAiText(105-147)
src/__tests__/pages/api/vercel.test.ts (2)
src/lib/api-services/vercelAi.ts (3)
streamAiText(61-100)generateAiText(105-147)aiServiceConfig(26-56)src/lib/api-services/utils.ts (1)
modifyMessages(6-19)
src/__tests__/pages/api/convertSlide.test.ts (2)
src/pages/api/convertSlide.ts (1)
createSlideLine(152-247)src/features/constants/aiModels.ts (1)
isMultiModalModel(268-270)
src/__tests__/features/chat/vercelAIChat.test.ts (1)
src/features/chat/vercelAIChat.ts (1)
getVercelAIChatResponseStream(139-351)
eslint.config.mjs (1)
next.config.js (1)
nextConfig(2-11)
🔇 Additional comments (24)
docs/README_zh.md (1)
121-121: docs/README_pl.md の確認コメントを参照してください。同一のバージョン仕様確認が必要です。
README.md (1)
121-121: docs/README_pl.md の確認コメントを参照してください。同一のバージョン仕様確認が必要です。
docs/README_en.md (1)
121-122: Node.js バージョンの整合性を確認してください。ドキュメントでは
^25.0.0と記載されていますが、package.json では^25.2.1が指定されています。過去のレビューで指摘されているように、Node.js 25 は LTS ではなく Current リリースです。ドキュメントを package.json と一致させるか、LTS バージョン(Node.js 24)の使用を検討してください。
eslint.config.mjs (2)
1-29: ESLint flat config への移行は適切です。ESLint 9 の flat config 形式への移行が正しく行われています。Prettier 統合と Next.js 設定の組み合わせも適切です。
22-24: これらのルールはeslint-plugin-react-hooksに実装されている有効なルールです。immutability、set-state-in-effect、preserve-manual-memoizationは同プラグインのドキュメントに記載されている追加ルールであり、React Compiler との互換性を向上させるための新規ルールとして機能します。eslint-plugin-react-hooksはeslint-config-nextの依存関係として含まれているため、別途インストールの必要はありません。Likely an incorrect or invalid review comment.
package.json (1)
55-55: Next.js 15.5.9 へのアップグレードは適切ですが、テストを十分に行ってください。Next.js 14.x から 15.x へのメジャーアップグレードには破壊的変更が含まれます(非同期 Request API、キャッシュのデフォルト動作変更など)。PR の目的に沿った変更ですが、全ての機能が正常に動作することを確認してください。
src/pages/api/ai/vercel.ts (1)
8-13: インポートパスのエイリアス化は適切です。相対パス (
../services/*) からプロジェクトエイリアス (@/lib/api-services/*) への変更は、コードの可読性と保守性を向上させます。src/pages/api/convertSlide.ts (2)
152-152: 関数のエクスポートはテスト容易性を向上させます。
createSlideLine関数をエクスポートすることで、単体テストが可能になります。テストファイル(src/__tests__/pages/api/convertSlide.test.ts)でこの関数がテストされていることを確認しました。
212-246:generateObjectは v6 で非推奨です。generateText+outputの使用に切り替えてください。Vercel AI SDK v6 ドキュメントでは
generateObjectは非推奨になっており、代わりにgenerateTextとoutputオプションを組み合わせて使用することが推奨されています。補足:
output: 'no-schema'を使用した場合、response.objectには解析済みの JSON が正しく返されるため、現在のコードのresponse.objectへのアクセスは正常です。ただし、JSON 解析に失敗した場合により詳細なエラー情報を取得するため、エラーハンドリングでNoObjectGeneratedErrorを特別に処理することを検討してください。src/lib/api-services/vercelAi.ts (3)
13-18: AI SDK v6 への API 移行が正しく行われています。
CoreMessage→ModelMessage、toDataStreamResponse()→createTextStreamResponse()への変更は AI SDK v6 のマイグレーションガイドに沿っています。
81-81:maxOutputTokensへの変更は AI SDK v6 の仕様に準拠しています。
maxTokensからmaxOutputTokensへの名称変更は正しく行われています。Also applies to: 123-123
79-84:toDataStreamResponse()は本コードベースに存在しません。現在の実装は
createTextStreamResponse()を正しく使用しており、クライアント側のsrc/features/chat/vercelAIChat.tsのgetVercelAIChatResponseStream()はこのレスポンス形式に対応しています。カスタム ReadableStream ハンドラは複数のストリーム形式(0:、data:、3:、9: プレフィックスや JSONL など)に対応し、テストでも動作が確認されているため、互換性の問題はありません。Likely an incorrect or invalid review comment.
src/__tests__/features/chat/vercelAIChat.test.ts (3)
40-42: LGTM! TextDecoderのモック状態を適切にリセット
mockDecode.mockReset()の追加により、テスト間でTextDecoderのモック状態が確実にリセットされ、テストの独立性が保証されます。
178-180: LGTM! ヘッダーモックがContent-Type検出に対応
headers.get()メソッドを返すようにモック構造を更新し、vercelAIChat.tsの新しいContent-Type検出ロジック(204-205行目)と整合性が取れています。
202-249: LGTM! プレーンテキストストリーミングの包括的なテスト新機能であるtext/plainストリーミングを適切にテストしています。複数のチャンクを模擬し、最終的な連結結果を検証する実装は、vercelAIChat.tsの新しいストリーミングロジック(236-241行目)を正確にカバーしています。
src/features/chat/vercelAIChat.ts (3)
204-205: LGTM! Content-Typeの検出ロジックが適切Content-Typeヘッダーを取得し、
text/plainを含むかどうかでストリーミング形式を判定する実装は、シンプルかつ効果的です。
234-241: LGTM! プレーンテキストストリーミングの効率的な処理プレーンテキストストリームの場合、デコードしたチャンクを即座にエンキューし、構造化ストリームの解析をスキップする実装は効率的で適切です。
319-321: LGTM! バッファの最終フラッシュが適切プレーンテキストストリームの読み取りループ完了後、残りのバッファ内容をエンキューする処理により、データ損失を防いでいます。
src/__tests__/pages/api/vercel.test.ts (1)
73-214: LGTM! Vercel APIハンドラの包括的なテストカバレッジテストスイートは以下を適切にカバーしています:
- HTTPメソッド検証(405エラー)
- APIキー検証(400エラー)
- ローカルLLM URL検証(400エラー)
- Googleストリーミング(検索グラウンディング付き)
- Azureリクエスト(デプロイメント名解析)
src/__tests__/lib/api-services/vercelAi.test.ts (2)
72-119: LGTM! streamAiTextの成功・エラーパスの適切なテストテストは以下を検証しています:
- モデルファクトリーの正しい呼び出し(モデル名とオプション)
streamTextへの適切なパラメータ渡し(maxOutputTokensへの変更を含む)createTextStreamResponseによるレスポンスラップ- エラー時の500レスポンスと適切なエラーコード
121-161: LGTM! generateAiTextの成功・エラーパスの完全なテストテストは以下を網羅しています:
- モデルファクトリーと
generateTextの正しい呼び出し- 200レスポンスとJSONペイロードの検証
- エラー時の500レスポンスと適切なエラーメッセージ
maxOutputTokensパラメータの正確な使用src/__tests__/pages/api/convertSlide.test.ts (3)
8-15: LGTM! TextEncoder/TextDecoderのポリフィルが適切formidableの依存関係に必要なTextEncoder/TextDecoderのポリフィルが、既存のグローバルを上書きしないよう条件付きで設定されています。
62-64: LGTM! 動的インポートパターンが適切
beforeAllでのモジュールの動的インポートにより、モックのセットアップ後にcreateSlideLineが確実にロードされます。
74-132: LGTM! createSlideLineの各AIサービスパスを適切にテストテストは以下を検証しています:
- OpenAIパス:モデルファクトリーの呼び出しと
output: 'no-schema'の使用- Anthropicパス:
schemaプロパティの使用(outputなし)- マルチモーダル非対応モデルでのエラースロー
convertSlide.ts(151-246行目)の実装と整合性が取れています。
|
@Tand0 |
お世話になっております。
最近、 neuro sama に脳みそを焼かれて私もAI作ろうと思ったのですが、思うようにインストールができませんでした。
どうも私が実施した2026/1時点では canvas のバージョンが古すぎて github から 404 not found エラーを返しています。
そこで、いろいろ思考錯誤して以下のような npmコマンドを修正したら動きました。
すると、package.json が書き換わっていましたので、それを送ります。
サイトを見るとフォークしてプルリクエストをdevelopに出してとのことでしたので、その通りやったつもりです(何か勝手に
.github/workflows/claude-dispatch.ymlが編集されていますが、 変えたいのは package.json のみです)。動作確認としては http://localhost:3000/ にアクセスして女の子が出てくるところまでは見ています。
よろしくお願いいたします。
※
これから LLM をがんばって作っていきたいと思います。
※投入した npm コマンドは以下の通り
Summary by CodeRabbit
リリースノート
Chores
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.