3import type { VoiceNote } from "../../shared/types.ts";
4
5export async function createVoiceNote(voiceNote: Omit<VoiceNote, 'isExpired'>): Promise<void> {
6 try {
7 await sqlite.execute(
29}
30
31export async function getVoiceNote(id: string): Promise<VoiceNote | null> {
32 try {
33 const result = await sqlite.execute(
68}
69
70export async function incrementListenCount(id: string): Promise<void> {
71 await sqlite.execute(
72 `UPDATE ${TABLE_NAME} SET current_listens = current_listens + 1 WHERE id = ?`,
75}
76
77export async function updateTranscription(id: string, transcription: string): Promise<void> {
78 await sqlite.execute(
79 `UPDATE ${TABLE_NAME} SET transcription = ? WHERE id = ?`,
82}
83
84export async function deleteVoiceNote(id: string): Promise<void> {
85 await sqlite.execute(
86 `DELETE FROM ${TABLE_NAME} WHERE id = ?`,
89}
90
91export async function getAllVoiceNotes(): Promise<VoiceNote[]> {
92 try {
93 const result = await sqlite.execute(`SELECT * FROM ${TABLE_NAME} ORDER BY created_at DESC`);
3const TABLE_NAME = 'voice_notes_v1';
4
5export async function runMigrations() {
6 try {
7 // Create voice notes table
3import type { VoiceNote } from "../../shared/types.ts";
4
5export default function Dashboard() {
6 const [voiceNotes, setVoiceNotes] = useState<VoiceNote[]>([]);
7 const [loading, setLoading] = useState(true);
11}
12
13export default function App() {
14 const [currentView, setCurrentView] = useState<"recorder" | "player" | "dashboard">("recorder");
15 const voiceNoteId = window.__VOICE_NOTE_ID__;
10- Responsive design for desktop and mobile
11- Score tracking and move counter
12- Timer functionality
13- Undo functionality
14- Hint system with visual feedback
15- Auto-complete sequence detection
31
32The MCP TypeScript SDK uses Node-specific APIs that don't play nicely with Deno
33or edge functions:
34
35- https://github.com/modelcontextprotocol/typescript-sdk/issues/260
1
2export default async function(req) {
3 return new Response(`undefined`, {
4 headers: { 'Content-Type': 'text/html' }
1
2export default async function(req) {
3 return new Response(`undefined`, {
4 headers: { 'Content-Type': 'text/html' }
1
2export default async function(req) {
3 return new Response(`undefined`, {
4 headers: { 'Content-Type': 'text/html' }
1
2export default async function(req) {
3 return new Response(`undefined`, {
4 headers: { 'Content-Type': 'text/html' }
Simple functional CSS library for Val Town
A helper function to build a file's email
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.