Repository navigation
Copy the type file of a type named as a chat with no skill text names it - #14
Merged
Merged
Conversation
The copy for the chat carried the type file of the source's `type` as written, so a type named "interactive-book", or under `contentType`, as a chat with no skill text writes it, had none. The page now asks h5p-author 0.8.0 for the source's own type, `sourceType`, the build's reading of it, and below it takes every listed machine name, under any key. A name is read against the list of type files, so `index.json` is fetched first. The 14 rounds that failed in h5p-offline-player#174's test, with no skill text, were built again on this page, and each copied what the model had been given. Of the 39 sources the type-file test replayed before, 36 copy as they did; the other three carry the same type files, and their problems read better since h5p-author 0.7.0 and 0.7.1. Closes #13.
|
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 #13.
Copy the problems for the chat carried the type file of the source's
typeas written. A chat with no skill text writes the type as it is spoken of,"interactive-book", or undercontentType, as Gemini in Chrome did from a link to the skill, and its first copy had no type file. Now the page asks h5p-author for the source's type,sourceType(new in 0.8.0, h5p-offline-player#176): itstypeas written or as it is spoken of, or with none the one undercontentTypeorlibrary, as the build reads it. Below it, a library counts by its listed machine name under any key, so a slide's element{ "type": "text" }is no H5P.Text.The page asks the build it ships instead of keeping a copy of its rule:
sourceTypewas exported from h5p-author for this.Measured
In h5p-offline-player#174 on the weakest Claude model, Haiku 5.5, with no skill text: the request as Gemini was given it, six content types, two runs each, this page's copy pasted back.
What changes
src/h5p/build/build-source.ts:typesNamed(source, listed)takes the source's own type fromsourceType, then every listed machine name below it, alone or with a major and minor, under any key.src/h5p/build/build-page.ts:typeFilesOffetchesindex.jsonfirst, since a name is read against that list.package.json: h5p-author 0.8.0. The player stays at 1.6.0, the version 0.8.0 names.README.md: The type files says how the type is found, and what the second test measured.Tested
pnpm e2e: 12 pass, one of them new: a book as Haiku wrote one (the content's fields beside"type": "interactive-book") and one as Gemini did (contentType,metadata) each copy the book's type file and those of the libraries they name; a type named under a key the build does not read, and a slide element's"type": "text", copy none. Three mutations oftypesNamed(the type as written, names read loosely below it, nothing read below it) each fail it.pnpm install --frozen-lockfile,tscandpnpm buildpass;/h5p/build/types/index.jsonsays author 0.8.0.Summary by cubic
Fixes the copy for the chat carrying no type file when a source names its type as a chat without skill text writes it — as spoken (
"interactive-book") or undercontentTypeorlibrary— rather than as thetypefield writes it. The copy now carries the type file of the type the build reads the source as.sourceType, and the copy fetchesindex.jsonfirst so names are read against the actual list.Written for commit 8b4ea54. Summary will update on new commits.