@google/gemini-cli 0.38.0-preview.0 → 0.39.0-nightly.20260408.a39461718

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.
Files changed (35) hide show
  1. package/bundle/{chunk-5BTUPJ3V.js → chunk-4U6PVE73.js} +502 -169
  2. package/bundle/{chunk-7QLK472U.js → chunk-7ZIGORO7.js} +2213 -2046
  3. package/bundle/{chunk-UUWEHBSC.js → chunk-BTJDVETP.js} +569 -224
  4. package/bundle/chunk-CBLH2MXT.js +85507 -0
  5. package/bundle/{chunk-ETUADTWF.js → chunk-CZ35Z6FB.js} +1 -1
  6. package/bundle/{chunk-IJCMWNH6.js → chunk-FCF4JBEN.js} +8201 -13358
  7. package/bundle/chunk-GS4MM5YF.js +358683 -0
  8. package/bundle/{chunk-M7NLLMNM.js → chunk-ICDPC2GR.js} +502 -169
  9. package/bundle/{chunk-Z34XA6FT.js → chunk-OGWWODAT.js} +1 -1
  10. package/bundle/{chunk-3EZO7GOX.js → chunk-US64UJW7.js} +2317 -2146
  11. package/bundle/{core-2LBMIF66.js → core-ISEQZJWL.js} +8 -2
  12. package/bundle/{devtoolsService-O5KUNILB.js → devtoolsService-3WY6ZCAS.js} +3 -3
  13. package/bundle/{devtoolsService-RICATO7H.js → devtoolsService-CGX3TWPG.js} +3 -3
  14. package/bundle/{devtoolsService-53VHFLC7.js → devtoolsService-DT35DUK3.js} +5 -4
  15. package/bundle/devtoolsService-XQMMVPIO.js +871 -0
  16. package/bundle/{core-AW36225J.js → dist-BD2VELZM.js} +8 -2
  17. package/bundle/{dist-ZCJRACJG.js → dist-IA2GH6EX.js} +8 -2
  18. package/bundle/dist-ZQN2VPYD.js +1968 -0
  19. package/bundle/docs/integration-tests.md +40 -0
  20. package/bundle/gemini.js +36 -9
  21. package/bundle/{interactiveCli-DJYBBXM7.js → interactiveCli-BEMQ7IGH.js} +4 -4
  22. package/bundle/{interactiveCli-4XRKME7R.js → interactiveCli-FOXOCMXG.js} +4 -4
  23. package/bundle/{interactiveCli-UMCGVJDA.js → interactiveCli-P6TB5JJZ.js} +270 -253
  24. package/bundle/interactiveCli-XQVXLYJH.js +49974 -0
  25. package/bundle/{memoryDiscovery-PYBLKP7S.js → memoryDiscovery-CP7NHCUT.js} +1 -1
  26. package/bundle/{memoryDiscovery-QTFQKDRY.js → memoryDiscovery-JNNGTYL3.js} +1 -1
  27. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  28. package/bundle/{oauth2-provider-DLWBZ642.js → oauth2-provider-6SCGV2UD.js} +2 -2
  29. package/bundle/{oauth2-provider-OL7M235Q.js → oauth2-provider-JQWYYLW4.js} +2 -2
  30. package/bundle/{oauth2-provider-WF7DDZ7X.js → oauth2-provider-KP56FXRI.js} +39 -73
  31. package/bundle/oauth2-provider-YTAC7DUG.js +237 -0
  32. package/bundle/policies/plan.toml +15 -31
  33. package/bundle/policies/read-only.toml +21 -38
  34. package/package.json +1 -1
  35. package/bundle/policies/tracker.toml +0 -34
