Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3016,10 +3016,11 @@ const AgentManagerContent: Component = () => {
onClose={() => setSidePanel(null)}
onExpand={selection() !== null ? openReviewTab : undefined}
onRequestDiff={requestDiffFile}
onOpenFile={(file) => {
onOpenFile={(file, line) => {
const id = currentDiffSessionId()
if (id) vscode.postMessage({ type: "agentManager.openFile", sessionId: id, filePath: file })
else if (selection() === LOCAL) vscode.postMessage({ type: "openFile", filePath: file })
if (id)
vscode.postMessage({ type: "agentManager.openFile", sessionId: id, filePath: file, line })
else if (selection() === LOCAL) vscode.postMessage({ type: "openFile", filePath: file, line })
}}
onRevertFile={revertCtl.revert}
revertingFiles={revertCtl.reverting()}
Expand All @@ -3044,10 +3045,10 @@ const AgentManagerContent: Component = () => {
diffStyle={reviewDiffStyle()}
onDiffStyleChange={setSharedDiffStyle}
onRequestDiff={requestDiffFile}
onOpenFile={(file) => {
onOpenFile={(file, line) => {
const id = currentDiffSessionId()
if (id) vscode.postMessage({ type: "agentManager.openFile", sessionId: id, filePath: file })
else if (selection() === LOCAL) vscode.postMessage({ type: "openFile", filePath: file })
if (id) vscode.postMessage({ type: "agentManager.openFile", sessionId: id, filePath: file, line })
else if (selection() === LOCAL) vscode.postMessage({ type: "openFile", filePath: file, line })
}}
onRevertFile={revertCtl.revert}
revertingFiles={revertCtl.reverting()}
Expand Down
6 changes: 5 additions & 1 deletion packages/kilo-vscode/webview-ui/agent-manager/DiffPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ interface DiffPanelProps {
onClose: () => void
onExpand?: () => void
onRequestDiff?: (file: string) => void
onOpenFile?: (relativePath: string) => void
onOpenFile?: (relativePath: string, line?: number) => void
onRevertFile?: (file: string) => void
revertingFiles?: Set<string>
}
Expand Down Expand Up @@ -520,6 +520,10 @@ export const DiffPanel: Component<DiffPanelProps> = (props) => {
renderAnnotation={buildAnnotation}
enableGutterUtility={true}
onGutterUtilityClick={(result) => handleGutterClick(diff.file, result)}
onLineNumberClick={(event) => {
if (event.annotationSide === "deletions") return
props.onOpenFile?.(diff.file, event.lineNumber)
}}
/>
</Show>
</Show>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ interface FullScreenDiffViewProps {
diffStyle: DiffStyle
onDiffStyleChange: (style: DiffStyle) => void
onRequestDiff?: (file: string) => void
onOpenFile?: (relativePath: string) => void
onOpenFile?: (relativePath: string, line?: number) => void
onRevertFile?: (file: string) => void
revertingFiles?: Set<string>
onClose: () => void
Expand Down Expand Up @@ -596,6 +596,10 @@ export const FullScreenDiffView: Component<FullScreenDiffViewProps> = (props) =>
renderAnnotation={buildAnnotation}
enableGutterUtility={true}
onGutterUtilityClick={(result) => handleGutterClick(diff.file, result)}
onLineNumberClick={(event) => {
if (event.annotationSide === "deletions") return
props.onOpenFile?.(diff.file, event.lineNumber)
}}
/>
</Show>
</Show>
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/pierre/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const unsafeCSS = `
}

&[data-interactive-line-numbers] [data-column-number] {
cursor: default !important;
cursor: pointer !important;
}

&[data-interactive-lines] [data-line] {
Expand Down
Loading