Skip to content

Commit f4031e2

Browse files
feat(haptic): use burst command in hook and plugin for maximum intensity
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent b63beba commit f4031e2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

hooks/louder-hook.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ async function playHaptic(hapticConfig) {
178178
const actuationID = HAPTIC_ACTUATION_MAP[parsed.type] || ACTUATION_STRONG;
179179
const rawIntensity = parsed.intensity;
180180
const intensity = Number.isFinite(rawIntensity) ? Math.max(0, Math.min(2, rawIntensity)) : 1.0;
181-
const command = `${actuationID},${intensity}`;
181+
const command = `burst,2,${actuationID},${intensity},12000`;
182182

183183
const success = engine.write(command);
184184
if (!success) {

opencode-plugin/louder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ async function playSound(type = "success") {
9595
async function playHaptic(intensity = 2.0) {
9696
const engine = await getHapticEngine()
9797
if (engine) {
98-
engine.write(`6,${intensity}`)
98+
engine.write(`burst,2,6,${intensity},12000`)
9999
}
100100
}
101101

0 commit comments

Comments
 (0)