diff --git a/packages/ui/src/components/instance/shell/right-panel/tabs/ChangesTab.tsx b/packages/ui/src/components/instance/shell/right-panel/tabs/ChangesTab.tsx index 2a038531..9821d3c5 100644 --- a/packages/ui/src/components/instance/shell/right-panel/tabs/ChangesTab.tsx +++ b/packages/ui/src/components/instance/shell/right-panel/tabs/ChangesTab.tsx @@ -68,16 +68,6 @@ const ChangesTab: Component = (props) => { const scopeKey = `${props.instanceId}:${hasSession ? sessionId : "no-session"}` - const isBinaryDiff = (item: any) => { - const before = typeof item?.before === "string" ? item.before : "" - const after = typeof item?.after === "string" ? item.after : "" - if (before.length === 0 && after.length === 0) { - // OpenCode stores empty before/after for binaries. - return true - } - return false - } - const emptyViewerMessage = () => { if (!hasSession) return props.t("instanceShell.sessionChanges.noSessionSelected") if (diffs === undefined) return props.t("instanceShell.sessionChanges.loading") @@ -97,7 +87,7 @@ const ChangesTab: Component = (props) => {
0} + when={selectedFileData && hasSession && Array.isArray(diffs) && diffs.length > 0 ? selectedFileData : null} fallback={
{emptyViewerMessage()} @@ -105,23 +95,14 @@ const ChangesTab: Component = (props) => { } > {(file) => ( - - Binary file cannot be displayed -
- } - > - -
+ )}