@@ -61,6 +61,7 @@ import {
61
61
  disableKittyKeyboardProtocol,
62
62
  disableModifyOtherKeys,
63
63
  disableMouseEvents,
64
+ dismissInboxSkill,
64
65
  enableBracketedPasteMode,
65
66
  enableKittyKeyboardProtocol,
66
67
  enableModifyOtherKeys,
@@ -107,6 +108,7 @@ import {
107
108
  isWithinRoot,
108
109
  is_wsl_default,
109
110
  listExtensions,
111
+ listInboxSkills,
110
112
  listMemoryFiles,
111
113
  loadAgentsFromDirectory,
112
114
  loadExtensionPolicies,
@@ -122,6 +124,7 @@ import {
122
124
  logRewind,
123
125
  mcpServerRequiresOAuth,
124
126
  mergeStreams,
127
+ moveInboxSkill,
125
128
  npmRunPathEnv,
126
129
  onExit,
127
130
  openBrowserSecurely,
@@ -167,7 +170,7 @@ import {
167
170
  tokenLimit,
168
171
  uiTelemetryService,
169
172
  yellowBright
170
- } from "./chunk-7QLK472U.js";
173
+ } from "./chunk-GS4MM5YF.js";
171
174
  import {
172
175
  ApprovalMode,
173
176
  CoreEvent,
@@ -196,7 +199,7 @@ import {
196
199
  shortenPath,
197
200
  tildeifyPath,
198
201
  unescapePath
199
- } from "./chunk-ETUADTWF.js";
202
+ } from "./chunk-CZ35Z6FB.js";
200
203
  import {
201
204
  AppEvent,
202
205
  appEvents
@@ -8250,14 +8253,14 @@ var require_react_reconciler_production = __commonJS({
8250
8253
  }
8251
8254
  var exports2 = {};
8252
8255
  "use strict";
8253
- var React18 = require_react(), Scheduler = require_scheduler(), assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy");
8256
+ var React19 = require_react(), Scheduler = require_scheduler(), assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy");
8254
8257
  Symbol.for("react.scope");
8255
8258
  var REACT_ACTIVITY_TYPE = Symbol.for("react.activity");
8256
8259
  Symbol.for("react.legacy_hidden");
8257
8260
  Symbol.for("react.tracing_marker");
8258
8261
  var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel");
8259
8262
  Symbol.for("react.view_transition");
8260
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React18.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, rendererVersion = $$$config.rendererVersion, rendererPackageName = $$$config.rendererPackageName, extraDevToolsConfig = $$$config.extraDevToolsConfig, getPublicInstance = $$$config.getPublicInstance, getRootHostContext = $$$config.getRootHostContext, getChildHostContext = $$$config.getChildHostContext, prepareForCommit = $$$config.prepareForCommit, resetAfterCommit = $$$config.resetAfterCommit, createInstance = $$$config.createInstance;
8263
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React19.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, rendererVersion = $$$config.rendererVersion, rendererPackageName = $$$config.rendererPackageName, extraDevToolsConfig = $$$config.extraDevToolsConfig, getPublicInstance = $$$config.getPublicInstance, getRootHostContext = $$$config.getRootHostContext, getChildHostContext = $$$config.getChildHostContext, prepareForCommit = $$$config.prepareForCommit, resetAfterCommit = $$$config.resetAfterCommit, createInstance = $$$config.createInstance;
8261
8264
  $$$config.cloneMutableInstance;
8262
8265
  var appendInitialChild = $$$config.appendInitialChild, finalizeInitialChildren = $$$config.finalizeInitialChildren, shouldSetTextContent = $$$config.shouldSetTextContent, createTextInstance = $$$config.createTextInstance;
8263
8266
  $$$config.cloneMutableTextInstance;
@@ -74932,7 +74935,7 @@ var authCommand = {
74932
74935
  import process34 from "node:process";
74933
74936
 
74934
74937
  // packages/cli/src/generated/git-commit.ts
74935
- var GIT_COMMIT_INFO = "e418e123e";
74938
+ var GIT_COMMIT_INFO = "a39461718";
74936
74939
 
74937
74940
  // packages/cli/src/ui/utils/historyExportUtils.ts
74938
74941
  import * as fsPromises2 from "node:fs/promises";
@@ -80412,7 +80415,7 @@ Use /mcp auth <server-name> to authenticate.`
80412
80415
  type: "info",
80413
80416
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
80414
80417
  });
80415
- const { MCPOAuthProvider } = await import("./dist-ZCJRACJG.js");
80418
+ const { MCPOAuthProvider } = await import("./dist-BD2VELZM.js");
80416
80419
  let oauthConfig = server.oauth;
80417
80420
  if (!oauthConfig) {
80418
80421
  oauthConfig = { enabled: false };
@@ -80775,6 +80778,302 @@ var mcpCommand = {
80775
80778
  }
80776
80779
  };
80777
80780
 
80781
+ // packages/cli/src/ui/commands/memoryCommand.ts
80782
+ var import_react68 = __toESM(require_react(), 1);
80783
+
80784
+ // packages/cli/src/ui/components/SkillInboxDialog.tsx
80785
+ var import_react67 = __toESM(require_react(), 1);
80786
+ var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
80787
+ var DESTINATION_CHOICES = [
80788
+ {
80789
+ destination: "global",
80790
+ label: "Global",
80791
+ description: "~/.gemini/skills \u2014 available in all projects"
80792
+ },
80793
+ {
80794
+ destination: "project",
80795
+ label: "Project",
80796
+ description: ".gemini/skills \u2014 available in this workspace"
80797
+ },
80798
+ {
80799
+ destination: "dismiss",
80800
+ label: "Dismiss",
80801
+ description: "Delete from inbox"
80802
+ }
80803
+ ];
80804
+ function formatDate(isoString) {
80805
+ try {
80806
+ const date = new Date(isoString);
80807
+ return date.toLocaleDateString(void 0, {
80808
+ year: "numeric",
80809
+ month: "short",
80810
+ day: "numeric"
80811
+ });
80812
+ } catch {
80813
+ return isoString;
80814
+ }
80815
+ }
80816
+ var SkillInboxDialog = ({
80817
+ config,
80818
+ onClose,
80819
+ onReloadSkills
80820
+ }) => {
80821
+ const keyMatchers = useKeyMatchers();
80822
+ const isTrustedFolder = config.isTrustedFolder();
80823
+ const [phase, setPhase] = (0, import_react67.useState)("list");
80824
+ const [skills, setSkills] = (0, import_react67.useState)([]);
80825
+ const [loading, setLoading] = (0, import_react67.useState)(true);
80826
+ const [selectedSkill, setSelectedSkill] = (0, import_react67.useState)(null);
80827
+ const [feedback, setFeedback] = (0, import_react67.useState)(null);
80828
+ (0, import_react67.useEffect)(() => {
80829
+ let cancelled = false;
80830
+ void (async () => {
80831
+ try {
80832
+ const result = await listInboxSkills(config);
80833
+ if (!cancelled) {
80834
+ setSkills(result);
80835
+ setLoading(false);
80836
+ }
80837
+ } catch {
80838
+ if (!cancelled) {
80839
+ setSkills([]);
80840
+ setLoading(false);
80841
+ }
80842
+ }
80843
+ })();
80844
+ return () => {
80845
+ cancelled = true;
80846
+ };
80847
+ }, [config]);
80848
+ const skillItems = (0, import_react67.useMemo)(
80849
+ () => skills.map((skill) => ({
80850
+ key: skill.dirName,
80851
+ value: skill
80852
+ })),
80853
+ [skills]
80854
+ );
80855
+ const destinationItems = (0, import_react67.useMemo)(
80856
+ () => DESTINATION_CHOICES.map((choice) => {
80857
+ if (choice.destination === "project" && !isTrustedFolder) {
80858
+ return {
80859
+ key: choice.destination,
80860
+ value: {
80861
+ ...choice,
80862
+ description: ".gemini/skills \u2014 unavailable until this workspace is trusted"
80863
+ },
80864
+ disabled: true
80865
+ };
80866
+ }
80867
+ return {
80868
+ key: choice.destination,
80869
+ value: choice
80870
+ };
80871
+ }),
80872
+ [isTrustedFolder]
80873
+ );
80874
+ const handleSelectSkill = (0, import_react67.useCallback)((skill) => {
80875
+ setSelectedSkill(skill);
80876
+ setFeedback(null);
80877
+ setPhase("action");
80878
+ }, []);
80879
+ const handleSelectDestination = (0, import_react67.useCallback)(
80880
+ (choice) => {
80881
+ if (!selectedSkill) return;
80882
+ if (choice.destination === "project" && !config.isTrustedFolder()) {
80883
+ setFeedback({
80884
+ text: "Project skills are unavailable until this workspace is trusted.",
80885
+ isError: true
80886
+ });
80887
+ return;
80888
+ }
80889
+ setFeedback(null);
80890
+ void (async () => {
80891
+ try {
80892
+ let result;
80893
+ if (choice.destination === "dismiss") {
80894
+ result = await dismissInboxSkill(config, selectedSkill.dirName);
80895
+ } else {
80896
+ result = await moveInboxSkill(
80897
+ config,
80898
+ selectedSkill.dirName,
80899
+ choice.destination
80900
+ );
80901
+ }
80902
+ setFeedback({ text: result.message, isError: !result.success });
80903
+ if (!result.success) {
80904
+ return;
80905
+ }
80906
+ setSkills(
80907
+ (prev) => prev.filter((skill) => skill.dirName !== selectedSkill.dirName)
80908
+ );
80909
+ setSelectedSkill(null);
80910
+ setPhase("list");
80911
+ if (choice.destination === "dismiss") {
80912
+ return;
80913
+ }
80914
+ try {
80915
+ await onReloadSkills();
80916
+ } catch (error) {
80917
+ setFeedback({
80918
+ text: `${result.message} Failed to reload skills: ${getErrorMessage(error)}`,
80919
+ isError: true
80920
+ });
80921
+ }
80922
+ } catch (error) {
80923
+ const operation = choice.destination === "dismiss" ? "dismiss skill" : "install skill";
80924
+ setFeedback({
80925
+ text: `Failed to ${operation}: ${getErrorMessage(error)}`,
80926
+ isError: true
80927
+ });
80928
+ }
80929
+ })();
80930
+ },
80931
+ [config, selectedSkill, onReloadSkills]
80932
+ );
80933
+ useKeypress(
80934
+ (key) => {
80935
+ if (keyMatchers["basic.cancel" /* ESCAPE */](key)) {
80936
+ if (phase === "action") {
80937
+ setPhase("list");
80938
+ setSelectedSkill(null);
80939
+ setFeedback(null);
80940
+ } else {
80941
+ onClose();
80942
+ }
80943
+ return true;
80944
+ }
80945
+ return false;
80946
+ },
80947
+ { isActive: true, priority: true }
80948
+ );
80949
+ if (loading) {
80950
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
80951
+ Box_default,
80952
+ {
80953
+ flexDirection: "column",
80954
+ borderStyle: "round",
80955
+ borderColor: theme.border.default,
80956
+ paddingX: 2,
80957
+ paddingY: 1,
80958
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { children: "Loading inbox\u2026" })
80959
+ }
80960
+ );
80961
+ }
80962
+ if (skills.length === 0 && !feedback) {
80963
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
80964
+ Box_default,
80965
+ {
80966
+ flexDirection: "column",
80967
+ borderStyle: "round",
80968
+ borderColor: theme.border.default,
80969
+ paddingX: 2,
80970
+ paddingY: 1,
80971
+ children: [
80972
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { bold: true, children: "Skill Inbox" }),
80973
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme.text.secondary, children: "No extracted skills in inbox." }) }),
80974
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DialogFooter, { primaryAction: "Esc to close", cancelAction: "" })
80975
+ ]
80976
+ }
80977
+ );
80978
+ }
80979
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
80980
+ Box_default,
80981
+ {
80982
+ flexDirection: "column",
80983
+ borderStyle: "round",
80984
+ borderColor: theme.border.default,
80985
+ paddingX: 2,
80986
+ paddingY: 1,
80987
+ width: "100%",
80988
+ children: phase === "list" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
80989
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { bold: true, children: [
80990
+ "Skill Inbox (",
80991
+ skills.length,
80992
+ " skill",
80993
+ skills.length !== 1 ? "s" : "",
80994
+ ")"
80995
+ ] }),
80996
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme.text.secondary, children: "Skills extracted from past sessions. Select one to move or dismiss." }),
80997
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { flexDirection: "column", marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
80998
+ BaseSelectionList,
80999
+ {
81000
+ items: skillItems,
81001
+ onSelect: handleSelectSkill,
81002
+ isFocused: true,
81003
+ showNumbers: true,
81004
+ showScrollArrows: true,
81005
+ maxItemsToShow: 8,
81006
+ renderItem: (item, { titleColor }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { flexDirection: "column", minHeight: 2, children: [
81007
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: titleColor, bold: true, children: item.value.name }),
81008
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { flexDirection: "row", children: [
81009
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme.text.secondary, wrap: "wrap", children: item.value.description }),
81010
+ item.value.extractedAt && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color: theme.text.secondary, children: [
81011
+ " \xB7 ",
81012
+ formatDate(item.value.extractedAt)
81013
+ ] })
81014
+ ] })
81015
+ ] })
81016
+ }
81017
+ ) }),
81018
+ feedback && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
81019
+ Text,
81020
+ {
81021
+ color: feedback.isError ? theme.status.error : theme.status.success,
81022
+ children: [
81023
+ feedback.isError ? "\u2717 " : "\u2713 ",
81024
+ feedback.text
81025
+ ]
81026
+ }
81027
+ ) }),
81028
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
81029
+ DialogFooter,
81030
+ {
81031
+ primaryAction: "Enter to select",
81032
+ cancelAction: "Esc to close"
81033
+ }
81034
+ )
81035
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
81036
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { bold: true, children: [
81037
+ 'Move "',
81038
+ selectedSkill?.name,
81039
+ '"'
81040
+ ] }),
81041
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme.text.secondary, children: "Choose where to install this skill." }),
81042
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { flexDirection: "column", marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
81043
+ BaseSelectionList,
81044
+ {
81045
+ items: destinationItems,
81046
+ onSelect: handleSelectDestination,
81047
+ isFocused: true,
81048
+ showNumbers: true,
81049
+ renderItem: (item, { titleColor }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { flexDirection: "column", minHeight: 2, children: [
81050
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: titleColor, bold: true, children: item.value.label }),
81051
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme.text.secondary, children: item.value.description })
81052
+ ] })
81053
+ }
81054
+ ) }),
81055
+ feedback && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
81056
+ Text,
81057
+ {
81058
+ color: feedback.isError ? theme.status.error : theme.status.success,
81059
+ children: [
81060
+ feedback.isError ? "\u2717 " : "\u2713 ",
81061
+ feedback.text
81062
+ ]
81063
+ }
81064
+ ) }),
81065
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
81066
+ DialogFooter,
81067
+ {
81068
+ primaryAction: "Enter to confirm",
81069
+ cancelAction: "Esc to go back"
81070
+ }
81071
+ )
81072
+ ] })
81073
+ }
81074
+ );
81075
+ };
81076
+
80778
81077
  // packages/cli/src/ui/commands/memoryCommand.ts
80779
81078
  var memoryCommand = {
80780
81079
  name: "memory",
@@ -80875,6 +81174,40 @@ var memoryCommand = {
80875
81174
  Date.now()
80876
81175
  );
80877
81176
  }
81177
+ },
81178
+ {
81179
+ name: "inbox",
81180
+ description: "Review skills extracted from past sessions and move them to global or project skills",
81181
+ kind: "built-in" /* BUILT_IN */,
81182
+ autoExecute: true,
81183
+ action: (context) => {
81184
+ const config = context.services.agentContext?.config;
81185
+ if (!config) {
81186
+ return {
81187
+ type: "message",
81188
+ messageType: "error",
81189
+ content: "Config not loaded."
81190
+ };
81191
+ }
81192
+ if (!config.isMemoryManagerEnabled()) {
81193
+ return {
81194
+ type: "message",
81195
+ messageType: "info",
81196
+ content: "The memory inbox requires the experimental memory manager. Enable it with: experimental.memoryManager = true in settings."
81197
+ };
81198
+ }
81199
+ return {
81200
+ type: "custom_dialog",
81201
+ component: import_react68.default.createElement(SkillInboxDialog, {
81202
+ config,
81203
+ onClose: () => context.ui.removeComponent(),
81204
+ onReloadSkills: async () => {
81205
+ await config.reloadSkills();
81206
+ context.ui.reloadCommands();
81207
+ }
81208
+ })
81209
+ };
81210
+ }
80878
81211
  }
80879
81212
  ]
80880
81213
  };
@@ -80932,8 +81265,8 @@ var modelCommand = {
80932
81265
  };
80933
81266
 
80934
81267
  // packages/cli/src/ui/components/triage/TriageDuplicates.tsx
80935
- var import_react67 = __toESM(require_react(), 1);
80936
- var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
81268
+ var import_react69 = __toESM(require_react(), 1);
81269
+ var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
80937
81270
  var VISIBLE_LINES_COLLAPSED = 6;
80938
81271
  var VISIBLE_LINES_EXPANDED = 20;
80939
81272
  var VISIBLE_LINES_DETAIL = 25;
@@ -80958,7 +81291,7 @@ var TriageDuplicates = ({
80958
81291
  initialLimit = 50
80959
81292
  }) => {
80960
81293
  const keyMatchers = useKeyMatchers();
80961
- const [state, setState] = (0, import_react67.useState)({
81294
+ const [state, setState] = (0, import_react69.useState)({
80962
81295
  status: "loading",
80963
81296
  issues: [],
80964
81297
  currentIndex: 0,
@@ -80966,18 +81299,18 @@ var TriageDuplicates = ({
80966
81299
  analyzingIds: /* @__PURE__ */ new Set(),
80967
81300
  message: "Fetching issues..."
80968
81301
  });
80969
- const [focusSection, setFocusSection] = (0, import_react67.useState)("target");
80970
- const [selectedCandidateIndex, setSelectedCandidateIndex] = (0, import_react67.useState)(0);
80971
- const [targetExpanded, setTargetExpanded] = (0, import_react67.useState)(false);
80972
- const [targetScrollOffset, setTargetScrollOffset] = (0, import_react67.useState)(0);
80973
- const [candidateScrollOffset, setCandidateScrollOffset] = (0, import_react67.useState)(0);
80974
- const [inputAction, setInputAction] = (0, import_react67.useState)("");
80975
- const [processedHistory, setProcessedHistory] = (0, import_react67.useState)(
81302
+ const [focusSection, setFocusSection] = (0, import_react69.useState)("target");
81303
+ const [selectedCandidateIndex, setSelectedCandidateIndex] = (0, import_react69.useState)(0);
81304
+ const [targetExpanded, setTargetExpanded] = (0, import_react69.useState)(false);
81305
+ const [targetScrollOffset, setTargetScrollOffset] = (0, import_react69.useState)(0);
81306
+ const [candidateScrollOffset, setCandidateScrollOffset] = (0, import_react69.useState)(0);
81307
+ const [inputAction, setInputAction] = (0, import_react69.useState)("");
81308
+ const [processedHistory, setProcessedHistory] = (0, import_react69.useState)(
80976
81309
  []
80977
81310
  );
80978
- const [showHistory, setShowHistory] = (0, import_react67.useState)(false);
80979
- const [candidateListScrollOffset, setCandidateListScrollOffset] = (0, import_react67.useState)(0);
80980
- (0, import_react67.useEffect)(() => {
81311
+ const [showHistory, setShowHistory] = (0, import_react69.useState)(false);
81312
+ const [candidateListScrollOffset, setCandidateListScrollOffset] = (0, import_react69.useState)(0);
81313
+ (0, import_react69.useEffect)(() => {
80981
81314
  if (selectedCandidateIndex < candidateListScrollOffset) {
80982
81315
  setCandidateListScrollOffset(selectedCandidateIndex);
80983
81316
  } else if (selectedCandidateIndex >= candidateListScrollOffset + VISIBLE_CANDIDATES) {
@@ -81004,7 +81337,7 @@ var TriageDuplicates = ({
81004
81337
  return null;
81005
81338
  }
81006
81339
  };
81007
- const analyzeIssue = (0, import_react67.useCallback)(
81340
+ const analyzeIssue = (0, import_react69.useCallback)(
81008
81341
  async (issue) => {
81009
81342
  const dupComment = issue.comments.find(
81010
81343
  (c) => c.body.includes("Found possible duplicate issues:")
@@ -81145,7 +81478,7 @@ Return a JSON object with:
81145
81478
  },
81146
81479
  [config]
81147
81480
  );
81148
- (0, import_react67.useEffect)(() => {
81481
+ (0, import_react69.useEffect)(() => {
81149
81482
  if (state.issues.length === 0) return;
81150
81483
  const analyzeNext = async () => {
81151
81484
  const issuesToAnalyze = state.issues.slice(
@@ -81194,7 +81527,7 @@ Return a JSON object with:
81194
81527
  state.analyzingIds,
81195
81528
  analyzeIssue
81196
81529
  ]);
81197
- (0, import_react67.useEffect)(() => {
81530
+ (0, import_react69.useEffect)(() => {
81198
81531
  const issue = state.issues[state.currentIndex];
81199
81532
  if (!issue) return;
81200
81533
  const analysis = state.analysisCache.get(issue.number);
@@ -81230,7 +81563,7 @@ Return a JSON object with:
81230
81563
  state.analysisCache,
81231
81564
  state.analyzingIds
81232
81565
  ]);
81233
- const fetchIssues = (0, import_react67.useCallback)(async (limit) => {
81566
+ const fetchIssues = (0, import_react69.useCallback)(async (limit) => {
81234
81567
  try {
81235
81568
  const { stdout } = await spawnAsync("gh", [
81236
81569
  "issue",
@@ -81270,10 +81603,10 @@ Return a JSON object with:
81270
81603
  }));
81271
81604
  }
81272
81605
  }, []);
81273
- (0, import_react67.useEffect)(() => {
81606
+ (0, import_react69.useEffect)(() => {
81274
81607
  void fetchIssues(initialLimit);
81275
81608
  }, [fetchIssues, initialLimit]);
81276
- const handleNext = (0, import_react67.useCallback)(() => {
81609
+ const handleNext = (0, import_react69.useCallback)(() => {
81277
81610
  const nextIndex = state.currentIndex + 1;
81278
81611
  if (nextIndex < state.issues.length) {
81279
81612
  setFocusSection("target");
@@ -81465,16 +81798,16 @@ Return a JSON object with:
81465
81798
  { isActive: true }
81466
81799
  );
81467
81800
  if (state.status === "loading") {
81468
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { children: [
81469
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(build_default, { type: "dots" }),
81470
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { children: [
81801
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { children: [
81802
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(build_default, { type: "dots" }),
81803
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { children: [
81471
81804
  " ",
81472
81805
  state.message
81473
81806
  ] })
81474
81807
  ] });
81475
81808
  }
81476
81809
  if (showHistory) {
81477
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
81810
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
81478
81811
  Box_default,
81479
81812
  {
81480
81813
  flexDirection: "column",
@@ -81482,16 +81815,16 @@ Return a JSON object with:
81482
81815
  borderColor: "yellow",
81483
81816
  padding: 1,
81484
81817
  children: [
81485
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { bold: true, color: "yellow", children: "Processed Issues History:" }),
81486
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { flexDirection: "column", marginTop: 1, children: processedHistory.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: "gray", children: "No issues processed yet." }) : processedHistory.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { children: [
81487
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { bold: true, children: [
81818
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { bold: true, color: "yellow", children: "Processed Issues History:" }),
81819
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { flexDirection: "column", marginTop: 1, children: processedHistory.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: "No issues processed yet." }) : processedHistory.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { children: [
81820
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { bold: true, children: [
81488
81821
  "#",
81489
81822
  item.number
81490
81823
  ] }),
81491
81824
  " ",
81492
81825
  item.title.slice(0, 40),
81493
81826
  "...",
81494
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
81827
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
81495
81828
  Text,
81496
81829
  {
81497
81830
  color: item.action === "duplicate" ? "red" : item.action === "skip" ? "gray" : "green",
@@ -81504,19 +81837,19 @@ Return a JSON object with:
81504
81837
  }
81505
81838
  )
81506
81839
  ] }, i)) }),
81507
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: "gray", children: "Press 'h' or 'Esc' to return to triage." }) })
81840
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: "Press 'h' or 'Esc' to return to triage." }) })
81508
81841
  ]
81509
81842
  }
81510
81843
  );
81511
81844
  }
81512
81845
  if (state.status === "completed") {
81513
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: "green", children: state.message });
81846
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "green", children: state.message });
81514
81847
  }
81515
81848
  if (state.status === "error") {
81516
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: "red", children: state.message });
81849
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "red", children: state.message });
81517
81850
  }
81518
81851
  const { currentIssue } = state;
81519
- if (!currentIssue) return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { children: "Loading..." });
81852
+ if (!currentIssue) return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { children: "Loading..." });
81520
81853
  const targetBody = currentIssue.body || "";
81521
81854
  const targetLines = targetBody.split("\n");
81522
81855
  const visibleLines = targetExpanded ? VISIBLE_LINES_EXPANDED : VISIBLE_LINES_COLLAPSED;
@@ -81532,7 +81865,7 @@ Return a JSON object with:
81532
81865
  candidateScrollOffset,
81533
81866
  candidateScrollOffset + VISIBLE_LINES_DETAIL
81534
81867
  );
81535
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
81868
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
81536
81869
  Box_default,
81537
81870
  {
81538
81871
  flexDirection: "column",
@@ -81540,23 +81873,23 @@ Return a JSON object with:
81540
81873
  borderStyle: "double",
81541
81874
  padding: 1,
81542
81875
  children: [
81543
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { flexDirection: "row", justifyContent: "space-between", children: [
81544
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { bold: true, color: "magenta", children: [
81876
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "row", justifyContent: "space-between", children: [
81877
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { bold: true, color: "magenta", children: [
81545
81878
  "Candidate Detail: #",
81546
81879
  selectedCandidate.number
81547
81880
  ] }),
81548
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: "gray", children: "Esc to go back" })
81881
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: "Esc to go back" })
81549
81882
  ] }),
81550
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { bold: true, children: selectedCandidate.title }),
81551
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color: "gray", children: [
81883
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { bold: true, children: selectedCandidate.title }),
81884
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: "gray", children: [
81552
81885
  "Author: ",
81553
81886
  selectedCandidate.author?.login,
81554
81887
  " | \u{1F44D}",
81555
81888
  " ",
81556
81889
  getReactionCount(selectedCandidate)
81557
81890
  ] }),
81558
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: "gray", children: selectedCandidate.url }),
81559
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
81891
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: selectedCandidate.url }),
81892
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
81560
81893
  Box_default,
81561
81894
  {
81562
81895
  borderStyle: "single",
@@ -81564,12 +81897,12 @@ Return a JSON object with:
81564
81897
  flexDirection: "column",
81565
81898
  minHeight: Math.min(candLines.length, VISIBLE_LINES_DETAIL),
81566
81899
  children: [
81567
- candViewLines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { wrap: "wrap", children: line }, i)),
81568
- candLines.length > candidateScrollOffset + VISIBLE_LINES_DETAIL && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: "gray", children: "... (more below)" })
81900
+ candViewLines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { wrap: "wrap", children: line }, i)),
81901
+ candLines.length > candidateScrollOffset + VISIBLE_LINES_DETAIL && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: "... (more below)" })
81569
81902
  ]
81570
81903
  }
81571
81904
  ),
81572
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: "gray", children: "Use Up/Down to scroll. Left Arrow or Esc to go back." }) })
81905
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: "Use Up/Down to scroll. Left Arrow or Esc to go back." }) })
81573
81906
  ]
81574
81907
  }
81575
81908
  );
@@ -81578,18 +81911,18 @@ Return a JSON object with:
81578
81911
  candidateListScrollOffset,
81579
81912
  candidateListScrollOffset + VISIBLE_CANDIDATES
81580
81913
  ) || [];
81581
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { flexDirection: "column", children: [
81582
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { flexDirection: "row", justifyContent: "space-between", children: [
81583
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { bold: true, color: "cyan", children: [
81914
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "column", children: [
81915
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "row", justifyContent: "space-between", children: [
81916
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { bold: true, color: "cyan", children: [
81584
81917
  "Triage Issue (",
81585
81918
  state.currentIndex + 1,
81586
81919
  "/",
81587
81920
  state.issues.length,
81588
81921
  ")"
81589
81922
  ] }),
81590
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: "gray", children: "[Tab] Switch Focus | [h] History | [q] Quit" })
81923
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: "[Tab] Switch Focus | [h] History | [q] Quit" })
81591
81924
  ] }),
81592
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
81925
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
81593
81926
  Box_default,
81594
81927
  {
81595
81928
  flexDirection: "column",
@@ -81597,11 +81930,11 @@ Return a JSON object with:
81597
81930
  borderColor: focusSection === "target" ? "cyan" : "gray",
81598
81931
  paddingX: 1,
81599
81932
  children: [
81600
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { flexDirection: "row", justifyContent: "space-between", children: [
81601
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { children: [
81933
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "row", justifyContent: "space-between", children: [
81934
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { children: [
81602
81935
  "Issue:",
81603
81936
  " ",
81604
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { bold: true, color: "yellow", children: [
81937
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { bold: true, color: "yellow", children: [
81605
81938
  "#",
81606
81939
  currentIssue.number
81607
81940
  ] }),
@@ -81609,7 +81942,7 @@ Return a JSON object with:
81609
81942
  "- ",
81610
81943
  currentIssue.title
81611
81944
  ] }),
81612
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color: "gray", children: [
81945
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: "gray", children: [
81613
81946
  "Author: ",
81614
81947
  currentIssue.author?.login,
81615
81948
  " | \u{1F44D}",
@@ -81617,24 +81950,24 @@ Return a JSON object with:
81617
81950
  getReactionCount(currentIssue)
81618
81951
  ] })
81619
81952
  ] }),
81620
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: "gray", children: currentIssue.url }),
81621
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
81953
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: currentIssue.url }),
81954
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
81622
81955
  Box_default,
81623
81956
  {
81624
81957
  marginTop: 1,
81625
81958
  flexDirection: "column",
81626
81959
  minHeight: Math.min(targetLines.length, visibleLines),
81627
81960
  children: [
81628
- targetViewLines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { italic: true, wrap: "wrap", children: line }, i)),
81629
- !targetExpanded && targetLines.length > VISIBLE_LINES_COLLAPSED && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: "gray", children: "... (press 'e' to expand)" }),
81630
- targetExpanded && targetLines.length > targetScrollOffset + VISIBLE_LINES_EXPANDED && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: "gray", children: "... (more below)" })
81961
+ targetViewLines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { italic: true, wrap: "wrap", children: line }, i)),
81962
+ !targetExpanded && targetLines.length > VISIBLE_LINES_COLLAPSED && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: "... (press 'e' to expand)" }),
81963
+ targetExpanded && targetLines.length > targetScrollOffset + VISIBLE_LINES_EXPANDED && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: "... (more below)" })
81631
81964
  ]
81632
81965
  }
81633
81966
  )
81634
81967
  ]
81635
81968
  }
81636
81969
  ),
81637
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
81970
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
81638
81971
  Box_default,
81639
81972
  {
81640
81973
  flexDirection: "column",
@@ -81643,23 +81976,23 @@ Return a JSON object with:
81643
81976
  borderColor: focusSection === "candidates" ? "magenta" : "gray",
81644
81977
  paddingX: 1,
81645
81978
  minHeight: VISIBLE_CANDIDATES * 2 + 1,
81646
- children: state.status === "analyzing" && !state.candidates ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
81979
+ children: state.status === "analyzing" && !state.candidates ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
81647
81980
  Box_default,
81648
81981
  {
81649
81982
  alignItems: "center",
81650
81983
  justifyContent: "center",
81651
81984
  height: VISIBLE_CANDIDATES * 2,
81652
81985
  children: [
81653
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(build_default, { type: "dots" }),
81654
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { children: [
81986
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(build_default, { type: "dots" }),
81987
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { children: [
81655
81988
  " ",
81656
81989
  state.message
81657
81990
  ] })
81658
81991
  ]
81659
81992
  }
81660
- ) : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
81661
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { bold: true, color: "magenta", children: "Ranked Candidates (Select to view details):" }),
81662
- state.candidates?.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { italic: true, color: "gray", children: [
81993
+ ) : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
81994
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { bold: true, color: "magenta", children: "Ranked Candidates (Select to view details):" }),
81995
+ state.candidates?.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { italic: true, color: "gray", children: [
81663
81996
  " ",
81664
81997
  "No candidates found."
81665
81998
  ] }) : visibleCandidates.map((c, i) => {
@@ -81667,8 +82000,8 @@ Return a JSON object with:
81667
82000
  const isDuplicateOfCurrent = currentIssue && c.comments.some(
81668
82001
  (comment) => comment.body.toLowerCase().includes(`duplicate of #${currentIssue.number}`)
81669
82002
  );
81670
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { flexDirection: "column", marginLeft: 1, children: [
81671
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
82003
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "column", marginLeft: 1, children: [
82004
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
81672
82005
  Text,
81673
82006
  {
81674
82007
  color: state.canonicalIssue?.number === c.number ? "green" : "white",
@@ -81677,18 +82010,18 @@ Return a JSON object with:
81677
82010
  children: [
81678
82011
  absoluteIndex + 1,
81679
82012
  ". ",
81680
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { bold: true, children: [
82013
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { bold: true, children: [
81681
82014
  "#",
81682
82015
  c.number
81683
82016
  ] }),
81684
82017
  " ",
81685
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color: getStateColor(c.state, c.stateReason), children: [
82018
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: getStateColor(c.state, c.stateReason), children: [
81686
82019
  "[",
81687
82020
  (c.stateReason || c.state).toUpperCase(),
81688
82021
  "]"
81689
82022
  ] }),
81690
82023
  " ",
81691
- isDuplicateOfCurrent && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color: "red", bold: true, children: [
82024
+ isDuplicateOfCurrent && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: "red", bold: true, children: [
81692
82025
  "[DUPLICATE OF CURRENT]",
81693
82026
  " "
81694
82027
  ] }),
@@ -81700,7 +82033,7 @@ Return a JSON object with:
81700
82033
  ]
81701
82034
  }
81702
82035
  ),
81703
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color: "gray", wrap: "wrap", children: [
82036
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: "gray", wrap: "wrap", children: [
81704
82037
  "Reactions: ",
81705
82038
  getReactionCount(c),
81706
82039
  " | ",
@@ -81708,7 +82041,7 @@ Return a JSON object with:
81708
82041
  ] }) })
81709
82042
  ] }, c.number);
