Review recorded explanations of a solution on the site
The admin can upload a recording of themselves explaining a problem's solution out loud (mp3, m4a, wav, webm, ogg or flac, up to 25 MB) and get interview-style feedback, committed as reviews/<id>.md so every attempt is kept. Claude can't take audio, so the recording is transcribed first by an OpenAI-compatible endpoint (whisper-1 by default; TRANSCRIBE_API_KEY, with TRANSCRIBE_URL for a self-hosted server). Pace, pauses, filler words and when complexity first comes up are measured from the word timestamps and given to Claude with the timestamped transcript, the statement and optionally the code. The reply covers the verdict, scores in five areas, the approach and its complexity, missed edge cases, delivery and what to work on. Recordings are kept for playback in an S3 bucket (Garage) when the S3_* settings are given, and are thrown away otherwise. Reviews are admin-only. The job runs in the background like Explain, and the statement fetch and save-error handling are now shared between the two. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
* explain.md, laid out as the ladder it was written to be: every "## "
|
||||
* section folded away so the reader opens only as much as they need (the
|
||||
* observation, then one hint at a time, ...). The line above the first
|
||||
* section (who wrote it, when) stays visible.
|
||||
* section (who wrote it, when) stays visible. Reviews use it too, with the
|
||||
* sections worth reading at once named in open.
|
||||
*
|
||||
* Markdown is rendered with html: false like the notes. The one exception
|
||||
* is ```svg fences, the walkthrough's diagrams: they are inserted as SVG
|
||||
@@ -15,7 +16,10 @@ import { computed } from "vue";
|
||||
import MarkdownIt from "markdown-it";
|
||||
import DOMPurify from "dompurify";
|
||||
|
||||
const props = defineProps({ source: { type: String, required: true } });
|
||||
const props = defineProps({
|
||||
source: { type: String, required: true },
|
||||
open: { type: Array, default: () => [] },
|
||||
});
|
||||
|
||||
const md = new MarkdownIt({ html: false, linkify: true });
|
||||
const fence = md.renderer.rules.fence;
|
||||
@@ -49,7 +53,7 @@ const parts = computed(() => {
|
||||
<template>
|
||||
<div class="explanation">
|
||||
<div v-if="parts.intro.trim()" class="intro muted prose" v-html="parts.intro"></div>
|
||||
<details v-for="(s, i) in parts.sections" :key="i + s.title" class="step card">
|
||||
<details v-for="(s, i) in parts.sections" :key="i + s.title" class="step card" :open="open.includes(s.title)">
|
||||
<summary>{{ s.title }}</summary>
|
||||
<div class="body prose" v-html="s.html"></div>
|
||||
</details>
|
||||
|
||||
Reference in New Issue
Block a user