惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Last Week in AI
Last Week in AI
博客园_首页
Microsoft Security Blog
Microsoft Security Blog
Blog — PlanetScale
Blog — PlanetScale
M
MIT News - Artificial intelligence
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
A
About on SuperTechFans
aimingoo的专栏
aimingoo的专栏
V
Visual Studio Blog
Jina AI
Jina AI
N
Netflix TechBlog - Medium
量子位
博客园 - 三生石上(FineUI控件)
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
I
InfoQ
J
Java Code Geeks
T
Tailwind CSS Blog
博客园 - 司徒正美
Stack Overflow Blog
Stack Overflow Blog
阮一峰的网络日志
阮一峰的网络日志
Engineering at Meta
Engineering at Meta
腾讯CDC

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix: harden ios app build hygiene · openclaw/openclaw@b29...
steipete · 2026-04-28 · via Recent Commits to openclaw:main

@@ -13,7 +13,9 @@ public struct WakeWordSegment: Sendable, Equatable {

1313

self.range = range

1414

}

151516-

public var end: TimeInterval { start + duration }

16+

public var end: TimeInterval {

17+

self.start + self.duration

18+

}

1719

}

18201921

public struct WakeWordGateConfig: Sendable, Equatable {

@@ -24,7 +26,8 @@ public struct WakeWordGateConfig: Sendable, Equatable {

2426

public init(

2527

triggers: [String],

2628

minPostTriggerGap: TimeInterval = 0.45,

27-

minCommandLength: Int = 1) {

29+

minCommandLength: Int = 1)

30+

{

2831

self.triggers = triggers

2932

self.minPostTriggerGap = minPostTriggerGap

3033

self.minCommandLength = minCommandLength

@@ -78,10 +81,10 @@ public enum WakeWordGate {

7881

segments: [WakeWordSegment],

7982

config: WakeWordGateConfig)

8083

-> WakeWordGateMatch? {

81-

let triggerTokens = normalizeTriggers(config.triggers)

84+

let triggerTokens = self.normalizeTriggers(config.triggers)

8285

guard !triggerTokens.isEmpty else { return nil }

838684-

let tokens = normalizeSegments(segments)

87+

let tokens = self.normalizeSegments(segments)

8588

guard !tokens.isEmpty else { return nil }

86898790

var best: MatchCandidate?

@@ -115,7 +118,7 @@ public enum WakeWordGate {

115118

}

116119117120

guard let best else { return nil }

118-

let command = commandText(transcript: transcript, segments: segments, triggerEndTime: best.triggerEnd)

121+

let command = self.commandText(transcript: transcript, segments: segments, triggerEndTime: best.triggerEnd)

119122

.trimmingCharacters(in: Self.whitespaceAndPunctuation)

120123

guard command.count >= config.minCommandLength else { return nil }

121124

return WakeWordGateMatch(

@@ -145,7 +148,7 @@ public enum WakeWordGate {

145148

guard !text.isEmpty else { return false }

146149

let normalized = text.lowercased()

147150

for trigger in triggers {

148-

let token = trigger.trimmingCharacters(in: whitespaceAndPunctuation).lowercased()

151+

let token = trigger.trimmingCharacters(in: self.whitespaceAndPunctuation).lowercased()

149152

if token.isEmpty { continue }

150153

if normalized.contains(token) { return true }

151154

}

@@ -155,19 +158,19 @@ public enum WakeWordGate {

155158

public static func stripWake(text: String, triggers: [String]) -> String {

156159

var out = text

157160

for trigger in triggers {

158-

let token = trigger.trimmingCharacters(in: whitespaceAndPunctuation)

161+

let token = trigger.trimmingCharacters(in: self.whitespaceAndPunctuation)

159162

guard !token.isEmpty else { continue }

160163

out = out.replacingOccurrences(of: token, with: "", options: [.caseInsensitive])

161164

}

162-

return out.trimmingCharacters(in: whitespaceAndPunctuation)

165+

return out.trimmingCharacters(in: self.whitespaceAndPunctuation)

163166

}

164167165168

private static func normalizeTriggers(_ triggers: [String]) -> [TriggerTokens] {

166169

var output: [TriggerTokens] = []

167170

for trigger in triggers {

168171

let tokens = trigger

169172

.split(whereSeparator: { $0.isWhitespace })

170-

.map { normalizeToken(String($0)) }

173+

.map { self.normalizeToken(String($0)) }

171174

.filter { !$0.isEmpty }

172175

if tokens.isEmpty { continue }

173176

output.append(TriggerTokens(source: tokens.joined(separator: " "), tokens: tokens))

@@ -177,7 +180,7 @@ public enum WakeWordGate {

177180178181

private static func normalizeSegments(_ segments: [WakeWordSegment]) -> [Token] {

179182

segments.compactMap { segment in

180-

let normalized = normalizeToken(segment.text)

183+

let normalized = self.normalizeToken(segment.text)

181184

guard !normalized.isEmpty else { return nil }

182185

return Token(

183186

normalized: normalized,

@@ -190,7 +193,7 @@ public enum WakeWordGate {

190193191194

private static func normalizeToken(_ token: String) -> String {

192195

token

193-

.trimmingCharacters(in: whitespaceAndPunctuation)

196+

.trimmingCharacters(in: self.whitespaceAndPunctuation)

194197

.lowercased()

195198

}

196199