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

Rename AI files #1860

Merged
merged 28 commits into from
Nov 15, 2024
Merged

Rename AI files #1860

merged 28 commits into from
Nov 15, 2024

Conversation

handeyeco
Copy link
Contributor

@handeyeco handeyeco commented Nov 14, 2024

Summary:

There was discussion around the names of things in the AI folder being confusing.

What this PR does:

  1. renames prompt-utils.ts files to [widget]-ai-utils.ts
  2. most of these directories had two test files (1) testing getPromptJSON directly and (2) testing getPromptJSON on the widget export; I just combined these test files and renamed them to [widget]-ai-utils.test.ts
  3. updates the REAME

No real logic changes, just code shoveling.

@handeyeco handeyeco self-assigned this Nov 14, 2024
@handeyeco handeyeco changed the title dropdown and definition Rename AI files Nov 14, 2024
@khan-actions-bot
Copy link
Contributor

khan-actions-bot commented Nov 14, 2024

Gerald

Required Reviewers
  • @Khan/perseus for changes to .changeset/nasty-bikes-travel.md, packages/perseus/src/index.ts, packages/perseus/src/renderer.tsx, packages/perseus/src/server-item-renderer.tsx, packages/perseus/src/types.ts, packages/perseus/src/widget-ai-utils/README.md, packages/perseus/src/widget-ai-utils/prompt-types.ts, packages/perseus/src/widget-ai-utils/unsupported-widget.ts, packages/perseus/src/widgets/interactive-graph.tsx, packages/perseus/src/widget-ai-utils/categorizer/categorizer-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/categorizer/categorizer-ai-utils.ts, packages/perseus/src/widget-ai-utils/cs-program/cs-program-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/cs-program/cs-program-ai-utils.ts, packages/perseus/src/widget-ai-utils/definition/definition-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/definition/definition-ai-utils.ts, packages/perseus/src/widget-ai-utils/dropdown/dropdown-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/dropdown/dropdown-ai-utils.ts, packages/perseus/src/widget-ai-utils/explanation/explanation-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/explanation/explanation-ai-utils.ts, packages/perseus/src/widget-ai-utils/expression/expression-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/expression/expression-ai-utils.ts, packages/perseus/src/widget-ai-utils/graded-group/graded-group-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/graded-group/graded-group-ai-utils.ts, packages/perseus/src/widget-ai-utils/graded-group-set/graded-group-set-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/graded-group-set/graded-group-set-ai-utils.ts, packages/perseus/src/widget-ai-utils/grapher/grapher-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/grapher/grapher-ai-utils.ts, packages/perseus/src/widget-ai-utils/group/group-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/group/group-ai-utils.testdata.ts, packages/perseus/src/widget-ai-utils/group/group-ai-utils.ts, packages/perseus/src/widget-ai-utils/iframe/iframe-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/iframe/iframe-ai-utils.ts, packages/perseus/src/widget-ai-utils/image/image-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/image/image-ai-utils.ts, packages/perseus/src/widget-ai-utils/input-number/input-number-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/input-number/input-number-ai-utils.ts, packages/perseus/src/widget-ai-utils/interaction/interaction-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/interaction/interaction-ai-utils.ts, packages/perseus/src/widget-ai-utils/interactive-graph/interactive-graph-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/interactive-graph/interactive-graph-ai-utils.ts, packages/perseus/src/widget-ai-utils/label-image/label-image-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/label-image/label-image-ai-utils.ts, packages/perseus/src/widget-ai-utils/matcher/matcher-ai-utils.test.tsx, packages/perseus/src/widget-ai-utils/matcher/matcher-ai-utils.ts, packages/perseus/src/widget-ai-utils/matrix/matrix-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/matrix/matrix-ai-utils.ts, packages/perseus/src/widget-ai-utils/measurer/measurer-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/measurer/measurer-ai-utils.ts, packages/perseus/src/widget-ai-utils/number-line/number-line-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/number-line/number-line-ai-utils.ts, packages/perseus/src/widget-ai-utils/orderer/orderer-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/orderer/orderer-ai-utils.ts, packages/perseus/src/widget-ai-utils/passage/passage-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/passage/passage-ai-utils.ts, packages/perseus/src/widget-ai-utils/passage-ref/passage-ref-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/passage-ref/passage-ref-ai-utils.ts, packages/perseus/src/widget-ai-utils/phet-simulation/phet-simulation-ai-utils.ts, packages/perseus/src/widget-ai-utils/phet-simulation/prompt-utils.test.ts, packages/perseus/src/widget-ai-utils/plotter/plotter-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/plotter/plotter-ai-utils.ts, packages/perseus/src/widget-ai-utils/python-program/python-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/python-program/python-ai-utils.ts, packages/perseus/src/widget-ai-utils/radio/radio-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/radio/radio-ai-utils.ts, packages/perseus/src/widget-ai-utils/sorter/sorter-ai-utils.test.ts, packages/perseus/src/widget-ai-utils/sorter/sorter-ai-utils.ts, packages/perseus/src/widget-ai-utils/video/prompt-utils.test.ts, packages/perseus/src/widget-ai-utils/video/video-ai-utils.ts, packages/perseus/src/widgets/categorizer/categorizer.tsx, packages/perseus/src/widgets/cs-program/cs-program.tsx, packages/perseus/src/widgets/definition/definition.tsx, packages/perseus/src/widgets/dropdown/dropdown.tsx, packages/perseus/src/widgets/explanation/explanation.tsx, packages/perseus/src/widgets/expression/expression.tsx, packages/perseus/src/widgets/graded-group/graded-group.tsx, packages/perseus/src/widgets/graded-group-set/graded-group-set.tsx, packages/perseus/src/widgets/grapher/grapher.tsx, packages/perseus/src/widgets/group/group.tsx, packages/perseus/src/widgets/iframe/iframe.tsx, packages/perseus/src/widgets/image/image.tsx, packages/perseus/src/widgets/input-number/input-number.tsx, packages/perseus/src/widgets/interaction/interaction.tsx, packages/perseus/src/widgets/label-image/label-image.tsx, packages/perseus/src/widgets/matcher/matcher.tsx, packages/perseus/src/widgets/matrix/matrix.tsx, packages/perseus/src/widgets/measurer/measurer.tsx, packages/perseus/src/widgets/number-line/number-line.tsx, packages/perseus/src/widgets/orderer/orderer.tsx, packages/perseus/src/widgets/passage/passage.tsx, packages/perseus/src/widgets/passage-ref/passage-ref.tsx, packages/perseus/src/widgets/phet-simulation/phet-simulation.tsx, packages/perseus/src/widgets/plotter/plotter.tsx, packages/perseus/src/widgets/python-program/python-program.tsx, packages/perseus/src/widgets/radio/radio-component.tsx, packages/perseus/src/widgets/sorter/sorter.tsx, packages/perseus/src/widgets/video/video.tsx

