feat(chat): persist more composer input history with global or session scope; recallable with up/down arrow keys (#3035)
* 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>
This commit is contained in:
committed by
GitHub
co-authored by
Bohdan Triapitsyn
parent
29480383cc
commit
1d6b15bc04
@@ -0,0 +1,14 @@
|
||||
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
|
||||
);
|
||||
Reference in New Issue
Block a user