feat: add review shortcut confirmation setting
This commit is contained in:
@@ -4,7 +4,8 @@ import type { AskConfig, AskConfigFileV1 } from "./schema.ts";
|
||||
export const DEFAULT_ASK_CONFIG: AskConfig = {
|
||||
behaviour: {
|
||||
autoSubmitWhenAnsweredWithoutNotes: false,
|
||||
confirmDismissWhenDirty: false,
|
||||
confirmDismissWhenDirty: true,
|
||||
doublePressReviewShortcuts: true,
|
||||
showFooterHints: true,
|
||||
},
|
||||
keymaps: {
|
||||
@@ -23,6 +24,9 @@ export function normalizeAskConfig(
|
||||
confirmDismissWhenDirty:
|
||||
config?.behaviour?.confirmDismissWhenDirty ??
|
||||
DEFAULT_ASK_CONFIG.behaviour.confirmDismissWhenDirty,
|
||||
doublePressReviewShortcuts:
|
||||
config?.behaviour?.doublePressReviewShortcuts ??
|
||||
DEFAULT_ASK_CONFIG.behaviour.doublePressReviewShortcuts,
|
||||
showFooterHints:
|
||||
config?.behaviour?.showFooterHints ??
|
||||
DEFAULT_ASK_CONFIG.behaviour.showFooterHints,
|
||||
@@ -42,6 +46,8 @@ export function toAskConfigFileV1(config: AskConfig): AskConfigFileV1 {
|
||||
autoSubmitWhenAnsweredWithoutNotes:
|
||||
normalized.behaviour.autoSubmitWhenAnsweredWithoutNotes,
|
||||
confirmDismissWhenDirty: normalized.behaviour.confirmDismissWhenDirty,
|
||||
doublePressReviewShortcuts:
|
||||
normalized.behaviour.doublePressReviewShortcuts,
|
||||
showFooterHints: normalized.behaviour.showFooterHints,
|
||||
},
|
||||
keymaps: {
|
||||
|
||||
@@ -7,6 +7,7 @@ export const AskConfigFileV1Schema = Type.Object({
|
||||
Type.Object({
|
||||
autoSubmitWhenAnsweredWithoutNotes: Type.Optional(Type.Boolean()),
|
||||
confirmDismissWhenDirty: Type.Optional(Type.Boolean()),
|
||||
doublePressReviewShortcuts: Type.Optional(Type.Boolean()),
|
||||
showFooterHints: Type.Optional(Type.Boolean()),
|
||||
})
|
||||
),
|
||||
@@ -37,6 +38,7 @@ export interface AskConfig {
|
||||
behaviour: {
|
||||
autoSubmitWhenAnsweredWithoutNotes: boolean;
|
||||
confirmDismissWhenDirty: boolean;
|
||||
doublePressReviewShortcuts: boolean;
|
||||
showFooterHints: boolean;
|
||||
};
|
||||
keymaps: AskConfigKeymaps;
|
||||
|
||||
Reference in New Issue
Block a user