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 @@ -71,7 +71,11 @@ export function MessageList({
const handleImageClick = useCallback(
(url: string) => {
if (!workspaceId) return;
addFileViewerPane(workspaceId, { filePath: url, isPinned: true });
addFileViewerPane(workspaceId, {
filePath: url,
isPinned: true,
useRightSidebarOpenViewWidth: true,
});
},
[workspaceId, addFileViewerPane],
);
Expand Down Expand Up @@ -197,6 +201,7 @@ export function MessageList({
addFileViewerPane(workspaceId, {
filePath: normalizedPath,
isPinned: true,
useRightSidebarOpenViewWidth: true,
});
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ export function MessagePartsRenderer({
workspaceRoot: workspaceCwd,
});
if (!normalizedPath) return;
addFileViewerPane(workspaceId, { filePath: normalizedPath });
addFileViewerPane(workspaceId, {
filePath: normalizedPath,
useRightSidebarOpenViewWidth: true,
});
},
[addFileViewerPane, workspaceCwd, workspaceId],
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ export function ToolCallBlock({
if (!workspaceId) return;
const normalizedPath = normalizeFilePath(filePath);
if (!normalizedPath) return;
addFileViewerPane(workspaceId, { filePath: normalizedPath });
addFileViewerPane(workspaceId, {
filePath: normalizedPath,
useRightSidebarOpenViewWidth: true,
});
posthog.capture("chat_file_opened_from_tool", {
workspace_id: workspaceId,
session_id: sessionId ?? null,
Expand Down Expand Up @@ -164,6 +167,7 @@ export function ToolCallBlock({
commitHash: diffPaneTarget?.commitHash,
oldPath: diffPaneTarget?.oldPath,
viewMode: "diff",
useRightSidebarOpenViewWidth: true,
});
posthog.capture("chat_file_opened_from_tool", {
workspace_id: workspaceId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export function AssistantMessage({
addFileViewerPane(workspaceId, {
filePath: url,
isPinned: true,
useRightSidebarOpenViewWidth: true,
...(filename ? { displayName: filename } : {}),
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,19 @@ export function UserMessage({
addFileViewerPane(workspaceId, {
filePath: url,
isPinned: true,
useRightSidebarOpenViewWidth: true,
...(filename ? { displayName: filename } : {}),
});
},
[addFileViewerPane, workspaceId],
);
const openMentionedFile = useCallback(
(filePath: string) => {
addFileViewerPane(workspaceId, { filePath, isPinned: true });
addFileViewerPane(workspaceId, {
filePath,
isPinned: true,
useRightSidebarOpenViewWidth: true,
});
},
[addFileViewerPane, workspaceId],
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ export function WorkspacePage({
column: pendingWorkspaceIntent.column,
viewMode: "raw",
isPinned: true,
useRightSidebarOpenViewWidth: true,
});

markPendingWorkspaceIntentFileHandled(pendingWorkspaceIntent.id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ export function useCommandPalette({
});
return;
}
useTabsStore.getState().addFileViewerPane(targetWs, { filePath });
useTabsStore.getState().addFileViewerPane(targetWs, {
filePath,
useRightSidebarOpenViewWidth: true,
});
handleOpenChange(false);
if (targetWs !== workspaceId) {
navigateToWorkspace(targetWs, navigate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export function useKeywordSearch({ workspaceId }: UseKeywordSearchParams) {
filePath: match.path,
line: match.line,
column: match.column,
useRightSidebarOpenViewWidth: true,
});
handleOpenChange(false);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export function EmptyTabView({
filePath: memo.memoFileAbsolutePath,
displayName: memo.displayName,
isPinned: true,
useRightSidebarOpenViewWidth: true,
});
} catch (error) {
const message =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ export function GroupStrip() {
filePath: memo.memoFileAbsolutePath,
displayName: memo.displayName,
isPinned: true,
useRightSidebarOpenViewWidth: true,
});
} catch (error) {
const message =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export function AssistantMessage({
addFileViewerPane(workspaceId, {
filePath: url,
isPinned: true,
useRightSidebarOpenViewWidth: true,
...(filename ? { displayName: filename } : {}),
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,19 @@ export function UserMessage({
addFileViewerPane(workspaceId, {
filePath: url,
isPinned: true,
useRightSidebarOpenViewWidth: true,
...(filename ? { displayName: filename } : {}),
});
},
[addFileViewerPane, workspaceId],
);
const openMentionedFile = useCallback(
(filePath: string) => {
addFileViewerPane(workspaceId, { filePath, isPinned: true });
addFileViewerPane(workspaceId, {
filePath,
isPinned: true,
useRightSidebarOpenViewWidth: true,
});
},
[addFileViewerPane, workspaceId],
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ export function FileViewerContent({
line: target.line,
column: target.column,
isPinned: false,
useRightSidebarOpenViewWidth: true,
});
},
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ function ReferenceGraphInner({
filePath: absolutePath,
line,
isPinned: false,
useRightSidebarOpenViewWidth: true,
});
},
[addFileViewerPane, workspaceId],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export function useFileLinkClick({
filePath: resolvedPath,
line,
column,
useRightSidebarOpenViewWidth: true,
});
},
[terminalLinkBehavior, workspaceId, projectId, addFileViewerPane],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ export function CommitDetailsPanel({
commitHash: node.hash,
oldPath: absoluteOldPath,
openInNewTab: false,
useRightSidebarOpenViewWidth: true,
});
}}
className="grid w-full grid-cols-[14px_minmax(0,1fr)_auto] items-center gap-2 border-t border-border/50 px-3 py-2 text-left transition-colors hover:bg-muted/50 first:border-t-0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ export function RightSidebar({ isActive = true }: { isActive?: boolean }) {
viewMode: "raw",
line,
column,
useRightSidebarOpenViewWidth: true,
});
},
[workspaceId, worktreePath, addFileViewerPane],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export function useVscodeDiffSync() {
filePath: data.rightUri,
viewMode: "diff",
diffCategory: "unstaged",
useRightSidebarOpenViewWidth: true,
...(isRename ? { oldPath: data.leftUri } : {}),
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export function useVscodeOpenFileSync() {
filePath: data.filePath,
line: data.line,
viewMode: "raw",
useRightSidebarOpenViewWidth: true,
});
},
},
Expand Down
Loading