feat(studio): show additional details for coding agent tool calls - #651
feat(studio): show additional details for coding agent tool calls#651dmariali wants to merge 6 commits into
Conversation
Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>
73fd37c to
b1a7a2b
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughChangesSubtle tool invocation details
Sequence Diagram(s)sequenceDiagram
participant ClaudeCodeToolCallPart
participant getToolInvocation
participant SubtleToolCallRow
participant navigator.clipboard
ClaudeCodeToolCallPart->>getToolInvocation: derive invocation from toolName and args
getToolInvocation-->>ClaudeCodeToolCallPart: return invocation string
ClaudeCodeToolCallPart->>SubtleToolCallRow: provide invocation or invocations
SubtleToolCallRow->>navigator.clipboard: copy selected invocation
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/toolCall/SubtleToolCallRow.tsx (1)
148-157: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPrefer a guard over the non-null assertion.
invocations[0]!is safe today only becauseisExpandable's second disjunct guaranteesinvocations.length > 0before reaching this branch — but that's an implicit cross-branch invariant, not something the compiler enforces here. As per coding guidelines: "Use type assertions sparingly. Prefer type guards and narrowing in TypeScript."♻️ Narrow instead of asserting
) : ( <Flex direction="col" className="mt-density-xs w-full min-w-0 max-w-full pl-7"> - <InvocationPanel - invocation={invocations[0]!} - invocationCount={1} - invocationIndex={0} - toolCallId={action.toolCallId} - /> + {invocations[0] && ( + <InvocationPanel + invocation={invocations[0]} + invocationCount={1} + invocationIndex={0} + toolCallId={action.toolCallId} + /> + )} </Flex> )}🤖 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 `@web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/toolCall/SubtleToolCallRow.tsx` around lines 148 - 157, Replace the non-null assertion on invocations[0] in the SubtleToolCallRow render branch with an explicit guard or narrowed conditional that verifies invocations contains an item before rendering InvocationPanel. Preserve the existing single-invocation props and ensure the empty-invocations case cannot access an undefined element.Source: Coding guidelines
🤖 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.
Nitpick comments:
In
`@web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/toolCall/SubtleToolCallRow.tsx`:
- Around line 148-157: Replace the non-null assertion on invocations[0] in the
SubtleToolCallRow render branch with an explicit guard or narrowed conditional
that verifies invocations contains an item before rendering InvocationPanel.
Preserve the existing single-invocation props and ensure the empty-invocations
case cannot access an undefined element.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 34f5d6c0-b095-41f1-b69d-ac4a0d39c4a4
📒 Files selected for processing (2)
web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeToolCallPart.test.tsxweb/packages/studio/src/routes/agents/ClaudeCodeChatRoute/toolCall/SubtleToolCallRow.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/ClaudeCodeToolCallPart.test.tsx
Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com>
37bccf3 to
c3b7d16
Compare
Summary by CodeRabbit
Summary by CodeRabbit