Repository navigation
Copy the skill's type files with a source's problems - #12
Merged
Merged
Conversation
A chat in a browser has the h5p-author skill's text and none of its files, so it guesses how a content type is written. The build page's copy now carries, after the problems, the type files of the source's own content type and of the libraries it names, in the wording measured on the weakest model (h5p-offline-player#172): 42 of 46 sources right by the second reply, 29 without. - vite.config.ts writes /h5p/build/types/ from the pinned h5p-author, with an index of them. - The page fetches them when it lists the problems, so the copy is written within the press; where they cannot be fetched, the problems are copied alone. - h5p-author 0.6.0 to 0.7.0, whose problems say what to write, and the player to 1.6.0, the version it names. Closes #11.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #11.
Copy the problems for the chat now copies, after the problems, the h5p-author skill's type files of the source's own content type and of the libraries it names. A chat in a browser, such as Gemini in Chrome, has the skill's text and none of its files, so it guessed how a type is written and learned one level's names from each round of problems. With the files, the weakest Claude model wrote 42 of 46 sources right by its second reply, and 29 without them (h5p-offline-player#172).
What changes
vite.config.ts:typeFiles()writes/h5p/build/types/<Type>.mdandindex.jsonfrom the pinned@missing-elements/h5p-author, which carries them since 0.7.0: 32 files, 106 kB. The folder is emptied before each build, like Vite's others.build-source.ts:typesNamed(source)is the source's own type, then the libraries it names, in order, each once.forTheChat(problems, typeFiles)adds their files in the wording that was measured.build-page.ts: the files are fetched when a source's problems are listed, so the copy is written within the button's press. Where they cannot be fetched, the problems are copied alone, and they are asked for again with the next problems. A line under the button says what the copy carries.Tested
pnpm buildandpnpm e2e: 11 pass, 7 before. New: the copy for one content type; for a book that names three libraries, one twice and one with no file; a type the pack does not have; a fetch that fails, then works; files that arrive after newer problems are shown; the served files against the package's. Each of five mutations of the new code fails a test.After merging
The bundles and the page build with h5p-author 0.7.0, and
/h5p/bundles/index.jsonsays so._sitegrows by 0.1 MB.Summary by cubic
Fixes the H5P build page so "Copy the problems for the chat" also copies the h5p-author skill's type files, which a browser chat like Gemini has no access to. In the measured run on the weakest Claude model (h5p-offline-player#172), 42 of 46 sources built right by the second reply, up from 29 without the files.
What changes
vite.config.tswrites/h5p/build/types/<Type>.mdandindex.jsonfrom the pinned@missing-elements/h5p-author0.7.0, which has carried the files since that release.@missing-elements/h5p-author0.6.0 to 0.7.0 and the offline-player to 1.6.0 (the version 0.7.0 names), and documents the type files in the README.Closes #11.
Written for commit b9507d7. Summary will update on new commits.