-
Notifications
You must be signed in to change notification settings - Fork 11
gpt-5-mini added and new default theme with more to come #87
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
need to sign up for google API key and add to the config.json.
Adjusting to allow Image input in anticipation of gpt-4 feature release. Frame work in place, but will likely need to tweak when avail.
Add files via upload
…t-instructions; update README; create feature/gpt5-mini branch
…enAI flow; update docs
…test' alias in both payload paths
… when DEBUG_CORS enabled; docs updated
…th warning; ignore config.local.js; docs updated
… file:// setup; docs cleaned
…e exit; hide footer Print in LCARS
…moji icons for Settings/Clear/Print
…3, gemini, lm-studio] when LCARS is active; restore full list on exit; preserve selection
…ed state; adjust grid width when collapsed
…ings/Clear/Speak/Print with tooltips; scale speak icon
core/js/gpt-core.js
Outdated
| // Google That | ||
| const keyword_google = 'google'; | ||
| const keyword_Google = 'Google'; | ||
| const query = sQuestion.replace(/<[^>]*>/g, '').replace(/google|Google/g, '').trim(); |
Check failure
Code scanning / CodeQL
Incomplete multi-character sanitization
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
The best way to fix this problem is to ensure that all HTML tags are completely removed from the string, even if they are malformed or nested. The recommended approach is to repeatedly apply the regular expression replacement until no more matches are found, as described in the background. This ensures that all instances of tags are removed, regardless of how they are constructed. Alternatively, using a well-tested library like sanitize-html would be ideal, but since we are limited to editing only the provided code and cannot assume the ability to add new dependencies, we will implement the repeated replacement approach.
Specifically, in file core/js/gpt-core.js, on line 210, replace:
const query = sQuestion.replace(/<[^>]*>/g, '').replace(/google|Google/g, '').trim();with:
let sanitized = sQuestion;
let previous;
do {
previous = sanitized;
sanitized = sanitized.replace(/<[^>]*>/g, '');
} while (sanitized !== previous);
const query = sanitized.replace(/google|Google/g, '').trim();This change ensures that all HTML tags are removed, even if they are nested or malformed.
No new imports or dependencies are required.
-
Copy modified lines R210-R216
| @@ -207,7 +207,13 @@ | ||
| // Google That | ||
| const keyword_google = 'google'; | ||
| const keyword_Google = 'Google'; | ||
| const query = sQuestion.replace(/<[^>]*>/g, '').replace(/google|Google/g, '').trim(); | ||
| let sanitized = sQuestion; | ||
| let previous; | ||
| do { | ||
| previous = sanitized; | ||
| sanitized = sanitized.replace(/<[^>]*>/g, ''); | ||
| } while (sanitized !== previous); | ||
| const query = sanitized.replace(/google|Google/g, '').trim(); | ||
|
|
||
| let googleContents; | ||
| if (sQuestion.includes(keyword_google) || sQuestion.includes(keyword_Google)) { |
Adding
gpt-5-minias new model, and adding LCARS inspired theme as default. Some cleaner functionality including markdown support.