Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

style: reorder imports and format voice note replay script

Steven Enamakel336dc4e22dd0
diff --git a/app/src/features/conversations/Conversations.tsx b/app/src/features/conversations/Conversations.tsx
index 934dd1af34..6cc7c68d4b 100644
--- a/app/src/features/conversations/Conversations.tsx
+++ b/app/src/features/conversations/Conversations.tsx
@@ -38,8 +38,8 @@ import type { VoiceNoteDraft } from '../../features/voiceNotes/useVoiceNoteRecor
import {
storeVoiceNote,
transcribeVoiceNote,
- voiceNoteContentPart,
VOICE_NOTE_SOURCE,
+ voiceNoteContentPart,
type VoiceNoteMeta,
} from '../../features/voiceNotes/voiceNoteApi';
import { VoiceNoteComposer } from '../../features/voiceNotes/VoiceNoteComposer';
diff --git a/app/src/features/voiceNotes/voiceNoteApi.ts b/app/src/features/voiceNotes/voiceNoteApi.ts
index 2639b201da..7249d835c2 100644
--- a/app/src/features/voiceNotes/voiceNoteApi.ts
+++ b/app/src/features/voiceNotes/voiceNoteApi.ts
@@ -6,8 +6,8 @@
* in its `extraMetadata.voiceNote`. Assistant spoken replies use the same
* store, so one reader serves both directions.
*/
-import { callCoreRpc } from '../../services/coreRpcClient';
import type { ContentPart } from '../../services/chatWire';
+import { callCoreRpc } from '../../services/coreRpcClient';
import { openhumanVoiceTranscribeBytes } from '../../utils/tauriCommands/voice';
/** `extraMetadata.voiceNote` as persisted on a thread row. */
diff --git a/scripts/debug/web-scripts/chat-voice-note-replay.mjs b/scripts/debug/web-scripts/chat-voice-note-replay.mjs
index aaec6bcdc1..7a179bbf52 100644
--- a/scripts/debug/web-scripts/chat-voice-note-replay.mjs
+++ b/scripts/debug/web-scripts/chat-voice-note-replay.mjs
@@ -208,7 +208,10 @@ export default async function voiceNoteReplay({ page, mock, log, screenshot }) {
if (!rpcUrl || !rpcAuthorization)
throw new Error("could not capture the signed local core RPC endpoint");
const transcriptResponse = await page.request.post(rpcUrl, {
- headers: { authorization: rpcAuthorization, "content-type": "application/json" },
+ headers: {
+ authorization: rpcAuthorization,
+ "content-type": "application/json",
+ },
data: {
jsonrpc: "2.0",
id: "voice-note-transcript-replay",
@@ -217,19 +220,29 @@ export default async function voiceNoteReplay({ page, mock, log, screenshot }) {
},
});
if (!transcriptResponse.ok())
- throw new Error(`threads_transcript_get returned ${transcriptResponse.status()}`);
+ throw new Error(
+ `threads_transcript_get returned ${transcriptResponse.status()}`,
+ );
let transcriptValue = await transcriptResponse.json();
for (
let depth = 0;
depth < 6 && transcriptValue && !Array.isArray(transcriptValue.items);
depth += 1
) {
- transcriptValue = transcriptValue.result ?? transcriptValue.data ?? transcriptValue.value;
+ transcriptValue =
+ transcriptValue.result ?? transcriptValue.data ?? transcriptValue.value;
}
- const projectedVoiceNotes = (Array.isArray(transcriptValue?.items) ? transcriptValue.items : [])
+ const projectedVoiceNotes = (
+ Array.isArray(transcriptValue?.items) ? transcriptValue.items : []
+ )
.filter((item) => item.extraMetadata?.voiceNote?.noteId)
- .map((item) => ({ kind: item.kind, noteId: item.extraMetadata.voiceNote.noteId }));
- log(`threads_transcript_get voice rows: ${JSON.stringify(projectedVoiceNotes)}`);
+ .map((item) => ({
+ kind: item.kind,
+ noteId: item.extraMetadata.voiceNote.noteId,
+ }));
+ log(
+ `threads_transcript_get voice rows: ${JSON.stringify(projectedVoiceNotes)}`,
+ );
if (
!projectedVoiceNotes.some((item) => item.kind === "userMessage") ||
!projectedVoiceNotes.some((item) => item.kind === "assistantMessage")