style: oxfmt format

This commit is contained in:
Peter Steinberger
2026-01-17 05:48:34 +00:00
parent 8b42902cee
commit e59d8c5436
47 changed files with 152 additions and 165 deletions

View File

@@ -317,10 +317,7 @@ export class MediaAttachmentCache {
timeoutMs: params.timeoutMs,
});
const extension = path.extname(bufferResult.fileName || "") || "";
const tmpPath = path.join(
os.tmpdir(),
`clawdbot-media-${crypto.randomUUID()}${extension}`,
);
const tmpPath = path.join(os.tmpdir(), `clawdbot-media-${crypto.randomUUID()}${extension}`);
await fs.writeFile(tmpPath, bufferResult.buffer);
entry.tempPath = tmpPath;
entry.tempCleanup = async () => {
@@ -348,8 +345,9 @@ export class MediaAttachmentCache {
}
return existing;
}
const attachment =
this.attachments.find((item) => item.index === attachmentIndex) ?? { index: attachmentIndex };
const attachment = this.attachments.find((item) => item.index === attachmentIndex) ?? {
index: attachmentIndex,
};
const entry: AttachmentCacheEntry = {
attachment,
resolvedPath: this.resolveLocalPath(attachment),