mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
- Add an import statement for the `get` function from `./utils/env.js` - Add a constant for `API_ENDPOINT` using the `get` function - Remove the `sessionId` constant declaration - Add an `async` function `getSessionId` for fetching session ID - Add an `async` function `main` for the main program logic - Initialize `sessionId` using the command line argument or by calling `getSessionId` - Add a console log statement for the session ID - Remove the `if` statement for checking `sessionId` existence - Update the socket URL to use `API_ENDPOINT` - Add a `socket.on` event listener for the `close` event - Update the condition for checking the `key` value in `stdin.on` event listener - Call the `main` function at the end of the file Signed-off-by: wancat <wancat@wancat.cc>