chat-relay/extension/options.html
2025-07-24 00:23:41 -07:00

108 lines
No EOL
2.8 KiB
HTML

<!--
Chat Relay: Relay for AI Chat Interfaces
Copyright (C) 2025 Jamison Moore
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see https://www.gnu.org/licenses/.
-->
<!DOCTYPE html>
<html>
<head>
<title>AI Chat Relay Options</title>
<style>
body {
font-family: Arial, sans-serif;
padding: 20px;
max-width: 600px;
margin: 0 auto;
}
.form-group {
margin-bottom: 15px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
input[type="text"], input[type="number"] {
width: 100%;
padding: 8px;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
background-color: #4285f4;
color: white;
border: none;
padding: 10px 15px;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #3367d6;
}
.status {
margin-top: 15px;
padding: 10px;
border-radius: 4px;
display: none;
}
.success {
background-color: #d4edda;
color: #155724;
}
.error {
background-color: #f8d7da;
color: #721c24;
}
</style>
</head>
<body>
<h1>AI Chat Relay Options</h1>
<h2>Provider Settings</h2>
<div class="form-group">
<label for="chatGptCaptureMethod">ChatGPT Capture Method:</label>
<select id="chatGptCaptureMethod">
<option value="debugger">Debugger API</option>
<option value="websocket">WebSocket Proxy</option>
</select>
</div>
<h2>Connection Settings</h2>
<div class="form-group">
<label for="serverHost">Server Host:</label>
<input type="text" id="serverHost" placeholder="localhost">
</div>
<div class="form-group">
<label for="serverPort">Server Port:</label>
<input type="number" id="serverPort" min="1" max="65535" placeholder="3003">
</div>
<div class="form-group">
<label for="serverProtocol">Server Protocol:</label>
<select id="serverProtocol">
<option value="ws">WebSocket (ws://)</option>
<option value="wss">Secure WebSocket (wss://)</option>
</select>
</div>
<button id="save">Save Settings</button>
<div id="status" class="status"></div>
<script src="options.js"></script>
</body>
</html>