Skip to content
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
merged 9 commits into from
May 6, 2024

Commits on May 2, 2024

  1. 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.
    vincent99 committed May 2, 2024
    Configuration menu
    Copy the full SHA
    5d45d74 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    617a12f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    42541fd View commit details
    Browse the repository at this point in the history
  4. changes from thedadams

    Signed-off-by: Donnie Adams <[email protected]>
    thedadams committed May 2, 2024
    Configuration menu
    Copy the full SHA
    3bbcf31 View commit details
    Browse the repository at this point in the history
  5. fix: add temporary fix for event processing

    Signed-off-by: Donnie Adams <[email protected]>
    thedadams committed May 2, 2024
    Configuration menu
    Copy the full SHA
    415a4a9 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4148ddd View commit details
    Browse the repository at this point in the history

Commits on May 3, 2024

  1. fix: fix test error check

    Signed-off-by: Donnie Adams <[email protected]>
    thedadams committed May 3, 2024
    Configuration menu
    Copy the full SHA
    0647634 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2024

  1. Configuration menu
    Copy the full SHA
    0228f12 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2024

  1. add jest to types

    Signed-off-by: Donnie Adams <[email protected]>
    thedadams committed May 6, 2024
    Configuration menu
    Copy the full SHA
    5b18055 View commit details
    Browse the repository at this point in the history