@industry-theme/github-panels 0.1.53 → 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.
@@ -49149,22 +49149,38 @@ const formatDate$1 = (dateString) => {
49149
49149
  return `${years} ${years === 1 ? "year" : "years"} ago`;
49150
49150
  };
49151
49151
  const GitHubIssueDetailPanelContent = ({ events }) => {
49152
+ var _a;
49152
49153
  const { theme: theme2 } = useTheme();
49153
49154
  const [selectedIssue, setSelectedIssue] = useState(null);
49154
49155
  const [owner, setOwner] = useState("");
49155
49156
  const [repo, setRepo] = useState("");
49156
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("");
49157
49162
  const panelRef = useRef(null);
49158
49163
  gt(
49159
49164
  "github-issue-detail",
49160
49165
  events,
49161
49166
  () => {
49162
- var _a;
49163
- return (_a = panelRef.current) == null ? void 0 : _a.focus();
49167
+ var _a2;
49168
+ return (_a2 = panelRef.current) == null ? void 0 : _a2.focus();
49164
49169
  }
49165
49170
  );
49166
49171
  const handleCreateTask = () => {
49167
- if (!events || !selectedIssue) return;
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);
49168
49184
  setTaskCreation({ status: "loading" });
49169
49185
  events.emit({
49170
49186
  type: "issue:create-task",
@@ -49173,9 +49189,19 @@ const GitHubIssueDetailPanelContent = ({ events }) => {
49173
49189
  payload: {
49174
49190
  issue: selectedIssue,
49175
49191
  owner,
49176
- repo
49192
+ repo,
49193
+ taskType: selectedTaskType,
49194
+ additionalInstructions: additionalInstructions.trim() || void 0
49177
49195
  }
49178
49196
  });
49197
+ setModalStep("type");
49198
+ setSelectedTaskType(null);
49199
+ setAdditionalInstructions("");
49200
+ };
49201
+ const handleBackToTaskType = () => {
49202
+ setModalStep("type");
49203
+ setSelectedTaskType(null);
49204
+ setAdditionalInstructions("");
49179
49205
  };
49180
49206
  useEffect(() => {
49181
49207
  if (!events) return;
@@ -49293,6 +49319,11 @@ const GitHubIssueDetailPanelContent = ({ events }) => {
49293
49319
  const statusColor = isOpen ? theme2.colors.success || "#22c55e" : theme2.colors.error || "#ef4444";
49294
49320
  const statusBg = `${statusColor}20`;
49295
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];
49296
49327
  return /* @__PURE__ */ jsxs("div", { ref: panelRef, tabIndex: -1, style: { ...containerStyle, outline: "none" }, children: [
49297
49328
  /* @__PURE__ */ jsxs(
49298
49329
  "div",
@@ -49358,197 +49389,359 @@ const GitHubIssueDetailPanelContent = ({ events }) => {
49358
49389
  ]
49359
49390
  }
49360
49391
  ),
49361
- selectedIssue.comments > 0 && /* @__PURE__ */ jsxs(
49362
- "span",
49392
+ /* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
49393
+ /* @__PURE__ */ jsx(
49394
+ "a",
49363
49395
  {
49396
+ href: selectedIssue.html_url,
49397
+ target: "_blank",
49398
+ rel: "noopener noreferrer",
49399
+ title: "View on GitHub",
49364
49400
  style: {
49365
49401
  display: "inline-flex",
49366
49402
  alignItems: "center",
49367
- gap: "4px",
49403
+ justifyContent: "center",
49404
+ width: "28px",
49405
+ height: "28px",
49406
+ padding: 0,
49407
+ border: `1px solid ${theme2.colors.border}`,
49408
+ borderRadius: "6px",
49409
+ backgroundColor: theme2.colors.background,
49368
49410
  color: theme2.colors.textSecondary,
49369
- fontSize: theme2.fontSizes[0]
49411
+ textDecoration: "none"
49370
49412
  },
49371
- children: [
49372
- /* @__PURE__ */ jsx(MessageSquare, { size: 12 }),
49373
- selectedIssue.comments
49374
- ]
49413
+ children: /* @__PURE__ */ jsx(Github, { size: 16 })
49375
49414
  }
49376
49415
  ),
49377
- selectedIssue.assignees && selectedIssue.assignees.length > 0 && /* @__PURE__ */ jsxs(
49378
- "span",
49416
+ /* @__PURE__ */ jsx(
49417
+ "button",
49379
49418
  {
49419
+ type: "button",
49420
+ onClick: handleBack,
49421
+ title: "Close",
49380
49422
  style: {
49381
49423
  display: "inline-flex",
49382
49424
  alignItems: "center",
49383
- gap: "4px",
49425
+ justifyContent: "center",
49426
+ width: "28px",
49427
+ height: "28px",
49428
+ padding: 0,
49429
+ border: `1px solid ${theme2.colors.border}`,
49430
+ borderRadius: "6px",
49431
+ backgroundColor: theme2.colors.background,
49384
49432
  color: theme2.colors.textSecondary,
49385
- fontSize: theme2.fontSizes[0],
49386
- fontFamily: theme2.fonts.body
49433
+ cursor: "pointer"
49387
49434
  },
49388
- children: [
49389
- "assigned to",
49390
- " ",
49391
- selectedIssue.assignees.map((assignee, index2) => /* @__PURE__ */ jsxs("span", { children: [
49392
- /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.primary }, children: assignee.login }),
49393
- index2 < selectedIssue.assignees.length - 1 && ", "
49394
- ] }, assignee.login))
49395
- ]
49435
+ children: /* @__PURE__ */ jsx(X, { size: 16 })
49396
49436
  }
49397
- ),
49398
- /* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
49399
- taskCreation.status === "idle" && /* @__PURE__ */ jsxs(
49400
- "button",
49437
+ )
49438
+ ]
49439
+ }
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",
49401
49455
  {
49402
- onClick: handleCreateTask,
49403
49456
  style: {
49404
- display: "flex",
49405
- alignItems: "center",
49406
- gap: "6px",
49407
- padding: "6px 12px",
49408
- border: `1px solid ${theme2.colors.primary}`,
49409
- borderRadius: theme2.radii[1],
49410
- background: "transparent",
49411
- cursor: "pointer",
49412
- color: theme2.colors.primary,
49457
+ color: theme2.colors.textSecondary,
49413
49458
  fontSize: theme2.fontSizes[1],
49414
- fontWeight: theme2.fontWeights.medium,
49415
- transition: "all 0.2s ease"
49416
- },
49417
- onMouseEnter: (e) => {
49418
- e.currentTarget.style.background = theme2.colors.primary;
49419
- e.currentTarget.style.color = theme2.colors.background;
49420
- },
49421
- onMouseLeave: (e) => {
49422
- e.currentTarget.style.background = "transparent";
49423
- e.currentTarget.style.color = theme2.colors.primary;
49459
+ fontFamily: theme2.fonts.body,
49460
+ fontWeight: theme2.fontWeights.medium
49424
49461
  },
49425
- title: "Create task in backlog.md",
49426
- children: [
49427
- /* @__PURE__ */ jsx(FileText, { size: 14 }),
49428
- "Create Task"
49429
- ]
49462
+ children: "Assigned to:"
49430
49463
  }
49431
49464
  ),
49432
- taskCreation.status === "loading" && /* @__PURE__ */ jsxs(
49465
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", gap: "8px", flexWrap: "wrap" }, children: selectedIssue.assignees.map((assignee) => /* @__PURE__ */ jsxs(
49433
49466
  "div",
49434
49467
  {
49435
49468
  style: {
49436
49469
  display: "flex",
49437
49470
  alignItems: "center",
49438
49471
  gap: "6px",
49439
- padding: "6px 12px",
49440
- color: theme2.colors.textSecondary,
49441
- fontSize: theme2.fontSizes[1]
49472
+ padding: "4px 10px",
49473
+ backgroundColor: theme2.colors.background,
49474
+ border: `1px solid ${theme2.colors.border}`,
49475
+ borderRadius: "16px"
49442
49476
  },
49443
49477
  children: [
49444
- /* @__PURE__ */ jsx(LoaderCircle, { size: 14, style: { animation: "spin 1s linear infinite" } }),
49445
- "Creating..."
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
+ )
49446
49502
  ]
49447
- }
49448
- ),
49449
- taskCreation.status === "success" && /* @__PURE__ */ jsxs(
49450
- "div",
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",
49451
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
+ },
49452
49697
  style: {
49698
+ width: "100%",
49699
+ height: "100%",
49453
49700
  display: "flex",
49454
49701
  alignItems: "center",
49455
- gap: "6px",
49456
- padding: "6px 12px",
49457
- border: `1px solid ${theme2.colors.success}`,
49458
- borderRadius: theme2.radii[1],
49459
- background: `${theme2.colors.success}15`,
49460
- color: theme2.colors.success,
49702
+ justifyContent: "center",
49703
+ gap: "8px",
49704
+ padding: "12px 16px",
49705
+ border: "none",
49706
+ background: "transparent",
49707
+ cursor: "pointer",
49708
+ color: theme2.colors.text,
49461
49709
  fontSize: theme2.fontSizes[1],
49462
- fontWeight: theme2.fontWeights.medium
49710
+ fontWeight: theme2.fontWeights.medium,
49711
+ transition: "background 0.2s ease"
49463
49712
  },
