Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
Remove unused attachment route path helpers
Julius Marmingea356cd0d0f4e
diff --git a/apps/server/src/attachmentPaths.ts b/apps/server/src/attachmentPaths.tsindex 7023d5a3a..c1680f6c0 100644--- a/apps/server/src/attachmentPaths.ts+++ b/apps/server/src/attachmentPaths.ts@@ -10,14 +10,6 @@ export function normalizeAttachmentRelativePath(rawRelativePath: string): stringreturn normalized.replace(/\\/g, "/");}-export function attachmentRouteToRelativePath(dataUrl: string): string | null {- const prefix = `${ATTACHMENTS_ROUTE_PREFIX}/`;- if (!dataUrl.startsWith(prefix)) {- return null;- }- return normalizeAttachmentRelativePath(dataUrl.slice(prefix.length));-}-export function resolveAttachmentRelativePath(input: {readonly stateDir: string;readonly relativePath: string;@@ -34,17 +26,3 @@ export function resolveAttachmentRelativePath(input: {}return filePath;}--export function resolveAttachmentRoutePath(input: {- readonly stateDir: string;- readonly dataUrl: string;-}): string | null {- const relativePath = attachmentRouteToRelativePath(input.dataUrl);- if (!relativePath) {- return null;- }- return resolveAttachmentRelativePath({- stateDir: input.stateDir,- relativePath,- });-}diff --git a/apps/server/src/attachmentStore.ts b/apps/server/src/attachmentStore.tsindex 248047e91..48be2df8a 100644--- a/apps/server/src/attachmentStore.ts+++ b/apps/server/src/attachmentStore.ts@@ -4,7 +4,6 @@ import { existsSync } from "node:fs";import type { ChatAttachment } from "@t3tools/contracts";import {- ATTACHMENTS_ROUTE_PREFIX,normalizeAttachmentRelativePath,resolveAttachmentRelativePath,} from "./attachmentPaths.ts";@@ -77,10 +76,6 @@ export function resolveAttachmentPath(input: {});}-export function attachmentRoutePath(attachment: ChatAttachment): string {- return `${ATTACHMENTS_ROUTE_PREFIX}/${encodeURIComponent(attachment.id)}`;-}-export function resolveAttachmentPathById(input: {readonly stateDir: string;readonly attachmentId: string;