freescout-gpt-assistant/popup.html
2025-10-13 17:07:25 +03:00

140 lines
4.2 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>FreeScout GPT Settings</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, "Noto Color Emoji", "Apple Color Emoji",
"Segoe UI Emoji", sans-serif;
padding: 1em;
width: 300px;
}
textarea,
input,
select {
width: 100%;
margin-bottom: 1em;
}
.cache-section {
margin: 1em 0;
padding: 0.5em;
background: #f5f5f5;
border-radius: 4px;
}
.cache-status {
font-size: 0.9em;
margin-bottom: 0.5em;
}
.cache-cached {
color: #28a745;
}
.cache-not-cached {
color: #6c757d;
}
.cache-error {
color: #dc3545;
}
.btn-small {
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
border: 1px solid #ccc;
background: white;
border-radius: 3px;
cursor: pointer;
margin-right: 0.5rem;
}
.btn-small:hover {
background: #f8f9fa;
}
</style>
</head>
<body>
<h2>Settings</h2>
<label>System Prompt</label><br />
<textarea id="systemPrompt" rows="6"></textarea><br />
<label>Docs URL (llms.txt)</label><br />
<input type="url" id="docsUrl" /><br />
<label>OpenAI API Key</label><br />
<input type="password" id="openaiKey" /><br />
<label>OpenAI Model</label><br />
<select id="openaiModel">
<option value="gpt-5">GPT-5 (Latest - Responses API)</option>
<option value="gpt-5-mini">GPT-5 Mini</option>
<option value="gpt-5-nano">GPT-5 Nano</option>
<option value="gpt-4o">GPT-4o (Recommended for GPT-4)</option>
<option value="gpt-4-turbo">GPT-4 Turbo</option>
<option value="gpt-3.5-turbo">GPT-3.5 Turbo</option></select
><br />
<label>Temperature (0.1 = consistent, 0.9 = creative)</label><br />
<input
type="number"
id="temperature"
min="0.1"
max="0.9"
step="0.1"
placeholder="0.7"
/><br />
<label>Max Tokens (response length limit)</label><br />
<input
type="number"
id="maxTokens"
min="50"
max="4000"
step="50"
placeholder="1000"
/><br />
<label>Keyboard Shortcut</label><br />
<input type="text" id="keyboardShortcut" placeholder="Ctrl+Shift+G" /><br />
<label>
<input type="checkbox" id="enableFeedback" checked />
Enable response feedback system
</label><br /><br />
<div class="cache-section">
<div class="cache-status" id="cacheStatus">Checking cache status...</div>
<button type="button" id="clearCache" class="btn-small">
Clear Documentation Cache
</button>
<button type="button" id="testFetch" class="btn-small">
Test Fetch Docs
</button>
</div>
<div class="cache-section">
<h3 style="margin: 0 0 0.5em 0; font-size: 1em">GPT-5 Settings</h3>
<label>Reasoning Effort</label><br />
<select id="gpt5ReasoningEffort">
<option value="minimal">Minimal</option>
<option value="low">Low</option>
<option value="medium">Medium</option>
<option value="high">High</option>
</select><br />
<label>Text Verbosity</label><br />
<select id="gpt5TextVerbosity">
<option value="low">Low</option>
<option value="medium">Medium</option>
<option value="high">High</option>
</select><br />
<label>Max Output Tokens (optional)</label><br />
<input type="number" id="gpt5MaxOutputTokens" min="1" step="1" placeholder="none" /><br />
<label>Service Tier</label><br />
<select id="gpt5ServiceTier">
<option value="">Not set (project default)</option>
<option value="auto">auto</option>
<option value="default">default</option>
<option value="flex">flex</option>
<option value="priority">priority</option>
</select><br />
<label>
<input type="checkbox" id="gpt5ParallelToolCalls" checked />
Enable parallel tool calls
</label>
</div>
<button id="save">Save</button>
<script src="popup.js"></script>
</body>
</html>