* feat(chat): persist input history * feat(settings): configure input history scope * fix(web): keep input history validation packaged * fix(chat): preserve input history across tabs * fix(settings): restore prompt history limit * fix(settings): keep history deletion warning visible * fix(i18n): restore Turkish Git empty state translations --------- Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
15 lines
422 B
JavaScript
15 lines
422 B
JavaScript
export const DEFAULT_INPUT_HISTORY_SCOPE = 'global';
|
|
export const DEFAULT_INPUT_HISTORY_LIMIT = 40;
|
|
const MIN_INPUT_HISTORY_LIMIT = 1;
|
|
const MAX_INPUT_HISTORY_LIMIT = 100;
|
|
|
|
export const isInputHistoryScope = (value) => (
|
|
value === 'global' || value === 'session'
|
|
);
|
|
|
|
export const isInputHistoryLimit = (value) => (
|
|
Number.isInteger(value)
|
|
&& value >= MIN_INPUT_HISTORY_LIMIT
|
|
&& value <= MAX_INPUT_HISTORY_LIMIT
|
|
);
|