Skip to content

Conversation

fanweixiao
Copy link
Member

@fanweixiao fanweixiao commented Jun 5, 2025

1. fix bug: follow code dictionary structure when building typescript llm function

yomo build generate dictionary structure:

.rw-r--r--   153 fanweixiao 28 Apr 03:09 ├── .env
.rw-r--r--@   90 fanweixiao 20 May 01:29 ├── .env.example
.rw-r--r--@   32 fanweixiao 20 May 01:29 ├── .gitignore
.rw-r--r--@ 2.0k fanweixiao  5 Jun 10:27 ├── .wrapper.js
.rwxr-xr-x@ 1.7k fanweixiao  5 Jun 10:20 ├── .wrapper.ts
drwxr-xr-x     - fanweixiao  5 Jun 09:22 ├── assets
.rw-r--r--    22 fanweixiao  5 Jun 09:22 │   └── data.json
drwxr-xr-x@    - fanweixiao  5 Jun 10:27 ├── dist
.rw-r--r--@ 1.3k fanweixiao  5 Jun 10:27 │   └── src
.rw-r--r--@ 1.3k fanweixiao  5 Jun 10:27 │       └── app.js
.rw-r--r--@  392 fanweixiao 20 May 01:29 ├── package.json
.rw-r--r--@  14k fanweixiao 21 Apr 14:56 ├── pnpm-lock.yaml
.rw-r--r--@ 2.8k fanweixiao 20 May 01:29 ├── README.md
drwxr-xr-x@    - fanweixiao 20 May 01:29 ├── src
.rw-r--r--@ 1.3k fanweixiao  5 Jun 09:37 │   └── app.ts
.rw-r--r--@  293 fanweixiao  5 Jun 10:19 ├── tsconfig.json
.rw-r--r--@   78 fanweixiao 28 Apr 03:04 └── yc.yml

expected should be:

...
drwxr-xr-x@    - fanweixiao  5 Jun 10:27 ├── dist
.rw-r--r--@ 2.0k fanweixiao  5 Jun 10:27 │   └── .wrapper.js
.rw-r--r--@ 1.3k fanweixiao  5 Jun 10:27 │   └── app.js
drwxr-xr-x@    - fanweixiao 20 May 01:29 ├── src
.rwxr-xr-x@ 1.7k fanweixiao  5 Jun 10:20 │   └── .wrapper.ts
.rw-r--r--@ 1.3k fanweixiao  5 Jun 09:37 │   └── app.ts
drwxr-xr-x     - fanweixiao  5 Jun 09:22 ├── assets
.rw-r--r--    22 fanweixiao  5 Jun 09:22 │   └── data.json
...

2. add yomo run --production feature

yomo run --production will skip build step, while yomo run won't.

@fanweixiao fanweixiao requested a review from venjiang June 5, 2025 09:14
@fanweixiao fanweixiao self-assigned this Jun 5, 2025
gemini-code-assist[bot]

This comment was marked as outdated.

gemini-code-assist[bot]

This comment was marked as outdated.

Copy link

codecov bot commented Jun 5, 2025

Codecov Report

Attention: Patch coverage is 0% with 44 lines in your changes missing coverage. Please review.

Project coverage is 48.14%. Comparing base (f829616) to head (58d71cd).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
cli/serverless/nodejs/runtime.go 0.00% 30 Missing ⚠️
cli/run.go 0.00% 8 Missing ⚠️
cli/serverless/nodejs/serverless.go 0.00% 3 Missing ⚠️
cli/serverless/serverless.go 0.00% 2 Missing ⚠️
cli/cli.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1093      +/-   ##
==========================================
+ Coverage   48.10%   48.14%   +0.03%     
==========================================
  Files          96       96              
  Lines        7253     7239      -14     
==========================================
- Hits         3489     3485       -4     
+ Misses       3562     3551      -11     
- Partials      202      203       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pull-request-size pull-request-size bot added size/S and removed size/XS labels Jun 5, 2025
@fanweixiao fanweixiao changed the title feat(cli): add --production option to yomo run fix(cli): building typescript llm function follow structure Jun 5, 2025
@fanweixiao fanweixiao added feat/cli Feature: CLI typescript Serverless LLM Function in TypeScript labels Jun 5, 2025
@fanweixiao fanweixiao changed the title fix(cli): building typescript llm function follow structure fix(cli): follow code dictionary structure when building typescript llm function Jun 5, 2025
@fanweixiao fanweixiao added the bug Something isn't working label Jun 5, 2025
@fanweixiao fanweixiao changed the title fix(cli): follow code dictionary structure when building typescript llm function feat(cli): implement yomo run--production to skip compile step Jun 5, 2025
@fanweixiao fanweixiao requested a review from Copilot June 5, 2025 14:22
@fanweixiao fanweixiao marked this pull request as ready for review June 5, 2025 14:22
@fanweixiao fanweixiao requested a review from woorui as a code owner June 5, 2025 14:22
@fanweixiao fanweixiao requested a review from venjiang June 5, 2025 14:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a production mode for the CLI to skip the build step and updates the file structure for the generated TypeScript LLM function build process. Key changes include:

  • Commenting out the BuildAndRun function in the Go wrapper.
  • Updating dependency versions in go.mod.
  • Adding a new production flag in the CLI and adjusting file copy logic in the Node.js serverless build.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/wrapper/wrapper.go Commented out the BuildAndRun function to skip the build step.
go.mod Updated versions for anthroic-sdk-go and go-openai.
cli/serverless/serverless.go Minor comment update with a TODO for inferring runtime from flags.
cli/serverless/options.go Added a new Production flag for production mode.
cli/serverless/nodejs/serverless.go Adjusted tsconfig paths for improved output directory configuration.
cli/serverless/nodejs/runtime.go Modified file copy and log statements to reflect updated file paths.
cli/run.go Implemented production mode logic to skip the build process.
cli/cli.go Updated comments in parseFileArg for clarity.

Co-authored-by: Copilot <[email protected]>
@fanweixiao fanweixiao changed the title feat(cli): implement yomo run--production to skip compile step feat(cli): implement yomo run --production to skip compile step Jun 5, 2025
@fanweixiao fanweixiao merged commit 4436f07 into master Jun 5, 2025
5 of 6 checks passed
@fanweixiao fanweixiao deleted the feat/cli-production-option branch June 5, 2025 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feat/cli Feature: CLI size/S typescript Serverless LLM Function in TypeScript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants