-
Notifications
You must be signed in to change notification settings - Fork 9
Charmathon 2025-05-30 fixes #1126
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
Conversation
There was a problem hiding this 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 addresses several issues outlined in CT-350 through CT-354 by updating API defaults, enhancing the useReactiveCell hook to support key paths, improving boolean tests for empty string values, and refining documentation.
- Update of default LLM models in llm/src/types.ts
- Refactor of useReactiveCell in bootstrap.js to accept key paths and adjustments in LLM response handling
- Improved check for plan description in charm/src/iterate.ts and documentation updates in charm/src/iframe/static.ts
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| llm/src/types.ts | Changed default iframe model from "google:gemini-2.0-flash" to "openai:gpt-4.1-nano". |
| jumble/public/module/charm/sandbox/bootstrap.js | Refactored useReactiveCell to take key paths and updated LLM response handling in APIs. |
| charm/src/iterate.ts | Modified condition for plan description to accept empty strings as valid input. |
| charm/src/iframe/static.ts | Updated API documentation and examples to reflect the new useReactiveCell(keyPath: string[]). |
Comments suppressed due to low confidence (1)
jumble/public/module/charm/sandbox/bootstrap.js:133
- The removal of the '.then(result => result.content)' unwrap in generateText may result in inconsistent handling when the LLM returns a direct string and when it returns an object. Consider adding a conditional check to unwrap the .content property only when necessary.
window.generateText = function ({ system, messages }) {
| window.removeEventListener("message", handleMessage); | ||
| window.parent.postMessage({ type: "unsubscribe", data: [rootKey] }, "*"); | ||
| }; | ||
| }, [rootKey, nestedPath.join(".")]); // Dependency on stringified path |
Copilot
AI
Apr 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Using nestedPath.join(".") in the dependency array could be problematic if any key contains periods. Consider an alternative approach for dependency tracking that avoids potential collisions in key names.
| }, [rootKey, nestedPath.join(".")]); // Dependency on stringified path | |
| }, [rootKey, nestedPath]); // Dependency on array reference |
CT-350 CT-351 CT-352 CT-353 CT-354
TODO
.contentunwrapawaiting generateImage ->generateImageUrlIdeas