codexuse-cli 2.4.20 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -209,7 +209,8 @@ function createDefaultAppState() {
209
209
  folderHistory: [],
210
210
  pinnedPaths: []
211
211
  },
212
- projectSettingsByPath: {},
212
+ runtimeSettings: {},
213
+ workspaceSettingsByPath: {},
213
214
  conversationCategoriesByCwd: {},
214
215
  conversationCategoryAssignmentsByCwd: {},
215
216
  git: {
@@ -343,9 +344,22 @@ function normalizeAppState(raw) {
343
344
  }
344
345
  }
345
346
  }
346
- if (!isRecord(merged.projectSettingsByPath)) {
347
- merged.projectSettingsByPath = {};
347
+ if (!isRecord(merged.runtimeSettings)) {
348
+ merged.runtimeSettings = {};
348
349
  }
350
+ const legacyProjectSettingsByPath = isRecord(
351
+ raw.projectSettingsByPath
352
+ ) ? raw.projectSettingsByPath : null;
353
+ if (!isRecord(merged.workspaceSettingsByPath)) {
354
+ merged.workspaceSettingsByPath = {};
355
+ }
356
+ if (legacyProjectSettingsByPath) {
357
+ merged.workspaceSettingsByPath = {
358
+ ...legacyProjectSettingsByPath,
359
+ ...merged.workspaceSettingsByPath
360
+ };
361
+ }
362
+ delete merged.projectSettingsByPath;
349
363
  if (!isRecord(merged.conversationCategoriesByCwd)) {
350
364
  merged.conversationCategoriesByCwd = {};
351
365
  }
@@ -633,7 +647,9 @@ async function readCodexSettingsJsonRaw() {
633
647
  subagentSystemNotificationsEnabled: state.preferences.subagentSystemNotificationsEnabled,
634
648
  folderHistory: state.preferences.folderHistory,
635
649
  pinnedPaths: state.preferences.pinnedPaths,
636
- projectSettingsByPath: state.projectSettingsByPath,
650
+ workspaceSettingsByPath: state.workspaceSettingsByPath,
651
+ // Legacy compatibility for older consumers.
652
+ projectSettingsByPath: state.workspaceSettingsByPath,
637
653
  categoriesByCwd: state.conversationCategoriesByCwd,
638
654
  conversationCategoryByCwd: state.conversationCategoryAssignmentsByCwd,
639
655
  git: state.git,
@@ -688,7 +704,7 @@ async function writeCodexSettingsJsonRaw(payload) {
688
704
  folderHistory: Array.isArray(payload.folderHistory) ? payload.folderHistory : void 0,
689
705
  pinnedPaths: Array.isArray(payload.pinnedPaths) ? payload.pinnedPaths : void 0
690
706
  },
691
- projectSettingsByPath: isRecord2(payload.projectSettingsByPath) ? payload.projectSettingsByPath : void 0,
707
+ workspaceSettingsByPath: isRecord2(payload.workspaceSettingsByPath) ? payload.workspaceSettingsByPath : isRecord2(payload.projectSettingsByPath) ? payload.projectSettingsByPath : void 0,
692
708
  conversationCategoriesByCwd: isRecord2(payload.categoriesByCwd) ? payload.categoriesByCwd : void 0,
693
709
  conversationCategoryAssignmentsByCwd: isRecord2(payload.conversationCategoryByCwd) ? payload.conversationCategoryByCwd : void 0,
694
710
  git: isRecord2(payload.git) ? payload.git : void 0,
@@ -4719,7 +4735,7 @@ function mergeLegacyLocalStoragePatch(payload) {
4719
4735
  }
4720
4736
  const projectSettings = payload["project-settings-storage"];
4721
4737
  if (isRecord5(projectSettings) && isRecord5(projectSettings.settingsByPath)) {
4722
- patch.projectSettingsByPath = projectSettings.settingsByPath;
4738
+ patch.workspaceSettingsByPath = projectSettings.settingsByPath;
4723
4739
  markSkippedIfPresent("project-settings-storage", true);
4724
4740
  } else {
4725
4741
  markSkippedIfPresent("project-settings-storage", false);
@@ -4848,9 +4864,9 @@ async function runStorageMigrationV1() {
4848
4864
  preferences: { ...acc.preferences ?? {}, ...patch.preferences ?? {} },
4849
4865
  sync: { ...acc.sync ?? {}, ...patch.sync ?? {} },
4850
4866
  profilesByName: { ...acc.profilesByName ?? {}, ...patch.profilesByName ?? {} },
4851
- projectSettingsByPath: {
4852
- ...acc.projectSettingsByPath ?? {},
4853
- ...patch.projectSettingsByPath ?? {}
4867
+ workspaceSettingsByPath: {
4868
+ ...acc.workspaceSettingsByPath ?? {},
4869
+ ...patch.workspaceSettingsByPath ?? {}
4854
4870
  },
4855
4871
  conversationCategoriesByCwd: {
4856
4872
  ...acc.conversationCategoriesByCwd ?? {},
@@ -4899,9 +4915,9 @@ async function runStorageMigrationV1() {
4899
4915
  ...state.profilesByName,
4900
4916
  ...mergedPatch.profilesByName ?? {}
4901
4917
  },
4902
- projectSettingsByPath: {
4903
- ...state.projectSettingsByPath,
4904
- ...mergedPatch.projectSettingsByPath ?? {}
4918
+ workspaceSettingsByPath: {
4919
+ ...state.workspaceSettingsByPath,
4920
+ ...mergedPatch.workspaceSettingsByPath ?? {}
4905
4921
  },
4906
4922
  conversationCategoriesByCwd: {
4907
4923
  ...state.conversationCategoriesByCwd,
@@ -4988,9 +5004,9 @@ async function importLegacyLocalStorageOnce(payload) {
4988
5004
  }
4989
5005
  },
4990
5006
  preferences: { ...state.preferences, ...patch.preferences ?? {} },
4991
- projectSettingsByPath: {
4992
- ...state.projectSettingsByPath,
4993
- ...patch.projectSettingsByPath ?? {}
5007
+ workspaceSettingsByPath: {
5008
+ ...state.workspaceSettingsByPath,
5009
+ ...patch.workspaceSettingsByPath ?? {}
4994
5010
  },
4995
5011
  conversationCategoriesByCwd: {
4996
5012
  ...state.conversationCategoriesByCwd,
@@ -5020,7 +5036,7 @@ async function importLegacyLocalStorageOnce(payload) {
5020
5036
  }
5021
5037
 
5022
5038
  // src/index.ts
5023
- var VERSION = true ? "2.4.20" : "0.0.0";
5039
+ var VERSION = true ? "2.5.1" : "0.0.0";
5024
5040
  var cliStorageReadyPromise = null;
5025
5041
  async function ensureCliStorageReady() {
5026
5042
  if (cliStorageReadyPromise) {