@staff0rd/assist 0.500.1 → 0.501.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/commands/sessions/web/bundle.js +384 -384
- package/dist/index.js +30 -9
- 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.
|
|
9
|
+
version: "0.501.1",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -174,6 +174,7 @@ function tryGit(cwd, args) {
|
|
|
174
174
|
try {
|
|
175
175
|
const out = execFileSync(file, argv, {
|
|
176
176
|
encoding: "utf8",
|
|
177
|
+
windowsHide: true,
|
|
177
178
|
stdio: ["pipe", "pipe", "pipe"],
|
|
178
179
|
...windows ? {} : { cwd }
|
|
179
180
|
}).trim();
|
|
@@ -8677,6 +8678,7 @@ function spawnDaemon(reason4) {
|
|
|
8677
8678
|
const log2 = openSync2(daemonPaths.log, "a");
|
|
8678
8679
|
const child = spawn4(process.execPath, [process.argv[1], "daemon", "run"], {
|
|
8679
8680
|
detached: true,
|
|
8681
|
+
windowsHide: true,
|
|
8680
8682
|
stdio: ["ignore", log2, log2],
|
|
8681
8683
|
env: { ...process.env, ASSIST_DAEMON_SPAWN_REASON: reason4 }
|
|
8682
8684
|
});
|
|
@@ -8715,7 +8717,11 @@ function gitInvocation(cwd, args) {
|
|
|
8715
8717
|
return {
|
|
8716
8718
|
file: windows ? "git.exe" : "git",
|
|
8717
8719
|
argv: windows ? ["-C", cwd, ...args] : args,
|
|
8718
|
-
options: {
|
|
8720
|
+
options: {
|
|
8721
|
+
encoding: "utf8",
|
|
8722
|
+
windowsHide: true,
|
|
8723
|
+
...windows ? {} : { cwd }
|
|
8724
|
+
}
|
|
8719
8725
|
};
|
|
8720
8726
|
}
|
|
8721
8727
|
function git2(cwd, args) {
|
|
@@ -9380,6 +9386,7 @@ async function execGit(cwd, args, opts = {}) {
|
|
|
9380
9386
|
try {
|
|
9381
9387
|
const { stdout } = await execFileAsync2(file, argv, {
|
|
9382
9388
|
encoding: "utf8",
|
|
9389
|
+
windowsHide: true,
|
|
9383
9390
|
...maxBuffer ? { maxBuffer } : {},
|
|
9384
9391
|
...file === "git" ? { cwd } : {}
|
|
9385
9392
|
});
|
|
@@ -10094,6 +10101,7 @@ var execFileAsync3 = promisify3(execFile4);
|
|
|
10094
10101
|
function runGit(cwd, args) {
|
|
10095
10102
|
return execFileAsync3("git", args, {
|
|
10096
10103
|
encoding: "utf8",
|
|
10104
|
+
windowsHide: true,
|
|
10097
10105
|
cwd: toGitCwd(cwd)
|
|
10098
10106
|
}).then((r) => r.stdout.trim());
|
|
10099
10107
|
}
|
|
@@ -10538,7 +10546,7 @@ async function openInCode(req, res) {
|
|
|
10538
10546
|
if (!cwd) return;
|
|
10539
10547
|
try {
|
|
10540
10548
|
const command = /^[A-Za-z]:[\\/]/.test(cwd) ? `cmd.exe /c code "${cwd}"` : `code "${cwd}"`;
|
|
10541
|
-
await execAsync(command);
|
|
10549
|
+
await execAsync(command, { windowsHide: true });
|
|
10542
10550
|
respondJson(res, 200, { ok: true });
|
|
10543
10551
|
} catch {
|
|
10544
10552
|
respondJson(res, 500, {
|
|
@@ -10564,6 +10572,7 @@ function createCachedGhJson(args, parse3, fallback, options2 = {}) {
|
|
|
10564
10572
|
try {
|
|
10565
10573
|
const { stdout } = await execFileAsync4("gh", [...args, ...extraArgs], {
|
|
10566
10574
|
encoding: "utf8",
|
|
10575
|
+
windowsHide: true,
|
|
10567
10576
|
cwd: toGitCwd(cwd)
|
|
10568
10577
|
});
|
|
10569
10578
|
value = parse3(stdout);
|
|
@@ -10641,7 +10650,7 @@ async function getCurrentBranch(cwd) {
|
|
|
10641
10650
|
const { stdout } = await execFileAsync5(
|
|
10642
10651
|
"git",
|
|
10643
10652
|
["rev-parse", "--abbrev-ref", "HEAD"],
|
|
10644
|
-
{ encoding: "utf8", cwd: toGitCwd(cwd) }
|
|
10653
|
+
{ encoding: "utf8", windowsHide: true, cwd: toGitCwd(cwd) }
|
|
10645
10654
|
);
|
|
10646
10655
|
const branch2 = stdout.trim();
|
|
10647
10656
|
return branch2 && branch2 !== "HEAD" ? branch2 : void 0;
|
|
@@ -11355,6 +11364,7 @@ async function runGhImage(filePath, cwd) {
|
|
|
11355
11364
|
try {
|
|
11356
11365
|
({ stdout } = await execFileAsync6("gh", ["image", filePath], {
|
|
11357
11366
|
cwd,
|
|
11367
|
+
windowsHide: true,
|
|
11358
11368
|
maxBuffer: 10 * 1024 * 1024
|
|
11359
11369
|
}));
|
|
11360
11370
|
} catch (error) {
|
|
@@ -18570,7 +18580,8 @@ function runGhGraphql(mutation, vars) {
|
|
|
18570
18580
|
writeFileSync30(queryFile, mutation);
|
|
18571
18581
|
try {
|
|
18572
18582
|
const result = spawnSync4("gh", buildArgs2(queryFile, vars), {
|
|
18573
|
-
encoding: "utf8"
|
|
18583
|
+
encoding: "utf8",
|
|
18584
|
+
windowsHide: true
|
|
18574
18585
|
});
|
|
18575
18586
|
if (result.status !== 0) throw new Error(result.stderr || result.stdout);
|
|
18576
18587
|
throwOnGraphqlErrors(result.stdout);
|
|
@@ -19564,8 +19575,13 @@ function stopInstall(worktreePath) {
|
|
|
19564
19575
|
}
|
|
19565
19576
|
function killTree(pid) {
|
|
19566
19577
|
if (process.platform === "win32") {
|
|
19567
|
-
execFile8(
|
|
19568
|
-
|
|
19578
|
+
execFile8(
|
|
19579
|
+
"taskkill",
|
|
19580
|
+
["/T", "/F", "/PID", String(pid)],
|
|
19581
|
+
{ windowsHide: true },
|
|
19582
|
+
() => {
|
|
19583
|
+
}
|
|
19584
|
+
);
|
|
19569
19585
|
return;
|
|
19570
19586
|
}
|
|
19571
19587
|
try {
|
|
@@ -19586,7 +19602,12 @@ function installInvocation(worktreePath, command) {
|
|
|
19586
19602
|
return [
|
|
19587
19603
|
shell,
|
|
19588
19604
|
args,
|
|
19589
|
-
{
|
|
19605
|
+
{
|
|
19606
|
+
cwd: worktreePath,
|
|
19607
|
+
detached: true,
|
|
19608
|
+
windowsHide: true,
|
|
19609
|
+
stdio: ["ignore", "ignore", "pipe"]
|
|
19610
|
+
}
|
|
19590
19611
|
];
|
|
19591
19612
|
}
|
|
19592
19613
|
function quoteForCmd(value) {
|
|
@@ -29932,7 +29953,7 @@ async function generateSessionTitle(prompt) {
|
|
|
29932
29953
|
const { stdout } = await execFileAsync7(
|
|
29933
29954
|
"claude",
|
|
29934
29955
|
["-p", "--model", "haiku", buildPrompt4(prompt)],
|
|
29935
|
-
{ encoding: "utf8", timeout: 3e4 }
|
|
29956
|
+
{ encoding: "utf8", windowsHide: true, timeout: 3e4 }
|
|
29936
29957
|
);
|
|
29937
29958
|
return normaliseTitle(stdout);
|
|
29938
29959
|
} catch {
|