Skip to content

Commit

Permalink
style: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Sep 4, 2024
1 parent 286afa4 commit f8eec8f
Show file tree
Hide file tree
Showing 7 changed files with 310 additions and 248 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const payloadIsVerified = await verifyRequestByKeyId(
keyId,
{
token: process.env.GITHUB_TOKEN,
}
},
);
// true or false
```
Expand Down Expand Up @@ -86,7 +86,7 @@ import { verifyRequestByKeyId } from "@copilot-extensions/preview-sdk";
const payloadIsVerified = await verifyRequestByKeyId(
request.body,
signature,
key
key,
);

// with token
Expand Down Expand Up @@ -124,7 +124,7 @@ import { verify } from "@copilot-extensions/preview-sdk";
const payloadIsVerified = await verifyRequestPayload(
request.body,
signature,
key
key,
);
// true or false
```
Expand Down Expand Up @@ -171,7 +171,7 @@ response.write(
id: "123",
title: "Are you sure?",
message: "This will do something.",
}).toString()
}).toString(),
);
```

Expand Down Expand Up @@ -279,7 +279,7 @@ import { verifyAndParseRequest } from "@copilot-extensions/preview-sdk";
const { isValidRequest, payload } = await verifyAndParseRequest(
request,
signature,
key
key,
);

if (!isValidRequest) {
Expand Down
10 changes: 6 additions & 4 deletions dreamcode.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,16 @@ agent.on(
}

await respond.text(
prompt.stream("Please tell me a joke about Mona Lisa, Github's mascot.")
prompt.stream(
"Please tell me a joke about Mona Lisa, Github's mascot.",
),
);
return;
}

log.warn("Received an unknown confirmation:", confirmation.id);
await respond.text("Hmm, something went wrong. Please try again later.");
}
},
);

createServer(createNodeMiddleware(agent)).listen(3000);
Expand Down Expand Up @@ -172,7 +174,7 @@ copilotAgent.on("function_call", async ({ log, name, parameters }) => {
log.info(
"Received a function call for %s with parameters %o",
name,
parameters
parameters,
);
});

Expand All @@ -192,7 +194,7 @@ await copilotAgent.receive({ payload });
const { isValidRequest, payload } = await copilotAgent.verifyAndParse(
payload,
signature,
keyId
keyId,
);
```

Expand Down
Loading

0 comments on commit f8eec8f

Please sign in to comment.