@involvex/super-agent-cli 0.0.87 → 0.0.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +122 -13
- package/dist/super-agent-cli.exe +0 -0
- package/dist/super-agent.js +5 -1
- package/eslint.config.mjs +1 -1
- package/package.json +3 -4
- package/super-agent.js +5 -1
- package/vscode-extension/.vscodeignore +1 -1
- package/vscode-extension/build.js +4 -4
- package/vscode-extension/dist/chat-provider.js +262 -0
- package/vscode-extension/dist/chat-provider.js.map +1 -0
- package/vscode-extension/dist/chat.css +268 -0
- package/vscode-extension/dist/chat.js +234 -0
- package/vscode-extension/dist/cli-connector.js +296 -0
- package/vscode-extension/dist/cli-connector.js.map +1 -0
- package/vscode-extension/dist/extension.js +156 -0
- package/vscode-extension/dist/extension.js.map +1 -0
- package/vscode-extension/dist/file-context.js +230 -0
- package/vscode-extension/dist/file-context.js.map +1 -0
- package/vscode-extension/dist/node_modules/ws/LICENSE +20 -0
- package/vscode-extension/dist/node_modules/ws/README.md +548 -0
- package/vscode-extension/dist/node_modules/ws/browser.js +8 -0
- package/vscode-extension/dist/node_modules/ws/index.js +13 -0
- package/vscode-extension/dist/node_modules/ws/lib/buffer-util.js +131 -0
- package/vscode-extension/dist/node_modules/ws/lib/constants.js +19 -0
- package/vscode-extension/dist/node_modules/ws/lib/event-target.js +292 -0
- package/vscode-extension/dist/node_modules/ws/lib/extension.js +203 -0
- package/vscode-extension/dist/node_modules/ws/lib/limiter.js +55 -0
- package/vscode-extension/dist/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/vscode-extension/dist/node_modules/ws/lib/receiver.js +706 -0
- package/vscode-extension/dist/node_modules/ws/lib/sender.js +602 -0
- package/vscode-extension/dist/node_modules/ws/lib/stream.js +161 -0
- package/vscode-extension/dist/node_modules/ws/lib/subprotocol.js +62 -0
- package/vscode-extension/dist/node_modules/ws/lib/validation.js +152 -0
- package/vscode-extension/dist/node_modules/ws/lib/websocket-server.js +554 -0
- package/vscode-extension/dist/node_modules/ws/lib/websocket.js +1393 -0
- package/vscode-extension/dist/node_modules/ws/package.json +69 -0
- package/vscode-extension/dist/node_modules/ws/wrapper.mjs +8 -0
- package/vscode-extension/dist/super-agent-vscode-0.0.2.vsix +0 -0
- package/vscode-extension/package.json +3 -3
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
/* Chat webview styles */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--bg-color: var(--vscode-editor-background);
|
|
5
|
+
--text-color: var(--vscode-editor-foreground);
|
|
6
|
+
--input-bg: var(--vscode-input-background);
|
|
7
|
+
--border-color: var(--vscode-panel-border);
|
|
8
|
+
--accent-color: var(--vscode-textLink-foreground);
|
|
9
|
+
--user-msg-bg: var(--vscode-textBlockQuote-background);
|
|
10
|
+
--assistant-msg-bg: var(--vscode-editor-inactiveSelectionBackground);
|
|
11
|
+
--system-msg-bg: var(--vscode-editorInfo-background);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
* {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
margin: 0;
|
|
17
|
+
padding: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
body {
|
|
21
|
+
font-family: var(--vscode-font-family);
|
|
22
|
+
background-color: var(--bg-color);
|
|
23
|
+
color: var(--text-color);
|
|
24
|
+
font-size: var(--vscode-font-size);
|
|
25
|
+
line-height: 1.5;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.container {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
height: 100vh;
|
|
32
|
+
max-height: 100vh;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.header {
|
|
36
|
+
display: flex;
|
|
37
|
+
justify-content: space-between;
|
|
38
|
+
align-items: center;
|
|
39
|
+
padding: 8px 12px;
|
|
40
|
+
border-bottom: 1px solid var(--border-color);
|
|
41
|
+
background-color: var(--vscode-sideBarSectionHeader-background);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.title {
|
|
45
|
+
font-weight: 600;
|
|
46
|
+
font-size: 12px;
|
|
47
|
+
text-transform: uppercase;
|
|
48
|
+
letter-spacing: 0.5px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.status {
|
|
52
|
+
font-size: 11px;
|
|
53
|
+
padding: 2px 8px;
|
|
54
|
+
border-radius: 3px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.status.connected {
|
|
58
|
+
background-color: #4ec9b0;
|
|
59
|
+
color: #000;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.status.disconnected {
|
|
63
|
+
background-color: #f48771;
|
|
64
|
+
color: #000;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.messages {
|
|
68
|
+
flex: 1;
|
|
69
|
+
overflow-y: auto;
|
|
70
|
+
padding: 12px;
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
gap: 12px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.message {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
gap: 4px;
|
|
80
|
+
animation: fadeIn 0.2s ease-in;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@keyframes fadeIn {
|
|
84
|
+
from {
|
|
85
|
+
opacity: 0;
|
|
86
|
+
transform: translateY(4px);
|
|
87
|
+
}
|
|
88
|
+
to {
|
|
89
|
+
opacity: 1;
|
|
90
|
+
transform: translateY(0);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.message.user {
|
|
95
|
+
align-items: flex-end;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.message.assistant {
|
|
99
|
+
align-items: flex-start;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.message.system {
|
|
103
|
+
align-items: center;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.message.user > .content {
|
|
107
|
+
background-color: var(--user-msg-bg);
|
|
108
|
+
border-radius: 8px 8px 0 8px;
|
|
109
|
+
max-width: 85%;
|
|
110
|
+
padding: 8px 12px;
|
|
111
|
+
word-wrap: break-word;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.message.assistant > .content {
|
|
115
|
+
background-color: var(--assistant-msg-bg);
|
|
116
|
+
border-radius: 8px 8px 8px 0;
|
|
117
|
+
max-width: 90%;
|
|
118
|
+
padding: 8px 12px;
|
|
119
|
+
word-wrap: break-word;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.message.system > .content {
|
|
123
|
+
background-color: var(--system-msg-bg);
|
|
124
|
+
border-radius: 4px;
|
|
125
|
+
padding: 4px 8px;
|
|
126
|
+
font-size: 11px;
|
|
127
|
+
color: var(--vscode-editorInfo-foreground);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.message.user .content,
|
|
131
|
+
.message.assistant .content {
|
|
132
|
+
white-space: pre-wrap;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.message .content pre {
|
|
136
|
+
background-color: var(--vscode-textCodeBlock-background);
|
|
137
|
+
border-radius: 4px;
|
|
138
|
+
padding: 8px;
|
|
139
|
+
overflow-x: auto;
|
|
140
|
+
margin: 8px 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.message .content code {
|
|
144
|
+
font-family: var(--vscode-editor-font-family);
|
|
145
|
+
font-size: var(--vscode-editor-font-size);
|
|
146
|
+
background-color: var(--vscode-textCodeBlock-background);
|
|
147
|
+
padding: 2px 4px;
|
|
148
|
+
border-radius: 3px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.message .content pre code {
|
|
152
|
+
background-color: transparent;
|
|
153
|
+
padding: 0;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.message .content strong {
|
|
157
|
+
font-weight: 600;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.message .content em {
|
|
161
|
+
font-style: italic;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.file-contexts {
|
|
165
|
+
display: flex;
|
|
166
|
+
flex-wrap: wrap;
|
|
167
|
+
gap: 4px;
|
|
168
|
+
margin-top: 4px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.file-mention {
|
|
172
|
+
font-size: 11px;
|
|
173
|
+
background-color: var(--vscode-badge-background);
|
|
174
|
+
color: var(--vscode-badge-foreground);
|
|
175
|
+
padding: 2px 6px;
|
|
176
|
+
border-radius: 3px;
|
|
177
|
+
font-family: var(--vscode-editor-font-family);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.input-area {
|
|
181
|
+
display: flex;
|
|
182
|
+
gap: 8px;
|
|
183
|
+
padding: 12px;
|
|
184
|
+
border-top: 1px solid var(--border-color);
|
|
185
|
+
background-color: var(--vscode-editorGroup-header-tabsBackground);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.input-area input {
|
|
189
|
+
flex: 1;
|
|
190
|
+
background-color: var(--input-bg);
|
|
191
|
+
color: var(--text-color);
|
|
192
|
+
border: 1px solid var(--border-color);
|
|
193
|
+
border-radius: 4px;
|
|
194
|
+
padding: 8px 12px;
|
|
195
|
+
font-size: var(--vscode-font-size);
|
|
196
|
+
font-family: var(--vscode-font-family);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.input-area input:focus {
|
|
200
|
+
outline: none;
|
|
201
|
+
border-color: var(--accent-color);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.input-area button {
|
|
205
|
+
background-color: var(--accent-color);
|
|
206
|
+
color: var(--vscode-button-foreground);
|
|
207
|
+
border: none;
|
|
208
|
+
border-radius: 4px;
|
|
209
|
+
padding: 8px 16px;
|
|
210
|
+
font-size: 13px;
|
|
211
|
+
font-weight: 500;
|
|
212
|
+
cursor: pointer;
|
|
213
|
+
white-space: nowrap;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.input-area button:hover {
|
|
217
|
+
filter: brightness(0.9);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.input-area button:active {
|
|
221
|
+
transform: scale(0.98);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.input-area #abort {
|
|
225
|
+
background-color: var(--vscode-errorBackground);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.file-context {
|
|
229
|
+
display: flex;
|
|
230
|
+
flex-wrap: wrap;
|
|
231
|
+
gap: 6px;
|
|
232
|
+
padding: 8px 12px;
|
|
233
|
+
border-top: 1px solid var(--border-color);
|
|
234
|
+
background-color: var(--vscode-editorGroupHeader-tabsBackground);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.file-context button {
|
|
238
|
+
background-color: var(--vscode-button-secondaryBackground);
|
|
239
|
+
color: var(--vscode-button-secondaryForeground);
|
|
240
|
+
border: 1px solid var(--border-color);
|
|
241
|
+
border-radius: 4px;
|
|
242
|
+
padding: 4px 8px;
|
|
243
|
+
font-size: 11px;
|
|
244
|
+
cursor: pointer;
|
|
245
|
+
font-family: var(--vscode-editor-font-family);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.file-context button:hover {
|
|
249
|
+
background-color: var(--vscode-button-secondaryHoverBackground);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* Scrollbar styling */
|
|
253
|
+
.messages::-webkit-scrollbar {
|
|
254
|
+
width: 8px;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.messages::-webkit-scrollbar-track {
|
|
258
|
+
background: transparent;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.messages::-webkit-scrollbar-thumb {
|
|
262
|
+
background: var(--vscode-scrollbarSlider-background);
|
|
263
|
+
border-radius: 4px;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.messages::-webkit-scrollbar-thumb:hover {
|
|
267
|
+
background: var(--vscode-scrollbarSlider-hoverBackground);
|
|
268
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
// Chat webview script
|
|
2
|
+
// This runs in the browser context of the webview
|
|
3
|
+
const vscode = acquireVsCodeApi();
|
|
4
|
+
|
|
5
|
+
let messages = [];
|
|
6
|
+
let isConnected = false;
|
|
7
|
+
|
|
8
|
+
// Initialize
|
|
9
|
+
window.addEventListener("load", () => {
|
|
10
|
+
const promptInput = document.getElementById("prompt");
|
|
11
|
+
const sendButton = document.getElementById("send");
|
|
12
|
+
const abortButton = document.getElementById("abort");
|
|
13
|
+
const mentionButton = document.getElementById("mentionCurrent");
|
|
14
|
+
|
|
15
|
+
// Send message on Enter
|
|
16
|
+
if (promptInput) {
|
|
17
|
+
promptInput.addEventListener("keydown", e => {
|
|
18
|
+
if (e.key === "Enter" && !e.shiftKey) {
|
|
19
|
+
e.preventDefault();
|
|
20
|
+
sendMessage();
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (sendButton) {
|
|
26
|
+
sendButton.addEventListener("click", sendMessage);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (abortButton) {
|
|
30
|
+
abortButton.addEventListener("click", () => {
|
|
31
|
+
vscode.postMessage({ type: "abort" });
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (mentionButton) {
|
|
36
|
+
mentionButton.addEventListener("click", () => {
|
|
37
|
+
vscode.postMessage({ type: "getFileContext" });
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Request file context on load
|
|
42
|
+
vscode.postMessage({ type: "ready" });
|
|
43
|
+
vscode.postMessage({ type: "getFileContext" });
|
|
44
|
+
vscode.postMessage({ type: "requestHistory" });
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// Handle messages from extension
|
|
48
|
+
window.addEventListener("message", event => {
|
|
49
|
+
const message = event.data;
|
|
50
|
+
|
|
51
|
+
switch (message.type) {
|
|
52
|
+
case "messages":
|
|
53
|
+
messages = message.messages;
|
|
54
|
+
renderMessages();
|
|
55
|
+
break;
|
|
56
|
+
|
|
57
|
+
case "connectionStatus":
|
|
58
|
+
isConnected = message.connected;
|
|
59
|
+
updateConnectionStatus();
|
|
60
|
+
break;
|
|
61
|
+
|
|
62
|
+
case "fileContext":
|
|
63
|
+
updateFileContext(message.currentFile, message.openFiles);
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
function sendMessage() {
|
|
69
|
+
const promptInput = document.getElementById("prompt");
|
|
70
|
+
const content = promptInput?.value.trim();
|
|
71
|
+
|
|
72
|
+
if (content) {
|
|
73
|
+
vscode.postMessage({ type: "sendMessage", content });
|
|
74
|
+
if (promptInput) {
|
|
75
|
+
promptInput.value = "";
|
|
76
|
+
}
|
|
77
|
+
showAbortButton();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function renderMessages() {
|
|
82
|
+
const messagesContainer = document.getElementById("messages");
|
|
83
|
+
if (!messagesContainer) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
messagesContainer.innerHTML = "";
|
|
88
|
+
|
|
89
|
+
for (const message of messages) {
|
|
90
|
+
const messageDiv = document.createElement("div");
|
|
91
|
+
messageDiv.className = `message ${message.role}`;
|
|
92
|
+
|
|
93
|
+
const contentDiv = document.createElement("div");
|
|
94
|
+
contentDiv.className = "content";
|
|
95
|
+
|
|
96
|
+
if (message.role === "user") {
|
|
97
|
+
contentDiv.textContent = message.content;
|
|
98
|
+
} else {
|
|
99
|
+
contentDiv.innerHTML = formatContent(message.content);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
messageDiv.appendChild(contentDiv);
|
|
103
|
+
|
|
104
|
+
// Add file contexts if present
|
|
105
|
+
if (message.fileContexts && message.fileContexts.length > 0) {
|
|
106
|
+
const filesDiv = document.createElement("div");
|
|
107
|
+
filesDiv.className = "file-contexts";
|
|
108
|
+
|
|
109
|
+
for (const fileCtx of message.fileContexts) {
|
|
110
|
+
const fileSpan = document.createElement("span");
|
|
111
|
+
fileSpan.className = "file-mention";
|
|
112
|
+
fileSpan.textContent = `@${fileCtx.relativePath}`;
|
|
113
|
+
filesDiv.appendChild(fileSpan);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
messageDiv.appendChild(filesDiv);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
messagesContainer.appendChild(messageDiv);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Scroll to bottom
|
|
123
|
+
messagesContainer.scrollTop = messagesContainer.scrollHeight;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function formatContent(content) {
|
|
127
|
+
// Simple markdown-like formatting
|
|
128
|
+
let formatted = content;
|
|
129
|
+
|
|
130
|
+
// Code blocks
|
|
131
|
+
formatted = formatted.replace(
|
|
132
|
+
/```(\w+)?\n([\s\S]*?)```/g,
|
|
133
|
+
(match, lang, code) => {
|
|
134
|
+
return `<pre><code class="language-${lang || "text"}">${escapeHtml(
|
|
135
|
+
code.trim(),
|
|
136
|
+
)}</code></pre>`;
|
|
137
|
+
},
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
// Inline code
|
|
141
|
+
formatted = formatted.replace(
|
|
142
|
+
/`([^`]+)`/g,
|
|
143
|
+
(match, code) => `<code>${escapeHtml(code)}</code>`,
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
// Bold
|
|
147
|
+
formatted = formatted.replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>");
|
|
148
|
+
|
|
149
|
+
// Italic
|
|
150
|
+
formatted = formatted.replace(/\*([^*]+)\*/g, "<em>$1</em>");
|
|
151
|
+
|
|
152
|
+
// Line breaks
|
|
153
|
+
formatted = formatted.replace(/\n/g, "<br>");
|
|
154
|
+
|
|
155
|
+
return formatted;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function escapeHtml(text) {
|
|
159
|
+
const div = document.createElement("div");
|
|
160
|
+
div.textContent = text;
|
|
161
|
+
return div.innerHTML;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function updateConnectionStatus() {
|
|
165
|
+
const statusElement = document.getElementById("status");
|
|
166
|
+
if (statusElement) {
|
|
167
|
+
statusElement.textContent = isConnected ? "Connected" : "Disconnected";
|
|
168
|
+
statusElement.className =
|
|
169
|
+
"status " + (isConnected ? "connected" : "disconnected");
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function updateFileContext(currentFile, openFiles) {
|
|
174
|
+
const fileContextDiv = document.getElementById("fileContext");
|
|
175
|
+
if (!fileContextDiv) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
fileContextDiv.style.display = openFiles.length > 0 ? "block" : "none";
|
|
180
|
+
|
|
181
|
+
// Clear existing buttons
|
|
182
|
+
const existingButtons = fileContextDiv.querySelectorAll("button");
|
|
183
|
+
existingButtons.forEach(btn => btn.remove());
|
|
184
|
+
|
|
185
|
+
// Add button for current file
|
|
186
|
+
if (currentFile) {
|
|
187
|
+
const button = document.createElement("button");
|
|
188
|
+
button.textContent = `@ ${currentFile.relativePath}`;
|
|
189
|
+
button.onclick = () => {
|
|
190
|
+
const promptInput = document.getElementById("prompt");
|
|
191
|
+
if (promptInput) {
|
|
192
|
+
promptInput.value = `@${currentFile.relativePath} ${promptInput.value}`;
|
|
193
|
+
promptInput.focus();
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
fileContextDiv.appendChild(button);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Add buttons for open files (limit to 5)
|
|
200
|
+
for (const file of openFiles.slice(0, 5)) {
|
|
201
|
+
if (currentFile && file.relativePath === currentFile.relativePath) {
|
|
202
|
+
continue; // Skip current file
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const button = document.createElement("button");
|
|
206
|
+
button.textContent = `@ ${file.relativePath}`;
|
|
207
|
+
button.onclick = () => {
|
|
208
|
+
const promptInput = document.getElementById("prompt");
|
|
209
|
+
if (promptInput) {
|
|
210
|
+
promptInput.value = `@${file.relativePath} ${promptInput.value}`;
|
|
211
|
+
promptInput.focus();
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
fileContextDiv.appendChild(button);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function showAbortButton() {
|
|
219
|
+
const abortButton = document.getElementById("abort");
|
|
220
|
+
const sendButton = document.getElementById("send");
|
|
221
|
+
|
|
222
|
+
if (abortButton && sendButton) {
|
|
223
|
+
abortButton.style.display = "inline-block";
|
|
224
|
+
sendButton.style.display = "none";
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Hide abort button after 30 seconds (timeout)
|
|
228
|
+
setTimeout(() => {
|
|
229
|
+
if (abortButton && sendButton) {
|
|
230
|
+
abortButton.style.display = "none";
|
|
231
|
+
sendButton.style.display = "inline-block";
|
|
232
|
+
}
|
|
233
|
+
}, 30000);
|
|
234
|
+
}
|