Merge commit 'd9924ee' into hermes-integration

This commit is contained in:
James Babcock committed 2026-10-17 13:45:43 -07:00
commit 825559aa82
9 files changed
+297 -4

No files matched your search

+23
View File
@@ -916,6 +916,28 @@ export const assistantBackendSetting = new ConfigSettingEnum<AssistantBackendKin
global.isIOS ? "Cloud models called with your OpenAI or Anthropic API key. Add your key in Settings > API Keys." : "Who answers assistant queries: an LLM called from the phone (a cloud API with your key, or the downloaded on-phone model), or your own long-running agent (e.g. OpenClaw) reached through the faceclaw-agent-bridge plugin.",
});
export const assistantHermesUrlSetting = new ConfigSettingString({
id: "assistant-hermes-url",
label: "Hermes URL",
storageKey: "assistant.hermesUrl",
defaultValue: "",
editorTitle: "Hermes API server (e.g. http://host:8642/v1)",
glassesEditTitle: "Edit Hermes URL",
formatValue: (value) => value || "(not set)",
description: "Address of a Hermes Agent gateway's API server, used when Hermes agent is the assistant model.",
});
export const assistantHermesKeySetting = new ConfigSettingString({
id: "assistant-hermes-key",
label: "Hermes key",
storageKey: "assistant.hermesKey",
defaultValue: "",
editorTitle: "Hermes API server key",
glassesEditTitle: "Edit Hermes key",
formatValue: (value) => (value ? `${value.slice(0, 6)}...` : "(not set)"),
description: "The API server's key (API_SERVER_KEY in Hermes's .env).",
});
export const assistantBridgeHostSetting = new ConfigSettingString({
id: "assistant-bridge-host",
label: "Bridge host",
@@ -1061,6 +1083,7 @@ export const assistantModelSetting = new ConfigSettingEnum<AssistantModel>({
if (provider === "anthropic") return anthropicApiKeySetting.get().trim().length === 0;
if (provider === "openai") return openAiApiKeySetting.get().trim().length === 0;
if (provider === "local") return !isLocalModelReady();
if (provider === "hermes") return assistantHermesUrlSetting.get().trim().length === 0;
return false;
},
description:
+4
View File
@@ -36,6 +36,8 @@ import {
uiDepthSetting,
assistantAllowProactiveSetting,
assistantBackendSetting,
assistantHermesKeySetting,
assistantHermesUrlSetting,
assistantBridgeHostSetting,
assistantBridgePortSetting,
assistantBridgeTokenSetting,
@@ -142,6 +144,8 @@ function settingsSections(): SettingsSection[] {
// iOS offers cloud APIs; Android also supports local models and the bridge.
enumSettingMenuItem(assistantBackendSetting),
enumSettingMenuItem(assistantModelSetting),
textSettingMenuItem(assistantHermesUrlSetting),
textSettingMenuItem(assistantHermesKeySetting),
...(!global.isIOS ? [localModelMenuItem()] : []),
toggleSettingMenuItem(assistantSkipConfirmationSetting),
// iOS has no local LLM or agent bridge yet.
+4
View File
@@ -31,6 +31,8 @@ import type { AssistantContext } from "../../assistant/types";
import { SingleNotificationLayer } from "../notifications";
import {
anthropicApiKeySetting,
assistantHermesKeySetting,
assistantHermesUrlSetting,
assistantBackendSetting,
assistantBridgeHostSetting,
assistantBridgePortSetting,
@@ -1686,6 +1688,8 @@ class Shell {
const llm = resolveAssistantModel(model, {
anthropic: anthropicApiKeySetting.get(),
openai: openAiApiKeySetting.get(),
hermesUrl: assistantHermesUrlSetting.get(),
hermesKey: assistantHermesKeySetting.get(),
});
if (llm && reasoning !== "default" && llm.effort) llm.effort = reasoning;
return llm ? { kind: "direct", llm } : null;