fixed prompt mode
diff will start editor in any case
rewrite to TypeScript