Improve chat image references#58
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR adds an image_reference part type and parser to extract labeled image references from transcript text, renders those references as tokens in messages, and refines prompt-vs-status normalization (Codex heuristics) with accompanying tests. ChangesImage Reference Handling
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 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)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
app/components/MessageBlock.tsx (1)
55-55: ⚡ Quick winRemove dead
serviceEndpointfromMessageBlockprops.
MessageBlockno longer usesserviceEndpoint, butPropsstill requires it, so callers must keep passing an unused prop.Proposed diff
interface Props { message: ChatMessage; - serviceEndpoint: ServiceEndpoint; }🤖 Prompt for 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. In `@app/components/MessageBlock.tsx` at line 55, Remove the unused serviceEndpoint property from the Props type used by MessageBlock: update the Props interface/type declaration to drop serviceEndpoint and adjust any imports/CallSites to stop passing it (or update their prop objects) so MessageBlock({ message }: Props) no longer requires that unused field; ensure type references to Props (and any tests or parent components) are updated accordingly to prevent type errors.
🤖 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 `@src/agent-output-parser.ts`:
- Around line 310-323: The condition that retypes a prompt to "status"
incorrectly calls isCodexSuggestedPrompt(current.text) for all tools; restrict
that check to only run for Codex-sourced prompts by adding a tool check (e.g.,
current.tool === 'codex' or current.tool?.name === 'codex') in the same if
expression inside the loop in agent-output-parser (the block that uses
looksLikeFooterStatus, looksLikeInProgressStatus, and isCodexSuggestedPrompt);
update the combined conditional so isCodexSuggestedPrompt(...) is evaluated only
when the current item's tool identifies it as Codex, leaving other tools'
prompts unaffected.
---
Nitpick comments:
In `@app/components/MessageBlock.tsx`:
- Line 55: Remove the unused serviceEndpoint property from the Props type used
by MessageBlock: update the Props interface/type declaration to drop
serviceEndpoint and adjust any imports/CallSites to stop passing it (or update
their prop objects) so MessageBlock({ message }: Props) no longer requires that
unused field; ensure type references to Props (and any tests or parent
components) are updated accordingly to prevent type errors.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: c1598242-7805-4d12-b909-f499d6ffbf81
📒 Files selected for processing (6)
app/components/MessageBlock.tsxapp/lib/events.tsapp/lib/parsed-transcript.test.tsapp/lib/parsed-transcript.tssrc/agent-output-parser.test.tssrc/agent-output-parser.ts
Summary
Tests
Summary by CodeRabbit
New Features
Improvements
Tests