-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.html
143 lines (134 loc) · 3.78 KB
/
options.html
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
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html>
<html>
<head>
<title>Extension Options</title>
<style>
body {
padding: 20px;
font-family: Arial, sans-serif;
}
.container {
max-width: 500px;
margin: 0 auto;
}
.form-group {
margin-bottom: 15px;
}
label {
display: block;
margin-bottom: 5px;
}
input[type="text"], textarea, select {
width: 100%;
padding: 8px;
margin-bottom: 10px;
}
textarea {
height: 100px;
resize: vertical;
}
.provider-section {
margin-bottom: 20px;
padding: 15px;
border: 1px solid #ddd;
border-radius: 4px;
}
.provider-section h3 {
margin-top: 0;
margin-bottom: 15px;
}
button {
background-color: #4CAF50;
color: white;
padding: 10px 15px;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #45a049;
}
#status {
margin-top: 10px;
padding: 10px;
display: none;
}
.success {
background-color: #dff0d8;
color: #3c763d;
}
.error {
background-color: #f2dede;
color: #a94442;
}
</style>
</head>
<body>
<div class="container">
<h2>Extension Options</h2>
<div class="form-group">
<label for="provider">AI Provider:</label>
<select id="provider">
<option value="openai">OpenAI</option>
<option value="gemini">Google Gemini</option>
<option value="ollama">Ollama (Local)</option>
</select>
</div>
<div class="form-group">
<label for="cursorLabel">Cursor Label:</label>
<input type="text" id="cursorLabel" placeholder="Enter cursor label (e.g., AI Assistant)">
</div>
<div id="openai-section" class="provider-section">
<h3>OpenAI Settings</h3>
<div class="form-group">
<label for="openaiKey">OpenAI API Key:</label>
<input type="text" id="openaiKey" placeholder="Enter your OpenAI API key">
</div>
<div class="form-group">
<label for="openaiModel">Model Name:</label>
<input type="text" id="openaiModel" placeholder="Enter model name (e.g., gpt-4o-mini)">
</div>
</div>
<div id="gemini-section" class="provider-section">
<h3>Google Gemini Settings</h3>
<div class="form-group">
<label for="geminiKey">Gemini API Key:</label>
<input type="text" id="geminiKey" placeholder="Enter your Gemini API key">
</div>
<div class="form-group">
<label for="geminiModel">Model Name:</label>
<input type="text" id="geminiModel" placeholder="Enter model name (e.g., gemini-2.0-flash-exp)">
</div>
</div>
<div id="ollama-section" class="provider-section">
<h3>Ollama Settings</h3>
<div class="form-group">
<label for="ollamaModel">Model Name:</label>
<input type="text" id="ollamaModel" placeholder="Enter model name (e.g., llama3.2-vision)" value="llama3.2-vision">
</div>
<p class="info-text" style="color: #666; font-size: 0.9em;">
Ollama runs locally on http://localhost:11434. Make sure you have Ollama installed and running.
</p>
</div>
<div class="form-group">
<label for="systemPrompt">System Prompt:</label>
<textarea id="systemPrompt" placeholder="Enter system prompt"></textarea>
</div>
<div class="form-group">
<label>
<input type="checkbox" id="debugMode">
Debug Mode (Show captured screenshots in chat)
</label>
</div>
<div class="form-group">
<label>
<input type="checkbox" id="agentMode">
Agent Mode (Allow AI to chain multiple actions)
</label>
</div>
<button id="save">Save</button>
<div id="status"></div>
</div>
<script src="options.js"></script>
</body>
</html>