diff --git a/packages/tui/src/component/dialog-workspace-file-changes.tsx b/packages/tui/src/component/dialog-workspace-file-changes.tsx index 99135d07538..6f35d38341b 100644 --- a/packages/tui/src/component/dialog-workspace-file-changes.tsx +++ b/packages/tui/src/component/dialog-workspace-file-changes.tsx @@ -13,7 +13,7 @@ const options = ["no", "yes"] as const export type WorkspaceFileChangesChoice = (typeof options)[number] -function statusLabel(status: VcsFileStatus["status"]) { +export function statusLabel(status: VcsFileStatus["status"]) { if (status === "added") return "A" if (status === "deleted") return "D" return "M" diff --git a/packages/tui/src/routes/session/index.tsx b/packages/tui/src/routes/session/index.tsx index d75c1e0bd8d..d32bb035622 100644 --- a/packages/tui/src/routes/session/index.tsx +++ b/packages/tui/src/routes/session/index.tsx @@ -57,6 +57,7 @@ import { useDialog } from "../../ui/dialog" import { DialogSelect } from "../../ui/dialog-select" import { DialogSessionRename } from "../../component/dialog-session-rename" import { DialogImagePreview } from "../../component/dialog-image-preview" +import { statusLabel } from "../../component/dialog-workspace-file-changes" import { DialogMessage } from "./dialog-message" import { DialogFork } from "./dialog-fork" import { DialogTimeline } from "./dialog-timeline" @@ -2088,12 +2089,6 @@ function CompactionQueued() { ) } -function statusLabel(status: "added" | "modified" | "deleted") { - if (status === "added") return "A" - if (status === "deleted") return "D" - return "M" -} - function RevertMessage(props: { count: number files: ReadonlyArray<{