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 +18 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2928,6 +2928,12 @@ function AssistSheet({
|
|
|
2928
2928
|
var _a2;
|
|
2929
2929
|
if (phase === "draft") (_a2 = draftRef.current) == null ? void 0 : _a2.focus();
|
|
2930
2930
|
}, [phase]);
|
|
2931
|
+
useEffect2(() => {
|
|
2932
|
+
var _a2;
|
|
2933
|
+
if (validationError && phase === "draft") {
|
|
2934
|
+
(_a2 = draftRef.current) == null ? void 0 : _a2.scrollIntoView({ block: "center", behavior: "smooth" });
|
|
2935
|
+
}
|
|
2936
|
+
}, [validationError, phase]);
|
|
2931
2937
|
useEffect2(() => {
|
|
2932
2938
|
const el = composerRef.current;
|
|
2933
2939
|
if (!el) return;
|
|
@@ -4327,6 +4333,7 @@ function AssistSheet({
|
|
|
4327
4333
|
}
|
|
4328
4334
|
}
|
|
4329
4335
|
),
|
|
4336
|
+
validationError && /* @__PURE__ */ jsx3("span", { role: "alert", style: { fontSize: "12px", color: "#ef4444" }, children: validationError }),
|
|
4330
4337
|
attachmentCount > 0 && /* @__PURE__ */ jsxs3("span", { style: { fontSize: "11.5px", color: t.textMuted }, children: [
|
|
4331
4338
|
attachmentCount,
|
|
4332
4339
|
" ",
|
|
@@ -4855,15 +4862,20 @@ function AssistSheet({
|
|
|
4855
4862
|
] })
|
|
4856
4863
|
] }),
|
|
4857
4864
|
phase === "draft" && /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
4858
|
-
|
|
4865
|
+
!similarSlot && /* @__PURE__ */ jsxs3(
|
|
4859
4866
|
"p",
|
|
4860
4867
|
{
|
|
4861
4868
|
style: {
|
|
4862
4869
|
margin: "8px 0 0",
|
|
4863
|
-
color:
|
|
4864
|
-
fontSize: "
|
|
4870
|
+
color: t.textMuted,
|
|
4871
|
+
fontSize: "11.5px"
|
|
4865
4872
|
},
|
|
4866
|
-
children:
|
|
4873
|
+
children: [
|
|
4874
|
+
"Happy with it? Press",
|
|
4875
|
+
" ",
|
|
4876
|
+
/* @__PURE__ */ jsx3("strong", { children: duplicate ? `Add to #${duplicate.number}` : "Send Report" }),
|
|
4877
|
+
". The arrow above only sends a change to the assistant."
|
|
4878
|
+
]
|
|
4867
4879
|
}
|
|
4868
4880
|
),
|
|
4869
4881
|
similarSlot ? similarSlot : /* @__PURE__ */ jsx3(
|
|
@@ -5789,6 +5801,8 @@ function getTheme(dark) {
|
|
|
5789
5801
|
function isLowQualityText(text) {
|
|
5790
5802
|
const trimmed = text.trim();
|
|
5791
5803
|
if (!trimmed) return null;
|
|
5804
|
+
const wordCount = trimmed.split(/\s+/).length;
|
|
5805
|
+
if (wordCount >= 6 || trimmed.length >= 40) return null;
|
|
5792
5806
|
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;
|
|
5793
5807
|
if (throwaway.test(trimmed)) {
|
|
5794
5808
|
return "Please describe the actual issue you're experiencing";
|