feat(voicewake): add computer wake word
This commit is contained in:
@@ -21,7 +21,7 @@ Wake words are stored on the gateway machine at:
|
|||||||
Shape:
|
Shape:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{ "triggers": ["clawd", "claude"], "updatedAtMs": 1730000000000 }
|
{ "triggers": ["clawd", "claude", "computer"], "updatedAtMs": 1730000000000 }
|
||||||
```
|
```
|
||||||
|
|
||||||
## Protocol
|
## Protocol
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ describe("gateway server", () => {
|
|||||||
|
|
||||||
const initial = await rpcReq<{ triggers: string[] }>(ws, "voicewake.get");
|
const initial = await rpcReq<{ triggers: string[] }>(ws, "voicewake.get");
|
||||||
expect(initial.ok).toBe(true);
|
expect(initial.ok).toBe(true);
|
||||||
expect(initial.payload?.triggers).toEqual(["clawd", "claude"]);
|
expect(initial.payload?.triggers).toEqual(["clawd", "claude", "computer"]);
|
||||||
|
|
||||||
const changedP = onceMessage<{
|
const changedP = onceMessage<{
|
||||||
type: "event";
|
type: "event";
|
||||||
@@ -369,7 +369,7 @@ describe("gateway server", () => {
|
|||||||
const firstPayload = JSON.parse(String(first?.payloadJSON)) as {
|
const firstPayload = JSON.parse(String(first?.payloadJSON)) as {
|
||||||
triggers?: unknown;
|
triggers?: unknown;
|
||||||
};
|
};
|
||||||
expect(firstPayload.triggers).toEqual(["clawd", "claude"]);
|
expect(firstPayload.triggers).toEqual(["clawd", "claude", "computer"]);
|
||||||
|
|
||||||
bridgeSendEvent.mockClear();
|
bridgeSendEvent.mockClear();
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export type VoiceWakeConfig = {
|
|||||||
updatedAtMs: number;
|
updatedAtMs: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
const DEFAULT_TRIGGERS = ["clawd", "claude"];
|
const DEFAULT_TRIGGERS = ["clawd", "claude", "computer"];
|
||||||
|
|
||||||
function defaultBaseDir() {
|
function defaultBaseDir() {
|
||||||
return path.join(os.homedir(), ".clawdis");
|
return path.join(os.homedir(), ".clawdis");
|
||||||
|
|||||||
Reference in New Issue
Block a user