Skip to content

Conversation

@njhale
Copy link
Member

@njhale njhale commented Jul 19, 2024

  • Package and export a function for creating the custom combination NextJS/socket.io server so the UI can be more easily imported by other projects
  • Fix production NextJS builds
  • Normalize import formatting
  • Pin the versions of problematic packages to make importing the UI easier

njhale added 2 commits July 18, 2024 23:59
- fix production NextJS builds
- normalize import formatting

Signed-off-by: Nick Hale <[email protected]>
Package and export a function for creating the custom combination NextJS/socket.io
server so the UI can be more easily imported by other projects.

Signed-off-by: Nick Hale <[email protected]>
@njhale njhale requested review from thedadams and tylerslaton July 19, 2024 04:17
Copy link
Contributor

@tylerslaton tylerslaton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of nits, nothing blocking.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-blocking for this pr, but...

What's your opinion about making this a TypeScript file? A part of the socket server being so bad is that it ignore all the other TS conventions in the app since its in common js.

The package version ranges specified in package.json cause peer
dependency conflicts when package-lock.json is removed. Since npm's
dependency resolution doesn't consider the versions tracked in
package-lock.json, any project that depends on the UI will need to
resolve these issues. To fix this, pin the versions of problematic
packages to the versions currently set in package-lock.json.

Signed-off-by: Nick Hale <[email protected]>
@njhale njhale force-pushed the enhance/export-ui-server branch from 8cdad2f to 67a41e8 Compare July 20, 2024 03:14
Since the THREADS_DIR environment variable is retrieved on package
import, changes that dependents make to it before startAppServer is
called are ignored. To fix this, load the environment variable
immediately before it's used instead.

Signed-off-by: Nick Hale <[email protected]>
@njhale njhale force-pushed the enhance/export-ui-server branch from 7b9a4df to 9b50bdd Compare July 23, 2024 04:53
@njhale njhale merged commit 0b2066f into gptscript-ai:main Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants