Add Tools/Help menus and preferences dialog
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -47,8 +47,14 @@ export function workbenchById(manifest: DesktopManifest, id: string): DesktopWor
|
||||
return manifest.workbenches.find(item => item.id === id);
|
||||
}
|
||||
|
||||
const humanize = (command: string) => {
|
||||
const stripped = command.replace(/^[A-Za-z0-9]+_/, "").replace(/_/g, " ");
|
||||
const spaced = stripped.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/\s+/g, " ").trim();
|
||||
return spaced || command;
|
||||
};
|
||||
|
||||
export function commandLabel(manifest: DesktopManifest, command: string): string {
|
||||
return manifest.commandMetadata[command]?.menuText?.trim() || command;
|
||||
return manifest.commandMetadata[command]?.menuText?.trim() || humanize(command);
|
||||
}
|
||||
|
||||
export function commandTooltip(manifest: DesktopManifest, command: string): string {
|
||||
|
||||
Reference in New Issue
Block a user