mirror of
https://gh.wpcy.net/https://github.com/verygoodplugins/freescout-gpt-assistant.git
synced 2026-07-16 00:08:14 +08:00
BREAKING CHANGE: Major refactor to support multiple helpdesk platforms ✨ Features: - Add automatic platform detection (FreeScout/Help Scout) - Implement platform-specific adapters for seamless integration - Support both React/SPA (Help Scout) and traditional DOM (FreeScout) - Add GPT-5 and GPT-5 Mini model support - Enhance security with comprehensive HTML sanitization 🏗️ Architecture: - Introduce adapter pattern with platformAdapter base class - Add platform detection with 5-minute caching - Create dedicated adapters for FreeScout and Help Scout - Extract HTML sanitization to shared utility module 🔧 Improvements: - Add debounced operations for better performance - Enhance error handling and debugging capabilities - Update manifest for broader URL permissions - Improve context extraction for both platforms 📝 Documentation: - Update README with multi-platform capabilities - Add CHANGELOG for version tracking - Document platform-specific features and integration 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
187 lines
5.2 KiB
HTML
187 lines
5.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;
|
|
}
|
|
.shortcut-help {
|
|
font-size: 0.8em;
|
|
color: #666;
|
|
margin-top: -0.5em;
|
|
margin-bottom: 1em;
|
|
}
|
|
.cache-section,
|
|
.feedback-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;
|
|
}
|
|
.feedback-stats {
|
|
margin-bottom: 0.5em;
|
|
}
|
|
.feedback-stat {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-bottom: 0.25em;
|
|
font-size: 0.9em;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
"Helvetica Neue", Arial, "Noto Color Emoji", "Apple Color Emoji",
|
|
"Segoe UI Emoji", sans-serif;
|
|
}
|
|
.suggestions {
|
|
margin-top: 0.5em;
|
|
}
|
|
.suggestions ul {
|
|
margin: 0.5em 0;
|
|
padding-left: 1.5em;
|
|
font-size: 0.85em;
|
|
}
|
|
.suggestions li {
|
|
margin-bottom: 0.25em;
|
|
color: #495057;
|
|
}
|
|
.link-button {
|
|
background: none;
|
|
border: none;
|
|
color: #007bff;
|
|
text-decoration: underline;
|
|
cursor: pointer;
|
|
font-size: 0.875rem;
|
|
padding: 0;
|
|
}
|
|
.link-button:hover {
|
|
color: #0056b3;
|
|
}
|
|
</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 (Recommended)</option>
|
|
<option value="gpt-5-mini">GPT-5 Mini</option>
|
|
<option value="gpt-4o">GPT-4o</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 />
|
|
<div class="shortcut-help">
|
|
Format: Ctrl+Shift+G, Alt+Shift+A, etc. Use Cmd instead of Ctrl on Mac.
|
|
</div>
|
|
|
|
<label>
|
|
<input type="checkbox" id="enableFeedback" checked />
|
|
Enable response feedback system </label
|
|
><br />
|
|
<div class="shortcut-help">
|
|
Show thumbs up/down buttons after AI responses for quality tracking.
|
|
</div>
|
|
|
|
<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="feedback-section">
|
|
<h3 style="margin: 0 0 0.5em 0; font-size: 1em">Response Feedback</h3>
|
|
<div id="feedbackStats" class="feedback-stats">
|
|
<div class="feedback-stat">
|
|
<span>Loading feedback data...</span>
|
|
</div>
|
|
</div>
|
|
<div id="feedbackSuggestions" class="suggestions" style="display: none">
|
|
<strong>Suggestions:</strong>
|
|
<ul id="suggestionsList"></ul>
|
|
</div>
|
|
<div style="margin-top: 0.5em">
|
|
<button type="button" id="viewFeedback" class="link-button">
|
|
View All Feedback Data
|
|
</button>
|
|
<br /><br />
|
|
<button type="button" id="clearOld30" class="btn-small">
|
|
Clear 30+ days old
|
|
</button>
|
|
<button type="button" id="clearOld90" class="btn-small">
|
|
Clear 90+ days old
|
|
</button>
|
|
<button type="button" id="clearNegative" class="btn-small">
|
|
Clear negative only
|
|
</button>
|
|
<button type="button" id="clearFeedback" class="btn-small">
|
|
Clear all feedback
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<button id="save">Save</button>
|
|
<script src="popup.js"></script>
|
|
</body>
|
|
</html>
|