Input history (#3035) shipped with "All projects" as the default scope and only recorded prompts sent after the upgrade, so ArrowUp showed other sessions' prompts and, once switched to "Current session", nothing at all. Default to the current session and merge the visible transcript's prompts with the persisted bucket. Existing sessions recall as they did before #3035, while new prompts keep their attachments and stay recallable after a revert hides them from the transcript. Cleanup across #1855, #2297, #3072, #3178, #3035 and #3135: drop the duplicate poll guards in the file content poller, the zod schema the VS Code package cannot depend on, a copied file-URL helper and stray whitespace; move the Enter-to-send strings into the settings namespace; document OPENCHAMBER_CHATS_DIR, resolve the chats root once on the server and warm it alongside the other bootstrap calls.
15 lines
423 B
JavaScript
15 lines
423 B
JavaScript
export const DEFAULT_INPUT_HISTORY_SCOPE = 'session';
|
|
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
|
|
);
|