81710
82043
  }),
81711
- state.candidates && state.candidates.length > candidateListScrollOffset + VISIBLE_CANDIDATES && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color: "gray", children: [
82044
+ state.candidates && state.candidates.length > candidateListScrollOffset + VISIBLE_CANDIDATES && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: "gray", children: [
81712
82045
  "... (",
81713
82046
  state.candidates.length - (candidateListScrollOffset + VISIBLE_CANDIDATES),
81714
82047
  " ",
@@ -81717,7 +82050,7 @@ Return a JSON object with:
81717
82050
  ] })
81718
82051
  }
81719
82052
  ),
81720
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
82053
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
81721
82054
  Box_default,
81722
82055
  {
81723
82056
  marginTop: 1,
@@ -81726,19 +82059,19 @@ Return a JSON object with:
81726
82059
  borderColor: "blue",
81727
82060
  flexDirection: "column",
81728
82061
  children: [
81729
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { flexDirection: "row", children: [
81730
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { bold: true, color: "blue", children: [
82062
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "row", children: [
82063
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { bold: true, color: "blue", children: [
81731
82064
  "Analysis:",
81732
82065
  " "
81733
82066
  ] }),
81734
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { wrap: "wrap", children: [
82067
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { wrap: "wrap", children: [
81735
82068
  " ",
81736
82069
  state.message
81737
82070
  ] })
81738
82071
  ] }),
81739
- state.suggestedComment && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
81740
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { bold: true, color: "gray", children: "Suggested Comment:" }),
81741
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { italic: true, color: "gray", wrap: "wrap", children: [
82072
+ state.suggestedComment && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [
82073
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { bold: true, color: "gray", children: "Suggested Comment:" }),
82074
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { italic: true, color: "gray", wrap: "wrap", children: [
81742
82075
  '"',
81743
82076
  state.suggestedComment,
81744
82077
  '"'
@@ -81747,18 +82080,18 @@ Return a JSON object with:
81747
82080
  ]
81748
82081
  }
81749
82082
  ),
81750
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { marginTop: 1, flexDirection: "row", gap: 2, children: [
81751
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Box_default, { flexDirection: "column", children: [
81752
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { bold: true, color: "white", children: "Actions (Focus Target/List to use):" }),
81753
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { children: [
82083
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { marginTop: 1, flexDirection: "row", gap: 2, children: [
82084
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "column", children: [
82085
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { bold: true, color: "white", children: "Actions (Focus Target/List to use):" }),
82086
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { children: [
81754
82087
  "[d] Mark as duplicate",
81755
82088
  " ",
81756
82089
  state.canonicalIssue ? `of #${state.canonicalIssue.number}` : ""
81757
82090
  ] }),
81758
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { children: "[r] Remove 'possible-duplicate' label" }),
81759
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { children: "[s] Skip" })
82091
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { children: "[r] Remove 'possible-duplicate' label" }),
82092
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { children: "[s] Skip" })
81760
82093
  ] }),
81761
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
82094
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
81762
82095
  Box_default,
81763
82096
  {
81764
82097
  borderStyle: "bold",
@@ -81768,11 +82101,11 @@ Return a JSON object with:
81768
82101
  alignItems: "center",
81769
82102
  justifyContent: "center",
81770
82103
  children: [
81771
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { bold: true, color: "yellow", children: [
82104
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { bold: true, color: "yellow", children: [
81772
82105
  "SELECTED: ",
81773
82106
  inputAction ? inputAction.toUpperCase() : "..."
81774
82107
  ] }),
81775
- inputAction ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: "gray", children: "Press ENTER to confirm" }) : null
82108
+ inputAction ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: "Press ENTER to confirm" }) : null
81776
82109
  ]
81777
82110
  }
