@rotorsoft/gent 1.13.4 → 1.14.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 +20 -80
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -615,46 +615,6 @@ function generateFallbackTitle(description) {
|
|
|
615
615
|
}
|
|
616
616
|
return truncated;
|
|
617
617
|
}
|
|
618
|
-
function buildVideoPrompt(issueNumber, issueTitle, videoConfig, agentInstructions) {
|
|
619
|
-
return `You are helping capture a Playwright video demonstration of UI changes for GitHub Issue #${issueNumber}: ${issueTitle}
|
|
620
|
-
|
|
621
|
-
${agentInstructions ? `## Project-Specific Instructions
|
|
622
|
-
${agentInstructions}
|
|
623
|
-
|
|
624
|
-
` : ""}
|
|
625
|
-
|
|
626
|
-
## Task: Record UI Demo Video
|
|
627
|
-
|
|
628
|
-
Create a short video (max ${videoConfig.max_duration}s) demonstrating the UI changes made for this issue.
|
|
629
|
-
|
|
630
|
-
### Video Requirements
|
|
631
|
-
- Resolution: ${videoConfig.width}x${videoConfig.height}
|
|
632
|
-
- Format: WebM or MP4
|
|
633
|
-
- Duration: Under ${videoConfig.max_duration} seconds
|
|
634
|
-
- Show the key UI interactions and visual changes
|
|
635
|
-
|
|
636
|
-
### Steps
|
|
637
|
-
|
|
638
|
-
1. **Start the development server** if not already running
|
|
639
|
-
2. **Use Playwright to record video** of the relevant UI interactions:
|
|
640
|
-
- Navigate to the affected pages/components
|
|
641
|
-
- Demonstrate the new or changed functionality
|
|
642
|
-
- Show before/after if applicable
|
|
643
|
-
|
|
644
|
-
3. **Upload video to GitHub** as a release asset or use GitHub's drag-drop upload:
|
|
645
|
-
- Create a GitHub release or upload to issue comments
|
|
646
|
-
- Get the permanent URL for the video
|
|
647
|
-
- Do NOT commit video files to the repository
|
|
648
|
-
|
|
649
|
-
4. **Add video to PR** by commenting with the video URL or embedding it
|
|
650
|
-
|
|
651
|
-
### Important
|
|
652
|
-
- Upload video to GitHub assets, NOT to the repository
|
|
653
|
-
- Keep the video concise - focus on demonstrating the changes
|
|
654
|
-
- Ensure the video clearly shows the UI improvements
|
|
655
|
-
|
|
656
|
-
Output the GitHub URL where the video was uploaded when complete.`;
|
|
657
|
-
}
|
|
658
618
|
|
|
659
619
|
// src/commands/create.ts
|
|
660
620
|
async function createCommand(description, options) {
|
|
@@ -1809,6 +1769,23 @@ IMPORTANT: This PR contains UI changes. Use the Playwright MCP plugin to:
|
|
|
1809
1769
|
if (options.draft) {
|
|
1810
1770
|
logger.dim("Created as draft. Mark as ready for review when done.");
|
|
1811
1771
|
}
|
|
1772
|
+
if (shouldCaptureVideo) {
|
|
1773
|
+
const changedFilesForHint = captureVideoInstructions !== "" ? [] : await getChangedFiles(baseBranch);
|
|
1774
|
+
const uiChangesForHint = captureVideoInstructions !== "" ? true : hasUIChanges(changedFilesForHint);
|
|
1775
|
+
if (uiChangesForHint) {
|
|
1776
|
+
const playwrightOk = await isPlaywrightAvailable();
|
|
1777
|
+
if (playwrightOk) {
|
|
1778
|
+
logger.bold("Next Steps");
|
|
1779
|
+
logger.info(
|
|
1780
|
+
"Run `claude` with Playwright MCP to record a demo video of the changes."
|
|
1781
|
+
);
|
|
1782
|
+
logger.info(
|
|
1783
|
+
"Upload the result to GitHub Assets to keep the repo light."
|
|
1784
|
+
);
|
|
1785
|
+
logger.newline();
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1812
1789
|
}
|
|
1813
1790
|
function generateFallbackBody(issue, commits) {
|
|
1814
1791
|
let body = "## Summary\n\n";
|
|
@@ -2188,7 +2165,7 @@ import { homedir } from "os";
|
|
|
2188
2165
|
// package.json
|
|
2189
2166
|
var package_default = {
|
|
2190
2167
|
name: "@rotorsoft/gent",
|
|
2191
|
-
version: "1.
|
|
2168
|
+
version: "1.14.0",
|
|
2192
2169
|
description: "AI-powered GitHub workflow CLI - leverage AI (Claude, Gemini, or Codex) to create tickets, implement features, and manage PRs",
|
|
2193
2170
|
keywords: [
|
|
2194
2171
|
"cli",
|
|
@@ -2758,11 +2735,6 @@ function getAvailableActions(state) {
|
|
|
2758
2735
|
if (state.issue && state.pr?.state !== "merged") {
|
|
2759
2736
|
actions.push({ id: "run", label: "run", shortcut: "u" });
|
|
2760
2737
|
}
|
|
2761
|
-
if (state.pr && state.pr.state === "open") {
|
|
2762
|
-
if (state.hasUIChanges && state.isPlaywrightAvailable && state.config.video.enabled) {
|
|
2763
|
-
actions.push({ id: "video", label: "video", shortcut: "v" });
|
|
2764
|
-
}
|
|
2765
|
-
}
|
|
2766
2738
|
if (state.pr && (state.pr.state === "merged" || state.pr.state === "closed")) {
|
|
2767
2739
|
actions.push({ id: "checkout-main", label: "main", shortcut: "m" });
|
|
2768
2740
|
}
|
|
@@ -3157,13 +3129,6 @@ async function executeAction(actionId, state) {
|
|
|
3157
3129
|
await promptContinue();
|
|
3158
3130
|
return true;
|
|
3159
3131
|
}
|
|
3160
|
-
case "video": {
|
|
3161
|
-
clearScreen();
|
|
3162
|
-
if (!await confirm("Record video of UI changes?")) return true;
|
|
3163
|
-
await handleVideoCapture(state);
|
|
3164
|
-
await promptContinue();
|
|
3165
|
-
return true;
|
|
3166
|
-
}
|
|
3167
3132
|
case "switch-provider":
|
|
3168
3133
|
clearScreen();
|
|
3169
3134
|
await handleSwitchProvider(state);
|
|
@@ -3324,7 +3289,8 @@ ${feedbackLines}`);
|
|
|
3324
3289
|
]);
|
|
3325
3290
|
console.log();
|
|
3326
3291
|
try {
|
|
3327
|
-
await invokeAIInteractive(prompt, state.config);
|
|
3292
|
+
const { result } = await invokeAIInteractive(prompt, state.config);
|
|
3293
|
+
await result;
|
|
3328
3294
|
} catch (error) {
|
|
3329
3295
|
logger.error(`${providerName} session failed: ${error}`);
|
|
3330
3296
|
}
|
|
@@ -3371,32 +3337,6 @@ async function handleCheckoutMain() {
|
|
|
3371
3337
|
logger.error(`Checkout failed: ${error}`);
|
|
3372
3338
|
}
|
|
3373
3339
|
}
|
|
3374
|
-
async function handleVideoCapture(state) {
|
|
3375
|
-
if (!state.issue) {
|
|
3376
|
-
logger.error("No linked issue found");
|
|
3377
|
-
return;
|
|
3378
|
-
}
|
|
3379
|
-
const providerName = getProviderDisplayName(state.config.ai.provider);
|
|
3380
|
-
clearScreen();
|
|
3381
|
-
renderActionPanel("Video Capture", [
|
|
3382
|
-
`Recording: #${state.issue.number} ${state.issue.title}`,
|
|
3383
|
-
`Provider: ${providerName}`
|
|
3384
|
-
]);
|
|
3385
|
-
console.log();
|
|
3386
|
-
try {
|
|
3387
|
-
const agentInstructions = loadAgentInstructions();
|
|
3388
|
-
const videoPrompt = buildVideoPrompt(
|
|
3389
|
-
state.issue.number,
|
|
3390
|
-
state.issue.title,
|
|
3391
|
-
state.config.video,
|
|
3392
|
-
agentInstructions
|
|
3393
|
-
);
|
|
3394
|
-
await invokeAIInteractive(videoPrompt, state.config);
|
|
3395
|
-
logger.success("Video capture completed");
|
|
3396
|
-
} catch (error) {
|
|
3397
|
-
logger.error(`Video capture failed: ${error}`);
|
|
3398
|
-
}
|
|
3399
|
-
}
|
|
3400
3340
|
async function promptContinue() {
|
|
3401
3341
|
console.log();
|
|
3402
3342
|
await inquirer7.prompt([
|