@industry-theme/github-panels 0.1.52 → 0.1.54

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.
@@ -130,7 +130,7 @@ const createLucideIcon = (iconName, iconNode) => {
130
130
  * This source code is licensed under the ISC license.
131
131
  * See the LICENSE file in the root directory of this source tree.
132
132
  */
133
- const __iconNode$E = [
133
+ const __iconNode$F = [
134
134
  ["path", { d: "M12 7v14", key: "1akyts" }],
135
135
  [
136
136
  "path",
@@ -140,14 +140,14 @@ const __iconNode$E = [
140
140
  }
141
141
  ]
142
142
  ];
143
- const BookOpen = createLucideIcon("book-open", __iconNode$E);
143
+ const BookOpen = createLucideIcon("book-open", __iconNode$F);
144
144
  /**
145
145
  * @license lucide-react v0.552.0 - ISC
146
146
  *
147
147
  * This source code is licensed under the ISC license.
148
148
  * See the LICENSE file in the root directory of this source tree.
149
149
  */
150
- const __iconNode$D = [
150
+ const __iconNode$E = [
151
151
  ["path", { d: "M10 12h4", key: "a56b0p" }],
152
152
  ["path", { d: "M10 8h4", key: "1sr2af" }],
153
153
  ["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3", key: "1rgiei" }],
@@ -160,56 +160,67 @@ const __iconNode$D = [
160
160
  ],
161
161
  ["path", { d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16", key: "16ra0t" }]
162
162
  ];
163
- const Building2 = createLucideIcon("building-2", __iconNode$D);
163
+ const Building2 = createLucideIcon("building-2", __iconNode$E);
164
164
  /**
165
165
  * @license lucide-react v0.552.0 - ISC
166
166
  *
167
167
  * This source code is licensed under the ISC license.
168
168
  * See the LICENSE file in the root directory of this source tree.
169
169
  */
170
- const __iconNode$C = [
170
+ const __iconNode$D = [
171
171
  ["path", { d: "M8 2v4", key: "1cmpym" }],
172
172
  ["path", { d: "M16 2v4", key: "4m81vk" }],
173
173
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
174
174
  ["path", { d: "M3 10h18", key: "8toen8" }]
175
175
  ];
176
- const Calendar = createLucideIcon("calendar", __iconNode$C);
176
+ const Calendar = createLucideIcon("calendar", __iconNode$D);
177
177
  /**
178
178
  * @license lucide-react v0.552.0 - ISC
179
179
  *
180
180
  * This source code is licensed under the ISC license.
181
181
  * See the LICENSE file in the root directory of this source tree.
182
182
  */
183
- const __iconNode$B = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
184
- const Check = createLucideIcon("check", __iconNode$B);
183
+ const __iconNode$C = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
184
+ const Check = createLucideIcon("check", __iconNode$C);
185
185
  /**
186
186
  * @license lucide-react v0.552.0 - ISC
187
187
  *
188
188
  * This source code is licensed under the ISC license.
189
189
  * See the LICENSE file in the root directory of this source tree.
190
190
  */
191
- const __iconNode$A = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
192
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$A);
191
+ const __iconNode$B = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
192
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$B);
193
193
  /**
194
194
  * @license lucide-react v0.552.0 - ISC
195
195
  *
196
196
  * This source code is licensed under the ISC license.
197
197
  * See the LICENSE file in the root directory of this source tree.
198
198
  */
199
- const __iconNode$z = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
200
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$z);
199
+ const __iconNode$A = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
200
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$A);
201
201
  /**
202
202
  * @license lucide-react v0.552.0 - ISC
203
203
  *
204
204
  * This source code is licensed under the ISC license.
205
205
  * See the LICENSE file in the root directory of this source tree.
206
206
  */
207
- const __iconNode$y = [
207
+ const __iconNode$z = [
208
208
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
209
209
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
210
210
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
211
211
  ];
212
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$y);
212
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$z);
213
+ /**
214
+ * @license lucide-react v0.552.0 - ISC
215
+ *
216
+ * This source code is licensed under the ISC license.
217
+ * See the LICENSE file in the root directory of this source tree.
218
+ */
219
+ const __iconNode$y = [
220
+ ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
221
+ ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
222
+ ];
223
+ const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$y);
213
224
  /**
214
225
  * @license lucide-react v0.552.0 - ISC
215
226
  *
@@ -49138,25 +49149,67 @@ const formatDate$1 = (dateString) => {
49138
49149
  return `${years} ${years === 1 ? "year" : "years"} ago`;
49139
49150
  };
49140
49151
  const GitHubIssueDetailPanelContent = ({ events }) => {
49152
+ var _a;
49141
49153
  const { theme: theme2 } = useTheme();
49142
49154
  const [selectedIssue, setSelectedIssue] = useState(null);
49143
49155
  const [owner, setOwner] = useState("");
49144
49156
  const [repo, setRepo] = useState("");
49157
+ const [taskCreation, setTaskCreation] = useState({ status: "idle" });
49158
+ const [showTaskTypeModal, setShowTaskTypeModal] = useState(false);
49159
+ const [modalStep, setModalStep] = useState("type");
49160
+ const [selectedTaskType, setSelectedTaskType] = useState(null);
49161
+ const [additionalInstructions, setAdditionalInstructions] = useState("");
49145
49162
  const panelRef = useRef(null);
49146
49163
  gt(
49147
49164
  "github-issue-detail",
49148
49165
  events,
49149
49166
  () => {
49150
- var _a;
49151
- return (_a = panelRef.current) == null ? void 0 : _a.focus();
49167
+ var _a2;
49168
+ return (_a2 = panelRef.current) == null ? void 0 : _a2.focus();
49152
49169
  }
49153
49170
  );
49171
+ const handleCreateTask = () => {
49172
+ setShowTaskTypeModal(true);
49173
+ setModalStep("type");
49174
+ setSelectedTaskType(null);
49175
+ setAdditionalInstructions("");
49176
+ };
49177
+ const handleSelectTaskType = (taskType2) => {
49178
+ setSelectedTaskType(taskType2);
49179
+ setModalStep("instructions");
49180
+ };
49181
+ const handleSubmitTask = () => {
49182
+ if (!events || !selectedIssue || !selectedTaskType) return;
49183
+ setShowTaskTypeModal(false);
49184
+ setTaskCreation({ status: "loading" });
49185
+ events.emit({
49186
+ type: "issue:create-task",
49187
+ source: "github-issue-detail-panel",
49188
+ timestamp: Date.now(),
49189
+ payload: {
49190
+ issue: selectedIssue,
49191
+ owner,
49192
+ repo,
49193
+ taskType: selectedTaskType,
49194
+ additionalInstructions: additionalInstructions.trim() || void 0
49195
+ }
49196
+ });
49197
+ setModalStep("type");
49198
+ setSelectedTaskType(null);
49199
+ setAdditionalInstructions("");
49200
+ };
49201
+ const handleBackToTaskType = () => {
49202
+ setModalStep("type");
49203
+ setSelectedTaskType(null);
49204
+ setAdditionalInstructions("");
49205
+ };
49154
49206
  useEffect(() => {
49155
49207
  if (!events) return;
49156
49208
  const handleIssueSelected = (event) => {
49157
49209
  setSelectedIssue(event.payload.issue);
49158
49210
  setOwner(event.payload.owner);
49159
49211
  setRepo(event.payload.repo);
49212
+ setTaskCreation({ status: "idle" });
49160
49213
  };
49161
49214
  const unsubscribe = events.on("issue:selected", handleIssueSelected);
49162
49215
  return () => {
@@ -49165,6 +49218,34 @@ const GitHubIssueDetailPanelContent = ({ events }) => {
49165
49218
  }
49166
49219
  };
49167
49220
  }, [events]);
49221
+ useEffect(() => {
49222
+ if (!events) return;
49223
+ const unsubscribers = [
49224
+ events.on("issue:task-created", (event) => {
49225
+ const payload = event.payload;
49226
+ if (selectedIssue && payload.issueNumber === selectedIssue.number) {
49227
+ setTaskCreation({
49228
+ status: "success",
49229
+ taskId: payload.taskId
49230
+ });
49231
+ }
49232
+ }),
49233
+ events.on("issue:create-task:error", (event) => {
49234
+ const payload = event.payload;
49235
+ if (selectedIssue && payload.issueNumber === selectedIssue.number) {
49236
+ setTaskCreation({
49237
+ status: "error",
49238
+ error: payload.error
49239
+ });
49240
+ }
49241
+ })
49242
+ ];
49243
+ return () => {
49244
+ unsubscribers.forEach((unsub) => {
49245
+ if (typeof unsub === "function") unsub();
49246
+ });
49247
+ };
49248
+ }, [events, selectedIssue]);
49168
49249
  const handleBack = () => {
49169
49250
  setSelectedIssue(null);
49170
49251
  setOwner("");
@@ -49238,6 +49319,11 @@ const GitHubIssueDetailPanelContent = ({ events }) => {
49238
49319
  const statusColor = isOpen ? theme2.colors.success || "#22c55e" : theme2.colors.error || "#ef4444";
49239
49320
  const statusBg = `${statusColor}20`;
49240
49321
  const statusLabel = isOpen ? "Open" : "Closed";
49322
+ const taskLabel = (_a = selectedIssue.labels) == null ? void 0 : _a.find(
49323
+ (label) => label.name === "backlog-task:investigate" || label.name === "backlog-task:fix"
49324
+ );
49325
+ const hasTask = !!taskLabel;
49326
+ taskLabel == null ? void 0 : taskLabel.name.split(":")[1];
49241
49327
  return /* @__PURE__ */ jsxs("div", { ref: panelRef, tabIndex: -1, style: { ...containerStyle, outline: "none" }, children: [
49242
49328
  /* @__PURE__ */ jsxs(
49243
49329
  "div",
@@ -49303,43 +49389,6 @@ const GitHubIssueDetailPanelContent = ({ events }) => {
49303
49389
  ]
49304
49390
  }
49305
49391
  ),
49306
- selectedIssue.comments > 0 && /* @__PURE__ */ jsxs(
49307
- "span",
49308
- {
49309
- style: {
49310
- display: "inline-flex",
49311
- alignItems: "center",
49312
- gap: "4px",
49313
- color: theme2.colors.textSecondary,
49314
- fontSize: theme2.fontSizes[0]
49315
- },
49316
- children: [
49317
- /* @__PURE__ */ jsx(MessageSquare, { size: 12 }),
49318
- selectedIssue.comments
49319
- ]
49320
- }
49321
- ),
49322
- selectedIssue.assignees && selectedIssue.assignees.length > 0 && /* @__PURE__ */ jsxs(
49323
- "span",
49324
- {
49325
- style: {
49326
- display: "inline-flex",
49327
- alignItems: "center",
49328
- gap: "4px",
49329
- color: theme2.colors.textSecondary,
49330
- fontSize: theme2.fontSizes[0],
49331
- fontFamily: theme2.fonts.body
49332
- },
49333
- children: [
49334
- "assigned to",
49335
- " ",
49336
- selectedIssue.assignees.map((assignee, index2) => /* @__PURE__ */ jsxs("span", { children: [
49337
- /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.primary }, children: assignee.login }),
49338
- index2 < selectedIssue.assignees.length - 1 && ", "
49339
- ] }, assignee.login))
49340
- ]
49341
- }
49342
- ),
49343
49392
  /* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
49344
49393
  /* @__PURE__ */ jsx(
49345
49394
  "a",
@@ -49361,7 +49410,7 @@ const GitHubIssueDetailPanelContent = ({ events }) => {
49361
49410
  color: theme2.colors.textSecondary,
49362
49411
  textDecoration: "none"
49363
49412
  },
49364
- children: /* @__PURE__ */ jsx(ExternalLink, { size: 14 })
49413
+ children: /* @__PURE__ */ jsx(Github, { size: 16 })
49365
49414
  }
