Compare commits

...

2 Commits

Author SHA1 Message Date
posimai aef2e0cd6b chore: update STATUS.md — ponshu APK + guard-ext + VS Code fix done 2026-04-14 23:22:25 +09:00
posimai 3f2f2564d5 fix(brain): switch analyzeWithGemini from gemini-2.0-flash-lite to gemini-2.5-flash
gemini-2.0-flash-lite のフリー枠日次クォータが枯渇し AI 分析が全件失敗していた。
gemini-2.5-flash に統一してクォータ問題を解消する。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 23:12:50 +09:00
2 changed files with 20 additions and 6 deletions

View File

@ -9,10 +9,16 @@
## 次にやること(優先順) ## 次にやること(優先順)
### Guard / Tauri ### Guard / Tauri
1. **ルールエンジンを共有パッケージに切り出し**`packages/rule-engine/` として独立させ、アプリ・拡張・CLI が全部参照する構成へ 1. **Timer → Pulse 連携(セッションログ)** — タイマー終了時にセッション記録モーダル。`posimai-timer-sessions` に保存
2. **VS Code 拡張posimai-guard-extにルールエンジン組み込み** — 現在 Gemini 依存。共有パッケージ化後に差し替え 2. **Tauri アプリ動作確認** — デスクトップショートカットから起動、CodeViewer が WebView でも動くか確認
3. **CLI 作成**`npx @posimai/guard scan .` 形式。共有パッケージ化後に実装 3. **Diff → 履歴保存 + Journal 送信** — 比較結果をlocalStorage保存・Journal連携
4. **Tauri アプリ動作確認** — デスクトップショートカットから起動、CodeViewer が WebView でも動くか確認
### Guard 完成状態2026-04-14
- ルールエンジン133ルール
- 静的修正テンプレート85ルール
- VS Code で開く ✓
- CLI`npx tsx cli/guard.ts`)✓
- VS Code 拡張APIキー不要
### Guard ビルド方法メモ(次回再ビルド時) ### Guard ビルド方法メモ(次回再ビルド時)
```bash ```bash
@ -50,6 +56,14 @@ node_modules/.bin/tauri build
| user_activity テーブル追加 | mai 確認必要DB スキーマ変更) | Digest 週次集計の前提。CLAUDE.md 要確認事項 | | user_activity テーブル追加 | mai 確認必要DB スキーマ変更) | Digest 週次集計の前提。CLAUDE.md 要確認事項 |
| Redis 移行webauthnChallenges | スケール要件が出てから | 現状インメモリで問題なし | | Redis 移行webauthnChallenges | スケール要件が出てから | 現状インメモリで問題なし |
## 直近でやったこと2026-04-14 セッション2
### ponshu / Guard 拡張 / Guard VS Code修正
- **ponshu_room_lite 消費者APK**: 最新コミット04-12 13:23でリビルド完了 → `build/apk_releases/2026-04-14_22-54-28/` に maita・Eiji 向け各 90MB
- **posimai-guard-ext**: ルールエンジン組み込み完了。APIキー不要でスキャン可能に。Gemini/Claude はオプション追加スキャンに降格。バンドル 120KBルールエンジン込み
- **Guard「VS Code で開く」修正**: `window.open(uri, '_self')``window.location.href = uri` に変更。popup ブロッカーによる無効化を解消
- デプロイ済みVercel 自動デプロイ中)
## 直近でやったこと2026-04-14 ## 直近でやったこと2026-04-14
### Guard 静的修正テンプレート + セキュリティ修正 ### Guard 静的修正テンプレート + セキュリティ修正

View File

@ -432,7 +432,7 @@ async function analyzeWithGemini(title, fullText, url) {
if (!genAI) return { summary: (fullText || '').slice(0, 120) || '(要約なし)', topics: ['その他'], readingTime: 3 }; if (!genAI) return { summary: (fullText || '').slice(0, 120) || '(要約なし)', topics: ['その他'], readingTime: 3 };
try { try {
const model = genAI.getGenerativeModel({ const model = genAI.getGenerativeModel({
model: 'gemini-2.0-flash-lite', model: 'gemini-2.5-flash',
generationConfig: { responseMimeType: 'application/json' } generationConfig: { responseMimeType: 'application/json' }
}); });
const prompt = `記事分析してJSONで返答: const prompt = `記事分析してJSONで返答:
@ -1745,7 +1745,7 @@ function buildRouter() {
if (!title && !body) return res.status(400).json({ error: 'title or body required' }); if (!title && !body) return res.status(400).json({ error: 'title or body required' });
try { try {
const model = genAI.getGenerativeModel({ const model = genAI.getGenerativeModel({
model: 'gemini-2.0-flash-lite', model: 'gemini-2.5-flash',
generationConfig: { responseMimeType: 'application/json' } generationConfig: { responseMimeType: 'application/json' }
}); });
const excerpt = smartExtract(body, 2000); const excerpt = smartExtract(body, 2000);