@devboxer/cli 0.2.0 → 0.3.0
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 +38 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -524,7 +524,7 @@ async function saveSessionData(sessionId, cwdWithHyphens, jsonl) {
|
|
|
524
524
|
await fs2.writeFile(jsonlPath, jsonlContent);
|
|
525
525
|
return jsonlPath;
|
|
526
526
|
}
|
|
527
|
-
async function processSessionData(data, setProcessingStatus, onComplete) {
|
|
527
|
+
async function processSessionData(data, setProcessingStatus, onComplete, sessionOnly) {
|
|
528
528
|
try {
|
|
529
529
|
setProcessingStatus("Finding git repository root...");
|
|
530
530
|
const { gitRoot, error: gitError } = await findGitRoot();
|
|
@@ -533,7 +533,7 @@ async function processSessionData(data, setProcessingStatus, onComplete) {
|
|
|
533
533
|
}
|
|
534
534
|
process.chdir(gitRoot);
|
|
535
535
|
setProcessingStatus(`Changed to git root: ${gitRoot}`);
|
|
536
|
-
if (data.branchName) {
|
|
536
|
+
if (data.branchName && !sessionOnly) {
|
|
537
537
|
setProcessingStatus(
|
|
538
538
|
`Pulling latest version of branch: ${data.branchName}`
|
|
539
539
|
);
|
|
@@ -541,11 +541,23 @@ async function processSessionData(data, setProcessingStatus, onComplete) {
|
|
|
541
541
|
data.branchName
|
|
542
542
|
);
|
|
543
543
|
if (!success) {
|
|
544
|
-
|
|
544
|
+
if (!data.hasChanges) {
|
|
545
|
+
setProcessingStatus(
|
|
546
|
+
`\u2139 This is a plan-only session with no code changes`
|
|
547
|
+
);
|
|
548
|
+
setProcessingStatus(
|
|
549
|
+
` Pulling conversation history only (skipping git checkout)`
|
|
550
|
+
);
|
|
551
|
+
} else {
|
|
552
|
+
return { success: false, error: branchError };
|
|
553
|
+
}
|
|
554
|
+
} else {
|
|
555
|
+
setProcessingStatus(
|
|
556
|
+
`Successfully switched to branch: ${data.branchName}`
|
|
557
|
+
);
|
|
545
558
|
}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
);
|
|
559
|
+
} else if (sessionOnly && data.branchName) {
|
|
560
|
+
setProcessingStatus(`Skipping git operations (--session-only mode)`);
|
|
549
561
|
}
|
|
550
562
|
const cwd = process.cwd();
|
|
551
563
|
const cwdWithHyphens = cwd.replace(/\//g, "-");
|
|
@@ -577,7 +589,8 @@ async function processSessionData(data, setProcessingStatus, onComplete) {
|
|
|
577
589
|
}
|
|
578
590
|
function PullCommand({
|
|
579
591
|
threadId,
|
|
580
|
-
resume
|
|
592
|
+
resume,
|
|
593
|
+
sessionOnly
|
|
581
594
|
}) {
|
|
582
595
|
const [selectedThreadId, setSelectedThreadId] = useState3(
|
|
583
596
|
threadId
|
|
@@ -610,7 +623,8 @@ function PullCommand({
|
|
|
610
623
|
launchClaude(sessionId);
|
|
611
624
|
}, 100);
|
|
612
625
|
}
|
|
613
|
-
}
|
|
626
|
+
},
|
|
627
|
+
sessionOnly
|
|
614
628
|
);
|
|
615
629
|
if (!result.success) {
|
|
616
630
|
setProcessingError(result.error || "Unknown error during processing");
|
|
@@ -618,7 +632,7 @@ function PullCommand({
|
|
|
618
632
|
}
|
|
619
633
|
};
|
|
620
634
|
process2();
|
|
621
|
-
}, [sessionData, resume]);
|
|
635
|
+
}, [sessionData, resume, sessionOnly]);
|
|
622
636
|
const handleThreadSelect = (threadId2) => {
|
|
623
637
|
setSelectedThreadId(threadId2);
|
|
624
638
|
};
|
|
@@ -795,7 +809,7 @@ import updateNotifier from "update-notifier";
|
|
|
795
809
|
// package.json
|
|
796
810
|
var package_default = {
|
|
797
811
|
name: "@devboxer/cli",
|
|
798
|
-
version: "0.
|
|
812
|
+
version: "0.3.0",
|
|
799
813
|
type: "module",
|
|
800
814
|
bin: {
|
|
801
815
|
devboxer: "./dist/index.js"
|
|
@@ -1147,11 +1161,20 @@ program.command("auth [apiKey]").description("Authenticate with your DevBoxer AP
|
|
|
1147
1161
|
/* @__PURE__ */ React9.createElement(QueryProvider, null, /* @__PURE__ */ React9.createElement(RootLayout, null, /* @__PURE__ */ React9.createElement(AuthCommand, { apiKey })))
|
|
1148
1162
|
);
|
|
1149
1163
|
});
|
|
1150
|
-
program.command("pull [threadId]").description("Fetch session data for a task").option("-r, --resume", "Automatically launch Claude after pulling").
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1164
|
+
program.command("pull [threadId]").description("Fetch session data for a task").option("-r, --resume", "Automatically launch Claude after pulling").option("-s, --session-only", "Skip git operations, only pull session data").action(
|
|
1165
|
+
(threadId, options) => {
|
|
1166
|
+
render(
|
|
1167
|
+
/* @__PURE__ */ React9.createElement(QueryProvider, null, /* @__PURE__ */ React9.createElement(RootLayout, null, /* @__PURE__ */ React9.createElement(
|
|
1168
|
+
PullCommand,
|
|
1169
|
+
{
|
|
1170
|
+
threadId,
|
|
1171
|
+
resume: options.resume,
|
|
1172
|
+
sessionOnly: options.sessionOnly
|
|
1173
|
+
}
|
|
1174
|
+
)))
|
|
1175
|
+
);
|
|
1176
|
+
}
|
|
1177
|
+
);
|
|
1155
1178
|
var CLI_MODEL_OPTIONS = [
|
|
1156
1179
|
"amp",
|
|
1157
1180
|
"haiku",
|