forked from Blendman974/faceclaw
Fix missing EvenHub app icons; ungate Assistant section of settings
This commit is contained in:
1 parent
7e58c7c05f
commit
d1df4bf046
4 files changed
+16
-15
No files matched your search
@@ -96,9 +96,9 @@
|
|||||||
NSMutableData *gray = [NSMutableData dataWithLength:size * size];
|
NSMutableData *gray = [NSMutableData dataWithLength:size * size];
|
||||||
const uint8_t *src = rgba.bytes;
|
const uint8_t *src = rgba.bytes;
|
||||||
uint8_t *dst = gray.mutableBytes;
|
uint8_t *dst = gray.mutableBytes;
|
||||||
for (NSInteger i = 0; i < size * size; i++) {
|
// Icons are monochrome coverage masks, matching Android IconRenderer.
|
||||||
dst[i] = (uint8_t)round(0.2126 * src[i * 4] + 0.7152 * src[i * 4 + 1] + 0.0722 * src[i * 4 + 2]);
|
// Source black/currentColor shapes must remain visible on black lenses.
|
||||||
}
|
for (NSInteger i = 0; i < size * size; i++) dst[i] = src[i * 4 + 3];
|
||||||
CGContextRelease(context);
|
CGContextRelease(context);
|
||||||
CGColorSpaceRelease(space);
|
CGColorSpaceRelease(space);
|
||||||
return gray;
|
return gray;
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ import { rasterizeSvg as render } from './ios-graphics'
|
|||||||
export function rasterizeSvg(svg: string, size: number, strokeWidth: number) {
|
export function rasterizeSvg(svg: string, size: number, strokeWidth: number) {
|
||||||
// Shared icon sources rely on the Android renderer's white, rounded
|
// Shared icon sources rely on the Android renderer's white, rounded
|
||||||
// stroke defaults. Supply those explicitly for a standards SVG renderer.
|
// stroke defaults. Supply those explicitly for a standards SVG renderer.
|
||||||
const source = svg.replace(/<svg\b([^>]*)>/, (_tag, attributes: string) => {
|
// Store icons use currentColor without a surrounding document/theme.
|
||||||
|
// Resolve it explicitly; SVGKit does not inherit a host CSS color here.
|
||||||
|
const source = svg.replace(/\bcurrentColor\b/gi, '#ffffff').replace(/<svg\b([^>]*)>/, (_tag, attributes: string) => {
|
||||||
const defaults = { xmlns: 'http://www.w3.org/2000/svg', width: '24', height: '24',
|
const defaults = { xmlns: 'http://www.w3.org/2000/svg', width: '24', height: '24',
|
||||||
stroke: svg.includes('fill="none"') ? '#ffffff' : 'none', fill: '#ffffff', 'stroke-width': String(strokeWidth),
|
stroke: svg.includes('fill="none"') ? '#ffffff' : 'none', fill: '#ffffff', 'stroke-width': String(strokeWidth),
|
||||||
'stroke-linecap': 'round', 'stroke-linejoin': 'round' }
|
'stroke-linecap': 'round', 'stroke-linejoin': 'round' }
|
||||||
|
|||||||
@@ -607,7 +607,7 @@ export const assistantBackendSetting = new ConfigSettingEnum<AssistantBackendKin
|
|||||||
values: global.isIOS ? ["direct"] : ["direct", "external"],
|
values: global.isIOS ? ["direct"] : ["direct", "external"],
|
||||||
formatValue: (value) => assistantBackendLabels[value] ?? value,
|
formatValue: (value) => assistantBackendLabels[value] ?? value,
|
||||||
description:
|
description:
|
||||||
global.isIOS ? "Cloud models called with your OpenAI or Anthropic API key." : "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.",
|
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 assistantBridgeHostSetting = new ConfigSettingString({
|
export const assistantBridgeHostSetting = new ConfigSettingString({
|
||||||
|
|||||||
@@ -127,18 +127,17 @@ function settingsSections(): SettingsSection[] {
|
|||||||
{
|
{
|
||||||
label: "Assistant",
|
label: "Assistant",
|
||||||
items: [
|
items: [
|
||||||
// On-phone LLM loop vs the user's own agent via the bridge plugin.
|
// iOS offers cloud APIs; Android also supports local models and the bridge.
|
||||||
enumSettingMenuItem(assistantBackendSetting),
|
enumSettingMenuItem(assistantBackendSetting),
|
||||||
enumSettingMenuItem(assistantModelSetting),
|
enumSettingMenuItem(assistantModelSetting),
|
||||||
...(!global.isIOS ? [localModelMenuItem()] : []),
|
// iOS has no local LLM, wakeword event delivery, or agent bridge yet.
|
||||||
// When on, a wakeword utterance goes straight to the assistant with no
|
|
||||||
// Send/Type menu step.
|
|
||||||
toggleSettingMenuItem(assistantSkipConfirmationSetting),
|
|
||||||
...(!global.isIOS ? [
|
...(!global.isIOS ? [
|
||||||
textSettingMenuItem(assistantBridgeHostSetting),
|
localModelMenuItem(),
|
||||||
textSettingMenuItem(assistantBridgePortSetting),
|
toggleSettingMenuItem(assistantSkipConfirmationSetting),
|
||||||
textSettingMenuItem(assistantBridgeTokenSetting),
|
textSettingMenuItem(assistantBridgeHostSetting),
|
||||||
toggleSettingMenuItem(assistantAllowProactiveSetting),
|
textSettingMenuItem(assistantBridgePortSetting),
|
||||||
|
textSettingMenuItem(assistantBridgeTokenSetting),
|
||||||
|
toggleSettingMenuItem(assistantAllowProactiveSetting),
|
||||||
] : []),
|
] : []),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -243,7 +242,7 @@ function settingsSections(): SettingsSection[] {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
if (!global.isIOS) return sections;
|
if (!global.isIOS) return sections;
|
||||||
const deferred = new Set(["Assistant", "Navigate", "Watch"]);
|
const deferred = new Set(["Navigate", "Watch"]);
|
||||||
return sections.map(section => {
|
return sections.map(section => {
|
||||||
if (section.label === "Developer") return { ...section, items: [toggleSettingMenuItem(showBleBandwidthSetting)] };
|
if (section.label === "Developer") return { ...section, items: [toggleSettingMenuItem(showBleBandwidthSetting)] };
|
||||||
if (section.label === "Voice") return { label: "Voice", items: [{
|
if (section.label === "Voice") return { label: "Voice", items: [{
|
||||||
|
|||||||
Reference in new issue
Block a user