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

wrangler: add AI related commands #3986

Merged
merged 2 commits into from
Sep 22, 2023
Merged

wrangler: add AI related commands #3986

merged 2 commits into from
Sep 22, 2023

Conversation

edevil
Copy link
Contributor

@edevil edevil commented Sep 20, 2023

What this PR solves / how to test:

This PR adds the CLI commands related to AI functionality.

Author has included the following, where applicable:

Reviewer is to perform the following, as applicable:

  • Checked for inclusion of relevant tests
  • Checked for inclusion of a relevant changeset
  • Checked for creation of associated docs updates
  • Manually pulled down the changes and spot-tested

@edevil edevil requested a review from a team as a code owner September 20, 2023 10:04
@changeset-bot
Copy link

changeset-bot bot commented Sep 20, 2023

🦋 Changeset detected

Latest commit: 7c4fe9e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Sep 20, 2023

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6273399753/npm-package-wrangler-3986

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6273399753/npm-package-wrangler-3986

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6273399753/npm-package-wrangler-3986 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6273399753/npm-package-cloudflare-pages-shared-3986

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.9.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare 3.20230918.0 3.20230918.0
workerd 1.20230904.0 1.20230904.0
workerd --version 1.20230904.0 2023-09-04

|

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Merging #3986 (7c4fe9e) into main (f099a4f) will increase coverage by 0.12%.
The diff coverage is 92.59%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3986      +/-   ##
==========================================
+ Coverage   74.92%   75.05%   +0.12%     
==========================================
  Files         196      200       +4     
  Lines       11611    11665      +54     
  Branches     3050     3058       +8     
==========================================
+ Hits         8700     8755      +55     
+ Misses       2911     2910       -1     
Files Changed Coverage Δ
packages/wrangler/src/user/user.ts 72.23% <ø> (ø)
packages/wrangler/src/ai/options.ts 60.00% <60.00%> (ø)
packages/wrangler/src/ai/listCatalog.tsx 92.00% <92.00%> (ø)
packages/wrangler/src/ai/index.ts 100.00% <100.00%> (ø)
packages/wrangler/src/ai/utils.ts 100.00% <100.00%> (ø)
packages/wrangler/src/index.ts 82.50% <100.00%> (+0.18%) ⬆️

... and 3 files with indirect coverage changes

Copy link
Contributor

@penalosa penalosa left a comment

Choose a reason for hiding this comment

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

Looking good!

  • It would be good to see a test of the truncation behaviour
  • It would be good to see some tests of the recursive fetching behaviour

packages/wrangler/src/__tests__/ai.test.ts Outdated Show resolved Hide resolved
packages/wrangler/src/index.ts Show resolved Hide resolved
packages/wrangler/src/ai/listCatalog.tsx Outdated Show resolved Hide resolved
@edevil edevil force-pushed the ai_cli branch 4 times, most recently from 64dec01 to 91dea70 Compare September 22, 2023 09:17
@edevil
Copy link
Contributor Author

edevil commented Sep 22, 2023

Added the two missing tests.

@edevil edevil force-pushed the ai_cli branch 2 times, most recently from 554c03e to ef200ef Compare September 22, 2023 10:04
@RamIdeas
Copy link
Contributor

Rerunning the windows test job which failed

@penalosa penalosa merged commit 00247a8 into cloudflare:main Sep 22, 2023
16 checks passed
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