Skip to content

Commit 820c16c

Browse files
bianbianzhuTianyiLi
andauthored
Fix/update doc for progress report (#92)
* fix(docs): update README to use await for async functions in examples * doc: add await when calling the reportProgress function --------- Co-authored-by: TianyiLi <[email protected]>
1 parent 563b0de commit 820c16c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,14 +700,14 @@ server.addTool({
700700
url: z.string(),
701701
}),
702702
execute: async (args, { reportProgress }) => {
703-
reportProgress({
703+
await reportProgress({
704704
progress: 0,
705705
total: 100,
706706
});
707707

708708
// ...
709709

710-
reportProgress({
710+
await reportProgress({
711711
progress: 100,
712712
total: 100,
713713
});

0 commit comments

Comments
 (0)