Don't want to be involved in this pull request? Comment #removeme and we won't notify you of further changes.

@khan-actions-bot khan-actions-bot requested a review from a team November 14, 2024 21:25
Copy link
Contributor

github-actions bot commented Nov 14, 2024

Size Change: 0 B

Total Size: 1.29 MB

ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 38.9 kB
packages/keypad-context/dist/es/index.js 760 B
packages/kmath/dist/es/index.js 4.27 kB
packages/math-input/dist/es/index.js 77.8 kB
packages/math-input/dist/es/strings.js 1.79 kB
packages/perseus-core/dist/es/index.js 1.48 kB
packages/perseus-editor/dist/es/index.js 699 kB
packages/perseus-linter/dist/es/index.js 22.2 kB
packages/perseus/dist/es/index.js 420 kB
packages/perseus/dist/es/strings.js 3.54 kB
packages/pure-markdown/dist/es/index.js 3.66 kB
packages/simple-markdown/dist/es/index.js 12.4 kB

compressed-size-action

Copy link
Contributor

github-actions bot commented Nov 14, 2024

npm Snapshot: Published

Good news!! We've packaged up the latest commit from this PR (b70b3a7) and published it to npm. You
can install it using the tag PR1860.

Example:

yarn add @khanacademy/perseus@PR1860

If you are working in Khan Academy's webapp, you can run:

./dev/tools/bump_perseus_version.sh -t PR1860

Copy link
Contributor

@SonicScrewdriver SonicScrewdriver left a comment

Choose a reason for hiding this comment

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

Thank you so much!! This is wonderful and very helpful 🙏

packages/perseus/src/widget-ai-utils/README.md Outdated Show resolved Hide resolved
});
});

xit("should get prompt json which matches the state of the UI", async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@handeyeco handeyeco merged commit 9c2289b into main Nov 15, 2024
9 checks passed
@handeyeco handeyeco deleted the rename-ai branch November 15, 2024 18:35
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