+ {eventId.slice(0, 8)}...{eventId.slice(-4)}
+
+ );
+}
+
interface ReqViewerProps {
filter: NostrFilter;
relays?: string[];
@@ -120,11 +142,15 @@ function QueryDropdown({
const { copy: handleCopy, copied } = useCopy();
// Expandable lists state
+ const [showAllIds, setShowAllIds] = useState(false);
const [showAllAuthors, setShowAllAuthors] = useState(false);
const [showAllPTags, setShowAllPTags] = useState(false);
const [showAllETags, setShowAllETags] = useState(false);
const [showAllTTags, setShowAllTTags] = useState(false);
+ // Get IDs for direct lookup (from -i flag)
+ const eventIds = filter.ids || [];
+
// Get pubkeys for authors and #p tags
const authorPubkeys = filter.authors || [];
const pTagPubkeys = filter["#p"] || [];
@@ -154,6 +180,7 @@ function QueryDropdown({
// Determine if we should use accordion for complex queries
const isComplexQuery =
(filter.kinds?.length || 0) +
+ eventIds.length +
authorPubkeys.length +
(filter.search ? 1 : 0) +
tagCount >
@@ -170,6 +197,7 @@ function QueryDropdown({
type="multiple"
defaultValue={[
"kinds",
+ "ids",
"authors",
"mentions",
"time",
@@ -203,6 +231,35 @@ function QueryDropdown({
)}
+ {/* IDs Section (direct event lookup) */}
+ {eventIds.length > 0 && (
+