glitchgrab 1.68.2 → 1.68.3

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
@@ -2988,6 +2988,12 @@ function AssistSheet({
2988
2988
  var _a2;
2989
2989
  if (phase === "draft") (_a2 = draftRef.current) == null ? void 0 : _a2.focus();
2990
2990
  }, [phase]);
2991
+ (0, import_react3.useEffect)(() => {
2992
+ var _a2;
2993
+ if (validationError && phase === "draft") {
2994
+ (_a2 = draftRef.current) == null ? void 0 : _a2.scrollIntoView({ block: "center", behavior: "smooth" });
2995
+ }
2996
+ }, [validationError, phase]);
2991
2997
  (0, import_react3.useEffect)(() => {
2992
2998
  const el = composerRef.current;
2993
2999
  if (!el) return;
@@ -4387,6 +4393,7 @@ function AssistSheet({
4387
4393
  }
4388
4394
  }
4389
4395
  ),
4396
+ validationError && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { role: "alert", style: { fontSize: "12px", color: "#ef4444" }, children: validationError }),
4390
4397
  attachmentCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { style: { fontSize: "11.5px", color: t.textMuted }, children: [
4391
4398
  attachmentCount,
4392
4399
  " ",
@@ -4915,15 +4922,20 @@ function AssistSheet({
4915
4922
  ] })
4916
4923
  ] }),
4917
4924
  phase === "draft" && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
4918
- validationError && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4925
+ !similarSlot && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4919
4926
  "p",
4920
4927
  {
4921
4928
  style: {
4922
4929
  margin: "8px 0 0",
4923
- color: "#ef4444",
4924
- fontSize: "12px"
4930
+ color: t.textMuted,
4931
+ fontSize: "11.5px"
4925
4932
  },
4926
- children: validationError
4933
+ children: [
4934
+ "Happy with it? Press",
4935
+ " ",
4936
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("strong", { children: duplicate ? `Add to #${duplicate.number}` : "Send Report" }),
4937
+ ". The arrow above only sends a change to the assistant."
4938
+ ]
4927
4939
  }
4928
4940
  ),
4929
4941
  similarSlot ? similarSlot : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
@@ -5849,6 +5861,8 @@ function getTheme(dark) {
5849
5861
  function isLowQualityText(text) {
5850
5862
  const trimmed = text.trim();
5851
5863
  if (!trimmed) return null;
5864
+ const wordCount = trimmed.split(/\s+/).length;
5865
+ if (wordCount >= 6 || trimmed.length >= 40) return null;
5852
5866
  const throwaway = /^(done|ok|yes|no|hi|hello|hey|test|testing|asdf|qwerty|abc|xyz|foo|bar|baz|lol|lmao|idk|bruh|nice|cool|wow|sup|yo|nah|yep|nope|thanks|thx|ty|k|kk|hmm|hm|na|mm|mhm|aight|bet|gg|wp|rip|omg|pls|plz)$/i;
5853
5867
  if (throwaway.test(trimmed)) {
5854
5868
  return "Please describe the actual issue you're experiencing";