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:
Matt Visnovsky
2026-09-05 19:19:03 +03:00
committed by GitHub
co-authored by Bohdan Triapitsyn
parent 29480383cc
commit 1d6b15bc04
49 changed files with 3353 additions and 458 deletions
@@ -1,4 +1,10 @@
import { isAgentMemoryFeatureAvailable } from '../agent-memory/feature-flag.js';
import {
DEFAULT_INPUT_HISTORY_LIMIT,
DEFAULT_INPUT_HISTORY_SCOPE,
isInputHistoryLimit,
isInputHistoryScope,
} from './input-history-scope.js';
export const createSettingsHelpers = (dependencies) => {
const {
@@ -140,6 +146,12 @@ export const createSettingsHelpers = (dependencies) => {
if (typeof candidate.themeVariant === 'string' && (candidate.themeVariant === 'light' || candidate.themeVariant === 'dark')) {
result.themeVariant = candidate.themeVariant;
}
if (typeof candidate.inputHistoryScope === 'string' && isInputHistoryScope(candidate.inputHistoryScope)) {
result.inputHistoryScope = candidate.inputHistoryScope;
}
if (isInputHistoryLimit(candidate.inputHistoryLimit)) {
result.inputHistoryLimit = candidate.inputHistoryLimit;
}
if (typeof candidate.useSystemTheme === 'boolean') {
result.useSystemTheme = candidate.useSystemTheme;
}
@@ -940,6 +952,8 @@ export const createSettingsHelpers = (dependencies) => {
const pwaAppName = normalizePwaAppName(settings?.pwaAppName, '');
const pwaOrientation = normalizePwaOrientation(settings?.pwaOrientation, 'system');
const mobileKeyboardMode = normalizeMobileKeyboardMode(settings?.mobileKeyboardMode, 'native');
const inputHistoryScope = sanitized.inputHistoryScope ?? DEFAULT_INPUT_HISTORY_SCOPE;
const inputHistoryLimit = sanitized.inputHistoryLimit ?? DEFAULT_INPUT_HISTORY_LIMIT;
return {
...sanitized,
@@ -950,6 +964,8 @@ export const createSettingsHelpers = (dependencies) => {
...(pwaAppName ? { pwaAppName } : {}),
pwaOrientation,
mobileKeyboardMode,
inputHistoryScope,
inputHistoryLimit,
securityScopedBookmarks: bookmarks,
pinnedDirectories: normalizeStringArray(settings.pinnedDirectories),
typographySizes: sanitizeTypographySizesPartial(settings.typographySizes),