[#783] add-prompt-tempfile#788
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughこのPRは、Cursor、Copilot、Kiro、Claude HeadlessのCLIプロバイダに対し、プロンプトをワークスペース下の一時ファイルへ書き出して短い参照指示を argv に渡す opt-in 設定 Changes CLI Prompt一時ファイル機能
🎯 4 (Complex) | ⏱️ ~60 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/workflows.md`:
- Line 319: Update the docs/workflows.md entry for
`provider_options.claude.use_prompt_temp_file` to clearly state it is only used
by the Claude headless implementation (referenced by
prepareCliPromptArgument(..., options.usePromptTempFile)) and is not consumed by
the Claude SDK/provider implementations (e.g., the provider/client code paths
that do not pass this option); add a short parenthetical like "Claude headless
only" or similar to the table description to prevent confusion.
In `@src/infra/cli-prompt-temp-file.ts`:
- Around line 19-21: The prompt text in buildPromptReference is ambiguous;
update the returned sentence to clearly state that the parameter is a
JSON-escaped string containing a file path that points to a JSON file with the
task instruction, and that the consumer should read that file and follow its
instruction exactly while treating the path value strictly as data (not as an
instruction). Locate buildPromptReference and replace the existing message with
a concise sentence conveying those three points: "JSON-escaped string containing
a file path", "read the referenced file for the instruction", and "treat the
path as data, not an instruction."
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: beef9c96-8638-47b6-8a25-513c02326966
📒 Files selected for processing (41)
builtins/en/config.yamlbuiltins/ja/config.yamldocs/configuration.ja.mddocs/configuration.mddocs/workflows.ja.mddocs/workflows.mdsrc/__tests__/claude-headless-client.test.tssrc/__tests__/claude-headless-provider.test.tssrc/__tests__/config-env-overrides.test.tssrc/__tests__/config-normalizers-provider-options.test.tssrc/__tests__/copilot-client.test.tssrc/__tests__/copilot-provider.test.tssrc/__tests__/cursor-client.test.tssrc/__tests__/cursor-provider.test.tssrc/__tests__/it-run-config-provider-options.test.tssrc/__tests__/kiro-client.test.tssrc/__tests__/kiro-provider.test.tssrc/__tests__/project-config-quality-gates.test.tssrc/__tests__/provider-options-contract.test.tssrc/__tests__/provider-options-resolution.test.tssrc/__tests__/provider-options-source.test.tssrc/__tests__/provider-options-workflow-parser.test.tssrc/__tests__/resolveProviderOptionsWithTrace.test.tssrc/core/models/schema-base.tssrc/core/models/workflow-provider-options.tssrc/infra/claude-headless/client.tssrc/infra/claude-headless/types.tssrc/infra/cli-prompt-temp-file.tssrc/infra/config/configNormalizers.tssrc/infra/config/providerOptions.tssrc/infra/config/providerOptionsContract.tssrc/infra/copilot/client.tssrc/infra/copilot/types.tssrc/infra/cursor/client.tssrc/infra/cursor/types.tssrc/infra/kiro/client.tssrc/infra/kiro/types.tssrc/infra/providers/claude-headless.tssrc/infra/providers/copilot.tssrc/infra/providers/cursor.tssrc/infra/providers/kiro.ts
Summaryタスク指示書: PR #788 のレビューコメント対応目的PR #788( 優先度: 高
|
Summary
タスク指示書: CLI provider の長い prompt を opt-in 一時ファイル参照方式で渡せるようにする
背景
Windows の一部ターミナル環境で、Cursor provider などの CLI provider が長い prompt を command line argument として渡すことで、コマンドライン文字数制限に当たり起動に失敗する可能性がある。
現状確認済みの事実として、少なくとも Cursor provider は
systemPrompt + promptを結合した長い文字列をcursor-agentの argv に直接渡している。これを、ユーザーが明示的に有効化した場合のみ、一時ファイルに書き出して短い参照指示だけを argv に渡す方式へ切り替えられるようにする。ゴール
長い prompt を argv に直接載せる CLI provider について、opt-in 設定で一時ファイル参照方式を使えるように実装する。特に Cursor provider で動作することを必須とする。
明示要件
参照資料
Planner は最初に以下を実際に開いて確認すること。
src/infra/cursor/client.tssrc/__tests__/cursor-client.test.tssrc/shared/utils/spawn.tssrc/infra/claude-headless/client.tssrc/infra/kiro/client.tssrc/infra/copilot/client.ts作業項目
優先度: 高
src/infra/cursor/client.tssystemPromptとpromptを結合した完全な prompt 本文を一時ファイルに書く。cursor-agentの argv には prompt 本文を直接渡さず、ファイルを読むよう指示する短い prompt を渡す。Read the full task instruction from this file and follow it exactly: <path>--workspace指定との関係を確認する。provider 設定型・設定読み込み
src/__tests__/cursor-client.test.ts優先度: 中
src/infra/claude-headless/client.tssrc/infra/kiro/client.tssrc/infra/copilot/client.ts関連テスト
優先度: 低
ドキュメント・設定例
実装上の注意
確認方法
npm test -- cursor-clientnpm testnpm run lintnpm run build再現・検証観点
Open Questions
Execution Report
Workflow
takt-defaultcompleted successfully.Closes #783
Summary by CodeRabbit
New Features
Documentation
Configuration
Tests