@theokit/sdk-tools 0.24.0 → 0.24.1

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
@@ -863,9 +863,7 @@ function createGitStatusTool(opts) {
863
863
  }
864
864
  const scopeCheck = checkPathScope(path, projectRoot);
865
865
  if (scopeCheck !== null) return scopeCheck;
866
- const args = ["status", "--porcelain=v1"];
867
- if (opts.includeBranch !== false) args.push("-b");
868
- if (path !== void 0 && path !== "") args.push("--", path);
866
+ const args = montarArgs(path, opts.includeBranch !== false);
869
867
  if (opts.sandbox !== void 0) {
870
868
  return statusViaSandbox(opts.sandbox, ctx, args, timeoutMs);
871
869
  }
@@ -874,6 +872,12 @@ function createGitStatusTool(opts) {
874
872
  }
875
873
  });
876
874
  }
875
+ function montarArgs(path, comBranch) {
876
+ const args = ["status", "--porcelain=v1"];
877
+ if (comBranch) args.push("-b");
878
+ if (path !== void 0 && path !== "") args.push("--", path);
879
+ return args;
880
+ }
877
881
  async function statusViaSandbox(sandbox, ctx, args, timeoutMs) {
878
882
  const command = ["git", ...args].map(shq).join(" ");
879
883
  const backend = await resolveSandbox(sandbox, ctx ?? {});