49366
49415
  ),
49367
49416
  /* @__PURE__ */ jsx(
@@ -49389,6 +49438,313 @@ const GitHubIssueDetailPanelContent = ({ events }) => {
49389
49438
  ]
49390
49439
  }
49391
49440
  ),
49441
+ selectedIssue.assignees && selectedIssue.assignees.length > 0 && /* @__PURE__ */ jsxs(
49442
+ "div",
49443
+ {
49444
+ style: {
49445
+ padding: "12px 16px",
49446
+ backgroundColor: theme2.colors.backgroundSecondary,
49447
+ borderBottom: `1px solid ${theme2.colors.border}`,
49448
+ display: "flex",
49449
+ alignItems: "center",
49450
+ gap: "12px"
49451
+ },
49452
+ children: [
49453
+ /* @__PURE__ */ jsx(
49454
+ "span",
49455
+ {
49456
+ style: {
49457
+ color: theme2.colors.textSecondary,
49458
+ fontSize: theme2.fontSizes[1],
49459
+ fontFamily: theme2.fonts.body,
49460
+ fontWeight: theme2.fontWeights.medium
49461
+ },
49462
+ children: "Assigned to:"
49463
+ }
49464
+ ),
49465
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", gap: "8px", flexWrap: "wrap" }, children: selectedIssue.assignees.map((assignee) => /* @__PURE__ */ jsxs(
49466
+ "div",
49467
+ {
49468
+ style: {
49469
+ display: "flex",
49470
+ alignItems: "center",
49471
+ gap: "6px",
49472
+ padding: "4px 10px",
49473
+ backgroundColor: theme2.colors.background,
49474
+ border: `1px solid ${theme2.colors.border}`,
49475
+ borderRadius: "16px"
49476
+ },
49477
+ children: [
49478
+ assignee.avatar_url && /* @__PURE__ */ jsx(
49479
+ "img",
49480
+ {
49481
+ src: assignee.avatar_url,
49482
+ alt: assignee.login,
49483
+ style: {
49484
+ width: "20px",
49485
+ height: "20px",
49486
+ borderRadius: "50%"
49487
+ }
49488
+ }
49489
+ ),
49490
+ /* @__PURE__ */ jsx(
49491
+ "span",
49492
+ {
49493
+ style: {
49494
+ color: theme2.colors.text,
49495
+ fontSize: theme2.fontSizes[1],
49496
+ fontFamily: theme2.fonts.body,
49497
+ fontWeight: theme2.fontWeights.medium
49498
+ },
49499
+ children: assignee.login
49500
+ }
49501
+ )
49502
+ ]
49503
+ },
49504
+ assignee.login
49505
+ )) })
49506
+ ]
49507
+ }
49508
+ ),
49509
+ /* @__PURE__ */ jsxs(
49510
+ "div",
49511
+ {
49512
+ style: {
49513
+ display: "flex",
49514
+ gap: "1px",
49515
+ backgroundColor: theme2.colors.border,
49516
+ borderBottom: `1px solid ${theme2.colors.border}`
49517
+ },
49518
+ children: [
49519
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, backgroundColor: theme2.colors.background }, children: [
49520
+ taskCreation.status === "idle" && !hasTask && /* @__PURE__ */ jsxs(
49521
+ "button",
49522
+ {
49523
+ onClick: handleCreateTask,
49524
+ style: {
49525
+ width: "100%",
49526
+ height: "100%",
49527
+ display: "flex",
49528
+ alignItems: "center",
49529
+ justifyContent: "center",
49530
+ gap: "8px",
49531
+ padding: "12px 16px",
49532
+ border: "none",
49533
+ background: "transparent",
49534
+ cursor: "pointer",
49535
+ color: theme2.colors.primary,
49536
+ fontSize: theme2.fontSizes[1],
49537
+ fontWeight: theme2.fontWeights.medium,
49538
+ transition: "background 0.2s ease"
49539
+ },
49540
+ onMouseEnter: (e) => {
49541
+ e.currentTarget.style.background = theme2.colors.backgroundSecondary;
49542
+ },
49543
+ onMouseLeave: (e) => {
49544
+ e.currentTarget.style.background = "transparent";
49545
+ },
49546
+ children: [
49547
+ /* @__PURE__ */ jsx(FileText, { size: 16 }),
49548
+ /* @__PURE__ */ jsx("span", { style: { lineHeight: 1 }, children: "Create Task" })
49549
+ ]
49550
+ }
49551
+ ),
49552
+ taskCreation.status === "idle" && hasTask && /* @__PURE__ */ jsxs(
49553
+ "button",
49554
+ {
49555
+ onClick: () => {
49556
+ if (events) {
49557
+ events.emit({
49558
+ type: "task:view",
49559
+ source: "github-issue-detail-panel",
49560
+ timestamp: Date.now(),
49561
+ payload: {
49562
+ issue: selectedIssue,
49563
+ owner,
49564
+ repo
49565
+ }
49566
+ });
49567
+ }
49568
+ },
49569
+ style: {
49570
+ width: "100%",
49571
+ height: "100%",
49572
+ display: "flex",
49573
+ alignItems: "center",
49574
+ justifyContent: "center",
49575
+ gap: "8px",
49576
+ padding: "12px 16px",
49577
+ border: "none",
49578
+ background: "transparent",
49579
+ cursor: "pointer",
49580
+ color: theme2.colors.success,
49581
+ fontSize: theme2.fontSizes[1],
49582
+ fontWeight: theme2.fontWeights.medium,
49583
+ transition: "background 0.2s ease"
49584
+ },
49585
+ onMouseEnter: (e) => {
49586
+ e.currentTarget.style.background = theme2.colors.backgroundSecondary;
49587
+ },
49588
+ onMouseLeave: (e) => {
49589
+ e.currentTarget.style.background = "transparent";
49590
+ },
49591
+ children: [
49592
+ /* @__PURE__ */ jsx(CircleCheckBig, { size: 16 }),
49593
+ /* @__PURE__ */ jsx("span", { style: { lineHeight: 1 }, children: "Task Started" })
49594
+ ]
49595
+ }
49596
+ ),
49597
+ taskCreation.status === "loading" && /* @__PURE__ */ jsxs(
49598
+ "button",
49599
+ {
49600
+ disabled: true,
49601
+ style: {
49602
+ width: "100%",
49603
+ height: "100%",
49604
+ display: "flex",
49605
+ alignItems: "center",
49606
+ justifyContent: "center",
49607
+ gap: "8px",
49608
+ padding: "12px 16px",
49609
+ border: "none",
49610
+ background: "transparent",
49611
+ cursor: "default",
49612
+ color: theme2.colors.textSecondary,
49613
+ fontSize: theme2.fontSizes[1]
49614
+ },
49615
+ children: [
49616
+ /* @__PURE__ */ jsx(LoaderCircle, { size: 16, style: { animation: "spin 1s linear infinite" } }),
49617
+ /* @__PURE__ */ jsx("span", { style: { lineHeight: 1 }, children: "Creating Task..." })
49618
+ ]
49619
+ }
49620
+ ),
49621
+ taskCreation.status === "success" && /* @__PURE__ */ jsxs(
49622
+ "button",
49623
+ {
49624
+ disabled: true,
49625
+ style: {
49626
+ width: "100%",
49627
+ height: "100%",
49628
+ display: "flex",
49629
+ alignItems: "center",
49630
+ justifyContent: "center",
49631
+ gap: "8px",
49632
+ padding: "12px 16px",
49633
+ border: "none",
49634
+ background: "transparent",
49635
+ cursor: "default",
49636
+ color: theme2.colors.success,
49637
+ fontSize: theme2.fontSizes[1],
49638
+ fontWeight: theme2.fontWeights.medium
49639
+ },
49640
+ children: [
49641
+ /* @__PURE__ */ jsx(CircleCheckBig, { size: 16 }),
49642
+ /* @__PURE__ */ jsx("span", { style: { lineHeight: 1 }, children: "Task Created" })
49643
+ ]
49644
+ }
49645
+ ),
49646
+ taskCreation.status === "error" && /* @__PURE__ */ jsxs(
49647
+ "button",
49648
+ {
49649
+ onClick: () => setTaskCreation({ status: "idle" }),
49650
+ style: {
49651
+ width: "100%",
49652
+ height: "100%",
49653
+ display: "flex",
49654
+ alignItems: "center",
49655
+ justifyContent: "center",
49656
+ gap: "8px",
49657
+ padding: "12px 16px",
49658
+ border: "none",
49659
+ background: "transparent",
49660
+ cursor: "pointer",
49661
+ color: theme2.colors.error,
49662
+ fontSize: theme2.fontSizes[1],
49663
+ fontWeight: theme2.fontWeights.medium,
49664
+ transition: "background 0.2s ease"
49665
+ },
49666
+ onMouseEnter: (e) => {
49667
+ e.currentTarget.style.background = theme2.colors.backgroundSecondary;
49668
+ },
49669
+ onMouseLeave: (e) => {
49670
+ e.currentTarget.style.background = "transparent";
49671
+ },
49672
+ title: taskCreation.error,
49673
+ children: [
49674
+ /* @__PURE__ */ jsx(CircleAlert, { size: 16 }),
49675
+ /* @__PURE__ */ jsx("span", { style: { lineHeight: 1 }, children: "Retry Task Creation" })
49676
+ ]
49677
+ }
49678
+ )
49679
+ ] }),
49680
+ /* @__PURE__ */ jsx("div", { style: { flex: 1, backgroundColor: theme2.colors.background }, children: /* @__PURE__ */ jsxs(
49681
+ "button",
49682
+ {
49683
+ onClick: () => {
49684
+ if (events) {
49685
+ events.emit({
49686
+ type: "issue:view-discussion",
49687
+ source: "github-issue-detail-panel",
49688
+ timestamp: Date.now(),
49689
+ payload: {
49690
+ issue: selectedIssue,
49691
+ owner,
49692
+ repo
49693
+ }
49694
+ });
49695
+ }
49696
+ },
49697
+ style: {
49698
+ width: "100%",
49699
+ height: "100%",
49700
+ display: "flex",
49701
+ alignItems: "center",
49702
+ justifyContent: "center",
49703
+ gap: "8px",
49704
+ padding: "12px 16px",
49705
+ border: "none",
49706
+ background: "transparent",
49707
+ cursor: "pointer",
49708
+ color: theme2.colors.text,
49709
+ fontSize: theme2.fontSizes[1],
49710
+ fontWeight: theme2.fontWeights.medium,
49711
+ transition: "background 0.2s ease"
49712
+ },
49713
+ onMouseEnter: (e) => {
49714
+ e.currentTarget.style.background = theme2.colors.backgroundSecondary;
49715
+ },
49716
+ onMouseLeave: (e) => {
49717
+ e.currentTarget.style.background = "transparent";
49718
+ },
49719
+ children: [
49720
+ /* @__PURE__ */ jsx(MessageSquare, { size: 16 }),
49721
+ /* @__PURE__ */ jsx("span", { style: { lineHeight: 1 }, children: "View Discussion" }),
49722
+ selectedIssue.comments > 0 && /* @__PURE__ */ jsx(
49723
+ "span",
49724
+ {
49725
+ style: {
49726
+ display: "inline-flex",
49727
+ alignItems: "center",
49728
+ justifyContent: "center",
49729
+ minWidth: "20px",
49730
+ padding: "2px 6px",
49731
+ backgroundColor: theme2.colors.backgroundSecondary,
49732
+ border: `1px solid ${theme2.colors.border}`,
49733
+ borderRadius: "10px",
49734
+ fontSize: theme2.fontSizes[0],
49735
+ fontWeight: theme2.fontWeights.semibold,
49736
+ color: theme2.colors.textSecondary,
49737
+ lineHeight: 1
49738
+ },
49739
+ children: selectedIssue.comments
49740
+ }
49741
+ )
49742
+ ]
49743
+ }
49744
+ ) })
49745
+ ]
49746
+ }
49747
+ ),
49392
49748
  /* @__PURE__ */ jsx(
49393
49749
  "div",
49394
49750
  {
@@ -49442,6 +49798,280 @@ const GitHubIssueDetailPanelContent = ({ events }) => {
49442
49798
  }
49443
49799
  )
49444
49800
  }
