Add calculator and microphone conversation apps

Add symbolic math and graphing tools, dual-microphone audio processing, live captions, translation, speaker diarization, sentiment analysis, and searchable conversation history.

Extend Android voice and BLE support for microphone control, recording, transcoding, and on-device speaker identification, with coverage for calculator and microphone workflows.
This commit is contained in:
Kalani Helekunihi committed 2026-08-25 00:22:19 -05:00
1 parent ab963974e5
commit fe85846e6f
124 files changed
+22061 -58

No files matched your search

+18
View File
@@ -52,3 +52,21 @@ export const REFINE_SYSTEM_PROMPT =
export function buildRefineUserMessage(original: string, followup: string): string {
return `Original dictation:\n${original}\n\nFollow-up dictation:\n${followup}`;
}
/**
* The Calculator app's spoken-problem rewrite. The model never computes
* anything: it is used strictly as a translator from English into notation,
* and the deterministic engine solves the rewritten expression — so a wrong
* reading shows up as a wrong-looking equation rather than as a plausible
* wrong number.
*/
export const CALCULATOR_REWRITE_SYSTEM_PROMPT =
"Rewrite the user's spoken request as ONE mathematical expression or equation, in plain " +
"ASCII notation (+ - * / ^ = ( ) sqrt() sin() log()). Use x, y, z for unknowns. " +
"Reply with the expression and NOTHING else — no words, no explanation, no answer, " +
'no "=" result appended. If it is not a calculation, reply exactly "none".';
/** User message for the calculator rewrite flow. */
export function buildCalculatorRewriteUserMessage(spoken: string): string {
return `Request: ${spoken}`;
}