iOS TTF support; voice input

This commit is contained in:
James Babcock committed 2026-09-07 16:57:49 -07:00
1 parent ae14edcb59
commit b07ae0b479
67 files changed
+15717 -55

No files matched your search

+1 -1
View File
@@ -970,7 +970,7 @@ class Shell {
*/
private buildVoiceSendTargets(): VoiceSendTarget[] {
const targets: VoiceSendTarget[] = [];
if (this.isAssistantAvailable()) {
if (!global.isIOS && this.isAssistantAvailable()) {
targets.push({
id: "assistant",
label: "Send to Assistant",
+6 -5
View File
@@ -116,9 +116,9 @@ export class VoiceInputLayer implements Layer {
this.status = state.status;
this.actions.requestRender();
});
if (this.handsFree) {
// No button is held, so the mic has to stop itself. endCapture() is
// idempotent, and a click still ends the utterance early.
if (this.handsFree || global.isIOS) {
// Endpointing or the recognizer ending its session can finish capture.
// endCapture() is idempotent, including after a manual button release.
this.unsubscribeSpeechEnd = voiceControlBridge.onSpeechEnd(() => {
if (this.phase === "capturing") {
this.endCapture();
@@ -186,7 +186,7 @@ export class VoiceInputLayer implements Layer {
private menuRows(): Array<{ label: string; dim: boolean; onSelect: () => void }> {
const text = this.displayText().trim();
const hasText = text.length > 0;
const hasLlmKey = anthropicApiKeySetting.get().trim().length > 0;
const hasLlmKey = !global.isIOS && anthropicApiKeySetting.get().trim().length > 0;
const rows: Array<{ label: string; dim: boolean; onSelect: () => void }> = [];
for (const target of this.sendTargets) {
rows.push({
@@ -199,7 +199,7 @@ export class VoiceInputLayer implements Layer {
});
}
rows.push({
label: hasLlmKey ? "Continue" : "Continue (Needs LLM API key)",
label: global.isIOS ? "Continue (Not available on iOS)" : hasLlmKey ? "Continue" : "Continue (Needs LLM API key)",
dim: !hasLlmKey,
onSelect: () => {
if (hasLlmKey) this.startContinuation();
@@ -379,6 +379,7 @@ export class VoiceInputLayer implements Layer {
this.capturing = false;
void this.actions.stopVoiceCapture();
}
if (global.isIOS) voiceControlBridge.stop();
this.onClosed();
}