Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/lib/utils/haptics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,11 @@ export function error() {
export function selection() {
fire("selection");
}

/** Stream start burst — multiple short vibrations for a "machine starting up" feel. */
export function streamStart(): void {
if (!enabled || !browser) return;
if (typeof navigator.vibrate !== "function") return;
// Three quick pulses: two short taps + a slightly longer finish
navigator.vibrate([50, 30, 50, 30, 80]);
}
4 changes: 4 additions & 0 deletions src/routes/conversation/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import { updateDebouncer } from "$lib/utils/updates.js";
import SubscribeModal from "$lib/components/SubscribeModal.svelte";
import { loading } from "$lib/stores/loading.js";
import { streamStart } from "$lib/utils/haptics";
import { requireAuthUser } from "$lib/utils/auth.js";
import { isConversationGenerationActive } from "$lib/utils/generationState";

Expand Down Expand Up @@ -320,6 +321,9 @@
) {
flushBuffer(currentTime);
}
if (pending) {
streamStart();
}
pending = false;
} else if (update.type === MessageUpdateType.FinalAnswer) {
// Mirror server-side merge behavior so the UI reflects the
Expand Down
Loading