some fixes
This commit is contained in:
@@ -27,36 +27,18 @@ Be concise and specific. Focus on what's visible in the frames."""
|
||||
|
||||
def _build_prompt(message: str, context: SessionContext) -> str:
|
||||
lines = []
|
||||
|
||||
# Session summary
|
||||
m, s = divmod(int(context.duration), 60)
|
||||
lines.append(f"Recording duration: {m:02d}:{s:02d}")
|
||||
lines.append(f"Total frames captured: {len(context.frames)}")
|
||||
|
||||
# All available frames (let Claude decide which to look at)
|
||||
if context.frames:
|
||||
lines.append("\nAvailable frames:")
|
||||
for f in context.frames:
|
||||
fm, fs = divmod(int(f.timestamp), 60)
|
||||
lines.append(f" {f.id} at {fm:02d}:{fs:02d} — {f.path}")
|
||||
|
||||
# Explicitly mentioned frames
|
||||
if context.mentioned_frames:
|
||||
lines.append("\nFrames referenced in this message:")
|
||||
lines.append("\nFrames:")
|
||||
for f in context.mentioned_frames:
|
||||
fm, fs = divmod(int(f.timestamp), 60)
|
||||
lines.append(f" {f.id} at {fm:02d}:{fs:02d} — {f.path}")
|
||||
|
||||
# Transcript
|
||||
if context.transcript_segments:
|
||||
lines.append(f"\nTranscript ({len(context.transcript_segments)} segments):")
|
||||
for t in context.transcript_segments:
|
||||
tm1, ts1 = divmod(int(t.start), 60)
|
||||
tm2, ts2 = divmod(int(t.end), 60)
|
||||
lines.append(f" {t.id} [{tm1:02d}:{ts1:02d}-{tm2:02d}:{ts2:02d}] {t.text}")
|
||||
|
||||
if context.mentioned_transcripts:
|
||||
lines.append("\nTranscript segments referenced in this message:")
|
||||
lines.append("\nTranscript:")
|
||||
for t in context.mentioned_transcripts:
|
||||
tm1, ts1 = divmod(int(t.start), 60)
|
||||
tm2, ts2 = divmod(int(t.end), 60)
|
||||
|
||||
Reference in New Issue
Block a user