mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 12:52:26 +00:00
Merge pull request #1946 from PR0M3TH3AN/ai/dead-code-20240123-13702536329573366933
chore(ai): remove dead code (agent)
This commit is contained in:
9 files changed
+13
-89
No files matched your search
@@ -237,32 +237,3 @@ export function renderTagPillStrip({
|
||||
|
||||
return { root, buttons };
|
||||
}
|
||||
|
||||
export function updateTagPillStrip({
|
||||
root,
|
||||
tags = [],
|
||||
onTagActivate,
|
||||
getTagState,
|
||||
document: doc,
|
||||
} = {}) {
|
||||
if (!root) {
|
||||
throw new Error("A root element is required to update the tag pill strip.");
|
||||
}
|
||||
|
||||
const resolvedDocument = resolveDocument(doc ?? root?.ownerDocument);
|
||||
assertDocument(resolvedDocument);
|
||||
|
||||
cleanupExistingButtons(root);
|
||||
|
||||
const buttons = tags.map((tag) =>
|
||||
createTagButton({
|
||||
doc: resolvedDocument,
|
||||
tag,
|
||||
onTagActivate,
|
||||
getTagState,
|
||||
}),
|
||||
);
|
||||
root.append(...buttons);
|
||||
|
||||
return { root, buttons };
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// js/ui/moderationCopy.js
|
||||
|
||||
export function buildModerationReasonText(context) {
|
||||
function buildModerationReasonText(context) {
|
||||
if (!context) {
|
||||
return "";
|
||||
}
|
||||
@@ -31,7 +31,7 @@ export function buildModerationReasonText(context) {
|
||||
return combined.charAt(0).toUpperCase() + combined.slice(1);
|
||||
}
|
||||
|
||||
export function buildHiddenSummaryLabel(context) {
|
||||
function buildHiddenSummaryLabel(context) {
|
||||
if (!context) {
|
||||
return "";
|
||||
}
|
||||
|
||||
+2
-2
@@ -4,11 +4,11 @@ import { userLogger } from "./logger.js";
|
||||
const URL_HEALTH_STORAGE_PREFIX = "bitvid:urlHealth:";
|
||||
const TORRENT_PROBE_STORAGE_PREFIX = "bitvid:torrentProbe:";
|
||||
|
||||
export function getUrlHealthStorageKey(eventId) {
|
||||
function getUrlHealthStorageKey(eventId) {
|
||||
return `${URL_HEALTH_STORAGE_PREFIX}${eventId}`;
|
||||
}
|
||||
|
||||
export function getTorrentProbeStorageKey(infoHash) {
|
||||
function getTorrentProbeStorageKey(infoHash) {
|
||||
return `${TORRENT_PROBE_STORAGE_PREFIX}${infoHash}`;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ export function normalizeStoragePointer(value) {
|
||||
return safeTrim(value);
|
||||
}
|
||||
|
||||
export function parseStoragePointer(value) {
|
||||
function parseStoragePointer(value) {
|
||||
const normalized = normalizeStoragePointer(value);
|
||||
if (!normalized) {
|
||||
return null;
|
||||
@@ -38,7 +38,7 @@ export function buildStoragePointerValue({ provider, prefix } = {}) {
|
||||
return `${normalizedProvider}:${normalizedPrefix}`;
|
||||
}
|
||||
|
||||
export function deriveStoragePrefixFromUrl(url) {
|
||||
function deriveStoragePrefixFromUrl(url) {
|
||||
const trimmed = safeTrim(url);
|
||||
if (!trimmed || !/^https?:\/\//i.test(trimmed)) {
|
||||
return "";
|
||||
|
||||
@@ -44,7 +44,7 @@ function normalizeTagValue(rawValue) {
|
||||
* @returns {string} The tag prefixed with `#` when a tag exists, otherwise an
|
||||
* empty string.
|
||||
*/
|
||||
export function formatTagDisplay(tag) {
|
||||
function formatTagDisplay(tag) {
|
||||
if (typeof tag !== "string") {
|
||||
return "";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user