49464
- children: [
49465
- /* @__PURE__ */ jsx(CircleCheckBig, { size: 14 }),
49466
- "Task Created"
49467
- ]
49468
- }
49469
- ),
49470
- taskCreation.status === "error" && /* @__PURE__ */ jsxs(
49471
- "div",
49472
- {
49473
- style: {
49474
- display: "flex",
49475
- alignItems: "center",
49476
- gap: "6px",
49477
- padding: "6px 12px",
49478
- border: `1px solid ${theme2.colors.error}`,
49479
- borderRadius: theme2.radii[1],
49480
- background: `${theme2.colors.error}15`,
49481
- color: theme2.colors.error,
49482
- fontSize: theme2.fontSizes[1]
49713
+ onMouseEnter: (e) => {
49714
+ e.currentTarget.style.background = theme2.colors.backgroundSecondary;
49715
+ },
49716
+ onMouseLeave: (e) => {
49717
+ e.currentTarget.style.background = "transparent";
49483
49718
  },
49484
- title: taskCreation.error,
49485
49719
  children: [
49486
- /* @__PURE__ */ jsx(CircleAlert, { size: 14 }),
49487
- "Failed",
49488
- /* @__PURE__ */ jsx(
49489
- "button",
49720
+ /* @__PURE__ */ jsx(MessageSquare, { size: 16 }),
49721
+ /* @__PURE__ */ jsx("span", { style: { lineHeight: 1 }, children: "View Discussion" }),
49722
+ selectedIssue.comments > 0 && /* @__PURE__ */ jsx(
49723
+ "span",
49490
49724
  {
49491
- onClick: () => setTaskCreation({ status: "idle" }),
49492
49725
  style: {
49493
- background: "none",
49494
- border: "none",
49495
- color: theme2.colors.error,
49496
- cursor: "pointer",
49497
- padding: "0 0 0 4px",
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",
49498
49734
  fontSize: theme2.fontSizes[0],
49499
- textDecoration: "underline"
49735
+ fontWeight: theme2.fontWeights.semibold,
49736
+ color: theme2.colors.textSecondary,
49737
+ lineHeight: 1
49500
49738
  },
49501
- children: "Retry"
49739
+ children: selectedIssue.comments
49502
49740
  }
49503
49741
  )
49504
49742
  ]
49505
49743
  }
49506
- ),
49507
- /* @__PURE__ */ jsx(
49508
- "a",
49509
- {
49510
- href: selectedIssue.html_url,
49511
- target: "_blank",
49512
- rel: "noopener noreferrer",
49513
- title: "View on GitHub",
49514
- style: {
49515
- display: "inline-flex",
49516
- alignItems: "center",
49517
- justifyContent: "center",
49518
- width: "28px",
49519
- height: "28px",
49520
- padding: 0,
49521
- border: `1px solid ${theme2.colors.border}`,
49522
- borderRadius: "6px",
49523
- backgroundColor: theme2.colors.background,
49524
- color: theme2.colors.textSecondary,
49525
- textDecoration: "none"
49526
- },
49527
- children: /* @__PURE__ */ jsx(ExternalLink, { size: 14 })
49528
- }
49529
- ),
49530
- /* @__PURE__ */ jsx(
49531
- "button",
49532
- {
49533
- type: "button",
49534
- onClick: handleBack,
49535
- title: "Close",
49536
- style: {
49537
- display: "inline-flex",
49538
- alignItems: "center",
49539
- justifyContent: "center",
49540
- width: "28px",
49541
- height: "28px",
49542
- padding: 0,
49543
- border: `1px solid ${theme2.colors.border}`,
49544
- borderRadius: "6px",
49545
- backgroundColor: theme2.colors.background,
49546
- color: theme2.colors.textSecondary,
49547
- cursor: "pointer"
49548
- },
49549
- children: /* @__PURE__ */ jsx(X, { size: 16 })
49550
- }
49551
- )
49744
+ ) })
49552
49745
  ]
49553
49746
  }
49554
49747
  ),
@@ -49605,6 +49798,280 @@ const GitHubIssueDetailPanelContent = ({ events }) => {
49605
49798
  }
49606
49799
  )
49607
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
+ }
49608
50075
  )
49609
50076
  ] });
49610
50077
  };