@staff0rd/assist 0.302.1 → 0.303.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 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.1",
9
+ version: "0.303.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -425,7 +425,7 @@ function stageAndCommit(files, message) {
425
425
  function execCommit(files, message, config) {
426
426
  try {
427
427
  if (config.commit?.pull) {
428
- execSync("git pull", { stdio: "inherit" });
428
+ execSync("git pull --autostash", { stdio: "inherit" });
429
429
  }
430
430
  const sha = files.length > 0 ? stageAndCommit(files, message) : commitStaged(message);
431
431
  console.log(`Committed: ${sha}`);
@@ -1738,7 +1738,8 @@ var MACHINE_DIRECTIVES = [
1738
1738
  "prettier-ignore",
1739
1739
  "istanbul ignore",
1740
1740
  "v8 ignore",
1741
- "c8 ignore"
1741
+ "c8 ignore",
1742
+ "@vitest-environment"
1742
1743
  ];
1743
1744
  function isCommentExempt(text5, markers) {
1744
1745
  const lower = text5.toLowerCase();
@@ -2889,7 +2890,11 @@ function spawnClaude(prompt, options2 = {}) {
2889
2890
  if (permissionMode) {
2890
2891
  args.push("--permission-mode", permissionMode);
2891
2892
  }
2892
- const { ASSIST_ACTIVITY_ID: _activityId, ...env } = process.env;
2893
+ const {
2894
+ ASSIST_ACTIVITY_ID: _activityId,
2895
+ CLAUDE_CODE_CHILD_SESSION: _childSession,
2896
+ ...env
2897
+ } = process.env;
2893
2898
  const child = spawn3("claude", args, {
2894
2899
  stdio: "inherit",
2895
2900
  env
@@ -18763,13 +18768,14 @@ function spawnPty(args, cwd, sessionId) {
18763
18768
  ensureSpawnHelperExecutable();
18764
18769
  const shell = process.platform === "win32" ? "cmd.exe" : process.env.SHELL ?? "bash";
18765
18770
  const shellArgs = process.platform === "win32" ? ["/c", ...args] : ["-c", `exec ${args.map(shellEscape).join(" ")}`];
18771
+ const { CLAUDE_CODE_CHILD_SESSION: _childSession, ...parentEnv } = process.env;
18766
18772
  return pty.spawn(shell, shellArgs, {
18767
18773
  name: "xterm-256color",
18768
18774
  cols: 120,
18769
18775
  rows: 30,
18770
18776
  cwd: cwd ?? process.cwd(),
18771
18777
  env: {
18772
- ...process.env,
18778
+ ...parentEnv,
18773
18779
  ...sessionId && {
18774
18780
  ASSIST_SESSION_ID: sessionId,
18775
18781
  ASSIST_ACTIVITY_ID: sessionId
@@ -18863,7 +18869,11 @@ function greetClient(client, sessions, windowsProxy) {
18863
18869
  // src/commands/sessions/daemon/shouldAutoDismiss.ts
18864
18870
  function shouldAutoDismiss(session, exitCode) {
18865
18871
  const args = session.assistArgs;
18866
- return session.status === "done" && exitCode === 0 && args !== void 0 && args.includes("--once") && args[0] !== "next";
18872
+ if (session.status !== "done" || exitCode !== 0 || args === void 0) {
18873
+ return false;
18874
+ }
18875
+ if (args[0] === "update") return true;
18876
+ return args.includes("--once") && args[0] !== "next";
18867
18877
  }
18868
18878
 
18869
18879
  // src/commands/sessions/daemon/shouldAutoRun.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.302.1",
3
+ "version": "0.303.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {