forked from Blendman974/faceclaw
Port assistant integration (with cloud AIs) to iOS
This commit is contained in:
1 parent
9e18745e53
commit
617cdc39eb
25 files changed
+508
-63
No files matched your search
@@ -1067,7 +1067,7 @@ class Shell {
|
||||
*/
|
||||
private buildVoiceSendTargets(): VoiceSendTarget[] {
|
||||
const targets: VoiceSendTarget[] = [];
|
||||
if (!global.isIOS && this.isAssistantAvailable()) {
|
||||
if (this.isAssistantAvailable()) {
|
||||
targets.push({
|
||||
id: "assistant",
|
||||
label: "Send to Assistant",
|
||||
@@ -1254,7 +1254,7 @@ class Shell {
|
||||
this.showAlert(
|
||||
assistantBackendSetting.get() === "external"
|
||||
? "Configure the agent bridge host and token in Settings."
|
||||
: "Set an API key or download the on-phone model in Settings.",
|
||||
: global.isIOS ? "Set an OpenAI or Anthropic API key in Settings." : "Set an API key or download the on-phone model in Settings.",
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -224,7 +224,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 && !this.stoppingCapture;
|
||||
const hasLlmKey = !global.isIOS && anthropicApiKeySetting.get().trim().length > 0;
|
||||
const hasLlmKey = anthropicApiKeySetting.get().trim().length > 0;
|
||||
const rows: Array<{ label: string; dim: boolean; onSelect: () => void }> = [];
|
||||
for (const target of this.sendTargets) {
|
||||
rows.push({
|
||||
@@ -238,7 +238,7 @@ export class VoiceInputLayer implements Layer {
|
||||
});
|
||||
}
|
||||
rows.push({
|
||||
label: global.isIOS ? "Continue (Not available on iOS)" : hasLlmKey ? "Continue" : "Continue (Needs LLM API key)",
|
||||
label: hasLlmKey ? "Continue" : "Continue (Needs LLM API key)",
|
||||
dim: !hasLlmKey || this.stoppingCapture,
|
||||
onSelect: () => {
|
||||
if (hasLlmKey && !this.stoppingCapture) this.startContinuation();
|
||||
|
||||
Reference in new issue
Block a user