fix(tmux): treat busy sessions as attachable

This commit is contained in:
Momentum96
2026-05-08 00:31:59 +09:00
committed by YeonGyu-Kim
parent efb862ce9f
commit e90ff8058e
2 changed files with 19 additions and 1 deletions
@@ -0,0 +1,18 @@
/// <reference types="bun-types" />
import { describe, expect, test } from "bun:test"
import { isAttachableSessionStatus } from "./attachable-session-status"
describe("isAttachableSessionStatus", () => {
test("#given a busy session #when checking attachability #then it is attachable", () => {
//#given
const status = "busy"
//#when
const attachable = isAttachableSessionStatus(status)
//#then
expect(attachable).toBe(true)
})
})
@@ -1,4 +1,4 @@
const ATTACHABLE_SESSION_STATUSES = ["idle", "running"] as const
const ATTACHABLE_SESSION_STATUSES = ["idle", "running", "busy"] as const
export type AttachableSessionStatus = (typeof ATTACHABLE_SESSION_STATUSES)[number]