@benzotti/jedi 0.1.16 → 0.1.18
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 +57 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11066,11 +11066,28 @@ function formatTicketAsContext(ticket) {
|
|
|
11066
11066
|
|
|
11067
11067
|
// src/utils/github.ts
|
|
11068
11068
|
async function postGitHubComment(repo, issueNumber, body) {
|
|
11069
|
-
await exec([
|
|
11069
|
+
const { stdout: stdout2, exitCode } = await exec([
|
|
11070
11070
|
"gh",
|
|
11071
11071
|
"api",
|
|
11072
11072
|
`repos/${repo}/issues/${issueNumber}/comments`,
|
|
11073
11073
|
"-f",
|
|
11074
|
+
`body=${body}`,
|
|
11075
|
+
"--jq",
|
|
11076
|
+
".id"
|
|
11077
|
+
]);
|
|
11078
|
+
if (exitCode === 0 && stdout2.trim()) {
|
|
11079
|
+
return Number(stdout2.trim());
|
|
11080
|
+
}
|
|
11081
|
+
return null;
|
|
11082
|
+
}
|
|
11083
|
+
async function updateGitHubComment(repo, commentId, body) {
|
|
11084
|
+
await exec([
|
|
11085
|
+
"gh",
|
|
11086
|
+
"api",
|
|
11087
|
+
"-X",
|
|
11088
|
+
"PATCH",
|
|
11089
|
+
`repos/${repo}/issues/comments/${commentId}`,
|
|
11090
|
+
"-f",
|
|
11074
11091
|
`body=${body}`
|
|
11075
11092
|
]);
|
|
11076
11093
|
}
|
|
@@ -11281,6 +11298,11 @@ var actionCommand = defineCommand({
|
|
|
11281
11298
|
if (repo && commentId) {
|
|
11282
11299
|
await reactToComment(repo, commentId, "eyes").catch(() => {});
|
|
11283
11300
|
}
|
|
11301
|
+
let placeholderCommentId = null;
|
|
11302
|
+
if (repo && issueNumber) {
|
|
11303
|
+
const thinkingBody = formatJediComment("_Thinking..._");
|
|
11304
|
+
placeholderCommentId = await postGitHubComment(repo, issueNumber, thinkingBody).catch(() => null);
|
|
11305
|
+
}
|
|
11284
11306
|
if (intent.command === "ping") {
|
|
11285
11307
|
const { existsSync: existsSync13 } = await import("fs");
|
|
11286
11308
|
const { join: join12 } = await import("path");
|
|
@@ -11308,16 +11330,17 @@ var actionCommand = defineCommand({
|
|
|
11308
11330
|
`| Version | \`${version}\` |`
|
|
11309
11331
|
].join(`
|
|
11310
11332
|
`);
|
|
11311
|
-
const
|
|
11312
|
-
|
|
11313
|
-
|
|
11314
|
-
|
|
11315
|
-
|
|
11333
|
+
const finalBody = formatJediComment(statusBody);
|
|
11334
|
+
if (repo && placeholderCommentId) {
|
|
11335
|
+
await updateGitHubComment(repo, placeholderCommentId, finalBody).catch((err) => {
|
|
11336
|
+
consola.error("Failed to update ping comment:", err);
|
|
11337
|
+
});
|
|
11338
|
+
} else if (repo && issueNumber) {
|
|
11339
|
+
await postGitHubComment(repo, issueNumber, finalBody).catch((err) => {
|
|
11316
11340
|
consola.error("Failed to post ping comment:", err);
|
|
11317
11341
|
});
|
|
11318
11342
|
} else {
|
|
11319
|
-
console.log(
|
|
11320
|
-
`));
|
|
11343
|
+
console.log(finalBody);
|
|
11321
11344
|
}
|
|
11322
11345
|
if (repo && commentId) {
|
|
11323
11346
|
await reactToComment(repo, commentId, "+1").catch(() => {});
|
|
@@ -11374,9 +11397,13 @@ var actionCommand = defineCommand({
|
|
|
11374
11397
|
`## Instructions`,
|
|
11375
11398
|
`Review the previous conversation above. The user is iterating on work Jedi already started.`,
|
|
11376
11399
|
``,
|
|
11400
|
+
`IMPORTANT: Always be conversational. If the user asks a question, ANSWER IT FIRST before taking any action.`,
|
|
11401
|
+
`Explain your reasoning, then describe what you'll do (if anything), then do it.`,
|
|
11402
|
+
`Never silently make changes without explaining why.`,
|
|
11403
|
+
``,
|
|
11404
|
+
`- If the feedback is a **question** ("why did you...", "what about...", "can you explain..."), answer it conversationally first. If the answer implies a change is needed, explain that and then apply it.`,
|
|
11377
11405
|
`- If the feedback is an **approval** ("approved", "lgtm", "looks good", "ship it"), finalise the current work \u2014 create commits and/or a PR as appropriate.`,
|
|
11378
|
-
`- If the feedback is a **refinement** ("change task 2", "use a different approach", "add error handling"),
|
|
11379
|
-
`- If the feedback is a **question**, answer it with full context from the conversation.`,
|
|
11406
|
+
`- If the feedback is a **refinement** ("change task 2", "use a different approach", "add error handling"), explain what you're changing and why, then apply the changes. Present an updated summary when done.`,
|
|
11380
11407
|
``,
|
|
11381
11408
|
`Read state.yaml and any existing plan files to understand what was previously done. Apply changes incrementally \u2014 do not restart from scratch.`
|
|
11382
11409
|
].join(`
|
|
@@ -11401,7 +11428,16 @@ The above is prior conversation on this issue for context.
|
|
|
11401
11428
|
ticketContext ? `
|
|
11402
11429
|
Use the ClickUp ticket above as the primary requirements source.` : ``,
|
|
11403
11430
|
``,
|
|
11404
|
-
`Follow the planning workflow in your spec.
|
|
11431
|
+
`Follow the planning workflow in your spec. When presenting the plan:`,
|
|
11432
|
+
`1. Start with a brief summary of the approach`,
|
|
11433
|
+
`2. Include the FULL plan in a collapsible details block using this format:`,
|
|
11434
|
+
` <details>`,
|
|
11435
|
+
` <summary>View full plan</summary>`,
|
|
11436
|
+
` `,
|
|
11437
|
+
` [full plan content here as markdown]`,
|
|
11438
|
+
` `,
|
|
11439
|
+
` </details>`,
|
|
11440
|
+
`3. Ask for feedback. The user will respond via another GitHub comment.`
|
|
11405
11441
|
].join(`
|
|
11406
11442
|
`);
|
|
11407
11443
|
break;
|
|
@@ -11525,9 +11561,15 @@ Use the ClickUp ticket above as the primary requirements source.` : ``,
|
|
|
11525
11561
|
} else {
|
|
11526
11562
|
commentBody = formatJediComment(`Executed \`${actionLabel}\` successfully.`);
|
|
11527
11563
|
}
|
|
11528
|
-
|
|
11529
|
-
|
|
11530
|
-
|
|
11564
|
+
if (placeholderCommentId) {
|
|
11565
|
+
await updateGitHubComment(repo, placeholderCommentId, commentBody).catch((err) => {
|
|
11566
|
+
consola.error("Failed to update result comment:", err);
|
|
11567
|
+
});
|
|
11568
|
+
} else {
|
|
11569
|
+
await postGitHubComment(repo, issueNumber, commentBody).catch((err) => {
|
|
11570
|
+
consola.error("Failed to post result comment:", err);
|
|
11571
|
+
});
|
|
11572
|
+
}
|
|
11531
11573
|
}
|
|
11532
11574
|
if (repo && commentId) {
|
|
11533
11575
|
const reaction = success ? "+1" : "-1";
|
|
@@ -11599,7 +11641,7 @@ var setupActionCommand = defineCommand({
|
|
|
11599
11641
|
// package.json
|
|
11600
11642
|
var package_default = {
|
|
11601
11643
|
name: "@benzotti/jedi",
|
|
11602
|
-
version: "0.1.
|
|
11644
|
+
version: "0.1.18",
|
|
11603
11645
|
description: "JDI - Context-efficient AI development framework for Claude Code",
|
|
11604
11646
|
type: "module",
|
|
11605
11647
|
bin: {
|