mirror of
https://git.zavage.net/Zavage-Software/search-with-chatgpt-powered-by-openai-extension.git
synced 2026-08-31 22:20:47 -06:00
fix: derive the model maxlength and document the frame-focus cases
maxlength was hard-coded to 200 in the markup while MAX_MODEL_CHARS lives in lib/defaults.js; lowering the constant would have left the input accepting values mergeSettings() silently discards. It is now set from the constant at render time. Also records the hasFocus() gate's four manual frame cases in AGENTS.md, including the findbar trade-off, and notes that fitToBudget()'s budget guarantee assumes mergeSettings-validated input.
This commit is contained in:
@@ -9,7 +9,9 @@
|
||||
<form id="settings" autocomplete="off">
|
||||
<div class="field">
|
||||
<label for="model">Model <span class="tag">experimental</span></label>
|
||||
<input type="text" id="model" placeholder="auto" spellcheck="false" maxlength="200" />
|
||||
<!-- maxlength is set from MAX_MODEL_CHARS in options.js, so the input and
|
||||
mergeSettings() can never disagree about the bound. -->
|
||||
<input type="text" id="model" placeholder="auto" spellcheck="false" />
|
||||
<p class="hint">
|
||||
ChatGPT may ignore this and use your account default. Leave blank to
|
||||
always use your account default.
|
||||
|
||||
Reference in New Issue
Block a user