@fractary/codex-cli 0.10.1 → 0.10.2

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/cli.cjs CHANGED
@@ -1856,25 +1856,9 @@ function syncCommand() {
1856
1856
  ".fractary/templates/**"
1857
1857
  ];
1858
1858
  const syncConfig = config.sync;
1859
- let configIncludePatterns;
1860
- let configExcludePatterns = [];
1861
- if (syncConfig?.to_codex) {
1862
- const toCodex = syncConfig.to_codex;
1863
- if (typeof toCodex === "object" && !Array.isArray(toCodex)) {
1864
- const directionalConfig = toCodex;
1865
- configIncludePatterns = directionalConfig.include || defaultToCodexPatterns;
1866
- configExcludePatterns = directionalConfig.exclude || [];
1867
- } else if (Array.isArray(toCodex)) {
1868
- configIncludePatterns = toCodex;
1869
- configExcludePatterns = syncConfig.exclude || [];
1870
- } else {
1871
- configIncludePatterns = defaultToCodexPatterns;
1872
- configExcludePatterns = [];
1873
- }
1874
- } else {
1875
- configIncludePatterns = defaultToCodexPatterns;
1876
- configExcludePatterns = syncConfig?.exclude || [];
1877
- }
1859
+ const sdkPatterns = syncManager.getToCodexPatterns();
1860
+ const configIncludePatterns = sdkPatterns.length > 0 ? sdkPatterns : defaultToCodexPatterns;
1861
+ const configExcludePatterns = syncConfig?.to_codex?.exclude || syncConfig?.exclude || [];
1878
1862
  const includePatterns = options.include.length > 0 ? options.include : configIncludePatterns;
1879
1863
  const excludePatterns = [
1880
1864
  ...configExcludePatterns,