Skip to content

Conversation

@Tand0
Copy link

@Tand0 Tand0 commented Jan 4, 2026

お世話になっております。

最近、 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 コマンドは以下の通り

npm install canvas@3.2.0 react-beautiful-dnd@13.1.1 jest-environment-jsdom@30.2.0 jest-mock@30.2.0 jest-mock-extended@4.0.0 openai@4.104.0 @azure/identity@4.13.0 @headlessui/react@2.2.9 @marp-team/marpit@3.2.0 @pixiv/three-vrm@3.4.4 @supabase/supabase-js@2.89.0 @testing-library/jest-dom@6.9.1 @testing-library/react@16.3.1 @types/fluent-ffmpeg@16.3.1 autoprefixer@10.4.23 @types/fluent-ffmpeg@2.1.28 @types/node@22.19.3 @types/react@18.3.27 @vercel/analytics@1.6.1 ts-jest@29.4.6 @types/formidable@3.4.6  @types/lodash@4.17.21 pixi-live2d-display-lipsyncpatch@0.5.0-ls-8 prettier-plugin-tailwindcss@0.6.14 sass@1.97.1 tailwindcss@3.4.19 web-streams-polyfill@4.2.0 zod@3.25.76 prettier@3.7.4 @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 ai@6.0.6 eslint@9.39.2 eslint-config-next@16.1.1 eslint-config-prettier@10.1.8 @charcoal-ui/icons@5.1.0 electron@39.2.7 ollama-ai-provider@1.2.0

Summary by CodeRabbit

リリースノート

  • Chores

    • 多数の依存パッケージを主要バージョンで更新しました
    • Node.js 要件を ^20 → ^25 系に引き上げ、npm を 11.x に更新しました
    • ESLint/Prettier 設定を新しい構成へ移行し、開発ツール群(TypeScript, Tailwind 等)をアップグレードしました
  • New Features

    • チャットのストリーミングでプレーンテキスト配信をネイティブにサポートし、チャンク配信の挙動を改善しました
  • Tests

    • チャット、API、スライド変換まわりの包括的なテストを追加しました

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Jan 4, 2026

@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.

@coderabbitai
Copy link

coderabbitai bot commented Jan 4, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

大規模な依存関係のバージョンアップ、ESLint 設定の移行、複数のテスト追加、Vercel AI 周りの型/ストリーム処理変更(プレーンテキストストリーム対応)、一部 API の公開およびインポート経路整理が行われています。

Changes

