@rotorsoft/gent 1.13.3 → 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 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.13.3",
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",
@@ -2756,12 +2733,7 @@ function getAvailableActions(state) {
2756
2733
  actions.push({ id: "pr", label: "pr", shortcut: "r" });
2757
2734
  }
2758
2735
  if (state.issue && state.pr?.state !== "merged") {
2759
- actions.push({ id: "implement", label: "implement", shortcut: "i" });
2760
- }
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
- }
2736
+ actions.push({ id: "run", label: "run", shortcut: "u" });
2765
2737
  }
2766
2738
  if (state.pr && (state.pr.state === "merged" || state.pr.state === "closed")) {
2767
2739
  actions.push({ id: "checkout-main", label: "main", shortcut: "m" });
@@ -3140,7 +3112,7 @@ async function executeAction(actionId, state) {
3140
3112
  await promptContinue();
3141
3113
  return true;
3142
3114
  }
3143
- case "implement": {
3115
+ case "run": {
3144
3116
  clearScreen();
3145
3117
  const hasCommits = state.commits.length > 0;
3146
3118
  const hasFeedback = state.hasActionableFeedback;
@@ -3153,13 +3125,7 @@ async function executeAction(actionId, state) {
3153
3125
  msg = "Start AI agent to implement this ticket from scratch?";
3154
3126
  }
3155
3127
  if (!await confirm(msg)) return true;
3156
- await handleImplement(state);
3157
- return false;
3158
- }
3159
- case "video": {
3160
- clearScreen();
3161
- if (!await confirm("Record video of UI changes?")) return true;
3162
- await handleVideoCapture(state);
3128
+ await handleRun(state);
3163
3129
  await promptContinue();
3164
3130
  return true;
3165
3131
  }
@@ -3284,7 +3250,7 @@ async function generateCommitMessage(diffContent, issueNumber, issueTitle, state
3284
3250
  return message.trim() || CANCEL;
3285
3251
  }
3286
3252
  }
3287
- async function handleImplement(state) {
3253
+ async function handleRun(state) {
3288
3254
  if (!state.issue) {
3289
3255
  logger.error("No linked issue found");
3290
3256
  return;
@@ -3323,7 +3289,8 @@ ${feedbackLines}`);
3323
3289
  ]);
3324
3290
  console.log();
3325
3291
  try {
3326
- await invokeAIInteractive(prompt, state.config);
3292
+ const { result } = await invokeAIInteractive(prompt, state.config);
3293
+ await result;
3327
3294
  } catch (error) {
3328
3295
  logger.error(`${providerName} session failed: ${error}`);
3329
3296
  }
@@ -3370,32 +3337,6 @@ async function handleCheckoutMain() {
3370
3337
  logger.error(`Checkout failed: ${error}`);
3371
3338
  }
3372
3339
  }
3373
- async function handleVideoCapture(state) {
3374
- if (!state.issue) {
3375
- logger.error("No linked issue found");
3376
- return;
3377
- }
3378
- const providerName = getProviderDisplayName(state.config.ai.provider);
3379
- clearScreen();
3380
- renderActionPanel("Video Capture", [
3381
- `Recording: #${state.issue.number} ${state.issue.title}`,
3382
- `Provider: ${providerName}`
3383
- ]);
3384
- console.log();
3385
- try {
3386
- const agentInstructions = loadAgentInstructions();
3387
- const videoPrompt = buildVideoPrompt(
3388
- state.issue.number,
3389
- state.issue.title,
3390
- state.config.video,
3391
- agentInstructions
3392
- );
3393
- await invokeAIInteractive(videoPrompt, state.config);
3394
- logger.success("Video capture completed");
3395
- } catch (error) {
3396
- logger.error(`Video capture failed: ${error}`);
3397
- }
3398
- }
3399
3340
  async function promptContinue() {
3400
3341
  console.log();
3401
3342
  await inquirer7.prompt([