Explorar el Código

feat(tui): focus first file in file tree (#28513)

James Long hace 3 meses
padre
commit
58143c4b07

+ 1 - 1
packages/opencode/src/cli/cmd/tui/feature-plugins/system/diff-viewer.tsx

@@ -127,7 +127,7 @@ function DiffViewer(props: { api: TuiPluginApi }) {
     const next =
       lastHighlighted !== undefined && fileRows().some((row) => row.id === lastHighlighted)
         ? lastHighlighted
-        : fileRows()[0]?.id
+        : fileRows().find((row) => row.fileIndex !== undefined)?.id
     setHighlightedFileNode(next)
   }