@staff0rd/assist 0.302.0 → 0.302.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/index.js +26 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.302.
|
|
9
|
+
version: "0.302.2",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -2717,6 +2717,14 @@ import chalk26 from "chalk";
|
|
|
2717
2717
|
function pullIfConfigured() {
|
|
2718
2718
|
const config = loadConfig();
|
|
2719
2719
|
if (!config.commit?.pull) return;
|
|
2720
|
+
if (hasLocalChanges()) {
|
|
2721
|
+
console.warn(
|
|
2722
|
+
chalk26.yellow(
|
|
2723
|
+
"git pull skipped: working copy has local changes. Continuing."
|
|
2724
|
+
)
|
|
2725
|
+
);
|
|
2726
|
+
return;
|
|
2727
|
+
}
|
|
2720
2728
|
try {
|
|
2721
2729
|
execSync16("git pull --ff-only", { stdio: "inherit" });
|
|
2722
2730
|
} catch {
|
|
@@ -2724,6 +2732,16 @@ function pullIfConfigured() {
|
|
|
2724
2732
|
process.exit(1);
|
|
2725
2733
|
}
|
|
2726
2734
|
}
|
|
2735
|
+
function hasLocalChanges() {
|
|
2736
|
+
try {
|
|
2737
|
+
const status2 = execSync16("git status --porcelain", {
|
|
2738
|
+
encoding: "utf8"
|
|
2739
|
+
});
|
|
2740
|
+
return status2.trim().length > 0;
|
|
2741
|
+
} catch {
|
|
2742
|
+
return false;
|
|
2743
|
+
}
|
|
2744
|
+
}
|
|
2727
2745
|
|
|
2728
2746
|
// src/commands/backlog/acquireLock.ts
|
|
2729
2747
|
import {
|
|
@@ -2871,7 +2889,11 @@ function spawnClaude(prompt, options2 = {}) {
|
|
|
2871
2889
|
if (permissionMode) {
|
|
2872
2890
|
args.push("--permission-mode", permissionMode);
|
|
2873
2891
|
}
|
|
2874
|
-
const {
|
|
2892
|
+
const {
|
|
2893
|
+
ASSIST_ACTIVITY_ID: _activityId,
|
|
2894
|
+
CLAUDE_CODE_CHILD_SESSION: _childSession,
|
|
2895
|
+
...env
|
|
2896
|
+
} = process.env;
|
|
2875
2897
|
const child = spawn3("claude", args, {
|
|
2876
2898
|
stdio: "inherit",
|
|
2877
2899
|
env
|
|
@@ -18745,13 +18767,14 @@ function spawnPty(args, cwd, sessionId) {
|
|
|
18745
18767
|
ensureSpawnHelperExecutable();
|
|
18746
18768
|
const shell = process.platform === "win32" ? "cmd.exe" : process.env.SHELL ?? "bash";
|
|
18747
18769
|
const shellArgs = process.platform === "win32" ? ["/c", ...args] : ["-c", `exec ${args.map(shellEscape).join(" ")}`];
|
|
18770
|
+
const { CLAUDE_CODE_CHILD_SESSION: _childSession, ...parentEnv } = process.env;
|
|
18748
18771
|
return pty.spawn(shell, shellArgs, {
|
|
18749
18772
|
name: "xterm-256color",
|
|
18750
18773
|
cols: 120,
|
|
18751
18774
|
rows: 30,
|
|
18752
18775
|
cwd: cwd ?? process.cwd(),
|
|
18753
18776
|
env: {
|
|
18754
|
-
...
|
|
18777
|
+
...parentEnv,
|
|
18755
18778
|
...sessionId && {
|
|
18756
18779
|
ASSIST_SESSION_ID: sessionId,
|
|
18757
18780
|
ASSIST_ACTIVITY_ID: sessionId
|