@@ -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 ] : {
0 commit comments