- 品牌替换:OpenCode/opencode → AirCoding/aircoding(16+ 文件) - Logo ASCII art:修复 left/right 行数不匹配导致的启动崩溃 - 启动诊断:添加 OPENCODE_PRINT_TIMING 计时探针 - dev 模式默认 --pure 跳过外部插件加载 - AGENTS.md 模板:追加 AirCoding 多 Agent 专项段落 - architect prompt + plugin:强化 AGENTS.md 产出验证
36 lines
1.4 KiB
TypeScript
36 lines
1.4 KiB
TypeScript
import { describe, expect, test } from "bun:test"
|
|
import { footerWidthPolicy } from "@/cli/cmd/run/footer.width"
|
|
|
|
describe("run footer width", () => {
|
|
test("preserves shared dialog and statusline breakpoints", () => {
|
|
const narrow = footerWidthPolicy(79)
|
|
expect(narrow.dialog.narrow).toBe(true)
|
|
expect(narrow.statusline.showActivityMeta).toBe(false)
|
|
expect(narrow.statusline.showCommandHint).toBe(true)
|
|
expect(narrow.statusline.showContextHints).toBe(false)
|
|
expect(narrow.statusline.contextHintLimit).toBe(0)
|
|
expect(narrow.statusline.showModel).toBe(false)
|
|
|
|
const command = footerWidthPolicy(65)
|
|
expect(command.statusline.showCommandHint).toBe(false)
|
|
|
|
const commandHint = footerWidthPolicy(66)
|
|
expect(commandHint.statusline.showCommandHint).toBe(true)
|
|
|
|
const compact = footerWidthPolicy(80)
|
|
expect(compact.dialog.narrow).toBe(false)
|
|
expect(compact.statusline.showActivityMeta).toBe(true)
|
|
expect(compact.statusline.showContextHints).toBe(true)
|
|
expect(compact.statusline.contextHintLimit).toBe(1)
|
|
expect(compact.statusline.showModel).toBe(false)
|
|
|
|
const model = footerWidthPolicy(120)
|
|
expect(model.statusline.contextHintLimit).toBe(2)
|
|
expect(model.statusline.showModel).toBe(true)
|
|
|
|
const spacious = footerWidthPolicy(150)
|
|
expect(spacious.statusline.contextHintLimit).toBeUndefined()
|
|
expect(spacious.statusline.showModel).toBe(true)
|
|
})
|
|
})
|