Skip to content

Commit cf0df96

Browse files
committed
Settings adjastments
1 parent f501e65 commit cf0df96

3 files changed

Lines changed: 13 additions & 12 deletions

File tree

apps/desktop/src/app/store/settingsStore.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,13 @@ const defaults: Settings = {
141141
openLastVaultOnLaunch: true,
142142
editorFontSize: 14,
143143
editorFontFamily: "system",
144-
editorLineHeight: 150,
145-
editorContentWidth: 860,
144+
editorLineHeight: 175,
145+
editorContentWidth: 940,
146146
lineWrapping: true,
147147
justifyText: false,
148148
livePreviewEnabled: true,
149149
inlineReviewEnabled: true,
150-
tabSize: 4,
150+
tabSize: 2,
151151
editorSpellcheck: true,
152152
spellcheckPrimaryLanguage: "system",
153153
spellcheckSecondaryLanguage: null,

apps/desktop/src/features/ai/store/chatStore.test.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -566,13 +566,13 @@ describe("chatStore", () => {
566566
useVaultStore.setState({ vaultPath: "/vaults/one" });
567567
resetChatStore();
568568

569-
expect(useChatStore.getState().autoContextEnabled).toBe(true);
569+
expect(useChatStore.getState().autoContextEnabled).toBe(false);
570570

571571
useChatStore.getState().toggleAutoContext();
572572

573-
expect(useChatStore.getState().autoContextEnabled).toBe(false);
573+
expect(useChatStore.getState().autoContextEnabled).toBe(true);
574574
expect(localStorage.getItem(getAutoContextKey("/vaults/one"))).toBe(
575-
"false",
575+
"true",
576576
);
577577
expect(localStorage.getItem(AI_PREFS_KEY)).toBeNull();
578578
});
@@ -678,7 +678,7 @@ describe("chatStore", () => {
678678

679679
useVaultStore.setState({ vaultPath: "/vaults/one" });
680680
resetChatStore();
681-
expect(useChatStore.getState().autoContextEnabled).toBe(true);
681+
expect(useChatStore.getState().autoContextEnabled).toBe(false);
682682

683683
localStorage.setItem(
684684
AI_PREFS_KEY,
@@ -697,7 +697,7 @@ describe("chatStore", () => {
697697
vi.advanceTimersByTime(80);
698698

699699
expect(useChatStore.getState().editDiffZoom).toBe(0.8);
700-
expect(useChatStore.getState().autoContextEnabled).toBe(true);
700+
expect(useChatStore.getState().autoContextEnabled).toBe(false);
701701

702702
localStorage.setItem(getAutoContextKey("/vaults/two"), "false");
703703
window.dispatchEvent(
@@ -708,7 +708,7 @@ describe("chatStore", () => {
708708
);
709709

710710
vi.advanceTimersByTime(80);
711-
expect(useChatStore.getState().autoContextEnabled).toBe(true);
711+
expect(useChatStore.getState().autoContextEnabled).toBe(false);
712712

713713
localStorage.setItem(getAutoContextKey("/vaults/one"), "false");
714714
window.dispatchEvent(
@@ -869,6 +869,7 @@ describe("chatStore", () => {
869869
await useChatStore.getState().initialize();
870870
const activeSessionId = getActiveSessionId();
871871
useChatStore.setState((state) => ({
872+
autoContextEnabled: true,
872873
sessionsById: {
873874
...state.sessionsById,
874875
[activeSessionId]: {

apps/desktop/src/features/ai/store/chatStore.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,11 @@ function loadAutoContextPreference(vaultPath: string | null) {
289289
if (raw === "true") return true;
290290
if (raw === "false") return false;
291291
} catch {
292-
return true;
292+
return false;
293293
}
294294

295295
const legacyPrefs = loadAiPreferences();
296-
return legacyPrefs.autoContextEnabled !== false;
296+
return legacyPrefs.autoContextEnabled === true;
297297
}
298298

299299
function saveAutoContextPreference(
@@ -5062,7 +5062,7 @@ export const useChatStore = create<ChatStore>((set, get) => {
50625062
notePickerOpen: false,
50635063
historyViewOpen: false,
50645064
historySelectedSessionId: null,
5065-
autoContextEnabled: true,
5065+
autoContextEnabled: false,
50665066
requireCmdEnterToSend: DEFAULT_AI_PREFERENCES.requireCmdEnterToSend,
50675067
composerFontSize: DEFAULT_AI_PREFERENCES.composerFontSize,
50685068
chatFontSize: DEFAULT_AI_PREFERENCES.chatFontSize,

0 commit comments

Comments
 (0)