Cohort / File(s) 説明
依存パッケージ・エンジン更新
package.json
多数の依存をメジャー/マイナーバージョンアップ(@ai-sdk/* → ~3.x 他)、Node エンジンを ^20 → ^25、npm/Volta 指定更新。
ESLint 設定移行
.eslintrc.json, eslint.config.mjs
既存の .eslintrc.json を削除し、フラットコンフィグ形式の eslint.config.mjs を追加(Prettier 統合・フックルールの緩和、ignore globs 設定を移行)。
ドキュメント更新
README.md, docs/README_*.md
開発環境要件の Node.js/npm バージョン表記を更新。
チャットストリーミング処理の変更
src/features/chat/vercelAIChat.ts
レスポンスの Content-Type を判定して text/plain ストリームを即時エンキューする分岐を追加、バッファ/フラッシュの制御を調整。
Vercel AI サービス契約変更
src/lib/api-services/vercelAi.ts
CoreMessageModelMessage へ置換、result.toDataStreamResponse()createTextStreamResponse({ textStream: result.textStream }) に変更、maxTokensmaxOutputTokens に名称変更。
API ハンドラの import 整理
src/pages/api/ai/custom.ts, src/pages/api/ai/vercel.ts
相対パスから @/ エイリアスへインポートを更新。
Slide 変換の公開化
src/pages/api/convertSlide.ts
createSlideLine をエクスポート化(export async function createSlideLine...)および非-Anthropic ブランチから mode: 'json' を削除。
UI 微修正
src/components/iconButton.tsx
pixiv-icon の JSX を自己終了タグへ、String(...)as any キャストへ変更(表示ロジックは同等)。
テスト追加/修正
src/__tests__/**
Vercel AI ストリーミング、vercelAi サービス、convertSlide、API ハンドラ等のテストスイートを追加・拡張(TextDecoder モックのリセット、text/plain チャンク処理テスト等)。

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: ストリーム完了通知 / 最終チャンク送出
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

devin

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PRのタイトルは package.json を新しいバージョンで動かしたいという意図を明確に表現しており、実際の変更(多数のパッケージ更新、Node.js ^20→^25、AI SDK等の大規模アップグレード)と一致している。

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 347ea43 and 059ac38.

📒 Files selected for processing (5)
  • README.md
  • docs/README_en.md
  • docs/README_ko.md
  • docs/README_pl.md
  • docs/README_zh.md

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between a7da73a and c504319.

📒 Files selected for processing (2)
  • .github/workflows/claude-dispatch.yml
  • package.json
🔇 Additional comments (1)
package.json (1)

48-48: canvas v3.2.0 は最新の安定版で、セキュリティ上の既知の脆弱性はありません。

Web 検索により v3.2.0 が最新の安定版であること、および Snyk と npm アドバイザリーに既知の脆弱性が報告されていないことが確認されました。また、学習情報から Node.js 環境用に canvas がモック化されていることが示されており、CI/CD 環境での互換性の対応がなされています。

Comment on lines +21 to +29
"@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",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, verify the package.json content at the specified lines
head -35 package.json | tail -15

Repository: 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=50

Repository: 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 -20

Repository: tegnike/aituber-kit

Length of output: 834


🏁 Script executed:

# Check the repository structure
ls -la

Repository: 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 -100

Repository: tegnike/aituber-kit

Length of output: 3752


🏁 Script executed:

# Check convertSlide.ts as well
cat -n src/pages/api/convertSlide.ts | head -100

Repository: 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 -20

Repository: 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/null

Repository: 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内のstreamTextgenerateTextなどの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.

Comment on lines 21 to 107
"@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"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 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"
done

Repository: 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 -100

Repository: 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"
done

Repository: 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"
fi

Repository: 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
done

Repository: 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 -80

Repository: tegnike/aituber-kit

Length of output: 181


依存関係に複数のセキュリティ脆弱性が存在します。直ちに修正してください。

npm auditの実行により、以下の重大なセキュリティ脆弱性が確認されました:

CRITICAL:

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)
  • jsondiffpatchjs-yamlnanoidbrace-expansionの各脆弱性

AI SDKの複数パッケージも脆弱性のあるバージョンに依存しています。npm audit fixで自動修正してください。

"canvas": "^3.2.0",
"fluent-ffmpeg": "^2.1.3",
"formidable": "^3.5.1",
"glob": "^13.0.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 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 -C2

Repository: 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 -A2

Repository: 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"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 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.

@tegnike
Copy link
Owner

tegnike commented Jan 4, 2026

@Tand0 ありがとうございます!確認させていただきます🙇‍♀️

tegnike and others added 2 commits January 5, 2026 19:11
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>
Copy link

@coderabbitai coderabbitai bot left a 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-iconname プロパティは 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

📥 Commits

Reviewing files that changed from the base of the PR and between c504319 and 347ea43.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (20)
  • .eslintrc.json
  • README.md
  • docs/README_en.md
  • docs/README_ko.md
  • docs/README_pl.md
  • docs/README_zh.md
  • eslint.config.mjs
  • package.json
  • src/__tests__/features/chat/vercelAIChat.test.ts
  • src/__tests__/lib/api-services/vercelAi.test.ts
  • src/__tests__/pages/api/convertSlide.test.ts
  • src/__tests__/pages/api/vercel.test.ts
  • src/components/iconButton.tsx
  • src/features/chat/vercelAIChat.ts
  • src/lib/api-services/customApi.ts
  • src/lib/api-services/utils.ts
  • src/lib/api-services/vercelAi.ts
  • src/pages/api/ai/custom.ts
  • src/pages/api/ai/vercel.ts
  • src/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.ts
  • src/__tests__/pages/api/vercel.test.ts
  • src/__tests__/pages/api/convertSlide.test.ts
  • src/__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.md
  • README.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 に実装されている有効なルールです。immutabilityset-state-in-effectpreserve-manual-memoization は同プラグインのドキュメントに記載されている追加ルールであり、React Compiler との互換性を向上させるための新規ルールとして機能します。eslint-plugin-react-hookseslint-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 は非推奨になっており、代わりに generateTextoutput オプションを組み合わせて使用することが推奨されています。

補足: output: 'no-schema' を使用した場合、response.object には解析済みの JSON が正しく返されるため、現在のコードの response.object へのアクセスは正常です。ただし、JSON 解析に失敗した場合により詳細なエラー情報を取得するため、エラーハンドリングで NoObjectGeneratedError を特別に処理することを検討してください。

src/lib/api-services/vercelAi.ts (3)

13-18: AI SDK v6 への API 移行が正しく行われています。

CoreMessageModelMessagetoDataStreamResponse()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.tsgetVercelAIChatResponseStream() はこのレスポンス形式に対応しています。カスタム 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行目)の実装と整合性が取れています。

@tegnike tegnike merged commit c3e6cf8 into tegnike:develop Jan 7, 2026
0 of 2 checks passed
@tegnike
Copy link
Owner

tegnike commented Jan 7, 2026

@Tand0
いくつか修正してマージいたしました。
まだ正リリースではないので、それまでもう少々お待ちください🙇‍♀️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants