glitchgrab 1.65.1 → 1.65.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3269,6 +3269,7 @@ function AssistSheet({
3269
3269
  setShowChats(false);
3270
3270
  setViewingChat(null);
3271
3271
  resumeAskRef.current = (last == null ? void 0 : last.role) === "user";
3272
+ seedPendingRef.current = false;
3272
3273
  }
3273
3274
  (0, import_react3.useEffect)(() => {
3274
3275
  if (!resumeAskRef.current) return;
@@ -3302,6 +3303,79 @@ function AssistSheet({
3302
3303
  const otherChats = savedChats.filter((c) => c.id !== chatIdRef.current);
3303
3304
  const resumable = (_a = otherChats.find((c) => c.status === "open" && c.messages.length > 0)) != null ? _a : null;
3304
3305
  const empty = (phase === "chat" || phase === "type") && messages.length === 0 && !busy;
3306
+ const resumeCard = resumable ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3307
+ "div",
3308
+ {
3309
+ "data-gg-resume-chat": "",
3310
+ style: {
3311
+ display: "flex",
3312
+ flexDirection: "column",
3313
+ gap: "8px",
3314
+ padding: "10px 12px",
3315
+ borderRadius: "10px",
3316
+ border: `1px solid ${t.accent}55`,
3317
+ backgroundColor: t.bgSecondary,
3318
+ minWidth: 0
3319
+ },
3320
+ children: [
3321
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { style: { fontSize: "11.5px", color: t.textMuted }, children: [
3322
+ "Pick up where you left off \xB7 ",
3323
+ chatAge(resumable.updatedAt)
3324
+ ] }),
3325
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3326
+ "span",
3327
+ {
3328
+ style: {
3329
+ fontSize: "13px",
3330
+ lineHeight: 1.45,
3331
+ overflowWrap: "anywhere"
3332
+ },
3333
+ children: resumable.title
3334
+ }
3335
+ ),
3336
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap" }, children: [
3337
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3338
+ "button",
3339
+ {
3340
+ type: "button",
3341
+ "data-gg-resume-continue": "",
3342
+ onClick: () => resumeChat(resumable),
3343
+ style: {
3344
+ border: "none",
3345
+ borderRadius: "999px",
3346
+ backgroundColor: t.accent,
3347
+ color: t.accentText,
3348
+ padding: "7px 13px",
3349
+ fontSize: "12px",
3350
+ fontWeight: 600,
3351
+ fontFamily: "inherit",
3352
+ cursor: "pointer"
3353
+ },
3354
+ children: "Continue this chat"
3355
+ }
3356
+ ),
3357
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3358
+ "button",
3359
+ {
3360
+ type: "button",
3361
+ onClick: () => setShowChats(true),
3362
+ style: {
3363
+ border: `1px solid ${t.inputBorder}`,
3364
+ borderRadius: "999px",
3365
+ background: "transparent",
3366
+ color: t.textMuted,
3367
+ padding: "7px 13px",
3368
+ fontSize: "12px",
3369
+ fontFamily: "inherit",
3370
+ cursor: "pointer"
3371
+ },
3372
+ children: "All chats"
3373
+ }
3374
+ )
3375
+ ] })
3376
+ ]
3377
+ }
3378
+ ) : null;
3305
3379
  function renderChatList() {
3306
3380
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { "data-gg-chat-list": "", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
3307
3381
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
@@ -3695,6 +3769,7 @@ function AssistSheet({
3695
3769
  },
3696
3770
  children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: showChats ? "none" : "contents" }, children: [
3697
3771
  phase === "severity" && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
3772
+ resumeCard,
3698
3773
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", gap: "8px" }, children: [
3699
3774
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Avatar, { who: "assistant", theme: t }),
3700
3775
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
@@ -3868,79 +3943,7 @@ function AssistSheet({
3868
3943
  )
3869
3944
  ] }),
3870
3945
  empty && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
3871
- resumable && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3872
- "div",
3873
- {
3874
- "data-gg-resume-chat": "",
3875
- style: {
3876
- display: "flex",
3877
- flexDirection: "column",
3878
- gap: "8px",
3879
- padding: "10px 12px",
3880
- borderRadius: "10px",
3881
- border: `1px solid ${t.accent}55`,
3882
- backgroundColor: t.bgSecondary,
3883
- minWidth: 0
3884
- },
3885
- children: [
3886
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { style: { fontSize: "11.5px", color: t.textMuted }, children: [
3887
- "Pick up where you left off \xB7 ",
3888
- chatAge(resumable.updatedAt)
3889
- ] }),
3890
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3891
- "span",
3892
- {
3893
- style: {
3894
- fontSize: "13px",
3895
- lineHeight: 1.45,
3896
- overflowWrap: "anywhere"
3897
- },
3898
- children: resumable.title
3899
- }
3900
- ),
3901
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap" }, children: [
3902
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3903
- "button",
3904
- {
3905
- type: "button",
3906
- "data-gg-resume-continue": "",
3907
- onClick: () => resumeChat(resumable),
3908
- style: {
3909
- border: "none",
3910
- borderRadius: "999px",
3911
- backgroundColor: t.accent,
3912
- color: t.accentText,
3913
- padding: "7px 13px",
3914
- fontSize: "12px",
3915
- fontWeight: 600,
3916
- fontFamily: "inherit",
3917
- cursor: "pointer"
3918
- },
3919
- children: "Continue this chat"
3920
- }
3921
- ),
3922
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3923
- "button",
3924
- {
3925
- type: "button",
3926
- onClick: () => setShowChats(true),
3927
- style: {
3928
- border: `1px solid ${t.inputBorder}`,
3929
- borderRadius: "999px",
3930
- background: "transparent",
3931
- color: t.textMuted,
3932
- padding: "7px 13px",
3933
- fontSize: "12px",
3934
- fontFamily: "inherit",
3935
- cursor: "pointer"
3936
- },
3937
- children: "All chats"
3938
- }
3939
- )
3940
- ] })
3941
- ]
3942
- }
3943
- ),
3946
+ resumeCard,
3944
3947
  phase !== "type" && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
3945
3948
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", gap: "8px" }, children: [
3946
3949
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Avatar, { who: "assistant", theme: t }),
@@ -6705,8 +6708,8 @@ function ReportDialog({
6705
6708
  }
6706
6709
  };
6707
6710
  (0, import_react.useEffect)(() => {
6708
- setSimilarIssues(null);
6709
- setPickedSimilar(null);
6711
+ if (similarIssues !== null) setSimilarIssues(null);
6712
+ if (pickedSimilar !== null) setPickedSimilar(null);
6710
6713
  }, [description]);
6711
6714
  const handleSubmit = async (opts) => {
6712
6715
  var _a2, _b, _c;