1package soy.iko.opencode.data.model
3import androidx.compose.runtime.Immutable
4import kotlinx.serialization.Serializable
6/** Entry from `GET /file?path=` (directory listing). */
10 val name: String = "",
11 val path: String = "",
12 val type: String? = null,
14 val isDirectory: Boolean get() = type == "directory"
17/** Response of `GET /file/content?path=`. */
20data class FileContent(
21 val type: String? = null, // "text" | "binary"
22 val content: String = "",
23 val diff: String? = null,
24 val mimeType: String? = null,
25 val encoding: String? = null,
27 val isBinary: Boolean get() = type == "binary" || encoding == "base64"
30/** Entry from `GET /file/status` (VCS status). */
33data class FileStatusEntry(
34 val path: String = "",
37 val status: String? = null, // "added" | "deleted" | "modified"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list