mirror of
https://git.zavage.net/Zavage-Software/search-with-chatgpt-powered-by-openai-extension.git
synced 2026-08-10 13:40:29 -06:00
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.
64 lines
2.4 KiB
HTML
64 lines
2.4 KiB
HTML
<!doctype html>
|
|
<!-- Rendered inline inside about:addons. Keep it narrow-friendly and do not
|
|
rely on window sizing; a pref can degrade this to a standalone tab. -->
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>Search with ChatGPT — Options</title>
|
|
<link rel="stylesheet" href="options.css" />
|
|
|
|
<form id="settings" autocomplete="off">
|
|
<div class="field">
|
|
<label for="model">Model <span class="tag">experimental</span></label>
|
|
<!-- 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.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="field checkbox">
|
|
<label><input type="checkbox" id="temporaryChat" /> Request a temporary chat</label>
|
|
<p class="hint">
|
|
ChatGPT may not honour this. Check ChatGPT's own indicator before sending
|
|
anything sensitive.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="field checkbox">
|
|
<label><input type="checkbox" id="webSearch" /> Ask ChatGPT to use web search (hint only)</label>
|
|
<p class="hint">A hint to ChatGPT's interface, not a guarantee.</p>
|
|
</div>
|
|
|
|
<div class="field">
|
|
<label for="openIn">Open in</label>
|
|
<select id="openIn">
|
|
<option value="new-tab">A new tab</option>
|
|
<option value="background-tab">A new background tab</option>
|
|
<option value="new-window">A new window</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="field">
|
|
<label for="promptTemplate">Prompt template</label>
|
|
<input type="text" id="promptTemplate" spellcheck="false" />
|
|
<p class="hint"><code>{query}</code> is replaced with your selected text.</p>
|
|
</div>
|
|
|
|
<div class="actions">
|
|
<button type="button" id="restore">Restore defaults</button>
|
|
<span id="status" role="status" aria-live="polite"></span>
|
|
</div>
|
|
</form>
|
|
|
|
<p class="note">
|
|
Selecting text and choosing <strong>Ask ChatGPT</strong> — or pressing
|
|
<kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>G</kbd> — opens ChatGPT with your text
|
|
filled in. ChatGPT no longer submits prompts that arrive from a link, so press
|
|
Enter there to send. Change the shortcut under
|
|
<em>Manage Extension Shortcuts</em> in Add-ons.
|
|
</p>
|
|
|
|
<script type="module" src="options.js"></script>
|