81778
82111
  )
@@ -81781,8 +82114,8 @@ Return a JSON object with:
81781
82114
  };
81782
82115
 
81783
82116
  // packages/cli/src/ui/components/triage/TriageIssues.tsx
81784
- var import_react68 = __toESM(require_react(), 1);
81785
- var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
82117
+ var import_react70 = __toESM(require_react(), 1);
82118
+ var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
81786
82119
  var VISIBLE_LINES_COLLAPSED2 = 8;
81787
82120
  var VISIBLE_LINES_EXPANDED2 = 20;
81788
82121
  var MAX_CONCURRENT_ANALYSIS2 = 10;
@@ -81800,7 +82133,7 @@ var TriageIssues = ({
81800
82133
  until
81801
82134
  }) => {
81802
82135
  const keyMatchers = useKeyMatchers();
81803
- const [state, setState] = (0, import_react68.useState)({
82136
+ const [state, setState] = (0, import_react70.useState)({
81804
82137
  status: "loading",
81805
82138
  issues: [],
81806
82139
  currentIndex: 0,
@@ -81808,15 +82141,15 @@ var TriageIssues = ({
81808
82141
  analyzingIds: /* @__PURE__ */ new Set(),
81809
82142
  message: "Fetching issues..."
81810
82143
  });
81811
- const [targetExpanded, setTargetExpanded] = (0, import_react68.useState)(false);
81812
- const [targetScrollOffset, setTargetScrollOffset] = (0, import_react68.useState)(0);
81813
- const [isEditingComment, setIsEditingComment] = (0, import_react68.useState)(false);
81814
- const [processedHistory, setProcessedHistory] = (0, import_react68.useState)(
82144
+ const [targetExpanded, setTargetExpanded] = (0, import_react70.useState)(false);
82145
+ const [targetScrollOffset, setTargetScrollOffset] = (0, import_react70.useState)(0);
82146
+ const [isEditingComment, setIsEditingComment] = (0, import_react70.useState)(false);
82147
+ const [processedHistory, setProcessedHistory] = (0, import_react70.useState)(
81815
82148
  []
81816
82149
  );
81817
- const [showHistory, setShowHistory] = (0, import_react68.useState)(false);
81818
- const abortControllerRef = (0, import_react68.useRef)(new AbortController());
81819
- (0, import_react68.useEffect)(
82150
+ const [showHistory, setShowHistory] = (0, import_react70.useState)(false);
82151
+ const abortControllerRef = (0, import_react70.useRef)(new AbortController());
82152
+ (0, import_react70.useEffect)(
81820
82153
  () => () => {
81821
82154
  abortControllerRef.current.abort();
81822
82155
  },
@@ -81828,12 +82161,12 @@ var TriageIssues = ({
81828
82161
  });
81829
82162
  const currentIssue = state.issues[state.currentIndex];
81830
82163
  const analysis = currentIssue ? state.analysisCache.get(currentIssue.number) : void 0;
81831
- (0, import_react68.useEffect)(() => {
82164
+ (0, import_react70.useEffect)(() => {
81832
82165
  if (analysis?.suggested_comment && !isEditingComment) {
81833
82166
  commentBuffer.setText(analysis.suggested_comment);
81834
82167
  }
81835
82168
  }, [analysis, commentBuffer, isEditingComment]);
81836
- const fetchIssues = (0, import_react68.useCallback)(
82169
+ const fetchIssues = (0, import_react70.useCallback)(
81837
82170
  async (limit) => {
81838
82171
  try {
81839
82172
  const searchParts = [
@@ -81881,10 +82214,10 @@ var TriageIssues = ({
81881
82214
  },
81882
82215
  [until]
81883
82216
  );
81884
- (0, import_react68.useEffect)(() => {
82217
+ (0, import_react70.useEffect)(() => {
81885
82218
  void fetchIssues(initialLimit);
81886
82219
  }, [fetchIssues, initialLimit]);
81887
- const analyzeIssue = (0, import_react68.useCallback)(
82220
+ const analyzeIssue = (0, import_react70.useCallback)(
81888
82221
  async (issue) => {
81889
82222
  const client = config.getBaseLlmClient();
81890
82223
  const prompt = `
@@ -81943,7 +82276,7 @@ Return a JSON object with:
81943
82276
  },
81944
82277
  [config]
81945
82278
  );
81946
- (0, import_react68.useEffect)(() => {
82279
+ (0, import_react70.useEffect)(() => {
81947
82280
  if (state.issues.length === 0) return;
81948
82281
  const analyzeNext = async () => {
81949
82282
  const issuesToAnalyze = state.issues.slice(
@@ -81990,7 +82323,7 @@ Return a JSON object with:
81990
82323
  state.analyzingIds,
81991
82324
  analyzeIssue
81992
82325
  ]);
81993
- const handleNext = (0, import_react68.useCallback)(() => {
82326
+ const handleNext = (0, import_react70.useCallback)(() => {
81994
82327
  const nextIndex = state.currentIndex + 1;
81995
82328
  if (nextIndex < state.issues.length) {
81996
82329
  setTargetExpanded(false);
@@ -82005,7 +82338,7 @@ Return a JSON object with:
82005
82338
  }));
82006
82339
  }
82007
82340
  }, [state.currentIndex, state.issues.length]);
82008
- (0, import_react68.useEffect)(() => {
82341
+ (0, import_react70.useEffect)(() => {
82009
82342
  if (currentIssue && state.analysisCache.has(currentIssue.number)) {
82010
82343
  const res = state.analysisCache.get(currentIssue.number);
82011
82344
  if (res.recommendation === "keep") {
@@ -82115,16 +82448,16 @@ Return a JSON object with:
82115
82448
  { isActive: true }
82116
82449
  );
82117
82450
  if (state.status === "loading") {
82118
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { children: [
82119
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(build_default, { type: "dots" }),
82120
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { children: [
82451
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { children: [
82452
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(build_default, { type: "dots" }),
82453
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { children: [
82121
82454
  " ",
82122
82455
  state.message
82123
82456
  ] })
82124
82457
  ] });
82125
82458
  }
82126
82459
  if (showHistory) {
82127
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
82460
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
82128
82461
  Box_default,
82129
82462
  {
82130
82463
  flexDirection: "column",
@@ -82132,50 +82465,50 @@ Return a JSON object with:
82132
82465
  borderColor: "yellow",
82133
82466
  padding: 1,
82134
82467
  children: [
82135
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { bold: true, color: "yellow", children: "Processed Issues History:" }),
82136
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { flexDirection: "column", marginTop: 1, children: processedHistory.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: "No issues processed yet." }) : processedHistory.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { children: [
82137
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { bold: true, children: [
82468
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { bold: true, color: "yellow", children: "Processed Issues History:" }),
82469
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { flexDirection: "column", marginTop: 1, children: processedHistory.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "gray", children: "No issues processed yet." }) : processedHistory.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { children: [
82470
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { bold: true, children: [
82138
82471
  "#",
82139
82472
  item.number
82140
82473
  ] }),
82141
82474
  " ",
82142
82475
  item.title.slice(0, 40),
82143
82476
  "...",
82144
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: item.action === "close" ? "red" : "gray", children: [
82477
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: item.action === "close" ? "red" : "gray", children: [
82145
82478
  " ",
82146
82479
  "[",
82147
82480
  item.action.toUpperCase(),
82148
82481
  "]"
82149
82482
  ] })
82150
82483
  ] }, i)) }),
82151
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: "Press 'h' or 'Esc' to return." }) })
82484
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "gray", children: "Press 'h' or 'Esc' to return." }) })
82152
82485
  ]
82153
82486
  }
82154
82487
  );
82155
82488
  }
82156
82489
  if (state.status === "completed") {
82157
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "column", padding: 1, children: [
82158
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "green", bold: true, children: state.message }),
82159
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: "Press any key or 'q' to exit." }) })
82490
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { flexDirection: "column", padding: 1, children: [
82491
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "green", bold: true, children: state.message }),
82492
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "gray", children: "Press any key or 'q' to exit." }) })
82160
82493
  ] });
82161
82494
  }
82162
82495
  if (state.status === "error") {
82163
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "column", padding: 1, children: [
82164
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "red", bold: true, children: state.message }),
82165
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: "Press 'q' or 'Esc' to exit." }) })
82496
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { flexDirection: "column", padding: 1, children: [
82497
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "red", bold: true, children: state.message }),
82498
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "gray", children: "Press 'q' or 'Esc' to exit." }) })
82166
82499
  ] });
82167
82500
  }
82168
82501
  if (!currentIssue) {
82169
82502
  if (state.status === "analyzing") {
82170
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { children: [
82171
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(build_default, { type: "dots" }),
82172
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { children: [
82503
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { children: [
82504
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(build_default, { type: "dots" }),
82505
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { children: [
82173
82506
  " ",
82174
82507
  state.message
82175
82508
  ] })
82176
82509
  ] });
82177
82510
  }
82178
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { children: "No issues found." });
82511
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { children: "No issues found." });
82179
82512
  }
82180
82513
  const targetBody = currentIssue.body || "";
82181
82514
  const targetLines = targetBody.split("\n");
@@ -82184,10 +82517,10 @@ Return a JSON object with:
82184
82517
  targetScrollOffset,
82185
82518
  targetScrollOffset + visibleLines
82186
82519
  );
82187
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "column", children: [
82188
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "row", justifyContent: "space-between", children: [
82189
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "column", children: [
82190
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { bold: true, color: "cyan", children: [
82520
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { flexDirection: "column", children: [
82521
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { flexDirection: "row", justifyContent: "space-between", children: [
82522
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { flexDirection: "column", children: [
82523
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { bold: true, color: "cyan", children: [
82191
82524
  "Triage Potential Candidates (",
82192
82525
  state.currentIndex + 1,
82193
82526
  "/",
@@ -82195,11 +82528,11 @@ Return a JSON object with:
82195
82528
  ")",
82196
82529
  until ? ` (until ${until})` : ""
82197
82530
  ] }),
82198
- !until && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", dimColor: true, children: "Tip: use --until YYYY-MM-DD to triage older issues." })
82531
+ !until && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "gray", dimColor: true, children: "Tip: use --until YYYY-MM-DD to triage older issues." })
82199
82532
  ] }),
82200
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: "[h] History | [q] Quit" })
82533
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "gray", children: "[h] History | [q] Quit" })
82201
82534
  ] }),
82202
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
82535
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
82203
82536
  Box_default,
82204
82537
  {
82205
82538
  flexDirection: "column",
@@ -82207,11 +82540,11 @@ Return a JSON object with:
82207
82540
  borderColor: "cyan",
82208
82541
  paddingX: 1,
82209
82542
  children: [
82210
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "row", justifyContent: "space-between", children: [
82211
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { children: [
82543
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { flexDirection: "row", justifyContent: "space-between", children: [
82544
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { children: [
82212
82545
  "Issue:",
82213
82546
  " ",
82214
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { bold: true, color: "yellow", children: [
82547
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { bold: true, color: "yellow", children: [
82215
82548
  "#",
82216
82549
  currentIssue.number
82217
82550
  ] }),
@@ -82219,7 +82552,7 @@ Return a JSON object with:
82219
82552
  "- ",
82220
82553
  currentIssue.title
82221
82554
  ] }),
82222
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { color: "gray", children: [
82555
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { color: "gray", children: [
82223
82556
  "Author: ",
82224
82557
  currentIssue.author?.login,
82225
82558
  " | \u{1F44D}",
@@ -82227,24 +82560,24 @@ Return a JSON object with:
82227
82560
  getReactionCount2(currentIssue)
82228
82561
  ] })
82229
82562
  ] }),
82230
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", wrap: "truncate-end", children: currentIssue.url }),
82231
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
82563
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "gray", wrap: "truncate-end", children: currentIssue.url }),
82564
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
82232
82565
  Box_default,
82233
82566
  {
82234
82567
  marginTop: 1,
82235
82568
  flexDirection: "column",
82236
82569
  minHeight: Math.min(targetLines.length, visibleLines),
82237
82570
  children: [
82238
- targetViewLines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { italic: true, wrap: "truncate-end", children: line }, i)),
82239
- !targetExpanded && targetLines.length > VISIBLE_LINES_COLLAPSED2 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: "... (press 'e' to expand)" }),
82240
- targetExpanded && targetLines.length > targetScrollOffset + VISIBLE_LINES_EXPANDED2 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: "... (more below)" })
82571
+ targetViewLines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { italic: true, wrap: "truncate-end", children: line }, i)),
82572
+ !targetExpanded && targetLines.length > VISIBLE_LINES_COLLAPSED2 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "gray", children: "... (press 'e' to expand)" }),
82573
+ targetExpanded && targetLines.length > targetScrollOffset + VISIBLE_LINES_EXPANDED2 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "gray", children: "... (more below)" })
82241
82574
  ]
82242
82575
  }
82243
82576
  )
82244
82577
  ]
82245
82578
  }
82246
82579
  ),
82247
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
82580
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
82248
82581
  Box_default,
82249
82582
  {
82250
82583
  marginTop: 1,
@@ -82252,25 +82585,25 @@ Return a JSON object with:
82252
82585
  borderStyle: "round",
82253
82586
  borderColor: "blue",
82254
82587
  flexDirection: "column",
82255
- children: state.status === "analyzing" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { children: [
82256
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(build_default, { type: "dots" }),
82257
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { children: " Analyzing issue with Gemini..." })
82258
- ] }) : analysis ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
82259
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "row", children: [
82260
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { bold: true, color: "blue", children: [
82588
+ children: state.status === "analyzing" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { children: [
82589
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(build_default, { type: "dots" }),
82590
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { children: " Analyzing issue with Gemini..." })
82591
+ ] }) : analysis ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
82592
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { flexDirection: "row", children: [
82593
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { bold: true, color: "blue", children: [
82261
82594
  "Gemini Recommendation:",
82262
82595
  " "
82263
82596
  ] }),
82264
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "red", bold: true, children: "CLOSE" })
82597
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "red", bold: true, children: "CLOSE" })
82265
82598
  ] }),
82266
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { italic: true, children: [
82599
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { italic: true, children: [
82267
82600
  "Reason: ",
82268
82601
  analysis.reason
82269
82602
  ] })
82270
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: "gray", children: "Waiting for analysis..." })
82603
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "gray", children: "Waiting for analysis..." })
82271
82604
  }
82272
82605
  ),
82273
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { marginTop: 1, flexDirection: "column", children: isEditingComment ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
82606
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { marginTop: 1, flexDirection: "column", children: isEditingComment ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
82274
82607
  Box_default,
82275
82608
  {
82276
82609
  flexDirection: "column",
@@ -82278,8 +82611,8 @@ Return a JSON object with:
82278
82611
  borderColor: "magenta",
82279
82612
  padding: 1,
82280
82613
  children: [
82281
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { bold: true, color: "magenta", children: "Edit Closing Comment (Enter to confirm, Esc to cancel):" }),
82282
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
82614
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { bold: true, color: "magenta", children: "Edit Closing Comment (Enter to confirm, Esc to cancel):" }),
82615
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
82283
82616
  TextInput,
82284
82617
  {
82285
82618
  buffer: commentBuffer,
@@ -82289,16 +82622,16 @@ Return a JSON object with:
82289
82622
  ) })
82290
82623
  ]
82291
82624
  }
82292
- ) : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "row", gap: 2, children: [
82293
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "column", children: [
82294
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { bold: true, children: "Actions:" }),
82295
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { children: "[c] Close Issue (with comment)" }),
82296
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { children: "[s] Skip / Next" }),
82297
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { children: "[e] Expand/Collapse Body" })
82625
+ ) : /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { flexDirection: "row", gap: 2, children: [
82626
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { flexDirection: "column", children: [
82627
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { bold: true, children: "Actions:" }),
82628
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { children: "[c] Close Issue (with comment)" }),
82629
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { children: "[s] Skip / Next" }),
82630
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { children: "[e] Expand/Collapse Body" })
82298
82631
  ] }),
82299
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, marginLeft: 2, children: [
82300
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { bold: true, color: "gray", children: "Suggested Comment:" }),
82301
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { italic: true, color: "gray", wrap: "truncate-end", children: [
82632
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { flexDirection: "column", flexGrow: 1, marginLeft: 2, children: [
82633
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { bold: true, color: "gray", children: "Suggested Comment:" }),
82634
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { italic: true, color: "gray", wrap: "truncate-end", children: [
82302
82635
  '"',
82303
82636
  analysis?.suggested_comment,
82304
82637
  '"'
@@ -82309,7 +82642,7 @@ Return a JSON object with:
82309
82642
  };
82310
82643
 
82311
82644
  // packages/cli/src/ui/commands/oncallCommand.tsx
82312
- var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
82645
+ var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
82313
82646
  var oncallCommand = {
82314
82647
  name: "oncall",
82315
82648
  description: "Oncall related commands",
@@ -82337,7 +82670,7 @@ var oncallCommand = {
82337
82670
  }
82338
82671
  return {
82339
82672
  type: "custom_dialog",
82340
- component: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
82673
+ component: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
82341
82674
  TriageDuplicates,
82342
82675
  {
82343
82676
  config,
@@ -82393,7 +82726,7 @@ var oncallCommand = {
82393
82726
  }
82394
82727
  return {
82395
82728
  type: "custom_dialog",
82396
- component: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
82729
+ component: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
82397
82730
  TriageIssues,
82398
82731
  {
82399
82732
  config,