Skip to content

Commit 862ea46

Browse files
committed
examples/think: fix lint and typecheck
1 parent 82c7f74 commit 862ea46

3 files changed

Lines changed: 21 additions & 18 deletions

File tree

β€Žexamples/think/cli/triage.mjsβ€Ž

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,26 @@ const server = http.createServer((req, res) => {
6969
});
7070
});
7171

72-
server.listen(process.env.PORT && Number.parseInt(process.env.PORT, 10) || 0, "0.0.0.0", async () => {
73-
const addr = server.address();
74-
const port = typeof addr === "object" && addr ? addr.port : 0;
75-
const host = advertiseHost || pickHost();
76-
const webhookUrl = webhookOverride || `http://${host}:${port}/webhook`;
77-
process.stderr.write(`webhook listening on http://0.0.0.0:${port}/webhook\n`);
78-
process.stderr.write(`advertising as ${webhookUrl}\n`);
79-
bumpWatchdog();
80-
try {
81-
await postIssue(workerUrl, issueUrl, webhookUrl, debug);
82-
process.stderr.write(`posted to ${workerUrl}/issue\n\n`);
83-
} catch (err) {
84-
process.stderr.write(`POST /issue failed: ${err?.message ?? err}\n`);
85-
exit(4);
86-
}
87-
});
72+
server.listen(
73+
(process.env.PORT && Number.parseInt(process.env.PORT, 10)) || 0,
74+
"0.0.0.0",
75+
async () => {
76+
const addr = server.address();
77+
const port = typeof addr === "object" && addr ? addr.port : 0;
78+
const host = advertiseHost || pickHost();
79+
const webhookUrl = webhookOverride || `http://${host}:${port}/webhook`;
80+
process.stderr.write(`webhook listening on http://0.0.0.0:${port}/webhook\n`);
81+
process.stderr.write(`advertising as ${webhookUrl}\n`);
82+
bumpWatchdog();
83+
try {
84+
await postIssue(workerUrl, issueUrl, webhookUrl, debug);
85+
process.stderr.write(`posted to ${workerUrl}/issue\n\n`);
86+
} catch (err) {
87+
process.stderr.write(`POST /issue failed: ${err?.message ?? err}\n`);
88+
exit(4);
89+
}
90+
},
91+
);
8892

8993
// ── Webhook handler ────────────────────────────────────────────────
9094

β€Žexamples/think/src/tools/fs/tools/edit.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export function createEditTool(options: EditToolOptions) {
9898
description:
9999
"Edit a single file using exact text replacement. Every edits[].oldText must match a unique, non-overlapping region of the original file. If two changes touch the same block, merge them into one edit.",
100100
inputSchema,
101-
execute: async (rawInput: any) => {
101+
execute: async (rawInput: unknown) => {
102102
const { path, edits } = prepareArguments(rawInput);
103103

104104
if (!Array.isArray(edits) || edits.length === 0) {

β€Žexamples/think/src/tools/git/clone.tsβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ export function createGitCloneTool(opts: GitCloneToolOptions) {
6363
dir: dest,
6464
ref,
6565
depth: depth ?? depthDefault,
66-
cache: opts.cache,
6766
});
6867
return {
6968
ok: true,

0 commit comments

Comments
Β (0)