feat: Add slashcommand api

This commit is contained in:
2026-06-05 17:12:26 +02:00
parent 4070ef6caf
commit 8ecfc9a1fe
101 changed files with 3526 additions and 147 deletions

View File

@@ -1,4 +1,8 @@
import { describe, expect, it } from 'vitest';
import {
describe,
expect,
it
} from 'vitest';
import { decodeBase64ToUint8Array } from './attachment-blob.rules';
@@ -6,6 +10,10 @@ describe('attachment blob rules', () => {
it('decodes base64 payloads into byte arrays', () => {
const bytes = decodeBase64ToUint8Array('QUJD');
expect(Array.from(bytes)).toEqual([65, 66, 67]);
expect(Array.from(bytes)).toEqual([
65,
66,
67
]);
});
});

View File

@@ -3,6 +3,7 @@ import { annotateLocalFilePath, resolveLocalFilePath } from './local-file-path.r
describe('local file path rules', () => {
it('prefers an existing path property on the file', () => {
const file = new File(['video'], 'clip.mp4', { type: 'video/mp4' });
Object.defineProperty(file, 'path', { value: '/tmp/clip.mp4' });
expect(resolveLocalFilePath(file)).toBe('/tmp/clip.mp4');