fix(tui): synchronize shared session clients
This commit is contained in:
@@ -22,12 +22,29 @@ describe("footerHints", () => {
|
||||
})
|
||||
|
||||
test("adapts the active-turn vocabulary to available width", () => {
|
||||
const wide = contextualFooterHints("active", 100, theme)
|
||||
const compact = contextualFooterHints("active", 72, theme)
|
||||
const wide = contextualFooterHints("active", 100, theme, "linux")
|
||||
const compact = contextualFooterHints("active", 72, theme, "linux")
|
||||
|
||||
expect(wide.chunks.map(({ text }) => text).join(""))
|
||||
.toBe("enter steer · tab queue · alt+↑ edit · ctrl+c stop")
|
||||
expect(compact.chunks.map(({ text }) => text).join(""))
|
||||
.toBe("enter steer · tab queue · ctrl+c stop")
|
||||
})
|
||||
|
||||
test("uses the native Option symbol on macOS", () => {
|
||||
const result = contextualFooterHints("active", 100, theme, "darwin")
|
||||
|
||||
expect(result.chunks.map(({ text }) => text).join(""))
|
||||
.toBe("enter steer · tab queue · ⌥↑ edit · ctrl+c stop")
|
||||
})
|
||||
|
||||
test("advertises Shift+Enter when the terminal can distinguish it", () => {
|
||||
const enhanced = contextualFooterHints("ready", 80, theme, "darwin", true)
|
||||
const legacy = contextualFooterHints("ready", 80, theme, "darwin", false)
|
||||
|
||||
expect(enhanced.chunks.map(({ text }) => text).join(""))
|
||||
.toBe("enter send · shift+enter newline · ctrl+c stop")
|
||||
expect(legacy.chunks.map(({ text }) => text).join(""))
|
||||
.toBe("enter send · ctrl+j newline · ctrl+c stop")
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user