@kud/gh-cockpit 0.4.14 → 0.4.16

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.
@@ -17,7 +17,8 @@ var registered = {};
17
17
  var registerPrompts = (forms) => {
18
18
  registered = forms;
19
19
  };
20
- var seedPromptFor = (ctx) => registered.seed?.(ctx);
20
+ var DEFAULT_SEED = (ctx) => ctx.kind === "pr" ? `Review the pull request at ${ctx.url}. Its branch is already checked out here.` : `Work on the issue at ${ctx.url}. Its repository is already checked out here.`;
21
+ var seedPromptFor = (ctx) => registered.seed?.(ctx) ?? DEFAULT_SEED(ctx);
21
22
  var portablePromptFor = (ctx) => registered.portable?.(ctx) ?? ctx.url;
22
23
  var DrillView = ({
23
24
  title,
@@ -70,7 +71,9 @@ var signalPath = () => {
70
71
  return join(dir, "cockpit-dirty");
71
72
  };
72
73
  var CANDIDATES = [
73
- { id: "claude", label: "Claude Code", cmd: "claude" }
74
+ { id: "claude", label: "Claude Code", cmd: "claude", acceptsPrompt: true },
75
+ { id: "opencode", label: "opencode", cmd: "opencode" },
76
+ { id: "codex", label: "Codex", cmd: "codex", acceptsPrompt: true }
74
77
  ];
75
78
  var PLACEMENTS = [
76
79
  { id: "here", label: "Right here" },
@@ -1,4 +1,4 @@
1
- import { AiLauncher, seedPromptFor, CopyPromptNotice } from '../chunk-OGDDP5WY.js';
1
+ import { AiLauncher, seedPromptFor, CopyPromptNotice } from '../chunk-2DEQARCM.js';
2
2
  import { useEffect } from 'react';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useActionMenu, buildActions, AiLauncher, seedPromptFor, CopyPromptNotice, DrillView, ActionMenu, resolveRepoPath, openInTab } from './chunk-OGDDP5WY.js';
2
- export { ActionMenu, App, COLS, CiStatusLine, CommentsPanel, DrillView, HealthPanel, PIN_MARK, SIDEBAR_COLS, SidePanel, budgetNotice, buildActions, buildCheckoutCmd, buildInboxQueries, buildInboxQuery, checkoutDirs, clipboard, computeHealth, configureInbox, counts, drillCmd, explainGhAction, explainItem, filterByOrigin, filterByRepos, filterBySearch, fitCount, gapsAbove, healthColor, healthDisplay, healthGlyph, healthLegend, inboxConfig, insertRepoHeaders, itermRun, jumpToRepo, jumpToRepoPane, labelPriority, layoutGHItems, matchesFilter, maxViewStart, mergeInboxData, moveCursor, openInTab, parsePatterns, profileOf, railCapacity, readCache, registerPrompts, relativeTime, renderMarkdown, repoPriority, reposInSections, resetInboxConfig, resolveRepoPath, runHere, runInPane, runInPaneHorizontal, sameCiStatusState, signalPath, signatureOf, sortByRecency, sortItems, toCiStatusState, toGHItem, truncate, useActionMenu, whoseMove, windowCount, withHeaders, withRetry, withoutItem, workCount, writeCache } from './chunk-OGDDP5WY.js';
1
+ import { useActionMenu, buildActions, AiLauncher, seedPromptFor, CopyPromptNotice, DrillView, ActionMenu, resolveRepoPath, openInTab } from './chunk-2DEQARCM.js';
2
+ export { ActionMenu, App, COLS, CiStatusLine, CommentsPanel, DrillView, HealthPanel, PIN_MARK, SIDEBAR_COLS, SidePanel, budgetNotice, buildActions, buildCheckoutCmd, buildInboxQueries, buildInboxQuery, checkoutDirs, clipboard, computeHealth, configureInbox, counts, drillCmd, explainGhAction, explainItem, filterByOrigin, filterByRepos, filterBySearch, fitCount, gapsAbove, healthColor, healthDisplay, healthGlyph, healthLegend, inboxConfig, insertRepoHeaders, itermRun, jumpToRepo, jumpToRepoPane, labelPriority, layoutGHItems, matchesFilter, maxViewStart, mergeInboxData, moveCursor, openInTab, parsePatterns, profileOf, railCapacity, readCache, registerPrompts, relativeTime, renderMarkdown, repoPriority, reposInSections, resetInboxConfig, resolveRepoPath, runHere, runInPane, runInPaneHorizontal, sameCiStatusState, signalPath, signatureOf, sortByRecency, sortItems, toCiStatusState, toGHItem, truncate, useActionMenu, whoseMove, windowCount, withHeaders, withRetry, withoutItem, workCount, writeCache } from './chunk-2DEQARCM.js';
3
3
  import { parsePatterns, HealthPanel, CommentsPanel, inboxConfig } from '@kud/gh-ink';
4
4
  import { $ } from 'zx';
5
5
  import { useState, useEffect } from 'react';
@@ -131,6 +131,8 @@ var processLog = (raw) => {
131
131
  const jumpTo = firstError >= 0 ? Math.max(0, firstError - 3) : Math.max(0, lines.length - 1);
132
132
  return { lines, jumpTo };
133
133
  };
134
+ var ANSI = /\x1b\[[0-9;?]*[ -/]*[@-~]|\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)/g;
135
+ var stripAnsi = (s) => s.replace(ANSI, "");
134
136
  var CheckLogView = ({
135
137
  repo,
136
138
  jobId,
@@ -141,8 +143,11 @@ var CheckLogView = ({
141
143
  const [state, setState] = useState({ phase: "loading" });
142
144
  useEffect(() => {
143
145
  let live = true;
144
- $`gh api repos/${repo}/actions/jobs/${jobId}/logs`.quiet().then(
145
- (r) => live && setState({ phase: "ready", lines: r.stdout.split("\n") })
146
+ $`gh api --allow-escape-sequences repos/${repo}/actions/jobs/${jobId}/logs`.quiet().then(
147
+ (r) => live && setState({
148
+ phase: "ready",
149
+ lines: stripAnsi(r.stdout).split("\n")
150
+ })
146
151
  ).catch(
147
152
  (e) => live && setState({ phase: "error", message: e.message })
148
153
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/gh-cockpit",
3
- "version": "0.4.14",
3
+ "version": "0.4.16",
4
4
  "description": "A configurable GitHub cockpit for the terminal — your PRs, reviews and issues in one Ink TUI, grouped by whose move it is.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",