-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Main node entrypoint, async nits, global tools #26
Merged
Commits on May 2, 2024
-
Fix main entrypoint, async nits, global tools
- Changed main entrypoint js in package.json to be where it is now. - If you know something is defined but TS doesn't, you can use the damnit flag, `!` instead of eslint ignore comments. `this.promise = new Promise(() => { .... this.process!.on('exit', ...)` - `async function foo(): Promise<x> { return await bar() }` is redundant. This is functionally the same as just saying `function foo(): Promise<x> { return bar() }` but makes debugging harder. By marking the function async and awaiting you're creating an extra promise that does nothing but immediately resolve after bar's does. You don't have to declare your function as async in order for the consumer to be able to await it. The consumer just needs a function that returns a Promise (which bar() already returns). On your side you only have to say `async` if you want to use `await` for something in the body (other than just immediately returning it) - Similarly text() and json() have that + a 2nd layer of extra promises. `throw` is the same as reject() and throws 'cascade' up so all json() needs to be is `return JSON.parse(await this.text())`. Also the returned JSON isn't necessarily an object, it could be an array or a random scalar so it should just return `any`. - Changed default for a text block to just plain 'text' format, markdown will be a separate option (that the parser doesn't need to know about) - Parameters (or ToolDef) should support globalTools and toolDefToString serializing them.
Configuration menu - View commit details
-
Copy full SHA for 5d45d74 - Browse repository at this point
Copy the full SHA 5d45d74View commit details -
Configuration menu - View commit details
-
Copy full SHA for 617a12f - Browse repository at this point
Copy the full SHA 617a12fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 42541fd - Browse repository at this point
Copy the full SHA 42541fdView commit details -
Signed-off-by: Donnie Adams <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3bbcf31 - Browse repository at this point
Copy the full SHA 3bbcf31View commit details -
fix: add temporary fix for event processing
Signed-off-by: Donnie Adams <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 415a4a9 - Browse repository at this point
Copy the full SHA 415a4a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4148ddd - Browse repository at this point
Copy the full SHA 4148dddView commit details
Commits on May 3, 2024
-
Signed-off-by: Donnie Adams <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0647634 - Browse repository at this point
Copy the full SHA 0647634View commit details
Commits on May 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0228f12 - Browse repository at this point
Copy the full SHA 0228f12View commit details
Commits on May 6, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 5b18055 - Browse repository at this point
Copy the full SHA 5b18055View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.