-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.html
More file actions
130 lines (125 loc) · 3.39 KB
/
Copy pathoptions.html
File metadata and controls
130 lines (125 loc) · 3.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AI Extension Options</title>
<style>
body {
margin: 0;
padding: 24px;
font-family: Segoe UI, sans-serif;
background: #f4f6f9;
}
.card {
max-width: 620px;
background: #fff;
border-radius: 12px;
padding: 20px;
box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}
h1 {
margin: 0 0 8px;
font-size: 22px;
}
p {
margin: 0 0 14px;
color: #444;
line-height: 1.5;
}
label {
display: block;
margin-bottom: 8px;
font-weight: 600;
}
input,
select {
width: 100%;
box-sizing: border-box;
padding: 10px;
border-radius: 8px;
border: 1px solid #ccd3dc;
}
button {
margin-top: 14px;
border: none;
border-radius: 8px;
background: #0f62fe;
color: #fff;
font-weight: 600;
padding: 10px 14px;
cursor: pointer;
}
.btn-row {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.diag-row {
margin-top: 12px;
display: flex;
align-items: center;
gap: 8px;
}
.diag-row input {
width: auto;
}
#testBtn {
background: #1f7a3f;
}
#status {
margin-top: 10px;
min-height: 20px;
color: #0a7f28;
font-size: 14px;
white-space: pre-line;
}
.hint {
margin-top: 14px;
font-size: 13px;
color: #555;
}
code {
background: #eef1f6;
border-radius: 6px;
padding: 1px 6px;
}
</style>
</head>
<body>
<main class="card">
<h1>AI Provider Settings</h1>
<p>
Configure provider and API keys. Settings are stored via <code>chrome.storage.sync</code> and used by the extension background worker.
</p>
<label for="provider">Provider</label>
<select id="provider">
<option value="moonshot">Moonshot (Kimi)</option>
<option value="deepseek">DeepSeek</option>
</select>
<label for="apiKey">Moonshot / Kimi API Key</label>
<input id="apiKey" type="password" placeholder="sk-..." autocomplete="off" />
<label for="deepseekApiKey" style="margin-top: 12px">DeepSeek API Key</label>
<input id="deepseekApiKey" type="password" placeholder="sk-..." autocomplete="off" />
<div class="btn-row">
<button id="saveBtn" type="button">Save</button>
<button id="testBtn" type="button">Test Connection</button>
</div>
<label class="diag-row" for="diagnosticMode">
<input id="diagnosticMode" type="checkbox" />
Enable diagnostic mode (show endpoint, status, and truncated server error)
</label>
<div id="status"></div>
<p class="hint">
Moonshot endpoint: <code>https://api.moonshot.cn/v1/chat/completions</code>
</p>
<p class="hint">
DeepSeek endpoint: <code>https://api.deepseek.com/chat/completions</code>
</p>
<p class="hint">
Key tips: only paste the raw key, do not include <code>Bearer </code>, quotes, or extra spaces.
</p>
</main>
<script src="options.js"></script>
</body>
</html>