49801
+ ),
49802
+ showTaskTypeModal && /* @__PURE__ */ jsx(
49803
+ "div",
49804
+ {
49805
+ style: {
49806
+ position: "fixed",
49807
+ top: 0,
49808
+ left: 0,
49809
+ right: 0,
49810
+ bottom: 0,
49811
+ backgroundColor: "rgba(0, 0, 0, 0.7)",
49812
+ display: "flex",
49813
+ alignItems: "center",
49814
+ justifyContent: "center",
49815
+ zIndex: 1e4
49816
+ },
49817
+ onClick: () => setShowTaskTypeModal(false),
49818
+ children: /* @__PURE__ */ jsxs(
49819
+ "div",
49820
+ {
49821
+ style: {
49822
+ backgroundColor: theme2.colors.surface,
49823
+ borderRadius: "12px",
49824
+ padding: "24px",
49825
+ maxWidth: "500px",
49826
+ width: "90%",
49827
+ boxShadow: "0 8px 32px rgba(0, 0, 0, 0.3)"
49828
+ },
49829
+ onClick: (e) => e.stopPropagation(),
49830
+ children: [
49831
+ modalStep === "type" && /* @__PURE__ */ jsxs(Fragment, { children: [
49832
+ /* @__PURE__ */ jsxs("div", { style: { marginBottom: "20px" }, children: [
49833
+ /* @__PURE__ */ jsx(
49834
+ "h2",
49835
+ {
49836
+ style: {
49837
+ margin: 0,
49838
+ marginBottom: "8px",
49839
+ fontFamily: theme2.fonts.heading,
49840
+ fontSize: theme2.fontSizes[3],
49841
+ fontWeight: 600,
49842
+ color: theme2.colors.text
49843
+ },
49844
+ children: "Choose Task Type"
49845
+ }
49846
+ ),
49847
+ /* @__PURE__ */ jsx(
49848
+ "p",
49849
+ {
49850
+ style: {
49851
+ margin: 0,
49852
+ fontFamily: theme2.fonts.body,
49853
+ fontSize: theme2.fontSizes[1],
49854
+ color: theme2.colors.textSecondary,
49855
+ lineHeight: 1.5
49856
+ },
49857
+ children: "What type of task do you want to create for this issue?"
49858
+ }
49859
+ )
49860
+ ] }),
49861
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
49862
+ /* @__PURE__ */ jsxs(
49863
+ "button",
49864
+ {
49865
+ onClick: () => handleSelectTaskType("investigate"),
49866
+ style: {
49867
+ padding: "16px",
49868
+ border: `2px solid ${theme2.colors.border}`,
49869
+ borderRadius: "8px",
49870
+ backgroundColor: theme2.colors.background,
49871
+ cursor: "pointer",
49872
+ textAlign: "left",
49873
+ transition: "all 0.2s ease"
49874
+ },
49875
+ onMouseEnter: (e) => {
49876
+ e.currentTarget.style.borderColor = theme2.colors.primary;
49877
+ e.currentTarget.style.backgroundColor = theme2.colors.backgroundSecondary;
49878
+ },
49879
+ onMouseLeave: (e) => {
49880
+ e.currentTarget.style.borderColor = theme2.colors.border;
49881
+ e.currentTarget.style.backgroundColor = theme2.colors.background;
49882
+ },
49883
+ children: [
49884
+ /* @__PURE__ */ jsx(
49885
+ "div",
49886
+ {
49887
+ style: {
49888
+ fontFamily: theme2.fonts.heading,
49889
+ fontSize: theme2.fontSizes[2],
49890
+ fontWeight: 600,
49891
+ color: theme2.colors.text,
49892
+ marginBottom: "4px"
49893
+ },
49894
+ children: "🔍 Investigate Issue"
49895
+ }
49896
+ ),
49897
+ /* @__PURE__ */ jsx(
49898
+ "div",
49899
+ {
49900
+ style: {
49901
+ fontFamily: theme2.fonts.body,
49902
+ fontSize: theme2.fontSizes[1],
49903
+ color: theme2.colors.textSecondary,
49904
+ lineHeight: 1.4
49905
+ },
49906
+ children: "Research and identify the root cause of the problem"
49907
+ }
49908
+ )
49909
+ ]
49910
+ }
49911
+ ),
49912
+ /* @__PURE__ */ jsxs(
49913
+ "button",
49914
+ {
49915
+ onClick: () => handleSelectTaskType("fix"),
49916
+ style: {
49917
+ padding: "16px",
49918
+ border: `2px solid ${theme2.colors.border}`,
49919
+ borderRadius: "8px",
49920
+ backgroundColor: theme2.colors.background,
49921
+ cursor: "pointer",
49922
+ textAlign: "left",
49923
+ transition: "all 0.2s ease"
49924
+ },
49925
+ onMouseEnter: (e) => {
49926
+ e.currentTarget.style.borderColor = theme2.colors.primary;
49927
+ e.currentTarget.style.backgroundColor = theme2.colors.backgroundSecondary;
49928
+ },
49929
+ onMouseLeave: (e) => {
49930
+ e.currentTarget.style.borderColor = theme2.colors.border;
49931
+ e.currentTarget.style.backgroundColor = theme2.colors.background;
49932
+ },
49933
+ children: [
49934
+ /* @__PURE__ */ jsx(
49935
+ "div",
49936
+ {
49937
+ style: {
49938
+ fontFamily: theme2.fonts.heading,
49939
+ fontSize: theme2.fontSizes[2],
49940
+ fontWeight: 600,
49941
+ color: theme2.colors.text,
49942
+ marginBottom: "4px"
49943
+ },
49944
+ children: "🔧 Fix Issue"
49945
+ }
49946
+ ),
49947
+ /* @__PURE__ */ jsx(
49948
+ "div",
49949
+ {
49950
+ style: {
49951
+ fontFamily: theme2.fonts.body,
49952
+ fontSize: theme2.fontSizes[1],
49953
+ color: theme2.colors.textSecondary,
49954
+ lineHeight: 1.4
49955
+ },
49956
+ children: "Implement a solution to resolve the issue"
49957
+ }
49958
+ )
49959
+ ]
49960
+ }
49961
+ )
49962
+ ] }),
49963
+ /* @__PURE__ */ jsx("div", { style: { marginTop: "20px", textAlign: "center" }, children: /* @__PURE__ */ jsx(
49964
+ "button",
49965
+ {
49966
+ onClick: () => setShowTaskTypeModal(false),
49967
+ style: {
49968
+ padding: "8px 16px",
49969
+ border: "none",
49970
+ background: "transparent",
49971
+ cursor: "pointer",
49972
+ color: theme2.colors.textSecondary,
49973
+ fontSize: theme2.fontSizes[1],
49974
+ fontFamily: theme2.fonts.body
49975
+ },
49976
+ children: "Cancel"
49977
+ }
49978
+ ) })
49979
+ ] }),
49980
+ modalStep === "instructions" && /* @__PURE__ */ jsxs(Fragment, { children: [
49981
+ /* @__PURE__ */ jsxs("div", { style: { marginBottom: "20px" }, children: [
49982
+ /* @__PURE__ */ jsx(
49983
+ "h2",
49984
+ {
49985
+ style: {
49986
+ margin: 0,
49987
+ marginBottom: "8px",
49988
+ fontFamily: theme2.fonts.heading,
49989
+ fontSize: theme2.fontSizes[3],
49990
+ fontWeight: 600,
49991
+ color: theme2.colors.text
49992
+ },
49993
+ children: "Additional Instructions"
49994
+ }
49995
+ ),
49996
+ /* @__PURE__ */ jsx(
49997
+ "p",
49998
+ {
49999
+ style: {
50000
+ margin: 0,
50001
+ fontFamily: theme2.fonts.body,
50002
+ fontSize: theme2.fontSizes[1],
50003
+ color: theme2.colors.textSecondary,
50004
+ lineHeight: 1.5
50005
+ },
50006
+ children: "Add any specific instructions or context for this task (optional)"
50007
+ }
50008
+ )
50009
+ ] }),
50010
+ /* @__PURE__ */ jsx(
50011
+ "textarea",
50012
+ {
50013
+ value: additionalInstructions,
50014
+ onChange: (e) => setAdditionalInstructions(e.target.value),
50015
+ placeholder: "e.g., Focus on the authentication flow, check error handling in useWebSocket hook, etc.",
50016
+ style: {
50017
+ width: "100%",
50018
+ minHeight: "120px",
50019
+ padding: "12px",
50020
+ border: `1px solid ${theme2.colors.border}`,
50021
+ borderRadius: "6px",
50022
+ backgroundColor: theme2.colors.background,
50023
+ color: theme2.colors.text,
50024
+ fontFamily: theme2.fonts.body,
50025
+ fontSize: theme2.fontSizes[1],
50026
+ lineHeight: 1.5,
50027
+ resize: "vertical",
50028
+ boxSizing: "border-box"
50029
+ }
50030
+ }
50031
+ ),
50032
+ /* @__PURE__ */ jsxs("div", { style: { marginTop: "20px", display: "flex", gap: "12px", justifyContent: "flex-end" }, children: [
50033
+ /* @__PURE__ */ jsx(
50034
+ "button",
50035
+ {
50036
+ onClick: handleBackToTaskType,
50037
+ style: {
50038
+ padding: "8px 16px",
50039
+ border: `1px solid ${theme2.colors.border}`,
50040
+ borderRadius: "6px",
50041
+ background: theme2.colors.background,
50042
+ cursor: "pointer",
50043
+ color: theme2.colors.text,
50044
+ fontSize: theme2.fontSizes[1],
50045
+ fontFamily: theme2.fonts.body,
50046
+ fontWeight: theme2.fontWeights.medium
50047
+ },
50048
+ children: "Back"
50049
+ }
50050
+ ),
50051
+ /* @__PURE__ */ jsx(
50052
+ "button",
50053
+ {
50054
+ onClick: handleSubmitTask,
50055
+ style: {
50056
+ padding: "8px 24px",
50057
+ border: "none",
50058
+ borderRadius: "6px",
50059
+ background: theme2.colors.primary,
50060
+ cursor: "pointer",
50061
+ color: theme2.colors.textOnPrimary || "#ffffff",
50062
+ fontSize: theme2.fontSizes[1],
50063
+ fontFamily: theme2.fonts.body,
50064
+ fontWeight: theme2.fontWeights.medium
50065
+ },
50066
+ children: "Create Task"
50067
+ }
50068
+ )
50069
+ ] })
50070
+ ] })
50071
+ ]
50072
+ }
50073
+ )
50074
+ }
49445
50075
  )
49446
50076
  ] });
49447
50077
  };