Skip to content

Commit fe0e482

Browse files
committed
fix: address PR feedback for jump icon on new files
- Fix openFile message to use correct path format with './' prefix - Remove duplicate chevron icon when jump icon is present - Add aria-label for accessibility - Fix styling: use mr-1 to match progressStatus icon - Remove redundant margin style from jump icon
1 parent bafb1ef commit fe0e482

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

webview-ui/src/components/chat/ChatRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ export const ChatRowContent = ({
503503
isLoading={message.partial}
504504
isExpanded={isExpanded}
505505
onToggleExpand={handleToggleExpand}
506-
onJumpToFile={() => vscode.postMessage({ type: "openFile", text: tool.path })}
506+
onJumpToFile={() => vscode.postMessage({ type: "openFile", text: "./" + tool.path })}
507507
/>
508508
</>
509509
)

webview-ui/src/components/common/CodeAccordian.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,16 @@ const CodeAccordian = ({
7272
)}
7373
{onJumpToFile && path && (
7474
<span
75-
className="codicon codicon-link-external mr-2 cursor-pointer"
76-
style={{ fontSize: 13.5, margin: "1px 0" }}
75+
className="codicon codicon-link-external mr-1"
76+
style={{ fontSize: 13.5 }}
7777
onClick={(e) => {
7878
e.stopPropagation()
7979
onJumpToFile()
8080
}}
81+
aria-label={`Open file: ${path}`}
8182
/>
8283
)}
83-
<span className={`codicon codicon-chevron-${isExpanded ? "up" : "down"}`}></span>
84+
{!onJumpToFile && <span className={`codicon codicon-chevron-${isExpanded ? "up" : "down"}`}></span>}
8485
</ToolUseBlockHeader>
8586
)}
8687
{(!hasHeader || isExpanded) && (

0 commit comments

Comments
 (0)