7fb18faf4c
packages/ai: - feat: expose provider responseId on AssistantMessage - feat: lazy-load provider modules for faster startup - fix: hash foreign Responses API tool call IDs exceeding 64-char limit - fix: ignore null chunks in openai-completions streams - fix: keep image tool results inline for Gemini 3+ and Antigravity - fix: correct Bedrock Claude 4.6 context window to 200k - fix: support prompt caching for Bedrock application inference profiles - fix: add OpenRouter reasoning payload format - fix: ignore placeholder Vertex API keys - fix: skip AJV validation in restricted runtimes - fix: Anthropic OAuth client injection and responseId extraction - fix: Codex incomplete/failed response status handling packages/agent: - fix: defer steering until after tool execution completes packages/tui: - feat: namespaced keybinding IDs with KeybindingsManager conflict detection - feat: configurable select list column sizing (#2154 by @markusylisiurunen) - fix: stream truncateToWidth for large strings - fix: skip Termux height redraws - fix: stop evicting unrelated default keybindings - fix: resolve raw backspace ambiguity on Windows Terminal - fix: clear stale scrollback on session switch (#2155 by @Perlence) - fix: remove trailing markdown block spacing (#2152 by @markusylisiurunen) packages/coding-agent: - feat: add resizable share sidebar (#2435 by @dmmulroy) - feat: emit OSC 133 command-executed marker - feat: reload custom themes from disk watcher - feat: add --fork session flag - feat: file mutation queue for serialized writes - feat: initial message consolidation utility - fix: keybindings migrated to namespaced IDs - fix: resolve waitForRetry() race when auto-retry produces tool calls - fix: handle slash-delimited /model refs - fix: refresh active model after provider updates - fix: extended transient error patterns for retry
45 lines
1.5 KiB
TypeScript
45 lines
1.5 KiB
TypeScript
import { describe, expect, it } from "bun:test";
|
|
import { buildHotkeysMarkdown } from "../../../src/modes/utils/hotkeys-markdown";
|
|
|
|
describe("buildHotkeysMarkdown", () => {
|
|
it("emits flush-left markdown so headings and tables are parsed instead of treated as indented text", () => {
|
|
const displayStrings: Record<string, string> = {
|
|
"app.clipboard.copyLine": "Alt+Shift+L",
|
|
"app.clipboard.copyPrompt": "Ctrl+Shift+P",
|
|
"app.plan.toggle": "Alt+M",
|
|
"app.tools.expand": "Ctrl+O",
|
|
"app.interrupt": "Esc",
|
|
"app.clear": "Ctrl+C",
|
|
"app.exit": "Ctrl+D",
|
|
"app.suspend": "Ctrl+Z",
|
|
"app.thinking.cycle": "Shift+Tab",
|
|
"app.model.cycleForward": "Ctrl+P",
|
|
"app.model.cycleBackward": "Shift+Ctrl+P",
|
|
"app.model.select": "Ctrl+L",
|
|
"app.history.search": "Ctrl+R",
|
|
"app.thinking.toggle": "Ctrl+T",
|
|
"app.editor.external": "Ctrl+G",
|
|
"app.clipboard.pasteImage": "Ctrl+V",
|
|
"app.stt.toggle": "Alt+H",
|
|
};
|
|
const markdown = buildHotkeysMarkdown({
|
|
keybindings: {
|
|
getDisplayString(action) {
|
|
return displayStrings[action] ?? "Disabled";
|
|
},
|
|
},
|
|
});
|
|
|
|
const lines = markdown.split("\n");
|
|
expect(lines[0]).toBe("**Navigation**");
|
|
expect(markdown).toContain("| `Ctrl+Shift+P` | Copy whole prompt |");
|
|
expect(markdown).toContain("| `Alt+M` | Toggle plan mode |");
|
|
expect(markdown).toContain("| `#` | Open prompt actions |");
|
|
for (const line of lines) {
|
|
if (line.length === 0) continue;
|
|
expect(line.startsWith(" ")).toBe(false);
|
|
expect(line.startsWith("\t")).toBe(false);
|
|
}
|
|
});
|
|
});
|