@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
26 lines • 831 B
JavaScript
/**
* List the tip catalog as JSON
*/
import { KeybindingsManager } from "../core/keybindings.js";
import { TIP_DEFINITIONS } from "../modes/interactive/tips/registry.js";
/**
* Render every catalog tip with the default keybindings
*/
export function collectTips() {
const keybindings = new KeybindingsManager();
const keys = (binding) => keybindings.getKeys(binding).join("/");
return TIP_DEFINITIONS.map((tip) => {
const text = tip.render(keys);
if (tip.requiresCommand !== undefined) {
return { id: tip.id, text, requiresCommand: tip.requiresCommand };
}
return { id: tip.id, text };
});
}
/**
* Print the tip catalog as a JSON array
*/
export function listTips() {
console.log(JSON.stringify(collectTips(), null, 2));
}
//# sourceMappingURL=list-tips.js.map