fix(chat): recall the current session's prompts by default; tidy the six merged PRs

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.
This commit is contained in:
Bohdan Triapitsyn
2026-09-05 20:16:14 +03:00
parent 3df97908fe
commit f46fb718c5
73 changed files with 513 additions and 242 deletions
@@ -5,7 +5,6 @@ import * as path from 'path';
import * as vscode from 'vscode';
import { BUILT_IN_SKILL_LOCATION, type DiscoveredSkill, type SkillScope, type SkillSource } from './opencodeConfig';
import type { BridgeContext } from './bridge';
import { enterSettingsSchema } from './settings-changes';
const SETTINGS_KEY = 'openchamber.settings';
const OPENCHAMBER_SHARED_SETTINGS_PATH = path.join(os.homedir(), '.config', 'openchamber', 'settings.json');
@@ -293,14 +292,6 @@ export const readSettings = (ctx?: BridgeContext): Record<string, unknown> => {
export const persistSettings = async (changes: Record<string, unknown>, ctx?: BridgeContext): Promise<Record<string, unknown>> => {
const current = readSettings(ctx);
const restChanges = stripDerived({ ...(changes || {}) });
const enterSettings = enterSettingsSchema.parse(restChanges);
for (const key of ['enterToSend', 'enterToSendConfigured'] as const) {
if (enterSettings[key] === undefined) {
delete restChanges[key];
} else {
restChanges[key] = enterSettings[key];
}
}
const keysToClear = new Set<string>();