fix(desktop): done タスクにメッセージ送信で再開できるようにする (#241)#243
Conversation
- start 許可リストに `done` を追加し、手動 Start でも再開可能に - sendInput で done/failed/aborted/escalated かつ claudeSessionId 有のときに 自動的に preparing へ遷移して supervisor.start を呼び、メッセージ送信だけで 過去セッションを `--resume` で継続するようにした - UI: done 済みかつ claudeSessionId 有の場合に Start ボタンを表示 - UI: フッターのヒントに「完了済み/失敗のタスクへ送ると再開される」旨を追記 Closes #241
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 37 minutes and 6 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
…chment を daemon へ移植 main 取り込み側で supervisor.ts に加わった以下の機能を、daemon 方式の 新しいアーキテクチャ (supervisor-engine.ts) に再実装する。 #244 ScheduleWakeup 継続 - engine に `wakeupResumeMarkers` を追加し、scheduler からの `fromScheduledWakeup: true` を経由してマーカーを立てる - `start()` option をIPC プロトコル (StartRequest) に追加し、 supervisor.ts (proxy) → client.ts → daemon/index.ts → engine.start の順にフラグを伝搬 - `runSession` がマーカーを消費し「再開」バナー/previous text 再送を スキップして短い継続キューだけを送る - `buildIterationPrompt` に `isScheduledWakeupContinuation` を追加、 claudeSessionId が null のときは iteration-1 フルプロンプトへ フォールバック #245 Claude model/effort - `runClaudeTurn` に `claudeModel`/`claudeEffort` を渡し、 CLAUDE_*_OPTIONS ホワイトリストで検証してから `--model`/`--effort` を spawn に追加(不明値は warn して無視する二重防御) - setup event に「Claude 設定」として選択内容を表示 #250 画像添付 tool_result - `extractToolResultDetails` が image ブロックのみの tool_result も `[画像 N 件]` プレースホルダで emit するよう修正 - `extractAttachmentPaths` を daemon 側にも複製し、iteration 1 の プロンプトに添付ファイルパスを列挙して Read を促す #243 done→resume は trpc-router.ts 側で完結するので追加変更なし
概要
Issue #241 の対応。完了済み (
done) のタスクにメッセージを送信しても何も起きなかった挙動を、過去セッションを自動で再開して続きから対話できるように修正します。変更点
バックエンド (
apps/desktop/src/main/todo-agent/trpc-router.ts)startの許可ステータスにdoneを追加。手動 Start でも再開可能にしたsendInputで現在のステータスが terminal (done/failed/aborted/escalated) かつclaudeSessionIdが残っているとき、preparingへ遷移させてsupervisor.start()を呼ぶようにした--resume <claudeSessionId>で継続する仕組みがあるので、新規配線は不要UI (
apps/desktop/src/renderer/features/todo-agent/TodoManager/TodoManager.tsx)canStartにdone && claudeSessionId != nullを追加し、Start ボタンを表示仕組み
sendInputがqueueInterventionでメッセージをバッファ → ステータスをpreparingにsupervisor.start()→drain()→runSession()がisResumingPastRun = !!claudeSessionIdを検出claude -p --resume <id>で実行され、ターン境界でpendingInterventionがプロンプトに反映されるテスト計画
bun run typecheck— 全 26 パッケージ成功bun run lint— clean