@staff0rd/assist 0.913.0 → 0.915.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/claude/commands/review-pr-comments.md +2 -2
- package/dist/commands/extension/extension/background.js +1 -1
- package/dist/commands/extension/extension/content.js +40 -40
- package/dist/commands/extension/extension/docs.js +114 -14
- package/dist/commands/extension/extension/updates.json +2 -2
- package/dist/commands/sessions/web/bundle.js +490 -490
- package/dist/index.js +17 -4
- 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.915.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -5302,6 +5302,14 @@ function reviewFromGithub(req, res) {
|
|
|
5302
5302
|
);
|
|
5303
5303
|
}
|
|
5304
5304
|
|
|
5305
|
+
// src/shared/githubAssistModes.ts
|
|
5306
|
+
var githubAssistModes = {
|
|
5307
|
+
draft: ["draft", "--once"]
|
|
5308
|
+
};
|
|
5309
|
+
function isGithubAssistMode(mode) {
|
|
5310
|
+
return typeof mode === "string" && Object.hasOwn(githubAssistModes, mode);
|
|
5311
|
+
}
|
|
5312
|
+
|
|
5305
5313
|
// src/commands/sessions/shared/requestClaudeSession.ts
|
|
5306
5314
|
function requestClaudeSession(prompt, cwd, options2) {
|
|
5307
5315
|
return requestSession({
|
|
@@ -5315,14 +5323,16 @@ function requestClaudeSession(prompt, cwd, options2) {
|
|
|
5315
5323
|
|
|
5316
5324
|
// src/commands/sessions/web/fromGithub/planGithubSession.ts
|
|
5317
5325
|
function planGithubSession(body, baseDir, redirects) {
|
|
5318
|
-
const { url, instructions } = body ?? {};
|
|
5326
|
+
const { url, instructions, mode } = body ?? {};
|
|
5327
|
+
if (mode !== void 0 && !isGithubAssistMode(mode))
|
|
5328
|
+
return { ok: false, status: 400, error: `Unknown mode: ${mode}` };
|
|
5319
5329
|
const clone = resolveGithubClone(url, baseDir, redirects);
|
|
5320
5330
|
if (!clone.ok) return clone;
|
|
5321
5331
|
const extra = typeof instructions === "string" ? instructions.trim() : "";
|
|
5322
5332
|
const prompt = extra ? `${clone.url}
|
|
5323
5333
|
|
|
5324
5334
|
${extra}` : clone.url;
|
|
5325
|
-
return { ok: true, cwd: clone.cwd, prompt };
|
|
5335
|
+
return { ok: true, cwd: clone.cwd, prompt, ...mode && { mode } };
|
|
5326
5336
|
}
|
|
5327
5337
|
|
|
5328
5338
|
// src/commands/sessions/web/fromGithub/sessionFromGithub.ts
|
|
@@ -5331,7 +5341,10 @@ function sessionFromGithub(req, res) {
|
|
|
5331
5341
|
req,
|
|
5332
5342
|
res,
|
|
5333
5343
|
(body, baseDir) => planGithubSession(body, baseDir, loadConfig().extension?.redirects),
|
|
5334
|
-
(plan2) =>
|
|
5344
|
+
(plan2) => plan2.mode ? requestAssistSession(
|
|
5345
|
+
[...githubAssistModes[plan2.mode], plan2.prompt],
|
|
5346
|
+
plan2.cwd
|
|
5347
|
+
) : requestClaudeSession(plan2.prompt, plan2.cwd)
|
|
5335
5348
|
);
|
|
5336
5349
|
}
|
|
5337
5350
|
|