@fractary/codex-cli 0.10.7 → 0.10.9

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
@@ -2115,14 +2115,20 @@ Total: ${plan.totalFiles} files (${formatBytes(plan.totalBytes)})`));
2115
2115
  console.log(chalk7__default.default.blue("Committing and pushing to codex..."));
2116
2116
  }
2117
2117
  const { RepoManager } = await import('@fractary/core/repo');
2118
- const repoManager = new RepoManager({}, codexRepoPath);
2119
- await repoManager.stageAll();
2120
- await repoManager.commit({
2121
- message: `Sync ${result.synced} files from ${projectName}`
2122
- });
2123
- await repoManager.push({});
2124
- if (!options.json) {
2125
- console.log(chalk7__default.default.dim(" Changes pushed to codex repository"));
2118
+ const repoManager = new RepoManager({ platform: "github" }, codexRepoPath);
2119
+ repoManager.stageAll();
2120
+ if (repoManager.isClean()) {
2121
+ if (!options.json) {
2122
+ console.log(chalk7__default.default.dim(" No changes to push - codex is already up to date"));
2123
+ }
2124
+ } else {
2125
+ repoManager.commit({
2126
+ message: `Sync ${result.synced} files from ${projectName}`
2127
+ });
2128
+ repoManager.push({});
2129
+ if (!options.json) {
2130
+ console.log(chalk7__default.default.dim(" Changes pushed to codex repository"));
2131
+ }
2126
2132
  }
2127
2133
  } catch (error) {
2128
2134
  console.error(chalk7__default.default.red("Error pushing to codex:"), error.message);